Best Clojure Learning Resource for Lisper

177 views
Skip to first unread message

HelmutKian

unread,
May 7, 2012, 12:37:42 AM5/7/12
to clo...@googlegroups.com
Hey there,

I'm a fairly experienced Common Lisp programmer.  By that I mean I've read PAIP, On Lisp, Let Over Lambda, and written several "real world" CL applications and taught the principles of FP using Racket as a TA.  

Now I'm looking to learn Clojure. What would be the best resource for someone who is already pretty comfortable with Lisp?

Thanks!

Jay Fields

unread,
May 7, 2012, 10:04:24 AM5/7/12
to clo...@googlegroups.com, clo...@googlegroups.com
I'd recommend The Joy of Clojure. You'll probably be able to skip some early chapters, but overall I feel like its the right book for someone with a decent working knowledge of lisp. 

Sent from my iPad
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Lee Spector

unread,
May 7, 2012, 10:34:49 AM5/7/12
to clo...@googlegroups.com
For me, coming to Clojure ore from Common Lisp and Scheme than from Java, the biggest hurdles weren't the language itself but rather the issues with setup, editing environments, build tools and configurations, dependencies, classpaths, etc. Many of the concepts underlying these things were foreign to me, at least in their Java-world guises. If any of this rings true to you then I'd recommend starting with the clooj lightweight IDE, which makes a lot of these issues go away (for me at least), in conjunction with leiningen (invoked from the command line after adding dependencies to your project.clj) to manage dependencies. You can get clooj here: https://github.com/arthuredelstein/clooj -- I'd download the latest "standalone" jar, double click it to launch the IDE, create a project, and begin working there. If you do your Lisping in emacs then there's great support for that route in Clojure too, and maybe that's where you want to end up, but I (and others) have found setup and configuration to be nontrivial. Doubtless others on this list will disagree with that :-), and of course YMMV, but that's my 2cents.

On the language itself I recommend watching Rich Hickey's "Clojure for Lisp Programmers" talk (part 1 is here: http://blip.tv/clojure/clojure-for-lisp-programmers-part-1-1319721) for starters. After that I personally used Stuart Halloway's "Programming Clojure" text but there are now several others that are also good.

-Lee

Jim - FooBar();

unread,
May 7, 2012, 10:05:11 AM5/7/12
to clo...@googlegroups.com
Well, if you already know CL and  can understand bit of Java (for interop), you're good to go!!!
Make sure you know about Clojure's immutable data-structures before anything else...this is the BIG difference between Clojure vs CL (Clojure wins here!) other than that,  prepare yourself for a wonderful ride with less parens and truly immutable collections! :-)

Have fun...

Jim

ps: check the clojure wiki and also there are 2 new books out there...the oreilly one is more than 600 pages!

Larry Travis

unread,
May 7, 2012, 3:10:42 PM5/7/12
to clo...@googlegroups.com, Larry Travis
Lee's comments ring true for me so let me extend them.

Before I discovered Clojure, my experience as a programmer had been mainly in the area of artificial-intelligence experimental programming.  I was once a reasonably proficient Lisp programmer, but pre-CL and pre-CLOS, that is, mainly using Xerox PARC's Interlisp.

Fast prototyping is central to such experimental programming, and Lisp  REPL's and IDE's have contributed as much to Lisp's pre-eminent usability for experimental programming as has the language itself.

So, when starting to use Clojure, my major frustrations were wrt Java interop and (to quote Lee) "... setup, editing environments, build tools and configurations, dependencies, classpaths, etc."

What I found of most use to begin with was Clojure Box (see http://clojure.bighugh.com), " an all-in-one installer for Clojure on Windows. It's inspired by the Lispbox: you simply install and run this one thing, and you get a REPL and all the syntax highlighting and editing goodies from clojure-mode and Slime, plus all the power of Emacs under the hood." Unfortunately, it has not been upgraded to Clojure 1.3.0 and is no longer being maintained -- and, anyway, I wanted to work on a Mac.

And something almost as good as Clojure Box is now available for Macs (as well as for Windows and Linux systems). See

https://github.com/technomancy/swank-clojure/blob/master/README.md

If you are not into the intricacies of Emacs multi-key chording, using Aquamacs helps a bit. (Despite the statement in the README that "Swank-clojure and SLIME are only tested with GNU Emacs; forks such as Aquamacs  ... are not officially supported", use of the Aquamacs Emacs fork does work.)

I agree with Lee that, if you don't know Emacs (or don't want to be learning it at the same time you are learning Clojure), the clooj IDE should be useful as a starter -- maybe eventually something more as features like SLIME's debugging aids are added to it.

There are several excellent books useful as Clojure learning aids. (I particularly recommend Halloway and Bedra, "Programming Clojure"; Fogus and Hauser, "The Joy of Clojure"; and Emerick, Carper, and Grand, "Clojure Programming".) Unfortunately, none of them contain a chapter that has yet to be written by somebody: "Everything a Clojure programmer who has never used Java needs to know about it."

I hope this helps.
  --Larry

Lee Spector

unread,
May 7, 2012, 9:57:53 PM5/7/12
to clo...@googlegroups.com, Larry Travis

On May 7, 2012, at 3:10 PM, Larry Travis wrote:

> Lee's comments ring true for me so let me extend them.
>
> Before I discovered Clojure, my experience as a programmer had been mainly in the area of artificial-intelligence experimental programming. I was once a reasonably proficient Lisp programmer, but pre-CL and pre-CLOS, that is, mainly using Xerox PARC's Interlisp.

Ah, Interlisp! We're definitely on the same page. (Although I later worked a fair bit with CL and CLOS.)

> ...
> If you are not into the intricacies of Emacs multi-key chording, using Aquamacs helps a bit. (Despite the statement in the README that "Swank-clojure and SLIME are only tested with GNU Emacs; forks such as Aquamacs ... are not officially supported", use of the Aquamacs Emacs fork does work.)

FWIW I've often thought that it would be really wonderful to have real Aquamacs support/polish for swank-clojure/SLIME, especially if it could be packaged in form that permitted something close to single click download/install of a complete Aquamacs Clojure programming environment. I would probably migrate to such a thing (for my research and teaching, which are linked) if it existed.

> I agree with Lee that, if you don't know Emacs (or don't want to be learning it at the same time you are learning Clojure), the clooj IDE should be useful as a starter -- maybe eventually something more as features like SLIME's debugging aids are added to it.

Clooj is still pretty rudimentary, but it's getting better all the time. I use it for real work (research programming and teaching).

> There are several excellent books useful as Clojure learning aids. (I particularly recommend Halloway and Bedra, "Programming Clojure"; Fogus and Hauser, "The Joy of Clojure"; and Emerick, Carper, and Grand, "Clojure Programming".) Unfortunately, none of them contain a chapter that has yet to be written by somebody: "Everything a Clojure programmer who has never used Java needs to know about it."

On "Programming Clojure": I learned from and then taught with the first edition and I liked it very much, but in the present context it's worth noting that the running example used through the book involves the development a build tool -- exactly the wrong sort of thing for someone coming mostly from the Lisp side of things.

-Lee

Sean Corfield

unread,
May 7, 2012, 11:02:01 PM5/7/12
to clo...@googlegroups.com
On Mon, May 7, 2012 at 6:57 PM, Lee Spector <lspe...@hampshire.edu> wrote:
> On May 7, 2012, at 3:10 PM, Larry Travis wrote:
>> If you are not into the intricacies of Emacs multi-key chording, using Aquamacs helps a bit. (Despite the statement in the README that "Swank-clojure and SLIME are only tested with GNU Emacs; forks such as Aquamacs  ... are not officially supported", use of the Aquamacs Emacs fork does work.)
> FWIW I've often thought that it would be really wonderful to have real Aquamacs support/polish for swank-clojure/SLIME, especially if it could be packaged in form that permitted something close to single click download/install of a complete Aquamacs Clojure programming environment. I would probably migrate to such a thing (for my research and teaching, which are linked) if it existed.

I'm curious - what does Aquamacs give you over Emacs 24 from
http://emacsforosx.com/builds ? cmd-x / c / v all work in Emacs 24.
cmd-a for select all. page up / down. back / forward word. cmd-z for
undo.
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Lee Spector

unread,
May 7, 2012, 11:21:21 PM5/7/12
to clo...@googlegroups.com

On May 7, 2012, at 11:02 PM, Sean Corfield wrote:
> On Mon, May 7, 2012 at 6:57 PM, Lee Spector <lspe...@hampshire.edu> wrote:
>>
>> FWIW I've often thought that it would be really wonderful to have real Aquamacs support/polish for swank-clojure/SLIME, especially if it could be packaged in form that permitted something close to single click download/install of a complete Aquamacs Clojure programming environment. I would probably migrate to such a thing (for my research and teaching, which are linked) if it existed.
>
> I'm curious - what does Aquamacs give you over Emacs 24 from
> http://emacsforosx.com/builds ? cmd-x / c / v all work in Emacs 24.
> cmd-a for select all. page up / down. back / forward word. cmd-z for
> undo.

My recollection was that Aquamacs had more support for Mac OS native menus and other GUI elements too... but maybe that's not right and I'm making a bigger distinction than I should between Aquamacs and other Mac OS emacs builds. What I should have said would be "really wonderful," more precisely, is something with "close to single click download/install of a complete [emacs] Clojure programming environment" and also with as much native GUI convention support as possible, to ease the discovery of features and minimize the need to memorize emacs key combinations, especially for newbies (but also for me and I've been using emacs in some ways for decades).

-Lee

Sean Corfield

unread,
May 7, 2012, 11:40:59 PM5/7/12
to clo...@googlegroups.com
On Mon, May 7, 2012 at 8:21 PM, Lee Spector <lspe...@hampshire.edu> wrote:
> My recollection was that Aquamacs had more support for Mac OS native menus and other GUI elements too...

Probably, yes. I installed it last year and I seem to recall some
native chrome and a menubar - but then folks recommended using Emacs
24 so I switched and haven't had any problems. I expand Emacs to
near-fullscreen and I like the lack of distractions (lack of chrome)
since I work in it all day.

> What I should have said would be "really wonderful," more precisely, is something with "close to single click download/install of a complete [emacs] Clojure programming environment"

That's certainly true. Any Emacs-based approach is a multi-step setup
right now and everyone seems to have their own favorite way to set
things up. I've helped a number of Mac users get Emacs 24 + Starter
Kit + Leiningen + Swank-Clojure up and running and I always seem to
forget some minor step and have to redo _something_ :)

Larry Travis

unread,
May 8, 2012, 2:03:38 AM5/8/12
to clo...@googlegroups.com, larry Travis
Sean and Lee:
In general, I have considered the difference between Aquamacs and GNU Emacs to be that the former prioritizes computer-user interaction via mouse, command-bars and menus (which requires a lot of hand movement between keyboard and mouse, but enables the user to dispense with memorizing the meanings of dozens of key chords) -- while the latter minimizes user need to move hands off the keyboard thus facilitating fast touch typing (using key combinations to move point, set mark, copy region, etc.)

Whether key bindings (especially those that involve the Apple command key) conform to Apple style helps if you are used to them from other Mac applications, but is a secondary difference. By the way, I can't find just what bindings to the command key Emacs 24 (for Os X) does use. (Aquamacs comes with 41!) The Emacs-24 C-h b listing doesn't seem to show them.

A difference that I find very useful is the use of tabs in Aquamacs for rapidly controlling which buffers are being displayed. (One can create a new buffer either in a new frame or under a new tab in an existing frame.)

There are other differences, but none of the differences between Aquamacs and GNU Emacs (including the ones just mentioned) are critical to what makes a good Emacs-based Clojure IDE, and I will be perfectly happy with either Aquamacs or GNU Emacs as the base of a "Mac Clojure Box" downloadable as are many Mac applications (from the Mac Apps Store?) and installable simply by dragging an icon into the applications folder.

Talk about being a parasitic noobie.  I wish I had the expertise to help Phil Hagelberg and other swank-clojure and Leiningen contributors toward achieving this goal.  What they have developed so far takes us a long way toward it  (whether or not it is one of the goals they have explicitly in mind).
  --Larry
Reply all
Reply to author
Forward
0 new messages