3 ms·
This 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 al
by jlarocco 5y ago
This 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"
- eatonphil 5y agoFixed the link, thanks! The point to me about blog posts like this are as a guide for others trying to do _anything_ with the same language. The docs on how to use the Java FFI were pretty hard to read. I figured it out by grepping through the ABCL source code for a while and finding a single other project that also brought in 3rd-party deps. On whether or not you should actually use Netty/some Java server rather than Caveman I have no opinion.