tags:

views:

501

answers:

6

Hello,

I have started learning Clojure recently, my main programming language is Ruby and I have no Java experience whatsoever.

  • Which Java standard classes are a must to know when working with Clojure?

    Obviously Clojure doesn't come with a wrapper for everything and a lot of functionality is provided by Java's libraries.

    There's like a gazillion of them on javadocs - which ones should I explore?

  • Where do I look for and how do I install third party libraries (clojure and java ones)?

    In Ruby I'd visit Rubyforge or Rubytoolbox, git etc. and then just gem install the package I found interesting.

  • Which editor/ide for Clojure would you recommend (with the lowest learning curve)?

    I am trying to use Netbeans with Enclojure and paradoxally it's my biggest obstacle so far:

    Each generated project has some xml files, folders, library dependencies etc. the purpose of I have no clue.

    I am doing some labrepl exercises and wanted to try out some of the bundled libraries separately in a new project, but this simple task I cannot accomplish :/

  • How to distribute clojure programs?

    This is pretty much related with the question above.

  • Are there any clojure community driven blogs with news, code tips etc?

+1  A: 
  • for blogs you need to look to Planet Clojure
  • for Java - you need at least know java.lang & java.io
  • for IDEs description it's better to look to Getting Started page
  • for using 3rd party libraries you can use Leiningen or Maven build tools - they both provide automatic resolve of dependencies. Getting Started page contains all necessary information
  • distibution of Clojure programs usually implemented as providing jar with source (or compiled) code. You can bundle only your code with 'lein jar' or provide complete solution with all dependencies with 'lein uberjar' commands
Alex Ott
You actually have to make a project.clj for your project before you can just magically lein uberjar your problems away.
Rayne
+5  A: 

Explore the javadocs only as needed when you can't figure out how to do something using Clojure's core API or the Clojure contrib libraries.

For 3rd party libraries, there is Clojars. I'm not sure how widely it has been adopted by the community, but it's a good place to start. Many Clojure projects are hosted on github, so you can try searching for clojure there.

If you already know Emacs, there is good support for editing Clojure in Emacs. If you don't know Emacs, don't try to learn Emacs and Clojure at the same time. Check out the getting started page on the Clojure wiki for infomation on getting going with a number of different IDE's. Unfortunately, the wiki link on the Clojure homepage is wrong.

Finally, check out Planet Clojure for lots of good blog posts about using Clojure for a wide variety of different things, including helpful posts on getting started.

mch
The Clojars is ugly because there is no browse or categories.
edbond
+1  A: 

Which Java standard classes are a must to know when working with Clojure??

Clojure is a radical change from Java. I suggest you concentrate only on one of them (clojure) and and not both. There is plenty to learn anyway. Use use a basic editor, and use the REPL as much as you can. A good intro for clojure is in here and here

Where do I look for and how do I install third party libraries?

Clojure contrib is a good place to start http://github.com/richhickey/clojure-contrib Another one is leninmgen -http://zef.me/2470/building-clojure-projects-with-leiningen

Which editor/ide for Clojure would you recommend (with the lowest learning curve)?

Just use notepad++ or vim. It should be more than enough for you. I personally use kate under ubuntu because it gives you lisp code formatting. The hard core users probably use emacs (which I really hate)

Are there any clojure community driven blogs with news, code tips etc?

The Clojure google group is friendly and very knowledgeable

bugspy.net
+3  A: 

Which Java standard classes are a must to know when working with Clojure??

None. You can get by with googleing and asking questions on the Clojure IRC channel here. You'll learn what you need over time. You can investigate java.lang and java.io classes, but you wont need them until you need them.

Where do I look for and how do I install third party libraries?

Leiningen is an extremely simple maven-wrapper-kinda-thingy. You can use it for dependency management and as a build tool for your code, http://github.com/technomancy/leiningen, and there is http://clojars.org/ where lot's of Clojure libraries are placed in a maven repo that can be accessed by Leiningen and Maven. http://www.assembla.com/wiki/show/clojure/Getting_Started

Which editor/ide for Clojure would you recommend (with the lowest learning curve)?

That would probably be Enclojure, or Counterclockwise. Most Clojure users use Emacs or to a lesser extent, Vim. Emacs is the best editor around for Lisp, but has a bit of a learning curve to get friendly with. If you aren't willing to learn a language and an editor, you might want to head in the Enclojure/Eclipse(counterclockwise) direction.

Are there any clojure community driven blogs with news, code tips etc?

http://planet.clojure.in/ and the Google group.

How to distribute clojure programs?

Easiest way is with Leiningen and the jar and uberjar commands. You can write your code, and then you can put that code in a .jar file and write a start-up script for it. You don't even have to put it in a jar if you don't want to. Jars are really only useful if you actually compile your code, and most Clojure code isn't compiled. Certain features require compliation, but they aren't used that much.

All in all, the Clojure IRC channel is very helpful and newbie friendly. It can be difficult entering JVM-world without prior experience. Don't be afraid to stop in and ask questions. We're here to help.

Rayne
+2  A: 

Which Java standard classes are a must to know when working with Clojure?

It's not so much java language that you have to know about for Clojure, though it helps. The most important knowledge is how to compile, how to set the classpath, and so forth. I've programmed in java a bit, and I still find this tripping me up at times.

It might also be useful to go through one or two beginner tutorials on java, but don't spend much time on this at all.

Where do I look for and how do I install third party libraries (clojure and java ones)?

You can use leiningen to manage dependencies per project automagically. (I've edited this portion of my answer. Upon further evaluation, Leiningen is the way to go in almost all cases.)

Which editor/ide for Clojure would you recommend (with the lowest learning curve)?

I've learned to love emacs. The major java IDEs all have their own clojure flavour available (in decreasing order of maturity):

  • Netbeans -- enclojure
  • IntelliJ -- la clojure
  • Eclipse -- counterclockwise

If you have any inclination to learn emacs, though, this might just be the time. This tutorial is ridiculously comprehensive.

How to distribute clojure programs?

In jars.

Are there any clojure community driven blogs with news, code tips etc?

The google group and planet clojure.

(EDIT: added blanket recommendation of Leiningen.)

Rob Lachlan
+3  A: 

There will be a free month-long Clojure course on RubyLearning starting next week that could be interesting for you:

http://rubylearning.com/blog/2010/03/09/clojure-101-a-new-course/

Michael Kohl