173 points · by antipropaganda · 7y ago · 61 comments
- We don't need separate processes if the language we use is inherently safe (e.g., modern Common Lisp).
- Without process isolation, it is possible to share large, complicated and possibly mutable data structures (graphs, arrays, user-defined objects) system-wide.
- Once it is possible to cheaply share and communicate arbitrary data structures, it is pointless to maintain designated 'file system'.
- Not having a file system raises the question of what data should be persistent and what shouldn't. But on a modern computer, it is feasible to just treat all data as persistent (maybe excluding the youngest GC generation).
The best news is that the author is actually working hard to implement this operating system. The first part - the Lisp implementation - is already in a pretty good shape and could be finished within the next two years: https://github.com/robert-strandh/SICL
I note the year of the article, which was before Spectre and friends showed that this is not a reasonable assumption these days[1].
So does this mean LispOS is doomed?
Also technically we still don't need separate processes to mitigate spectre, we just need to make sure that microarchitecture state is flushed when changing security domains. This is often accomplished with processes, but it could also just be accomplished by marking system methods in a LispOS as "priviledged" and decorating them to flush the microarchitecture state when called.
A bit off topic, but when I miss the environment of the Xerox 1108 Lisp Machine that I had from 1982 to about 1987, I find the closest thing today that offers a similar experience is Pharo Smalltalk.
[1] https://www.cs.virginia.edu/~evans/cs655/readings/smalltalk....
Much of the interview focuses on things like how an OS is uneccesarry and shouldn't exist. Granted, he has drastically different needs than the average user.
Then, nothing fits in the language (C)?
I'd be concerned about the UX issue of ephemeral vs. permanent changes here. I doubt that files and save/revert operations are the best we can do, but I think there's a lot of value in the fact that some pattern for it exists that's common to most applications. Perhaps this has already been tackled in some system that doesn't natively use the concept of disk files. It could be as simple as having a pattern to assign names to persistent copies of objects, or something more sophisticated like assigning names to points in an undo tree that are then transparently converted into self-contained objects when the tree is pruned.
Now, whether the web would be better if everything was more file-like is an open question. That would be very interesting, and probably closer to the Nelsonian ideal.
I mean, there's a reason URLs look like directory paths... that's what they were originally meant to be, remote paths to files.
We created sandboxes for a reason.
To play with a bootable user experience, before you've replaced the host kernel and device support, you can strip down something like Debian Live. I previously did this for a Racket-based living room appliance project. A simpler example, without Racketisms, that uses only 2 shell scripts (you only need 1; the other is to play partition table tricks), is my earlier Debian Live variant: https://www.neilvandyke.org/lildeb/
I'm also a fan of a variation on the author's approach: have your better/different language get a foothold on a working GNU/Linux system, alongside traditional apps, in a system the user could use as their daily driver, and incrementally replace all of userland. This was my plan for PostmarketOS (though I've suspended my open source work on "non-employable" things): https://www.neilvandyke.org/postmarketos/
The author's approach also seems valid, and worth playing with.
That's incidentally what Emacs is to many of its users (myself included).
For a (mostly) single host process, without preemptive multitasking/threading, Emacs as an operating system works surprisingly well.
For example their “file system” (for want a better description) approach was tried on an IBM mainframe and it proved more cumbersome to maintain than the typical file system approach we have currently.
Also when talking about address spaces he acknowledges traditional memory management exists for security reasons then says that’s not needed in his OS without actually proving how his method either prevents the same attacks nor new ones that effectively result in the same kind of vulnerability (I could think of a few very easy attacks against his OS design).
Similarly the way he combines physical storage and system memory into one device completely overlooks technical limitations of the hardware, the risk of data loss if you don’t manage things correctly, the vastly different storage capacities between the two, nor the fact that basically every OS does this to some extent already via caching.
While it’s nice to go back to the drawing board and rethink certain idioms, this felt more like a half baked rant at UNIX than an objective look at the past and current OS designs.
https://medium.com/@reinman/monoids-to-groupoids-492c3510511...
I believe we're in for a redesign of OS architectures, now that the 50's assumption of a single machine with a single OS kernel running all programs (or the 60's equivalent of several few mainframes communicating through a slow network) is no longer the main paradigm.
Would be nice if the author referenced historical systems that overlap these ideas.
One is the Symbolics Genera system with 'data level integration' so apps shared rich data structures instead of uninterpreted bits. https://www.ifis.uni-luebeck.de/~moeller/symbolics-info/gene...
Another is Appolo Domain/OS which had a single level store: http://bitsavers.org/pdf/apollo/014962-A00_Domain_OS_Design_...
If we're going to proceed to list every single address space operating system we've ever heard of, i'll mention SPIN, written in Modula 3 (although i don't know if it did anything clever about sharing data between applications):
Really not sure the whole game.
1. It is ANSI standardized and mature.
2. Common Lisp programs are safe. Some implementations violate safety for performance reasons, but this one certainly won't.
3. Common Lisp has the best error handling mechanism that I know of (Conditions, handlers and restarts).
4. The language is programmable, both at the syntax level (Macros) and at the object level (CLOS with the metaobject protocol). So new ideas from other programming languages can often just be ported.
5. The language has been designed for interactivity and safe incremental redefinition.
6. Lisp has already been used very successfully for operating system development (https://en.wikipedia.org/wiki/Lisp_machine).
This makes it pretty much the ideal choice for such a project.
I agree that there are technical problems with interoperability of programs and partially this may be due to the unix way. But the article does not analyze this and it is not clear that such a radical change is a good way to solve those problems. Even if theoretically yes, there are practical things to consider, such as the insane amount of work needed to switch. Perhaps the author just likes Lisp and has a solution in need of a problem.
> "Emacs is a great OS, but it lacks a decent text editor."
The comment presumably made because emacs is extended with LISP.
WHY
WHY WOULD ANYONE THINK THIS MATTERS
Anything that increases and improves our knowledge of the universe - including knowledge of how to best use existing tools, and which tools to use for which jobs - is a good thing in and of itself (barring exceptions related to negative externalities which don't apply here).
I don't know if that's the author's rationale, but it's the one I would use.
It may matter to the author of the article. That's fine. To the users? I'm pretty sure that hardtoreason correctly reflects their attitude.
And if you're writing an OS, but don't care about the users? Well, write it however matters to you, because you aren't likely to have users who care, because you aren't likely to have users at all.
Counterpoint: Windows 10.