Re: Stout

2011-06-01 Thread David Jagoe
Well I like the name! On 2 June 2011 06:21, Andreas Kostler wrote: > Hi All, > > Stout is a porter stemmer implemention using a snowball-like syntax for > defining rules. > Rules are of the form {:c? condition :s1 "abc" :s2 "efg" :a action} > reading if condition is met, replace s1 with s2 and e

Re: Announcement: stockings clojure library for easy access to financial data

2011-06-01 Thread MohanR
Is that something like a mashup ? Thanks, Mohan -- 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

Re: Help with primer on maps, lists or vectors

2011-06-01 Thread MohanR
Those were useful ideas. I will read up more. But the thread got hijacked. -- 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 patie

Stout

2011-06-01 Thread Andreas Kostler
Hi All, Stout is a porter stemmer implemention using a snowball-like syntax for defining rules. Rules are of the form {:c? condition :s1 "abc" :s2 "efg" :a action} reading if condition is met, replace s1 with s2 and execute action. ## Usage (use 'stout.porter-stemmer) (map porter-stemmer coll

[ANN] Pallet-Hadoop (Hadoop clusters as data structures)

2011-06-01 Thread Sam Ritchie
Hey all, I'd like to announce Pallet-Hadoop, a layer built on top of Pallet that allows users to describe a Hadoop cluster configuration as a nested clojure map. Here's a cluster with one master node and two sl

Re: Re: Help with primer on maps, lists or vectors

2011-06-01 Thread Sean Corfield
On Wed, Jun 1, 2011 at 5:51 PM, Ken Wesson wrote: > On Wed, Jun 1, 2011 at 10:06 AM, Ambrose Bonnaire-Sergeant > wrote: >> Just to be clear, I linked to an unlimited time, free (cost), non-crippled >> demo. > Er, if such a thing exists, why would anyone pay at the tollbooth? As if we haven't spe

Re: Re: Help with primer on maps, lists or vectors

2011-06-01 Thread Ken Wesson
On Wed, Jun 1, 2011 at 10:06 AM, Ambrose Bonnaire-Sergeant wrote: > Just to be clear, I linked to an unlimited time, free (cost), non-crippled > demo. Ah. Er, if such a thing exists, why would anyone pay at the tollbooth? -- Protege: What is this seething mass of parentheses?! Master: Your fat

Re: Best/Idiomatic way of managing data that changes

2011-06-01 Thread Jeff Rose
I think the type of data structures you use will depend on how you need to access the data. For a GUI it's nice to be able to lookup a unit by ID, for example when it's clicked on, so I would probably store all units in a map by ID, and then have a separate location to ID map as you described. Th

Re: Best/Idiomatic way of managing data that changes

2011-06-01 Thread László Török
+1 for the pure functional approach with (tail)recursion :) 2011/6/1 Jonathan Fischer Friberg > I would say: > > 1. Make a function that, given a sequence of units and the next move, > returns an updated sequence given the move. > > 2. Make a recursive function that takes a sequence of units(*).

Re: using reduce instead of loop recur

2011-06-01 Thread Jonathan Fischer Friberg
Maybe not what you're looking for, but this is my take on this particular problem: (defn rem-dup [str] (->> str (partition-by (partial = \space)) (map #(if (= (first %) \space) \space %)) flatten)) I find partition-by the 'weapon of choice' when a sequence contains valu

Re: Retrieving individual maps (items) from a list.

2011-06-01 Thread Sean Corfield
On Tue, May 31, 2011 at 9:35 PM, mmwaikar wrote: > So, how do I retrieve individual maps from - (map #(zipmap [:a :b :c :d] %) > [[1 2 3 4] [5 6 7 8]]) [where :a :b etc. are columns and the second vector > is values] > because the above gives me back - ({:d 4, :c 3, :b 2, :a 1} {:d 8, :c 7, :b > 6

Re: Best/Idiomatic way of managing data that changes

2011-06-01 Thread Jonathan Fischer Friberg
I would say: 1. Make a function that, given a sequence of units and the next move, returns an updated sequence given the move. 2. Make a recursive function that takes a sequence of units(*). Put in the function body code for drawing the current board, and a query for the next move (or something s

Re: Who's using Clojure?

2011-06-01 Thread Sean Corfield
On Tue, May 31, 2011 at 11:39 AM, Sean Corfield wrote: > As of one hour ago, World Singles is now (finally) using Clojure in > production as part of our new internet dating platform. I'll send you > a write up for the success stories page once I've cleared it with > management (and after a suitabl

CfP + Deadline Extension: IEEE Software Special Issue: Algorithms and Today’s Practitioner

2011-06-01 Thread Cesare
[Please accept our apologies if you receive multiple copies] The deadline for the IEEE Software Special Issue on "Algorithms and Today’s Practitioner" has been postponed to the 15th of June 2011. - IEEE Software Special Issue on "Algorithms and Today’s Practitioner" Call for

Re: Re: Help with primer on maps, lists or vectors

2011-06-01 Thread Ambrose Bonnaire-Sergeant
On Wed, Jun 1, 2011 at 9:09 PM, Ken Wesson wrote: > On Wed, Jun 1, 2011 at 8:33 AM, Meikel Brandmeyer wrote: > > > > Am Mittwoch, 1. Juni 2011 13:50:15 UTC+2 schrieb Ken Wesson: > >> > >> Isn't that site behind a paywall? > > > > And? > > And, it's a bit of a bait-and-switch for someone to sugge

Re: Re: Help with primer on maps, lists or vectors

2011-06-01 Thread Ken Wesson
On Wed, Jun 1, 2011 at 8:33 AM, Meikel Brandmeyer wrote: > > Am Mittwoch, 1. Juni 2011 13:50:15 UTC+2 schrieb Ken Wesson: >> >> Isn't that site behind a paywall? > > And? And, it's a bit of a bait-and-switch for someone to suggest it to somebody without mentioning that fact. I, for one, absolutel

Aw: Re: Help with primer on maps, lists or vectors

2011-06-01 Thread Meikel Brandmeyer
Am Mittwoch, 1. Juni 2011 13:50:15 UTC+2 schrieb Ken Wesson: > > Isn't that site behind a paywall? And? -- 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

Re: Help with primer on maps, lists or vectors

2011-06-01 Thread Ambrose Bonnaire-Sergeant
On Wed, Jun 1, 2011 at 7:50 PM, Ken Wesson wrote: > On Wed, Jun 1, 2011 at 7:44 AM, Ambrose Bonnaire-Sergeant > wrote: > > Hi Mohan, > > If you are exploring the Clojure landscape may I recommend Clojure Atlas. > > http://www.clojureatlas.com/org.clojure:clojure:1.2.0?guest=t#ds/maps > > The cor

Re: Announcement: stockings clojure library for easy access to financial data

2011-06-01 Thread Ken Wesson
On Wed, Jun 1, 2011 at 7:50 AM, mark skilbeck wrote: > There goes my idea for a clojure stockings API that gives you an image > of a sexy woman in stockings. Who needs an API when you have Google Image Search? -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp RE

Re: Announcement: stockings clojure library for easy access to financial data

2011-06-01 Thread mark skilbeck
There goes my idea for a clojure stockings API that gives you an image of a sexy woman in stockings. On Tue, May 31, 2011 at 11:19 PM, Andreas Kostler wrote: > I certainly will have a look. I'm working on a technical analysis library so > you're lib will certainly be useful. > Andreas > > On 01/

Re: Help with primer on maps, lists or vectors

2011-06-01 Thread Ken Wesson
On Wed, Jun 1, 2011 at 7:44 AM, Ambrose Bonnaire-Sergeant wrote: > Hi Mohan, > If you are exploring the Clojure landscape may I recommend Clojure Atlas. > http://www.clojureatlas.com/org.clojure:clojure:1.2.0?guest=t#ds/maps > The core functions provided with Clojure are grouped by concept. Just t

Re: Help with primer on maps, lists or vectors

2011-06-01 Thread Ambrose Bonnaire-Sergeant
Hi Mohan, If you are exploring the Clojure landscape may I recommend Clojure Atlas. http://www.clojureatlas.com/org.clojure:clojure:1.2.0?guest=t#ds/maps The core functions provided with Clojure are grouped by concept. Just type a new subject into the search box. If you are trying to find a par

Aw: Help with primer on maps, lists or vectors

2011-06-01 Thread Meikel Brandmeyer
Hi, there are various ways to retrieve the value: (def m {:x 1, :y {"a" "b"}, :z #}) Useful if m might be nil: (get m :z) (get m :z some-default-if-not-found) If you know m is always non-nil the following is sometimes useful eg. with other HOFs like map etc. (m :z) (m :z some-default-if-not-fo

Help with primer on maps, lists or vectors

2011-06-01 Thread MohanR
How do I retrieve :z from this map? I've tried (val (find (...)) but I am still learning the ropes. Maybe a primer on maps, lists or vectors will help me. I use Java. I know that there is a String[] object. {:x 1, :y {"a" "b"}, :z #} Thanks, Mohan -- You received this message because you are

Aw: Best/Idiomatic way of managing data that changes

2011-06-01 Thread Meikel Brandmeyer
Hi, far from being a good design or whatever, but maybe this gets you started: (def fauna (ref {"Fighter 1" {:movement 3 :location [1 2]} "Troll 2" {:movement 1 :location [2 2]}})) (def world (ref {[1 1] #{} [1 2] #{"Fighter 1"} [2 1] #{} [2 2] #{"Troll 2"}}))

Best/Idiomatic way of managing data that changes

2011-06-01 Thread yair
Hi, I am writing a little board game in clojure, mostly to educate myself about how to organise and implement a larger-scale program than my usual tiny little snippets. The program has a central data structure of units which are placed on a map. Each unit has some information like a name, moveme