7 ms·
Lisp System Implementation
- macoovacany 7y agoThe free pdf preview seems to consolidate some of the concepts from the register machine chapters of SICP.
- kerkeslager 7y agoIf you're interested in this, Lisp In Small Pieces is also a good resource.
- throwaway427 7y agoHave you ever kissed a girl?
- shaunxcode 7y agoEverything this guy writes or works on is worth consuming. Looking forward to reading this!
- pvitz 7y agoI totally agree with you. I bought his book on writing a compiler (t3x language) and although the code and text could be more educationally structured, it certainly conveys how easy it can be to implement a simple compiler.
- com-mecom 7y agoBRRR GET SERIOUS COM-ME.COM
- Annatar 7y agoStarted reading the sample text but as soon as I read abstract machine it was all over: we have suffered far too much and far too long under inefficiencies and distribution nightmares of abstract machines like that of Java, .NET or Python: if I cannot compile it straight to a machine code executable, I want nothing to do with it. Intermediate representation: just say no.
- JohnStrangeII 7y agoWhat about bootstrapping by writing an interpreter for language X and then implement a compiler in X? That used to be common practice and has many advantages, such as easy targeting of new systems. Maybe with tools like LLVM it has become a bit less common to do all that on your own, but not everybody wants to use LLVM and spitting out your own machine code directly, without even having a bytecode interpreter, still seems like a rather bad idea. Besides loss of retargetability, the generated machine code will never be fast without an IR, because it will basically just allow for peephole optimizations. I know one or two ingenious people who compiled to x86 assembler, because it was considered the fastest option then, and now regret that choice.
- pfdietz 7y agoIt's not a problem that comes up very often. It's only when a language is first invented. After that, you just compile with older versions of the compiler.
- mrighele 7y agoAbstract machine doesn't necessarily means that your code will be interpreted. An intermediate representation can just be a practical way to reason about low level code (well, the fact itself that is called "intermediate" gives an hint that it is not necessarily the "final" representation). Many lisps in fact generate native code, in Common Lisp you can even use "disassemble" to get the native code generated for a function
- pfdietz 7y agoAnd many lisps that generate native code go through an intermediate representation. SBCL has two, simply named IR1 and IR2. Also, even an interpreter of "intermediate code" can (dynamically) translate that intermediate code to native code. That's how many JVMs work, for example.
- 0815test 7y agoThis is one of those comments that the remark "not sure if serious..." was made for. You do know that C has an abstract machine, too? The C standard tells you all about it. Please don't troll or flame bait so blatantly, it's against the commenting guidelines here.
- new4thaccount 7y agoThis author is a treasure. I've been planning on reading his book on Klong (array language like J, K, and APL) for awhile now. I absolutely love the minimalist website design which reminds me of Zork and old terminals.