Franz Kafka's Lost Treatise on Wayland

12 min read Original article ↗

One day, I tried to run a Tauri app. After a long period of reflection, I have categorized this broadly as a mistake.

The app crashed on startup with a Wayland error; I found the same error on a GitHub issue and thought, well, someone’s gotta fix it. How hard can it be?

Well. Somewhere between understanding how a fucking button is rendered in a Tauri app on Linux and my third round of selecting all squares which contain a motorcycle to get into the self-hosted GTK GitLab instance, I thought: pretty fucking hard1

What follows is a dramatization of the descent.

» the colony

“It’s a peculiar apparatus,” said the Maintainer to the Contributor, gazing with a certain admiration at the device, which which he was, of course, thoroughly familiar. It appeared that the Contributor had responded to the invitation of the Stallman only out of politeness when he had decided to solve a longstanding issue in Tauri, and, finding the issue to be deep within the endless corridors of GTK, merge it upstream.

Of course, interest in the patch was not very high even in GTK itself2. At least, here in the cramped island federation they called GitLab. Apart from the Maintainer and the Contributor there were present only the Condemned, a vacant-looking man with bound hands and long, sweat-damp hair covering his face, and the Wayland, who held the heavy chain to which were connected the small chains which bound the Condemned by his feet and wrist bones.

The Contributor had little interest in the apparatus and walked back and forth behind the Condemned, almost visibly indifferent, while the Maintainer took care of the final preparations.

“It’s all ready now!” the Maintainer finally cried and climbed back down the ladder from which he inspected the device’s most intricate details.

“I’d just like to merge the patch,” the Contributor said, instead of asking some questions about the apparatus, as the Maintainer had expected.

“Of course, of course,” the Maintainer said. “Up to this point there was some work to be done by hand, but from now on the apparatus should work entirely on its own.” The Contributor nodded and, clutching a single sheet of paper barely blemished along its left side with a few scant +s and lines marked in dull green, followed the Maintainer.

The latter tried to protect himself against all eventualities by saying, “Of course, breakdowns do happen. The apparatus is meant to go indefinitely without interruption. But if any do occur, they’ll only be very minor, and we’ll deal with them right away.”

The Maintainer pulled out a chair from such a pile and offered it to the Contributor. The latter could not refuse.

» the patch

Such a small change, the Contributor thought. A simple error in the graphics API; a window backed by an EGL surface, and a buffer attachment to the selfsame surface. A protocol violation. The patch could barely be felt in his hand.

And yet, to have brought it here before the Maintainer had nearly broken the Contributor. How young he; how naive and innocent he had been when he first discovered the scant patch after a Saturday’s honest work. A clerical error, he had called it, a straightforward violation of protocol for which he had requisitioned the correct forms from his local branch, dutifully filled them out, and posted them to the remote island (on which he now stood wondering if he was attached to ground at all).

The form arrived back to his home with the next day’s evening post, marked in red. Permission denied, it had read. You are not allowed to push.

“No matter,” he had thought. The next day, he turned toward the post office instead of his drab flat and picked at a dry sandwich until the officer returned from the evening’s deliveries.

“GTK!” the officer guffawed. “They can barely be said to use the same postal system; a registry is shared, nominally, yes, but mail cannot be certified unless officially registered with the federation’s instance.”

Self-hosted, the man had said. “Well, then,” the Contributor had thought. “I had better requisition the right forms.”

The Contributor set his jaw and, determined to be a good citizen, requisitioned again the forms (this time with the stamp of GTK embossed next to mother GitLab’s), entered his name, address, his public key, and sent his registration off.

It was thus, after posting another form linking this registration with the service’s main branch, signing for a certified letter, then another, then inexplicably receiving by the Tuesday post a packet of daguerrotypes of railroad grade crossings with instructions to send back only those which actually contained grade crossings, all followed with a final trip to the island’s official federated consulate (only to find it abandoned, hollowed out except for the dinging of several bells which had been set up against a series of belts and pulleys to ring loud and true at the twelfth hour of each day), he had finally received the Maintainer’s invitation to come to the island, directly, he said, and bring his patch with him.

The Contributor found himself therefore unable to decline, politely or impolitely, the Maintainer’s absent gesture towards the hard, low chair, and so he nodded with a grimace bordering on a smile and sat down.

» the apparatus

The Contributor was not sure, looking at the Gordian arrangement of graphics APIs, compositors, proprietary blobs, and all manners of Rust bindings, that the paper now becoming damp with the swelter and snarl of the tropical heat had been filled out correctly. Only the Maintainer would be able to pass such judgment. I must entertain this fellow and his apparatus, the Contributor thought, if I am to have it.

“This apparatus,” the Officer said, as if on cue, grasping another thunking library from its wretched hull, “is our previous Commandant’s invention. I also worked with him on the very first tests, and took part in all the work right up to its completion. However, the credit is all his. Have you heard of our previous Commandant?”

The Contributor shook his head.

“Well, I’m not claiming too much when I say that the organization of the entire penal colony is his work. We, his friends, already knew at the time of his death that the administration of the colony was so self-contained that even if his successor had a thousand new plans in mind, he would not be able to alter anything of the old plan. And our prediction has held.”

“However,” the Maintainer said, interrupting himself, “I’m chattering, and his apparatus stands here in front of us. As you can see, it consists of three parts. With the passage of time, certain popular names have been developed for each of these parts.”

“The one at the top is called the Framework . Below it, the Runtime , and supporting the two of them is the Window ,” the Maintainer said. “Look at me,” he said, something between a grin and a sudden bout of mania creeping across his face, “How silly the Commandant would find me now! To start with such trivialities as Windows and WebViews, with URIs and bindings.”

The Maintainer pried a stolid looking housing from its surface, brushed the sweat from his eyes, and shone a dim flashlight from his toolbelt into the exposed panel. “Look,” he said, turning and nodding to the Contributor.

The Contributor looked warily past the Maintainer’s obscuring hand and found, with great surprise, that the machine within (and he could not be sure what the machine was, only that it was a machine) pulsed with a great, sputtering energy, starting, stopping, starting again, wheezing and straining against the mechanical regularity which was its utmost nature until one received the impression that the great heaving mass could not be described in terms of the whirring belts and belching carburetors which dizzied the Contributor.

This," the Maintainer said, “could have only been the work of a genius.” The Contributor, to the slight chagrin of the Maintainer, was too dumbstruck to speak.

“Here,” he said, turning his flashlight to a corner so deep it was barely illuminated, “is the Toolkit . And here,” swinging the flashlight to a machine grotesquely pistoning a rod in and out of the former, “is the Browser .”

The Browser. This was a machine he knew; or, at least, was vaguely aware of, being a man of reasonable education and upbringing. But this thing, this obscene hammerthrusting and jackhammering, resembled nothing with which he was familiar. The machines were trapped in erotic lockstep, appearing to him as two street cats yowling and baying with great irregularity as they made love. He was not sure that they were different machines.

“A genius!” cried the Maintainer suddenly. “Look!”

The flashlight swung again, and the Contributor realized with a growing horror that the obscene jackthrusting was itself a mere byproduct of a separate thrusting, a violent thrusting with a metal scream which sheared off white hot curls of metal and spark. His eyes followed the light of his eager guide from the scarred cudgel’s head, along its shaft, and to a most complex set of interlocking gears of all shapes and sizes.

“What is that?” the Contributor asked.

“A genius!”

The Contributor tried to make sense of it through the sound and fury, but could not. He felt the paper begin to tear in his hands.

“This,” the Maintainer said, swung firmly now into mania and unable to contain his reverence for the great commandant, darting his flashlight across the sharp teeth of a flywheel, “is the Client .” He traced light down a long spindle, spinning so fast that it glowed softly of its own accord. “The Shim ,” he said. Pointing at a set of pistons acting in lockstep, “The Driver .” He no longer needed the light; all of the components, now, glowed. The Contributor felt a great heat; had it always been there?

The Maintainer pulled his head from the panel’s opening, gulped in hot air, and turned his shaking hands to another panel on the low side of the contraption. The Condemned merely hung in the posture of the crucified, long hair dripping sweat down an obscured face. The Contributor realized with a shudder that if this, the heart of the machine, were so terrible, what could be said of its ends?

Grunting, the Maintainer pried the last of the panel’s hard clips from the apparatus’ housing and beckoned the Contributor forth. From on high the Contributor caught a glimpse of the Maintainer’s crouching form, shimmering with sweat, not bothering anymore to brush the salty sting from his eyes, grinning, always grinning. “Look,” he said, and set to prying a manhole sized cover from the ground behind the apparatus.

The Contributor peered into the apparatus and gasped. The disgusting metal heart, screaming as it seemed to destroy itself, was no heart at all. It lie before him, duplicated and duplicated again, and again, each hand wrought and different than the previous but all conforming and converging to the same glowing, spindling heat. He could not count them all, monkey patched into each other, all fighting and fornicating.

From behind him, an unsteady panting and the smell of stale breath and a dim light meant to guide rather than illuminate led his eyes through all the heat and the glowing to a point of convergence, a single source from whence derived all of this hideous power. It was, in comparison to the rest of the machine, shockingly neat; designed, the Contributor could tell, with a caring hand and yet gross and inappropriate next to those which sucked its power.

“The Compositor ,” said the Maintainer.

“And what powers the Compositor?” the Contributor whispered. He felt as if someone else was talking. The Maintainer merely looked towards the now-open manhole from which emanated a high, inharmonic whirr. The Contributor peered inside the big hole and saw it at once: A great obelisk, black and smooth like glass and inscrutable, made somehow without seam or stitch or artifact of manufacturing.

“The Blob ,” said the Maintainer. “The Commandant’s most perfect creation.” He stared at it for a pregnant moment. “Proof!” he cried suddenly. “Proof of his genius; incontrovertible proof, and reason alone for the continued functioning of the apparatus. Any failure of maintenance is a personal failure of mine.”

“What does it do?” asked the Contributor

“It is opaque,” said the Maintainer. “But it punishes. And from this no more need be known.”

» the end

The Contributor held out a shaky hand and presented, finally, his patch to the Maintainer. He could bear no more.

He had, of course, studied the machine in concept whilst preparing it, but the schematics of what he’d been given may well have been a manual on the maintenance of a newspaper press for how well they resembled the machine he had come to find.

The machine had not wrought the bug; it was blameless. No one, in fact, had wrought anything. There could be no blame. The machine, the Contributor realized with a start, was a gift, because the only alternative to the belching, pulsing Magog which stood before him was nothing, black nothing, or perhaps the seamless alien shimmer of the Blob stretched across the entire world.

It was a gift, and he could bear it not for a moment longer.

He could no longer feel the paper in his hand; but he held his arms, presenting, wrists aching, a point just off the distance coming into focus again, the fugue dissipating as his vision sharpened from on high, blurred by the pain but resolving finally to the strand and the sea, endless from so high with her breeze and her roar (for a moment drowning out the metal screams), whipping salt into his wrists rubbed red and raw and blowing his long hair out of his face for just long enough to see the Maintainer, sweating like a gentleman against the beating of the sun as he rose to greet an unsure young man bearing a sheet of paper, barely blemished.

“It’s a peculiar apparatus,” said the Maintainer to the young man.