Hacker News new | ask | show | jobs
by iLemming 9 days ago
It's platform-dependent isn't it? Otherwise, the practical differences between Lisp dialects are negligible. For me writing either in Janet or Fennel or Clojure feels almost like writing in the same language.

Babashka has replaced bash-scripting for me. I don't hate Bash, but why would I ever choose to use a language that has no true REPL, if I don't have to? bb is pretty much Clojure, which is the greatest choice if you're dealing with data - any data. Clojure is incredibly data-driven, which wins me over Janet. I also reach out to nbb whenever I need to deal with Node. e.g. scraping scripts driven by Playwright.

Janet is great when you need tiny runtime or you're dealing with subprocess-heavy scripts - Janet feels closer to actual shell syntax; or when you have to embed it to C/C++ program.

Fennel is indispensable for any Lua - mpv, Hammerspoon, AwesomeWM and Neovim configs, etc.

2 comments

> Clojure is incredibly data-driven, which wins me over Janet.

I'm curious what differences you see? I've been all in on Janet, but barely used Clojure. What more data driven aspects does Clojure have .... offer? My mental model/assumption's always been that Janet's Clojure without JVM and (sadly) not so pure. I don't use any of Janet's C interop facilities. I'd love to know what I'm missing

> I'd love to know what I'm missing

afaik, Janet's immutable structs/tuples are flat copies - no structural sharing. Clojure uses HAMTs. So it's truly immutable by default - you'd transform data without intermediate allocations.

In Clojure, the standard library already knows about your data - it has the tools to group, index, validate, serialize, and transform maps/vectors/sets without you reinventing them. In Janet, you have the building blocks but it feels like you're assembling the furniture yourself.

The trade-off is that babashka adds ~200ms to cold start and can be pretty memory hungry, but god, Clojure is so nice to deal with data. For small scripts it may not matter. For processing log files or CSVs with millions of rows, it does.

this is good to know :) my use for janet hasn't involved much processing of external data but i'll keep bb in mind when the use case arises. thank you for the information!
True. But for things that they all can do, normal scripting (replacing bash/powershell, etc.), creating CLI and TUI apps, I would like to do a comparison of them. 1. which one is more pleasant to write 2. which one has the better echo system and tooling 3. performance benchmarks 4. portability
Clojure hands down far more pleasant to write. Also, the announcement of this project aligned perfectly - happened just two days apart this thread.

https://github.com/jolt-lang/jolt

The author is a well-known clojurista - published books, etc.