#clojure logs

2011-06-04

06:45fliebelWhere can I see which bugs are going to be included in 1.3?
06:46Dranik_bugs_ ??
06:46fliebelDranik: Uhm, fixes of course
06:47fliebelLike Jira stuff that's going to be addressed before 1.3
06:50fliebelI assume I have to click around here a bit: http://dev.clojure.org/jira/browse/CLJ
06:56Dranikfliebel, did u check this link? http://dev.clojure.org/jira/browse/CLJ/fixforversion/10038#atl_token=0iNjCLvEOM&selectedTab=com.atlassian.jira.plugin.system.project%3Aversion-issues-panel
06:58fliebelDranik: No, where did you find that?
06:58fliebeland, only 6 issues left? cool!
06:58Dranikthese are the issues from the roadmap
07:00Dranikfliebel, do you use clojure for commercial projects?
07:01fliebelDranik: uhm, not really. Why?
07:01Dranikjust curious. still searching for the real-life use cases for clojure
07:03fliebelDranik: I'd use it for most stuff where I get to decide anyway... But that's mostly side projects :(
07:04Dranikfor example: which projects?
07:05fliebelDranik: Uhm, https://github.com/pepijndevos but I need to work on my 'finish stuff' skills a bit more.
07:06Dranikfliebel, is logos your project?..
07:06fliebelDranik: No, it's a fork of dnolen.
07:07Dranikand utterson?
07:07fliebelDranik: huh, weird... oh, right, dnolen renamed the original.
07:07Dranikactually, I'm also trying to adopt clojure for web projects
07:07Dranikbut it's environment is still very poor
07:07fliebelDranik: Utterson is a project of me and devn, but as I said, I need to learn to finish stuff :(
07:09fliebelI took up finishing Utterson a few weeks back, but then someone put an email in my inbox labeled "I want to work with you", so now I'm doing some Python stuff.
07:09Dranik))
07:10fliebelDranik: What kind of web stuff do you do with Clojure?
07:10Dranikfliebel, nothing special, just simple blog engine right now
07:11fliebelDranik: Not a static one I suppose? :P
07:11Dranikyep :-)
07:11DranikI'm just investigating whether I can achieve some speed up with some of clojure features such as DSL's with macros
07:12fliebelDranik: (not= DSL macro) ;)
07:13Dranikwell, I'm not so educated in DSL's :-) but trying to get the right way with SICP
12:41tufflaxHmm what's wrong with this? http://pastebin.com/Gv0bPien
12:42gfrlogah
12:42gfrlogthat is an unhelpful error message
12:42gfrlogbut it looks like your (if-let) has too many arguments
12:43gfrloglessee...
12:43gfrlog,(if-let [a 12] a a a)
12:43clojurebotjava.lang.IllegalArgumentException: if-let requires a vector for its binding
12:43gfrlogyep
12:43gfrlogso if-let works like if, where the second argument is the true condition, and the third, if it exists, is the false condition. Having more than three arguments doesn't make sense.
12:43gfrlogdo you think when-let is more what you want?
12:44gfrlog,(doc when-let)
12:44clojurebot"([bindings & body]); bindings => binding-form test When test is true, evaluates body with binding-form bound to the value of test"
12:44tufflaxah ok, thank you
12:44gfrlogno prob
13:04raekif-let used to be written as (if-let variable test-expr then-expr else-expr) instead of (if-let [variable test-expr] then-expr else-expr) in some old version of clojure
13:06raekthe error message tells what people had to change to update their code
13:06gfrlogah hah
13:11__name__raek: What's the point of the new syntax?
13:11gfrlogI imagine it's more like (let)
13:14raek__name__: uniformity in syntax, I presume (vector means binding). this happened long before I got into clojure though, I think
13:23chouserpre-1.0
13:23__name__Thanks chouser
13:28chouserI've got a stream of objects I'd like to capture fully and then make available as a seq.
13:28chouserIt would be nice to be able to release the head of this seq as its consumed
13:28chouserIf not for that, a vector would be perfect
13:29chouserbut a seq on a vector will keep the whole vector in memory until the *whole* seq is released
13:29chousera persistent queue came to mind, but since I'll fully populate the queue before anyone begins consuming it, it'll act the same as the vector above.
13:30chouserso ... what other option?
13:30gfrlogchouser: a list is bad because you're building it backwards?
13:30chousercopy into a vector and then copy *again* into a list, which means I'll have the whole ... right
13:30chouserwell, forwards
13:30gfrlogit's the O(n) reverse operation you're trying to avoid?
13:31gfrlogor will that not work for some other reason?
13:31chouserI'm trying to avoid having the whole sequence in memory twice
13:32chouseractually, a seq on a vector achieves that
13:33chouserI guess I was hoping for having it in memory only once, and then progressively freed as it is consumed.
13:33gfrlogright
13:33gfrlogI guess you want a special seq on a vector
13:34chouserA vector can't be shrunk from the left
13:34chouseroh. A finger-tree would do. ha.
13:34gfrlogI thought of that and just assumed you were the last person to mention that to :)
13:35chouserseems like I should have thought of that sooner.
13:35gfrloggo back and watch chouser's talk on finger-trees
13:36gfrlogI wonder if I would have thought of finger trees sooner if anybody else were asking the question
13:36chouser:-)
13:48gfrlogchouser: Your stream emits the first object first? I'm having a hard time convincing myself that a simple list doesn't work...e.g., why not use (lazy-seq) and pass it through (doall) before returning?
14:17chousersimple lists grow to the left. I'll be adding objects to the right (like a vector does)
14:17chouserhm, but maybe I can figure out a way to use lazy-seq
14:17chouserthe problem is I can't return. I don't have control of the loop.
14:17gfrlogyeah I was thinking that lazy-seq does exactly that -- lets you add objects to the right
14:18chouserI have to call a function that adds to the right of a mutable thing (I've been using a vector in an atom) and then is done.
14:19chouserah, so not a lazy-seq, but a similarly-chained mutable-once thing. I bet I could build that...
14:19gfrlogI can imagine accomplishing that with an ugly mess of concurrency primitives
14:20gfrloga list of promises?
14:21chouserright, like that.
14:22gfrloghurrah for weaseling out of finger-trees
14:25arohneris there a convenient way to get the number of times a regex matches a string? the only way I've found is to use .start on an re-matcher
14:25arohnerseems like there should be a more straightforward way
14:25gfrlogarohner: (count (re-seq ...)) isn't what you want?
14:26arohnergfrlog: aha! re-seq is exactly what I wanted. I didn't know it existed
14:26arohnerthanks
14:26gfrlogno probalo
14:51babilensigh
16:46SomelauwAre you all former ruby programmers? Or where do all those clojure programmers get from?
16:52kencauseySomelauw: We all come from many places, some of us are quite old and predate most languages.
16:52dnolenSomelauw: from what I can tell, it's pretty diverse community, Java, C++, Common Lisp, Haskell, Scheme, Ruby, Python, etc.
16:53seancorfieldSomelauw: i'd probably consider myself a C++ / Java programmer but i've used a *lot* of languages (including, in recent years, Groovy and Scala)
16:54seancorfieldbut i was doing functional programming back in the early/mid 80's before OO "happened" (in the mainstream)
16:55SomelauwI think FP has never been really mainstream.
16:59dnolenSomelauw: I think Haskell, Scala, and Clojure are helping to change that. It's not going to happen overnight, but I think in 10 years or so, FP no longer be a niche paradigm. multicore is the driver.
17:01SomelauwYes, I understood it was easy to write multicore programs in clojure (Although I haven't really exploited or studied its multicore features in detail yet).
20:11Derander_I've been evangelizing learning an FP language to all of my < 18 year old programming buddies
20:11Derander_get 'em while they're young :_)
21:41JohnnyL"Lot's a irc users talkin, few of them know, soul of Clojure was create.... belowww"
21:41JohnnyL"Lot's a irc users talkin, few of them know, soul of Clojure was created.... belowww"
23:59lawfulfalafeldo people use cedet when editing clojure code?