2 ms·
My Common Lisp environment is not built on top of C. What is it built on top of? Your environment is not based on Unix, Mac OS, or Windows? I thought Lisp Mach
by mechanical_fish 18y ago
My Common Lisp environment is not built on top of C.
What is it built on top of? Your environment is not based on Unix, Mac OS, or Windows? I thought Lisp Machines were part of history.
- silentbicycle 18y agoLisp, probably. You write a fairly straightforward* Lisp interpreter in some existing language (often C, though ML seems like a good fit as well), use that to execute a Lisp compiler written in Lisp on itself, and presto, you have Lisp all the way down to the machine code. The non-Lisp scaffolding is only a temporary support for the initial construction. It may be built with C, but then the C vanishes. It isn't on top of it in any sense. See also: http://en.wikipedia.org/wiki/Self-hosting http://en.wikipedia.org/wiki/Self-hosting -- Compilers for Haskell, Smalltalk, Factor, C, etc. have been done this way, too. There's nothing specific to Lisp about the process. Consider: What are C compilers written in? * I.E., don't bother optimizing it much if it's only run to build the compiler. Making it simple for easy porting is more important than speed.
- Zak 18y agoHis point is that I'm most likely running Lisp on top of some operating system that's written in C rather than using a Lisp-based OS that runs directly on the hardware. Movitz is a project to enable running Lisp on x86 PCs so that a Lisp-based OS can be developed, but I'm not using it. mechanical_fish is correct that I'm running CL on Linux, which is written in C. If I have a problem that requires me to gain some deeper understanding of Linux than I can get from the documentation, I will have to read C. All of that said, I think this isn't an especially compelling argument for learning C. The understanding it brings of how computers work is more valuable for most programmers, I think.