3 ms·
A Lisp and a compiler are two different things: Lisp is the whole thing and the Lisp compiler is just a component of a Lisp system. Now, one could write a virt
by lispm 3y ago
A Lisp and a compiler are two different things: Lisp is the whole thing and the Lisp compiler is just a component of a Lisp system.
Now, one could write a virtual machine in Lisp, but usually one would write it in C or assembler, since that's what squeezes more performance out of the hardware and makes interfacing to the operating system 'easier' (threads, calls into the OS, memory management, interrupts, error handling, etc.).
There are examples where (parts of) a virtual machine are written in Lisp. For example the Virtual-CPU emulator may be generated as C or assembler code from a Lisp program. There are also special versions of, say, the JVM written in Lisp to prove its correctness. Ideally one may want to have the core VM emulator written in assembler to reduce it to the most minimum hardware instructions per virtual machine instruction.
The example you cited from 1962 is a Lisp compiler written in Lisp, compiled by itself, running in a Lisp whose runtime was written in assembler (IIRC).
- uticus 3y agoThat helps, thank you. Based on what I've seen with Smalltalk, and playing around with the online Interlisp environment [0], I was under the impression an underlying OS was not a necessity [1]. [0] https://online.interlisp.org/main https://online.interlisp.org/main [1] Part of my confusion may stem from ideas like presented by Chuck Moore in Masterminds of Programming by Biancuzzi: "Operating systems are dauntingly complex and totally unnecessary. It’s a brilliant thing that Bill Gates has done in selling the world on the notion of operating systems. It’s probably the greatest con game the world has ever seen. An operating system does absolutely nothing for you. As long as you had something—a subroutine called disk driver, a subroutine called some kind of communication support, in the modern world, it doesn’t do anything else. In fact, Windows spends a lot of time with overlays and disk management all [sic] stuff like that which are irrelevant. You’ve got gigabyte disks; you’ve got megabyte RAMs. The world has changed in a way that renders the operating system unnecessary. What about device support? Chuck: You have a subroutine for each device. That’s a library, not an operating system. Call the ones you need or load the ones you need."
- lispm 3y agohttp://lispm.de/genera-concepts http://lispm.de/genera-concepts
- uticus 3y agoFascinating. > Genera is your whole environment; it encompasses what you normally think of as an operating system as well as everything else - system commands and all other activities. From where you look at it, there is no "top-level" controller or exec.
- lispm 3y agoBut it has a sophisticated process scheduler, several garbage collectors, complex memory management, various network stacks, implementations of file systems (local and remote), virtual memory paging, software installer, printer scheduler, namespace server for configuration of networked resources (users, networks, printers, hosts, ...), mail server and client, ... It's not that it has "a subroutine" for a disk, but actually very extensive support for disks and file systems on disk. It's just that everything runs in one spared memory space, incl. all applications. Probably not a winning way to design a networked OS in today's Internet environment.
- uticus 3y ago> Probably not a winning way to design a networked OS in today's Internet environment. I wonder. I know this is safely in imagination world, but if I were to have a system like this connected to the Internet, and there were others with similar systems also connected to the Internet, I would guess requirements above and beyond what is already provided would be: 1) security / sandboxing 2) ease of sharing code I’m pretty fuzzy on how #2 would happen. I spent so much time with Git these days it’s hard to imagine anything else. #1 is actually less hard for me to imagine: “The key to Genera's intelligence is the sharing of knowledge and information among all activities.” I can imagine the routines responsible for this being extended to handle sandboxing. But then again I have a pretty good imagination, so maybe in reality this is actually the more difficult part to implement.