6 ms·
I can also recommend clojure. For me it has the best parts of common lisp and the best of the java ecosystem. But its also quite different from common lisp and
by AyanamiKaine 2mo ago
I can also recommend clojure. For me it has the best parts of common lisp and the best of the java ecosystem. But its also quite different from common lisp and scheme. Different enough to find some unique ideas.
Writing scripts using [0] Babashka is also really nice.
[0] https://babashka.org/ https://babashka.org/
- nobleach 2mo agoI particpated in a Clojure reading group for "Getting Clojure" back around 2017. Having the entire JVM ecosystem available, is absolutely a great benefit. I even fooled around with ClojureScript a bit. David Nolen is great at making the case for both.
- jlarocco 2mo agoOn a related note, there's a cross-platform Common Lisp package, "Bike" https://github.com/Lovesan/bike https://github.com/Lovesan/bike, that lets you use .Net assemblies from Common Lisp. I've used it a tiny bit at work (on Windows) and at home (on Linux), and ran into one issue with "out" parameters, but otherwise it works really well.
- nobleach 2mo agoThat's just crazy! (in a good way) I've been in software since 1998 and it's like I've just uncovered a whole new world.
- vindarel 2mo agoWhat about this one? https://github.com/dotcl/dotcl https://github.com/dotcl/dotcl > Common Lisp implementation on .NET. Lisp source is compiled to CIL (Common Intermediate Language) and runs on the .NET JIT — so the same Lisp image runs on Windows, macOS, and Linux across x86-64 and ARM64 without per-platform porting work.
- jlarocco 2mo agoThanks! I don't think I've seen that one.
- arikrahman 2mo agoNow there's Jank too, the first time a Lisp dialect has reached into native world since Clasp. The way it interops Clojure with the LLVM is unprecedented.
- Jtsummers 2mo ago> the first time a Lisp dialect has reached into native world since Clasp. What's that supposed to mean? Many (probably most if we only consider the non-toy ones) lisp implementations are "native" (compiling to native machine code, not interpreted).
- erichocean 2mo agoYou can directly call C++ as C++, not via a C ABI.
- Jtsummers 2mo ago> You can directly call C++ as C++, not via a C ABI. That's a unique definition of "native". It suggests that C is not a native language, which is going to be a hard thing to convince others of.
- didibus 2mo agoYa, I think that was a bit misspoken. They mostly meant direct C and C++ interop. It feels much less like a traditional FFI and more like using C and C++ libraries from C++ itself.
- erichocean 2mo agoI mean if you're going to be that pedantic, then Clojure is "native" since all Clojure functions "compile to machine code" via the JVM's JIT.
- deleted 2mo ago[deleted]
- waffletower 2mo agoBabashka is really nice indeed. Am hopeful for the C++ hosted Clojure dialect, Jank (https://jank-lang.org https://jank-lang.org)
- snorremd 2mo agoAs a former Clojure dev (now just using Clojure in my spare time) I love Babashka. Michiel Borkent really nailed it with sci (Small Clojure Interpreter) and Babashka. Running a custom Clojure interpreter in a GraalVM compiled Clojure app is quite clever. Now there are of course limitations to what you can do in terms of not supporting Java reflection or the full Clojure compiler. But I've made some nifty small scripts and convenience helpers with it. And the dev experience of making these scripts is so much nicer than trying to write bash scripts. The Clojure edn syntax is super simple, and the REPL connected editor let me rapidly test parts of the code just like with full Clojure apps. I don't have experience with other lisps, but I can vouch for Clojure being very nice. The community was welcoming and friendly to newcomers when I started learning, I hope it still is. One thing I love about the Clojure ecosystem and community is the effort taken to never break libraries. I've looked at libraries I used some ten years ago, and the API is still compatible with code I wrote back then. There is very little churn. Maybe this is because the language is largely untyped and editors only partially check "types". Having breakages in libraries you consume once every couple of months would get really tiring in Clojure land. I'd imagine the same problems would present themselves in Common Lisp and others.
- pjmlp 2mo agoI love the Clojure community, it is the only one that usually talks about the host platform in a symbiotic way, not as if they would be rewriting everything into their favourite language, like in most guest languages communities.
- zem 2mo agopeople don't usually think of C as a host platform, but the python community has a similarly symbiotic relationship with C extensions.
- erichocean 2mo agoSince Java 25/Project Panama, I have that kind of relationship with C from Clojure as well. Codex can one shot the bindings flawlessly, and the interface is significantly faster for downcalls vs. JNI.