Thread: Merry Christmas!

  1. #31
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,403
    Quote Originally Posted by MutantJohn
    What country are you from?
    Japan, probably. Of course, that 24 December is more the culmination of the Christmas festive season in Japan than 25 December does not change the fact that 25 December is still Christmas day, so Elysia is either trying to be funny by playing on the different custom or is simply ignorant. I trust that it is the former
    Last edited by laserlight; 11-01-2014 at 10:47 AM.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  2. #32
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    This whole thread has been mostly me having fun by being silly
    Some celebrate giving presents on 24th, some on 25th, some don't have christmas at all. To me, christmas is only the 24th because that's the only day that's remotely special to me. Giving presents is something special. The rest of christmas just isn't very interesting to me.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #33
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    laser, I think you're right. I just installed Japanese fonts and the text under Elysia's name is no longer just boxes!

  4. #34
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    The world has supported something called "Unicode" for a long time now... I suggest you use it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #35
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Nah, I used adobe-source-han-sans-jp-fonts.

  6. #36
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,611
    Quote Originally Posted by Elysia View Post
    The world has supported something called "Unicode" for a long time now... I suggest you use it.
    Unicode without a font only makes gibberish.

    Japan, probably.
    Not necessarily. I've been told he lives elsewhere. He just likes anime. A lot.
    Last edited by whiteflags; 11-01-2014 at 02:45 PM.

  7. #37
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by whiteflags View Post
    Unicode without a font only makes gibberish.
    The point was to use a unicode font that can represent all characters in unicode, or most of them.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #38
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    We change gifts on midnight. Technically already on the 25th. But I remember when I was a kid and my parents used to do it in the morning of the 25th. It was damn hard to sleep that night...
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  9. #39
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by Elysia View Post
    The point was to use a unicode font that can represent all characters in unicode, or most of them.
    There is no such font.

    But that's okay, most multilingual fonts are ugly anyway.

  10. #40
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    877
    Quote Originally Posted by Yarin View Post
    There is no such font.

    But that's okay, most multilingual fonts are ugly anyway.

    All you really need is Webdings.

    10 / 10

    Best font ever.
    WndProc = (2[b] || !(2[b])) ? SufferNobly : TakeArms;

  11. #41
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by Alpo View Post
    Since it's programmer's Christmas, I thought I had better begin the atheist programmer's war on Christmas.

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    
    int compare( const void*, const void* );
    
    int compare( const void* a, const void* b )
    {
        return *(char*)a - *(char*)b;
    }
    
    int main()
    {
        char szSanta[] = "Santa";
        char szSatan[] = "Satan";
    
        qsort( szSanta, strlen( szSanta ), sizeof( char ), compare );
        qsort( szSatan, strlen( szSatan ), sizeof( char ), compare );
    
        if( !strcmp( szSanta, szSatan ) )
        {
            printf("Santa is the DEVIL!\n");
        }
        else
        {
            printf("Tide goes in, tide goes out, you can't explain that.\n");
        }
    
        return 0;
    }
    I can't tell what's worse: the fact that you (along with traditional christmas warriors) are fighting a war on Christmas only to be contrary, which serves no purpose, or the fact that you used Hungarian Notation.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  12. #42
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    szSanta - Definately a c-string variable.

    a, b - Have no idea what these are.

    gg

  13. #43
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Have no idea why std::string and std::sort aren't used...
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #44
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by Elysia View Post
    Have no idea why std::string and std::sort aren't used...
    Given that stdio.h, stdlib.h, and string.h are used, and no C++ headers are specified, I suspect that this is intended to be C source, not C++. Simply choosing C over C++ is not an automatic sign of trouble.

    Alpo also omitted parameter names from the declaration, which is bad practice.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  15. #45
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Elkvis View Post
    Given that stdio.h, stdlib.h, and string.h are used, and no C++ headers are specified, I suspect that this is intended to be C source, not C++. Simply choosing C over C++ is not an automatic sign of trouble.
    It is... if you are intending to write C++.
    But anyway, I wrote that because I wanted to see C++, not C, since C is an eyesore.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Merry Christmas!
    By Dino in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 12-25-2008, 09:39 PM
  2. Merry Christmas!
    By sean in forum A Brief History of Cprogramming.com
    Replies: 36
    Last Post: 12-25-2004, 11:40 PM
  3. Merry Christmas, y'all
    By salvelinus in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 12-26-2002, 08:50 PM
  4. Merry Christmas Everyone!!
    By Yoshi in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 12-27-2001, 03:34 PM
  5. Merry Christmas!!
    By Yoshi in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-12-2001, 10:49 PM