Clojure 1.3 amap/aset issue?

2010-10-03 Thread Sean Corfield
I'm trying out various examples in The Joy Of Clojure and I'm in Chapter 12 Performance looking at type hinting. The authors give this example: (set! *warn-on-reflection* true) ; true (defn asum-sq [xs] (let [dbl (amap xs i ret (* (aget xs i) (aget xs i)))] (a

Re: Help Fixing Bug in Durable Reference Creation Inside DoSync Transaction

2010-10-03 Thread Alyssa Kwan
I've come up with a solution to the durable ref creation/declaration in dosync block bug. The creation/declaration exclusively locks the logical dref by key to force other transactions to retry. I welcome feedback and code review from anyone interested in out-of-the-box durability of STM identiti

Re: big integers in 1.2 leading to parked processes? (maybe somehow, I think)

2010-10-03 Thread Lee Spector
On Oct 3, 2010, at 7:16 PM, Lee Spector wrote: > > I've just done a couple of runs verifying that this happens when using the > exact same code in 1.1 and 1.2. (Previously the code I was running under the > different versions varied slightly, but now I'm using exactly the same code.) If anyo

Re: The vsClojure Project

2010-10-03 Thread jmis
It's very encouraging to see others interested in the project. I've added the licensing information to the grammar file. There's a few other attributions I need to take care of before I can move on with development. The work of the Visual Studio SDK community and the Clojure community is what ha

Re: big integers in 1.2 leading to parked processes? (maybe somehow, I think)

2010-10-03 Thread Lee Spector
On Oct 3, 2010, at 6:54 PM, Randy Hudson wrote: > Oops, that changes doc is > http://github.com/clojure/clojure/blob/1.2.x/changes.txt > > On Oct 3, 6:52 pm, Randy Hudson wrote: >> One thing that did change between 1.1 and 1.2 is agent error handling. >> The 1.2 changes doc (http://github.com/

Re: big integers in 1.2 leading to parked processes? (maybe somehow, I think)

2010-10-03 Thread Randy Hudson
Oops, that changes doc is http://github.com/clojure/clojure/blob/1.2.x/changes.txt On Oct 3, 6:52 pm, Randy Hudson wrote: > One thing that did change between 1.1 and 1.2 is agent error handling. > The 1.2 changes doc  (http://github.com/clojure/clojure/blob/1.2.x/ > hanges.txt) shows several new

Re: big integers in 1.2 leading to parked processes? (maybe somehow, I think)

2010-10-03 Thread Randy Hudson
One thing that did change between 1.1 and 1.2 is agent error handling. The 1.2 changes doc (http://github.com/clojure/clojure/blob/1.2.x/ hanges.txt) shows several new agent error handling functions, a couple of deprecated ones, an improved 'await docstring -- which now says: "Blocks the current

Re: clojure-mode bug in Emacs

2010-10-03 Thread tcrayford
I've seen this a bunch. Emacs has some hidden setting that vastly increases sytax-highlighting performance, but messes up if you have a line starting with an open paren inside a string in a lisp mode. (I can't for the life of me remember what it is off the top of my head). On Sep 30, 4:26 pm, ".Bi

Re: The vsClojure Project

2010-10-03 Thread Laurent PETIT
Hello, I'm glad to see that CCW's Clojure grammar for Antlr has fit your needs and that you have been including it in vsClojure ! I'm also happy with the fact that at the root of the project, a mention to this appears, which also includes the original license. But (because there's a but :-) ), I

Re: Macro Implementation: I Don't Understand This Error Message

2010-10-03 Thread Eivind Magnus Hvidevold
I'm not sure where I picked it up, but I remembered the arguments being called &form and &env, and googling for "clojure &form &env" led me to: http://groups.google.com/group/clojure/browse_thread/thread/d710c290b67951a3/b827d46389110f26?lnk=gst&q=clojure+macro+%26env#b827d46389110f26 : "&form con

Re: The vsClojure Project

2010-10-03 Thread Seth
Yay! Following. On Oct 2, 9:33 pm, jmis wrote: >         I'd like to announce my Visual Studio 2010 Clojure extension project, > vsClojure.  The extension is not yet complete but provides a base for > further enhancements.  Currently, it supports syntax highlighting, > auto-indentation, brace mat

Re: big integers in 1.2 leading to parked processes? (maybe somehow, I think)

2010-10-03 Thread Lee Spector
On Oct 3, 2010, at 4:08 PM, David Nolen wrote: > On Sun, Oct 3, 2010 at 9:59 AM, Lee Spector wrote: > > The numerics changes did not make into 1.2. > Very interesting. But stranger still! I will keep investigating... -Lee -- You received this message because you are subscribed to the Goo

Re: big integers in 1.2 leading to parked processes? (maybe somehow, I think)

2010-10-03 Thread David Nolen
On Sun, Oct 3, 2010 at 9:59 AM, Lee Spector wrote: > > Although this isn't yet making any real sense to me I believe I MAY have > traced an elusive problem in code that I ported from clojure 1.1 to 1.2 to > the way in which big integers are handled in 1.2. I've seen (and > participated in) some c

Re: big integers in 1.2 leading to parked processes? (maybe somehow, I think)

2010-10-03 Thread George Jahad
Deadlocks are tough. When I have had similar problems in the past, (not related to bigints), it turned out 1 thread in the thread pool had a stack trace that was different. If there are a lot of threads in the pool, it can be easy to miss. If there is a stacktrace that is different, that'll be a

Re: OO design in clojure

2010-10-03 Thread Mark Engelberg
The real challenge is to reconceptualize your problem domain into a non-destructive framework. In other words, you need to transform your way of thinking from: move function (or method) takes a Shape and destructively updates the shape's x and y, returning void to move function takes a Shape and re

OO design in clojure

2010-10-03 Thread SpiderPig
I was wondering what's a good way to use OO concepts in clojure. Just using multimethods and maps? Or maybe protocols? Let's say I write a program that deals with many graphical elements e.g. a game or a vector graphic editor. I could represent each graphic/sprite/shape etc. as a map and define mul

Re: Cross-referencing objects?

2010-10-03 Thread David Nolen
On Sun, Oct 3, 2010 at 3:32 AM, Alan wrote: > I've got a collection of unique objects, and I need to partition them > into sets. That part's easy enough, but I need to have both of the > following be efficient, and preferably easy: > - Given an object, determine what set it's in > - List all the

Re: relational data aggregation language

2010-10-03 Thread Shantanu Kumar
I looked at Tutorial D - it's pretty interesting. Here are few top-of- my-head observations: * Which RDBMS do you use? If you are free to choose a new RDBMS, probably you can pick one that provides most of the computational functionality (as SQL constructs/functions) out of the box. For example Or

Re: Cross-referencing objects?

2010-10-03 Thread Mike Meyer
On Sun, 3 Oct 2010 00:32:16 -0700 (PDT) Alan wrote: > I've got a collection of unique objects, and I need to partition them > into sets. That part's easy enough, but I need to have both of the > following be efficient, and preferably easy: > - Given an object, determine what set it's in > - List

Re: Clojure Database experience reports wanted

2010-10-03 Thread Ben Mabey
On 10/2/10 12:01 PM, Mark Engelberg wrote: I've been using clojure with mongodb for a while now. I found that using a nosql database system was very freeing and pleasurable, compared to the python/sqlite combination I'd used before. However, I'm starting to bump up against some limitations: 1.

big integers in 1.2 leading to parked processes? (maybe somehow, I think)

2010-10-03 Thread Lee Spector
Although this isn't yet making any real sense to me I believe I MAY have traced an elusive problem in code that I ported from clojure 1.1 to 1.2 to the way in which big integers are handled in 1.2. I've seen (and participated in) some conversations about handling bignums but I don't recall what

Re: Problems Running tests with fixtures

2010-10-03 Thread Timothy Washington
Iiinteresting. It turns out that I wasn't calling (x) in the :once code. It looks like that prevents :each test from running. (ns utest) (use 'clojure.test) (defn f [x] (println "f before") (x) (println "f after")) (use-fixtures :each f) (defn g [x] (println "g1") *(x)* (println "g2")) (use-fix

Re: Cross-referencing objects?

2010-10-03 Thread André Thieme
Am 03.10.2010 09:32, schrieb Alan: I've got a collection of unique objects, and I need to partition them into sets. That part's easy enough, but I need to have both of the following be efficient, and preferably easy: - Given an object, determine what set it's in - List all the objects in a given

Re: relational data aggregation language

2010-10-03 Thread Shantanu Kumar
On Oct 3, 1:16 pm, Ross Gayler wrote: > Thanks Michael. > > > This sounds very similar to NoSQL and Map/Reduce? > > I'm not so sure about that (which may be mostly due to my ignorance of > NoSQL and Map/Reduce). The amount of data involved in my problem is > quite small and any infrastructure ai

Re: relational data aggregation language

2010-10-03 Thread Ross Gayler
Thanks Michael. > This sounds very similar to NoSQL and Map/Reduce? I'm not so sure about that (which may be mostly due to my ignorance of NoSQL and Map/Reduce). The amount of data involved in my problem is quite small and any infrastructure aimed at massive scaling may bring a load of conceptual

Re: Cross-referencing objects?

2010-10-03 Thread Saul Hazledine
On Oct 3, 9:32 am, Alan wrote: > I've got a collection of unique objects, and I need to partition them > into sets. That part's easy enough, but I need to have both of the > following be efficient, and preferably easy: > - Given an object, determine what set it's in > - List all the objects in a g

Re: Clojure Database experience reports wanted

2010-10-03 Thread Steve Purcell
Mark Engelberg writes: > I've been using clojure with mongodb for a while now. I found that > using a nosql database system was very freeing and pleasurable, > compared to the python/sqlite combination I'd used before. However, > I'm starting to bump up against some limitations: > 1. On my 32-b

Cross-referencing objects?

2010-10-03 Thread Alan
I've got a collection of unique objects, and I need to partition them into sets. That part's easy enough, but I need to have both of the following be efficient, and preferably easy: - Given an object, determine what set it's in - List all the objects in a given set In an imperative language this w