Live data from Hacker News

Janet: a lightweight, expressive and modern Lisp

janet-lang.org

131–140 of 280 posts

Re: Janet: a lightweight, expressive and modern Lisp

#131
post #99

This looks so awesome! It's got the best parts of a lot of languages. This is what sticks out to me: - Really simple lisp like scheme, but reminds me of lua (and not bloated like CL) - Has resumable fibers, no callcc like scheme - Not missing the lack of lists tbh - A module system that doesn't feel awkward like CL - A built-in package manager (unlike CL) - Good lua and C support - Threads have a shared-nothing appro…

Why was this downvoted? I don't get it :/

Re: Janet: a lightweight, expressive and modern Lisp

#132
post #23

Okay, so when Clojure came along, it came with a strong underlying philosophy of what the language was supposed to be/do. Among them were design decisions such as, e.g.,: - VMs, not OSes, are the platforms of the future, so target the JVM - Object Orientation is overrated, but polymorphism is a good thing - Multi-core is here to stay, so use immutable data structures to greatly facilitate writing correct concurrent p…

‘Starts up faster than Clojure’ and ‘doesn't need the setup+compilation voodoo of ClojureScript’ are pretty good value propositions for lightweight runtimes.

Re: Janet: a lightweight, expressive and modern Lisp

#133
post #48

Earlier quoted context omitted.

so what's better and out there and reasonable stable?

Probably BeamVM, giving you better options for scaling, abstracting away machine borders and lightweight processes.

BeamVM is much worse than the JVM in the raw computing performances department.

Re: Janet: a lightweight, expressive and modern Lisp

#134
post #111

Earlier quoted context omitted.

That assumes it is a tradeoff. Maybe you can have both. I see nothing obviously preventing having power, expressiveness, and reach, and ease of use

I agree that it doesn't have to be a trade-off, but that mindset might explain why there is less focus on creating one-click installers. An example would be Clojure's newish approach to managing projects via the CLI and deps.edn. It's very powerful, and expressive, but definitely not a one-click approach.

Clojure is an inspirational language that has some insightful opinions about how things should be done. A month spent learning Clojure is a great investment. A lifetime programming in Clojure would be a joy.

But as I recall the original Rich Hickey talks on "Why Clojure?" he was explicit that dependency/project management were very hard problems that Clojure didn't really attempt to solve.

I'm not aware of any Clojure tools that are best-of-breed for project management. Java has a better model for locking everything down (or maybe how the Linux Distros manage their repositories) and Python has a better model for just keeping up with the current state of things. I'm not aware of any half-and-half model that gives satisfying results.

Clojure is inferior to Java in that aspect because the number of things to keep track of roughly doubles (for every concept there seems to be a Clojure version and a Java version) and library management is bizarre and warty - see also the horrible import/require/use/some other one I can't even remember mess. And then there is unpicking the syntax differences between using things in the (ns) macro vs calling direct. I dunno; maybe something changed but that part of the experience is a mess. Unusually poorly done in Clojure too, everything else was so lovely.

I never got on top of it and I tried for months; as evidenced I can't even remember how to load a library after putting it down for a little while. Even assuming the classpath is correctly set. What would have to happen for a C programmer to forget #include "name.h" ?

Re: Janet: a lightweight, expressive and modern Lisp

#136
post #23

Okay, so when Clojure came along, it came with a strong underlying philosophy of what the language was supposed to be/do. Among them were design decisions such as, e.g.,: - VMs, not OSes, are the platforms of the future, so target the JVM - Object Orientation is overrated, but polymorphism is a good thing - Multi-core is here to stay, so use immutable data structures to greatly facilitate writing correct concurrent p…

Janet's purported focus is that it's easy to embed in a larger C program. I haven't really seen that in practice, but I have used the C api to write some language extensions, and it is a joy. In comparison with Clojure, I much prefer using either C or janet to using Java and lisp side by side; with Clojure running on multiple hosts now the differences in language semantics between clj and cljs are just annoying.

As far as language features, I miss a lot from clojure: immutable/persistent data structures, protocols, not to mention concurrency primitives. But Janet's approach to performance and design is "do less". With the C api you can easily add bindings to some C library that provides a desired feature. But even without that stuff, Janet is for me a python-killer, if not a clojure killer.

Edit: at any rate, I think it's not meant to be a competitor to Clojure, its similar syntax just often invites the comparison. It's much more fair to compare it to Lua.

Re: Janet: a lightweight, expressive and modern Lisp

#137
I like it, and I am considering using it as a scripting language.

It was clear and easy how to build it for my Windows 10 box, and it is relatively small.

I have always like the small Lisps like PicoLisp, but PicoLisp is not Windows friendly; it's very POSIX-dependent. I haven't had great experiences with Cygwin. PicoLisp works on WSL/WSL2 though.

Re: Janet: a lightweight, expressive and modern Lisp

#138
post #23

Okay, so when Clojure came along, it came with a strong underlying philosophy of what the language was supposed to be/do. Among them were design decisions such as, e.g.,: - VMs, not OSes, are the platforms of the future, so target the JVM - Object Orientation is overrated, but polymorphism is a good thing - Multi-core is here to stay, so use immutable data structures to greatly facilitate writing correct concurrent p…

On the VM front, I love the JVM, but a vast majority of languages gaining popularity are generating static binaries. GraalVM may help close the gap here. OO is overrated but most apps have some state and I found the entity-component systems solid but not still unwieldy. Clojure has really great concurrency primitives; all the semantics I could want built right in. Except my concurrency often occurs in the persistence…

> Clojure's startup time is pretty brutal for a lot of things I'd like to use it for, and no amount of REPL-driven development can make Clojure appropriate for CLI tools.

If you got the repl-driven development down, you wouldn't test your CLI by launching it, you would just evaluate the same functions as the CLI uses. Only time when you'd want to launch the CLI would be before releasing a build or for E2E tests. Once you got the code down for your repl and the startup time becomes a hassle, you compile down your Clojure program to a binary with GraalVM and now it starts up fast.

Otherwise, give babashka a try. Basically single-binary Clojure environment. https://github.com/borkdude/babashka

Re: Janet: a lightweight, expressive and modern Lisp

#139
post #23

Okay, so when Clojure came along, it came with a strong underlying philosophy of what the language was supposed to be/do. Among them were design decisions such as, e.g.,: - VMs, not OSes, are the platforms of the future, so target the JVM - Object Orientation is overrated, but polymorphism is a good thing - Multi-core is here to stay, so use immutable data structures to greatly facilitate writing correct concurrent p…

On the VM front, I love the JVM, but a vast majority of languages gaining popularity are generating static binaries. GraalVM may help close the gap here. OO is overrated but most apps have some state and I found the entity-component systems solid but not still unwieldy. Clojure has really great concurrency primitives; all the semantics I could want built right in. Except my concurrency often occurs in the persistence…

Maybe check out https://github.com/borkdude/babashka if you have bash script esque workloads

Re: Janet: a lightweight, expressive and modern Lisp

#140
post #137

I like it, and I am considering using it as a scripting language. It was clear and easy how to build it for my Windows 10 box, and it is relatively small. I have always like the small Lisps like PicoLisp, but PicoLisp is not Windows friendly; it's very POSIX-dependent. I haven't had great experiences with Cygwin. PicoLisp works on WSL/WSL2 though.

Did you find the transition to be relatively easy on you? I am considering building a few W10 Box with it.
Post reply on HN