Hacker News new | past | comments | ask | show | jobs | submit login

Beautiful. Also, after 30+ years of writing C and C++, I learned one thing by casually browsing the source code: you can use a preprocessor macro in an #include statement. Thanks.



Yes! GCC calls it computed includes.

https://gcc.gnu.org/onlinedocs/cpp/Computed-Includes.html

I used it to include architecture-specific source code and also a generated C file containing a table of Linux system calls defined by the Linux UAPI lone is compiled against.

The makefile defines those macros by passing flags:

  -D LONE_ARCH_SOURCE='"$(ARCH.c)"' -D LONE_NR_SOURCE='"NR.c"'


Oh so it's a GCC-specific thing... that explains it. In any case, congratulations on the lisp! It's beautiful code. I wish my current codebase was that beautiful. I mean, it's a lot of us contributing to it so the beauty is a kind of "meeting of the minds" situation... but still :)

PS: My current project implements a lisp... rendered as JSON. Some other angle on beauty...


Thanks, I mean it. I've been programming alone for a long time, it really means a lot to read that.

> My current project implements a lisp... rendered as JSON. Some other angle on beauty...

Hey, feel free to share it. I'm curious about your project.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: