Kristaps Dzonsons, a BSD developer, writes about small, secure C tools like kcgi, lowdown and acme-client, and OpenBSD sandboxing with pledge.
Commenters recommend his small C acme-client and the fast lowdown Markdown tool, and some cite his SQLite conclusions as reason to skip the BCHS stack.
I’m an OpenBSD developer (mostly a packager). IMO you’ve mischaracterized both Theo’s response and OpenBSD’s culture.
If OpenBSD has a culture, it’s not “real men,” but “show me the code.” That’s plain from the mail linked in the post you responded to: mailing lists are full of people making suggestions (like “rewrite OpenBSD in Rust”), but few people doing the necessary work (like implementing or testing a reasonably POSIX‐compatible userland, handling the 8+ architectures that would immediately have to be dropped, measuring the performance impacts on the project build clusters…).
Contrast the above response with the WireGuard implementation this whole discussion is about. A non‐OpenBSD contributor sent a draft patchset, which received suggestions and was iterated upon several times, and despite some complaints about the concept from one quarter (https://marc.info/?l=openbsd-cvs&m=159273877612032&w=2), it was committed by the very person who had those complaints! In the end Jason and Matt of WireGuard described the process as “extremely pleasant” (https://lists.zx2c4.com/pipermail/wireguard/2020-June/005588.html). This is feedback I see often from external contributors.
You describe safety guards like privilege separation and pledge/unveil as “real men programming”, but they’re the complete opposite: they exist precisely to mitigate the damage that results from human error. acme-client’s design does keep private keys inaccessible this way (see…
I like the premise of embedded generating inline c. Kinda like php for c, rather than html
I'm not sure of custom BNF per generating command. I notice they're mostly order independent, which makes it a little easier to learn, but what's the advantage over c syntax? Is it roughly that pointers etc are impossible. Maybe a c-esque syntax would be more learnable
How does the existing syntax compose, i.e. can the user run away with writing tcl-style scripts
If you don't get a lot of feedback, I would guess it is inpart due to custom syntax being an entry barrier to understanding
I don't know, I think html is easy, so people want power with php. On the other hand for an audience that is using c, by the time I'm doing that, does Vely's custom syntax give me more than a set of convenient c library calls... such as https://kristaps.bsd.lv/kcgi/
In any case, I like the apis, and aim, and I think the premise has legs
My main authoring tool is then Emacs Markdown Mode (https://jblevins.org/projects/markdown-mode/). For data entry, it comes with some bells and whistles similar to org-mode, like C-c C-l for inserting links etc.
I seldom export my notes for external usage, but if it is the case, I use lowdown (https://kristaps.bsd.lv/lowdown/) which also comes with some nice output targets (among the more unusual are Groff and Terminal). Of cource pandoc (https://pandoc.org/) does a very good job here, too.
I probably wouldn't trust implementing important network speaking services as a shell script, potentially running as root.
OpenBSD's acme-client [0] is a fork of Kristaps Dzonsons' project (formerly letskencrypt), it's a properly privilege separated ACME v1 client, written in C, using pledge(2) on OpenBSD, libseccomp on Linux.
https://kristaps.bsd.lv/acme-client/
[0] https://man.openbsd.org/acme-client
This looks great! I too have been working on a critter tracker[0], but writing it in C using kcgi[1] (no JS at all).
I have never done a web project before, so this has been a great learning experience. I still have some functionality to complete, but so far it has been pretty useful, even just the "available now" feature.
[0] https://xvetrd.tilde.institute/index.cgi
[1] https://kristaps.bsd.lv/kcgi/
Pushing the burden of network permissions management outside the browser, to the OS? Heresy!
To be serious, this has introduced me to sandboxing on BSD via pledge [0] and comparisons against Linux seccomp [1] - thank you!
[0] https://news.ycombinator.com/item?id=17289654
[1] https://kristaps.bsd.lv/devsecflops/ (submission by same poster at https://news.ycombinator.com/item?id=44264021)