4 ms·
If you have a Raspberry Pi, you have already all the hardware to run Lisp. There is very little reason to develop special hardware. Lisp runs nicely on an ARM p
by lispm 8y ago
If you have a Raspberry Pi, you have already all the hardware to run Lisp. There is very little reason to develop special hardware. Lisp runs nicely on an ARM processor.
Actually some the first ARM processors were supposed to run a Lisp operating system. When Apple did the research&development for the Apple Newton, they originally attempted to run a Lisp-like system on mobile systems like PDAs and tablets. This Lisp dialect was derived mostly from Scheme and Common Lisp - the language was eventually called Dylan. Apple had ARM systems in their lab which ran a Dylan OS. When they at one point chose the ARM processor, Apple invested in ARM and they used a chip which was able to support a garbage collected language. Unfortunately these Lisp operating systems by Apple did not reach the market and Apple instead sold the Apple Newton with an OS kernel written in C++ and the software on top written and scripted in NewtonScript - a language with many aspects from Lisp - incl. garbage collection.
- AnimalMuppet 8y agoCould you explain what you mean by a "Lisp operating system"? I understand the idea of Lisp as a language, but what does Lisp as an OS mean?
- lispm 8y agoHistorically it's an operating system written in Lisp, typically running as a Lisp runtime+image on the metal. Itself providing memory management, interrupt handling, process scheduling, network I/O, graphics, keyboard, mouse, windows, applications ... and everything else a typical OS provides. For a recent attempt see: https://github.com/froggey/Mezzano https://github.com/froggey/Mezzano
- AnimalMuppet 8y agoIs there any advantage to that over a generic OS? I have not, in general, cared what language my OS was written in.
- white-flame 8y agoFirst off, note that Lisp OSes were made before modern cybersecurity was a concept. Since everything was Lisp all the way down, and Lisp is a very dynamic language, all calls that comprise the OS are available as plain function calls visible to the interactive REPL, introspection, and modification. They were very developer-oriented and had lots of ways to have live displays of objects, to reuse or interact with them, and very deep debugger and documentation integration, since all code was at the same "level". Since it's a high level language that does not expose low level memory (although certainly there are obscure implementation-specific Lisp operations for doing so used deep in the guts), corruption of memory at a low crashy level isn't generally a thing. Protections between applications/processes aren't as necessary and it can all remain plain running threads & functions interacting with each other & the OS.
- AnimalMuppet 8y agoSo there isn't really a distinction between the OS and the API? (That is, the Linux kernel, say, is a monolithic binary. Then we have the OS utilities that make up the GNU/Linux OS. And then we have the C - or whatever - standard library API. If I understand you correctly, those distinctions would not exist in a Lisp OS.)
- white-flame 8y agoCorrect. It's not a process-oriented environment, with crash protection facilities keeping everything at arm's length. There are namespacing facilities (though I'm not sure how far back in history they go) to discriminate your code's reach, as well as to import the public API from others' code, or in a different manner to bore into their private affairs generally for admin/debugging/tracing/modification. "Global" variables have thread-local, dynamically scoped bindings which are super useful for configuration, redirection, or setting other side-band broad context when calling into shared code. Also it should be noted that these types of machines (at least from the Symbolics point of view) tended to be single-user workstations, though were still networked to allow remote (and simultaneous) access to its running world, with varying levels of per-connection context. One of the biggest downsides of ye olde Lisp machines was garbage collection times. Some had facilities to define dedicated heap regions, but generally the GC had to walk the entire workstation heap across all "applications" in 1980s hardware, which wasn't great. But at least as a programmer, you could freely code and only worry about minimizing GC pressure when it became an issue, instead of starting from a required malloc/free perspective and constantly worry about leaks.
- willismichael 8y agoEmacs. (Only half joking)
- cyphar 8y agoWell, there is a port of glibc to UEFI, so one could very easily "boot into Emacs". Strangely I've not seen anyone do this.
- jonjacky 8y agoHere is boot into emacs implemented by making emacs the Linux init program, "Emacs standing alone on a Linux Kernel" https://www.informatimago.com/linux/emacs-on-user-mode-linux.html https://www.informatimago.com/linux/emacs-on-user-mode-linux...
- cyphar 8y agoThis is different to what I was talking about -- your link is about running Emacs as pid1 on Linux (cool, but not particularly innovative -- if you run Emacs in a Docker container that is effectively what you're doing). I was talking about booting from UEFI into Emacs, without the Linux kernel at all. Given that there is a glibc port for UEFI that uses just BootServices it would be very possible to do this.
- jonjacky 8y agoAh yes, I see. Something like this has been done with Python. It was surprisingly difficult, I thought. Python without an operating system https://news.ycombinator.com/item?id=9453677 https://news.ycombinator.com/item?id=9453677 Porting Python to run without an OS https://www.youtube.com/watch?v=bYQ_lq5dcvM https://www.youtube.com/watch?v=bYQ_lq5dcvM
- lispm 8y agonot really. GNU Emacs is not even good at multi-tasking. Actual Lisp operating systems also don't look like an Emacs running on hardware. The MIT Lisp operating system had Zmacs, but it was one application among others and while Zmacs had modes (incl a Dired), the typical Lisp OS application was not an Zmacs mode. None of these were based on Zmacs: the Listener (the REPL), the process overview, the font editor, the inspector, the terminal, the chat program, the documentation reader, ... On a Symbolics there were basically two major other programs reusing parts of Zmacs in their UI: the mail client and the documentation editor. Thus when people think that a Lisp OS looks, feels or works like an Emacs on the metal or that GNU Emacs looks like the typical Lisp operating systems from the 80s (from MIT, Symbolics, LMI, TI or Xerox), then this is actually not the case. See this for an example how an 3d animator used a Symbolics Lisp Machine and parts of the graphics suite for it: https://youtu.be/8RSQ6gATnQU https://youtu.be/8RSQ6gATnQU