Re:Hot Wiring the Lisp Machine
by a-french-anon on Monday April 20, 2026 @08:24AM
(#47833259)
How about one line of POSIX sh with cpp? Though it uses the different approach of SSI instead of templating:
With a little elbow grease, you even get incremental rebuild: https://git.sr.ht/~q3cpma/html-cpp
[ Parent
| on HN ]
Re:Hot Wiring the Lisp Machine
by adityaathalye on Monday April 20, 2026 @10:27AM
(#47834878)
That is... a cool trick! I don't know C, so it would have never occurred to me. (Let's be honest; it would have not occurred to me even if I knew C :))
What I like about the Bash + Heredocs + substitutions approach is that it looks and feels declarative to me. Template "expansion" is just in-place substitutions (parameter expansion, shell substitution, process substitution); no string munging needed to "place" or "inject" content in the HTML tree.
Anyway, I spent way too much time figuring that out, and it works well for me, so I'm going to just roll with the sunk costs :D
Thanks for sharing your approach!