top | item 39188787

(no title)

hickelpickle | 2 years ago

I've had a really pleasant experience with Kawa scheme recently, which is a scheme that runs on the JVM, compiles to bytecode and provides easy interop with Java. I needed a scripting language for a project, and it ended up developing into me implementing a repl like admin console that allows me to administer events and query data/state (project is a game back-end so everything was already event-based with thread-safe dispatching and an entity system accessed via a singleton).

Being able to inter-opt with java is great, as I can wrap scheme procedures in functional interfaces and use them as drop in replacements for java functions, as my event system was already based on predicates and consumers for event handling.

I've worked through some of the SICP and have always wanted to get more into scheme/lisp, but the barrier of starting a full project in it always kept me from getting much hands on experience. Its been quite enlightening actually getting to work with a form of REPL driven development and getting my hands dirty with coding some scheme, having access to the JVM means I can do practically anything with it, with out needing to bootstrap tons of code, and using it in a project with a large scope lets me solve real-world problems with it vs just toying around which has been what most of my scheme/lisp experience was before.

discuss

order

SeanLuke|2 years ago

To me, Kawa is easily the best Lisp that targets the JVM. And I say that hating Scheme. I'm a Common Lisp guy. Because it is really fast, well designed, and mostly Scheme compliant (no call/cc of course). And it has first in class interoperability with Java and the JVM.

After Kawa, I'd pick ABCL. It's not as fast as Kawa and its interoperability isn't nearly as good, but it is effectively a 100% standards-compliant Common Lisp: what more could you ask for?

Only last would I pick Clojure. It's designed to feel "sort of immutable" but this is impossible if you want any degree of interoperability with the JVM. As a result, you wind up with lots of Refs and other fun stuff which in my experience make Clojure much slower than Kawa and ABCL. It's always slower by quite a lot, but in fact I've had a few extreme situations where Clojure would wind up being __literally__ three orders of magnitude slower.