UP | HOME

Community Gardens

As Tolstoy once said, all convivial software systems look much the same, but all nonconvivial software systems are nonconvivial in the same way (wink). One tell of nonconvivial software is complex dependency graphs. Everyone scratches their own itch while at the same time depending on something else for some relatively simple unit of functionality. Coordination is low and someone else pays the price.

This is in direct contrast to how UNIX systems were historically organized where a user is offered a well curated set of tools for a wide variety of tasks. Determining the precise boundaries of "a useful set of tools" requires a great deal of restraint and a proclivity for "N-O".

Some operating system distributions decide that programming language X should be a part of the distribution because someone decided that some aspect of the system required X to work. This inexorably leads to the situation where a great many people convince themselves that isolation via a virtual machine is neccesary for Getting Things Done.

More technology will never solve what ails us.

In contrast, NetBSD depends only on its own implementation of the Bourne shell. It also picks a good set of tools for serving websites without ceremony, living up to its name. This instance serves this website with the following three lines in /etc/rc.conf:

http=YES
httpd_wwdir="/var/www/prod"
httpd_flags="..."

Ok, but how do we get anything up there?

Emacs ships bundled with one of the greatest pieces software ever written, org-mode. org-mode is a powerful writing tool that makes good on the potential for computers to offer something substantial over the greatest invention in all of human history - pen and paper. Publishing is integral part of writing, thus org-mode includes a generalized publishing mechanism, ox-publish.

The only thing missing out of the box for my purposes is HTML generation for code snippets. This can be accomplished with htmlize, just 77K of elisp without any further dependencies as the gods intended.

But how to use this stuff?

Rather than forcing org-mode users to go searching for food on the web like animals, Emacs shares the UNIX philosophy that the system itself should provide high quality comprehensive documentation. For UNIX that's man, for Emacs, M-x info. The first few org-mode pages on publishing in Emacs offer a snippet which I modified that provides everything a user needs to immediately generate a static site:

(setq org-publish-project-alist
      `(("posts"
         :base-directory       "posts"
         :base-extension       "org"
         :publishing-function  org-html-publish-to-html
         :publishing-directory "_site/posts")))

I can immediately focus on what I'm going to write rather being drawn to fiddling around with knobs that don't have much to do with writing. Later, I can figure out how to add custom CSS, site structure, a post index, entry customization, yet none of those concerns are placed before me at the beginning.

As a user I'm given a seed and I can tend to it. As I make progress, I look up and become more curious how others have tended to their plots.

Exploring these tools is like walking through a beautiful community garden.

For more information about the httpd server built into NetBSD and this is a really good article on using Emacs to write a blog.

Emacs 30.2 (Org mode 9.7.11)

Served from NetBSD 9.2 via SDF

About this site