News for hackers. Stuff that matters.
Re:Common Lisp Implementations in 2023 by 147 on Thursday February 23, 2023 @08:04AM (#34909975)
There's a weird spike in new accounts with what appear to be AI generated comments in this thread.

One problem I run into when learning Common Lisp is ASDF. For some reason I can't figure out how to use it properly. For example, when I open a system definition in a new REPL, what's the expected workflow? I'm using emacs and slime by the way. Maybe my environment is set up wrong. I also have to prefix the `defsystem`s with `asdf:`. When I look at examples in open source projects they just straight up use `uiop` functions and `defsystem` in their `.asd` files without the package.

Re:Common Lisp Implementations in 2023 by nidnogg on Thursday February 23, 2023 @08:23AM (#34910199)
Thanks, I honestly felt a bit gaslighted with the way no one was mentioning anything about these accounts.
Re:Common Lisp Implementations in 2023 by galdor on Thursday February 23, 2023 @08:06AM (#34909996)
What do you mean by "open [...] in a new REPL"?

You use ASDF:LOAD-SYSTEM to have ASDF load all the content of the system, making it available to you.

Re:Common Lisp Implementations in 2023 by 147 on Thursday February 23, 2023 @08:09AM (#34910028)
I edited the comment to add some additional details.

Am I not supposed to load or compile the contents of an `.asd` file?

Re:Common Lisp Implementations in 2023 by galdor on Thursday February 23, 2023 @08:13AM (#34910083)
No you do not have to. ASDF knows where to find your ASD files:

https://asdf.common-lisp.dev/asdf.html#Configuring-ASDF-to-f...

Personally I use the (:tree (:home "dev/lisp")) form.

Re:Common Lisp Implementations in 2023 by 147 on Thursday February 23, 2023 @08:35AM (#34910364)
Thanks a lot for this actually. I just gave it a shot and it seems to have been the piece I've been missing.
Re:Common Lisp Implementations in 2023 by aidenn0 on Friday February 24, 2023 @08:10PM (#34932652)
You can load the contents of a .asd file (this can be useful when developing on versions other than what you want in your ASDF search path). It is unnecessary outside of that use case though.
Re:Common Lisp Implementations in 2023 by vindarel on Thursday February 23, 2023 @05:56PM (#34917938)
Just don't put a node_modules/ in there!
Re:Common Lisp Implementations in 2023 by dutchblacksmith on Thursday February 23, 2023 @08:46AM (#34910483)
Just use quicklisp, it handles ASDF in a nice manner. Then jou just grow into using ASDF.
Re:Common Lisp Implementations in 2023 by vindarel on Thursday February 23, 2023 @09:04AM (#34910705)
This should help: https://lispcookbook.github.io/cl-cookbook/getting-started.h...

The workflow is:

- open the .asd file,

- compile it so that your Lisp image knows about it: C-c C-k in Slime, or (asdf:load-asd "project.asd")

- you are ready to "quickload" it.

The link shows how you can tell ASDF to find your projects at startup, so than you can "quickload" it directly.

Re:Common Lisp Implementations in 2023 by Avshalom on Thursday February 23, 2023 @09:29AM (#34910986)
>There's a weird spike in new accounts with what appear to be AI generated comments in this thread.

There's also a chatbot company on the front page posted by a new account. I kinda suspect they're related.

Re:Common Lisp Implementations in 2023 by lispm on Thursday February 23, 2023 @09:35AM (#34911067)
You need to have ASDF itself loaded into your Lisp.

Yes one can also load system definitions, they are Lisp code. But usually it is expected that they are found automatically, when calling a system operation (load, compile, ...), when registered correctly.

Re:Common Lisp Implementations in 2023 by arethuza on Thursday February 23, 2023 @10:14AM (#34911592)
As a former "good old fashioned AI" researcher who used Lisp (LispWorks) between '89 and '95 this seems oddly appropriate!