riggsdk 1 day ago

The title made me believe it was just another AI assistant (thinking Janet from "The Good Place" - but for us non-dead people instead. Was pleasantly surprised to see it is a programming language and that the title was just a clever joke on that:

  The Janet language is named after an immortal being in The Good Place who helps mortals navigate the afterlife, hence the title.
It kinda surprised me that they ship the language with a PEG (parsing expression grammer) instead of a basic Regex engine. This has been my wish for any programming language that ships a Regex library by default to also include a capable PEG.

3
tmtvl 23 hours ago

GNU Guile also has a PEG library in its standard library (see <https://www.gnu.org/software/guile/manual/html_node/PEG-Pars...>).

petee 22 hours ago

Janet's 'spork' module is kinda like their libc, and has a regex submodule; it's very likely to be installed.

Janet is my first exposure to PEGs, so nothing to compare against but I love how powerful and easy they are. I have a better grasp of them in only a few months than dabbling over 20yrs with regex.

Also there is quite a bit of The Good Place callbacks within the Janet community; numerous 3rd party modules are named after characters, for example.

philsnow 17 hours ago

I had also not seen PEGs before, but the way you can use parsing node identifiers recursively (and mutually recursively) seems very intuitive.

tessierashpool 20 hours ago

Elm does something similr. Neither elm/regex nor elm/parser are built-in, but elm/regex encourages you to use elm/parser instead.

btw, I like the namesake, but a language named Janet is pretty much obligated to also prioritize control.