Where to learn how to practically use Common Lisp [closed]

I would propose reading ‘Practical Common Lisp’, since it already answers some of your questions.

There are probably three to four books you should read:

  • Basic introduction to Common Lisp: Common Lisp: A Gentle Introduction to Symbolic Computation
  • Practical introduction to Common Lisp: Practical Common Lisp
  • More advanced Common Lisp: Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp. The book is interesting also for non-AI programmers.
  • Lots of practical advice: Common Lisp Recipes.

Common Lisp Reference

  • Reference: Common Lisp HyperSpec
  • Printable Quick Reference: Common Lisp Quick Reference
  • Search Engine for Documentation
  • L1sp.org – redirect service for documentation

Manuals

Now the next thing you should check out is the manual of your Lisp implementation. It describes a lot of specific extensions: networking, threads, …

Documentation for Common Lisp implementations:

  • Allegro Common Lisp
  • CLISP
  • Clozure Common Lisp
  • CMUCL
  • ECL
  • LispWorks
  • SBCL
  • Scieneer Common Lisp

SLIME (the Emacs-based Lisp-IDE) has a SLIME User Manual.

Documentation for Common Lisp libraries:

  • Quickdocs

Libraries

For libraries use

  • Quicklisp: supported Libraries.
  • CLIKI (gives some overview)

Now looking at some of your points:

  • How to read files

See the files and streams dictionary in the HyperSpec. WITH-OPEN-STREAM, READ, READ-LINE, READ-CHAR, READ-BYTE, READ-SEQUENCE, …

  • How to read a file, replace words in the file, and write the result back to the file

Use above. See also: WRITE and related.

  • Iterate the files in a directory and other filesystem stuff

See above. DIRECTORY, pathnames, …

  • Interact with an SQL db

Use for example the CLSQL library.

  • Do communications over sockets

See the manual of your Lisp or use one of the portable libraries. See Quicklisp.

  • Threading for stuff like a webserver

See the manual of your Lisp or use one of the portable libraries. See Quicklisp.

  • Create GUIs

Depends. See Quicklisp or an implementation specific library.

  • Perform operations on binary files

See Hyperspec for file and stream operations. WRITE-BYTE, READ-BYTE. Open a stream as a binary stream.

  • Write a parser (not an interpreter for Lisp in Lisp, which as I understand is like 5 lines of Lisp)

Use one of the existing tools for that. Study existing parsers. There are many parsers written in Lisp, but not much in books about that (other than natural language parsers, which are described in the AI literature).

  • Interact with the operating system (i.e. stuff written in C or C++) to do stuff Lisp can’t do natively

Depends. See Quicklisp or an implementation specific library.

  • How to write Lisp extensions in C (is that possible?)

Depends. See Quicklisp or an implementation specific library. -> FFI

Final advice: Read code from other authors.

Study other Lisp code. There is enough very diverse Lisp code out there. From web servers to music composition software.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)