… and 23 years of tedious yak shaving.
Ten years ago my rather anemic post on the Arcan project started to circulate. It got enough attention that I considered stopping right there and then. I do not care much for attention; most of my other open source work has been anonymous or with throwaway handles, and I still regularly run into reflections of my previous misdeeds.
To mourn the occasion, it seems appropriate to pen down some of the history before I manage to repress it entirely. For this round I will omit the funding story; the commercial projects it has been hiding inside; the start-up close calls or that one time the gang nearly sold out to a VC.
Even 10 years ago the project had been open and around for several years, masquerading as a ‘frontend’ for DIY arcade cabinets, but we will get back to that in a little bit.
The actual story starts around 2003. At that point I was mostly ‘done’ with the programming ‘languages’ part of the computing journey — it is the single most boring topic I can think of; the joy is in the music, not the sheet notes. When thinking of something to compose, I was struck by a nasty and incurable case of ‘oscilloscope envy’.
While the cool electronics kids could attach a probe here and there and see some of the circuitry in action, us computing folks were still stuck with caveman style ‘print’ logging or the chainsaw assisted surgery that is symbolic debuggers. I wanted to hear, feel and see the computing machinery as it spun the information weave.
If something like that is even possible, it would take rather precise control of the visual, the aural and the tactile so that what you sample and represent is what you intended to. That takes wrestling some of the worst companies in tech history. But you need to start carving out your space somewhere, so I blew the dust from the old von Clausewitz and sketched out a plan.
First of all, I surely lacked the proper skills. Those should be acquired somehow. You don’t know what you don’t know and all that, and ideas are a dime a dozen. Get to building the thing to see where and why it is flawed. Answers lie in calluses, not in prompts.
The plan was to setup a diary project to chronicle this caving expedition and split it up into three phases. At each transition, evaluate if it is still worth going, or if I should cut my losses and do something less irresponsible.
Each phase should have a handful of actual applications that filled some personal need for more grounded projects. Waypoints of sorts to avoid losing track and burning out as well as a ‘ok this was dumb, but at least I got a t-shirt’ defense mechanism against the sunken cost fallacy.
Being a diary also meant jotting down other parts of the experience, such as loves gained and lives lost. It turned out to be many more of the latter. Every time there is a release post it means someone died, with one or more tributes hidden inside.
The three phases are ‘Fun and Games’ (Arkanoid), ‘Challenge the Established Order’ (Arcane) and ‘Asylum’ (Arkham). Smash them together and you get Arcan.
Sidequest
To remedy the skill situation, and postpone the whole ‘growing up’ thing, I sought sagely advise. As bad luck would have it, I got an audience with the local bigwig CS professor; a bearded fellow of some repute with an unrequited love for mathematics and a nose for systems thinking.
After some back and forth we agreed that it would be best (but perhaps not for me) if I took aim for the whole PhD thing. He just so happened to have funding for that in the pipeline. Not the whole debugging thing, heavens no. That is something for people with dirt under their nails, not chalk. But debugging is basically security, if you squint a little, and that is a lot easier to fund.
Monitoring and surveillance are two sides of the same security coin, and power grids do love some monitoring as part of the SCADA (Supervisory Control and Data Acquisition) acronym. This was basically corporate IT security but constantly 15-20 years behind the times.
Smart Micro Grids were to become all the research-rage and to be built from COTS (Common, Off The Shelf) components from dubious sources of surely compromised supply-chains. It also implied turning the whole thing inside out, and monitoring all of that was much closer to what I was looking for anyhow, so fine, that will be the research target.
There is a lot more to this tangent that we do not have the time for, nor could I handle the blood alcohol levels necessary to revisit those memories, so lets move on to something more playful.
Phase One – Fun and Games
The point of this phase was to establish the necessary groundwork – Media Processing Pipeline, Input Devices, Privilege Separation and a scripting API to tie it all together. So what would be a fun target application that ticks all the boxes and could drive the design? An unconventional emulator frontend.
Backstory
I had a thing for Arcade Machines and their natural habitat, the arcades of yore. I still do, even though it has drifted more towards the softer aspects that cannot be easily preserved or reproduced. A current side project is a motion simulation rig that just needs a few more welds before I can relive some of the glory of Metal Hawk in the comfort of my own basement.
Back then my interest was in the nitty gritty of emulation and emulator development. Going all the way from a physical thing in front of you into a working software replica is a full-blown computing crash course. There’s reversing schematics to understand how things are wired up; dumping the ROMs where code and data hide out; Digging through old and inaccurate specifications for ancient CPUs and DSPs, then discovering and replicating all their little bugs that some crafty developers took advantage of; writing and debugging the first flawed processor implementation; cracking bespoke copy protection schemes, exotic cryptography and so on. It is a very long hike before you even get to see real signs of life. Wear comfortable shoes.
The gold standard of arcade emulation, MAME, is a massive work of art and open source cultural heritage; its code should be obligatory reading for anyone seriously interested in computing and its legacy. I hold it in much higher regard than something as trite and dull as the Linux kernel.
It does leave some things up to the imagination for actually using it, and the community of early adopters had compensated by writing graphical launchers, frontends, for it.
Now, I had previously built an arcade cabinet of my own from scraps found dumpster diving. This in a spacious 16m2 apartment. In the process I stepped on a soldering iron; hot glued all the fingers on my hand; electrocuted myself on the anode of a CRT and slept in enough MDF dust for it to be a cause of concern.
First Appl: Gridle
The ‘frontend’ part to my bespoke arcade machine was just some list of games and a cursor. Selecting an item launched an emulator with some game specific settings and that was it. So I set out to write a new one with all the bells and whistles: video previews; related art and historical description; sound effects and background music; filters; video recording and streaming; save state management; input mapping and so on. Basically what Steam does today, excluding the ‘purchase and download’ part, which is apparently how you make money. Oh well.
The unconventional part was that instead of just launching the emulator and letting it do its thing, the frontend scripts should route input and control composition effects. You know, like a (foreshadowing) display server. In the end, Gridle had the game running on the monitor portion of a 3D model of the matching cabinet itself; networked remote control; on-screen keyboard; dynamic LED controls; CRT and Vector display simulation and more.
I don’t have any recordings or demonstrations of it live anymore, but the code is still around (yuck) and here is a photo of it in action on the cabinet:
It is also briefly shown in this slide from the first public presentation:
A detail here is in the screenshot of the login screen from World of Warcraft: Mists of Pandaria (so around 2012). It is actually running WINE with some process injection hacks, but composed inside Arcan:Gridle with the CRT effect added. This was another sidequest where I was coding bots using only injected mouse/keyboard events and computer vision to automate finding game-logic bugs without triggering the ‘Warden’ anticheat system.
That’s a story for another time — Gridle had run its course; about 90% of the actual API had landed, the IPC system did what it was supposed to, interposing emulators gives you a fantastic test-set for latency thanks to tool-assisted speedruns, and it was time to step things up a notch.
Second Appl: Arcan Workbench (AWB)
The Gridle frontend part worked fine for my gaming habits and for my movie and music collection on the home theater PC, but the desktop computers were still running Window Maker on Xorg, so that was next.
My second computer was an Amiga 500, and I had some lingering nostalgia for the earlier versions of the ‘Workbench’ windowing system with its oddly shaped icons and eye piercing colour-scheme. Could I recreate that, but bring in all the bits needed for my actual day to day work?
There is less that I need to say about it since the demo video is still alive:
In the end there was a native web browser via NetSurf; the video and recording tool could do interactive sharing of the tagged windows over VNC; it ran natively on the proprietary stack of the first generation Raspberry Pi; It was still portable across OSX, Windows and BSD along with a non-public fork that substituted much of the Android ~4.3 userspace, and worked on a handful of Sony-Ericsson devices.
It became my daily driver both at home and at work. Now, it was time for the project to move on to the next phase.
Phase Two – The Established Order
The ‘fun and games’ phase was a convenient but fleeting retrocomputing romance. Convenient because you get to do things without thinking too hard. The less romantic form where you do have to exercise the old noodle a bit is understanding legacy to try and improve things without ending up just slowly repeating history.
You can try and cheat and just make fun of the elderly without actually doing the work — “you looked but you did not see” as Dr. Lecter put it. The downside is that it will eventually come back and bite you in the rear, repeatedly. The real work takes understanding why something worked a certain way, not just copying what it did.
I set sail for another voyage of the reverser and headed into battle. After scouring through millions of lines of Xorg and Chromium and Xterm code; disassembly; related specifications and mailing list flame wars, returned a scarred man. Perhaps even a wiser one, but I have my doubts.
The choice in targets was deliberate. To the uninitiated these things seem different. They are not. They are instances of the same ‘feature archetype’ and SCADA- class systems.
I have already written more than enough on the matter in older posts; should I cherry-pick some posts, It’d be:
Sunsetting Cursed Terminal Emulation
Arcan vs Xorg: Feature Parity and Beyond
Arcan as Operating System Design paired with Arcan Explained – A browser for different webs.
The actual applications for this phase are much more diverse and latch into each other in some less than obvious ways, so lets break those down a bit.
First Appl: Durden
The workbench had outstayed its welcome. Sneaking a peek at a colleague’s workflow that was centered around tiling, there was a brief moment of ‘this is nicer’ but also a number of rough edges — and I wanted something else. It just so happens that I have the right sanding equipment.
I took a step back and considered the situation. All window managers are just an event trigger, like a button press, into re-stacking- and re-configuring- boxes of pretty pixels around in all kinds of wonky ways. The building blocks the windowing system provides will steer how hard that turns out to be.
I am normally deeply allergic to ‘everything is a XYZ’ shtick, especially so for ‘files’. Pipes and filters designs are appealingly simple at first glace, but degrades fast as the number of steps in a pipeline increases. Here there was actually a case for it, as you don’t need to stitch that many operations together to mimic any normal window management scheme.
So that became the building block for the Durden appl. It’s a file system where the files are either of a value type, like global/config/visual/font/size=14, or an action target/window/clipboard/paste. Every input action, decoration button and so on are just bound to paths. There is a user facing interface for navigating it and binding things, but can just as easily be mounted or accessed over a socket; a bash script into socat would be sufficient to implement most traditional schemes.
The old clip below shows the use of the in-UI menu to navigate and active one out of, currently, ~700 different paths: slice-region to new window. The workspace is running in a tiled mode where media windows are set to scale to fit, tile allocation, preserving aspect ratio.
Second Appl: Senseye
The Senseye project is the first iteration of what I actually wanted to build way back when. The last signs of public life was covered in Digging for Pixels and Senseye 0.3. It had sensors, translators and representations.
Each discrete sensor samples a data source, like a file, process memory or network stream. They come with basic controls for seeking, sample window size controls, pre-processing filters and so on.
The translators takes a sample buffer of some size and packing, and generates a higher level version of it, like image decoding or machine code disassembly. Since these are parsers that are working on untrusted data, they are strictly sandboxed and any crashes act as signals for parser vulnerabilities that should be inspected further.
The representations are visualization and statistics tools, like mapping to histograms; coloured patterns; 2D- bigrams; hilbert curves; 3D point clouds; delta comparisons to reference patterns etc.
For development, the testing targets were things like process parasites (also known as disk-less malware) randomly injected into virtual machines hosting Chrome processes all tuned to the same website. The task then was to try and locate the tainted ones using only the tools above.
The released version had a user-interface with pieces from AWB joined together with some duct tape. The slightly improved version carried the same sensors and translators, but integrated as plugins (‘tools’) in Durden. Neither was a good fit.
The project got some attention from organisations on my naughty list, so unfortunately it was for the best to bow out and continue with this offline. It will stay that way.
Before finding a better windowing and control scheme, there was a slight detour with the next application.
Third Appl: Safespaces
This was a complicated one, but not for technical reasons. Virtual Reality (VR) had started its next cycle towards become the supposed ‘next great thing’. The odds for it succeeding this time around were not great, but at least it meant access to hardware that did not cost an arm and a leg just to test the waters. VR from a display server perspective is also a good validation ground for load balancing (mitigating denial of service) and latency (“motion to photon”) as mistakes here can be felt and even cause physical harm.
There were two things I wanted to cover.
The first was again related to Senseye and of a highly questionable nature; I might just have damaged my cognition in ways I still cannot put my finger on. In short, it was basically overloading my vision by projecting large (hundreds of GiB) unknown data streams unto point clouds, and see if patterns started to emerge. Oh boy, did they ever.
I was laying in bed for hours strapped to a VR headset staring at brightly coloured dots zipping past. The dots quickly turned into clusters that turned into types that turned into hierarchies and locations. After taking the headset off, I struggled with edge detection. A doorway felt like a solid object, and other shapes were simply fused together. It took a few minutes for that to subside, but it left a strong feeling of unease for much longer.
The second thing was different states of ‘memory palaces’. Our computers are still terrible at actually organizing all the little snapshots of life that we collect over time. They are even worse at presenting and navigating these collections. They are much better at collecting and sifting through other people’s collections for signs of guilt.
VR could provide the means for putting these artifacts together in ways that paint a larger and much more intimate picture. Natural compartments; rooms and spaces. First for you to be able to recall as a means of coping with the many pains of getting older. Later the same would serve as something to leave for future generations to see and get a stronger idea of who you were, a place of remembrance — the virtual cemetery.
Something this intimate should be in your strict possession and under lock and key. To that end I drafted Safespaces. The complications came from Facebook Meta sucking all the air out of the room, and bringing all kinds of opportunistic fuckwits with them.
So I framed the Release Post in about as dry and mellow way as I could, showing only the dumbest thing I could think of — “tiling window management in space”.
As an aside, the Arcade cabinets from before can be spotted at the very end of the demo clip, and the much maligned background music selection, ‘Den Indre Kilde’ has a dark and depressing story to it, to stress the ‘not so safe’ part.
The post still got way too much traction and brought all kinds of abuse, including, I kid you not, being sent “I know where you live” kind of photos from the outside of my apartment for apparently being ‘woke’.
I decided yet again to continue offline. It will stay that way.
Fourth Appl: Pipeworld
Back to the ‘better windowing and control scheme’ then. The next application is hopefully the answer I was looking for, and something I still wish I had more time to chip away at. That application is ‘Pipeworld‘.
The backstory is that during a semi-regular lunch thing with a ragtag band of adorable misfits, someone joked that ‘in the end, everything computing degrades into Excel’. My rusty cogwheels started turning — what if we start there then? where will we end up?.
Each cell is a command-line that morphs into the result of running it. Expand function evaluation with process execution and profit? Sure there will be problems with the devil, synchronization, but that is something for future me to worry about.
A quick scan for prior art lead to Hishahm’s Doctoral Thesis, “Dataflow Semantics for End-User Programmable Applications” and its related “Userland” project. I played around with it for a few hours and concluded that the concept itself is more than viable, but the cell management quickly becomes visually crowded and the processing itself scaled poorly.
As a long time fan of infinite canvases, layering in a non-uniform Zoomable User-Interface (ZUI) seemed workable enough. A few weeks later and I had most things in place. It was a big improvement for my sensors and translators. I put it on the back-burner and continued with the last two big ticket items on my checklist; a better networking protocol and removing the terminal emulator middle man.
Terminating Terminals: Cat9
I will not waste time repeating all the terminal emulator painpoints; the Sunsetting Cursed Terminal Emulation article already covered enough of that terrible grind.
The main result of that long chain of work was that I finally had:
- A client – server buffer transfer format that was text and formatting hints.
- Server-side sharing of glyphs binned by font, style and size regardless of client, as well as on-demand transfer and ‘race-the-beam’ single-buffered scanout.
- A replacement to ncurses/libreadline/… with appropriate Lua bindings that was actually nice to use and cooperated with the outer windowing system.
These were necessary parts for building Command-Line Interfaces and Textual User Interfaces that are so much more capable, faster and efficient than anything else out there that it is not even funny — and no exploitable in-band signalling hacks.
The final boss was a shell to actually take advantage of it. This is much more involved than one might think from a quick glance at a humble command-line prompt; the default data processing is now asynchronous and event driven.
To illustrate that with a clip of something completely trivial:
Here you have a Cat9 shell to the left, and a terminal emulator to the right. Both run find /usr. It’s the same actual command execution that happens on both sides. With Cat9 you can see how it gets a compartment of its own. Since it is a long running and noisy process, it automatically switches to a summary view of the ongoing data collection and expands when completed.
That cuts down on pointless updates which would otherwise take up precious network bandwidth when running remotely, and a lot of processing and re-rendering in the local graphics stack. Even with the terminal variant getting a head start it completes the job in last place.
I can toggle the summary on and off; continue to work on other things in the same session; interact with the collected data by attaching content triggers, filters, search, copy in/out and so on — all while it is still running and the prompt is alive and well. Had the accessibility features been activated, my screen reader would just give me the essentials and not get back-pressured to hell and back trying to read out some 73MiB of text.
This is my current baseline for absorbing automation and building workflows, and has been that for the last few years. Alas, just like with Durden, the distance between the current state and what has been published, is hopelessly long.
Phase Transition
I am glossing over a lot here, as this phase alone was, conservatively put, over 30.000 man hours of work. Some things worth referencing, at least, is the work on Accessibility, Crash Resilience, the IPC System and the Networking Protocol.
The high level conclusion to this entire phase was summarized in the recent post on Arcan Explained: A Browser for Different Webs.
Now we have almost caught up with the story so far. It is time for the next phase transition, some of which was foreshadowed in the post on Arcan-A12: Weaving a New Web.
Phase Three – Asylum
This brings us to today and the self-evaluation part I mentioned at the beginning. Do I have it in me anymore? Yes and No: The intellectually lazy overuse of neural nets killed my interest in Computer Vision. The crypto-bros took my interest in Cryptography Engineering away. Now, the slop jockeys take away my interest in general computing as they cover everything in a thick, oily residue of Silicon Valley soot, smearing the collective art project that was free and open-source into a blurry mess. This will force me and those of my ilk to adapt and pick another route.
To see your freely shared and well-intended hard work be chewed up, ruminated and repeatedly spat back in your mouth leaves a discouragingly bad aftertaste. To add insult to injury, you are then asked to pay up in tokens. While this is going on, a deafening horde of dowsers keep yapping in your ear about how great their particular slop machine does the job. That is incredibly rude, and discourtesy is unspeakably ugly to me.
There is still a time window in which to archive and preserve what once was, but the noise floor is reaching the ceiling. Affordable parts will become scarce as the powers that be try to five finger death punch personal computing into an age verified, identity proven hellscape of short form content.
I still intend to carry this limp sled dog of mine across the finish line before bowing out and retreating back into the shadows; for my friends, for my brothers. I had three applications planned for the final phase, but that will be reduced to one and a half. Too bad, the others were pretty nifty. The set of optimization and hardening techniques I wanted to try out for 0.8 and 0.9 will also be cut short. NLnet (A12-Endpoints) has graciously agreed to sponsor a substantial part of what is missing, so there remain some incentive in all of this.
But onwards and upwards, thanks for reading this far. See you next time in ‘A Farewell to Hubs’ where we will cover how the project will be maintained and managed in a post-Github-post-Discord world.