Live data from Hacker News

Pretty.c

github.com

141–150 of 227 posts

Re: Pretty.c

#142
post #129

> The goals for Pretty C are: > Provide so much syntactic sugar as to cause any C developer a diabetes-induced heart attack. :-D

As someone who just got diagnosed with type-1 diabetes (the auto-immune variety, not the “you eat too much sugar” variety), this was far more depressing than funny. I’m probably being overly-sensitive, but man my life has gone to shit in the last couple of years…

Re: Pretty.c

#145
Sorry for what is probably a stupid question. Does pretty.c act as a preprocessor or sorts, converting your pretty.c script into actual c, that is then compiled? Or is it a virtual machine that interprets your pretty.c script?

Re: Pretty.c

#148

For what it’s worth this makes the same mistake that Python 2 did: string and bytes are not the same type and shouldn’t be treated as such.

What is your definition of "string"? If it's "human-readable text", then fine, a string is not the same thing as an arbitrary byte array. But lots of languages don't enforce that definition.

Well that's the very thing: not enforcing that distinction is the very mistake in question.

Re: Pretty.c

#149

Sorry for what is probably a stupid question. Does pretty.c act as a preprocessor or sorts, converting your pretty.c script into actual c, that is then compiled? Or is it a virtual machine that interprets your pretty.c script?

It's a set of C Preprocessor macros, so you don't even need to somehow process the code—you just #include the header and hack away as if it was regular C!

Re: Pretty.c

#150

Sorry for what is probably a stupid question. Does pretty.c act as a preprocessor or sorts, converting your pretty.c script into actual c, that is then compiled? Or is it a virtual machine that interprets your pretty.c script?

Preprocessor of sorts. From the readme:

The goals for Pretty C are:

- Provide so much syntactic sugar as to cause any C developer a diabetes-induced heart attack.

- Deprecate Lua, Python, JavaScript, Ruby and a dozen other languages, because Pretty C is the ultimate scripting language, but lightning-fast and strongly typed!

- Including only one header (yes, Pretty C is a header-only library #include-able from arbitrary C file!) to turn any codebase into a beginner friendly one.

Post reply on HN