

Ask HN: Getting started with Clojure - chaosprophet

Hi all,
I recently decided to start learning Lisp, and after some very unscientific research decided on Clojure. I'd like to know about some good resources to start learning clojure. I come from a mostly C background.<p>Also, I don't believe in starting small and then gradually writing more complex programs, I usually just do a small Hello World and then jump directly into a decently complex program, and I'd like to do the same with clojure. Is this a good approach to clojure?<p>Ideally, I'd like to get started with a small GUI program.<p>Regards,
chaosprophet<p>Edit: I don't know anything about functional programming either.
======
francoisdevlin
I strongly recommend Stuart Halloway's book, Programming Clojure.

<http://pragprog.com/titles/shcloj/programming-clojure>

Mark Volkmann also wrote a pretty good article:

<http://java.ociweb.com/mark/clojure/article.html>

Stop by the Google group with ANY questions. No question is too silly. We're
all dying to help.

<http://groups.google.com/group/clojure>

Once you get the basics down, and you don't mind some shameless self
promotion...

<http://vimeo.com/channels/fulldisclojure>

SFD

~~~
Zak
Don't forget #clojure on freenode. I've lost count of the number of stupid
questions I've had answered there. Rich Hickey is active on the channel and
may even be the one to answer your questions.

------
gtani
I haven't done any GUI's in clojure, but i think swing is best doc'd, stuart
Sierra series:

[http://stuartsierra.com/2010/01/03/doto-swing-with-
clojure?0...](http://stuartsierra.com/2010/01/03/doto-swing-with-
clojure?0.004707886526261973)

[http://stuartsierra.com/2010/01/02/first-steps-with-
clojure-...](http://stuartsierra.com/2010/01/02/first-steps-with-clojure-
swing)

\--------------------

or SWT:

[http://berlinbrowndev.blogspot.com/2009/02/doing-it-wrong-
fu...](http://berlinbrowndev.blogspot.com/2009/02/doing-it-wrong-fun-with-
clojure.html)

[http://www.li-am.com/2009/08/button-in-eclipse-swt-
clojure.h...](http://www.li-am.com/2009/08/button-in-eclipse-swt-clojure.html)

<http://www.li-am.com/2009/08/swt-is-alive-from-clojure.html>

<http://www.li-am.com/2009/08/jface-examples-in-clojure.html>

\----------------

there's also bits on Qt and JWT, search for them

~~~
chaosprophet
Thanks, I was thinking of using Qt, but I'll look into the others too.

~~~
dkarl
If you want to proceed quickly from Hello World to a complex application, I
suggest looking at Eclipse RCP, which uses SWT. Whether it is suitable will
depend on what kind of app you want to build. Here's a list (with screenshots)
of open-source apps that use Eclipse RCP:

<http://www.eclipse.org/community/rcpos.php>

------
jacquesm
I found this comment to be _most_ helpful:

<http://news.ycombinator.com/item?id=1033503>

~~~
gtani
that's not a comment that's the _Iliad and Odyssey_ of cloj tutorials

~~~
hga
More of a meta-tutorial, but thanks! I've never been compared to Homer
before....

I just reviewed it and it's still current, there are no new video venues that
I know of and the next Clojure books are still in progress.

~~~
jamesbritt
"I've never been compared to Homer before...."

I have, but it involved the word "Doh!" :)

Thanks for the extra-informative post; it makes poking around Clojure less
daunting.

------
Zak
It's a big help if you have a baseline ability to read Java, as it's likely
the example code for libraries you'll want to use is in Java. You don't need
to be able to create a baroque class hierarchy yourself as long as you can
navigate one well enough to figure out the library calls you need to use.

Clojure is a fairly gentile introduction to functional programming, I think.
You can do imperative-style things with the reference types, so you don't need
to completely learn how to structure the logic of a program.

~~~
chaosprophet
I'm fairly decent with Java, so I guess working with java libraries shouldn't
be a problem.

------
darkxanthos
I want to get started in Clojure too. Rich Hickey's talks on InfoQ have been
making me feel kind of funny... like when we used to climb the ropes in gym
class.

But seriously, yeah I'd love to find a project to play with its concurrency
features and learn some gui as well.

------
mark_l_watson
Setting up IntelliJ (version 9, either free open soirce version or commercial
version)with the Clojure plugin was a good start for me. I bought Stuart's
book (physical book) and the other two Closure books as work in progress PDFs
- good references and a help to write idiomatic Clojure code.

BTW, IntelliJ free version also works well with the Scala plugin, so you can
mix Java+Clojure+Scala in one project. With the commercial version, you can
add JRuby to the mix.

~~~
jacquesm
Why on earth would you want to build a website using four different languages?

Isn't the fact that you always get HTML+CSS and JavaScript tossed in for free
enough of a nightmare?

~~~
mark_l_watson
A fair question: I am writing a utility in Java, but I wanted to supply
idiomatic wrappers for JRuby, Scala, and Clojure.

------
anonjon
That's what I did to learn Clojure.

The only problem with starting off doing GUI is that you will be in javadoc
hell learning swing (or whatever) at the same time as Clojure. But it is nice
having GUI essentially baked into the language.

