0

I'm having trouble getting started with ASDF and Common Lisp.

How can I get a minimal example working?

Rainer Joswig
  • 136,269
  • 10
  • 221
  • 346
audrow
  • 143
  • 1
  • 9
  • There is an [example](https://stackoverflow.com/documentation/common-lisp/670/asdf-another-system-definition-facility/2183/simple-asdf-system-with-a-flat-directory-structure#t=20160813133545521621) in the documentation section. – jkiiski Aug 13 '16 at 13:38

1 Answers1

1

To answer my own question:

So, how to do your "Hello World!" with ASDF build system? Here's what worked for me. I'll help you side-step the time-consuming traps that I fell into.

Watch this video. He explains installation of sbcl, emacs, quicklisp (a Lisp library manager), slime, and quickproject, which sets up a project with ASDF.

Now to side-step a few traps:

  • slime didn't seem to work with clisp. I had to use scbl. Note, I'm on ubuntu 16.04.
  • You must have your .asd file in the path of your ASDF system. You can accomplish this by working in ~/common-lisp/; if you don't have it you can make it. See here to setup ASDF to look in other directories.
  • Once you have they system built, load the system with (asdf:load-system :<system>). Also, to access functions in a different package, use the following syntax: (<package>::<function> ...).

Happy coding.


For vim users: Emacs and Lisp, specifically with quicklisp and emacs's package manager, is a beautiful combination. Probably because Emacs is written in Lisp. I see the value of this. But I'm a vim user. I was pleased to find Evil, a great vim layer for emacs. Check out this 4 minute video, which impressed me. Also, here is a post of another vim user setting it up to be like his vim environment, better in some cases. I now think the combination of emacs and vim is better than either alternative.

audrow
  • 143
  • 1
  • 9
  • `PACKAGE::SYMBOL` means you are accessing an internal symbol in the package. You should export any symbols intended for use outside the package (then they can be used with just one colon `PACKAGE:SYMBOL`). Exporting is done by adding `(:export #:symbol1 ... #:symboln)` to your `DEFPACKAGE`. – jkiiski Aug 15 '16 at 04:52