September 10, 2016 clojure racket lisp

'(Why Learn a Lisp?)

Programming in Lisp is a different kind of programming. Some things seem similar to your daily imperative treadmill, but mostly it’s different. There’s a different lexicon of terms, REPL-driven (or rather, -dominated) programming, there’s immutability, a really different type of (par)editing, a higher level of conciseness, a naturalness to using HoFs, a leaning on a small set of primitives, recursion as the norm, and so on.

It’s worth gaining some proficiency with a Lisp, if anything, to change the way you think about programming. In this post I explore the Lisp landscape, and try to convince you to get in on the Racket, for edification, fun, and even profit.

Lisp Engines

Lisp is embedded in a lot of places.

Despite Lua being often recognized as being The Embeddable Language, surprisingly many tools are programmable in Lisp. Some examples include: Gimp, Guix, Emacs, AutoCAD, LilyPond, GnuCash, Festival

There are several Lisps designed especially for embedding, such as Chibi-scheme, PicoLisp, TinyScheme, and Hedgehog.

BTW, I don’t discredit Vim for not having an embedded Lisp. I see most of Vim (even VimL) as a very special DSL. Even with Lisp, you just can’t get as concise as Vim commands.

Scheme learning resources

Books

Some of those are seminal classics that can teach you how to program like almost no other book. Notice that bent towards Scheme. That’s the beauty of Racket: decades of academic knowledge still applicable to a modern language. Most of those books available for free in web form.

If you want to get into Artificial Intelligence (AI), you’ll surely spend some time in Lisp.

Web

A few invaluable web resources are:

Lightweight

Racket installs everywhere. It has a small footprint and starts up quickly. Very modest student machines can run it without hitting any resource limits.

Although the community heavily supports their own IDE, there’s no reason you have to use it. It has some nice graphical-oriented features, but Vim and Emacs are great for editing Racket.

Decent REPL

Nice little REPL can do completion, and features a vi-mode. Works well with vim-slime.

But can you get paid to code in Lisp?

Yes. I think the most likely route right now is through Clojure. I loved my couple of years with it, but it’s a little too beastly to be promoting for student adoption.

ClojureScript (and Om/Reagent) is also sure to open up more webdev jobs.

So why learn Racket?

Successful Lisp companies/sites