I’m not experienced with groff so the code isn’t great but I was quite happy with the typesetting (and the compile times!)
It wasn't the craziest resume I did. I applied for a company that made this UI tool for enterprises. It was a half-WHSIWYG, half-Lua tool. I downloaded the demo and spent a week building my resume as a UI, then sent it to the team. I got an interview with the top level guys and a team of programmers, and they excitedly asked me questions about how I made it and how I figured out certain features (like this image passthrough functionality that "none of their clients could figure out"). It was all very exciting but I wasn't ultimately hired (they were being acquired at the time, perhaps that had something to do with it). I have the video on the UI and the making of it, perhaps I'll post it one day once I anonymize the company's name in the video.
More or less? ED IS THE STANDARD TEXT EDITOR! [1]
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/e...
Personally I find it quite reasonable for code that you don't plan on changing any time soon.
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.
> No, not at all.
Well, it (totxt.ed) looks pretty inscrutable to me:
H
!# Include proxy title
!# Insert fallback values
?<head>?a
<SUBTITLE></SUBTITLE>
<DESCRIPTION></DESCRIPTION>
<IMAGE></IMAGE>
<IMAGE_ALT></IMAGE_ALT>
.
w
!# Include the template files via script
g/\(<!--\)*[<#]include \(file=\)*"*\([^">]*\)"* *-*\/*>*/s//&\
\/[<#]include\/d\
-1r \3\
wq\
/
g/[<#]include "*\([^">]*\)"*\/*>*/d\
.,+3w !ed %
E
!# Repeat the second time for recursive includes
g/\(<!--\)*[<#]include \(file=\)*"*\([^">]*\)"* *-*\/*>*/s//&\
\/[<#]include\/d\
-1r \3\
wq\
/
I go full in on ed sporadically. It requires a bit of a brain rewire, but tye UX is closer to pencil and paper, which is hard to beat for encouraging deeper thought, IMHO.
Also, check out edbrowse for a line-oriented browser:
https://en.wikipedia.org/wiki/Edbrowse
It's developed by a blind coder and has a nice core following.
m4 is always there with better macros than CPP.
I did something similar for https://isgithubipv6.web.app/ . Most static site generators are huge ( I was aiming for < 5mb docker container) . I went with `envsubst` , env vars and a simple HTML template.
BoingBoomTschak•1d ago
What inspired me to post it is that I cobbled a fun HTML preprocessor using cpp to someone today: https://git.sr.ht/~q3cpma/html-cpp (I use a Common Lisp contraption for myself).