Live data from Hacker News

Pocketlang

github.com

41–50 of 63 posts

Re: Pocketlang

#41
post #32

Earlier quoted context omitted.

If you don't mind, what is it about the syntax of Dhall that you find hard? In my experience, Haskell's syntax is much simpler than the syntax of any of the popular languages. The "hard" parts of Haskell come with all the abstractions people make (esp. how it encodes side effects), the laziness, and the language extensions. Dhall has none of those.

It seems to be a very polarizing topic. People who like Haskell's syntax find it very readable, others don't. In my estimation, there are a lot more in the "others" category than in the Haskell category. Whether my target audience has trouble with Haskell syntax because of some inherent property of the syntax or merely because their background isn't in Haskell doesn't ultimately matter--the requirement is that my use…

> it's ultimately subjective... and I don't have the energy this morning.

Fair enough, but I've never seen anyone make either of the talking points that you claim are common, and they would be very silly things to say.

Re: Pocketlang

#42
post #41

Earlier quoted context omitted.

It seems to be a very polarizing topic. People who like Haskell's syntax find it very readable, others don't. In my estimation, there are a lot more in the "others" category than in the Haskell category. Whether my target audience has trouble with Haskell syntax because of some inherent property of the syntax or merely because their background isn't in Haskell doesn't ultimately matter--the requirement is that my use…

> it's ultimately subjective... and I don't have the energy this morning. Fair enough, but I've never seen anyone make either of the talking points that you claim are common, and they would be very silly things to say.

Did you just ask for someones opinions on the syntax just so you could call them silly?

Re: Pocketlang

#43
post #41

Earlier quoted context omitted.

> it's ultimately subjective... and I don't have the energy this morning. Fair enough, but I've never seen anyone make either of the talking points that you claim are common, and they would be very silly things to say.

Did you just ask for someones opinions on the syntax just so you could call them silly?

I think you misread, but maybe I should've worded it more clearly: the silly people are those hypothetical people who say that "syntax doesn't matter" and "fewer characters means better syntax".

Re: Pocketlang

#44
post #41

Earlier quoted context omitted.

It seems to be a very polarizing topic. People who like Haskell's syntax find it very readable, others don't. In my estimation, there are a lot more in the "others" category than in the Haskell category. Whether my target audience has trouble with Haskell syntax because of some inherent property of the syntax or merely because their background isn't in Haskell doesn't ultimately matter--the requirement is that my use…

> it's ultimately subjective... and I don't have the energy this morning. Fair enough, but I've never seen anyone make either of the talking points that you claim are common, and they would be very silly things to say.

> I've never seen anyone make either of the talking points that you claim are common

Count yourself lucky

> they would be very silly things to say

I tend to agree

Re: Pocketlang

#45
post #11

Earlier quoted context omitted.

I guess the fiber/coroutine support would be a better solution to this problem? If this works like I think it should work, the code can decide itself when it is a good time to yield control back to the environment instead of freezing execution in a random location until the next frame. For instance when evaluating NPC AIs it may be important that an NPC isn't left dangling in a random state at the end of a frame, but…

Code cannot decide when to yield because it doesn't know how many NPCs I am running in one frame. Maybe I need 10, maybe 2 longer and 8 just quickly for long running/low complexity jobs. If the limit is reached in the middle of "if" statement, e.g. if x If "x" and "sin(5)" was evaluated but not "cos(20)" then it should just remember VM state and continue next time. I did this in JS and it worked great for distributin…

Since it’s a small language that already supports yielding for I/O, it shouldn’t be too hard to automatically insert an instruction into all loops to check if they need to pause. You could write it manually to prototype.

(Or at least I assume it works that way based on studying Wren.)

Re: Pocketlang

#46

> 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.

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

#47
post #17

Off topic: for those thinking it was a programming language optimized for a phone (like I did) the only one I’ve seen come close to being usable is J (APL derivative). I’ve been able to solve quite a few advent of code challenges this way: 1. App https://apps.apple.com/de/app/j701/id1255235993?l=en (there’s an android version I believe) 2. Copy input from page 3. `+/ ".jgetcb''` to get sum

I've just barely begun learning about the APL languages, but I have this tab open that you might be interested in: https://wjmn.github.io/posts/j-can-look-like-apl/

Re: Pocketlang

#48

> 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.

> 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

#49

> 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.

> 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.

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?

Post reply on HN