15 ms·
> The language is written using Wren Language and their wonderful book Crafting Interpreters as a reference. I had to read this a few times to understand that
by __ryan__ 5y ago
> The language is written using Wren Language and their wonderful book Crafting Interpreters as a reference.
I had to read this a few times to understand that this isn’t saying that Pocketlang is not written in Wren. I was looking for Wren code in the repo and I was slightly confused.
Very cool project though! I always love to see projects inspired by Crafting Interpreters.
- veganjay 5y agoI was about to post similar because in the git repo it also states: > Pocketlang is a small (~3000 semicolons) and fast functional language written in C From what I can tell from the comments, pocketlang re-uses and/or re-implements some functionality from the wren language source code: $ grep wren src/*.h src/*.c src/pk_compiler.c: /* String interpolation (reference wren-lang) src/pk_utils.h:// Source : https://github.com/wren-lang/wren/blob/main/src/vm/wren_utils.h#L119 src/pk_utils.h:// Copied from wren-lang. src/pk_var.h: * wren (https://wren.io/) an awesome language written by Bob Nystrom the src/pk_var.h: * https://github.com/wren-lang/wren/blob/main/src/vm/wren_value.h src/pk_var.h:// usage and it has 2 formated characters (just like wren does).
- leephillips 5y agoDo you usually read the second paragraph first?
- dang 5y agoPlease don't be a jerk in HN comments. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- EllieEffingMae 5y agoAs do I! Crafting interpreters is definitely one of the coolest programming books I've ever read. I used it as a blueprint for busing more than one parser in my time :D
- sicromoft 5y ago> I had to read this a few times to understand that this isn’t saying that Pocketlang is not written in Wren I had to read that a few times to understand what I think is an unintentional double negative on your part.
- blauditore 5y agoSo, to decrypt this: The author used Wren as an example/reference on how to build a programming language, but built something unrelated to it. Correct?
- beefjerkins 5y agoYep
- rmetzler 5y agoOh, thanks for clarifying. I had trouble to understand both sentences before.
- __ryan__ 5y agoAh yes, the double negative was unintentional. I shouldn’t be allowed on HN until I’ve had my morning coffee.