Re: Enhanced Primitive Support

2010-06-22 Thread Garth Sheldon-Coulson
To me, numbers are an abstraction, just as sequences are an abstraction. Because Clojure treats sequences as abstractions, I can say (partition 3 (set '(1 2 3 4 5 6))) without Clojure complaining that sets are not the kind of thing that can be efficiently partitioned. Sets are seqable, so they can

Re: Enhanced Primitive Support

2010-06-22 Thread David Nolen
If you're going to give example of what the current branch is like, at least write the code how a primitive Clojurian would write it: (let [n (long 9223372036854775810)] (* (/ n 3) 3)) ; Value out of range for long: 9223372036854775810 (let [n (long 9223372036854775810)] (* (/ n 2) 2)) ; Valu

Re: Transform columnar data into a tree?

2010-06-22 Thread Meikel Brandmeyer
Hi, On Jun 22, 4:55 am, Base wrote: > [ >         {:data A1 >         :children  [{:data B1 :children [{:data C1} {:data C2}]]} >                    {:data B2 :children [{:data C3} {:data C4}]]} > >         {:data A2 >         :children  [{:data B3 :children [{:data C5} {:data C6}]]} >          

Re: Enhanced Primitive Support

2010-06-22 Thread Meikel Brandmeyer
Hi, On Jun 22, 7:47 am, David Nolen wrote: > Clearly a range' is in order. Eh? Why? The following is probably completely hypothetical syntax, because I'm not familiar with the changes in the numeric branches. But I think, it's easy to get my point. (defn range ([^long lower ^long upper] work

Re: Transform columnar data into a tree?

2010-06-22 Thread Justin Kramer
I took a crack at it. Whenever I think of building up a structure, I think of reduce or into. Like Meikel, I create a nested, sorted-map tree first, then convert to the vector-of-maps format you describe. (defn add-path [root path] (let [add-child (fn [parent child-path] (if

Re: Delete my last post

2010-06-22 Thread Baishampayan Ghose
pleone wrote: Mistake there is no error Alas! The Internet never forgets ;) Regards, BG -- Baishampayan Ghose oCricket.com -- 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 po

Re: Enhanced Primitive Support

2010-06-22 Thread Heinz N. Gies
On Jun 22, 2010, at 7:47 , David Nolen wrote: > If you're going to give example of what the current branch is like, at least > write the code how a primitive Clojurian would write it: > ... I feel his examples were on purpose not given as a 'primitive' clojurian or a 'boxing' one would write th

Re: Enhanced Primitive Support

2010-06-22 Thread Heinz N. Gies
I'd like to ask something, is there an (open source) project that really got a speed boost from the move to primitive +,- & Co. and is testable / benchmarkable fairly easy? I sadly don't have any of those :( to do it all on my own. I'm not asking to mock, what I'd like to do (for myself) is loo

Re: Enhanced Primitive Support

2010-06-22 Thread Luc Préfontaine
++1 for auto promotion, average code is complex enough, lets not add more incertainty with overflow exceptions. Data changes overtime and discovering it in production with an overflow exception is less than elegant. Degraded performance is much more acceptable in production than a crash over an

Re: Enhanced Primitive Support

2010-06-22 Thread Nicolas Oury
On Tue, Jun 22, 2010 at 12:45 PM, Luc Préfontaine < lprefonta...@softaddicts.ca> wrote: > > Data changes overtime and > discovering it in production with > an overflow exception is less than > elegant. > > Degraded performance is much more > acceptable in production than a crash > over an unhandle

Re: Enhanced Primitive Support

2010-06-22 Thread Tim Daly
Boxing and unboxing can be very confusing. The "rules" need to be clearly stated somewhere. It might help if we introduced an explicit syntax, which might compile away, such as: (box i) (unbox i) (with-unboxed [i 7] ...) etc. I know Rich doesn't like "syntactic overhead" but source languages a

Re: Enhanced Primitive Support

2010-06-22 Thread David Nolen
On Tue, Jun 22, 2010 at 6:04 AM, Heinz N. Gies wrote: > > > Yes. With Rich's primitive work we can get to *1 billion arithmetic > operations* in < 2/3 of a second on commodity hardware. > > Which is absolutely great since I always wanted to do that :P , > meaning the example is kind of far fetche

Re: Transform columnar data into a tree?

2010-06-22 Thread Base
Thank you all for your help. This helps so much! I did try using into a number of times, but didnt get that to work. I have to admit that, except for the rudamentary examples I have not used reduce too much yet. I was reviewing Stu Halloways code on group- by and was trying to come up with a wa

Re: Enhanced Primitive Support

2010-06-22 Thread Luc Préfontaine
If the maintenance cost of keeping both options in the Clojure run time is reasonnable it's fine with me. Rich is the best person to answer this. Otherwise, auto promotion should be the winner... And the default ... The vast majority of apps these days are not gravitating around high performanc

Re: Enhanced Primitive Support

2010-06-22 Thread Daniel Gagnon
> > Lets just make things easy for the > average guy.., > If we base the decision on the average guy not writing high performance numeric apps, then we should also base it on the fact that he does not need more than a long in 99% of cases either as Rich points out. And longs are a much simpler con

Re: Enhanced Primitive Support

2010-06-22 Thread Nicolas Oury
On Tue, Jun 22, 2010 at 2:00 PM, Daniel Gagnon wrote: > If we base the decision on the average guy not writing high performance > numeric apps, then we should also base it on the fact that he does not need > more than a long in 99% of cases either as Rich points out. And longs are a > much simple

Re: Batch file wrappers on Windows

2010-06-22 Thread Paul Moore
On 21 June 2010 22:12, Russ Olsen wrote: > Paul, > > One way would be to use the cljw.exe that comes with > dejour. This is a windows executable that runs clojure > without creating that annoying extra window. Thanks. That's certainly one option - I could probably without too much difficulty put

Re: Need help getting Snow Leopard, Aquamacs, Clojure, and Slime to work

2010-06-22 Thread Larry Travis
On 6/21/10 8:07 AM, Joost wrote (shown here as corrected in a 2nd msg): For core swank-clojure (without the elisp parts), you start a swank server somewhere (using leiningen or some other script) and connect to that using slime-connect. This means you need to install swank- clojure in your clojur

Re: Need help getting Snow Leopard, Aquamacs, Clojure, and Slime to work

2010-06-22 Thread Larry Travis
On 6/21/10 5:31 AM, patrik karlin wrote: Hello theres a wherry "spartan" screencast on vimeo that install all this with regular emacshttp://vimeo.com/11844368 Thanks. I'm going to try Joost's advice first and, if that doesn't work, I'll study your screencasts -- adapting them to Aquamacs if

Re: Batch file wrappers on Windows

2010-06-22 Thread Paul Moore
On 22 June 2010 00:11, Rick Moynihan wrote: > On 21 June 2010 18:42, Paul Moore wrote: >> 3. Using a bat file to start a GUI application from Explorer causes an >> unnecessary and ugly console window to appear. > > You should use "javaw" instead of "java" to start the JVM without the > console wi

How fine-grained is fine-grained locals clearing?

2010-06-22 Thread ann
(defn fn1 [a] (fn2 a) ) When is a cleared, before call to fn2 or after? -- 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 w

Re: Enhanced Primitive Support

2010-06-22 Thread Joost
On Jun 22, 3:00 pm, Daniel Gagnon wrote: > > Lets just make things easy for the > > average guy.., > > If we base the decision on the average guy not writing high performance > numeric apps, then we should also base it on the fact that he does not need > more than a long in 99% of cases either as

Re: Need help getting Snow Leopard, Aquamacs, Clojure, and Slime to work

2010-06-22 Thread Joost
On Jun 22, 7:36 am, Larry Travis wrote: > > Thanks. I'm not sure what you mean by "leiningen" or by a "clojure > project" (which almost certainly reveals my inexperience with respect to > clojure installation and/or programming!) but I think I can figure it > out with some exploration. Leinging

Re: Enhanced Primitive Support

2010-06-22 Thread lprefontaine
I never said we should not provides ways to tune code and get higher throughput or arbitrary sized numbers. There has to be a path to satisfies those needs. The stuff that was proposed on this thread (specialized ops, ...) should allow people to tune their code if they require to do so. I said tha

clojure-contrib failing on build box only -- why?

2010-06-22 Thread Stuart Halloway
The clojure-contrib build is failing with a stack trace that seems to be entirely within Hudson. Anybody know what this might be? http://build.clojure.org/job/clojure-contrib/148/console Stu -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post t

Re: Enhanced Primitive Support

2010-06-22 Thread Lee Spector
All of this talk about the "average guy" is ungrounded. Average over what set and how are you getting the data? It may (or may not) be true that that the average *programmer* understands that big numbers (how big?) are something special, but IMHO that (if true) would probably be because the ave

Re: Enhanced Primitive Support

2010-06-22 Thread Rich Hickey
On Jun 22, 2010, at 12:44 AM, Mark Engelberg wrote: The new uber-loop is fantastic. So I guess the main point still to be finalized is whether the default arithmetic ops will auto-promote or error when long addition overflows. Playing around with the latest equals branch: user=> (def n 92233

Re: Batch file wrappers on Windows

2010-06-22 Thread Lars Nilsson
On Tue, Jun 22, 2010 at 5:08 AM, Paul Moore wrote: > On 22 June 2010 00:11, Rick Moynihan wrote: >> On 21 June 2010 18:42, Paul Moore wrote: >>> 3. Using a bat file to start a GUI application from Explorer causes an >>> unnecessary and ugly console window to appear. >> >> You should use "javaw"

Re: Batch file wrappers on Windows

2010-06-22 Thread Lars Nilsson
On Tue, Jun 22, 2010 at 10:15 AM, Lars Nilsson wrote: > On Tue, Jun 22, 2010 at 5:08 AM, Paul Moore wrote: >> On 22 June 2010 00:11, Rick Moynihan wrote: >>> On 21 June 2010 18:42, Paul Moore wrote: 3. Using a bat file to start a GUI application from Explorer causes an unnecessary and

Re: Submission to Duke's Choice Award

2010-06-22 Thread Gray Herter
Seems to be worth a try. I wonder how well it would do? It looks like neither Scala nor JRuby have won this before. Here are the guidelines, if someone wants to give it a try: "500-word description of product/technology/innovation being nominated. Please emphasize the role of Java technology in m

Re: Enhanced Primitive Support

2010-06-22 Thread Luc Préfontaine
As the implementor Rich, it's your call as I said :)) If auto promotion brings in chaos then lets drop it entirely. If people want to eat elephants they can still choose to use directly big number implementations. Luc P Sent from my iPod On 2010-06-22, at 10:46 AM, Rich Hickey wrote: --

Re: Enhanced Primitive Support

2010-06-22 Thread Mike Meyer
On Tue, 22 Jun 2010 14:34:44 +0100 Nicolas Oury wrote: > On Tue, Jun 22, 2010 at 2:00 PM, Daniel Gagnon wrote: > > > If we base the decision on the average guy not writing high performance > > numeric apps, then we should also base it on the fact that he does not need > > more than a long in 99

Re: Enhanced Primitive Support

2010-06-22 Thread Chas Emerick
There are places where "regular" folks can be helped (e.g. perhaps supporting contagious bigs for the normal/fast ops so that the potentially foreign op-prime notation can be ignored if that's desirable), but handicapping capability or semantics in any direction based on vague appeals to "a

Re: Enhanced Primitive Support

2010-06-22 Thread Fogus
One of our reviewers made a fantastic comment on the book and I thought I would share it for public consumption: "I know that you Lisp guys are incredibly proud of arbitrary-precision arithmetic, but I can't help but think that it is entirely missing the point: infinite precision is infinitely slo

Re: Batch file wrappers on Windows

2010-06-22 Thread Paul Moore
On 22 June 2010 15:15, Lars Nilsson wrote: > Maybe Windows Script Host is an option, if you haven't looked at that one yet. Yes, WSH/VBS is a reasonable option. There are some gotchas which you need to be careful of though - there's *still* only one filetype (.vbs) which is executed by cscript o

Re: Enhanced Primitive Support

2010-06-22 Thread Garth Sheldon-Coulson
> Everyone has to realize the math you are advocating for the default, on > non-tagged architectures like the JVM and CLR, *must* do an allocation on > every +/-/* etc operation. And such ops are littered throughout non-numeric > data structure code, for indexes, offsets, bounds etc. Allocating on

Re: Enhanced Primitive Support

2010-06-22 Thread Heinz N. Gies
We always talk about auto promoting ops, is there a way, and I guess the answer will be no, to have auto demoting ops? as in they get (+ (num 1) (num 1)) and return (long 2) if the calling side desires so? As in the function promises to return a Number or better. I know this might die on the fa

Re: Enhanced Primitive Support

2010-06-22 Thread Mike Meyer
On Mon, 21 Jun 2010 21:44:04 -0700 Mark Engelberg wrote: > The new uber-loop is fantastic. > > So I guess the main point still to be finalized is whether the default > arithmetic ops will auto-promote or error when long addition > overflows. I think calling them "default" gives the wrong idea h

Re: Enhanced Primitive Support

2010-06-22 Thread Mark Engelberg
On Tue, Jun 22, 2010 at 7:46 AM, Rich Hickey wrote: > It is precisely for these reasons that the first iteration was based upon > BigInteger contagion. Yeah, I still don't like BigInteger contagion, and I believe I would vastly prefer the current equals branch, even with its idiosyncrasies, versu

Re: Enhanced Primitive Support

2010-06-22 Thread Tim Daly
We could always take the FORTRAN approach and make identifiers that start with I through N default to contagious behavior :-) Rich Hickey wrote: On Jun 22, 2010, at 12:44 AM, Mark Engelberg wrote: The new uber-loop is fantastic. So I guess the main point still to be finalized is whether the

Re: Enhanced Primitive Support

2010-06-22 Thread Mike Meyer
On Tue, 22 Jun 2010 10:46:05 -0400 Rich Hickey wrote: > --- > The claim that this primitive stuff is just for numeric-intensive > applications is outrageous and false, and ignores the implementation > of Clojure itself to an embarrassing degree. I've worked my tail off > to reduce th

Re: Enhanced Primitive Support

2010-06-22 Thread Nicolas Oury
On Tue, Jun 22, 2010 at 6:43 PM, Mike Meyer < mwm-keyword-googlegroups.620...@mired.org> wrote: > > > Everyone has to realize the math you are advocating for the default, > > on non-tagged architectures like the JVM and CLR, *must* do an > > allocation on every +/-/* etc operation. And such ops ar

Re: Enhanced Primitive Support

2010-06-22 Thread Mike Meyer
On Tue, 22 Jun 2010 18:56:30 +0100 Nicolas Oury wrote: > On Tue, Jun 22, 2010 at 6:43 PM, Mike Meyer < > mwm-keyword-googlegroups.620...@mired.org> wrote: > > > > > > Everyone has to realize the math you are advocating for the default, > > > on non-tagged architectures like the JVM and CLR, *mus

Re: Enhanced Primitive Support

2010-06-22 Thread Sean Corfield
On Tue, Jun 22, 2010 at 10:43 AM, Mike Meyer wrote: > Would it be Clojure if it didn't run on the JVM? Personally, I could > live without the JVM. And the more I learn about the JVM, the more I > could live without it! For my work, languages are only useful if they run on the JVM *and* can intero

Re: Enhanced Primitive Support

2010-06-22 Thread Wilson MacGyver
On Tue, Jun 22, 2010 at 1:43 PM, Mike Meyer wrote: > Would it be Clojure if it didn't run on the JVM? Personally, I could > live without the JVM. And the more I learn about the JVM, the more I > could live without it! I just want to add my two cents here. I don't think we would've ever used cloju

cond formatting

2010-06-22 Thread cageface
Picky syntax question: In common lisp cond requires more parenthesization than clojure: (cond ((evenp a) a);if a is even return a ((> a 7) (/ a 2));else if a is bigger than 7 return a/2 ((< a 5) (- a 1));else if a is smaller than 5 return a-1 (t 17)) vs clojure: (con

Re: cond formatting

2010-06-22 Thread Tim Daly
Actually, being a common-lisper I end up re-keying my clojure cond expressions every time. Either I end up putting the extra levels of parens or I forget to properly "even-count". Emacs paren-bouncing makes it easy to syntax check a common lisp cond but fails badly with clojure cond. Emacs doesn'

Re: cond formatting

2010-06-22 Thread David Nolen
On Tue, Jun 22, 2010 at 4:27 PM, cageface wrote: > > Any thoughts on this or other approaches? (defn compare-row [a b] ;; compare null rows as > to advance cursor (cond (and (nil? a) (nil? b)) [0,0] (and (nil? a) (not= b nil)) [1, 0] (and (not= a nil) (nil? b)) [-1, 0] tru

Re: cond formatting

2010-06-22 Thread Michael Gardner
On Jun 22, 2010, at 3:27 PM, cageface wrote: > In this case it takes some visual parsing to see what the predicates > and results are and if you break them up onto individual lines you > have to count evens to figure out what the results are. The extra > level of indentation in the CL case makes i

Re: cond formatting

2010-06-22 Thread cageface
This is fine when you just have simple clauses like this, but what if the clauses are more complex, even containing subclauses? A quick scan through clojure contrib suggest that people are inserting blank lines between clauses when they get more complex. I guess this is idiomatic for clojure? On

Re: cond formatting

2010-06-22 Thread cageface
This looks nice but requires more hand-indenting, right? I really like being able to select a block in emacs and hit indent-region and get predictably tidy code. (The failure of emacs to do this 100% with scala code is a pet peeve). On Jun 22, 1:50 pm, Michael Gardner wrote: > Try this: > > (defn

Re: cond formatting

2010-06-22 Thread Michael Gardner
On Jun 22, 2010, at 3:55 PM, cageface wrote: > This looks nice but requires more hand-indenting, right? I really like > being able to select a block in emacs and hit indent-region and get > predictably tidy code. (The failure of emacs to do this 100% with > scala code is a pet peeve). Can't help

Re: cond formatting

2010-06-22 Thread David Powell
> (cond >(even? a) a ;if a is even return a >(> a 7) (/ a 2) ;else if a is bigger than 7 return a/2 >(< a 5) (- a 1) ;else if a is smaller than 5 return a-1 >t 17) I tend to write the condition and action on separate lines, and put a blank comment in between each, like

bug: clojure.walk removes all the metadata

2010-06-22 Thread Krešimir Šojat
While traversing the data structure both prewalk and postwalk remove all the metadata: user=> (require '[clojure.walk :as w]) nil user=> (def data {:a ^{:a :this-is-a} [1 2 3]}) #'user/data user=> (meta (:a data)) {:a :this-is-a} user=> (meta (:a (w/postwalk identity data))) nil user=> (meta (:a (

Protocols/records and namespaces

2010-06-22 Thread Brent Millare
user=> (in-ns 'protocol.test) # protocol.test=> (defrecord person [name age]) protocol.test.person protocol.test=> (person. "bobby" 23) #:protocol.test.person{:name "bobby", :age 23} protocol.test=> (in-ns 'user) # user=> (protocol.test/person. "alice" 2) java.lang.IllegalArgumentException: Unable

Re: cond formatting

2010-06-22 Thread Stefan Kamphausen
Hi, On 22 Jun., 22:27, cageface wrote: > Picky syntax question: >[...] I don't consider this picky. Many of Clojures differences to older lisps are well-grounded. To me the removal of extra parens in cond is not. During my time with Clojure I experienced this as a little nuisance. Little bec

Re: Protocols/records and namespaces

2010-06-22 Thread Laurent PETIT
hello, 2010/6/22 Brent Millare : > user=> (in-ns 'protocol.test) > # > protocol.test=> (defrecord person [name age]) > protocol.test.person > protocol.test=> (person. "bobby" 23) > #:protocol.test.person{:name "bobby", :age 23} > protocol.test=> (in-ns 'user) > # > user=> (protocol.test/person. "a

Re: cond formatting

2010-06-22 Thread Laurent PETIT
2010/6/22 Stefan Kamphausen : > The indentation Emacs chooses when hitting M-q on an opening paren (or > when indenting a region using some other magic) is law in my opinion. emacs bending your mind as nauseum :-) -- You received this message because you are subscribed to the Google Groups "Cloj

Re: cond formatting

2010-06-22 Thread cageface
I think I'm going to take this route. The style seems pretty common in clojure contrib and it's readable, if a bit odd at first. On Jun 22, 2:20 pm, David Powell wrote: > I tend to write the condition and action on separate lines, and put a > blank comment in between each, like this: -- You rec

Re: Protocols/records and namespaces

2010-06-22 Thread Brent Millare
Hi Laurent, You're right, there is no such thing as a "class defined in a namespace", I meant to ask instead, defines a var, which still would not be correct. Referring to the record as protocol.test.person worked. Thanks. -Brent On Jun 22, 6:07 pm, Laurent PETIT wrote: > hello, > > 2010/6/22 B

Re: cond formatting

2010-06-22 Thread rob levy
user=> (ns utils) utils=> (ns-unmap 'utils 'cond) utils=> (defmacro cond [& body] `(clojure.core/cond ~@(apply concat body))) #'utils/cond utils=> (macroexpand-1 '(cond (false "false") (true "true"))) (clojure.core/cond false "false" true "true") utils=> (cond (false "false")

Re: Transform columnar data into a tree?

2010-06-22 Thread Michał Marczyk
I think the following function does what you want (I've also published it @ http://gist.github.com/449266 if you find Gists prettier): (defn munge [vs] (if (== 1 (count (first vs))) (reduce into vs) (let [gs (group-by #(% 0) vs)] (map (fn [k v] {:data k :children v})

Re: cond formatting

2010-06-22 Thread Howard Lewis Ship
On Tue, Jun 22, 2010 at 4:42 PM, rob levy wrote: > user=> (ns utils) > utils=> (ns-unmap 'utils 'cond) > utils=> (defmacro cond [& body] `(clojure.core/cond ~@(apply concat body))) > #'utils/cond > utils=> (macroexpand-1 '(cond (false "false") (true "true"))) > (clojure.core/cond false "false" tru

Re: Enhanced Primitive Support

2010-06-22 Thread Mike Anderson
On Jun 22, 1:27 pm, David Nolen wrote: > On Tue, Jun 22, 2010 at 6:04 AM, Heinz N. Gies wrote: > > > > > > Yes. With Rich's primitive work we can get to *1 billion arithmetic > > operations* in < 2/3 of a second on commodity hardware. > > > Which is absolutely great since I always wanted to do th

STM style disk persistance

2010-06-22 Thread Timothy Baldridge
Greetings, I've recently started learning Clojure. For the past year or so I've been using CouchDB, and am very happy with the MVCC disk storage system it uses. Has anyone tried marrying the two system systems to create a truly persistent data primitive where any "updates" to a map is written to t

Re: Clojure / Common Lisp Question

2010-06-22 Thread Alessio Stalla
On 18 Giu, 16:52, rob levy wrote: > As an informal survey of people who use both Clojure and Common Lisp for > different projects, what do you see as the main determining factors behind > your choice to use either Clojure or Common Lisp for a project, given the > present state of Clojure.  Let's o

I am unclear on how I can call an Ifn stored in a map usefully

2010-06-22 Thread Tim Robinson
Hello Folks, I'm a noob to both programming (1 year part-time) and to Clojure (1 week). I am unclear on how I can call an Ifn stored in a map usefully and I am hoping you can help me. I have stored data in a few maps (both functions and data): user=> (def uhoh* (ref {:event {:date #(date

Re: I am unclear on how I can call an Ifn stored in a map usefully

2010-06-22 Thread Daniel Gagnon
> >user=>(def current* (merge (uhoh* :event)(why* :event))) >#'user/current* > > here's my problem: > >user=> current* >{:stuff "ELI", :date #user$fn__2...@4fa3551c>, :name "EOW"} > > I was hoping this kind of a call would yield: > > {:stuff "ELI", :date "Tue 22 Jun 2010 17:

Re: Enhanced Primitive Support

2010-06-22 Thread Garth Sheldon-Coulson
I'm just one voice on the side that's been advocating for auto-promotion by default. For what it's worth, I completely see where the other side is coming from, and if Rich sees primitive math by default as important to Clojure's future, then so be it. It sounds like he's given it a lot of though an

Re: I am unclear on how I can call an Ifn stored in a map usefully

2010-06-22 Thread Michał Marczyk
Firstly, consider using Delays rather than IFn. See (doc delay) and (doc delay?). In Clojure, many sorts of things are IFns, including (among others) sets, vectors and maps, and you probably don't want to call those. (def uhoh* (ref {:event {:date (delay (java.util.Date.)) :name "EOW"}})) (def why

Re: Enhanced Primitive Support

2010-06-22 Thread Mike Meyer
On Tue, 22 Jun 2010 21:07:39 -0400 Garth Sheldon-Coulson wrote: > I would, however, like to throw some support behind Mike Meyer's suggestion > that the arbitrary precision numeric tower use names like add, sub, mul, > div, inc, dec, while the "default" ops keep the symbolic names. I think it > w

Re: How fine-grained is fine-grained locals clearing?

2010-06-22 Thread ataggart
Before. On Jun 22, 3:46 am, ann wrote: > (defn fn1 [a] (fn2 a) ) > > When is a cleared, before call to fn2 or after? -- 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 n

Re: How fine-grained is fine-grained locals clearing?

2010-06-22 Thread .Bill Smith
I do not understand the question. On Jun 22, 5:46 am, ann wrote: > (defn fn1 [a] (fn2 a) ) > > When is a cleared, before call to fn2 or after? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.

Re: How fine-grained is fine-grained locals clearing?

2010-06-22 Thread ataggart
It's an issue of when the object referenced by 'a' can be garbage collected. Rich is able to do some magic in the bytecode whereby the 'a' reference is set to null prior to the effective call to fn2 (and still pass the object), thus the object can be garbage collected whenever fn2 is done with it