5 ms·
Meh. Most of these classic unix tools aren't particularly good examples of what they do, they're just old enough to have become established. I believe M4 was or
by lmm 5y ago
Meh. Most of these classic unix tools aren't particularly good examples of what they do, they're just old enough to have become established. I believe M4 was originally created to simplify the sendmail config file and then eventually pulled out into its own program?
Rather like this writer, I felt the need to make my blog entries markdown with minimum header and footer surrounding them. So I found a one-liner script that renders markdown in the browser. (Anyone using lynx gets the raw markdown instead, but that's probably no less friendly than what lynx could come up with, and also means that you can read it just as well with telnet (or I guess openssl s_client these days) if you don't have a browser around.
- throwamon 5y ago> I found a one-liner script that renders markdown in the browser. Care to share the one-liner?
- LukeShu 5y ago> I believe M4 was originally created to simplify the sendmail config file and then eventually pulled out into its own program? m4 predates sendmail by 6 years (1977, 1983).
- SkyMarshal 5y agoAny chance you can link that script? I’ve been looking for something like this recently too.
- adrian_b 5y agoIIRC, m4 was initially a preprocessor for Rational Fortran, as someone else said, many years before BSD and sendmail.
- tannhaeuser 5y agoGetting flashbacks to the earliest Unix/C book I had (from 1977 with 2nd ed from 1983 or so) already mentioning ratfor and m4. Never occurred to me that these two are related.
- gnufx 5y agoThe 7th edition manual[1] says m4 was based on m3, which was based on the Software Tools macroprocessor. The source for that is at https://9p.io/cm/cs/who/bwk/toolsbook/index.html https://9p.io/cm/cs/who/bwk/toolsbook/index.html 1. e.g. https://wolfram.schneider.org/bsd/7thEdManVol2/m4/m4.pdf https://wolfram.schneider.org/bsd/7thEdManVol2/m4/m4.pdf
- oblio 5y agoAgreed. A ton of people argue for them, but when you ask people to re-design them starting from scratch today, few people arrive to the design of the Bourne shell, for example.