Vocabulary of Action

I’ve been reading a bunch of the ‘must-read’ computer science literature for the first time. Most recently, Dennis Ritchie and Ken Thompson’s The UNIX Time-Sharing System.


Reading the The Unix Time-Sharing System (1974)

I’ve been thinking a lot about the nature of the command line over the last couple of months. Mostly as a continuation of the inside-out thinking I started in Hard Worlds for Little Guys. What’s the difference between inhabiting a computer system, rather than just using one? What is the relationship between any given command, the thing issuing it, and the world in which that action then causes a consequence?

So I’ve been going through a bunch of the ‘must-read’ computer science literature for the first time. Most recently, Dennis Ritchie and Ken Thompson’s The UNIX Time-Sharing System, originally published in 1974. I’ve written up my obsidian notes.

The paper is a technical account of the Unix operating system, its file system, processes, and command interface. It’s also surprisingly readable. Which is good, because I fear from thinking about the nature of the command line so hard right now I may be in danger of actually understanding computer programs for the first time in my life. I feel like having produced the design and build of an interactive fiction engine, and now reading all these old papers, I’m learning a lot about the the state of play at the dawn of the modern computing age.

The most interesting thing to me right now though is what they have to say about the nature of the shell, and what they, as designers of the system, believe the command line actually is.

A command is a filename.

The shell splits up the command name and the arguments into separate strings. Then a file with name command is sought; command may be a path name including the “/” character to specify any file in the system. If command is found, it is brought into memory and executed. The arguments collected by the shell are accessible to the command. When the command is finished, the shell resumes its own execution, and indicates its readiness to accept another command by typing a prompt character.

When you type ls, the shell goes looking for a file called ls. If it can’t find one, it generally tries again in /bin. That’s it. The vocabulary of the command line is made up of executable files that the shell can find.

Put a new executable somewhere the shell looks and you’ve added a new word to the language of UNIX. Change the directories it searches and you change what those words resolve to.

In Hard Worlds writing through the lens of the design of Interactive Fiction engines I talked about verb minting. The ability to create new operations from inside a world, which then become part of the vocabulary available to act upon it. The dictionary grows without anyone having to redesign the language.

But what makes this really interesting is how little the world needs to know about its words.

The grammar belongs to the shell, not the programmes.

In section 6.1, Ritchie and Thompson explain that input and output are interpreted entirely by the shell. When you type ls >there, the ls programme doesn’t know anything about there. The shell arranges for its output to go into that file before the programme starts.

The same is true of pipes. Their example is ls | pr -2 | opr, which takes a directory listing, formats it into two columns, and sends it to a printer. None of the three programmes needs to know that the others exist. Each reads or writes through the file descriptors it has been given.

Underneath all this though is some hard ontological compression. Unix treats ordinary files, devices, and inter-process communication through a common set of operations. Reading and writing a file, communicating with another process, or addressing a hardware device share the same basic interface.

Rather than inventing a different language for every kind of ‘thing’ in the computer, Unix makes lots of different things answer to the same small vocabulary.

This is a good example of ontological hardness. A tight dictionary doesn’t need to contain every possible operation. It needs a small number of reliable transformations which can be composed into more elaborate ones.

The shell is itself just another programme.

The shell is itself a command, and may be called recursively.

This is perhaps my favourite line in the paper.

You can put three commands in a file called tryout, run sh <tryout, and the shell will read and execute them just as if someone were sitting at the keyboard. The shell continues reading until it reaches the end of its input. It doesn’t care whether that input came from a person, another programme, or a file.

I hadn’t realised until now that poetically speaking, a script is just a command line with nobody at the computer.

But there’s also another important point I realised that the UNIX shell isn’t the whole of the operating system. It’s an ordinary programme running inside it. The thing that interprets the language of the world is itself a thing in that world. You can invoke it recursively, replace it with another interpreter, or choose not to use it at all.

In Gameworld Interfaces, Kristine Jørgensen argues that “the interface of digital games must also be seen as content.” Unix makes this almost literally true. The means by which you interact with the world is itself something that exists inside it.

I find this particularly interesting because of the way Unix handles processes. Earlier in the paper, the authors introduce the idea of an image.

An image is a computer execution environment

They describe it as the current state of a pseudo-computer, including memory, registers, open files, and the current directory.

Through fork and execute, Unix can create a new process and replace the programme running within it, while preserving important parts of that execution environment. The new program inherits a situation it did not create.

The same is obviously true of the situation AI agents encounter when they are booted into a code-space.

The command line is optional.

Section 6.7

At login, Unix doesn’t actually have to start a shell. The user’s entry in the password file can specify another programme to run instead.

Ritchie and Thompson give two examples. Secretaries logging into an editing system can be placed directly inside the text editor. Players logging into chess,find themselves inside the game, unable to explore the wider system.

This is almost literally what I mean by a Room in Hard Worlds. Two actors can inhabit the same underlying Code-Space but find themselves in completely different local worlds, with different objects, verbs, and available possibilities.

Of course, being presented with a restricted interface isn’t necessarily the same as being confined by one. That depends on what rules the program/operating system actually enforce.

The shell provides a vocabulary for attempting actions, but the operating system determines whether those actions can actually happen.


Towards the end, Ritchie and Thompson explain that Unix wasn’t designed to satisfy some enormous predefined specification. They were programmers who wanted a more comfortable relationship with the computer. They wanted to make it easy to write, test, and run programmes, and they built something that could be maintained and extended using its own facilities.

The result was a small, expressive world whose inhabitants could keep adding to it.

I came to thinking about agent harnesses through interactive fiction, MUDs, and parser games. Reading this paper feels like approaching much the same problem from the other direction.

I think for my entire life, I’ve been looking at the command line wrong. It’s not so much a window into the machine but a language or surface that constitutes part of the world of the machine itself. And it’s also very interesting to me that the UNIX command line right from the beginning was never especially committed to having a human on the other side of it in the first place.

Which is aging…interestingly.


Start Select Reset 📑

Start Select Reset zine cover

Subscribing to SSRZ supports my online work and creative projects.

As a thank you, I send you my zine four times a year, just like it’s 1994.

No spam. No email. Cancel at any time.

Photo 365

284//2026/365

The Ministry Of My Own Labour

Terminal Access

Dipping the Stacks

V/H/S SCP: When fandom meets law and Creative Commons

In the end, this opens a wider conversation about the trend of independent film companies trying to tap into the wealth of creativity that can be found online. In a world that is increasingly tired of endless sequels and superhero slop, savvy studios are turning to online creators. Audiences are thirsty for original stories, and many of those can be found in surprising corners of the Web. But these studios should also respect the collaborative and permissive nature of these communities, including the very re-use and remix culture that allows such creativity to flourish.

‘I Like My Big Rat Wife’: Meet the People Using Chatbots to Write Custom Fiction

Analyzing more than 500,000 prompts fed into ChatGPT, drawn from a public dataset called WildChat, the researchers found that more than a third of chatbot interactions involve some form of fiction generation, including prose and poetry, fan fiction, erotica, or role-play.

What if social media isn’t hurting kids? | The Verge

And far from being damaging, Gray also argues the adoption of home internet in the 1990s and 2000s actually drove a rebound in teens’ mental health by restoring freedom and connection lost in earlier decades.

The Guardian’s data centre reporting is needlessly hysterical

If the 0.14kg stays constant, it assumes that Britain will not reduce the carbon load on the grid by building any more wind farms or solar panels. It also assumes that two major nuclear plants, Hinkley Point C – and Sizewell C – will not come online, even though the former is half complete. It seems to assume that we will not increase the proportion of renewable energy on the grid from now until I am 99 years old in the year 2086.

Opinion | My Dumbphone Made My Life Better. It Made Everyone Else’s Worse.

I traded in my smartphone for a dumbphone (first an old-school Nokia, then a Light Phone III) over a year ago. And from a certain perspective, my experiment has been a success. I spend less time scrolling. My children are no longer in constant competition with X and Gmail for my attention. Life without a distraction machine at my fingertips feels lighter in the way I’d hoped. But with time it’s become hard to ignore the cost of my extended digital detox — not to me, exactly, but to everyone else.

Reading

I’m currently reading:

  • Building SimCity: How to Put the World in a Machine by Chaim Gingold
  • Games: Agency As Art by C. Thi Nguyen (2nd time)
  • Voice of Command by Richard Swan

Rebecca Black – Age of the Exhibitionist

I’ve finally got round to listening to Rebecca Black’s album that came out in September. It’s great. There’s a lot going on sonically, its all very 2020’s though, a bit Sophie, a bit Britney, FKA twigs, a bit Arca, a little bit of Hyperpop for everyone lol.

This album doesn’t contain a total banger that Sugar Water Cyanide was a few years ago. But it’s really good pop music from start to finish.

Is it just me or is there a lot of Hollaback Girl in the single Anaheim Star?

Also if you haven’t seen her cover of Addison Rae’s ‘Fame Is a Gun’ for tripple J’s Like a Version then you are missing out.

Remember Kids:

a video game that could play itself was much more suggestive of a special zone where the force of mythic stories wrestled with the chaos of simulation.

Emissary’s Guide to Worlding – Ian Cheng
← Previous

Leave a Reply

Discover more from thejaymo.net

Subscribe now to keep reading and get access to the full archive.

Continue reading

Discover more from thejaymo.net

Subscribe now to keep reading and get access to the full archive.

Continue reading