Dear J-Community,

After doing this blogpost: 
http://www.bestinclass.dk/index.php/2009/11/beautiful-code-take-1/
and reading the comment from Mr. Tracy Harms I picked up (or is trying 
to pick up) J. Already I've seen a change in the way I model code, when 
I first have an outline from J and so I tried to describe the mental 
effect of J here: 
http://www.bestinclass.dk/index.php/2009/11/mind-games-ascension/

And after dabbling a little in J again, I tried to convert that code to 
Lisp: http://www.bestinclass.dk/index.php/2009/11/life1d-in-clojur/
with some interesting results.

I mention this because I hope you'll find it interesting, but also 
because I've now come up with an idea, which is potentially a little 
hairy. I want to be able to write code which is centered in Clojure and 
modeled after its principles, but incorporating J functions. A simple 
example could be a function which takes a list of lists as its argument 
and returns the average of each list:

(defn averages [lists]
   (let [compute-average (j +/ % #)]
     (map compute-average lists)))

Normally taking an average in Clojure would be done like so (/ (reduce + 
list) (count list)) and I think J is clearer and it would open up some 
interesting opportunities. Effectively putting J to good use where it 
really shines and then relying on Lisp for the rest. I think it would be 
a very powerful cocktail, what are your thoughts?

Secondly I need to some pointers with the practical side. I searched 
through JSoftware.com looking for an API description or Javasource to no 
avail - Where can I find the documentation which describes the interface?


Best regards,
Lau B. Jensen
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to