This book will stop you from making easy mistakes in design of whatever DSL or language you're trying to create. Also see the commentary he keeps on it which changes often http://www.cs.cmu.edu/~rwh/pfpl/commentary.pdf
Ask HN: Resources for building a programming language?
71–80 of 87 posts
Re: Ask HN: Resources for building a programming language?
#72I'd probably start by using Racket (Racket is a scheme is a lisp) which has a whole toolkit for language building. Arc is written this way, for instance. Often these are lispy languages but there is no reason they have to be. A starting point: http://beautifulracket.com/stacker/ or https://www.hashcollision.org/brainfudge/ That will get you started rediculously quickly and give you things like GC and JIT for free. Yo…
Re: Ask HN: Resources for building a programming language?
#73I'd probably start by using Racket (Racket is a scheme is a lisp) which has a whole toolkit for language building. Arc is written this way, for instance. Often these are lispy languages but there is no reason they have to be. A starting point: http://beautifulracket.com/stacker/ or https://www.hashcollision.org/brainfudge/ That will get you started rediculously quickly and give you things like GC and JIT for free. Yo…
https://lexi-lambda.github.io/blog/2017/08/28/hackett-progre...
Re: Ask HN: Resources for building a programming language?
#74Earlier quoted context omitted.
The first edition of EOPL was eye opening. I learned what a continuation was, (and how to do CPS) from it. The second and third editions feel less "hard core" somehow.
Do the later editions have less content? Would your recommendation be to read the first edition? Thanks!
Re: Ask HN: Resources for building a programming language?
#75Earlier quoted context omitted.
I came into Forth with 32 years of mixed experience from Lisp, Smalltalk, Haskell, C++, C, Java, Perl, Python, Clojure, Scala and more; it's difficult for me to judge anything from that perspective. I've never written a standard Forth program in my life though, never installed any other implementation. The second I was introduced to Forth, it clicked; Lisp took me much, much longer to get by comparison. Like I said,…
Thanks for the reply. I'll take a look. When you said it clicked. What we're you looking at? Starting or Thinking Forth or what? I'm trying to find out how most people learn to build their own system.
We over-complicate things, for different reasons. The truth is that nothing is very complicated once you understand it well enough to break it down to its core.
Re: Ask HN: Resources for building a programming language?
#76Earlier quoted context omitted.
Do the later editions have less content? Would your recommendation be to read the first edition? Thanks!
(strictly imo) the 2nd and 3d editions are fine books and cover a lot of material, but they don't have as much (for lack of a better word) depth as the first edition. If you can get the first edition, it is certainly worth reading.
Re: Ask HN: Resources for building a programming language?
#77I've really been enjoying http://www.craftinginterpreters.com/ unfortunately it isn't complete yet.
I've been recommending this to co-workers who want to learn how to write their own language. I had ideas on how I would write a book on compilers and Bob had all the same idea, but he actually went ahead and acted on them. 1. Avoid long discussions on the theory of parsing, how to transform regular expressions into table-driven DFAs, how to build an LR(1) parser, etc.. These topics can be interesting later on, but fo…
I'm looking forward to Crafting Interpreters too.
Re: Ask HN: Resources for building a programming language?
#78I recommend playing a bit with ometa: http://www.tinlizzie.org/ometa-js/#Sample_Project The framework has since evolved into ohm, but I think ometa-js is more fun for playing around with. https://github.com/harc/ohm
Re: Ask HN: Resources for building a programming language?
#79Earlier quoted context omitted.
(strictly imo) the 2nd and 3d editions are fine books and cover a lot of material, but they don't have as much (for lack of a better word) depth as the first edition. If you can get the first edition, it is certainly worth reading.
I worked through most of the first edition (skipping much of the OO chapter) and read the later editions pretty lightly. They're more polished and developed, e.g. explaining better code for the CPS transform, adding a chapter on types, and such. But they do give me a bit of a spoon-fed vibe compared to the first edition, I guess as a result of optimizing it from classroom feedback. I'm not sure depth is the right cha…
The book doesn't seem that great for self-study. Would you confirm or reject that assessment?