by __ryan__ · 5y ago · 0 comments
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.
I had to read that a few times to understand what I think is an unintentional double negative on your part.
The author used Wren as an example/reference on how to build a programming language, but built something unrelated to it.
Correct?
I shouldn’t be allowed on HN until I’ve had my morning coffee.
> 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).