Hacker News new | ask | show | jobs
by z3phyr 2156 days ago
This is awesome! Great work OP!

Always look forward to more Lispy ShowHNs. On another note, I am learning common lisp too, but I do not currently get how to make standalone projects. I tried quickproject but most of the time I remain confused. Is there a good explanation of this stuff online?

Currently I stick with (load "lisp-file"), with one main.lisp (I come from the C world) which calls everything else, but it is not really scalable nor really professional. Something like cargo or lein could work wonders!

3 comments

Using explicit LOADs is fine, Lisp itself doesn't care. Though as you say a bit amateurish in the current year, but professionals did it extensively at one point. (Some probably still do.) Just like in Java, before maven plenty of shops were (some still are) fine with dumping their dependency jars in a thirdparty/ directory and doing everything with ant (or even shell scripts calling javac explicitly).

If you're willing to spend $26, I recommend this short ebook: https://www.darkchestnut.com/book-common-lisp-application-de... It basically gets you setup to create and deploy a production binary with minimal pain while meeting several professional-level expectations, though of course there's lots of tweaking you can do later on and there are always professional differences of opinion for substitutions... The gist of the book's project setup though is that you use ASDF to define your system (similar to a clojure defproject) and its bundled UIOP library for anything interfacing with the OS, qlot to pin versions of your dependencies, tell quicklisp about your local system so while developing you can make wide changes and just reload the system through slime with ql itself, use buildapp to simplify building exes, and use the venerable Make as a wrapper to do builds/cleans/deploys/tests in one step.

Apart from that and the resources others linked, read the ASDF manual: https://common-lisp.net/project/asdf/#documentation That home page also points to other useful things to know about...

Last piece of generic advice... It's often best to read primary sources. Make CLHS your bible, Steele's cltl2 is also great.

Thank you so much for the detailed response!
This page gives a nice overview: https://lispcookbook.github.io/cl-cookbook/getting-started.h...

Basically Quicklisp is your CL package manager, and ASDF is your makefile.

The Common Lisp Cookbook is an excellent starting point for learning more about the Lisp ecosystem: https://lispcookbook.github.io/cl-cookbook/

Another great introduction to Lisp is this blog post by Steve Losh: https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/