Common Lisp for Clojurists

Brit Butler

(use arrow keys or PgUp/PgDown to move slides)

> whoami

Please stop me for questions whenever.

> Talk Overview

There is a plan but I can switch styles if you want:

Let's start with the lecture and veer off course when ready.

> Disclaimers

You'll probably miss some things...

And so on. But Clojure and CL are complimentary tools.

> But Why Common Lisp?

Should probably just address this head on...

We can discuss this further over beers. :)

> Some Historical Perspective

Common Lisp is to Clojure as OCaml is to Scala.

CL + OCaml reached "adulthood" in the mid-90s.

Both facing off against C++ as opposed to Java...
And thus more suited to "Systems Programming".

The Ecosystems can seem dated ... like CPAN.

> The Toolset

You need: Compiler, Editor, Build Tool, Package Manager

Compiler: Just Use SBCL or CCL.
(There is ABCL if you must JVM...)

Editor: Premier editors are Emacs/slime and vim/slimv.

Build Tool: It's simple, there is only ASDF.

Package Manager: Get quicklisp. There is no substitute. :)

Lispbox is also an option.

> The Language

Common Lisp is (as far as possible) a Systems Lisp.

Common Lisp is unopinionated, agnostic.

> The Language: Syntax

No literal syntax for...

Vectors are not [1 2 3] but #(1 2 3)

Functions are passed not as foo but #'foo

> The Language: Basics

Many things will be clear quickly:

Variables, Functions, Macros

Other things will be stranger:

Conditions, Format, Loop

> The Language: Object Oriented

We don't actually have methods, we have generic functions.

And we have both classes *and* structs...

But usually things are fairly straightforward.

> The Language: REPL Tools

There are tons of goodies for interactive development:

> The Language: Packaging

Packages are _roughly_ analagous to namespaces.

File can define multiple packages, package can have code in multiple files.

Systems are analagous to a library.

Defined by a foo.asd file in your project root.
Example: cl-scrobbler

> The Language: Extensions

Much like with Clojure, you can get outside the box...

> The Language: Non-Portable Magic

Ramble here if there's time?

> The "Community"

A few notable, minimally intersecting hangouts...

> The Ecosystem

Or, "What lib do I use for X?"

What about learning materials?

> Selected Projects: famiclom

A (wip) Nintendo Emulator in Pure CL

> Selected Projects: coleslaw

A Static Blog Engine a la Jekyll

> Selected Projects: cl-scrobbler


Slides Source