5 ms·
I started to learn Lisp, and struggled after trying to use: - Quicklisp (lisp package manager) - ASDF (builder) They are very complicated to use and understa
by weeber 9y ago
I started to learn Lisp, and struggled after trying to use:
- Quicklisp (lisp package manager)
- ASDF (builder)
They are very complicated to use and understand.
Then I abandoned Common Lisp...
- vindarel 9y agoThen you have Portacle ! Emacs isn't the only editor too: https://lispcookbook.github.io/cl-cookbook/editor-support.html https://lispcookbook.github.io/cl-cookbook/editor-support.ht... Lem is also a ready-to-use editor (ncurses or Electron)(but Emacs+Slime is still the best experience (maybe vim?)) You can follow this guide to get started too: https://lispcookbook.github.io/cl-cookbook/getting-started.html https://lispcookbook.github.io/cl-cookbook/getting-started.h... And hopefully this Cookbook will help you along the way: https://lispcookbook.github.io/cl-cookbook/ https://lispcookbook.github.io/cl-cookbook/ Quicklisp takes a couple commands to install, then it's easy. To install a library: `(ql:quickload :my-lib)`. Thinks of it closer to apt than to pip/npm, so you don't upgrade one lib but a QL distribution. You don't really have to deal with asdf. It is used to create a project declaration, which can be generated for you (see "getting started", cl-project). ASDF helps in creating executables, it's also explained in the cookbook.
- flavio81 9y ago>Quicklisp Um... basically the only command you need to learn is ql:quickload followed by the name of the system you want to load. Perhaps you had problems with the concepts of Lisp packages (namespaces)?
- klibertp 9y ago> Perhaps you had problems with the concepts of Lisp packages (namespaces)? Rather unlikely. The namespaces are pretty easy to understand conceptually, and their interface is pretty minimal. Same goes for Quicklisp, very easy to start with, practically one function call needed in most cases. Now there's ASDF. I know, it's a thing of beauty, but it's not simple to use or to understand. Well, it's actually that way for good reasons: the problem it solves is complex and hard. The only comparable system I know of is Erlang releases mechanism, which is also a solid tool, but definitely not the simplest one in Erlang repertoire. Anyway, if someone cites ASDF as a reason for struggling with Common Lisp, I find it very believable.
- kbp 9y ago> > Perhaps you had problems with the concepts of Lisp packages (namespaces)? > Rather unlikely. The namespaces are pretty easy to understand conceptually, and their interface is pretty minimal. Packages can definitely give beginners trouble. I don't think it's that uncommon for newcomers to Lisp to have REPL sessions like this: CL-USER> (ql:quickload :iterate) (:ITERATE) CL-USER> (iter (for i below 10) (collect i)) ;; Error: 3 undefined functions and two undefined variables Then they find out they need to use the package first: CL-USER> (use-package :iterate) ;; Error: 3 NAME-CONFLICTs saying that the symbols ITER and friends ;; are already accessible Then they throw their hands in the air about how frustrating Lisp tooling is. For a less obvious example, imagine they had just been using LOOP normally at some point in the past in that REPL session before trying to bring ITERATE in. Once you understand how symbols and packages work, it's easy to see why it works the way it does, but it's also easy to see how a beginner could get totally lost.
- jolmg 9y agoCan you expand a little on the difficulties you faced? When I tried quicklisp, the instructions in the homepage were easy to follow to install it, search packages, install them, and load them. I haven't tried making a package, or get it included in the repo. Was that where the difficulty you faced was?
- weeber 9y agoFine to setup. But I don't understand how to reload a project after closing the REPL. More generally, too many tools to master and understand... And didn't find a simple tutorial to start with the ecosystem.
- jolmg 9y agoIf you're talking about Quicklisp, to reload it after closing the REPL, you just need to run: (load "~/quicklisp/setup.lisp") and then you'll have the quicklisp functions available. Running: (ql:add-to-init-file) will add something like that to your REPL's init file, so you'll have quicklisp available from the get-go. After that, to load a package like "cl-opengl", whether it's installed or not, you just need to do: (ql:quickload "cl-opengl") This is in the homepage, under a section titled "Loading After Installation"[1]. [1] https://www.quicklisp.org/beta/#loading https://www.quicklisp.org/beta/#loading
- sli 9y agoSame, except I went to Clojure (and some toy Lisps for fun, like Hy) instead.