News for hackers. Stuff that matters.
Re:How practical is Clojure? by chc on Tuesday September 06, 2011 @01:29PM (#2966377)
I agree that the things I named aren't tasks of huge importance, and I hope it doesn't seem like nit-picking, but they were examples of the sort of thing I like to do when I'm first looking at a language. I like to play around with the features the language touts, to try to get a good feel for how it "thinks". The other option is just to start out writing unidiomatic nonsense that doesn't use any unique features of the language, and I feel like I'm teaching myself bad habits when I do that.

Anyway, my point is, this is pretty much the state of the Clojure documentation right now:

On Clojure.org:

- List of features

- Alphabetical list of functions stretching as far as the eye can see

On ClojureDocs.org:

- List of functions by namespace

- Long list of functions by "category"

- A cheatsheet consisting of the long list of functions by category with descriptions removed

ClojureDocs is much better, but it still isn't enough to even implement a simple facsimile of hash-set or figure out how to start multiple threads in order to take advantage of all those swanky concurrency features. (The concurrency example is actually something practical I wanted to do. I have a slightly quirky bin-packing algorithm that I wanted to parallelize and I felt stumped staring at the list of functions. Finally I found a Stack Overflow post that said to just use Java's Thread.run with a Clojure function.)

Re:How practical is Clojure? by chousuke on Tuesday September 06, 2011 @05:13PM (#2967329)
Yeah, currently Clojure sort of assumes that you know enough to fall back to the Java class library if you can't find something in clojure.core, threading being a good example.

The documentation is mostly terse, but there is http://java.ociweb.com/mark/clojure/article.html which is more tutorial-like; though it's probably getting a bit old by now.

Re:How practical is Clojure? by moomin on Wednesday September 07, 2011 @10:31AM (#2969608)
Idiomatic way to do it is usually to call "future".