cl-cookbook icon indicating copy to clipboard operation
cl-cookbook copied to clipboard

Primer (Getting started): Fix accessibility issue once and for all!

Open Ambrevar opened this issue 6 years ago • 4 comments

I believe one of the biggest problem for newcomers is to know where to get started. The "Getting started" page mentions Quicklisp, Roswell, different compilers... It's overwhelming. And it doesn't stop there: then we need to read the Editors chapter, its subchapters (!), etc.

Anyone even with good computing knowledge will spend several hours wrapping their head around all this stuff, just to be able to write some code.

I suggest to rework this approach a little bit:

  • Merge "Getting started" and "editor support" into the same "Installation" chapter. We can keep subchapters for different editors if that makes sense and if the "Installation" page ends up being too long.

  • Rewrite "Getting started" as a primer (for real this time) with only the bare minimum to write code, stick to the easiest stuff:

    • Install SBCL (no need to explain about other compilers at this point). SBCL is possibly the most widespread and well maintained compiler, it's easier to stick to just this one.
    • Write in your favourite editor. Run sbcl --script file.lisp on it.
    • Drop any third-party library to ~/common-lisp. Users can now use external libraries in their snippet. No need to explain Quicklisp at this stage.
    • Create a 2nd file using some code from the 1st.
    • Show a super trivial .asd file. I'd recommend a package-inferred-system because it's the shortest, the user basically only needs to mention the title, author, license, version.
    • Make a (compressed) executable using the right op in the .asd and sbcl --eval '(asdf:make ...)'. Explain that it embeds the full image, hence the ~15MB. Explain that later we will see how to reprogram the live image.

What do you think?

Edit: Typos.

Ambrevar avatar Aug 27 '19 10:08 Ambrevar

Instead of calling sbcl --script, we could also put #!sbcl --script in the shabang and make the file executable. I guess both are equally simple, but maybe the latter is easier to "carry around".

Ambrevar avatar Aug 27 '19 10:08 Ambrevar

Haven't really caught up to date with the latest "easy way to lisp", I'm using a weird 2006-era mental model. :)

Programming Cookbooks are traditionally more snippets than an introduction. That said, tradition doesn't need to hold us back.

I'm happy to accept a "Lisp 101" chapter.

Thoughts, @LispCookbook/team ?

pnathan avatar Feb 26 '20 20:02 pnathan

Sound like a good idea. How about suggesting Portacle for getting started? One could add instructions on how to activate CUA-Mode.

chuchana avatar Jun 21 '20 11:06 chuchana

Sounds good!

Ambrevar avatar Jun 22 '20 07:06 Ambrevar