Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What often goes unsaid is the corollary: "Any Common Lisp implementation people use contains an ad-hoc, informally-specified, bug-ridden optimizing compiler written in C or Fortran."


That makes no sense. Which Common Lisp implementations contain a compiler written in C or Fortran?


I should have been clearer: written partially in C or Fortran.

SBCL, for example, has C bindings in the /runtime subdirectory.


> SBCL, for example, has C bindings in the /runtime subdirectory.

So nothing to do with SBCL's compiler (which is somewhat confusingly named 'Python' and written entirely in Lisp), then.


Well, handwave handwave. Nothing to do with the compiler except that I'd assume if you rip out the /runtime directory you'll get a compiler that can't output working code.

The point is that these domains have a tendency to eventually overlap each other.


The Python compiler can output working code just fine. It takes either a Lisp structure (COMPILE) and generates a code object in memory, or takes a text file (COMPILE-FILE) and generates a FASL file. This has absolutely nothing to do with the runtime, except perhaps for COMPILE-FILE's need to read and write a file which ultimately needs to go through a syscall in the runtime. But the compiler is not even partially written in C. (And considering that Python originated as part of the CMUCL project in the mid-80's era of Lisp machines which didn't even include any C code whatsoever, writing even a part of Python in C would have been a curious design decision back then.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: