The Unix Executable as a Smalltalk Method [pdf]
Posted3 months agoActive3 months ago
programmingmadecomplicated.wordpress.comTechstory
calmpositive
Debate
40/100
SmalltalkUnixProgramming Paradigms
Key topics
Smalltalk
Unix
Programming Paradigms
A research paper presented at the Onward! conference explores the idea of treating Unix executables as Smalltalk methods, sparking discussion about the intersection of Unix and Smalltalk programming paradigms.
Snapshot generated from the HN discussion
Discussion Activity
Moderate engagementFirst comment
10m
Peak period
6
0-6h
Avg / period
2.6
Comment distribution21 data points
Loading chart...
Based on 21 loaded comments
Key moments
- 01Story posted
Oct 17, 2025 at 9:03 PM EDT
3 months ago
Step 01 - 02First comment
Oct 17, 2025 at 9:13 PM EDT
10m after posting
Step 02 - 03Peak activity
6 comments in 0-6h
Hottest window of the conversation
Step 03 - 04Latest activity
Oct 20, 2025 at 1:16 PM EDT
3 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45623917Type: storyLast synced: 11/20/2025, 5:45:28 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
During the COVID-19 pandemic I collected my thoughts on my blog (https://mmcthrow-musings.blogspot.com/2020/04/a-proposal-for...) and on a site that I decided to dub MallowOS (https://mallowos.com/), paying homage to Apple's Pink/Taligent project and Google's Fuchsia project.
Unfortunately I haven't made any progress beyond design notes written in paper notebooks; I've got swamped with work (though now I have more free time since becoming a community college professor last year; I have summers off now!). I've also changed my design plans from basing off of Plan 9 to building a new exokernel in a language like Rust, adapting NetBSD's rump kernel for driver support, and using a single-address space design similar to Opal (https://dl.acm.org/doi/10.1145/195792.195795), though this isn't reflected in the MallowOS webpage yet.
Another thought has come to mind: not too long ago there was a discussion here about Etoile (http://etoileos.com/), a project from the late 2000s-early 2010s that attempted to build a GNUstep-based desktop environment. What made Etoile unique is its embrace of the Smalltalk inspirations of Objective-C. Imagine a new project that took Smalltalk inspiration one step further by adapting the ideas of this paper, fully integrating Smalltalk with the Unix framework.
> from basing off of Plan 9 to building a new exokernel in a language like Rust
This seems like a big change. Won't the driver support and infrastructure be even more of a hassle? And why an exokernel in particular?
> using a single-address space design similar to Opal
Why?
I like the emphasis on composability and user control. I think, more and more, people are realizing the necessity to seek out OS designs different than the mainstream offerings'. Can't let Linux be the final stage of OS evolution!
He does go into some ideas about how to implement this approach more efficiently, which seems potentially very important to making it useful.
Edit: rather than just naysaying, it occurred to me to reference the notion of Orthogonal Persistence, which the image-based approach provides (not without drawbacks) but IDEs typically don’t. Previous HN discussion: https://news.ycombinator.com/item?id=39615228
https://dreamsongs.com/Cadillac.html
For those interested here's a link to the actual project:
* https://github.com/stephenrkell/liballocs
[0] https://dl.acm.org/doi/10.1145/2525528.2525534
"An operating system is a collection of things that don’t fit into a language. There shouldn’t be one."
Another relevant page on the same site is: https://wiki.c2.com/?AlanKaysDefinitionOfObjectOriented
Semi-related; anybody have an old NeXTcube they'd be willing to part with? I'm a student and I need it for school and things.
"UNIX Needs A True Integrated Environment: .CASE Closed"
http://www.bitsavers.org/pdf/xerox/parc/techReports/CSL-89-4...
Interlisp-D gets ported to UNIX in 1988
https://interlisp.org/history/timeline/
Cedar gets ported into UNIX in 1989
"Experiences creating a portable cedar"
https://dl.acm.org/doi/10.1145/74818.74847
NeXTSTEP and macOS are only thing left from those ideas in modern systems, combing UNIX and Xerox PARC worlds.
While there are some of those ideas influenced Windows, via Objective-C => Java => .NET, and Android is what Inferno/Limbo could have been, it is not quite the same as those early ideas how computing should be like.
When I implemented this idea in 02002 (in shell scripts) the clumsiest thing was lifetime management of the objects, as Jakubovic anticipates in the paper. I had thought that I put symlinks to the method scripts directly into each object directory, making it a prototype-based OO system, but no, it actually implemented walking a prototype chain, just as Jakubovic's proposed system walks a superclass chain. And, just as Jakubovic did, I passed the receiver's pathname as the first argument to the method executable, passed arguments on the command line, and returned results on stdout. I called my version "shoo"⁴ but it wasn't original to me, inspired by Martin Hinsch's "woosh"⁵:
> shoo makes your filesystem and shell into a prototype-based object-oriented programming environment with dynamic method binding, transparent persistence (but terrible memory management!), multiple inheritance, and local-network distributed objects (if you have NFS, and only the state is distributed --- not the computation).
> Unfortunately, it still doesn't make the shell into a decent general-purpose programming language.
shoo was painfully slow. The `testscript` in the package takes 4.5 seconds on my cellphone in Termux, and all it does is instantiate two rectangular points, two polar points, and three other objects, and call some methods on them. I'm pleased to see that it does at least pass, but it might be reaching 10 or 20 message sends per second.
In shoo, the pathname at which to create the new object was an argument to the new and derive methods, as in Tk. I think something like this is probably a good idea if you want to use this approach for something; otherwise it would be very difficult to clean up. It also makes the shell script quite a bit more readable because you don't have to capture return values so often:
As in Self, adding a property to an object (such as `acting`) adds corresponding getters and setters. The `die` method was one I defined in basicobject to rm -rf the receiver, due to the lack of any GC.Other code did have to use the rather clumsy bash syntax for capturing output. I didn't attempt to make numbers and strings into objects as Jakubovic wants to; here's the method rectpointclass/r, which calls the x and y accessors:
Jakubovic mentions that creating a million Unix processes will cause "bad things to happen" but even on my laptop creating and destroying a million processes only takes about a minute (httpdito² can serve 20000 hits per second, creating all the children from a single core; C programs are much slower³, about 7000 fork/exit/waits per second, presumably because they map more pages) and I think you could do it in a second with AWS Lambda. Possibly you don't want them all to exist at once, but of course the original Smalltalk systems couldn't do that either—their object references were only 16 bits, so 65536 objects was the theoretical max, and they ran on machines without enough RAM for even that much.There are several factual errors in the paper, but I think the only consequential one is the assertion that FUSE makes it possible to implement files as efficiently as Smalltalk objects. It's true that io_uring has made it possible to eliminate the system call context switching overhead from file operations, but even within the kernel, dispatching a user I/O request to a filesystem is at least an order of magnitude slower than a Smalltalk message send on the same hardware, and FUSE adds additional overhead.
Some Smalltalk object memories segregated objects by class, so that all the objects of the same class were contiguous in memory, like an array of structs of the same type. It might be reasonable to put many objects containing the same set of fields into an Apache Arrow file so that they can be read by processes without having to read in the whole file, relying on memory mapping. (Arrow is a language-independent in-memory data format.) Or you could just accept the small overhead of Linux files, which might be 256 bytes of disk and, even without io_uring, only about four 300ns system calls¹ to read their contents: 1.2μs (open, read, read, close). It isn't fast enough to do everything you can do with a Smalltalk system today, but it's fast enough to do everything you could do with a Smalltalk system in the 70s.
As long as you don't try to write it in bash. LuaJIT might be a reasonable alternative, combining easily editable scripts with a reasonable library system and reasonable startup time.
______
¹ http://canonical.org/~kragen/sw/dev3/syscallovh.c
² http://canonical.org/~kragen/sw/dev3/server.s
³ http://canonical.org/~kragen/sw/dev3/forkovh.c
⁴ https://www.mail-archive.com/kragen-hacks@canonical.org/msg0...
⁵ http://web.archive.org/web/20040409072028/http://wosx30.eco-...
This was a HUGE combined programming conference with several competing tracks over 7 days. You can find the program here ^1 (you can often find a link to the abstract or full paper if you click on it)
Streams from the sessions will also show up here^2 (you’ll need to match the day and room and ff to the time it appeared)
^1: https://conf.researchr.org/program/icfp-splash-2025/program-...?
^2: https://youtube.com/playlist?list=PLyrlk8Xaylp5ihrTVeOSaylaB...