News for hackers. Stuff that matters.
Re:Pocketlang by __ryan__ on Tuesday June 22, 2021 @07:26AM (#27590310)
> 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.

Re:Pocketlang by sicromoft on Tuesday June 22, 2021 @12:14PM (#27593538)
> 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.

Re:Pocketlang by blauditore on Tuesday June 22, 2021 @12:43PM (#27593967)
So, 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?

Re:Pocketlang by rmetzler on Wednesday June 23, 2021 @01:59AM (#27601248)
Oh, thanks for clarifying. I had trouble to understand both sentences before.
Re:Pocketlang by beefjerkins on Tuesday June 22, 2021 @10:53PM (#27600266)
Yep
Re:Pocketlang by __ryan__ on Tuesday June 22, 2021 @07:14PM (#27598543)
Ah yes, the double negative was unintentional.

I shouldn’t be allowed on HN until I’ve had my morning coffee.

Re:Pocketlang by veganjay on Tuesday June 22, 2021 @07:30AM (#27590352)
I 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).
Re:Pocketlang by EllieEffingMae on Tuesday June 22, 2021 @11:43AM (#27593126)
As 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
Re:Pocketlang by leephillips on Tuesday June 22, 2021 @08:18AM (#27590723)
Do you usually read the second paragraph first?
Re:Pocketlang by dang on Tuesday June 22, 2021 @05:32PM (#27597498)
Please don't be a jerk in HN comments.

https://news.ycombinator.com/newsguidelines.html