Re: macro questions, "can't embed unreadable..."

2008-10-30 Thread mb
Hi, On 31 Okt., 05:30, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote: > It works with a literal for vecs: > > user=> (declare-init [[a 1] [b 2] [c 3]]) > #=(var user/c) > > But if I def the seq of seqs: > > user=> (def myvecs '[[a 1] [b 2] [c 3]]) > #=(var user/myvecs) > user=> myvecs > [[a 1] [

macro questions, "can't embed unreadable..."

2008-10-30 Thread Stephen C. Gilardi
We now have the declare macro in Clojure: (defmacro declare "defs the supplied var names with no bindings, useful for making forward declarations." [& names] `(do ~@(map #(list 'def %) names))) That's structurally similar to a macro I'm having trouble getting right. Here's a modificatio

Modifying the classpath in Slime

2008-10-30 Thread J . Pablo Fernández
Hello, Can the classpath be modified for Clojure running in Slime after it has been started? Thanks. --~--~-~--~~~---~--~~ 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: Proxy Bug?

2008-10-30 Thread ntupel
On Thu, 2008-10-30 at 01:37 -0700, mb wrote: > I lookep up the implementation of proxy-super. It replaces the > method temporarily. So proxy-super basically doesn't work for > methods with multiple implementations for different arglists, > since only the actually called method-arglist combination

Files in Clojure Google Groups

2008-10-30 Thread bc
Hi all, Is there any way to enter an annotation or comments when a file is uploaded to the Clojure Google Groups file area? I've recently had a look at a few things there and it would be nice to have some context or background on why they were uploaded. For example, "tsp.zip" is a Traveling Sales

Re: Weighted Edge Representation

2008-10-30 Thread Adam Jones
On Oct 30, 11:01 am, "Matthew D. Swank" <[EMAIL PROTECTED]> wrote: > On Oct 30, 8:57 am, Rich Hickey <[EMAIL PROTECTED]> wrote: > > > > > On Oct 29, 6:27 pm, ccahoon <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > I'm wondering what would be a good way to represent a mincut, maximum > > > flow

Re: Weighted Edge Representation

2008-10-30 Thread Matthew D. Swank
On Oct 30, 8:57 am, Rich Hickey <[EMAIL PROTECTED]> wrote: > On Oct 29, 6:27 pm, ccahoon <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I'm wondering what would be a good way to represent a mincut, maximum > > flow problem in Clojure. A set of weighted edges makes sense to me, > > but I am not sure

Re: I want to contribute, where can I start?

2008-10-30 Thread Chouser
On Thu, Oct 30, 2008 at 6:13 AM, Robert Pfeiffer <[EMAIL PROTECTED]> wrote: > > Hello everybody, > > The clojure.org/contributing page does not give any starting points > for development and the sf bug tracker lists only two issues. Are > there bugs or feature requests with moderate severity/diffi

Re: Weighted Edge Representation

2008-10-30 Thread Roger Castillo
Hey Chris, You might want to look at Jung Graphing ( http://jung.sourceforge.net/) for inspiration or reuse. v1.7.6 interoperates well and provides a functional style interface. The only gotcha is nested interface referencing, which requires package.class$nested class referencing. Clojure and

Re: Weighted Edge Representation

2008-10-30 Thread Rich Hickey
On Oct 29, 6:27 pm, ccahoon <[EMAIL PROTECTED]> wrote: > Hello, > > I'm wondering what would be a good way to represent a mincut, maximum > flow problem in Clojure. A set of weighted edges makes sense to me, > but I am not sure how best to represent the edges so I can use them as > a key in a ma

Weighted Edge Representation

2008-10-30 Thread ccahoon
Hello, I'm wondering what would be a good way to represent a mincut, maximum flow problem in Clojure. A set of weighted edges makes sense to me, but I am not sure how best to represent the edges so I can use them as a key in a map. Pardon me for asking such a noob question on this board. I am new

Re: Weighted Edge Representation

2008-10-30 Thread Randall R Schulz
On Wednesday 29 October 2008 15:27, ccahoon wrote: > Hello, > > I'm wondering what would be a good way to represent a mincut, maximum > flow problem in Clojure. A set of weighted edges makes sense to me, > but I am not sure how best to represent the edges so I can use them > as a key in a map. Par

I want to contribute, where can I start?

2008-10-30 Thread Robert Pfeiffer
Hello everybody, The clojure.org/contributing page does not give any starting points for development and the sf bug tracker lists only two issues. Are there bugs or feature requests with moderate severity/difficulty I can work on in order to get to know the clojure implementation and development

Re: Ants and agents

2008-10-30 Thread MikeM
> My understanding of send and send-off, is that with send-off a new > thread outside the thread pool is used to run the agent action. Actually a different kind of thread pool is used for send-off. It is a cached thread pool obtained from Executors.newCachedThreadPool(), while send uses a thread

Re: Ants and agents

2008-10-30 Thread Jim Menard
Tom, > Actions given to an Agent are queued, so the action created via send- > off won't execute until the current Action completes. Thanks to you and Stuart for the explanation. If I'd only re-read the agents section of the documentation first, I wouldn't have needed to bother the group with th

Re: Ants and agents

2008-10-30 Thread mb
Hi, On 30 Okt., 12:43, Tom Davies <[EMAIL PROTECTED]> wrote: > > Then every iteration of ant behaviour (and evaporation etc.) creates   > > a new thread, right? This implies that an agent is not forever bound   > > to the same thread. Nor is a thread bound to one agent, as otherwise   > > one cou

Re: Ants and agents

2008-10-30 Thread Tom Davies
On Oct 30, 7:14 pm, Konrad Hinsen <[EMAIL PROTECTED]> wrote: > Then every iteration of ant behaviour (and evaporation etc.) creates   > a new thread, right? This implies that an agent is not forever bound   > to the same thread. Nor is a thread bound to one agent, as otherwise   > one could iter

Patch: java.lang.Error support for clojure.contrib.test_is

2008-10-30 Thread Paul Drummond
I have been using the test-is library from clojure.contrib very effectively - thanks Stuart and contributors! One thing I have noticed is that errors like StackOverflowError cause "run-tests" to terminate prematurely. I know java.lang.Errors should not be caught in general but I think it's accep

Re: Proxy Bug?

2008-10-30 Thread mb
Hi, On 30 Okt., 08:48, ntupel <[EMAIL PROTECTED]> wrote: > Interestingly java.io.OutputStream.write(I)V is invoked even though this > should be covered by the proxy write method. I lookep up the implementation of proxy-super. It replaces the method temporarily. So proxy-super basically doesn't w

Re: Ants and agents

2008-10-30 Thread Konrad Hinsen
On 29.10.2008, at 16:20, Stuart Halloway wrote: > (1) *agent* is set thread locally whenever a thread is an agent > action. It's all in the Java code, grep for AGENT OK, that's like I guessed then. > (3) send uses a thread pool that you should not assume you control, so > blocking for e.g. I/O

Re: Proxy Bug?

2008-10-30 Thread ntupel
On Wed, 2008-10-29 at 23:44 -0700, mb wrote: > But proxy-super to the rescue: You may try the following snippet > for the write method: Nice. Never heard of proxy-super before. Would be nice to mention it on the Java interop page and not only on the API page. > >(write > ([x] >