Hacker News new | ask | show | jobs
by lokedhs 2001 days ago
I wrote a templating library that was used for a Slack close we developed a number of years back.

It parses the HTML with embedded code, and generates a Lisp function which is compiled on the fly thanks to Lisp giving runtime access to the compiler. Whenever the source file is changed, the code is regenerated and compiled.

Other languages do the same, but in those cases they have to generate source code and call the compiler as an external program, and then load the generated code into the running program using dynamic linking. The Lisp approach is much more efficient.

Thanks to the quality of SBCL, the templates execute with native performance, which is something very few other solutions do.

The project is unfortunately not documented, but the code is available here: https://github.com/lokedhs/lofn