Re: Clojure Conference Poll

2010-01-22 Thread Konrad Hinsen
On 22 Jan 2010, at 22:15, Wilson MacGyver wrote: I vote let's turn this into a clojure vacation, and hold it in an exotic location. Otherwise, hey, Columbus Ohio is as good as any other city. :) My vote is for Paris, France :-) Konrad. -- You received this message because you are subscribed

Re: loss-free print/read

2010-01-22 Thread Timothy Pratley
2010/1/22 dodo : > Does clojure provide a the possibility to retrieve the data structure > that represents a function? You would need to keep a copy, which is quite easy to do. Here is one way: (def fna-ast '(fn [x] (inc x))) (def fna (eval fna-ast)) (fna 5) => 6 You could store the ast as meta-d

Re: (list* ())

2010-01-22 Thread samppi
Reading the source code of core.clj, I've just realized that list* isn't like vec at all: the point of list* is to help the apply function, and that it doesn't even ever return lists: it always returns Cons objects (if there are two+ arguments), or a sequence (if there is one argument). The only ti

Re: (list* ())

2010-01-22 Thread samppi
@DeSeno: list*'s doc does indeed say that the last element will be treated as a seq, but the beginning of the same doc definitely says that list* returns a list. The doc is: Creates a new list containing the items prepended to the rest, the last of which will be treated as a sequence. "The last

Re: How can I parse this with clojure.contrib.zip-filter.xml ?

2010-01-22 Thread David Cabana
James, That worked beautifully. I knew it had to be simple, but I was drawing a total blank. Thank you, David. On Fri, Jan 22, 2010 at 9:53 PM, James Reeves wrote: > On Jan 23, 2:29 am, David Cabana wrote: >> What I'd like to get from 'tickets' is something like ( ["Alice" >> ["foo"]]  ["Bob" [

Re: Debugging in Clojure

2010-01-22 Thread ataggart
On Jan 22, 6:27 pm, Mike Meyer wrote: > On Fri, 22 Jan 2010 17:25:39 -0800 > > ajay gopalakrishnan wrote: > > I dont mind using println. The problem is that needs to be inside a do or > > when ... and that is not really part of my code. When the time comes to > > remove the prints, i need to re

Re: Dependency management

2010-01-22 Thread Richard Newman
They have a partial ordering wrt a particular repo. Many repos have straight-line histories, and thus have a total ordering. So how do I find out the ordering of your x repository here in my machine, possibly without having x installed. Or your repo cloned? I'm assuming that a source-based

Re: Clojure Conference Poll

2010-01-22 Thread Pratik Patel
I'll throw in my preferences: Location: Atlanta - Cheap facilities, direct flights for most everyone in the *world*, easier for Euro folks to make it here, and great BBQ. Days of week: It would be great to have it on Thurs afternoon/Fri/Sat Date: late Sept, early Oct Sessions: Day1: Beginner tracks

Re: Dependency management

2010-01-22 Thread Meikel Brandmeyer
Hi, Am 22.01.2010 um 21:07 schrieb Richard Newman: >> BTW: commit ids as version numbers break down here, because they are >> not ordered. > > They have a partial ordering wrt a particular repo. Many repos have > straight-line histories, and thus have a total ordering. So how do I find out the

Re: (list* ())

2010-01-22 Thread MiltondSilva
See this: http://groups.google.com/group/clojure/browse_thread/thread/bc938600ddaaeada/0600e5c3f0c44770?lnk=gst&q=nil#0600e5c3f0c44770 -- 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

Re: (list* ())

2010-01-22 Thread j DeSeno
The doc for list* says the last element will be treated as a seq. (seq ()) returns nil. On Fri, Jan 22, 2010 at 1:30 PM, samppi wrote: > This is not a big deal: it is a quibble with a weird and inconvenient > behavior of list*: when given an empty sequence, it returns nil > instead of the empty

Re: How can I parse this with clojure.contrib.zip-filter.xml ?

2010-01-22 Thread James Reeves
On Jan 23, 2:29 am, David Cabana wrote: > What I'd like to get from 'tickets' is something like ( ["Alice" > ["foo"]]  ["Bob" ["bar" "baz"]]), that is, output that ties incidents > to customers. So far it has eluded me. "xml->" just returns a sequence of matches. If you want nested matches, you'l

How can I parse this with clojure.contrib.zip-filter.xml ?

2010-01-22 Thread David Cabana
I have been fooling around with clojure.contrib.zip-filter.xml, and feel like I'm stuck on something that should be simple. Below is code showing what I'm talking about. I'm trying to parse some simple xml, but can't quite get what I'm after. (ns foo (:require [clojure.xml :as xml]) (:require

Re: Suggest slime-redirect-inferior-output be default for Swank clojure

2010-01-22 Thread Stefan Kamphausen
I haven't checked whether your suggested solution would work, but I'd be *very* happy to find all stddout-like output from the backend in the REPL-buffer. If I may add this: having different threads' output somehow highlighted, e.g. with colors, would be a killer. But then the wishing time has ju

Re: Debugging in Clojure

2010-01-22 Thread Mike Meyer
On Fri, 22 Jan 2010 17:25:39 -0800 ajay gopalakrishnan wrote: > I dont mind using println. The problem is that needs to be inside a do or > when ... and that is not really part of my code. When the time comes to > remove the prints, i need to remove all these do blocks too. I can leave > them as

Re: Debugging in Clojure

2010-01-22 Thread Stefan Kamphausen
Hi, On Jan 22, 2:14 am, ajay gopalakrishnan wrote: > I usually debug by adding println statements. if you use Emacs is this statement is true for other programming languages, too, you might be interested in using lldebug. I'm pretty sure, that when you ask the author to add support for Clojure

Re: Debugging in Clojure

2010-01-22 Thread ataggart
On Jan 22, 5:25 pm, ajay gopalakrishnan wrote: > I dont mind using println. The problem is that needs to be inside a do or > when ... and that is not really part of my code. When the time comes to > remove the prints, i need to remove all these do blocks too. I can leave > them as it is I guess,

Re: Dependency management

2010-01-22 Thread Richard Newman
And as for Apache HttpComponents, it sounds like they don't grok the notion that breaking backwards compatibility should only occur with a major-version change. Yeah, it's a pain to use their stuff -- I've never seen *so many packages* in one library -- but it seems to be the only feature-rich

Re: Debugging in Clojure

2010-01-22 Thread ajay gopalakrishnan
I dont mind using println. The problem is that needs to be inside a do or when ... and that is not really part of my code. When the time comes to remove the prints, i need to remove all these do blocks too. I can leave them as it is I guess, but then it is not neat and non-idiomatic. From all the r

Re: Dependency management

2010-01-22 Thread ataggart
On Jan 22, 4:34 pm, Richard Newman wrote: > > Just this week I noticed that Apache HttpComponents 4.0.1 and 4.1   > > use completely different methods to apply pre-emptive HTTP Basic   > > Auth, and have even changed class hierarchies. A version of clj- > > apache-http targeted at 4.0.1 won't ev

Re: Debugging in Clojure

2010-01-22 Thread ataggart
On Jan 22, 4:13 pm, Mike Meyer wrote: > On Fri, 22 Jan 2010 10:08:45 +0200 > > > > > > Miron Brezuleanu wrote: > > Hello, > > > On Fri, Jan 22, 2010 at 3:14 AM, ajay gopalakrishnan > > wrote: > > > > Hi, > > > > I usually debug by adding println statements. How can I achieve the same > > > eff

Re: StackOverflowError possible with seq ?

2010-01-22 Thread mudphone
Hi Robert, I tracked down the source of the StackOverflowError in my code. It boils down to the following similar (to your example) code snippet. Although, on my machine, this example gives the stack overflow, rather than the OOM error. (def acoll (ref [])) (doseq [i (range 1 3000)] (println "

Re: Dependency management

2010-01-22 Thread Richard Newman
Just this week I noticed that Apache HttpComponents 4.0.1 and 4.1 use completely different methods to apply pre-emptive HTTP Basic Auth, and have even changed class hierarchies. A version of clj- apache-http targeted at 4.0.1 won't even run against a 4.1 jar (and vice versa), *even without A

Re: Debugging in Clojure

2010-01-22 Thread Mike Meyer
On Fri, 22 Jan 2010 10:08:45 +0200 Miron Brezuleanu wrote: > Hello, > > On Fri, Jan 22, 2010 at 3:14 AM, ajay gopalakrishnan > wrote: > > > Hi, > > > > I usually debug by adding println statements. How can I achieve the same > > effect in Clojure. I don't think I can introduce println at arbit

Re: "recursive" deftype?

2010-01-22 Thread Raoul Duke
> So you just need to instead use (new Trec (+ 1 v)). thanks! that does work for me, too. (i'm hoping Clojure will be able to avoid having to do it that way in the long run.) sincerely. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

Re: "recursive" deftype?

2010-01-22 Thread ataggart
On Jan 22, 3:51 pm, Raoul Duke wrote: > On Fri, Jan 22, 2010 at 3:20 PM, Raoul Duke wrote: > > fixed version, uses explicit type name i guess. > > augh, no, that doesn't work. i think i was getting screwed by previous > things i'd eval'd in the repl or something. beuller? thanks. While inside

Re: "recursive" deftype?

2010-01-22 Thread Raoul Duke
On Fri, Jan 22, 2010 at 3:20 PM, Raoul Duke wrote: > fixed version, uses explicit type name i guess. augh, no, that doesn't work. i think i was getting screwed by previous things i'd eval'd in the repl or something. beuller? thanks. -- You received this message because you are subscribed to the

Re: Clojure Conference Poll

2010-01-22 Thread jwhitlark
I would suggest that in addition to the 2-day (weekend seems logical to me) conference, that you consider a tutorial day on Friday, and perhaps even sprints for after the conference. I've gotten a great deal out of that format at Pycon, over the years. ~J On Jan 22, 9:36 am, dysinger wrote: > W

Re: "recursive" deftype?

2010-01-22 Thread Raoul Duke
fixed version, uses explicit type name i guess. (ns err) (defprotocol P1 (frob-v [this])) (defprotocol P2 (frob-self [this])) (deftype Trec [v] P1 (frob-v [] (+ 1 v))) (println (Trec 0)) (println (frob-v (Trec 0))) (deftype Trec [v] P1 (frob-v [] (+ 1 v)) P2 (frob-self [] (#'err/Trec (+ 1 v

"recursive" deftype?

2010-01-22 Thread Raoul Duke
hi, what is the right way to do frob-self below? or might deftype be upgraded to support tying the knot or whatever here? thanks! (defprotocol P1 (frob-v [this])) (defprotocol P2 (frob-self [this])) (deftype Trec [v] P1 (frob-v [] (+ 1 v))) (println (Trec 0)) (println (frob-v (Trec 0))) (deftyp

Re: Clojure for largish web application?

2010-01-22 Thread Richard Newman
I've developed some smaller web applications using Common Lisp, but I'm not confident that any of the CL web servers (CL-HTTP, Hunchentoot, AllegroServe, Araneida, mod_lisp, et al) are up to handling high traffic high data sites. (Maybe they are, I just don't know). Does anyone know how good any

Re: Suggest slime-redirect-inferior-output be default for Swank clojure

2010-01-22 Thread Steven E. Harris
Alex Stoddard writes: > With that all stdout ends up in the repl buffer. I spent hours last weekend working on a rebind-in-other-threads solution, completely forgetting that one can adjust SLIME to handle this problem. Also frustrating: Why don't any of the printing functions accept a Writer or

Re: Promise/Deliver use cases

2010-01-22 Thread Steven E. Harris
Baishampayan Ghose writes: > It would be great if someone pointed out some example usage of > promise/deliver. I've used them in cases where I think I need a future, but I don't want to wrap the future around some function just to catch and propagate its result elsewhere. In Clojure, the `future

more constructors (to support default values) for deftype?

2010-01-22 Thread Raoul Duke
hi, if i have (deftype map-db [next-id id-to-item-map]) i have to then do (map-db 0 {}) any time i want to make a new one. it would be nice to be able to add a function in my deftype so i could use (map-db) to get the same effect. ? -- You received this message because you are subscribed to the

Re: (list* ())

2010-01-22 Thread samppi
I'm writing a Clojure parser in Clojure. A certain parser reads a series of forms, and returns a seq (potentially including nil). Certain other parsers use the first parser to read list forms, vector forms, map forms, and set forms. The vector parser calls vec on its contents' sequence, the set pa

Re: Clojure Conference Poll

2010-01-22 Thread thearthur
Because the majority of us are not using Clojure for work a weekend is going to encounter the lease work related conflicts. a Friday-to- Saturday conference would be a potential compromise allowing people to only take thursday-friday off work and still be back on Monday. as far as choosing a locat

Re: Clojure Conference Poll

2010-01-22 Thread Howard Lewis Ship
I would prefer over a weekend (hopefully it won't conflict with a NFJS show). Bay area is nice; Portland is nicer! On Fri, Jan 22, 2010 at 1:53 PM, Luc Prefontaine wrote: > Either would be fine (week/weekend) for me. As for the location, being in > the Montreal area, I am not fan of the west coa

Re: Announcement: Vijual Graph Layout Library for Clojure Version 0.1

2010-01-22 Thread David Nolen
So cool! :D On Fri, Jan 22, 2010 at 5:06 PM, Conrad wrote: > http://lisperati.com/vijual/ > > Hope some of you find this library useful. Let me know if you have > feature requests or want to help me improve this library. > > Conrad Barski > lisper...@gmail.com > > -- > You received this message

Announcement: Vijual Graph Layout Library for Clojure Version 0.1

2010-01-22 Thread Conrad
http://lisperati.com/vijual/ Hope some of you find this library useful. Let me know if you have feature requests or want to help me improve this library. Conrad Barski lisper...@gmail.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to th

Re: (list* ())

2010-01-22 Thread ataggart
On Jan 22, 1:30 pm, samppi wrote: > This is not a big deal: it is a quibble with a weird and inconvenient > behavior of list*: when given an empty sequence, it returns nil > instead of the empty list. Why is this? According to list*'s > documentation, list* should always return a list. Judging

Re: Clojure Conference Poll

2010-01-22 Thread Luc Prefontaine
Either would be fine (week/weekend) for me. As for the location, being in the Montreal area, I am not fan of the west coast... Travelling by plane these times is painful enough, spending more time in these flying cans is not my first choice. If it could be held near a big flight hub accessi

Re: Empty defstruct

2010-01-22 Thread kyle smith
user> (defn inc-vals [m] (into (empty m) (zipmap (keys m) (map inc (vals m) #'user/inc-vals user> (inc-vals {:a 1 :b 2}) {:b 3, :a 2} user> (inc-vals (struct (create-struct :a :b) 1 2)) {:a 2, :b 3} user> (= *1 *2) true So what's the problem (other than printing differently)? -- You

(list* ())

2010-01-22 Thread samppi
This is not a big deal: it is a quibble with a weird and inconvenient behavior of list*: when given an empty sequence, it returns nil instead of the empty list. Why is this? According to list*'s documentation, list* should always return a list. -- You received this message because you are subscri

Re: Clojure Conference Poll

2010-01-22 Thread ajay gopalakrishnan
I vote for Seattle. On Fri, Jan 22, 2010 at 1:15 PM, Wilson MacGyver wrote: > I vote let's turn this into a clojure vacation, and hold it in an > exotic location. > > Otherwise, hey, Columbus Ohio is as good as any other city. :) > > On Fri, Jan 22, 2010 at 3:50 PM, Sean Devlin > wrote: > > Clea

Types in deftype vs. gen-class

2010-01-22 Thread Andreas Wenger
Hi, I read that deftype is often a better replacement for gen-class and defstruct. Indeed, it would fit for my purposes very well, except the following problem: deftype does not (yet?) use all the information from type hints. Simple example: (:gen-class :methods [[getText [] String]] ... comp

Re: Clojure Conference Poll

2010-01-22 Thread Wilson MacGyver
I vote let's turn this into a clojure vacation, and hold it in an exotic location. Otherwise, hey, Columbus Ohio is as good as any other city. :) On Fri, Jan 22, 2010 at 3:50 PM, Sean Devlin wrote: > Clearly you haven't taken into account that Philadelphia is more > central wrt the big cities :)

Re: Clojure Conference Poll

2010-01-22 Thread Sean Devlin
Clearly you haven't taken into account that Philadelphia is more central wrt the big cities :) On Jan 22, 3:32 pm, Fogus wrote: > Since Clojure is clearly an East-Coast language, I suggest DC as the > most logical locale.  (hopes someone buys this line of reasoning) > > -m -- You received this

Re: Clojure Conference Poll

2010-01-22 Thread Fogus
Since Clojure is clearly an East-Coast language, I suggest DC as the most logical locale. (hopes someone buys this line of reasoning) -m -- 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 No

Re: Promise/Deliver use cases

2010-01-22 Thread David Nolen
On Fri, Jan 22, 2010 at 11:41 AM, Laurent PETIT wrote: > David, > > maybe I don't understand your example well, but anyway, here are my > remarks / concerns: > > * You're example is not at all exempt from multithreading: you use > futures, and in the real scenario, the calls to deliver would have

Re: Dependency management

2010-01-22 Thread Richard Newman
BTW: commit ids as version numbers break down here, because they are not ordered. They have a partial ordering wrt a particular repo. Many repos have straight-line histories, and thus have a total ordering. Neither maven nor ivy are so simple-minded to allow only one version. How well range

Re: Clojure Conference Poll

2010-01-22 Thread ataggart
On Jan 22, 11:49 am, jeremey wrote: > +1 for weekend. Everyone is probably thinking Bay Area, but it should > really be in Houston (warm, great food, great bars). :) > > Jeremey. You misspelled "Austin". ;) -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: Dependency management

2010-01-22 Thread Richard Newman
Now for the original question: http://groups.google.com/group/clojure/browse_thread/thread/6cef4fcf523f936 The problem is AOT compiled code. Not only. If my library refer to a function that's first defined in library-X version 1.5, and some other code uses library-X 1.4 *and* my library, t

Re: Clojure Conference Poll

2010-01-22 Thread jeremey
+1 for weekend. Everyone is probably thinking Bay Area, but it should really be in Houston (warm, great food, great bars). :) Jeremey. On Jan 22, 11:36 am, dysinger wrote: > We will be organizing a conference in the next month for 2010 > (probably in the fall).  One question I would like to ask

Re: Question about Responsiveness of Garbage Collection

2010-01-22 Thread Erik Price
On Jan 20, 7:22 pm, CuppoJava wrote: > Some articles I read point to Java's use of garbage collection as the > culprit, and I'm wondering whether that is true. I know Scheme and > Common Lisp also use garbage collection, so do gui programs written > those languages also feel sluggish? Plenty o

Re: Clojure Conference Poll

2010-01-22 Thread twitter.com/nfma
Where is it going to be held? 2010/1/22 dysinger > We will be organizing a conference in the next month for 2010 > (probably in the fall). One question I would like to ask is, given > the conference is probably going to be a 2-day conference, would you > rather have it during the week or weeken

Re: Dependency management

2010-01-22 Thread Meikel Brandmeyer
Hi, On Jan 22, 8:20 am, Richard Newman wrote: > My code doesn't work on 1.1 or earlier. In maven specifying eg. 1.1 means "use whatever appropriate but prefer 1.1". Now you specify 1.2 and there is a conflict. By saying "use the newer version", 1.2 will be used. AOT compiled libraries should pr

Re: Predicate based dependency management

2010-01-22 Thread Sean Devlin
Yeah, but this still *should* be doable. Not necessarily directly, but doable. On Jan 22, 2:38 pm, James Reeves wrote: > Doesn't Lein currently rely on Maven for dependency management? > > - James > > On Jan 22, 6:53 pm, Sean Devlin wrote: > > > Okay, we've all seen this thread: > > >http://gro

Re: Predicate based dependency management

2010-01-22 Thread James Reeves
Doesn't Lein currently rely on Maven for dependency management? - James On Jan 22, 6:53 pm, Sean Devlin wrote: > Okay, we've all seen this thread: > > http://groups.google.com/group/clojure/browse_thread/thread/182f171af... > > It just hit me that we're all going about this the wrong way.  Our >

Re: Promise/Deliver use cases

2010-01-22 Thread Chouser
On Thu, Jan 21, 2010 at 6:19 AM, Baishampayan Ghose wrote: > > It would be great if someone pointed out some example usage of > promise/deliver. I've used them to convert a callback-based (continuation-passing style, if you will) API into a blocking one. The lib I was using provides something y

Predicate based dependency management

2010-01-22 Thread Sean Devlin
Okay, we've all seen this thread: http://groups.google.com/group/clojure/browse_thread/thread/182f171afc49473b It just hit me that we're all going about this the wrong way. Our libraries shouldn't specify specific versions. Each dependency should be a Clojure predicate. Then, the lein deps cou

Re: Empty defstruct

2010-01-22 Thread Andreas Wenger
> as I said, structs are an optimization on maps, that optimization > doesn't work for empty structs, so empty structs "of course" don't > make sense For me structs are more than just optimizations. They add documentary information to the map, which is a great feature for readability. Optimization

Re: Clojure Conference Poll

2010-01-22 Thread Richard Newman
What coast are you thinking? That will probably affect a lot of answers. Agreed. I'm flexible enough to go during the week (which frees up my weekend!), but I imagine that's not the case for most. -- You received this message because you are subscribed to the Google Groups "Clojure" group.

Re: Dependency management

2010-01-22 Thread Sean Devlin
Does anyone know what Debian does? That might be a good starting point. On Jan 22, 1:28 pm, Richard Newman wrote: > >> Apparently everyone is jumping on the Leiningen bandwagon and   > >> deleting > >> their build.xml files. I guess that means I'm moving, too. > > > Deleting build.xml files is g

Re: Dependency management

2010-01-22 Thread Richard Newman
Alternatively, is it possible to at least depend on a "source" version of the dependency, having it compiled on the fly locally when compiling the main project ? (so that one could benefit from AOP, and this could also solve the problem of a library mixing java and clojure source) ? I've th

Re: Dependency management

2010-01-22 Thread Richard Newman
Apparently everyone is jumping on the Leiningen bandwagon and deleting their build.xml files. I guess that means I'm moving, too. Deleting build.xml files is good. After that, you've got several options, including Leiningen and clojure-maven-plugin, both of which are based on the Maven depend

Re: Dependency management

2010-01-22 Thread Richard Newman
Richard, this doesn't address your larger points, but I wanted to make sure you're aware of http://build.clojure.org which is a maven repo for clojure & contrib artifacts. At /snapshots, there are builds for Clojure 1.2 (1.2.0-master-SNAPSHOT). Leiningen is aware of this repo by default, so you

Re: Clojure Conference Poll

2010-01-22 Thread Sean Devlin
Only if you know a good bar :) On Jan 22, 1:15 pm, Chouser wrote: > On Fri, Jan 22, 2010 at 1:07 PM, Sean Devlin wrote: > > What coast are you thinking?  That will probably affect a lot of > > answers. > > Why not compromise and have it in Indianapolis? > > Not getting my hopes up, > --Chouserht

Re: Clojure Conference Poll

2010-01-22 Thread Chouser
On Fri, Jan 22, 2010 at 1:07 PM, Sean Devlin wrote: > What coast are you thinking?  That will probably affect a lot of > answers. Why not compromise and have it in Indianapolis? Not getting my hopes up, --Chouser http://joyofclojure.com/ -- You received this message because you are subscribed

Re: Clojure Conference Poll

2010-01-22 Thread Sean Devlin
What coast are you thinking? That will probably affect a lot of answers. Sean On Jan 22, 12:36 pm, dysinger wrote: > We will be organizing a conference in the next month for 2010 > (probably in the fall).  One question I would like to ask is, given > the conference is probably going to be a 2-d

Re: Dependency management

2010-01-22 Thread Phil Hagelberg
Laurent PETIT writes: > Is it possible in maven or leiningen to place a dependency not on a > specific version of a pre-built artifact, but rather on a specific scm > revision (or just head, aka SNAPSHOT for binary releases) of a > project's source repository, and having the machinery understand

Clojure Conference Poll

2010-01-22 Thread dysinger
We will be organizing a conference in the next month for 2010 (probably in the fall). One question I would like to ask is, given the conference is probably going to be a 2-day conference, would you rather have it during the week or weekend ? I would think a weekend (meet & greet friday night, sat

Re: Clojure Conference

2010-01-22 Thread Tim Dysinger
Amit and I are teaming up on it. We'll have a website up soon w/ a call for papers. On Fri, Jan 22, 2010 at 6:05 AM, Howard Lewis Ship wrote: > I've heard, indirectly, that you are putting together a Clojure > conference. I've been speaking about Clojure at NFJS (Seattle), > TheServerSide, Dev

Re: Parallel activities

2010-01-22 Thread tsuraan
> As a major convenience over starting separate threads by hand I would > use "future". For each invocation future will run a given function on > a different thread. You can then either dereference each future which > will block until the function completes or ask if a future has > completed with "

Re: Parallel activities

2010-01-22 Thread tsuraan
> When you send-off an action to an agent, that agent gets is > allocated a thread for at least the duration of that action. So > using send-off on long-running actions to two agents will result > in those actions being run in parallel. Ok, I re-read the docs on agents, and it looks like they don

Re: Dependency management

2010-01-22 Thread Laurent PETIT
Is it possible in maven or leiningen to place a dependency not on a specific version of a pre-built artifact, but rather on a specific scm revision (or just head, aka SNAPSHOT for binary releases) of a project's source repository, and having the machinery understand it has to first locally build th

Re: Dependency management

2010-01-22 Thread David Brown
On Thu, Jan 21, 2010 at 10:23:10PM -0800, Richard Newman wrote: I'm somewhat swayed by Leiningen because it makes doing some things easy (uberjar! starting a REPL! neat!), at the cost of making other things (such as managing dependencies myself) more frustrating. However, if it wasn't for all

Re: Promise/Deliver use cases

2010-01-22 Thread Laurent PETIT
David, maybe I don't understand your example well, but anyway, here are my remarks / concerns: * You're example is not at all exempt from multithreading: you use futures, and in the real scenario, the calls to deliver would have to occur from a thread able to pull from or be notified by the prog

Re: Dependency management

2010-01-22 Thread Stuart Sierra
On Jan 21, 8:21 pm, Richard Newman wrote: > Apparently everyone is jumping on the Leiningen bandwagon and deleting   > their build.xml files. I guess that means I'm moving, too. Deleting build.xml files is good. After that, you've got several options, including Leiningen and clojure-maven-plugin

Re: Dependency management

2010-01-22 Thread Perry Trolard
On Jan 21, 7:21 pm, Richard Newman wrote: > Now, I like to keep track of Clojure master. Right now, Clojure   > reports "Clojure 1.2.0-master-SNAPSHOT". > > (I don't see that in Maven Central or in Clojars, so I guess I have to   > put it in my local repository...?) Richard, this doesn't address

Re: Promise/Deliver use cases

2010-01-22 Thread David Nolen
They are actually useful even outside the context of concurrency. For example perhaps you have a recursive data structure that represents a series of unit tests and unit test suites. You would like to do two things: 1. Render out the nested structure of the tests that will be executed for the user

Re: Using maps as namespaces

2010-01-22 Thread Meikel Brandmeyer
Hi, On Jan 22, 12:11 pm, Jacek Generowicz wrote: > Am I reinventing some wheel? > > If not, does Clojure provide any run-time binding mechanisms which > would allow this concept be made to work with maps which do not become > available until run-time? You might want to investigate with-bindings

Re: Dependency management

2010-01-22 Thread Seth
>    * I keep up to date with Clojure master. I don't use binary releases. >    * I fix bugs and make changes in my local Clojure/contrib/third- > party library trees, and I want *all* of my builds to use *those*, not   > their own choice of versions. With lein/mvn I have to install a custom   > ve

Clojure Conference

2010-01-22 Thread Howard Lewis Ship
I've heard, indirectly, that you are putting together a Clojure conference. I've been speaking about Clojure at NFJS (Seattle), TheServerSide, Devoxx, CodeMash and a couple of Portland-local conferences. I'd love the opportunity to talk about Clojure at a conference such as the one your are plann

Re: Parallel activities

2010-01-22 Thread Alex Stoddard
On Jan 21, 10:35 pm, tsuraan wrote: > What is the clojure idiom for running multiple (in this case IO bound) > functions simultaneously?  My use case is the parallel activities are > coordinated, basically running in lockstep.  I've been using (.start > (Thread. myfn)).  It works, but I'm wonderin

Re: Parallel activities

2010-01-22 Thread Chouser
On Thu, Jan 21, 2010 at 11:35 PM, tsuraan wrote: > What is the clojure idiom for running multiple (in this case IO bound) > functions simultaneously?  My use case is the parallel activities are > coordinated, basically running in lockstep.  I've been using (.start > (Thread. myfn)).  It works, but

Re: Proposal: New fn assoc-in-with

2010-01-22 Thread Chouser
On Thu, Jan 21, 2010 at 10:11 PM, Sean Devlin wrote: > Sometimes you don't want assoc-in to create a hash-map.  Sometimes you > wish it could create a sorted map. > > Just finished working on something with Alexy Khrabrov & Chouser on > IRC, and the three of us are wondering if the result might be

Re: Clojure for largish web application?

2010-01-22 Thread Shantanu Kumar
On Jan 22, 11:09 am, cperkins wrote: > I've read that people have been able to use Clojure with some of the > Java web servers.  I am not familiar with any Java web servers or web > frameworks and wonder if anyone who knows more about them can advise > me. FWIW I'm also not familiar with load ba

Re: Using maps as namespaces

2010-01-22 Thread Konrad Hinsen
On 22.01.2010, at 12:11, Jacek Generowicz wrote: If not, does Clojure provide any run-time binding mechanisms which would allow this concept be made to work with maps which do not become available until run-time? There's always eval, and in fact I think you can't work around it. The meaning

Re: Dependency management

2010-01-22 Thread Matt Clark
>From my googling, the only way to solve this in the general case (IE the java case) is through using OSGi. I have no idea what the state of compatibility is between clojure and OSGi at this time. I'd be curious to find out in fact. Here's the stackoverflow.com page I found that describes the si

Re: Debugging in Clojure

2010-01-22 Thread Krukow
On Jan 22, 2:27 am, ajay gopalakrishnan wrote: > Is this the preferred way of debugging in Clojure? Please don't top post. I've heard people have success with regular debuggers, e.g. JSwat, although I haven't tried this myself... /Karl -- You received this message because you are subscribed

Using maps as namespaces

2010-01-22 Thread Jacek Generowicz
I'm trying to create a utility which allows the use of maps as namespaces. For example (defmacro in-map [m & body] (let [bindings (apply concat (map (fn [k] [(symbol (name k)) (m k)]) (keys m)))] `(let [...@bindings] ~...@body))) would allow (in-map {:a 1 :b 2 :c 3} (+ a (* b c)))

Re: Dependency management

2010-01-22 Thread Sergey Galustyan
I got a similar issue, yesteday I tried to update from github to newest version of clojure\clojure-contrib, and clojure-contrib showed me "Caused by: java.lang.NoSuchMethodError: clojure.lang.RestFn.(I)V", I checked out lot's of branched in clojure-contrib, but ended up unpacking manually downloade

Re: Debugging in Clojure

2010-01-22 Thread Konrad Scorciapino
(comment) and #_ are pretty useful to disable forms when debugging: (+ 3 #_4) -> 3 (comment println "hi") -> nil Excerpts from David Nolen's message of Fri Jan 22 02:38:29 -0300 2010: > I find that injecting print statements is painful if you're not using > something like paredit (Emacs). With pa

Re: Dependency management

2010-01-22 Thread Meikel Brandmeyer
Hi, On Jan 22, 6:40 am, Mark Derricutt wrote: > We're not all jumping on Leiningen, some of us are sticking with > maven, using the maven-clojure-compiler plugin, and also the > experimental Maven Polyglot Clojure build support: > >  http://polyglot.sonatype.org/clojure.html > > (disclojure - bo

Clojure for largish web application?

2010-01-22 Thread cperkins
I've read that people have been able to use Clojure with some of the Java web servers. I am not familiar with any Java web servers or web frameworks and wonder if anyone who knows more about them can advise me. FWIW I'm also not familiar with load balancing or multi-server setups for web applicati

Re: Debugging in Clojure

2010-01-22 Thread Heinz N. Gies
On Jan 22, 2010, at 9:08 , Miron Brezuleanu wrote: > I also use 'do's as others have suggested. Another trick is to add dummy > variables in lets just to be able to print something. For instance, > > (let [a 1 >b 2 >dummy1 (println "stuff") >c 3] > ...) Isn't the ideo

Re: What's the best way to do this?

2010-01-22 Thread Neill Alexander
Wow, thanks very much guys. It's a really useful learning experience to read these different solutions. I'm not yet thinking in Clojure, but this thread will surely take me another step closer. On Jan 22, 6:42 am, David Nolen wrote: > Oops you're right :) And better written as well :D > > On Fri,

Re: Dependency management

2010-01-22 Thread Konrad Hinsen
On 22 Jan 2010, at 07:23, Richard Newman wrote: * For those who might ask "and what kind of user are you?": * I keep up to date with Clojure master. I don't use binary releases. * I fix bugs and make changes in my local Clojure/contrib/third- party library trees, and I want *all* of my builds

Re: Debugging in Clojure

2010-01-22 Thread Miron Brezuleanu
Hello, On Fri, Jan 22, 2010 at 3:14 AM, ajay gopalakrishnan wrote: > Hi, > > I usually debug by adding println statements. How can I achieve the same > effect in Clojure. I don't think I can introduce println at arbitrary places > to figure out at which step is the algorithm failing. > I also us