News for hackers. Stuff that matters.
Re:Cakelisp: A Programming Language for Games by kloud on Monday December 21, 2020 @06:36AM (#25493964)
Very cool project, great to see more s-expression based languages. I maintain a list of lisp-flavored languages [0], so I will add Cakelisp there.

How did you implement the macro expansion? Are you translating the macros to C/C++, then compile it with C/C++ compiler and execute the temporary binary or do you have an interpreter for that?

I work on a somewhat similar project called Liz, which is basically a lisp-flavored dialect of Zig [1]. I did not implement user-defined macros yet, planning to learn more about comptime and its limitations first. But the compiler itself uses macro-expansion to implement many features.

[0] https://github.com/dundalek/awesome-lisp-languages

[1] https://github.com/dundalek/liz

Re:Cakelisp: A Programming Language for Games by pietrofmaggi on Monday December 21, 2020 @08:35AM (#25494765)
Thanks for maintaining this list, it looks super interesting and it was exactly what I was looking for!
Re:Cakelisp: A Programming Language for Games by makuto on Monday December 21, 2020 @11:28AM (#25496376)
Yes, they are compiled just like the final exe, only they become dynamic libraries that I load with libdl. On subsequent builds, they are loaded again, unless the macro changed.