10 ms·
ABCL – Common Lisp on the JVM
- kick 7y agoThe title of this post should be changed to "Armed Bear Common Lisp - Common Lisp on the JVM." It's an iconic name, and then people would actually know what the post title was referring to.
- nothrabannosir 7y agoIt’s pedantic, but I do agree. Ahh, HN - never change. Sorry I mean, Hacker News - never change. :)
- dang 7y agoIs it so iconic? I've always referred to it as ABCL. Seems like we've had about 60 posts as Armed Bear: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=%22armed%20bear%20common%20lisp%22&sort=byDate&type=comment https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que... and 200 as ABCL: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=abcl&sort=byDate&type=comment https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
- kick 7y agoI believed so, but I guess that the numbers don't lie.
- twic 7y agoI guessed it was Aluminium Bank Common Lisp, some kind of lightweight version of Steel Bank Common Lisp.
- tempodox 7y agoThat's actually a nice pun with a good explanation, while Armed Bear only raises questions for me. What kind of weapon would you arm a bear with? Why? Aren't bears unassailable enough as it is?
- twic 7y agoBears are most commonly armed with 87.6 mm artillery: https://en.wikipedia.org/wiki/Wojtek_(bear) https://en.wikipedia.org/wiki/Wojtek_(bear) It seems it's the author's brand name for software, and is a pun on the US constitution's second amendment: http://armedbear-j.sourceforge.net/ http://armedbear-j.sourceforge.net/ We may thus infer that you would arm bears because of the threat of armed bears. After all, to stop a bad bear with a gun, it takes a good bear with a gun.
- lispm 7y agoNote that the first edition of Common Lisp the Language is the 'Aluminum Book'.
- owyn 7y agoI poked around a bit to figure out why this was even posted and there was a new release 1.6.0 on November 22nd which adds support for jdk 11, among other minor things. ABCL provides a java class which can load/eval lisp code, and the ability to call java classes from your lisp program, stuff like that. https://abcl.org/svn/tags/1.6.0/CHANGES https://abcl.org/svn/tags/1.6.0/CHANGES As an "old" I learned LISP in college but have never had the opportunity to use it in my career. Still on my todo list!
- awayfromhomenow 7y agoDon't do it, you'll hate every other language after that (I do).
- caleb-allen 7y agoIt makes everything feel like putting together IKEA furniture
- Rerarom 7y agoIs that good or bad? IKEA is thrown a lot as a metaphor but I have no idea most of the times what it should mean.
- narag 7y agoNo good. Furniture is nice and cheap, but you ensemble it yourself at home. Honestly, I find it easy, but I'm good with that kind of handiwork. Most people find the instructions unclear and difficult to follow. There are many references, from the top of my head I remember The Wire... look for Mc Nulty IKEA on YouTube, I bet it will work. For a little more money they serve the furniture to your house and ensemble it.
- ken 7y agoI've never heard the IKEA metaphor before but it makes sense to me. There's really only one way to put any two pieces together. If they forgot to ship the right bolts, you're SOL. Lisp is like a wood and metal shop. It may take a little more time to become proficient with the basic tools, but once you do, anything is possible. You don't hear Lisp programmers complain they can't do X with Y, and you don't hear builders complain they don't have the right piece to attach X to Y. If you don't have one sitting around, you take a few minutes and make one.
- JimmyRuska 7y agoBesides clojure, might be worth noting; kawak - scheme for the JVM https://www.gnu.org/software/kawa/ https://www.gnu.org/software/kawa/ bigloo is a scheme can compile to C. I think it can also make java class files with bindings https://www-sop.inria.fr/mimosa/fp/Bigloo/ https://www-sop.inria.fr/mimosa/fp/Bigloo/
- Per_Bothner 7y agoJust "Kawa" - not "kawak". (There is actually a very-incomplete Common Lisp implementation as well in Kawa, but the Kawa Scheme dialect is the main Kawa language.) (Hoping to make an official Kawa 3.1 release by the end of the year - but no promises. Until then, use git HEAD.)
- nextos 7y agoA bit off topic, but is Common Lisp still a good choice? I spent a lot of time learning and coding CL during the last decade. I love lots of things about the language. Overall, it's great it's true multiparadigm. Few languages achieve that. However, the implementations are too fragmented which makes the standard quite stagnant. And libraries are falling a bit behind. I love Clasp is putting CL on top of LLVM. I wish we could have something with the best ideas of Racket, Clojure and CL on the LLVM.
- earenndil 7y agoSBCL is a de facto standard, and relying on it is fine. Clasp is nice, but SBCL is fast enough that it's mostly extraneous unless you really need to talk to c++ code.
- peatmoss 7y agoI’ve often wondered why SBCL hasn’t been used as the basis for some of the newer lisps and lisp-alikes. It’s performance is pretty great, and is worlds closer to Clojure than the JVM.
- dang 7y agoWe've been implementing Arc over SBCL. It's called Clarc. I can't seem to find time to work on it. There's a bit more description here: https://news.ycombinator.com/item?id=21550123 https://news.ycombinator.com/item?id=21550123
- nextos 7y agoQi and Shen are pretty interesting. Qi compiles to CL, and Shen compiles to a tiny Lisp subset quite easy to port. But Qi license is quite bad. I think Shen adopted BSD, but is still quite niche or close to abandonware.
- peatmoss 7y agoClojure with a good c (stretch goal: c++) FFI on LLVM would be amazing. I somehow suspect the reason we don’t have it in a fully baked form is that it’s hard. That said, there is Ferret which is Clojure-like, and compiles to c++: https://ferret-lang.org/ https://ferret-lang.org/ Racket is also lovely, and I hope that their port to Chez Scheme will enable alternative implementations, since more of Racket is now written in Racket rather than c.
- chrisseaton 7y agoI'm amazed it literally has a class public final class Cons extends LispObject { public LispObject car; public LispObject cdr; } I would have thought it would provide that abstraction to the programmer but use another representation internally. Chasing pointers like this on modern hardware is surely crazy?
- ken 7y agoLast I heard (years ago), some Lisp implementations had tried using arrays for non-branching cons chains, but found that performance wasn't actually better than actual conses in general.
- msla 7y agohttps://en.wikipedia.org/wiki/CDR_coding https://en.wikipedia.org/wiki/CDR_coding > In computer science CDR coding is a compressed data representation for Lisp linked lists. It was developed and patented by the MIT Artificial Intelligence Laboratory, and implemented in computer hardware in a number of Lisp machines derived from the MIT CADR. > CDR coding is in fact a fairly general idea; whenever a data object A ends in a reference to another data structure B, we can instead place the structure B itself there, overlapping and running off the end of A. By doing this we free the space required by the reference, which can add up if done many times, and also improve locality of reference, enhancing performance on modern machines. The transformation is especially effective for the cons-based lists it was created for; we free about half of the space for each node we perform this transformation on.
- aidenn0 7y agoCDR coding isn't really used because lisp now has standardied vectors, and one big reason to use lists over vectors is the ability to share structure.
- ts4z 7y agoA lot of things in Lisp force the implementation of lists as cons cells. It’s probably possible to do something different, but no one has, and the result won’t be a Common Lisp. (Consider that the detail of improper lists is enshrined in the language.)
- dang 7y agoA well-established implementation, but there haven't been many HN threads. Just this from 2009: https://news.ycombinator.com/item?id=930514 https://news.ycombinator.com/item?id=930514 and a bit from 2017: https://news.ycombinator.com/item?id=14605334 https://news.ycombinator.com/item?id=14605334
- lispm 7y agoIt's also mostly a full implementation of the Common Lisp standard with extensions, which is quite an achievement.
- edko 7y agoWhat would be the best way to get (free) IDE support?
- Arcsech 7y agoEmacs with SLIME is probably your best bet, as with most other Common Lisp implementations.
- potta_coffee 7y agoIf you don't want to learn emacs, Sublime + the Sublime REPL package is quite nice. I've n using it to write SBCL but it can also use ABCL. Also REPLs for lots of other languages.
- jimws 7y agoThere was a recent thread[1] that shows how to setup Lisp development environment in Vim.[2] If you know Vim already, then check it out. [1] https://news.ycombinator.com/item?id=21735148 https://news.ycombinator.com/item?id=21735148 [2] https://susam.in/blog/lisp-in-vim-with-slimv-or-vlime/ https://susam.in/blog/lisp-in-vim-with-slimv-or-vlime/
- tempodox 7y agoI'm using Vim with the SLIMV plugin (derived from SLIME for Emacs) and a bit of script glue to open a new Terminal tab for running SBCL with SWANK in. Like an IDE, and connected with a live Lisp. https://github.com/kovisoft/slimv https://github.com/kovisoft/slimv