Live data from Hacker News

Writing an Interpreter in Go: The Paperback Edition

thorstenball.com

61–70 of 78 posts

Re: Writing an Interpreter in Go: The Paperback Edition

#61
post #60

Does anyone have some resources or examples of writing a Scheme in Go?

I have been writing one available at https://github.com/archevel/ghoul it is not finished in any way shape or form. I'm currently rewriting the evaluator to do tail call optimization in my spare time and when that's done I'll work on handling macros.

If you want a more complete one you could check out zygomys https://github.com/glycerine/zygomys

Re: Writing an Interpreter in Go: The Paperback Edition

#62
post #60

Does anyone have some resources or examples of writing a Scheme in Go?

I have been writing one available at https://github.com/archevel/ghoul it is not finished in any way shape or form. I'm currently rewriting the evaluator to do tail call optimization in my spare time and when that's done I'll work on handling macros. If you want a more complete one you could check out zygomys https://github.com/glycerine/zygomys

Thank you!

Re: Writing an Interpreter in Go: The Paperback Edition

#63
post #19

Earlier quoted context omitted.

The best learning outcomes for the author I believe. But I'm more interested in the prospective reader's PoV.

I recently read a comment (I think it might have been on HN, but I can't find it) that said something like this: if you recently learned/mastered a topic, you're in a far better position to teach that topic than an expert, who's so deep into it, that they can't understand the beginners. I wish I could find the source for this, because it was much better put, but that comment contains the gist of my motivation behind…

Is it this

"we live in an ironic world, where pros decide what things are easy for newbies to understand. "

https://www.reddit.com/r/golang/comments/5eubdp/the_future_o...?

Re: Writing an Interpreter in Go: The Paperback Edition

#64
post #30

Earlier quoted context omitted.

I recently read a comment (I think it might have been on HN, but I can't find it) that said something like this: if you recently learned/mastered a topic, you're in a far better position to teach that topic than an expert, who's so deep into it, that they can't understand the beginners. I wish I could find the source for this, because it was much better put, but that comment contains the gist of my motivation behind…

Completely agree. Currently reading a book authored by the creator of a framework and having a hard time of it. So many newbie questions. There is extra stuff I don't need to know as a beginner - put that in another book or another section. Don't interleave it with the basic material. There is stuff that make assumptions that I am an expert in the language, the code needs to be fully explained, line by line.

I wrote a book in this light, https://github.com/thewhitetulip/web-dev-golang-anti-textboo...

Feel free to let me know your feedback!

Re: Writing an Interpreter in Go: The Paperback Edition

#66
post #10

It is becoming quite popular (or maybe it was always the case?) that someone learning some topic and at the same time writing a book about it. Interesting how it affects the quality of the content (versus books authored by persons with expertise in given topics).

I believe it was always the case. I can remember books just like this in the 70's and 80's, teaching one how to write a Pascal interpreter in C, or then a GUI system in Turbo Pascal, for example, which felt very much like this kind of introduction/tutorial to both the language, and the application of the language itself to an interesting component. Is this a Go book or a Monkey/Interpreter book? Its neither, but both.

Re: Writing an Interpreter in Go: The Paperback Edition

#67
post #66
post #10

It is becoming quite popular (or maybe it was always the case?) that someone learning some topic and at the same time writing a book about it. Interesting how it affects the quality of the content (versus books authored by persons with expertise in given topics).

I believe it was always the case. I can remember books just like this in the 70's and 80's, teaching one how to write a Pascal interpreter in C, or then a GUI system in Turbo Pascal, for example, which felt very much like this kind of introduction/tutorial to both the language, and the application of the language itself to an interesting component. Is this a Go book or a Monkey/Interpreter book? Its neither, but both…

I think you've misread the comment, unless I'm misreading yours.

Re: Writing an Interpreter in Go: The Paperback Edition

#68
post #10

It is becoming quite popular (or maybe it was always the case?) that someone learning some topic and at the same time writing a book about it. Interesting how it affects the quality of the content (versus books authored by persons with expertise in given topics).

> Interesting how it affects the quality of the content (versus books authored by persons with expertise in given topics).

How does it affect the quality? Based on what criteria and examples (ideally specifically related to this book and field)?

Re: Writing an Interpreter in Go: The Paperback Edition

#69
post #19

Earlier quoted context omitted.

My belief is that writing about a topic that one is trying to come to grips with helps ensure they achieve the best possible learning outcomes.

The best learning outcomes for the author I believe. But I'm more interested in the prospective reader's PoV.

I think it's worse for the reader. Experience gives you "undocumented" knowledge - for example, knowledge of how system behaves under real load and what bottlenecks are and what are other limitations of particular architecture.

Re: Writing an Interpreter in Go: The Paperback Edition

#70

I bought this book and I've been using it - but I'm writing the interpreter in Rust instead of Go. I really like it, and I think Go is actually a cool language for this due to its simplicity. I had very little Go experience but the language is drop dead boring, incredibly easy to pick up. I'd recommend it.

Funny, I did the exact same thing!

Tried to push learning Rust via the Go examples. It has been a great exercise, but highlighted the pain of dealing with various string representations in Rust.

Post reply on HN