News for hackers. Stuff that matters.
Re:Nuklear: A single-header ANSI C GUI library by moefh on Saturday February 10, 2018 @04:06PM (#16349590)
> Even if you had a gigabyte of text in an #if 0, that's only about 2 more seconds on the compile

Are you sure your implementation is correct? How does it handle this:

    #if 0
    "\
    #endif \
    "
    #endif
I'm not saying gcc's and clang's preprocessors are not really fast, but preprocessing is trickier than most people expect. In particular (as you can see from my example), while skipping over an "#if 0" you still have to split the source into tokens and discard the tokens.
Re:Nuklear: A single-header ANSI C GUI library by chubot on Saturday February 10, 2018 @06:00PM (#16350132)
Absolutely, great example! I have looked at quite a few implementations of preprocessors, and they're not simple.

I don't trust anyone who thinks it's simple without actually having implemented it -- and tested it on real code.

One older thread: https://news.ycombinator.com/item?id=10945552

Re:Nuklear: A single-header ANSI C GUI library by a_t48 on Sunday February 11, 2018 @04:13AM (#16351894)
I agree with the sentiment, but it should be easy enough to smash line continuations together while you're searching for that #endif (famous last words)