Live data from Hacker News

Pretty.c

github.com

21–30 of 227 posts

Re: Pretty.c

#21
post #11

Earlier quoted context omitted.

Is What Every Computer Scientist Should Know About Floating-Point Arithmetic wrong ??!! addendum: why are obviously rhetorical questions are taken so literally here?

Because text doesn't convey sarcastic voice tonality, so the intent is far from obvious.

Sarcastic? Okay, if you say so.

Picking out an obvious define function that compares a float with a float sum of that nature should indicate an good understanding of why that might be called wizardry and deserving of a second look.

Hats off to the peer comment that suggested scaling against epsilon rather than simpliy regurging the substitution "as was" from the header.

The scaling is better in general, optional in some specific contexts.

Re: Pretty.c

#22

Wow, neat! The wildest part to me is > And it’s backwards-compatible with C and all of its libraries! I can't wait to give it a shot! This looks like a riot.

Have you heard of Zig?

Re: Pretty.c

#23
post #7
post #6

> turn any codebase into a beginner friendly one Okay then. I was hoping to see a “this is just for fun” disclaimer but didn’t see one. Please never actually use this in a project that other people will have to read or contribute to.

> Provide so much syntactic sugar as to cause any C developer a diabetes-induced heart attack. seems like its obvious to me that its a joke

It's a joke that I would happily use.

Re: Pretty.c

#24
post #22

Wow, neat! The wildest part to me is > And it’s backwards-compatible with C and all of its libraries! I can't wait to give it a shot! This looks like a riot.

Have you heard of Zig?

It requires a different compiler. This is just a collection of C preprocessor macros

Re: Pretty.c

#26
All that is missing is a garbage collector. Should be possible to implement one by overriding malloc & friends?

Re: Pretty.c

#27
post #14
post #10

I'm reminded of the guy who did #define BEGIN { #define END } and a whole bunch of other macro-larkey just to make C look more like Pascal. Only then would he deign to code in it.

https://en.wikipedia.org/wiki/Stephen_R._Bourne https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/sh

Now that's just silly. And I see the backwards keyword terminators (LOOP/POOL).

I have wondered why we have case/esac, if/fi but while/done. I imagine the author himself figured that while/elihw would just be entirely ridiculous.

Re: Pretty.c

#28
Reminds me of a C++ codebase I once had to inspect that was entirely written as if it were written in Java. With camelcase naming for everything, getters and setters for every class variable, interfaces everywhere.

Re: Pretty.c

#30

Reminds me of a C++ codebase I once had to inspect that was entirely written as if it were written in Java. With camelcase naming for everything, getters and setters for every class variable, interfaces everywhere.

Good job they weren't using MSVC I guess...

https://learn.microsoft.com/en-us/cpp/cpp/property-cpp?view=...

Post reply on HN