Embedding swank-clojure

2010-04-17 Thread HiHeelHottie
Based on the Embedding section of http://github.com/technomancy/swank-clojure, I'm using the following to test it out. Is there a better way to do this that doesn't use Compiler? Is there a way to programmatically stop swank? It seems start-repl takes control of the thread. What would be a goo

Re: Erlang like environment

2010-04-17 Thread patrickdlogan
I have used blitz javaspaces quite a bit, but not yet with clojure. I believe they would we be a good fit. Javaspaces are a dynamic, flexible, by-value, distributed coordination mechanism. On Apr 14, 5:42 pm, gary ng wrote: > Hi, > > I just start to learn about clojure and is wondering if there

Re: Has deftype changed?

2010-04-17 Thread Andrew Stein
(deftype Bar [a b c d e]) (def b (new Bar 1 2 3 4 5)) There are a few other syntax changes too, defrecord replaces extending IPersistenMap, and you need to include 'this' in protocol fun implementations ... http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/deftype http://ri

Has deftype changed?

2010-04-17 Thread Praki
I am seeing compilation errors in my code with deftype. I just updated my project dependencies and probably pulled in the latest clojure package. Anyway, the following code from wiki doesn't work anymore. Pointers to any late breaking changes much appreciated! TIA (deftype Bar [a b c d e]) (def b

Re: platform-specific unit test failures in cc.test-complex-numbers

2010-04-17 Thread B Smith-Mannschott
On Sat, Apr 17, 2010 at 21:32, Stuart Halloway wrote: > It's almost certainly the commit that added the InternalReduce protocol: > 5b281880571573c5917781de932ce4789f18daec. > > I am slowly pounding my skull against this and would welcome any help. It > appears that the internal-reduce function fla

Re: platform-specific unit test failures in cc.test-complex-numbers

2010-04-17 Thread Stuart Halloway
It's almost certainly the commit that added the InternalReduce protocol: 5b281880571573c5917781de932ce4789f18daec. I am slowly pounding my skull against this and would welcome any help. It appears that the internal-reduce function flakes out and stops working, but only intermittently. If

Re: platform-specific unit test failures in cc.test-complex-numbers

2010-04-17 Thread B Smith-Mannschott
I let Meheadable and George (my two macs) run clojure-contrib builds while I was watching TV to get an idea of the probability of this crash occurring was. George, a 1 GHz PowerPC G4 (1 core) fails 37 of 59 builds (circa 63%) Meheadable, a 2.2 GHz Core2Duo (2 cores) fails 48 of 132 builds (circa 3

Re: getting compiler-like meta data from read

2010-04-17 Thread Per Vognsen
On Sat, Apr 17, 2010 at 2:29 AM, Kevin Livingston wrote: > I have an application that will read in a large number of structures > from a file.  those structures will be used throughout the application > to produce additional data etc.  since they are "user" configurable, > it would be nice to know

Re: platform-specific unit test failures in cc.test-complex-numbers

2010-04-17 Thread B Smith-Mannschott
On Sat, Apr 17, 2010 at 18:02, B Smith-Mannschott wrote: > On Sat, Apr 17, 2010 at 15:45, B Smith-Mannschott > wrote: >> More oddness: >> >> If I remove all unit tests *except* test-compex-numbers, all is well: >> >>  [INFO] [clojure:test {execution: test-clojure}] >> >>  Testing clojure.contrib

Re: Dead easy start with Clojure on windows

2010-04-17 Thread Mark C
Found the link here: http://bitbucket.org/kasim/clojurew/get/tip.zip Kasim - thanks for the quick start. Worked fine. Maybe add a readme? M. On Apr 17, 5:35 am, Zmitro Lapcjonak wrote: > On Apr 15, 1:51 am, Kasim wrote: > > > Here are what you need to get started: > > 1. Download ClojureW.zip

binary structures/bitstrings

2010-04-17 Thread Scott T
Does anyone know of a clojure library for handling (un)packing of binary structures? I'm looking for something similar to perl/ruby/ python's pack(...) function or something like OCaml's bitstring module. My initial google and clojure-contrib perusing hasn't turned up anything obvious though I've

Re: "wrong number of args" with nested map

2010-04-17 Thread Derek
Thank you all for the explanations. I see now that I wasn't paying close enough attention, and needed to add another pair of brackets to destructure my lambda's single argument. On Apr 16, 11:51 am, Per Vognsen wrote: > Tangent: > > On Fri, Apr 16, 2010 at 7:41 PM, Douglas Philips wrote: > > (1)

getting compiler-like meta data from read

2010-04-17 Thread Kevin Livingston
I have an application that will read in a large number of structures from a file. those structures will be used throughout the application to produce additional data etc. since they are "user" configurable, it would be nice to know where they come from should one of them start misbehaving. the t

Re: do we have is-delivered? for promise

2010-04-17 Thread Per Vognsen
On Sat, Apr 17, 2010 at 11:07 PM, alux wrote: > Hello Per, > > thats very cool! Many thanks! Completely solves my problem. (As far as > I can see :-) > > I'm not sure whether I completely understand the implications of the > nondeterminism you described; will think about it. You say "When each > p

Re: do we have is-delivered? for promise

2010-04-17 Thread alux
Hello Per, thats very cool! Many thanks! Completely solves my problem. (As far as I can see :-) I'm not sure whether I completely understand the implications of the nondeterminism you described; will think about it. You say "When each promise can only be written by a single writer.." - I assume y

Re: Problem with Destructuring in A Function Call

2010-04-17 Thread Michał Marczyk
On 16 April 2010 16:25, Asim Jalis wrote: > Could you explain the rationale for this swapping? Intuitively it > seems to me that (let [{ :body x } { :body 42 }] x) should bind x > to 42 -- it seems intuitive because it is binding :body to :body > and 42 to x. My personal take on this is that maps

Re: platform-specific unit test failures in cc.test-complex-numbers

2010-04-17 Thread B Smith-Mannschott
On Sat, Apr 17, 2010 at 15:45, B Smith-Mannschott wrote: > More oddness: > > If I remove all unit tests *except* test-compex-numbers, all is well: > >  [INFO] [clojure:test {execution: test-clojure}] > >  Testing clojure.contrib.test-complex-numbers > >  Ran 8 tests containing 268 assertions. >  0

RE: Java interop question: proxy or gen-class?

2010-04-17 Thread Kevin
> Many thanks to Meikel Brandmeyer, whose code (after a one-character typo correction) worked the first time. As soon as I saw it, I understood every line of it; the problem was, it wouldn't have occurred to me to put all those elements (which, individually, I understood) together in just that way.

Re: do we have is-delivered? for promise

2010-04-17 Thread Michał Marczyk
On 17 April 2010 16:46, Per Vognsen wrote: > Not currently. I added the capability to some code I posted last month > for fixing print-method for promises so they aren't auto-dereferenced > when undelivered: Personally, I would prefer them never to be dereferenced for printing... In fact, I would

Re: do we have is-delivered? for promise

2010-04-17 Thread Per Vognsen
Not currently. I added the capability to some code I posted last month for fixing print-method for promises so they aren't auto-dereferenced when undelivered: (defn promise? [p] (isa? (type p) ::Promise)) (defn promise-delivered? [p] (zero? (.getCount (:d p (defmethod print-method ::

Re: platform-specific unit test failures in cc.test-complex-numbers

2010-04-17 Thread B Smith-Mannschott
More oddness: If I remove all unit tests *except* test-compex-numbers, all is well: [INFO] [clojure:test {execution: test-clojure}] Testing clojure.contrib.test-complex-numbers Ran 8 tests containing 268 assertions. 0 failures, 0 errors. If I remove only test-complex-numbers, leaving a

do we have is-delivered? for promise

2010-04-17 Thread alux
Hi, is there any nonblocking way I kind find out whether a promise has been delivered? Thanky you, alux -- 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 ar

Re: Dead easy start with Clojure on windows

2010-04-17 Thread Zmitro Lapcjonak
On Apr 15, 1:51 am, Kasim wrote: > Here are what you need to get started: > 1. Download ClojureW.zip and Unzip to a folder 0. Try to find the link to download. -- Zmitro Lapcionak -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gr