• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Clojure development environments

 
Ranch Hand
Posts: 54
Clojure Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for this new book. I've read some of it online, and I certainly look forward to reading the rest. (I'm also excited about the 2nd ed. of Stuart Halloway's book, _Programming Clojure_.)

Can you discuss development environments? Talk about the level of effort and expertise required to get started in:

1. The executable jar
2. clooj
3. Counter Clockwise
4. Eclipse
5. Emacs/swank

If I were evangelizing Clojure, the first thing I would want the recruit to see is how productive and fun the REPL environment is.
 
Rancher
Posts: 379
22
Mac OS X Monad Clojure Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rick Goff wrote:Can you discuss development environments? Talk about the level of effort and expertise required to get started in:


I'm sure Chas et al will jump in with more detail but I wanted to respond with a couple of points.

1. The executable jar


I really wouldn't bother with this and I wish the main Clojure site would just recommend Leiningen instead. Yes, it's straightforward if you're used to command-line Java execution and the classpath but it's a very basic REPL experience and not a great introduction to Clojure.

2. clooj


This is built and maintained by one of the guys in my local Clojure user group and he gave us a short presentation on some new features back in June: http://vimeo.com/43995167

You download the JAR, you double-click it - instant IDE with project support and a built-in REPL. Very easy to get started with. It's improving all the time but for most people, once you start building real systems with Clojure, you'll outgrow it and want to move on to a "real" IDE.

3. Counter Clockwise
4. Eclipse


Since Counter Clockwise is "just" a plugin for Eclipse, these really go together. I used CCW/Eclipse for a while and it's a good combination that will feel familiar to Java developers (if they use Eclipse). Chas can speak to this in a lot more detail since he's a contributor and heavily involved with the project.

5. Emacs/swank


This is my IDE of choice these days. Despite what some Emacs fans will tell you, it is not easy to setup, nor easy to learn (and almost no one ever truly "masters" Emacs), but it is extremely productive and has the best REPL integration of any of the IDEs (because it was designed for Lisp).

If I were evangelizing Clojure, the first thing I would want the recruit to see is how productive and fun the REPL environment is.


Definitely! I recommend downloading Leiningen - a simple shell script - and then "lein repl" gives you a nice, rich experience and you also have a full project / build tool in hand.
 
author
Posts: 27
Clojure
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rick Goff wrote:Thank you for this new book. I've read some of it online, and I certainly look forward to reading the rest. (I'm also excited about the 2nd ed. of Stuart Halloway's book, _Programming Clojure_.)

Can you discuss development environments? Talk about the level of effort and expertise required to get started in:

1. The executable jar



I don't think it's worth starting there at all. The basic REPL is too basic, and new users often don't know where to go from there for builds, dependency management, etc. If you're using Ant or Maven or Gradle, plugins are available to get you started with Clojure straight away; otherwise, go grab Leiningen. It's a very slick quick-start experience that includes a great REPL.

Rick Goff wrote:2. clooj



I'm afraid I've never used clooj, sorry.

Rick Goff wrote:3. Counter Clockwise
4. Eclipse



Eclipse uses the Counterclockwise plugin for its Clojure support (search for "clojure" in the Eclipse marketplace). I'm a contributor to that project, and it's what I use 24/7, so I may be biased, but I think it's the best option around for most people in terms of providing a practical mix of easy setup, integration with whatever build tool you care about (including Leiningen), reasonable text editing capabilities, and excellent (again, IMO) REPL support.

Rick Goff wrote:5. Emacs/swank



Emacs + SLIME/swank is nearly unbeatable in terms of absolute text editing power (they'll have to fight things out with the vim guys for that title), and it has a number of bells and whistles that are not available elsewhere. However, I think that, for most people, the usability issues around Emacs are large enough that I wouldn't recommend it unless you either know emacs already, or are interested and motivated enough to focus on learning Emacs as a distinct endeavor. I certainly wouldn't recommend trying to learn it at the same time as you learn Clojure, if you're new to both.

Rick Goff wrote:If I were evangelizing Clojure, the first thing I would want the recruit to see is how productive and fun the REPL environment is.



Indeed, which is why we emphasize "REPL-Oriented Programming" in the book (it has a whole chapter dedicated to the REPL and the types of development workflows that it makes possible), and why I talked about it some in my Starting Clojure screencast.

--
(coauthor of Clojure Programming from O'Reilly; creator of Clojure Atlas)
 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's the situation with tools to support debugging?

You've mentioned the relative ease with which code can be generated in Clojure, but how easy is it to inspect and step through this generated code at runtime?
 
Chas Emerick
author
Posts: 27
Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

chris webster wrote:What's the situation with tools to support debugging?

You've mentioned the relative ease with which code can be generated in Clojure, but how easy is it to inspect and step through this generated code at runtime?



Any JVM debugger can be used with Clojure code, as line numbers and filenames are included in the bytecode generated by Clojure by default. For example, you can set breakpoints in Clojure source files in Eclipse + Counterclockwise, and when execution pauses at the breakpoint, you can step into, over, and out of function and method calls, inspect locals, etc. The same goes for IntelliJ's Clojure support, and other debugger tools like JSwat.

One wart there is that Counterclockwise does not yet provide presenters for the Eclipse debugger UI to show Clojure collections pleasantly; so, if you have a map argument in a function that execution is paused at, the value shown in the debugger's inspector is Clojure's map implementation class, not an e.g. browsable tree representation of the map's entries. This item is fairly high on the TODO list for Counterclockwise.

Note that this presenter issue is an area where Emacs + SLIME currently does very, very well.

--
(coauthor of Clojure Programming from O'Reilly; creator of Clojure Atlas)
 
reply
    Bookmark Topic Watch Topic
  • New Topic