Re: Extremely silly benchmarks, on types, records and maps.

2010-05-13 Thread Rob Lachlan
Ah. That makes sense, thanks very much. Rob On May 12, 10:36 pm, Harvey Hirst hhi...@gmail.com wrote: It's slow because it has to use reflection to determine the type. Use (set! *warn-on-reflection* true) and you'll see the warning. Try something like this and you'll see significantly

Re: ANN: try clojure

2010-05-13 Thread Laurent PETIT
Great ! One remark: could the height of the REPL somehow adapt to the available height of the page ? 2010/5/13 Heinz N. Gies he...@licenser.net: Hi people Raynes and me have figured the community has given us so much so it is time to give something back. We took the effort of making a

Re: code review request: clojure.java.io

2010-05-13 Thread Michael Wood
Hi On 13 May 2010 03:02, Stuart Halloway stuart.hallo...@gmail.com wrote:  * Decidedly, I have bad feelings when I read about the magic of coercing a String first as a URL, and if not possible, fall back and consider it a local absolute/relative path. I'm mitigated in the sense that either

Re: ANN: try clojure

2010-05-13 Thread Michael Wood
On 13 May 2010 07:31, Heinz N. Gies he...@licenser.net wrote: Hi people Raynes and me have figured the community has given us so much so it is time to give something back. We took the effort of making a try-clojure - hence since we are the sandbox guys who is more made for that then us :P.

Re: ANN: try clojure

2010-05-13 Thread Wilson MacGyver
Great work, but the tryhaskell link is wrong. It should be http://tryhaskell.org/ Sent from my iPad -- 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

Re: how to develop patches to libraries

2010-05-13 Thread Alex Osborne
Brian Wolf brw...@gmail.com writes: Whats the idiomatic or best method to develop patches to pre-exisitng libraries using clojars, do I git the source to my computer, put put [lein-clojars 0.5.0] in project file, obviously renaming the project, and do I take original dependenicies out, or

Re: Dumbest test Q you ever heard

2010-05-13 Thread Quzanti
I have written something to convince myself that things behave as I expected e.g. each runs only once per test, not once per assertion http://gist.github.com/399638 It handles the fact that tests can be run in any order by using a Set which gets added to when any function is run (so if the

Re: How to visualise relations, bahavior and so on in functional programming ?

2010-05-13 Thread Fabio Kaminski
(Clojure (*fight the system!*)) rsrsrs :) On Wed, May 12, 2010 at 1:18 AM, Armando Blancas armando_blan...@yahoo.comwrote: Booch, Rumbaugh and Jacobson took standard practices and tweaked them to the fashion of the mid '90's, tough they acknowledge only one another and their help in the UML

Re: Annoying auto-signature

2010-05-13 Thread feka
Well, the annoying fact is that it appears on all posts, but actually it should appear only on mails generated from posts. Would anyone browsing through the message archives be offended if no warnings and unsubscribe link were there? I get digest messages (I guess most of us does) and there should

Re: dump html with clojure

2010-05-13 Thread Eric Schulte
Wouldn't this be simpler with pmap, e.g. http://gist.github.com/399269 although to be honest I don't really know how the automatically parallelized clojure functions decide how many threads to use. Is the JVM smart enough to only create as many system-level threads as make sense on my hardware?

Re: dump html with clojure

2010-05-13 Thread Nurullah Akkaya
Yes but AFAIK you only get availableProcessors + 2 threads with pmap which is fine when the task is CPU bound but for downloading web pages most of the time will be lost at waiting for I/O so having more threads would speed things up. Regards... -- Nurullah Akkaya http://nakkaya.com On Thu,

Re: code review request: clojure.java.io

2010-05-13 Thread Laurent PETIT
2010/5/13 Stuart Halloway stuart.hallo...@gmail.com:  * I also have bad feelings when I see the Coercions protocol defined but not used in conjunction with IOFactory for default behaviours There are very few examples of this, not worth making changing IMO. I'll try to do this as an exercise

Splitting a string with the characters between each split?

2010-05-13 Thread joshua-choi
I'd like to know if there's a standard function similar to clojure.contrib.string/split that includes the characters between the spitted string, or if there isn't one, how I might write one. In other words, I'd like a function split* such that (split* #\s+ ab c de) returns (ab cde). --

Re: Destructuring namespace qualified map keys

2010-05-13 Thread Adrian Cuthbertson
I don't think there's a way to do it with :keys, but could you use individual key destructuring? I.e; (let [{x :x/y} {:x/y 20}] x) 20 -Rgds, Adrian. On Thu, May 13, 2010 at 6:47 PM, David McNeil mcneil.da...@gmail.com wrote: Is there a way to destructure namespace qualified map keys? I want

Re: Destructuring namespace qualified map keys

2010-05-13 Thread David McNeil
(let [{x :x/y} {:x/y 20}] x) 20 That will work. Thank you! -David McNeil -- 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

Re: ANN: try clojure

2010-05-13 Thread Raoul Duke
Bad Gateway The proxy server received an invalid response from an upstream server. Apache/2.0.63 (Unix) DAV/2 Server at www.try-clojure.org Port 80 On Wed, May 12, 2010 at 10:31 PM, Heinz N. Gies he...@licenser.net wrote: Anyway, enjoy: http://www.try-clojure.org -- You received this message

Re: Getting line numbers in stack traces

2010-05-13 Thread MarkSwanson
On May 13, 6:11 am, Brian Watkins wildu...@gmail.com wrote: What is the method that gets line numbers and function names into stack traces?  I know I can't get them in the Repl (because there aren't any), but I tried loading my file with load-file and that doesn't help either. It's there;

Re: dump html with clojure

2010-05-13 Thread Eric Schulte
Hi Nurullah, Nurullah Akkaya nurul...@nakkaya.com writes: Yes but AFAIK you only get availableProcessors + 2 threads with pmap That's good to know, is this documented somewhere? which is fine when the task is CPU bound but for downloading web pages most of the time will be lost at waiting

Re: Splitting a string with the characters between each split?

2010-05-13 Thread joshua-choi
Ah, thanks, I forgot about the word-boundary regex, but unfortunately, the regex I want to split on is more complicated than #\s+—I just used #\s+ as an example, and I don't think #\b will work in this case. On May 13, 1:26 pm, Drew Raines aarai...@gmail.com wrote: You could do it by using the