What does HackerNews think of awesome-cl?
A curated list of awesome Common Lisp frameworks, libraries and other shiny stuff.
I actually agree. It wasn't smooth for me to ship my first CL app. It's all better now (more tools, more documentation, more blog posts from several people, more SO questions and answers!).
> performant
SBCL is in the same ballpack of C, Rust or Java in many benchmarks.
In this article series, the author writes the same program in CL, Rust and Java. In fact, he copy-pastes a PG snippet from 30 years ago. This snippet beats Rust and Java in LOC and speed. But, yeah, he wasn't writing super efficient Rust code, so after many discussions, pull requests and sweating, the Rust code became the most performant. https://renato.athaydes.com/posts/revisiting-prechelt-paper-... It didn't take work to make the CL code performant, more so for the Rust one ;)
a benchmark after sb-simd vectorization: https://preview.redd.it/vn5juu36v2681.png?width=715&format=p... (https://www.reddit.com/r/Common_Lisp/comments/riedio/quite_a...)
> good tools for networking, for writing concurrent or asynchronous code, for graphics,
I refer the reader to https://github.com/CodyReichert/awesome-cl but yes, CL won't have the best libraries in some scenarii (GUI? Tk libs are good, we have Gtk4, a Qt5 library used in production© by a big player but difficult to install etc)
> it doesn't give you a good package manager or means of distributing code
Quicklisp is neat, with limitations, that can be addressed with Qlot, ql-https, or CLPM or the newest ocicl.
Modern companions would be:
- the Cookbook: https://lispcookbook.github.io/cl-cookbook/ (check out the editors section: Atom/Pulsar, VSCode, Sublime, Jetbrains, Lem...)
- https://github.com/CodyReichert/awesome-cl to find libraries
Also:
- https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/
- https://news.ycombinator.com/item?id=34321090 2022 in review
## Pick and Editor
The article is right that you can start with anything. Just `load` your .lisp file in the REPL. But even in Vim, Sublime Text, and Atom [and also VSCode] you can get pretty good to very good support. See https://lispcookbook.github.io/cl-cookbook/editor-support.ht... (also Lem, a CL editor that works for other languages, Jupyter notebooks, Eclipse (basic support) and LispWorks (proprietary, advanced graphical tools).
> if anyone is interested in making a Common Lisp LSP language server, I think it would be a hugely useful contribution to the community.
Here's a new project used for VSCode: https://github.com/nobody-famous/alive-lsp There's also https://github.com/cxxxr/cl-lsp
## Other resources
I already linked to it, but the Cookbook (to which I contribute) is a useful reference to see code and get things done, quickly. https://lispcookbook.github.io/cl-cookbook/
While I'm at it, my first shameless plug: after my tutorials written for the Cookbook and my blog, I wanted to do more. Explain, structure, demo real-world Common Lisp. I'm creating this course (there are some free videos): https://www.udemy.com/course/common-lisp-programming/?coupon... (ongoing -50% coupon for June).
## Web Development
See the Cookbook, and the awesome list (see below). We have many libraries, you still have to code for things taken for granted in other big frameworks. I have some articles on my blog.
We have new very cool kids in town, especially CLOG, that is like a GUI for the browser. Check it out: https://github.com/rabbibotton/clog
## Game Development
See again the awesome-cl list. And the Kandria game, in the making, all done in CL: https://kandria.com/ (it just got accepted for a Swiss grant, congratulations).
## Unit Testing
We have even more test frameworks since 2018! And some are actually good O_o
## Projects
To create a full-featured CL project in one command, look no further, here's my (shameless plug again) project skeleton: https://github.com/vindarel/cl-cookieproject you'll find the equivalent for a web project, lighter alternatives in the README, and a demo video: https://www.youtube.com/watch?v=XFc513MJjos&feature=youtu.be
## Libraries
He doesn't mention this list, what a shame: https://github.com/CodyReichert/awesome-cl => the CL ecosystem is probably bigger than you thought. Sincerely, only recently, great packages appeared: CLOG, cl-gserver (actors concurrency), 40ants-doc, official CL support on OVH through Platform.sh, great editor add-ons (Slite test runner, Slime-star modules…), Coalton 1.0 (Haskell-like ML on top of CL), April v1.0 (APL in CL), a Qt 5 "library" (still hard to install), many more… (Clingon CLI args parser, Lish, a Lisp Shell in the making, the Consfigurator deployment service, generic-cl)…
His list is OK, I'd pick another HTTP client and another JSON library (new ones since 2018 too), but that's a detail.
BTW, see also a list of companies: https://github.com/azzamsa/awesome-lisp-companies/
## Community
We are also on Discord: https://discord.gg/hhk46CE and on Libera Chat.
## Implementations
CLASP (CL for C++ on LLVM) reached its v1.0, congrats. https://github.com/clasp-developers/clasp/releases/tag/1.0.0 More are in the making…
We got dynamic library delivery tool for SBCL (sbcl-librarian), more good stuff is coming…
Allegro CL (proprietary) got a new version running in the browser…
Crazy Lisp world <3
If you're happy with your mix of Python and Hy, well, great. But you know what, you can do what you described with CL too! Need to do some webscraping? Beautiful Soup -> lquery. Django -> well… no CL framework gives you all these batteries included, but what if you want to extract data from a Postgres DB and display it in a web app? that's very easy [1] in CL too. Django ORM -> postmodern or Mito (or more). IDK about Nix but several people are working with CL and Guix.
https://github.com/CodyReichert/awesome-cl
What worked out for me was to write companion services in CL, instead of extending my big Django app. This new service that takes data from a FTP server, transforms it, stores it, displays it in a web app? CL. That web app that serves another kind of customers than the Django one? A CL app. It isn't for everybody and sometimes you wish for a bigger ecosystem, but anyways, many things can be done in CL.
[1]: ok honestly the learning process was not that easy. It's a bit easier with my contributions now! (Cookbook etc)
for the second point: https://mikelevins.github.io/posts/2020-12-18-repl-driven/
There might be more CL libraries than you think: https://github.com/CodyReichert/awesome-cl but I'm not that a zealot to say you can ignore Python's ecosystem, especially in certain areas…
- how to get started? https://lispcookbook.github.io/cl-cookbook/getting-started.h...
- is this mystery used in production©? quick look: https://lisp-journey.gitlab.io/who/
- is this mystery used by people for today's needs? https://github.com/CodyReichert/awesome-cl
newcomers to Lisp, check out:
- https://github.com/CodyReichert/awesome-cl (there might be more libraries than you think)
- https://lispcookbook.github.io/cl-cookbook/
- how to create a project (with my project generator): https://www.youtube.com/watch?v=XFc513MJjos
CL's ecosystem might be better than one thinks: https://github.com/CodyReichert/awesome-cl & https://lisp-journey.gitlab.io/blog/state-of-the-common-lisp...
Another very helpful resource by Fernando was his state of CL ecosystem: https://borretti.me/article/common-lisp-sotu-2015 It really helped have an overview of the ecosystem, pick libraries and work on consolidation. I compiled one for 2020 here: https://lisp-journey.gitlab.io/blog/state-of-the-common-lisp...
(ps: yes people, you can avoid Emacs and use VSCode to have a good experience! and even Atom, Jupyter notebooks and more. See https://lispcookbook.github.io/cl-cookbook/editor-support.ht...)
I'm not sure what you mean by "no canonical implementation" -- there's the ANSI Common Lisp standard, of which there are multiple implementations. Is this somehow a bad thing to you?
> Lispers love to say "Lisp is a family of related languages"
Not really. I think it's slightly more common for Scheme or Clojure programmers to claim Lisp relations, but it's just advertising. If having s-expression-ish syntax (with nothing being compatible to CL like a real Lisp dialect would be, and was given how much code in pre-CL Lisps could be run in CL unmodified) makes it part of the "Lisp family", then why not speak of the ALGOL family? It's tiresome semantics and from what I've read Common Lispers at least don't tend to do it.
> There's just no ecosystem of reliable, standard-ish packages.
Here's everything on Quicklisp: https://sabracrolleton.github.io/short-descriptions and a curated list: https://github.com/CodyReichert/awesome-cl
Yes, it's not as impressive as Maven. Yes, not everything is as well-documented as, say, PyGame (http://www.pygame.org/docs/ -- though not every Python library you'll find with pip is, either) or even the Common Lisp Hyperspec (http://www.lispworks.com/documentation/HyperSpec/Front/Conte...). Yes, some things are broken, or even abandoned, though in the latter case it may just be that they're "done" pending anyone coming up with a new issue or feature request. I've happily used web scraping libs to save my HN comments with their context, there's a good Twitter API lib I moved to when something broke the Python one I was previously using, I've orchestrated Selenium, I generated some FFI bindings to FMOD and had it working within a few minutes... My point here is just that there is an ecosystem for CL, and many things are reliable, when something works it's rare to stop working. Sorry about your GPIO experience, it happens, I had a bad experience trying to quickload a library that depended on iolib which opaquely depends on a custom C library the author also made and is not in my distro's package manager.
I'm not sure what you mean by "standard-ish" -- is Python's urllib3 "standard-ish"? What about urllib and urllib2? Do they qualify merely by being part of the standard library, or is it something else? My other guess is you mean something like "X is a common area of development in the current year, are there any packages dedicated to that area, what are they, and are they any good?" But this is a shaky categorization and in other languages changes all the time, not worthy of the attribute "standard" or even "standard-ish".
You're right though that what does exist is small and limited, and that's a natural limiting factor to growth, far more I think that what editors are available or easy to use. Quicklisp came about way too late. Yet the ecosystem continues to grow, so maybe you'll be willing to give it another chance in another 10 years.
https://github.com/lem-project/lem/ supports CL, Python, C, Rust, CSS, Go, HTML, Java, JS, Nim, OCaml… (see the modes/ directory), it has a directory mode (à la dired) and it seems to support LSP (I only tried it for CL so far). It is very much Emacs inspired, but is lacking documentation and self-documentation features :( There is Lem-OpenGL ! https://github.com/gregcman/lem-opengl
The most functional, feature-complete, proven editor is the LispWorks IDE: http://www.lispworks.com/ A review: https://lisp-journey.gitlab.io/blog/discovering-the-lispwork... It's proprietary. The free version has annoying limitations. It is written with the portable CAPI framework. It has an excellent graphical stepper.
And, you might not know, but popular editors are getting good to very good support for CL now, at last. SLIMA for Atom nearly reaches feature parity with Slime (it doesn't have a stepper). For VSCode, see Alive. There's a Jupyter kernel, an Eclipse plugin and more. https://lispcookbook.github.io/cl-cookbook/editor-support.ht...
libraries: https://github.com/CodyReichert/awesome-cl
https://github.com/CodyReichert/awesome-cl
https://github.com/lem-project/lem/
https://lisp-journey.gitlab.io/blog/discovering-the-lispwork...
(https://github.com/CodyReichert/awesome-cl/ for a start)
https://github.com/CodyReichert/awesome-cl/
https://lispcookbook.github.io/cl-cookbook/editor-support.ht... (Atom, Sublime, VSCode, Jupyter…)
https://lisp-lang.org/success/ (and https://github.com/azzamsa/awesome-lisp-companies)
BTW, Atom and VSCode have pretty good plugins this day (https://lispcookbook.github.io/cl-cookbook/editor-support.ht...) and CL might have more libraries than you think (https://github.com/CodyReichert/awesome-cl). A lot is going one.
It is not hard to learn in general, there are too many counterexamples of people of all sorts and skills learning it without these issues you are having, learning it as their first, learning it later in their careers... (CL is big, I'll give you that, but each piece can be chewed one at a time and does not seem to be individually that difficult.) So I can hypothesize why it's hard to learn for you. My first guess is still that you aren't meeting Lisp in its own terms and are trying to make Lisp fit your mental model of some other language and its ecosystem. This isn't going to work, and the failure mode (if I'm right) has nothing to do with Lisp but with biases in general heuristics of learning.
You don't need to "unlearn" the way you're used to doing things, but you do need to separate yourself from it for a bit until you actually grasp the Lisp (and its ecosystem's) way(s) and can then see the connections, tenuous and non-existent as some may be. I'll risk raising some of those connections below, but really, things need to be understood on their own terms first or you wind up with misconceptions. (I've seen it multiple times with Java/Python programmers getting confused at the other's "import" statement.)
> strange terminology
It's not Lisp's fault that it's old. Being old means it will have terminology that may be alien to what we have today with nothing today being a perfect fit, or alternatively sometimes it expresses mostly what we say today in a different way. (And when you talk about concepts, not just pure language features, you run into incommensurability. See https://dreamsongs.com/Files/Incommensurability.pdf for an example with Mixins.)
CLOS for example has these things called "slots" which are more or less "fields" or "class/instance variables" in later OOP languages. But it's best to think of them as CLOS slots, so that you don't bring along any (mis)conceptions from other languages. It's sometimes amusing how different other OOP systems are given CLOS was the first to be part of an ANSI standard.
> that took place in 2008
I rather like that I can often find things decades old about Lisp and they are still relevant. Systems are at least as early as the Lisp Machine (1979). Perhaps it's worth going to the original description there? I also sort of like this history diving, even if modern sources obsolete the history in every way that matters. But here is the Lisp Machine manual on the topic: https://hanshuebner.github.io/lmman/maksys.xml "The way it works is that you define a set of files to be a system, using the defsystem special form, described below."
Is that unclear? Systems are first and foremost sets of files. Systems also let you define relations between files, primarily which files depend on which other files, as further sentences reveal.
If you're talking about this page as the first result: https://common-lisp.net/~mmommer/asdf-howto.shtml I agree it's an awful guide. I've never seen it before, it's a shame it's the #1 result. You'd be best served by ignoring it. Systems have nothing to do with CLOS, I assume that guide started trying to use animal parts as a way to elucidate dependencies. (A tail doesn't actually depend on legs though?)
I don't recall how I learned systems, probably because a mix of ASDF's manual (https://common-lisp.net/project/asdf/), this best practices guide linked from ASDF's home page (https://gitlab.common-lisp.net/asdf/asdf/blob/master/doc/bes...), just looking at example asd files of popular libraries and applications (https://github.com/CodyReichert/awesome-cl), a short ebook I occasionally shill (https://www.darkchestnut.com/book-common-lisp-application-de...), and just actually writing enough lisp and making my own library, were in part or all together enough. When you're actually writing software, you can just incrementally compile and load your files (or just eval chunks you've selected with the editor), or if you made a bunch of changes across the whole project then you can just reload your system (if you've defined it) and have everything recompiled and reloaded for you.
It's worth noting that systems are not part of the ANSI Lisp standard, though. Just as Maven is not part of Java. If you jump straight to Maven without first understanding how to create a Java program with multiple files using javac and jars, you might have a hard time later. Lord knows plenty of people get by relatively fine skipping around though (and might not even touch Maven directly, just do everything from an IDE); you can do this with Lisp too, but you seem to want to understand things more fundamentally.
Probably what you need to understand most is the core function "load" (http://www.lispworks.com/documentation/HyperSpec/Body/f_load...). After that you probably want to know about packages (which are akin to namespaces -- bags of symbols, if you already know what 'symbol' means in the CL context). You may wish to know about the "modules" mini-feature enough to know it's deprecated and doesn't really provide anything like what you think a module system should, so no one uses it, and that this mini-feature is independent from something else you might find rarely mentioned in ASDF that is unhelpfully called a 'module'.
> packaging in lisp?
Lisp itself doesn't have a notion of "packaging" in the meaning I'm inferring from you, so your question is wrong on its outset. It just has things like compile-file and load. If you like, you can loosely refer to a directory of files you load one by one as a "package" or a "library". You can define a system for those files with ASDF, and treat "loading the system" as something like "loading the library". When you want to get other "libraries" (directories of files -- just like python eggs or java jars, but lisp libs aren't compressed into zips) from the internet, or publish your own, the community standard is https://www.quicklisp.org/beta/
Sorry if this is just more unhelpful text, I can feel your frustration even if I don't fully understand it. I do agree that being alien is a detriment to Lisp's popularity, but that's not going to change. You might find some leverage by working at CL from the less alien Clojure as a starting point. I always thought this two part talk on Clojure for Java Programmers was really good, but the last person I sent it to dozed off watching it, so your results may vary: https://www.youtube.com/watch?v=P76Vbsk_3J0
The other less known Lisp feature (in the sense of Common Lisp), is the image-based development, which makes for a great REPL. Really interactive, tiny feedback loops, where you compile your program one function at a time. You never wait for a process to restart, even working on a web, GUI or game project. You keep your test objects around. You restart to a clean state when you want. You get compilation and type warnings immediately. You have an interactive debugger that points you to the erroneous line, you fix it, you tell the debugger to try again from the previous stackframe, and you see the function complete.
> * poor ecosystem of libraries - few gems, most other half-baked
I actually had the choice for my libraries: DB interface, email sender, HTML template, data structure helpers… these ones with good documentation.
I have observed and explored the ecosystem for the last 3 years and I still find hidden gems. There are way more libraries than we can see at a quick glance.
We do a selection on https://github.com/CodyReichert/awesome-cl
> * poor community coordination
It looks like the oldest ones don't coordinate much and the youngers do (and push the established players, such as the CL foundation).
> * poor support for async
Maybe not for a full async runtime (cf Turtl feedback), but there is a good choice for all sort of async stuff (bordeaux-threads, lparallel, lfarm, channel, SBCL built-ins etc)
There are good references and snippets on the Cookbook: https://lispcookbook.github.io/cl-cookbook/
for libraries, see https://github.com/CodyReichert/awesome-cl (and see the lparallel or lfarm libraries, channels, cl-gserver, the built-in SBCL threading functions, etc)
Also note that CL is not purely functional, you can throw in FP or OOP or iterative code.
- there is py4cl and async-process: https://github.com/CodyReichert/awesome-cl#python
- NumCL is a clone of Numpy: https://github.com/numcl/numcl
Common Lisp has many advantages though:
- you can build a self-contained binary of your app, including web app. It's such a breeze to deploy, and it's possible to ship a binary to users.
- the REPL is much better and more fun than ipython
- CL is compiled. We compile our code function by function, and we get many compiler warnings at compile time.
- CL is stable, the syntax is simple, you can add the syntax you want with extensions (decorators, string interpolation,…) and yet, the implementations keep improving, and new ones are created (Claps, CL on LLVM).
- CL is fast (how pgloader got rewritten from Python to CL: https://tapoueh.org/blog/2014/05/why-is-pgloader-so-much-fas...)
- there may be more libraries than you think: https://github.com/CodyReichert/awesome-cl
- the object system is very nice, the multiple dispatch makes me have a cleaner and shorter ABI of my app.
- there are more editors with good support than Emacs: Atom support is getting very good, and there's more: https://lispcookbook.github.io/cl-cookbook/editor-support.ht...
- the (default) package management system works with "distributions", à la apt/Debian, so it doesn't break suddenly because of a third party of a third party dependency.
Of course, the web stack is less mature (but more promising: see Weblocks http://40ants.com/weblocks/) and CL might be more difficult. It's not for every one. But it's been a joy so far.
- hard to set up environment ? -> http://portacle.github.io/ There's also Lem, and Atom is getting good. https://lispcookbook.github.io/cl-cookbook/editor-support.ht...
- horrible website ? http://common-lisp.net/ (they fixed it last year) Also http://lisp-lang.org/
- no cross-platform, featureful GUI library ? -> https://github.com/lispnik/iup/ (alpha) There's also Qtools for Qt4. And Ltk, but Tk lacks widgets.
- no object-oriented, generic math or equality operators ? -> https://github.com/alex-gutev/generic-cl/
- no decent library for numerical computing ? -> https://github.com/numcl/numcl
- waiting one month to publish your library into Quicklisp is too much ? -> http://ultralisp.org/
- lack of online beginner friendly documentation ? -> https://lispcookbook.github.io/cl-cookbook/
Also, Quicklisp can be completed with http://ultralisp.org/, a distribution that builds every 5 minutes and to which it is trivial to add a library. There's also Qlot for local dependencies, and more.
- it's all interactive and that's a productivity boost. Write a function, compile it (yes, compile function by function), see warnings or get a debugger on errors, try it right away. Same for web development. No process has to restart to test your changes.
- build a self-contained executable: a joy to deploy.
- strong typing, catches many common errors (and coming: an ML extension for CL: https://github.com/stylewarning/coalton, already used in a large Rigetti codebase)
- stable.
- fast
- take in every language feature you want with libraries
- parenthesis: they help to edit code by structure, by semantic units, instead of by line or characters.
- most flexible language. Like Python's decorators or context managers ? Yet they're limited and have their idiosyncrasies.
- unmatched object system, with generic functions that help maintain your logic small.
And there are libraries :] https://github.com/CodyReichert/awesome-cl
- https://github.com/CodyReichert/awesome-cl - http://quickdocs.org/
- IMO the documentation state is not great, but it's being worked on. (it's said to be non-existent for Haskell :p ) CL has many books to learn from (CL recipes of 2015 being the more interesting to me http://weitz.de/cl-recipes/), but the online documentation is not brilliant. Often the web page isn't attractive at all, not every project provides good documentation, the "official" websites are bad (cliki, others). It's being fixed by https://github.com/CodyReichert/awesome-cl, http://lisp-lang.org/, https://lispcookbook.github.io/cl-cookbook/, http://quickdocs.org/ and http://phoe.tymoon.eu/clus/doku.php
- one can feel the language is dating. It has IMO too many weird semantics: no map and filter but map which takes a second argument telling the type of the structure or mapcar and others, remove-if[-not], etc. Creating hash-tables is too verbose and not consistent, et. That all a lot more are fixed in CL21 http://cl21.org/ (its wiki https://github.com/cl21/cl21/wiki). CL21 also offers more functional-oriented stuff like shorter lambdas, lazy sequences, generic functions, or string interpolation, regexp literals, and more. It's a bit under-documented, but its wiki is ok.
- web dev in CL is another topic. I sugest https://stackoverflow.com/a/42838145/1506338 but what's doable now is very elegant.
- CL has a big ecosystem, we can use Emacs/Vim/Atom, Portacle is straightforward is portable and thus straightforward to use (https://shinmera.github.io/portacle/),…