Live data from Hacker News

Ask HN: Similar books to “Raytracing in one Weekend”?

news.ycombinator.com

21–28 of 28 posts

Re: Ask HN: Similar books to “Raytracing in one Weekend”?

#21
post #19

Earlier quoted context omitted.

I wrote "Crafting Interpreters" and read and very much enjoyed Thorsten's interpreters book. (I haven't gotten to his second one yet.) They are surprisingly alike. Mine takes you through two complete implementations of the same language: first as a tree-walk interpreter and then as a bytecode compiler. His first book does the former and his second book does the latter. Both are written in an informal friendly style a…

There seem to be many ripoffs on Amazon. Just a quick search yielded this: https://www.amazon.de/Crafting-Interpreters-Paperback-BOB/dp... https://www.amazon.de/Crafting-Interpreters-Tracy-Shep/dp/B0... https://www.amazon.de/Crafting-Interpreters-Steven-Billups/d... Have you already tried getting Amazon to remove them and failed?

These things pop up like whack-a-mole. I went ahead and reported them.

In general, customers seem to be pretty good at distinguishing garbage on Amazon from the real deal, and my actual listing has enough reviews that it clearly stannds out as the one they want.

Thanks for letting me know.

Re: Ask HN: Similar books to “Raytracing in one Weekend”?

#22
post #18

Earlier quoted context omitted.

I wrote "Crafting Interpreters" and read and very much enjoyed Thorsten's interpreters book. (I haven't gotten to his second one yet.) They are surprisingly alike. Mine takes you through two complete implementations of the same language: first as a tree-walk interpreter and then as a bytecode compiler. His first book does the former and his second book does the latter. Both are written in an informal friendly style a…

There is a sense of premium quality from your books, so I bought em. You haven’t let me down! I have been curious. Why the choice of java as introductory level? Maybe I’ve been lucky to choose my own tools over the years. But I still get hung up on this. It’s just that Java is so longform. I’m not sure I ever really wrote a sort in it, without cheating. Besides showing off that I could, I probably installed groovy or…

> Why the choice of java as introductory level?

It was a hard choice. I wanted a language that was:

1. Fairly high level with garbage colleciton so users didn't have to worry about pointers and stuff while they were trying to learn basic concepts.

2. Object-oriented, since that's familiar territory for many programmers and because I wanted to show some techniques around working with programming languages in an object-oriented language, like the visitor pattern.

3. Widely known and not mostly confined to a single platform or domain.

4. Statically typed, since I think it makes it much easier to see what types are flowing through the code when it's on paper and you don't have a debugger to help you.

There isn't much in the intersection of that set. Functional languages like SML and Haskell are great for writing compilers and interpreters, but now readers have to learn two things at the same time. C++ is a reasonable widely known typed OOP language, but is a nightmare of complexity. JavaScript is a good OOP linqua franca but the lack of types is a drag. TypeScript is maybe a good choice, but it's type system is so complex and JavaScript has so much weird baggage that I didn't want to go there. C#, Swift, and Kotlin are all nice languages but hew mostly to specific platforms.

Java was the least bad lingua franca I could find. I also don't mind it as a language.

> It’s just that Java is so longform.

My experience is that Java isn't particularly verbose as long as you don't program in a 90's Enterprise Java style.

> as the low-level code is simpler and smaller.

The C bytecode VM is quite compact, but it is so because it deliberately discards a bunch of things like an AST, simple environment representation, or separate resolution pass. It is designed to be implemented in C.

But I also want to teach users those other concepts. If I'd written the tree-walk interpreter that you do first also in C, it would end up a huge sprawling C program. Just dealing with allocating and freeing the AST nodes at the right time would have been miserable.

Not to mention, it means you would have to implement a garbage collector very early on since Lox relies on it but C doesn't have it.

Re: Ask HN: Similar books to “Raytracing in one Weekend”?

#23
post #18

Earlier quoted context omitted.

There is a sense of premium quality from your books, so I bought em. You haven’t let me down! I have been curious. Why the choice of java as introductory level? Maybe I’ve been lucky to choose my own tools over the years. But I still get hung up on this. It’s just that Java is so longform. I’m not sure I ever really wrote a sort in it, without cheating. Besides showing off that I could, I probably installed groovy or…

> Why the choice of java as introductory level? It was a hard choice. I wanted a language that was: 1. Fairly high level with garbage colleciton so users didn't have to worry about pointers and stuff while they were trying to learn basic concepts. 2. Object-oriented, since that's familiar territory for many programmers and because I wanted to show some techniques around working with programming languages in an object…

Well! My curiosity is satisfied. I’m not ivory-towered enough to think of Haskell for this, but may be somewhat biased in a snake case direction.

I like it, you called my cohort out on being jaded by the developer experience of J2EE. I will revisit that outdated bias.

Re: Ask HN: Similar books to “Raytracing in one Weekend”?

#26
post #19

Earlier quoted context omitted.

There seem to be many ripoffs on Amazon. Just a quick search yielded this: https://www.amazon.de/Crafting-Interpreters-Paperback-BOB/dp... https://www.amazon.de/Crafting-Interpreters-Tracy-Shep/dp/B0... https://www.amazon.de/Crafting-Interpreters-Steven-Billups/d... Have you already tried getting Amazon to remove them and failed?

These things pop up like whack-a-mole. I went ahead and reported them. In general, customers seem to be pretty good at distinguishing garbage on Amazon from the real deal, and my actual listing has enough reviews that it clearly stannds out as the one they want. Thanks for letting me know.

Personally I often go to Amazon to find things, google the author and check on the HP on how to buy the book with the least amount of "tax" for the author. Added benefit: you get formats outside of walled gardens!

Re: Ask HN: Similar books to “Raytracing in one Weekend”?

#27

Earlier quoted context omitted.

These things pop up like whack-a-mole. I went ahead and reported them. In general, customers seem to be pretty good at distinguishing garbage on Amazon from the real deal, and my actual listing has enough reviews that it clearly stannds out as the one they want. Thanks for letting me know.

Personally I often go to Amazon to find things, google the author and check on the HP on how to buy the book with the least amount of "tax" for the author. Added benefit: you get formats outside of walled gardens!

Dubious about the value of these conceits, it may be imperfect, though autobiographies are not popular.
Post reply on HN