Remix.run Logo
zelphirkalt 6 days ago

When I see languages like this, I always wonder, how far the ecosystem is. I have used GNU Guile a lot and there are quite a few libraries for it, so that one can do almost anything. Web things are coming, but maybe not as fully there yet, as one might like. Racket also has lots of libraries. And even a standard library web framework.

So lets say I want to start my next web project in Janet. I already know Scheme and can probably quite easily just start writing another lisp, assuming it has TCO and I can do things mostly like I would in Scheme, except maybe for having to use funcall (which is annoying, but OK). Does Janet have libraries, that enable web projects? Like a web server and SXML or something like that? Or does it have things like a JSON parser? All these little things one would like to have, to not have to develop the basics first, before getting to the actual project.

And what about data structures? Are there functional data structures available? In GNU Guile I have at least the unmaintained guile-pfds. Hopefully, I will one day understand enough about functional data structures to build more or to maybe even maintain that library. But learning resources are scarce. It is already difficult to find a functional version of an AVL tree! Lots and lots of places merely teach non-persistent, non-functional versions of these data structures, and it is not trivial to translate them, might impact performance in ways that are not necessary, if one had great knowledge about how to make these data structures.

And also reproducibility! With GNU Guile I have what I need on Guix, which is great! With other languages, I might need to rely on older package managing approaches, that do not have reproducibility/determinism as the a high goal on their agenda, or might even lack the ability to create lock files/files with checksums. I don't want to go back to non-reproducible.

I am also eyeing statically typed variants like Carp. Same questions arise. Some seem really great and I would probably enjoy using them a lot. Would be a pity to then discover, that the ecosystem is just not there, and one has to create all the basic tools one needs oneself. Sometimes that can be fun, but it can also be exhausting and one never gets around to ones actual project.

veqq 6 days ago | parent | next [-]

Janet has ~10 web frameworks (half SSG, half dynamic) and many web servers. Joy [0] is the most fully featured stack approach, which Janetdocs [1] runs on. But everything you mention is in the std lib. Here's a certbot in 10 lines only using the extended std lib (called spork): https://codeberg.org/veqq/janetdocs/src/branch/master/ssl-fe... `json/decode` automatically maps json to native data structures. There's a package manager included, which builds all code I've found so far, reproducibly.

As for DS, only arrays, there are maps, arrays and strings, all mutable or immutable. I don't think there's any intention to ever implement functional data structures, but they could "easily" be a library.

- [0] https://github.com/joy-framework/joy - [1] http://janetdocs.org/

zelphirkalt 5 days ago | parent | next [-]

I see that there is a package manager "jpm" and I looked at the docs, but I couldn't see anything relating to how to create a lock file or how it makes sure, that every time I install dependencies, I get the exact same versions (not just version numbers).

przmk 6 days ago | parent | prev [-]

Are any of them maintained? I see that the last commit for Joy was 2 years ago.

veqq 5 days ago | parent | next [-]

Maintenance isn't a breaking issue, at the moment. No one's stepped up to fork them and accept PRs, because they work as is. I'm personally working on this, though and expect a lot of progress in the next months - but this won't impact day to day coding, because they work already.

veqq 2 days ago | parent | prev [-]

Just got a PR in Joy today!

przmk a day ago | parent [-]

Good to know! Sorry, didn't mean to be overly negative with my comment. Maybe our obsession with never-ending projects that need to be constantly updated is wrong.

veqq 5 days ago | parent | prev [-]

Here's a implementation of some persistent DS: https://github.com/ianthehenry/jimmy It's incomplete, primarily serving as a c++ interop example, though.

zelphirkalt 5 days ago | parent [-]

That looks cool. I scrolled through the readme though and it only lists vectors, maps, and sets. That's not actually that much, but it is quite foundational. Maybe one could build others on top of that. But then the question arises, whether that implementation is performant.