Let's Destroy C
gist.github.com
gist.github.com
Simon’s description dates from 2003 https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=9...
And it has been used in PuTTY since before the start of its version control history in 1999.
And if you don’t like curly braces, Bournegol has been a thing since the 7th Edition unix shell in the 1970s https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/sh...
Show me an example where you turn the syntax into prefix notation instead, so turning the hello world example into (or something similar):
(def main (displayln "Hello, World!"))
Then I'll believe you :) Otherwise it just looks like another flavor of C #include <stdio.h>
#define print(_f) puts(_f); }
#define Cdisplayln print((
#define Cdef int
#define main main(){
Cdef main Cdisplayln "Hello, World!"))
[For a non-joke approach (not mine) see: https://github.com/kchanqvq/CSP ]Did you look at the linked cpp implementation of eval?
The idea by itself is nothing new and pretty much any novice C programmer eventually stumbles across it. Famously, the original Bourne Shell was written in a variant of ALGOL68, fed through a C compiler using macro based translation[1][2], which helped spark the idea for the IOCCC[2].
[1] https://en.wikipedia.org/wiki/Bourne_shell#History
[2] https://en.wikipedia.org/wiki/International_Obfuscated_C_Cod...
It read to me more like a tongue in cheek statement in the same way that a car enthusiast might joke that they're about to destroy a Honda Civic by putting in a V8 engine and installing a body kit.
I did also take it too far and wrapped it with tcc [0] into a "language".
If there were a novelty requirement to push to github (or to publish on HN for that matter) it would be much less fun. On the other hand, it is also fun to hear about the history.
Personally I always enjoy abusing the C preprocessor for fun and profit. Just yesterday I was contemplating the potential amusement of using cpp (and cc) to generate custom assemblers, customized assembly language syntax, and assembly language interpreters.
I have no interest in that at the moment.