On Mar 7, 6:35 pm, jshore <jonathan.sh...@gmail.com> wrote: > Wondering whether anyone has done something very complex in the algo > space or comparable so can get an idea of how this sort of stuff is > structured idiomatically. I will also be concerned with performance > and memory use, as one of my strategies creates a few thousand sub- > strategies and/or also uses massive matrices that get updates from > tick to tick.
Recently, I have been using Clojure to implement a model we introduced related with hypergraphs. For this purpose, most of the heavy work is done in C libraries (JNA is quite easy to use) and pure Java libraries (thanks to Java interop.), hence no problems so far. And Clojure supplies a cool interface to pure Java arrays (int-array, float-array, etc.) in a relatively reasonable way. But AFAIK, there is no way to use multi-dimensional arrays (i.e. int[][]) asis in Clojure. (I might be missing something about this, folks told that there are no real multi-dimensional arrays in Java either.) And it is a PITA to write imperative code in Clojure, and most algorithms are written in an imperative style. (You know, "for (i = k; i < c; i++) ..." loops everywhere.) But it is not hard to implement a few utility macros for yourself. (Hrm... A contrib library would be really awesome.) Moreover, Clojure data structures and their J2SE suplements really eases your work -- think all industrial quality set, list, priority queue, etc. implementations. To sum up, I must admit that Clojure (or more generally speaking, Lisp) stands as a quite effective tool to bridge between algorithms. Regards. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en