Game Oriented Assembly Lisp was my chief inspiration.
In Naughty Dog’s Uncharted (and possibly other titles), Scheme is used to generate C structure definitions (and do various other things). See Jason Gregory’s Game Engine Architecture, p. 257. See also: Dan Liebgold - Racket on the Playstation 3? It’s Not What you Think!
Some Lisp-family languages with active development which transpile to C:
- Chicken scheme: Transpiles to C. Has heavyweight C function bindings, garbage collection
- ECL: Embeddable Common Lisp
- Ferret: Lisp compiled down to C++, with optional garbage collection runtime
The following I believe have little or no activity, implying they are no longer supported:
- Dale: “Lisp-flavoured C”. Hasn’t been touched in over two years
- Bone Lisp: Lisp with no GC. Creator has abandoned it, but it still gets some attention
- Carp: Performance-oriented. see Language guide
- Thinlisp: No GC option available. Write your stuff in CL using the cushy SBCL environment, then compile down to C for good performance
The most similar thing to Cakelisp is C-mera. I was not aware of it until after I got a good ways into the project. I will be forging ahead with my own version, which has the following features C-mera lacks (to my limited knowledge):
- Automatic header file generation
- Powerful mapping file for debugging, error reporting, etc. on the source code, not just the generated code
- Scope-aware generators. You can make the same generator work in multiple contexts (at module vs. body vs. expression scopes)
- Intended to support more than “just” code generation, e.g. code to support hot-reloading and runtime type information will be created
- I will likely add some global environment that will be modifiable by any modules in the project. This is useful for things like automatic “command” function generation with project-wide scope
Features C-mera has that Cakelisp doesn’t:
- Access to Common Lisp macros, which is a huge swath of useful code generators
- Support for generating other languages. At this point, the C/C++ output is hardcoded, and would be a bit painful to change
- Multiple contributors and years of refinement
- It’s done, and has proven itself useful
Cakelisp is written in C/C++ while C-mera is written in Common Lisp.
This is good and bad: the advantages of writing it in C/C++ are:
- It is fast; no garbage collection pauses etc. to deal with. This might not actually be the case if intermediate compilation and loading of generators and macros ends up being slow
- C++ is what I’m most familiar with; it would’ve taken me much longer in Common Lisp simply because I’m inexperienced in it
- Cakelisp does not depend on a runtime (except for the C runtime), which means it would be possible to integrate the Cakelisp compiler into the project being compiled itself. This could be pretty handy for in-process self-modification thanks to the hot-reloading features
- Macros and generators can be written in the same language being generated (and in Cakelisp, of course, because Cakelisp itself can load its own generated code to expand itself)
The bad things:
- There’s no macro-writing library to draw from (macros which help write macros)
- Like previously mentioned, macros and generators need to be converted to C/C++ and compiled by an external compiler to be executed, whereas Common Lisp would make this whole process much easier by natively supporting macro code generation and evaluation