Re: A Clojure documentation browser

2009-02-11 Thread Christian Vest Hansen
tribution, but in which jar file? It was added in Java 6. Could you perchance be running Java 5? > > Konrad. > > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you

Re: run clojure on 5,832 cores?

2009-02-13 Thread Christian Vest Hansen
I see no mention of a JVM being available for those CPUs, but perhaps the no-asm HotSpot can be build with gcc on it. Otherwise, cool gear :) On Fri, Feb 13, 2009 at 11:47 PM, Raoul Duke wrote: > > http://sicortex.com/products > > > > -- Venlig hilsen / Kind regards, Chr

Re: run clojure on 5,832 cores?

2009-02-14 Thread Christian Vest Hansen
On Sat, Feb 14, 2009 at 1:31 AM, Stuart Sierra wrote: > > On Feb 13, 6:13 pm, Christian Vest Hansen > wrote: >> I see no mention of a JVM being available for those CPUs, but perhaps >> the no-asm HotSpot can be build with gcc on it. > > Looks like they run Lin

Re: Anonymous recursive functions

2009-02-16 Thread Christian Vest Hansen
> I know this is not the best way to write a factorial (it is not tail- > recursive), the point is just to show an example of a recursive call. > > Konrad. > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--

Re: do-form swallows exception?

2009-02-17 Thread Christian Vest Hansen
gt; (do >(map (fn [_] (throw (RuntimeException. "fail"))) [1 2]) >"no exception")) > > this however does throw exception: > > (defn foo [] > (map (fn [_] (throw (RuntimeException. "fail"))) [1 2])) > > Is this a bug or am I missing so

Re: map literals, computed keys and side-effects

2009-02-17 Thread Christian Vest Hansen
gt; 6 7 7 8 8}) > {1 1, 2 2, 3 3, 4 4, 5 5, 6 6, 7 7, 8 8} > > Granted, it's not casual Clojure code but it's surprising. > > Christophe > > -- > Professional: http://cgrand.net/ (fr) > On Clojure: http://cl

Re: map literals, computed keys and side-effects

2009-02-17 Thread Christian Vest Hansen
key twice, which in turn causes it to evaluate twice; into two different keys with two different associations. On Tue, Feb 17, 2009 at 8:28 PM, Christian Vest Hansen wrote: > That's odd. > > Might you have uncovered a bug regarding: > > user=>

Re: map literals, computed keys and side-effects

2009-02-17 Thread Christian Vest Hansen
Just to clarify; I think PersistentArrayMap is too naïve: user=> {1 1 1 1 1 1 2 2} {1 1, 1 1, 1 1, 2 2} Also, this is rev 1286 (just prior to lazy-branch merge thingy). On Tue, Feb 17, 2009 at 8:50 PM, Christian Vest Hansen wrote: > I think I got it :) > > The two (swap! a in

Re: map literals, computed keys and side-effects

2009-02-17 Thread Christian Vest Hansen
an't say what's normal here. > > Christophe > > -- > Professional: http://cgrand.net/ (fr) > On Clojure: http://clj-me.blogspot.com/ (en) > > > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~

Re: map literals, computed keys and side-effects

2009-02-17 Thread Christian Vest Hansen
On Tue, Feb 17, 2009 at 10:07 PM, Rich Hickey wrote: > > > > On Feb 17, 3:30 pm, Christian Vest Hansen > Please don't create issues without getting a nod from me here first. Ok. I won't. I must have overlooked the "Similarly, please confirm a bug before making a

Re: Clojure Questions

2009-02-21 Thread Christian Vest Hansen
uld answer, that would be a great help. > > What is the minimum required JVM version for clojure? > > What versions of Java have been tested? > > What versions of Java are supported? > > Thanks! > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --

Re: alternate syntax

2009-02-23 Thread Christian Vest Hansen
persue it any further. > > A translation from standard Clojure syntax to this alternate form > should also be possible. > > Is this a bad idea? It is not inherently bad, but I doubt that a lot of people would prefer it as their primary reader over the standard Clojure reader. It could,

Re: ANN: Preliminary Clojure Support in Buildr

2009-02-26 Thread Christian Vest Hansen
pport is *extremely* experimental and > probably not too reliable at this point.  Also note that while it is > possible that Clojure support will be merged into the Buildr trunk in > future, it has not yet been decided one way or another (see > https://issues.apache.org/jira/browse/B

Re: ANN: Preliminary Clojure Support in Buildr

2009-02-26 Thread Christian Vest Hansen
e to generate the docs I can live with, but that "File not found" line looks pretty suspect. > > Daniel > > On Feb 26, 10:58 am, Christian Vest Hansen > wrote: >> Nice initiative! >> >> However, it the net-ssh dependency has problems: >> >

Re: ANN: Preliminary Clojure Support in Buildr

2009-02-26 Thread Christian Vest Hansen
ll about, but you > should still be ok (crazy gems).  Try the following: > >  buildr --version > > Daniel > > On Feb 26, 3:16 pm, Christian Vest Hansen > wrote: >> On Thu, Feb 26, 2009 at 6:17 PM, Daniel Spiewak wrote: >> >> > Odd.  Must be a problem wi

Re: Mathy operations on non-numerics (was "Adding" strings)

2009-02-27 Thread Christian Vest Hansen
er. "10") (Long. "10")) false user=> (= (Integer. "10") (Long. "10")) true Given these consequences, I think the current behavior is the best compromise. > > Allen > > > > -- Venlig hilsen / Kind regards, Christian Vest Hanse

Re: ANN: Preliminary Clojure Support in Buildr

2009-02-27 Thread Christian Vest Hansen
gt; On Feb 26, 7:59 pm, Daniel Spiewak wrote: >> >> > Crud.  I suspect this is something weird with the way that the GitHib >> > gem server works.  I'll try to repeat the problem on Ubuntu as soon as >> > I get back to my computer.  In the meantime, you could try th

Re: Question about instance?

2009-03-10 Thread Christian Vest Hansen
seen ? What about this case: (when-let [x (instance? java.lang.Boolean false)] (println x)) I think that should print 'true', and therefor I am against this proposal. > > Thanks in advance, > > -- > Laurent > > > > > -- Venlig hilsen / Kind regards,

Re: What is Clojure NOT good for?

2009-03-10 Thread Christian Vest Hansen
the average stupid programmer can't understand >> virtually guarantees that you'll increase your success chances, since you >> and your team-mates will be of a higher caliber. > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~--

Re: Question about instance?

2009-03-10 Thread Christian Vest Hansen
t 'coerce' instead of 'instance' - I think that name is clearer and fits the intent better. > > > Regards, > Tim. > > > On Mar 10, 7:15 pm, Christian Vest Hansen > wrote: >> On Mon, Mar 9, 2009 at 11:10 PM, Laurent PETIT >> wrote: >&g

Re: filter1 interesting?

2009-03-11 Thread Christian Vest Hansen
On Wed, Mar 11, 2009 at 9:01 AM, Vagif Verdi wrote: > > Is (first (filter ..) lazy like in haskell ? Yes. > I would hate to wait for filter to get all results just to throw them > out and pick the first one. > > > > -- Venlig hilsen / Kind regard

Re: Performance tips for Clojure

2009-03-13 Thread Christian Vest Hansen
times [i 100] >        (rest c > >  (timerest (into [] (range 1)))  ==> "Elapsed time: 125.826519 msecs" > > If 'rest' were O(n) on vectors, we should be able to multiply the > length of the vector by 100 and see the time g

Re: filter1 interesting?

2009-03-16 Thread Christian Vest Hansen
ra characters. > > "pick" might be good. > > -Stuart Sierra > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cl

Re: Symbols evaluated at compile time?

2009-03-16 Thread Christian Vest Hansen
cases where this isn't true. > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send e

Re: Creating Java Objects for Rhino at runtime

2009-03-18 Thread Christian Vest Hansen
ot; without having to restart the > JVM between each change. > > Is there anything I'm missing, or will there be a way in the future to create > dynamic Java objects at runtime? > > -- >           Sverre Johansen > > > > -- Venlig hilsen / Kind regards, Christian

Re: User contributed packages (Cabel, CPAN, etc)

2009-03-22 Thread Christian Vest Hansen
ill be in the user > community and the code that we can generate.  A good package manager > will help fuel that growth. > > And now I'll cop out & say that I have no idea about how to actually > implement this sort of thing - I'm hoping somebody else will want to > do

Re: ANN: Preliminary Clojure Support in Buildr

2009-03-23 Thread Christian Vest Hansen
with Scala/Java or Groovy/Java does not necessitate > an extra "require", but this first one is necessary to get the process > started and ensure that Clojure's compiler becomes the dominant > selection. > > Daniel > > > -- Venlig hilsen / Kind regar

Re: STM and useful concurrency

2009-03-24 Thread Christian Vest Hansen
nce. If I found out that a >> particular transaction was commonly being retried many times, is that >> a sign that I need to write the code differently? How would I find out >> that was happening? I know I could insert my own code to track that, >> but it seems like this may be

Re: Clojure + Java compilation and IntelliJ IDEA plugin

2009-03-25 Thread Christian Vest Hansen
ents and proposals are appreciated. :) > > With best regards, > Ilya Sergey > > > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Clojure + Java compilation and IntelliJ IDEA plugin

2009-03-26 Thread Christian Vest Hansen
s to be directly and knowingly interacted with in the Java code. So, my *assumption* (because I have no way of knowing for sure) is that this last case is the less common one, and therefor it makes sense to compile the Java code first. This is my reasoning anyway. -- Venlig hilsen / Kind regard

Re: Is there already a function to apply functions to maps by key?

2009-03-26 Thread Christian Vest Hansen
> > (defn update >  [m & keyfuns] >    (let [[key fun & rest] keyfuns] >      (if (and key fun) >        (recur (assoc m key (fun (key m))) rest) >        m))) > > (def foo {:a 5 :b 7}) > (def bar (update foo :a inc :b #(+ 5

Re: Clojure Users Group - Denmark

2009-03-30 Thread Christian Vest Hansen
scope was broadened to be more like lambda lounge? > > Cheers, > /Karl > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure&

Re: Scala vs Clojure

2009-03-31 Thread Christian Vest Hansen
anything significant on the JVM so I'm interested in >> picking >> one of these two languages and shipping a product for it. I've done >> a lot of >> commercial work with F# over the past 2 years but all Microsoft- >> related sales >> have died this year

Re: Clojure Users Group - Denmark

2009-04-01 Thread Christian Vest Hansen
ke sure you subscribe to the feed - I'll post news/updates > there. Also, if you are arranging talks locally let me know, I'll put > news up on the blog... > > Looking forward to it. Cheers, > - Karl > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --

Re: I feel I'm making an elementary mistake with proxy, but I don't know what...

2009-04-02 Thread Christian Vest Hansen
atching >> field found: preferredLayoutSize for class >> clojure.proxy.java.lang.Object$LayoutManager (NO_SOURCE_FILE:0) >>   [Thrown class clojure.lang.Compiler$CompilerException] >> >> I get the same thing for all its methods, when I try to call them >> manual

Re: Print a Large Lazy Seq - Heap Error

2009-04-02 Thread Christian Vest Hansen
you iterate them. > tks, > PJ > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goo

Re: Is Clojure production ready?

2009-04-16 Thread Christian Vest Hansen
gt; > Thanks, > > Aaron > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Christian Vest Hansen
; - J. > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegr

Re: Is "apply" slow or am I incorrectly benchmarking this?

2009-05-20 Thread Christian Vest Hansen
not seeing. > > Thanks a lot for the help >  -Patrick > > (let [i [1]] >  (time (dotimes [j 1000] >          (apply #(Math/ceil %) i > > Elapsed Time: 4123.448 msecs > > (let [i 1] >  (time (dotimes [j 1000] >          (Math/

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-28 Thread Christian Vest Hansen
0.0 >  slim > > > I'll submit patches to reflect the changed POM. > > Thank you all for your support! > Stefan Hübner > > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received

Re: The thread ring problem

2009-05-29 Thread Christian Vest Hansen
; by the way, why can't I compile the class? > > Thanks a lot. > > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: The thread ring problem

2009-05-29 Thread Christian Vest Hansen
would one fix this? With a CountDownLatch? That's what I'm currently trying. > > 2009/5/29 Christian Vest Hansen : >> >> For kicks, I made an implementation* using agents: >> >> http://gist.github.com/119946 >> >> I think that you may not want

Re: Clojure goes Git!

2009-06-17 Thread Christian Vest Hansen
; is a github workflow term for when you have a fork (created with the "fork" button on github) with your own changes, and you want Rich to pull in those changes. To do that, you press the "pull request" button and Rich will get a private message, and possibly also an email, with yo

Re: Clojure STM not serializable

2009-06-18 Thread Christian Vest Hansen
p 2000) ; or any slow computation >        (ref-set b (inc old-a)) > > (.start >  (Thread. >    #(dosync >      (let [old-b @b] >        (Thread/sleep 2000) ; or any slow computation >        (ref-set a (dec old-b)) > > (Threa

Currying selected library functions?

2008-10-12 Thread Christian Vest Hansen
allows for some, in my opinion, very clean code. The simplest example would be how this allows us to define a sum function: (def sum (reduce +)) What do you guys think? -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received t

Re: offtopic - where are you come from? (poll)

2008-10-17 Thread Christian Vest Hansen
om, be proud and say it. > > I'm from Slovakia. :) > > RK > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Christian Vest Hansen
> macros? How do I go about error recovery and reporting on bad input? > > Thanks in advance. > > -- > > Brett Morgan http://brett.morgan.googlepages.com/ > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You

Re: Modified doto

2008-10-24 Thread Christian Vest Hansen
that current (doto x (foo 42)) would have to become > (doto x (.foo 42)). > > Any thoughts on this as part of the upcoming bit of breaking changes? In addition, I think having to always use dot-something for methods is good consistency. +1. > > Rich > > > > -- Venlig hi

Re: idiomatic Clojure for agents?

2008-10-29 Thread Christian Vest Hansen
the threads' random streams might overlap, making the > Monte Carlo method's results suspect. > > mfh > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: Concerned about Clojure's license choice.

2008-11-02 Thread Christian Vest Hansen
On Mon, Nov 3, 2008 at 2:11 AM, Rich Hickey <[EMAIL PROTECTED]> wrote: > MIT and BSD are not reciprocal licenses. I want a reciprocal license. What does it mean that a license is reciprocal? -- Venlig hilsen / Kind regards, Christian Ve

Re: Back on max again...

2008-11-03 Thread Christian Vest Hansen
yes, this is true, I hadn't realized that String and Date both > implement Comparable. Comparable is supposed to impose a total > ordering on a set, so in a finite set of objects of the same type, the > max is always well defined. +1 on (min) and (max) operating on Comparables. -- V

Re: Back on max again...

2008-11-04 Thread Christian Vest Hansen
On Tue, Nov 4, 2008 at 3:12 PM, Rich Hickey <[EMAIL PROTECTED]> wrote: > On Nov 4, 9:00 am, "Christian Vest Hansen" <[EMAIL PROTECTED]> > wrote: >> "Generally" by custom but not required by contract of the Comparable >> interface. And those are al

Re: STM criticisms from Bryan Cantrill (Sun)

2008-11-04 Thread Christian Vest Hansen
have not actually seen such tools for TMs, so your argument probably still holds, but I don't think it will hold forever. -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: STM criticisms from Bryan Cantrill (Sun)

2008-11-04 Thread Christian Vest Hansen
bability) be proven so (hopefully before their systems go live). On Tue, Nov 4, 2008 at 8:50 AM, srnm <[EMAIL PROTECTED]> wrote: > > http://blogs.sun.com/bmc/entry/concurrency_s_shysters > > I'm new to clojure... and like what I see. > > Just passing this b

Re: Back on max again...

2008-11-04 Thread Christian Vest Hansen
On Tue, Nov 4, 2008 at 1:45 PM, Rich Hickey <[EMAIL PROTECTED]> wrote: > > > > On Nov 4, 2:56 am, "Christian Vest Hansen" <[EMAIL PROTECTED]> > wrote: >> On Tue, Nov 4, 2008 at 6:23 AM, Mark H. <[EMAIL PROTECTED]> wrote: >> >> &g

Re: POLL: Domain name for project hosting site.

2008-11-18 Thread Christian Vest Hansen
ally found some time to start getting the project hosting site >> > together, and i need a name.. so lets put it to a vote. >> >> > Here are some suggestions so far, but please feel free to chime in >> > with your own as well. >> >> > - projecture >> > - c

Re: seq and vector

2008-11-22 Thread Christian Vest Hansen
ay to achieve this? > > Thanks! > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: DISCUSS: replace (rand)

2008-12-03 Thread Christian Vest Hansen
sion. But, as you said, > this is all speculation until someone writes some tests... > > -- > ! Lauri > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: Improved Maven Build

2008-12-03 Thread Christian Vest Hansen
jure.jar in public > maven repository. And a pom with groupId, artifactId and version, so the jar can be refered from other poms. -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Clojure indentation conventions

2008-12-04 Thread Christian Vest Hansen
s, and I am not sure whether or not it should be generally recommended style (indecision ftw). -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure

Re: Elegant but very slow

2008-12-04 Thread Christian Vest Hansen
trees [iterations depth] > (let [sum #(+ (check-tree (make-tree % depth)) > (check-tree (make-tree (- %) depth)))] >(reduce #(+ %1 %2) 0 (map sum (range 1 (inc iterations)) > > (time (println "result:" (sum-trees 1 10))) > > However, ther

Re: Elegant but very slow

2008-12-04 Thread Christian Vest Hansen
Ah, disregard that. I found the rules: http://shootout.alioth.debian.org/u32q/benchmark.php?test=binarytrees&lang=all#about On Fri, Dec 5, 2008 at 1:04 AM, Christian Vest Hansen <[EMAIL PROTECTED]> wrote: > Is it important that we build and deconstruct a complete tree in the >

memory issue with nth

2008-12-06 Thread Christian Vest Hansen
(NO_SOURCE_FILE:0) user=> (defn xth [coll i] (if (zero? i) (first coll) (recur (rest coll) (dec i #'user/xth user=> (xth (repeatedly (fn [] 0)) 1000) 0 I could be wrong, but I don't think 'nth' should blow the heap here. -- Ve

Re: Clojure Blogs | Yahoo Pipes | Clojure Pipe

2008-12-06 Thread Christian Vest Hansen
supports > it? For whatever reason, Akregator (KDE-based RSS feed aggregator) does > not like that URL. s/feed/http/ seems to do the trick, for some reason. > > > > Randall Schulz > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~--

Re: memory issue with nth

2008-12-06 Thread Christian Vest Hansen
On Sun, Dec 7, 2008 at 2:22 AM, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > On Saturday 06 December 2008 17:11, Christian Vest Hansen wrote: >> I played around with some code, trying to explore the memory problems >> with 'filter' that is discussed in

Re: memory issue with nth

2008-12-07 Thread Christian Vest Hansen
g on OS X Leopard, and I've tried both the 1.5 and 1.6 JVMs. > I don't normally pass any non-standard memory size arguments to the VM > unless I expect I'll need it for something I'm doing. > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--

Re: memory issue with nth

2008-12-11 Thread Christian Vest Hansen
Thu, Dec 11, 2008 at 7:00 PM, Paul Mooser wrote: > > I think this might just be a JVM version issue. I can reproduce this > issue with a 1.5 JVM, but I can't reproduce it with 1.6. > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~--

Re: doall and dorun

2008-12-16 Thread Christian Vest Hansen
er=> (doall x) >> (1 2) >> user=> (doall x) >> (1 2) >> user=> >> >> user=> (def x (for [i (range 1 3)] (do (println i) i))) >> #'user/x >> user=> (dorun x) >> 1 >> 2 >> nil >> user=> (dorun x) >>

Re: Clojure's code has moved to Google Code

2008-12-18 Thread Christian Vest Hansen
ntrib/ >>> >>> All new checkins will occur there. >>> >> >> There's also a read-only list/feed that will broadcast commit messages >> from both clojure and clojure-contrib: >> >> http://groups.google.com/group/clojure-commits >> >

Suggestion: introduce (defn name attr-map? [params*] doc-string body) form.

2008-12-18 Thread Christian Vest Hansen
the same line regardless of how long the doc-string is. -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cl

Re: Suggestion: introduce (defn name attr-map? [params*] doc-string body) form.

2008-12-19 Thread Christian Vest Hansen
-- > Michael Wood > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goog

Re: Listen on changes to refs

2008-12-20 Thread Christian Vest Hansen
ts have watchers that do exactly this? Depending on >> how complex your use case, you might be able to get away with using >> agents and 'await' for now. >> >> Another option, as long as you don't tell Rich, is that you could >> abuse the validator functi

Re: recur rationale?

2008-12-20 Thread Christian Vest Hansen
in tail position seems simpler than > detecting that an arbitrary function call is) I fail to see what the > problem is. > > Anyone cares to elaborate? > > Many Thanks > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~-

Re: multiple sets on one item - is this a good idea?

2008-12-20 Thread Christian Vest Hansen
g with namespaces defined via Clojure code. > 'import' is different in that it's only for dealing with .class files. > > --Chouser Good material for the FAQ, no? Or maybe just the docs. Regardless, this is a good explanation. -- Venlig hilsen / Kind regards, Christian Ve

Re: Building clojure-contrib from source

2008-12-23 Thread Christian Vest Hansen
nested "path" element. > > Total time: 4 seconds > > > Could anyone please tell me what I need to do instead? Or, better > yet, add a README to the clojure-contrib repository? > > Konrad. > > > > > -- Venlig hilsen / Kind regards, Christian Vest

Re: Exercise: words frequency ranking

2008-12-29 Thread Christian Vest Hansen
hen you apply reduce function of > #(.) does it suspend #(....) closure capability. > > Emeka > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are su

Re: Suggestion: introduce (defn name attr-map? [params*] doc-string body) form.

2008-12-29 Thread Christian Vest Hansen
cl (if (vector? (first fdecl)) (list fdecl) fdecl) On Fri, Dec 19, 2008 at 1:06 PM, Christian Vest Hansen wrote: > On Fri, Dec 19, 2008 at 12:46 PM, Michael Wood wrote: >> >> Where would it go when you have multiple parameter lists and

Re: Constant expression optimization

2009-01-01 Thread Christian Vest Hansen
ut less clear in > real-life code. I'd then rather write a small macro to evaluate the > constant expression, but before doing so I'd like to know if I really > have to. > > Konrad. > > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-

Re: Local mutually recursive functions?

2009-01-01 Thread Christian Vest Hansen
ven? but do not use it? > > Ick. But perhaps a macro could make style less terrible to use? > > --Chouser > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you a

Re: update-values for clojure.contrib.sql

2009-01-02 Thread Christian Vest Hansen
repared > (format "update %s set %s where %s" > (the-str table) template where) > [values]))) > > It only send one set of values to do-prepared because of the where > clause that would have to change accordin

Re: literate snake

2009-01-02 Thread Christian Vest Hansen
when it overlaps itself > - announcing a win when the length of the snake reaches 10 > - automatically restarting the game after an overlap or a win > > -- > R. Mark Volkmann > Object Computing, Inc. > > > > -- Venlig hilsen / Kind regards, Christian Vest H

Re: Exercise: words frequency ranking

2009-01-03 Thread Christian Vest Hansen
Hehe, "venlig hilsen" is danish for "kind regards" :) On Sat, Jan 3, 2009 at 3:23 PM, Emeka wrote: > Venlig hilsen and Timothy Prately > > Thanks so much. > > Emeka > > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-

Re: Bug in .hashCode for vectors/lists (Old subject: "Bugs in contains? (?))

2009-01-03 Thread Christian Vest Hansen
true > user> (list (.hashCode [1 2]) (.hashCode '(1 2))) > (994 -1919631597) > > Cheers, Jason > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Bugs in contains? (?)

2009-01-03 Thread Christian Vest Hansen
read the other day :p ) > --Steve > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojur

Re: recur with many parameters

2009-01-03 Thread Christian Vest Hansen
ve symbol: recur in this context). > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gro

Re: literate snake

2009-01-04 Thread Christian Vest Hansen
like class members in Java, can be defined in any order and that the existence of the correct symbols will be properly checked at compile time. Yet this assumption would be wrong, no? -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~---

Re: newbie question on binding

2009-01-05 Thread Christian Vest Hansen
;ethel") > (test-rebind) > > ricky loves lucy > Logging str > Logging str > Logging str > Logging str > Logging str > fred loves ethel > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ Yo

Re: terminating an app that uses agents

2009-01-05 Thread Christian Vest Hansen
d-multiply [old-state times ms] > (Thread/sleep ms) > (* old-state times)) > > (send-off my-agent sleep-and-multiply 2 1500) > (send-off my-agent sleep-and-multiply 3 1000) > (await my-agent) > (println "my-agent =" @my-agent) > > -- > R. Mark Volkmann &g

Re: Cons.count overflows stack (with patch)

2009-01-06 Thread Christian Vest Hansen
s > ASeq.count() does, at the cost of the efficient vector counting > demonstrated above. > > If you have comments or questions, don't hesitate or I'll move this to > the issues page! > > --Chouser > > > > -- Venlig hilsen / Kind regards, Christian Ve

Re: Support for new bee

2009-01-07 Thread Christian Vest Hansen
t; I tried this (let [{:coin coin :as snake}{...}][coin > snake]) and got failure. Why is it so?(just changed the position of > the key :coin) Because the binding-form goes before the key when you use map-binding forms, and a keyword (:coin) cannot be used as a binding-form. > > Emeka &g

Re: Support for new bee

2009-01-07 Thread Christian Vest Hansen
On Wed, Jan 7, 2009 at 9:03 AM, Christian Vest Hansen wrote: > You are effectively trying to do (#(println %) 1 2). Typo. I meant to write (#(println %) 2 3). -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received t

Re: Cons.count overflows stack (with patch)

2009-01-07 Thread Christian Vest Hansen
On Wed, Jan 7, 2009 at 2:10 PM, Chouser wrote: > > On Wed, Jan 7, 2009 at 2:41 AM, Christian Vest Hansen > wrote: >> >> On Wed, Jan 7, 2009 at 5:26 AM, Chouser wrote: >>> Since I couldn't find any other class that uses this kind of >>> recursion for

Re: sort behavior question

2009-01-08 Thread Christian Vest Hansen
't implement Comparable. Comparable implies that an Object can be reduced to a scalar value, if only for the purpose of comparing. How do you imagine this should work on list of arbitrary things? -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~-

Re: SLIME: trouble with java.lang.OutOfMemoryError

2009-01-10 Thread Christian Vest Hansen
sure what a good solution to this problem would be, but I > thought I'd post an update for anyone who was curious what the actual > issue was. > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this

Re: when performance matters

2009-01-12 Thread Christian Vest Hansen
ve to be convinced that Clojure is a viable choice, > but I need to be a realist too. So what do people think? > How realistic are my three "hopes"? And are there > any other performance enhancing possibilities that I > have not taken into account? > > Thanks, > >

Re: Patch: Arbitrary Symbols between ||

2009-01-14 Thread Christian Vest Hansen
On Wed, Jan 14, 2009 at 1:59 PM, Rich Hickey wrote: > > I am interested in symbols with arbitrary names, > Why is this interesting? -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message becaus

Re: Synchronization Benchmarks

2009-01-15 Thread Christian Vest Hansen
x27;nets (NBHashMap by Cliff Click and FashHashMap in Javolution). > > mfh > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group

Re: Synchronization Benchmarks

2009-01-15 Thread Christian Vest Hansen
On Thu, Jan 15, 2009 at 8:47 PM, Christian Vest Hansen wrote: > On Thu, Jan 15, 2009 at 8:35 PM, Mark H. wrote: >> On Jan 15, 1:38 am, stuhood wrote: >>> The benchmark contains 4 bi-directional dictionary implementations: ... >> >> Doesn't Java already hav

Re: Synchronization Benchmarks

2009-01-16 Thread Christian Vest Hansen
2. Optimism + MVCC + persistence fall down when faced with a majority of > writes. (see the 100% write case in the writes graph.) > > Thanks, > Stu > > > On Thu, Jan 15, 2009 at 2:52 PM, Christian Vest Hansen > wrote: >> >> On Thu, Jan 15, 2009 at 8:47 PM, Christ

Re: Mysterious performance anomalies

2009-01-16 Thread Christian Vest Hansen
> user> (first (time (loop [i (int 0)] (if (< i (int 6000)) (recur > (inc i)) [i] > "Elapsed time: 8576.649 msecs" > 6000 > > user> (time (loop [i (int 0)] (if (< i (int 6000)) (recur (inc i)) > [i]))) > "Elapsed time: 250.407 msecs&

  1   2   >