About nanomachine

Nanomachines, son.

Somewhere during the VC-driven, zero-interest-rate-fueled irrational exuberance of the 2010s we found ourselves in one of the outer layers of computational hell. Perhaps it was the rise of Ruby on Rails and the celebrity-worship of 37signals by "web developers." Maybe it was developers looking in awe at what was accomplished by a small team at GitHub and a desire to emulate their success. After all, the way to get a seed round is to make sure you're using the same buzzwords and technologies that have built the unicorns of your era.

Maybe it was just one popular programmer, with a quote that ages worse by the day in this era of generative AI and the fervour of the u/acc and x-risk culture wars:

But in fact we need to focus on humans, on how humans care about doing programming or operating the application of the machines. We are the masters. They are the slaves.

The computer is not, and never has been, my slave; what morality is in proxying the world's suffering downstream to our own creations? Any of the things that materialise athenically from our thoughts are made in our own image; they carry with them a part of our own life-force, literally built from the sacrifice of our own limited time. Distancing ourselves from the long-term manifestations of our own thought-children is regrettable at best if not contemptible. We are what we create; abuse of our creations, of our environment, is a form of sadomasochism.

A means to an end

At some point, programming — or at least talking about it on the Internet — became less about making cool things and more about reinforcing a dominance hierarchy, with Twitter followers, GitHub stars, and Stack Overflow answer upvotes being the indicators of superior skill. Complex, enterprise systems design won out over raw hacking; ultra-high-level abstractions were unnaturally selected by web standards elitists and novice programmers that needed to have depth in a trendy stack to match LinkedIn keywords. Programming evolved into some sort of hentai-ikigai dubbed "software engineering" detached from the fact that the programming once was the means to the end instead of the end itself, perhaps fed the delusion intentionally by founders to keep them in the office 996 to pay for the founder's turbocharged variant.

Many of the successes of the era were made in spite of this "craft" cohort. Facebook was written in a traditional LAMP stack, Instagram's server a dirty hack on top of Django, Minecraft written in the very off-trend Java. Complexity was added as required. There was much less corporate differentiation in role and definitely no separation between front-end and back-end.

Reclaiming the personal web

A personal site requires a personal engine. I chose PHP, originally Personal Home Page Tools, and wrote nanomachine. PHP was abstraction enough: what could be done with the least amount of further abstraction possible? What if the software simply empowered the human just enough?

Nanomachine is too simple to need to agonise about organising it further. It cares not to show off programming prowess, be extensible, or even maintainable by a team of front-end and back-end and site reliability engineers. It is not a jobs program. It is not a portfolio piece. It is what these tools originally were meant to be: a system built for one person's needs and philosophy. Will it evolve? Of course. Will it become cleaner code? Probably. Did I waste a bunch of time cleaning it up to run in production? No.

The filesystem is the database

wait, it's all files? always has been

Nanomachine doesn't use a database to manage its core content, rather relying on the old-school way of using a home directory full of it and exposes the file hierarchy to the viewer. We don't add on a bunch of navigational paradigms or some sort of "information architecture" outside of the one we already have on every computer since the 1960s.

That's all it is: a modern UI layer on top of a single directory, which contains all of the content for this site, a Wildean take on the nginx fancy index. Somehow we have gotten to using blobs and "document databases" instead of relying on the filesystem.

Abstract nothing, enhance everything

Nanomachine can host a personal site on basically any hardware. It targets a generation speed from scratch of one refresh of a 60Hz monitor (16.6 ms) and is built to be as fast as possible within the constraints of "modern" PHP. On a Tiger Lake-U, the page you're reading usually renders dynamically from its templates within two milliseconds, and Nanomachine coöpts APCu to cache the generated content in case of increased load or high traffic to a specific item. You can see the generation time for this page in the page's footer and information about its server here.

Instead of graceful degradation, Nanomachine aims for progressive enhancement. Its most degraded state is the raw directory index. The primary CSS theme is as minimal as possible. No JavaScript is required to navigate this site. With SACRIFICE_SPEED_FOR_BEAUTY enabled, Nanomachine will load rich web fonts and a little extra style, as well as provide some extended interactivity via JavaScript.

There is no need to think "mobile-first" or "responsive", as the site's layout does not assume any specific screen aspect ratio or device type.

Good for me, bad for business

At one point, the Internet was a place where individuals shared their passions, and corporations kind of coëxisted alongside the personal web. We've lost that a bit — and with that so has the community of programmers for the Internet. Nanomachine is terrible at extending for corporate use. No product manager is going to be OK with an opinion that forces exposure to the masses of "technical details" like directory structures, even though everyone's used to them in their file managers. It doesn't make a good mobile application. There's no commerce extension. Nobody will buy nanomachine from you. Its author is really not interested in your pull requests. It's not user-hostile, as its expected user is myself, but it is business-hostile.

To scare corporate lawyers and enterprise policies, Nanomachine is also "virally" licensed as GNU GPL. I'll get around to releasing it soon — steal it and make it your own.