News for hackers. Stuff that matters.
Re:Portacle – A Portable Common Lisp Development Environment by flavio81 on Thursday March 15, 2018 @08:48AM (#16592333)
Portacle is a god send, it basically allows you to directly start development in Common Lisp without having to install separately (and configure):

- SBCL (very fast lisp implementation)

- Quicklisp (lisp package manager)

- ASDF (builder)

- Emacs

- SLIME (Common Lisp mode for Emacs)

- Paredit (allows easier editing of s-expressions)

- and other tools that make CL development a pleasure.

The combination of the tools above are effectively a very powerful Common Lisp IDE.

Re:Portacle – A Portable Common Lisp Development Environment by aerique on Thursday March 15, 2018 @10:02AM (#16592900)
So as not to scare people potentially interested in Common Lisp away, you can play around with it using just:

- SBCL (or whatever Common Lisp implementation you can get your hands on)

- a text editor

- (maybe rlwrap)

Re:Portacle – A Portable Common Lisp Development Environment by nabla9 on Thursday March 15, 2018 @11:44AM (#16593795)
> - a text editor

Only if you want to teach people to hate s-expressions and write stuff like:

           )
        )
     )
Writing lisp code is different. Pick a good Common Lisp aware editor.

IMHO: For pedagogical reasons Lisp editors should show parens with a color that makes them transparent and almost hides them into background. Parens are there for the editor to find patterns not people to see and match (except maybe one or two most inner levels). You use proper indentation to see the structure just like you do with Python.

Re:Portacle – A Portable Common Lisp Development Environment by flavio81 on Thursday March 15, 2018 @12:20PM (#16594168)
>Only if you want to teach people to hate s-expressions

This must be stressed. It is very important to use a lisp-aware editor. It doesn't have sense to do stuff that a lisp-editor can do automatically, such as auto-indent, and keeping parens balanced all the time.

Also, a good IDE (such as Portacle) gives very good on-the-fly documentation of function parameters/etc, which makes learning CL much faster.

Re:Portacle – A Portable Common Lisp Development Environment by uptownfunk on Thursday March 15, 2018 @11:33PM (#16598402)
This is why I said WTF when they tried to introduce us to lisp in CS61A... I thought why would anyone want to program in this. Years later and I am now thinking how wrong I was!
Re:Portacle – A Portable Common Lisp Development Environment by weeber on Thursday March 15, 2018 @10:26AM (#16593084)
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...

Re:Portacle – A Portable Common Lisp Development Environment by vindarel on Thursday March 15, 2018 @11:10AM (#16593481)
Then you have Portacle !

Emacs isn't the only editor too: 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.h...

And hopefully this Cookbook will help you along the way: 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.

Re:Portacle – A Portable Common Lisp Development Environment by jolmg on Thursday March 15, 2018 @12:00PM (#16593981)
Can 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?
Re:Portacle – A Portable Common Lisp Development Environment by weeber on Friday March 16, 2018 @08:24AM (#16600121)
Fine 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.
Re:Portacle – A Portable Common Lisp Development Environment by jolmg on Friday March 16, 2018 @06:06PM (#16604337)
If 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

Re:Portacle – A Portable Common Lisp Development Environment by flavio81 on Thursday March 15, 2018 @11:57AM (#16593944)
>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)?

Re:Portacle – A Portable Common Lisp Development Environment by klibertp on Thursday March 15, 2018 @04:22PM (#16596221)
> 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.

Re:Portacle – A Portable Common Lisp Development Environment by kbp on Friday March 16, 2018 @06:55PM (#16604556)
> > 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.
Re:Portacle – A Portable Common Lisp Development Environment by sli on Friday March 16, 2018 @04:42PM (#16603883)
Same, except I went to Clojure (and some toy Lisps for fun, like Hy) instead.
Re:Portacle – A Portable Common Lisp Development Environment by y03a on Thursday March 15, 2018 @09:30AM (#16592640)
Do you know if installing Portacle will mess with any existing configurations of those things on Linux? In particular Emacs. I have everything backed up but, since I only plan to play with CL, I don't want the headache if it does.
Re:Portacle – A Portable Common Lisp Development Environment by Shinmera on Thursday March 15, 2018 @12:28PM (#16594248)
It should not touch anything outside of its own directory. If it does, then that's a bug and needs to be fixed.
Re:Portacle – A Portable Common Lisp Development Environment by vindarel on Thursday March 15, 2018 @09:54AM (#16592825)
test in peace, it doesn't interfere with your emacs config or anything else :)
Re:Portacle – A Portable Common Lisp Development Environment by phoe-krk on Thursday March 15, 2018 @09:52AM (#16592813)
No, it won't. Portacle is 100% self-contained and does not modify anything outside its home directory.