Re: idiom question: infinite sequence as data source for many threads?

2010-01-31 Thread Timothy Pratley
On 1 February 2010 15:21, free_variation wrote: > Mind if I use it? Of course I don't mind. It is intended for your use. :) Regards, Tim. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.co

Re: idiom question: infinite sequence as data source for many threads?

2010-01-31 Thread free_variation
Excellent, very nice. Mind if I use it? jds On Jan 30, 2:09 am, Timothy Pratley wrote: > Below I present 'submit-future' which is similar to the existing > 'future' call in that it spawns a thread to execute a task, but > differs in that it will block if n submitted futures are already > runnin

How to Initiate Clojure Application

2010-01-31 Thread Wardrop
I'm having trouble finding any resources on the net for telling me how to initiate a Clojure application. I'm currently using Netbeans with a Clojure plugin, and from what I gather from one of the examples, I need to define a main function as the launching point for my app, but there seems to be a

Re: Domain Modelling

2010-01-31 Thread Barry Dahlberg
Perhaps I'll write up my findings once the language stops intimidating me. At the moment I'm writing an account "object". I have some standard CRUD type functions which operate on a map behind the scenes. I would like to add some metadata to start specifying rules for validation, UI generation a

Re: clojure.contrib compile fail

2010-01-31 Thread Stuart Sierra
This has been fixed now. -SS On Jan 30, 9:07 am, Jeff Schwab wrote: > Hi: > > What is the right place to report a clojure-contrib compile failure, or > to look for information? > > The clojure-contrib I just pulled from github fails to compile, with an > error that the ColumnWriter class extended

About releasing clj-peg under the EPL 1.0

2010-01-31 Thread Richard Lyman
I have a few questions I'm hoping to get some feedback on. = Releasing source code = If I understand the EPL 1.0 correctly, under section 3(b) part IV, I'm forced to release my source code - right? I _cannot_ just release an AOT JAR under the EPL 1.0 and keep the source code under a different l

Re: clojure box 1.0 failed to connect to emacs server

2010-01-31 Thread Shawn Hoover
On Sat, Jan 30, 2010 at 10:11 PM, Shawn Hoover wrote: > > On Sat, Jan 30, 2010 at 5:48 PM, Rollo wrote: > >> Hi Shawn, >> >> Just tried with 1.1.RC1 - no luck. Emacs server won't start and system >> will start spawning thousands of cmdproxy processes again. >> Where does that bad condition comes

Re: Clojure on Nokia N900

2010-01-31 Thread npt11tpn
Hi, Excellent, nicely done! (reduce + (range 1000)) takes about 4 msecs on N900 with the Sun JRE. For comparison: 0.3 msecs on MacBook Pro, 2.16 GHzCore Duo, 2 GB RAM. Emacs, git etc. install fine, the Maemo5 OS on N900 is Debian-ish. The root partition however is very small (256 MB) and debian pa

Re: update-in and get-in why no default?

2010-01-31 Thread Meikel Brandmeyer
Hi, Am 31.01.2010 um 18:29 schrieb Daniel Werner: >> ([m ks not-found] >> (if-let [v (reduce get m ks)] >>v >>not-found))) > > If I understand this arity version of get-in correctly, won't the > default also be used if the value stored in the nested data structure > evaluates to somethi

Re: update-in and get-in why no default?

2010-01-31 Thread Daniel Werner
> ([m ks not-found] > (if-let [v (reduce get m ks)] > v > not-found))) If I understand this arity version of get-in correctly, won't the default also be used if the value stored in the nested data structure evaluates to something false-y? Anyway, thanks for creating the patches! -- Y

Re: Count the number of times a function was applied

2010-01-31 Thread Gabi
update-in for every function call might slow things down considerably. Maybe using an atom referencing to native Java array for counts is better (in which swap! would just use aset to new count) On Jan 31, 5:45 pm, "Stephen C. Gilardi" wrote: > On Jan 31, 2010, at 8:35 AM, Gabi wrote: > > > Is th

Re: Count the number of times a function was applied

2010-01-31 Thread Stephen C. Gilardi
On Jan 31, 2010, at 8:35 AM, Gabi wrote: > Is there any efficient way to get the number of times a given > function was executed (in run time not during profiling)? Maybe with > some clever use of its metadata ? Clojure function calls are low-level operations for efficiency. I'm not aware of any

Count the number of times a function was applied

2010-01-31 Thread Gabi
Is there any efficient way to get the number of times a given function was executed (in run time not during profiling)? Maybe with some clever use of its metadata ? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: headMap / tailMap / subMap

2010-01-31 Thread Rowdy Rednose
Of course, O(log n), not O(1) - maybe next Christmas :). subseq works like a charm and does everything I need, I prefer the usability of it much over the 5 (or so in total) distinct methods in java that basically do the same, albeit a bit clunkier. Haven't verified the performance characteristics

Re: clojure-contrib build failure

2010-01-31 Thread Ramakrishnan Muthukrishnan
On Fri, Jan 29, 2010 at 12:08 PM, Ramakrishnan Muthukrishnan wrote: > I had been trying to build the master branch of clojure and > clojure-contrib. clojure built just fine. I get a build failure while > building clojure-contrib with the log as shown below. The various Looks like with the current

def vs intern

2010-01-31 Thread Gabi
I wonder what is the difference between the two. Is there a difference? I want do define/intern functions at runtime. Which should I use ? -- 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 No

Re: Request for Feedback: Improve VimClojure's documentation

2010-01-31 Thread Meikel Brandmeyer
Hi, Am 30.01.2010 um 16:17 schrieb Jeff Schwab: > Hope you don't mind if I add to this thread instead. By the way, can you > suggest a forum for reporting VimClojure bugs and contributing patches? I didn't want to spam the clojure group with VC specific questions. The "default" forum - so to