13 ms·
Practical? Common Lisp on the JVM: A quick intro to ABCL for modern web apps
- alexott 5y agoWhy not just use Clojure? It has good frameworks for web programming, you can even use it for browser apps, etc. There are of course differences, but from my point of view the code will be less ugly. P.S. I programmed in CL, and in Scheme (even commercial software), but for JVM-based stuff, Clojure is my language of choice
- eatonphil 5y agoI have nothing against it but I'm not sure it needs any additional press. :) My goal wasn't "use the JVM at all cost", more so "show these languages we know but benefiting from a mature ecosystem".
- cutler 5y agoSeconded, if you're going to use the JVM, that is. Lisp on the JVM is a solved problem.
- michaelsbradley 5y agoABCL became available in 2005[+], about two years before the appearance of Clojure, and both continue to be developed/maintained to the present. [+] https://abcl.org/svn/tags/0.00.10/j/README https://abcl.org/svn/tags/0.00.10/j/README
- alexott 5y agoI have used it, also as Kawa. from my point of view, the Clojure interface to JVM is more "natural". Plus the concurrency support, etc.
- creamytaco 5y agoLots of folks don't see Clojure as a Lisp.
- amanaplanacanal 5y agoHow do they define a lisp that clojure doesn't qualify?
- fidesomnes 5y agoA pure lisp binary.
- creamytaco 5y agoA Lisp runs Lisp code, code that could have been written anywhere from 50 years ago to today. The extent and degree of modifications required before that code runs, illustrates how far away one is from Lisp. All Lisps (incl Scheme, Common Lisp, Emacs Lisp) sit fairly close together in this historical "Lisp" space. I can get Lisp code from the CMU AI repository and run it as is or with slight modifications in any of the aforementioned Lisps, but Clojure would require a complete rewrite, both syntax and logic/semantics. Ergo, I and lots of others don't see Clojure as a Lisp. I'd call it Lisp-inspired or a descendant of Lisp, but it's clear that it is a different language.
- Zababa 5y agoPeople still use Scheme and Common Lisp. That, to me, is a sign that details matters for people who use Lisp, and thus Clojure might not be what they like.
- deleted 5y ago[deleted]
- jlarocco 5y agoThis is interesting from a "look what we can do!" perspective, but practically speaking, there's not a good reason for doing it this way. It would be better all around to use one of the "native" Common Lisp libraries, such as Caveman: http://8arrow.org/caveman/ http://8arrow.org/caveman/ Even as a big Common Lisp fan, I would really question using it in a situation where the project has strict requirements to use a particular framework for another language.
- eatonphil 5y agoJVM and CLR has the long tail of libraries that just doesn't exist for smaller languages. What happens when you want to integrate with Parquet files or some common but sort-of-obscure proprietary system like ClickHouse? I've done a bunch of FFI integrations with C libraries and I never enjoy it. You always have to make sure you're handling object lifetimes correctly and you just don't have that issue if you're able to use Java or CLR as your FFI target. For small apps where you know you'll never have to leave the native ecosystem it can be fine to stay outside of JVM/CLR. But for business apps I think there's a lot of security to be had by being able to integrate with JVM/CLR. Edit: I'm not saying it's a good idea to choose ABCL, I hope this article made that clear. SBCL is much more mature in most dimensions.
- emmanueloga_ 5y agoI feel like the "boring" part of the web app (setup, configuration, routing, etc.) could benefit from using a more strictly typed language like kotlin, and https://jooby.io/ https://jooby.io/ explicitely supports it. Once you have the skeleton, I can see how lisp and ABCL could be used to implement some interesting business logic or even template rendering. So kind of like using lisp a callable scripting language as opposed to doing everything in lisp that is a bit more tedious imho.
- jlarocco 5y agoOn further thought, what I meant to say was that in this specific example, I don't think it makes sense to use these particular libraries from Common Lisp because there are native CL libraries for doing basically the same thing. On the other hand, I completely agree that it's useful to run a CL application on ABCL to access Java libraries that don't exist for CL. EDIT: On a side note, I just noticed the abcl.org link immediately under "Picking a language, libraries" is pointing to "https://notes.eatonphil.com/abcl.org https://notes.eatonphil.com/abcl.org"
- freemint 5y agoI find the construct using template files inelegant compared how to the PicoLisp system does it. Since the AST is already in memory and an interpreter running on it has access to in memory variables why not use that? You can in addition abstract over certain patterns and put them into functions. Reference: https://software-lab.de/doc/app.html https://software-lab.de/doc/app.html