How do I add another lib? ... Show an example without cheating!
It's amazing that you get voted up when you clearly did not read my post. I wrote: "If I needed a different library, I'd have edited project.clj to include the dependency." Let me explain that in detail:
To wit: you add a dependency by including it in the :dependencies vector. For example, Berkeley DB JE would be [com.sleepycat/je "4.0.92"]. Then you run "lein deps", which takes care of the rest.
I hope you aren't arguing that editing a text file to include a dependency is too difficult, so I'll address your other point: the Clojure site does not mention Leiningen. There's actually a good reason for it: it is not a core necessity for using the language; you don't have to use Leiningen to use Clojure. If you understand the classpath, you don't really need it. Leiningen is a convenience, not a necessity of life.
I'll readily agree that an overview of available development aids would make for a nice addition to clojure.org. No definitive "Beginner's Guide to Programming in Clojure" exists. It would ideally explain how to get started at the REPL, how to use SLIME and swank-clojure to work with Emacs, and how to use VimClojure to work with vi, how to handle packaging, and how to deal with dependencies. It would also explain why and how someone might want to use Ant, Maven, Ivy, Leiningen, and the clojars.org repository. I'm sure that someone will write this guide some day soon.
This still assumes a lot. It assumes the lib is in a maven rep, it assumes use of lien which isn't standard like gems at this point, and let's be honest, maven is a beast compared to gems.
You said that clojure is as easy as ruby for a noob. The simple fact is that it isn't, and you've essentially admitted as much.
You don't read my posts, but you're getting upvotes, and this story still has traction on HN. I apologize for continuing this discussion, but you are spreading FUD, and some people might getting the wrong impression.
It assumes the lib is in a maven rep
Gems assumes that the gem is available in a Gem repository. I see no practical difference.
it assumes use of lien [sic]
"rubygems" is a separate package from MRI in Ubuntu. Standard or not, you have to install it. You also have to install Leiningen. With time, Leiningen or a tool like it will become a de-facto standard. Your original post strongly implied that no good tools exist for Clojure package management. This is false, and I refuted this claim.
maven is a beast
Yes. I wrote that in my original post; I'm glad you at least read that part. Leiningen uses Maven repositories and dependency resolution under the hood, yes. My example, however, does not use Maven at all. Most projects which use Leiningen to manage dependencies do not need to worry about Maven's intricacies at all.
You said that clojure is as easy as ruby for a noob.
Nowhere in any post did I say that Clojure the language is as easy as Ruby. That would have been a meaningless statement.
I actually said that the Java classpath is no worse that PYTHONPATH or GEM_PATH. I meant exactly that. Dependency path management sucks in every environment I've ever seen. I said nothing at all about the Gem toolchain, or how well it helps mitigate the problem. It certainly has had several years to mature. That said, six month-old Leiningen is decently close to the simplicity that Gems provides.
me: "It assumes the lib is in a maven rep"
you: "Gems assumes that the gem is available in a Gem repository. I see no practical difference."
Hm, I can't figure you out. Your statement is missing the point. I don't know if you see that point and are cherry picking on purpose or if you don't know both ecosystems. I've done a lot of ruby, a lot of java, and a fair amount of clojure. I frequently run into very common java libs that are not in a maven repo. It's a common occurrence. I can't think of any significant ruby lib that isn't in a gem repo. The two situations are not equivalent.
"Nowhere in any post did I say that Clojure the language is as easy as Ruby."
Again, this is literally correct, but I feel you've implied it. You're like the Karl Rove of comp sci. The original comment was complaining that the clojure noob experience appeared painful. You then said that the java classpath was no worse than gem_path.
This is both wrong (the need for class loaders is one example of why, and my highlighting of the ease of use of gems is another), but it's also clearly implying that using libs in clojure is as easy for a noob as it is in ruby land.
You can claim that you weren't implying that, but if that's the case then your reply was meaningless. Again, this is Karl Rove style hair splitting on your part.
Let me be clear then. The noob experience in ruby is much better than in clojure. Do you disagree? I've taken your statements as implying that, but you claim to have never said it explicitly, so now I'm asking you outright.
Wow, someone needs to calm down. Stop calling people Karl Rove because they aren't seeing the same argument you are. Maybe it's deliberate, maybe it's not, in either case the accusation looks foolish.
After using both, the noob experience in Ruby is better than in Clojure. I've had cases where more "advanced" library/package management was easier in Clojure (really, Maven) due to system local vs. project local package lookup. It's entirely possible that says more about my knowledge on the subject than anything else.
If someone accuses me of spreading FUD, while they are intentionally cherry picking at best, then I'm going to respond. It's my nature to respond to personal attacks against me.
Oddly you don't find him foolish for the FUD comment, just me for responding to it.
It's amazing that you get voted up when you clearly did not read my post. I wrote: "If I needed a different library, I'd have edited project.clj to include the dependency." Let me explain that in detail:
lein generates the following default project.clj:
Then you change it to: To wit: you add a dependency by including it in the :dependencies vector. For example, Berkeley DB JE would be [com.sleepycat/je "4.0.92"]. Then you run "lein deps", which takes care of the rest.I hope you aren't arguing that editing a text file to include a dependency is too difficult, so I'll address your other point: the Clojure site does not mention Leiningen. There's actually a good reason for it: it is not a core necessity for using the language; you don't have to use Leiningen to use Clojure. If you understand the classpath, you don't really need it. Leiningen is a convenience, not a necessity of life.
I'll readily agree that an overview of available development aids would make for a nice addition to clojure.org. No definitive "Beginner's Guide to Programming in Clojure" exists. It would ideally explain how to get started at the REPL, how to use SLIME and swank-clojure to work with Emacs, and how to use VimClojure to work with vi, how to handle packaging, and how to deal with dependencies. It would also explain why and how someone might want to use Ant, Maven, Ivy, Leiningen, and the clojars.org repository. I'm sure that someone will write this guide some day soon.