3 ms·
For all the people asking "Why not Crystal?". It seems to me like the creator obtained a copy of the Go Interpreter book(https://interpreterbook.com/ https://in
by chank 9y ago
For all the people asking "Why not Crystal?". It seems to me like the creator obtained a copy of the Go Interpreter book(https://interpreterbook.com/ https://interpreterbook.com/). Seems like a fair bit of the code is reused here. Nothing wrong with that at all (if true). After all its all under MIT License. Seems like a pet project more than something the author expected to gain any attention (kind of like Linux started out). Seems to me more like a ruby-like-coffeescript equivalent for Go.
- st0012 9y agoHaha, I did read that book before start this project, it's a very useful material. But for now the project are far more complicated than the sample project in that book, only lexer and parser remain similar. BTW I also took "nand2tetris II" on coursera and read "Ruby under a microscope" for this project.
- mayoms 9y agoI think that you should be a bit more transparent about how much of Thorston's ideas and code you are using in this project. You should probably give him some attribution. I also read that book, and have a toy language I've been building, basically extending his ideas. I've looked through your code and much of is it nearly verbatim from the book (including code in your 'vm', or the monkey 'eval' package - it's not just the lexer/parser), though you (as I have), chose different names, or organized things differently, and added new features. Yes, you've extended his ideas much farther, but the core of 'rooby' is pretty much the same as Thorston's language, 'monkey'. Monkey is available with the MIT license, so it's fine what you've done. But, having been through the book and pretty familiar with the Monkey code (available for download here: https://interpreterbook.com/waiig_code_1.3.zip https://interpreterbook.com/waiig_code_1.3.zip), I think it's disingenuous to say 'I read that book before this project..', which seems to imply that it was inspiration, rather than original source material. On a positive note, it's a pretty cool version of Monkey.
- st0012 9y agoThe 'code' you read is similar, but the way they work are totally different. Monkey is fundamentally a functional language, but rooby is totally an object oriented language. And the compiler, vm's internal implementation and bytecode spec, which are the 'core' of rooby, is not like monkey at all. I would say I extended monkey's lexer and parser as rooby's. I feel sorry if I didn't give enough credit to Thorston, I would add reference to his book in readme. But the core is more a Ruby than monkey, so I don't think it's just an "extension" of monkey. Please read the commits and you'll know how much work I did to make rooby, it's far more complicated than just "extend" monkey.
- st0012 9y agoBTW here's the monkey source code I wrote when I practiced with the book https://github.com/st0012/monkey https://github.com/st0012/monkey