News for hackers. Stuff that matters.

Ask HN: clojure and JVM

Is there quick way to start clojure + JVM? I would like to start with simple GUI and then move to serial port manipulation. Then to connecting database. My background is electronics and I have never use java before. Any help is appreciated.
( 4 comments | 4 points | on HN )
Re:Ask HN: clojure and JVM by gtani on Tuesday September 22, 2009 @07:25AM (#836716)
Holloway book is excellent, and only $22 from a monstrously large online seller!

http://www.amazon.com/Programming-Clojure-Pragmatic-Programm...

Re:Ask HN: clojure and JVM by radu_floricica on Tuesday September 22, 2009 @09:01AM (#836826)
For what you want a java tutorial is the simplest thing. Then all you have to do is translate the syntax, eg System.currentTimeMillis() becomes (System/currentTimeMillis). And of course the briefest tutorial of lisp/clojure, just enough to learn to define a function.

Why? First because both GUI and serial manipulations are java things, not clojure. You'd have to learn the java parts anyways.

Then why stick to clojure? Actually, there is a great benefit to this: the REPL. For what you want, it will be much easier to just type things in the console and see if they work. I'd go as far as to say you should learn clojure syntax first, and then go through the java tutorials tying the examples in clojure. For both GUI and serial comm it'll be easier to learn this way.

edit: Holloway's is an excellent book, but I think in this case it's a bit of an overkill. It's worth buying anyways, just to have it for reference.

Re:Ask HN: clojure and JVM by ajuc on Tuesday September 22, 2009 @06:41AM (#836675)
Try eclipse + plugin to write in clojure - it gives you interactive console to explore clojure.

Download eclipse, then install: http://code.google.com/p/counterclockwise/wiki/Documentation

Re:Ask HN: clojure and JVM by yummyfajitas on Tuesday September 22, 2009 @08:01AM (#836752)
Slime does the same thing in emacs.