Clojure on Android [closed]

Yes, here is main project I am aware of: https://github.com/remvee/clojurehelloandroid And here is a little tutorial http://riddell.us/ClojureAndAndroidWithEmacsOnUbuntu.html though I would not be surprised if this tutorial is outdated, as it was over a year ago when I played with the code following this tutorial, and remvee’s code has since been updated. EDIT: see the update … Read more

Producer consumer with qualifications

Here’s my take on it. I made a point of only using Clojure data structures to see how that would work out. Note that it would have been perfectly usual and idiomatic to take a blocking queue from the Java toolbox and use it here; the code would be easy to adapt, I think. Update: … Read more

what’s a good persistent collections framework for use in java?

Just use the ones in Clojure directly. While obviously you might not want to use the language it’s self, you can still use the persistent collections directly as they are all just Java classes. import clojure.lang.PersistentHashMap; import clojure.lang.IPersistentMap; IPersistentMap map = PersistentHashMap.create(“key1”, “value1”); assert map.get(“key1”).equals(“value1”); IPersistentMap map2 = map.assoc(“key1”, “value1”); assert map2 != map; assert … Read more

How to list the functions of a namespace?

I normally call (keys (ns-publics ‘foo)) to list Vars exported by the namespace foo; e.g. for clojure.contrib.monads this returns (defmonad censor m-when-not m+write+m maybe-m maybe-t …) (the … stands for quite a lot more). More generally, there’s a bunch of functions whose names start in ns- which list Vars by namespace, with certain additional criteria … Read more