5 ms·
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. Fo
by 147 4y ago
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.
- galdor 4y agoWhat 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.
- 147 4y agoI edited the comment to add some additional details. Am I not supposed to load or compile the contents of an `.asd` file?
- galdor 4y agoNo you do not have to. ASDF knows where to find your ASD files: https://asdf.common-lisp.dev/asdf.html#Configuring-ASDF-to-find-your-systems https://asdf.common-lisp.dev/asdf.html#Configuring-ASDF-to-f... Personally I use the (:tree (:home "dev/lisp")) form.
- 147 4y agoThanks a lot for this actually. I just gave it a shot and it seems to have been the piece I've been missing.
- aidenn0 4y agoYou 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.
- vindarel 4y agoJust don't put a node_modules/ in there!
- nidnogg 4y agoThanks, I honestly felt a bit gaslighted with the way no one was mentioning anything about these accounts.
- dutchblacksmith 4y agoJust use quicklisp, it handles ASDF in a nice manner. Then jou just grow into using ASDF.
- vindarel 4y agoThis should help: https://lispcookbook.github.io/cl-cookbook/getting-started.html#how-to-load-an-existing-project 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.
- Avshalom 4y ago>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.
- lispm 4y agoYou 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.
- arethuza 4y agoAs a former "good old fashioned AI" researcher who used Lisp (LispWorks) between '89 and '95 this seems oddly appropriate!