6 ms·
I once used m4 to generate my blog. Worked like a charm!
by sgt 1y ago
I once used m4 to generate my blog. Worked like a charm!
- smlavine 1y agoI once used m4 to generate my blog. Hated it. Escaping was a nightmare and I was always afraid I'd quote something wrong.
- PhilipRoman 1y agoI use m4 with -P option and m4_changequote({{,}}) Personally I find it quite reasonable for code that you don't plan on changing any time soon.
- kragen 1y agoThose seem like they would make it bearable. Also GNU m4 has an extension to standard m4 which doesn't replace builtin macro names that take arguments if you omit the (). Without that, every unquoted occurrence of words like format, index, join, quote, builtin, define, copy, or capitalize silently vanishes. It's a nightmare. You can also avoid this problem with changeword or -P.
- aartaka 1y agoSame experience, that's why I've decided on something more down-to-the-earth and imperative.
- somat 1y agoOh man massive nostalgia hit. When I was younger I was trying to learn the traditional unix tools, so I sat down with a copy of openbsd and made a wiki using only what was found in the base system, and perl was cheating. The templating engine was m4, web server in shell, page history in rcs, a really neat back reference system in awk(when you square linked to another page, it would put a link back in the backreference section of that other page, inspired by everything2) ... Now I am trying to see if I have any of the code saved... It was probably one huge pile of injection vectors... but they were my injection vectors. Hah, found it, Apologies for inflicting it on everyone, But I was having too much fun trying to figure out what past me was on. https://nl1.outband.net/fossil/gami/dir?ci=tip&type=tree https://nl1.outband.net/fossil/gami/dir?ci=tip&type=tree