Janet, the Platonic Ideal of Scripting Languages

2 years ago by linja to c/thegoodplace

Janet is a functional and imperative programming language. It runs on Windows, Linux, macOS, FreeBSD and *nix.

Not my project. Just a thing that happens to be small and elegant and maximally "correct", in its particular design direction. Community is small, creator is level-headed. Somehow, it does feel like exactly the language a Janet's firmware would be written in. It brings me joy that such a thing exists.

christophski 4 points 2 years ago

That example hurts my eyes. Basically every line is wrapped in parentheses.

path: 0 10512717, hotness: undefined, score: 4, children: 5
linja 7 points 2 years ago

First encounter with a Lisp, I see.

Lisps aren't like Algols, where delimiters are visual cues for structure; what you're meant to do is ignore them, and focus on indentation instead. The advantage of having them at all instead of doing Python's thing is it's obvious how the parse tree will turn out, which gives macros the power to not suck. Additionally, Parinfer.

path: 0 10512717 10512943, hotness: undefined, score: 7, children: 4
themoonisacheese 6 points 2 years ago

A language where I have to type tokens then ignore them isn't exactly the platonic ideal of a scripting language eh?

path: 0 10512717 10512943 10513620, hotness: undefined, score: 6, children: 3
linja 2 points 2 years ago

How is that different from the spaces/tabs you type at the beginning of a line though?

path: 0 10512717 10512943 10513620 10513700, hotness: undefined, score: 2, children: 2
themoonisacheese 3 points 2 years ago

Well, it isn't worse, and at least it's whitespace I don't have to look at. Lisps also have to be indented, otherwise the code you write is unreadable, so that's not really a great argument.

path: 0 10512717 10512943 10513620 10513700 10517618, hotness: undefined, score: 3, children: 1
something_random_tho 2 points 2 years ago

This is a great looking language! Their web examples were really easy to follow.

path: 0 10516213, hotness: undefined, score: 2, children: 0
thegoodplace
thegoodplace

@lemmy.world

login for more options
322
16
1

A refugee community for r/TheGoodPlace

Rules are generally the same as on the sub, except you don’t have to worry about flairs or spoiler flags since it doesn’t look like Lemmy supports that on posts.

There is a comment spoiler tag, though—it looks like an exclamation point with a triangle around it—so you can use that to hide major spoilers if you like. Use your discretion. Spoiler tagging isn’t required, but it is a nice thing to do.

Beyond that, just make sure your posts are about The Good Place and that you try to be good to each other. It’s better than not trying.

go to feed...