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: 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 dnolen.li...@gmail.com wrote: Oops you're right :) And better written

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 ideomatic way

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

Re: Dependency management

2010-01-22 Thread Meikel Brandmeyer
Hi, On Jan 22, 6:40 am, Mark Derricutt m...@talios.com 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

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 paredit

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.init(I)V, I checked out lot's of branched in clojure-contrib, but ended up unpacking manually

Re: Debugging in Clojure

2010-01-22 Thread Krukow
On Jan 22, 2:27 am, ajay gopalakrishnan ajgop...@gmail.com 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

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

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: Clojure for largish web application?

2010-01-22 Thread Shantanu Kumar
On Jan 22, 11:09 am, cperkins cperk...@medialab.com 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

Re: Proposal: New fn assoc-in-with

2010-01-22 Thread Chouser
On Thu, Jan 21, 2010 at 10:11 PM, Sean Devlin francoisdev...@gmail.com 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

Re: Parallel activities

2010-01-22 Thread Chouser
On Thu, Jan 21, 2010 at 11:35 PM, tsuraan tsur...@gmail.com 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)).  

Re: Parallel activities

2010-01-22 Thread Alex Stoddard
On Jan 21, 10:35 pm, tsuraan tsur...@gmail.com 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,

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

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  

Re: Using maps as namespaces

2010-01-22 Thread Meikel Brandmeyer
Hi, On Jan 22, 12:11 pm, Jacek Generowicz jacek.generow...@googlemail.com 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

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

Re: Dependency management

2010-01-22 Thread Perry Trolard
On Jan 21, 7:21 pm, Richard Newman holyg...@gmail.com 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

Re: Dependency management

2010-01-22 Thread Stuart Sierra
On Jan 21, 8:21 pm, Richard Newman holyg...@gmail.com 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

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

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: 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

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't

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,

Re: Dependency management

2010-01-22 Thread Phil Hagelberg
Laurent PETIT laurent.pe...@gmail.com 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

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 t...@dysinger.net 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

Re: Clojure Conference Poll

2010-01-22 Thread Chouser
On Fri, Jan 22, 2010 at 1:07 PM, Sean Devlin francoisdev...@gmail.com 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

Re: Clojure Conference Poll

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

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: 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

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 holyg...@gmail.com 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

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: 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 is

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

Re: Promise/Deliver use cases

2010-01-22 Thread Chouser
On Thu, Jan 21, 2010 at 6:19 AM, Baishampayan Ghose b.gh...@ocricket.com 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

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 francoisdev...@gmail.com 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

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 weavejes...@googlemail.com wrote: Doesn't Lein currently rely on Maven for dependency management? - James On Jan 22, 6:53 pm, Sean Devlin francoisdev...@gmail.com wrote: Okay,

Re: Dependency management

2010-01-22 Thread Meikel Brandmeyer
Hi, On Jan 22, 8:20 am, Richard Newman holyg...@gmail.com 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

Re: Clojure Conference Poll

2010-01-22 Thread twitter.com/nfma
Where is it going to be held? 2010/1/22 dysinger t...@dysinger.net 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

Re: Question about Responsiveness of Garbage Collection

2010-01-22 Thread Erik Price
On Jan 20, 7:22 pm, CuppoJava patrickli_2...@hotmail.com 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

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 t...@dysinger.net wrote: We will be organizing a conference in the next month for 2010 (probably in the fall).  One question I

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,

Re: Clojure Conference Poll

2010-01-22 Thread ataggart
On Jan 22, 11:49 am, jeremey j...@jlb.me 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

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

Re: Promise/Deliver use cases

2010-01-22 Thread David Nolen
On Fri, Jan 22, 2010 at 11:41 AM, Laurent PETIT laurent.pe...@gmail.comwrote: 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

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

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 mefo...@gmail.com 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

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 francoisdev...@gmail.com wrote: Clearly you haven't taken into account that Philadelphia is more

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]] ...

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 wmacgy...@gmail.comwrote: 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

(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

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

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

Re: (list* ())

2010-01-22 Thread ataggart
On Jan 22, 1:30 pm, samppi rbysam...@gmail.com 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

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

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 drc...@gmail.com 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

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 lprefonta...@softaddicts.ca wrote: Either would be fine (week/weekend) for me. As for the location, being in the Montreal area, I

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

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

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

Re: Promise/Deliver use cases

2010-01-22 Thread Steven E. Harris
Baishampayan Ghose b.gh...@ocricket.com 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

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

2010-01-22 Thread Steven E. Harris
Alex Stoddard alexander.stodd...@gmail.com 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

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

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)))

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

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

Re: recursive deftype?

2010-01-22 Thread Raoul Duke
On Fri, Jan 22, 2010 at 3:20 PM, Raoul Duke rao...@gmail.com 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

Re: recursive deftype?

2010-01-22 Thread ataggart
On Jan 22, 3:51 pm, Raoul Duke rao...@gmail.com wrote: On Fri, Jan 22, 2010 at 3:20 PM, Raoul Duke rao...@gmail.com 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.

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 this

Re: Debugging in Clojure

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

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

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: Debugging in Clojure

2010-01-22 Thread ataggart
On Jan 22, 4:13 pm, Mike Meyer mwm-keyword-googlegroups. 620...@mired.org wrote: On Fri, 22 Jan 2010 10:08:45 +0200 Miron Brezuleanu mbr...@gmail.com wrote: Hello, On Fri, Jan 22, 2010 at 3:14 AM, ajay gopalakrishnan ajgop...@gmail.comwrote: Hi, I usually debug by adding

Re: Dependency management

2010-01-22 Thread ataggart
On Jan 22, 4:34 pm, Richard Newman holyg...@gmail.com 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

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

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

Re: Debugging in Clojure

2010-01-22 Thread ataggart
On Jan 22, 5:25 pm, ajay gopalakrishnan ajgop...@gmail.com 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 ajgop...@gmail.com 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

Re: Debugging in Clojure

2010-01-22 Thread Mike Meyer
On Fri, 22 Jan 2010 17:25:39 -0800 ajay gopalakrishnan ajgop...@gmail.com 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

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

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: 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 drcab...@gmail.com 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,

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 rbysam...@gmail.com 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

Re: (list* ())

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

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: Debugging in Clojure

2010-01-22 Thread ataggart
On Jan 22, 6:27 pm, Mike Meyer mwm-keyword-googlegroups. 620...@mired.org wrote: On Fri, 22 Jan 2010 17:25:39 -0800 ajay gopalakrishnan ajgop...@gmail.com 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

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 weavejes...@googlemail.com wrote: On Jan 23, 2:29 am, David Cabana drcab...@gmail.com wrote: What I'd like to get from 'tickets' is

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: (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

Re: loss-free print/read

2010-01-22 Thread Timothy Pratley
2010/1/22 dodo dominik.tor...@googlemail.com: 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

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