Live data from Hacker News

Ask HN: Resources for building a programming language?

news.ycombinator.com

81–87 of 87 posts

Re: Ask HN: Resources for building a programming language?

#81

Earlier quoted context omitted.

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…

From this review: http://eli.thegreenplace.net/2017/book-review-essentials-of-... The book doesn't seem that great for self-study. Would you confirm or reject that assessment?

I did self-study it. I agree that just reading probably won't teach you much -- you need to program your way through the exercises, at least many of them. Getting stuck on a problem could make things difficult on your own and maybe rob you of momentum. This is a hitch I run into with math books a lot more than programming books, personally, but now that you bring it up this may be an issue I should've thought of. (Like him I also worked through SICP this way.)

Re: Ask HN: Resources for building a programming language?

#82
post #25

You'll want the Dragon Book as a reference, not necessary to get started with, but to build the semantic tree on which you will need to pin concepts on. https://www.amazon.com/Compilers-Principles-Techniques-Tools... If you aren't yet committed to any language, you can start building a parser with PyParsing. It's really easy. http://pyparsing.wikispaces.com/ If you want to take a quick (albeit expensive) class on it,…

Hmm. This might be kind of blasphemous, but I think I'd recommend against the dragon book? As I remember, the emphasis in that book is on syntax-directed translation. I might argue that the less you're thinking about syntax and lexing/parsing crap the better. (For that reason: ignore other answers that tell you to learn about a particular parser generator (e.g. ANTLR). That's just fluff.) Really, if you're coming to…

I read the question as the OP wanting to go through a didactic exercise in building a programming language from the ground up rather than building a DSL, in which case, lexing and parsing is a fundamental concept to cover, among others. I agree with keeping it LL(1), but it may also be worth it for the OP to understand what LL(1) means. I agree parsing is not at all the most important thing to learn in language implementation, but it seems to me almost a necessary thing to cover in order complete one's education in the subject. To omit it would be akin to omitting a discussion of limits in a study of calculus.

Re: Ask HN: Resources for building a programming language?

#83

Earlier quoted context omitted.

From this review: http://eli.thegreenplace.net/2017/book-review-essentials-of-... The book doesn't seem that great for self-study. Would you confirm or reject that assessment?

I did self-study it. I agree that just reading probably won't teach you much -- you need to program your way through the exercises, at least many of them. Getting stuck on a problem could make things difficult on your own and maybe rob you of momentum. This is a hitch I run into with math books a lot more than programming books, personally, but now that you bring it up this may be an issue I should've thought of. (Li…

Good to know. Could you say how long it took you to go through EOPL? Would you recommend another book on the topic for self-study?

I've been hesitant at starting these books because I was thinking too that without the exercises, it would be a lot less useful, and so it would be a bigger time/effort commitment than I want to get into.

Re: Ask HN: Resources for building a programming language?

#84

Earlier quoted context omitted.

I did self-study it. I agree that just reading probably won't teach you much -- you need to program your way through the exercises, at least many of them. Getting stuck on a problem could make things difficult on your own and maybe rob you of momentum. This is a hitch I run into with math books a lot more than programming books, personally, but now that you bring it up this may be an issue I should've thought of. (Li…

Good to know. Could you say how long it took you to go through EOPL? Would you recommend another book on the topic for self-study? I've been hesitant at starting these books because I was thinking too that without the exercises, it would be a lot less useful, and so it would be a bigger time/effort commitment than I want to get into.

Here's one of the newer ones I mentioned, which I haven't read but seems well regarded: http://cs.brown.edu/~sk/Publications/Books/ProgLangs/

EoPL took about as much work as a good college class, minus the sitting-in-lectures-and-tests part. Some parts aren't depended on later, like the OO chapter IIRC, so they're up to whether you're interested.

Re: Ask HN: Resources for building a programming language?

#85

Earlier quoted context omitted.

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…

From this review: http://eli.thegreenplace.net/2017/book-review-essentials-of-... The book doesn't seem that great for self-study. Would you confirm or reject that assessment?

I used it (1st edition) for self study.just a datapoint.

Re: Ask HN: Resources for building a programming language?

#86

Earlier quoted context omitted.

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.

It was a random blog post praising the simplicity of Forth; couldn't find it again if my life depended on it. Thankfully it didn't go too much into Forth dogmatics; what it did instead was to cut the ideas down to their core, which simplified my thought process to the point where I could finally see a clear path to something that felt like it was worth my effort. We over-complicate things, for different reasons. The…

How often do you use Forth for your professional /non hobby work?

Re: Ask HN: Resources for building a programming language?

#87
post #27

Here's an ebook on the subject: "How to Create Your Own Freaking Awesome Programming Language" http://createyourproglang.com Here's what some programming luminaries had to say (lifted from the website): “The book I want to read.” — Matz, creator of the Ruby language “I really love this book.” — Jeremy Ashkenas, creator of the CoffeeScript language

"The book I want to read." - that's a rather odd testimonial.

Japanese/English impedance mismatch?
Post reply on HN