#clojure logs

2009-02-17

00:01ChouserI like "don't be so eager", but the logo placement on the front is kinda lame.
00:01blbrownyea, kind of right there at the stomach
00:02Chousermaybe it should only be on the back
00:03durka42yeah that one might be better if the logo was moved to the back
00:03Chousermaybe swap the text too?
00:04durka42eh, i dunno
00:06Chouserput another way, that account has almost (but not quite) earned a free shirt.
00:06Chouserthis is really not an effective money-making venture. :-)
00:06blbrownif you are creating them, you might just have a simple one. clojure logo on the front and then a description on the back. Clojure, lisp dialect for the JVM or something
00:06hiredmanlike the /topic
00:07blbrownyea
00:14cp223:50:36 [Chouser] So far we've sold 7, so Zazzle owes Rich almost $20.
00:14cp2never fear
00:14cp2im about to buy a few
00:15Chouserooh
00:15cp2possibly tomorrow
00:15durka42it is tomorrow here...
00:15durka42which means i should probably go to bed soon
00:15cp2well, its tomorrow here too
00:15cp2didnt notice
00:15Chouserwell, as I said, it's not really about making money. I just hope the quality of the T-shirts is good -- I haven't actually seen one yet.
00:16cp2ill let you know
00:17Chouserhttp://www.zazzle.com/i_get_more_done_when_im_lazy_clojure_on_back_tshirt-235284015952434496
00:17Chouserbetter?
00:17hiredmanthere isn't some api function that takes a function and changes the order of paramters is there?
00:18Chouser#() :-)
00:18hiredman:(
00:18hiredman#(fn [& x] (apply % (reverse x)))
00:19hiredman,((#(fn [& x] (apply % (reverse x))) map) (range 10) inc)
00:19clojurebot(1 2 3 4 5 6 7 8 9 10)
00:19hiredman,((#(fn [& x] (apply % (reverse x))) map) (range 10) (range 9 20) +)
00:19clojurebot(9 11 13 15 17 19 21 23 25 27)
00:20Chouser,(#(% %3 %2) map (range 10) inc)
00:20clojurebot(1 2 3 4 5 6 7 8 9 10)
00:20hiredmanclever
00:20Chouseroh, you want them all reversed. hm.
00:20hiredmanI am willing to take what I can get
00:21Chouser,(#(apply % (reverse %&)) map (range 10) (range 9 20) +)
00:21clojurebot(9 11 13 15 17 19 21 23 25 27)
00:21ayrnieu,(#(fn [f & rst] (apply f (reverse rst))) list 1 2 3)
00:21clojurebotjava.lang.IllegalArgumentException: Wrong number of args passed to: sandbox$eval--1021$fn
00:22hiredmananyway, I can write it fine, I just was hoping something like that existed in the api and I just missed it
00:23Chouserno, Clojure core isn't actually terribly rich function-manipulation functions.
00:23ChouserI don't miss them personally.
00:23hiredman:(
00:24hiredmanclojure.higher-order-functions
00:24Chouserisn't any fn that takes a fn as an arg higher-order?
00:24Chouserwe've got plenty that take predicates or mapping fns or whatever.
00:24ayrnieuyes, you're thinking of clojure.combinators
00:25hiredmanpardon my mistake
00:25Chouserit's the ones that return fns that are less common: comp, complement
00:25hiredmanpartial
00:25hiredmanconstantly
00:25hiredmanmemoize?
00:25silkarnmultimethods, arent they just calling one function that handles dispatch ?
00:25Chousernot to be confused with clojure.contrib.combinatorics. :-)
00:26ayrnieusilkarn - yes.
00:26ayrnieudefmulti examples: http://paste.lisp.org/display/74647
00:26Chouseridentity
00:26Chouser;-)
00:29hiredmanI think what draws me to point free style is not having to think up argument names
00:29hiredman(I always just pick i or x anyway)
00:29durka42or %
00:30durka42sometimes point-free is nice when you can see how the fns logically connect
00:30durka42but when it gets really convoluted maybe it should just be written out...
00:41silkarnscheme > clojure?
00:41hiredmanuh
00:41durka42nil
00:41hiredmanno?
00:41durka42,(> 'scheme 'clojure)
00:41clojurebotjava.lang.ClassCastException: clojure.lang.Symbol cannot be cast to java.lang.Number
00:41silkarn, (> scheme clojure)
00:41clojurebotjava.lang.Exception: Unable to resolve symbol: scheme in this context
00:42Chouserjava.lang.ClassCastException: scheme cannot be cast to clojure.lang.IFn
00:42ayrnieuhttp://blog.thinkrelevance.com/2009/2/17/programming-clojure-beta-7-is-out
00:42hiredman,(let [ton #(apply + (map int %)] (> (ton "scheme") (ton "clojure")))
00:42clojurebotUnmatched delimiter: ]
00:43hiredman,(let [ton #(apply + (map int %))] (> (ton "scheme") (ton "clojure")))
00:43clojurebotfalse
00:43hiredman:)
00:43durka42,(let [ton #(apply + (map int %))] (vec (ton "scheme") (ton "clojure")))
00:43clojurebotjava.lang.IllegalArgumentException: Wrong number of args passed to: core$vec
00:43durka42,(let [ton #(apply + (map int %))] (list (ton "scheme") (ton "clojure")))
00:43clojurebot(629 756)
00:44ayrnieusilkarn, it depends on what you're interested in.
00:48hiredman...
00:48technomancyif you're interested in implementing a lisp for fun, scheme is probably a better choice.
00:50blbrownis the book going to be updated per the new clojure language changes I wonder
00:50ayrnieublbrown, RTFA.
00:50technomancyblbrown: stuart said as long as it's decided this week it should make it into the book
00:52blbrownayrnieu, it doesnt say anything about examples in the book
00:52ayrnieuI'd actually recommend clojure for the 'language for fun', over scheme, but call/cc seems more intimidating than thread pools and STM.
00:53ayrnieuit's hard to say that you'd end up with 'clojure', though. You'd have a 'clojure-like', a pointless designator in scheme.
00:53durka42point-free you mean
00:54cooldude127scheme has simpler syntax then clojure
00:54technomancyyeah, my scheme never got call/cc. =\
00:56hiredmancooldude127: did you notice my sublis?
00:57cooldude127hiredman: no i did not
00:58cooldude127hiredman: found it in the history
00:58hiredmanit uses my transform function, to which there is a link a few lines back from the sublis
00:59hiredmanand the both rely on clojure.zip :as zip
00:59technomancydo many people use the tests-with-code approach of test-is?
00:59cooldude127technomancy: i do
00:59cooldude127hiredman: i appreciate the effort, but i actually think i have a straightforward recursive solution
00:59hiredmanbah
01:00hiredmanzippers, dude, zippers
01:00cooldude127are more than what is necessary for this problem
01:04lisppaste8cooldude127 annotated #75625 "simpler" at http://paste.lisp.org/display/75625#1
01:07hiredman,(vec {:a 1})
01:07clojurebot[[:a 1]]
01:08hiredman,((comp vec concat) {:a 1})
01:08clojurebot[[:a 1]]
03:46RaynesHas anyone made a Clojure wallpaper?
03:54eevar2how about t-shirts and coffee mugs? ;)
03:55RaynesWallpapers are more important to me right now.
03:57greghputting a t-shirt over your screen makes your screen hard to read
04:00AWizzArdMoin
04:02RaynesSomeone make me a wallpaper :>
04:05greghyou could scale up http://en.wikipedia.org/wiki/File:Clojure-glyph.svg
04:07Chousukethat logo alone gives Clojure a +10 boost to coolness.
04:47RaynesNew beta of Programming Clojure released. Content complete, last beta before publish.
04:54RaynesI wonder if he rewrote the seq chapter. I suppose he would of had to due to the lazy stuff now.
05:12RaynesSomeone /really/ needs to talk to Rich about read-line
05:12RaynesIt's still screwed up.
05:15Raynesread-line is completely redefined in the newest revisions. The release version works though.
05:16RaynesWonder why he changed it.
05:22RaynesWhat's the Clojurebot command to check the current SVN revision?
05:24Raynesclojurebot: svn?
05:24clojurebotsvn is http://clojure.googlecode.com/svn/trunk/
05:33Raynes>:]
05:36eevar2clojurebot: git?
05:36clojurebotgit is http://www.github.com
05:37Raynesclojurebot: hiredman
05:37clojurebothiredman is The Batman
05:51timothypratleyuser=> (clojure.inspector/inspect "fun")
05:51timothypratleyjava.lang.ClassNotFoundException: clojure.inspector (NO_SOURCE_FILE:157)
05:52timothypratleyam I missing something?
05:56RaynesA file apparently.
05:56Raynes,(clojure.inspector/inspect "fun")
05:56clojurebotjava.lang.ClassNotFoundException: clojure.inspector
05:57RaynesHrm
05:57alinptimothypratley: (use 'clojure.inspector)
05:58alinpand after that, it will work
05:58timothypratleyindeed! thanks
05:58alinpyw
05:58timothypratleyzip doesn't appear to need use... what's the distinction?
05:58alinpmaybe because it's using some swing, it's not loaded by default
05:58alinp(imho)
05:58timothypratleyic
05:59alinpinspector and one more is not loaded by default
05:59alinp"All namespaces are loaded by the runtime except clojure.inspector, clojure.parallel"
05:59alinp:)
05:59alinphttp://clojure.org/api
06:00timothypratleyhehehe
06:00Raynesalinp: You... You.. API reader!
06:01alinp:)
06:01alinpRaynes: Me ... Me ... What ? :)
06:01alinpI don't get it :P
06:01RaynesYou read the API. That makes you an API reader :|
06:01alinplol
06:02alinpThe fact is that I had the same problem in the past
06:02alinpand I checked the API
06:02alinpand saw what's going on
06:02Chousukehmm
06:02Chousuke,(use 'clojure.inspector)
06:02clojurebotnil
06:03Chousukenot very useful though ;(
06:03alinpyes, indeed
06:03Chousuke,(clojure.inspector/inspect ['test])
06:03clojurebotjava.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it.
06:03alinpbut if the namespace is not there, exception will be thrown
06:03alinpthe inspect will open a swing window
06:03alinpin which the inspection is displayed
06:04Chousukeyeah, I wanted to see what happens :)
06:04timothypratleyokie here's a harder one: say I have a zipper, and I want to call 'right' X times, what's a neat way? (take X (repeatedly #(right loc)))? or a better way?
06:04alinpmaybe this can be skipped and reduced only to console ... don't know for sure
06:05alinptimothypratley: sorry, that's out of my knowledge about clojure ... I'm at the beginning of learning it
06:06Chousukewouldn't (right loc) always return the same thing :/
06:06Chousukewait, I need to check how repeatedly works
06:07Chousukehm
06:07Chousukeright
06:07Chousukeyou want (take n (iterate right loc)), assuming (right loc) returns a new loc
06:07timothypratleyah, that's nicer :) yes thanks
06:11Chousukewhat kind of format? :)
06:12RaynesINI probably. Just a simple config parser.
06:14alinpis there in clojure something like progn ?
06:15alinpprogn from clisp
06:15alinplet seems to be working this way
06:15alinp,(let [] "x" "y" "z")
06:15clojurebot"z"
06:16alinp,(let [] (+ 1 2) (+ 10 20) (+ 100 200))
06:16clojurebot300
06:16alinp,(let [] (println (+ 1 2)) (println (+ 10 20)) (+ 100 200))
06:16clojurebot300
06:16clojurebot3 30
06:16Chousukewhy the lets? :/
06:16Chousukethere's do :)
06:17alinpoh, thanks :)
06:17alinpthat's why I asked
06:17Chousukeah, right. missed the question itself.
06:17alinpdidn't know if it's a better way
06:17Chousuke,(do (println "foo") 2)
06:17clojurebot2
06:17clojurebotfoo
06:17alinp,(do (println (+ 1 2)) (println (+ 10 20)) (+ 100 200))
06:17clojurebot300
06:17clojurebot3 30
06:17timothypratleyits annoying that (do) is not in the API page
06:18Chousukeit's a special form, isn't it.
06:18timothypratleyonly on the special forms
06:18timothypratleyyup
06:18timothypratleybut let is in both :) so why not do?
06:18Chousukethe API page is autogenerated I think.
06:19Chousukeand let is not actually a built-in special form (it's a macro)
06:19timothypratleyI guess let has some special quality... according to doc, let qualifies as a macro and a special, but do is only a special
06:19timothypratley,(doc let)
06:19clojurebot"([bindings & body]); Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts therein."
06:19alinp,(doc do)
06:19clojurebotjava.lang.Exception: Unable to resolve var: do in this context
06:19Chousuke,(doc let*)
06:19clojurebotjava.lang.Exception: Unable to resolve var: let* in this context
06:20alinp,(doc do*)
06:20Chousukelet* is the special form I guess.
06:20timothypratleywierd, I can do it at my repl
06:20clojurebotjava.lang.Exception: Unable to resolve var: do* in this context
06:20Chousuke,(let* [a 1] a)
06:20clojurebot1
06:20timothypratley:)
06:20Chousuke~source let
06:20alinp,(let [a 1] a)
06:20clojurebot1
06:20alinpChousuke: what's the difference between macro and special form ?
06:20alinpgeneral clojure speaking
06:21Chousukehmmh
06:21Raynesalinp: A macro is a macro and a special form is a special form ;)
06:21Chousukenothing user-visible.
06:21alinpthe results seems to be the same
06:21Chousukea special form is "built-in"
06:21Chousukeso let* is a special form, let is not
06:21alinpyes, I got that
06:21alinpthanks
06:22Chousukebut let* is an implementation detail, so the docs lie a bit and call let the special form
06:25Chousuke(defmacro comment [& body]) ; heh
06:42eevar2,(doc let)
06:42clojurebot"([bindings & body]); Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts therein."
06:42eevar2,(doc let*)
06:42clojurebotjava.lang.Exception: Unable to resolve var: let* in this context
06:47rsynnottI think clojure's let behaves much like cl's let* anyway
07:22RaynesI has a Satin pillowcase.
07:36RaynesSpeaking of Rich, there are a lot of him in here o.o
07:40karmazillaOne Rich for trunk, and then a couple for the branches
07:44Rayneskarmazilla: :D
08:25alinp,(println "x" "z")
08:26clojurebotx z
08:26alinphow can this be done without the white space ?
08:26alinp,(println "x""z")
08:26clojurebotx z
08:26karmazilla,(println (str "x" "z"))
08:26clojurebotxz
08:27alinp,(println (str "a" "b"))
08:27clojurebotab
08:28RaynesRayne has a tummy ache :[
09:01RaynesWhy is this returning false? (if (and (or (and (false? false) (true? false) true false) (true? true)) (identical? [1 2 3] [1 2 3])) true false)
09:03Raynes,(if (and (or (and (false? false) (true? false) true false) (true? true)) (identical? [1 2 3] [1 2 3])) true false)
09:03clojurebotfalse
09:03RaynesHrm, that just isn't right.
09:05rfgpfeiffer,(doc identical?)
09:05clojurebot"([x y]); Tests if 2 arguments are the same object"
09:05Raynes,(identical? [1 2 3] [1 2 3])
09:05clojurebotfalse
09:05RaynesOH
09:06rfgpfeiffer,(= [1 2 3] [1 2 3])
09:06clojurebottrue
09:06RaynesMystery solved.
09:39cooldude127i have to say, functions needing to be defined before they are referenced is pretty much the most annoying thing to me about clojure
09:41cooldude127i suppose it's good that something so small is my biggest complaint
09:43gnuvincecooldude127: yeah. I like that in Haskell, you can put the most important functions at the top, and the supporting ones below.
09:47cooldude127gnuvince: the way i like to write, i'll do the big function first, and while i'm writing it, i'll write it as tho those helper functions are already defined. and then i go below and actually write them. and then when i compile the whole file it says NO
09:48cooldude127i hate having to mess around with the ordering
09:48cooldude127but alas, i most go
09:48Chouserthat's so interesting. It's never bothered me, and the thought of using a function before I write it kinda freaks me out.
09:50wlrChouser: SOP for many CLers
09:50Chouserapparently
09:52RaynesI have a habit of defining helper functions below the functions that use them.
09:52RaynesIt is rather annoying.
10:03kefkaIs anyone else having problems with S3 this morning?
10:03drewrkefka: My backup to there just ran fine.
10:05kefkadrewr: I'm getting this error: (home)/private/current/awssecret: No such file or directory
10:06kefkadrewr: Do I need to have a ~/private/current ? I've never had that directory before.
10:07drewrkefka: What produced that error?
10:08kefkadrewr: Never mind. This has nothing to do with S3. It's a local problem.
10:09kefkaS3 is working fine.
10:19Lau_of_DKkefka: drewr: Whats S3 ?
10:21RaynesI was wondering the same thing.
10:22FibAmazon S3? The storage service?
10:23drewrLau_of_DK: http://s3.amazonaws.com
10:26Lau_of_DKk
10:26Lau_of_DKthanks
11:16alinpwhat's the clojure way to iterate over a collection ?
11:16alinpis there a recommended approach ?
11:16Chousermap, for, doseq
11:17Chouserdepends on what you want to do as you iterate over it.
11:17alinpok, cool
11:17Chouserloop/recur
11:17alinpyes, I know about recur
11:17Chouserfilter, reduce. lots of options. :-)
11:17alinpthis is the one that I'm using
11:17alinpyes, depends on what I need to do with that collection
11:17Chousertheres usually only one or two good choices though, for any given usage.
11:18alinpthanks
11:20Chousersure
11:25AWizzArdclojurebot: max people
11:25clojurebotmax people is 149
11:25alinpChouser: I'm wondering ...
11:25alinp,(loop [a 10] (if (not (zero? a)) (do (println a) (recur (dec a)))))
11:25clojurebot10 9 8 7 6 5 4 3 2 1
11:25alinpthis is the right usage of loop ?
11:25alinp:)
11:26AWizzArdin principle yes
11:26AWizzArdfor this task one could do something different though
11:26alinplike ?
11:26AWizzArd,(dotimes [i 10] (println (- 10 i)))
11:26clojurebot10 9 8 7 6 5 4 3 2 1
11:26alinpoh, I see
11:26alinpdotimes
11:26alinpgracias :)
11:27AWizzArd,(doseq [i (range 10)] (println (- 10 i)))
11:27clojurebot10 9 8 7 6 5 4 3 2 1
11:27alinpbut the idea was that I want to check the iteration over collections
11:27alinpand to see which are the diffs between them
11:27WizardofWestmarc,(take 10 (iterate dec 10))
11:27clojurebot(10 9 8 7 6 5 4 3 2 1)
11:28WizardofWestmarcthough that's a list, but still <_<
11:28alinpthank you, I'll check the API further
11:30AWizzArdor okay, for this specfic task the best thing would be:
11:30AWizzArd,'(10 9 8 7 6 5 4 3 2 1)
11:30clojurebot(10 9 8 7 6 5 4 3 2 1)
11:31AWizzArduhm, with println of course
11:31AWizzArd,(println 10 9 8 7 6 5 4 3 2 1)
11:31clojurebot10 9 8 7 6 5 4 3 2 1
11:31alinp:)
11:32alinpnot the same thing
11:32alinpinstead of printing, I was thinking applying a function or something
11:32alinpof course, there is apply, I know
11:32AWizzArdyes, or reduce also
11:33AWizzArdsometimes that could also be nice
11:33WizardofWestmarcreduce is for lumping a list of stuff together into a single item
11:33AWizzArd,(apply + [10 20 30])
11:33clojurebot60
11:33AWizzArd,(reduce + [10 20 30])
11:33clojurebot60
11:34rsynnottthat's because the >2 arg + does an effective reduce itself, though
11:40AWizzArdyes
11:42Chouseralinp: I made an attempt to categorize the various seq-related functions on the bottom half of this page: http://clojure.org/sequences
11:43alinpoh, yes, I see
11:43alinpthanks again
11:43alinpIt seems to me that I'm too lazy to search myself all the stuff
11:43ChouserI don't know if that's helpful or not, but it was an attempt to help people find the function they need.
11:43alinpyes yes
11:43alinpit helps alright
11:43Rayneshttp://groups.google.com/group/clojure/browse_thread/thread/550628c650edb5ec# In case anyone is interested.
11:45alinpChouser: also this one helped me a lot to understand http://en.wikibooks.org/wiki/Clojure_Programming/Examples/API_Examples
11:45Chouseralinp: great!
11:46WizardofWestmarcyeah the api_examples page is great
11:46WizardofWestmarcit helped me understand -> a lot better
12:31gnuvinceHello everyone
12:32technomancyhi vince
12:32gnuvinceHey technomancy, what's up?
12:33technomancygnuvince: writing an interactive test-is runner in elisp
12:33gnuvinceFor elisp code?
12:33technomancygnuvince: should be able to highlight test failures in the buffer itself rather than switching between slime-repl and the tests
12:33technomancygnuvince: written in elisp, but for testing clojure.
12:33gnuvinceoh!
12:33gnuvinceNice!
12:34technomancygnuvince: it looks like test-is has hooks to make this pretty easy; just need to store pass/fail status in metadata.
12:34technomancyfrom there it's just a matter of reaching through slime to grab it, and rendering it.
12:34gnuvinceok
12:34gnuvinceVery nice
12:34technomancyI did this for Ruby test suites, and it was really handy to be able to see the feedback superimposed on top of the tests.
12:35durka42reaching through slime sounds unpleasant
12:35durka42slimy
12:35technomancydurka42: M-x equip-latex-gloves
12:35durka42hmm, you could even highlight defns that fail their tests in bright red or something
12:36technomancydurka42: exactly
12:36technomancywell, as long as they're still readable. =)
12:36technomancythen there's a binding to see the expected vs the actual
12:36technomancyit's pretty simple in terms of functionality, but it's dramatic in how it changes your workflow.
12:36durka42error: latex-gloves incompatible with package "skin"
12:56danlarkintechnomancy: wow I'm really looking forward to that, super cool
12:56cooldude127what coolness is technomancy creating now?
12:57gnuvinceAn Emacs integration to clojure.contrib.test-is
12:57cooldude127BRING IT ON :)
13:00Drakeson`would it make sense to port clojure to gnome (with GObject and friends as the underlying object system)?
13:01cooldude127Drakeson`: may we ask why?
13:01cooldude127it won't really be clojure, as clojure is kind of java-centric
13:01technomancyhttp://augment.rubyforge.org/ <= this is the ruby version of what I'm doing w/ clojure
13:01technomancyslime will make the clojure implementation *much* simpler
13:02cooldude127technomancy: that's AWESOME
13:03Drakeson`cooldude127: to develop gnome applications
13:03cooldude127Drakeson`: i think there are java gtk bindings (i think)
13:06Drakeson`cooldude127: I tried two of them, they were not that good. I think directly targeting gnome's run-time is a bit more straight forward. There is a project (vala) inspired by .Net that directly targets the gnome run-time.
13:06cooldude127Drakeson`: you can do it if you want, but i think you're in for more than you realize
13:11Lau_of_DKGood evening gentlemen
13:12cgrand1evening Lau!
13:13waltersDrakeson: i work on http://live.gnome.org/JGIR
13:13cooldude127walters: that looks like an interesting project
13:13danlarkingreetings Lau
13:14waltersDrakeson: languages like clojure being based on the JVM is one reason i was motivated to make more extensive bindings (as compared to java-gnome which is more like a limited Swing competitor)
13:15waltersDrakeson: i think probably the biggest win would be improving clojure's Java integration, rather than trying for a Clojure-specific layer
13:16cooldude127what's wrong with clojure's java integration!? everyone knows clojure is perfect at everything :p
13:16walterspractically speaking, function-to-single-method-interface conversion is pretty high up there in terms of things Clojure doesn't do now
13:16cooldude127oh. that.
13:17walterssince in GTK+ applications you connect to signals very often, and JGIR represents signals as single method interfaces
13:17waltersnow what we *really* want is standard JVM types for closures
13:18cooldude127YEAH
13:19gnuvincetagged numbers?
13:21waltersDrakeson: anyways if you try it and tell me what the pain points are i'd be happy to try to fix it
13:22Drakesonwalters: sure, I'll try again. It guess is currently a bit messy to get JGIR to run on debian
13:23Drakesonwalters: btw, what is your opinion about a clojure-like language targeting gnome runtime?
13:23Lau_of_DKdanlarkin: Any name yet?
13:23waltersDrakeson: yeah, understood. I just finally got the last of my JNA patches upstreamed a few days ago, and gobject introspection isn't quite baked yet either...but it's getting closer
13:25waltersDrakeson: without the JVM you mean?
13:25danlarkinLau_of_DK: nope, but I'm cleaning everything up for upload in anticipation of you giving me a good one!
13:25Drakesonwalters: yes
13:25Lau_of_DKah - the pressure
13:26Drakesonto fixup the gnome's "programming language of choice" problem.
13:26waltersDrakeson: well i think you do have to keep in mind that the JVM (libraries, tools, deployment etc.) is a big part of the Clojure value for a lot of people, but that said it seems like what you're asking for is just a custom Clojure runtime
13:27Drakesonyou know, C is not fun, and having to use perl, python, C#, ruby, vala, etc. for application logic is not fun either.
13:28WizardofWestmarcI dunno python can be pretty fun
13:28WizardofWestmarcbut if there are good libs for what I'm doing I prefer clojure at this point
13:28waltersDrakeson: well...my take on this as a GNOME developer is that we should use Vala for core library extensions, JavaScript for core applications (panel/wm/nautilus etc.), while maintaining the ability for 3rd parties to write applications to whatever runtime they desire (JVM/JavaScript/.NET/OCaml etc.)
13:29waltersDrakeson: but anyways we're offtopic for this channel
13:29DrakesonWizardofWestmarc: I meant having *many* languages at the same time is not fun. It makes code sharing more difficult, at best.
13:29WizardofWestmarcah that, yeah
13:30Drakesonwalters: I feel a bit better about vala, but it could just clone clojure instead of C#.
13:31waltersDrakeson: i don't see how...a lot of Clojure seems pretty closely tied to having garbage collection
13:31waltersVala just superficially looks like C# at a skeletal level
13:31waltersfundamentally they are very different
13:32cooldude127any lisp is tied to having garbage collection
13:32Drakesonwalters: what about guile? is it going to stay, or just keep lingering?
13:33waltersDrakeson: if you're interested there's #gnome-hackers on GIMPNet, I don't want to take up more bandwidth here though
13:34Drakesonsorry guys about being off-topic. (going to #gnome-hackers channel)
13:34cooldude127lol
13:37Drakesonoh, btw, is the new fully-lazy thing usable at the moment? currently svn up (actually "git svn fetch") is stuck at rev 1279. how can I get 1282?
13:38technomancyDrakeson: the github mirror is only tracking trunk
13:38waltersDrakeson: one more ontopic thing is that besides the JVM, some of the most innovative stuff in Clojure I see like the STM just aren't very useful for most desktop applications. It definitely won't work to use GTK+ or Clutter for example inside a STM transaction =)
13:39technomancyyeah, desktop apps don't really play to clojure's strengths since they're mostly IO-bound
13:39kreigthat is why we are waiting for the Clojure/Java2d/AWT implementation of CLIM to fall from the sky
13:39Drakesontechnomancy: is it going to land in trunk soon?
13:39technomancyDrakeson: sounds like it
13:40kreigmmm, presentation types
13:40technomancyDrakeson: rhickey was asking last night if anyone had any objections to merging
13:40tkadluboWhat new features will be in this branch?
13:40technomancyif elisp would grow some concurrency features, I'd never want to write any UI code in anything else.
13:40cooldude127yeah emacs isn't best with that
13:42gnuvinceIs there a "nice" way to catch exceptions when using with-open?
13:43durka42tkadlubo: fully lazy sequences. there's a little documentation at clojure.org/lazier
13:44shoover`technomancy: distel's erl package grows some concurrency onto emacs
13:44cooldude127durka42: how lazy are our current sequences?
13:44kreigcollege kid lazy
13:44cooldude127lol
13:44durka42maybe not quite that lazy
13:45kreigthe new ones are gonna be stoner lazy
13:45kreigoh, sorry, same thing
13:45kreigtrust-funder lazy!
13:45Drakesonwalters: I see. But, will it ever happen to get a fast UI toolkit in clojure? will it be achieved using gtk/gnome java bindings?
13:47tkadluboI wrote a Erastotenes sieve on lazy sequences, but I couldn't make it really infinite, because there's no way to retrieve a lazy-cons'ed sequence from within an infinite loop / recur.
13:47technomancyshoover`: via external processes though right?
13:47technomancyThat's Not Good Enough.
13:48Drakesontechnomancy: but it seems they are considering the coroutines approach (for emacs 24, I guess)
13:49technomancyDrakeson: yeah, I've got my fingers crossed
13:49shoover`technomancy: the building block uses buffers to act like mailboxes supporting send/receive
13:49gnuvinceDrakeson: link?
13:49Drakesongnuvince: emacs devel mailing list :p
13:49gnuvincebastard :)
13:49shoover`technomancy: that part does not use external processes and can be used in any elisp program
13:50Drakeson(sorry, I became more lazy recently :p)
13:50technomancyshoover`: right, but you'll still be blocked on I/O
13:50gnuvinceI knew Haskell would have bad repurcussions on the world!
13:50waltersDrakeson: i'm actively interested in supporting Clojure well and being a better choice than Swing/SWT/Qt-Jambi for what it's worth, though it's certainly a competitive field
13:51WizardofWestmarccompetition just means the "consumers" win
13:52WizardofWestmarcwhich is a pro :)
13:53danlarkinugh... why is File.setExecutable() only in java 6 :(
13:54Drakesonwalters: I image it can catch on if there are 1. easy ways to install the required bindings (for both Debian/Ubuntu and Fedora), 2. clean, java-less API's to gnome/gtk UI design, 3. useful tutorials and examples on writing GUIs using clojure + gtk (with no java knowledge required).
13:54Drakesons/image/imagine , d'oh!
13:54waltersDrakeson: yeah, 1. should come pretty soon
13:55Lau_of_DKOk, let me see if I got this. When I declare my namespace and include a gen-class section which :extends a.arbitrary.class, then clojure compiles something like Javas 'public class myclass extends xyzclass' and all functions prefixed with '-' will be methods in this class - But how can I control wether these methods are then private, public, protected or static?
13:56kreigso dutrs
13:56kreigis trunk from github relatively stable?
13:56Drakesonkreig: it is
13:57kreigor should I stick to the Dev17th release
13:57kreigotay
13:57Drakesonit just doesn't have the new lazy juice in yet
13:57kreigI mean trunk from SVN
13:58kreigthat's ok, I don't need the lazy juice
13:58walterstechnomancy: regarding elisp, i'd say 60% of the value is actually the powerful Emacs buffer/frame abstraction, of course it has nice elisp bindings like save-excursion etc. Emacs is really a toolkit *and* a language (elisp)
13:58Drakesonwalters: and a community.
13:58waltersyeah
13:59technomancydefinitely; it's a UI toolkit
14:01zakwilsonwalters: taking a quick look back, handling a Swing callback by sending it off to an agent is very useful.
14:02zakwilsonI'm guessing other GUI callbacks would be similar.
14:03walterszakwilson: that's just using an agent as a thread pool, no?
14:03zakwilsonIt's using it as a queue.
14:03zakwilsonThat runs in its own thread.
14:05technomancygnuvince, cooldude127, danlarkin: http://gist.github.com/65906
14:05technomancyall that's remaining is pulling the metadata out of slime and displaying it, I think
14:06walterszakwilson: yeah, though it's fairly easy to use Executors.newSingleThreadExecutor in Java too
14:06cooldude127technomancy: nope. you also need to have the hook look for with-test as well
14:06cooldude127because at least for me, i don't use deftest at all
14:07rhickeymerge is ready!
14:07danlarkin*gasp*
14:07gnuvinceGood luck!
14:07technomancycooldude127: right; forgot about that
14:07cooldude127wooo
14:07cooldude127technomancy: yeah that's what i'm here for
14:07technomancycooldude127: I'll commit it to a clojure-mode branch later today
14:08cooldude127technomancy: awesome
14:09danlarkintechnomancy: I look forward to it
14:09zakwilsonwalters: I wouldn't know. In any case, your STM probably doesn't belong it your GUI code.
14:10technomancythe only marginally tricky thing remaining is figuring out *when* the tests have finished running and triggering a "grab test metadata" function then
14:12walterszakwilson: actually i wouldn't say agents are what you typically want for a GUI app, since you have to explicitly await on it, no? The biggest problem I think in GUI apps is doing something on a thread, then getting the result back as an event. This is what SwingWorker does, and JGIR has MainLoop.threadInvoke which takes two callbacks
14:13Lau_of_DKrhickey: http://groups.google.com/group/clojure/browse_thread/thread/3d4a2e8ec39f355/1e730d2e5fd626ef?lnk=gst&amp;q=gen-class+macro#1e730d2e5fd626ef <--- Is this done automatically now with genclass somehow?
14:17zakwilsonwalters: depending on what you're doing, watchers are probably the best way to handle that.
14:18walterszakwilson: from the docs it looks like watchers run in the agent thread, so you'd need to queue an idle handler on the mainloop thread
14:19ayrnieuwalters, a watcher on the agent will activate whenever the agent function returns. A watcher on something else that the agent sets will activate after it is set.
14:19waltersmaybe though if agent had an API to say "run watchers from the thread that created this agent"
14:20waltersbut, can't do that without integrating with the mainloop
14:20ayrnieuthe watching agent does not also need to be the agent that does the work.
14:20waltersayrnieu: yeah, the issue is not when it runs, but on which thread it runs
14:21zakwilsonwalters: Why do you want the watchers to run in the same thread?
14:21ayrnieubleh, *that* limitation.
14:21walterszakwilson: you can only mutate the GUI from one thread
14:22zakwilsonPut the GUI in an agent and send off to that.
14:23waltersyeah, that could make sense if your app is structured as some large computation, with the GUI as an aside
14:29cemerickam I correct in thinking that a types cannot be parameterized in gen-class specs?
14:29rhickeycemerick: right
14:30zakwilsonIt could work for a more interactive/involved GUI, though you might want to stick the elements of the GUI in a data structure (a tree of maps, or some such in most cases) appropriate for the situation.
14:33durka42would there be trouble with the jvm initializing the gui in its main thread and not wanting to give it to an agent?
14:33Lau_of_DKrhickey: clojure.org is bookring
14:33Lau_of_DKboorking
14:33durka42thinking of that -XStartOnFirstThread OSX bug
14:34clojurebotsvn rev 1287; merged lazy branch -r1236:1286
14:34cooldude127OMG
14:34cooldude127it is done
14:34technomancysweet!
14:34Lau_of_DKuuuuuuuuuuuh :)
14:34Lau_of_DKbig moment
14:34cooldude127crap does that mean i need to go through all my damn code and replace rest with next?
14:35durka42hmm, maybe this update deserves an "ant clean"
14:35hiredman!
14:35danlarkindurka42: the default ant task runs clean first :)
14:35Chousercooldude127: nope. just don't update your clojure checkout ever again.
14:35durka42oh, so it does
14:35cooldude127lol
14:36durka42has contrib been lazified?
14:36ChouserI'm only slightly kidding, though. If you're not ready to deal with the changes yet, don't update.
14:36Chouserdurka42: Not all of it, I think.
14:36cooldude127btw, i have a fairly decent ported version of the macsyma thing from PAIP, so i do have symbolic math now
14:36danlarkinyeah... I'm waiting a few days to update
14:37durka42heh, gorilla doesn't quite build
14:38hiredmannuts
14:41Chouserso ... should we merge the contrib lazy branch back in?
14:41technomancythat was short-lived. =)
14:41Chouseryeha
14:41Chouseryeah
14:41technomancybut yeah, no reason to delay
14:42hiredmanwhat is that build flag that is useful for doing lazy
14:42Chouserant -Dclojure.assert-if-lazy-seq=please
14:42hiredmanthank you
14:43technomancy-Dclojure.please.help.me=if-its-not-too-much-trouble
14:43cemerickrhickey: I'm certain it's a low-priority item for you (and for me as well, really), but being able to specify parameterized types in gen-class specs would be handy for comforting our java-only brethren
14:46durka42!
14:48danlarkinhwhat? clojure-json works as-is? how convenient!
14:49cooldude127what's the function that takes a seq like this: ([:a 1] [:b 2]) and makes it a map {:a 1, :b 2}
14:49Chouser(into {} lst)
14:49danlarkin(apply hash-map (flatten coll))
14:49danlarkinor that
14:50cooldude127i like chouser's way :)
14:51hiredmanso clojurebot is lazy, but most of the plugins are disabled
14:51hiredmanclojurebot: map?
14:51hiredmanhmmm
14:52hiredmanclojurebot: how much do you know?
14:52danlarkinclojure.core/rrest is gone?
14:54rhickeydanlarkin: nnext
14:54danlarkinah of course
15:08taggartseq fns are now: first, next, more ?
15:10rhickeytaggart: first/rest/next
15:11rhickeyhttp://clojure.org/lazy
15:11taggartthx, I was going off of ISeq.java
15:13rhickeyISeq may still change, the names are different now to force people to consider this change
15:13gnuvincerhickey: does destructuring have the same behavior as before? seq or nil?
15:13rhickeygnuvince: yes, & args are forced
15:13gnuvinceThanks
15:21hiredman(doc map)
15:21clojurebotReturns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments.; arglists ([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls])
15:21hiredman^- lazy
15:23hiredmanclojurebot: how much do you know?
15:23clojurebotI know 203 things
15:23taggart<3 clojurebot
15:23hiredman~def map
15:23hiredmanoh
15:23hiredmanright
15:25hiredman~def map
15:25hiredman~def lazy-seq
15:27hiredmanthat is some crazy joo joo
15:29jbondesonheh, poor swank clojure...
15:30durka42clojurebot: welcome back
15:30durka42too lazy to respond?
15:31hiredmanfuzzer nickle
15:32hiredmangit just bit me
15:35hiredmanI think I just lost all my lazy changes to clojurebot
15:35Chouser:-(
15:35hiredmannot that there where a lot
15:36hiredmanor maybe not
15:36cp2thats what happens when you're lazy
15:36cp2!
15:37AWizzArd(doc plist)
15:37AWizzArd,(doc plist)
15:37clojurebotjava.lang.Exception: Unable to resolve var: plist in this context
15:38AWizzArd,(doc pvalue)
15:38clojurebotjava.lang.Exception: Unable to resolve var: pvalue in this context
15:39AWizzArdhiredman: iirc I have seen you requesting the doc of some functions without the leading comma.
15:39jbondesonso i thought i fixed swank-clojure by changing the lazy-cons -> (lazy-seq (cons ...)), and now it doesn't error, but my slime window isn't opening.
15:39Chouser(doc pvalues)
15:39Chousermissed it by that much
15:40technomancyhiredman: have you checked the git reflog?
15:40technomancyif anything's been added to the index, you should be able to get it back
15:40hiredmannah
15:40AWizzArd,(doc pvalues)
15:40hiredmanmy changes are still there
15:40hiredmanI somewhere switched branches without noticing
15:40AWizzArdoh, that bot left us
15:40hiredman:P
15:40Chouserso i've got what I think to be a contrib trunk with correctly-merged changes from lazy.
15:41Chousershould I just delete the lazy branch and check this in?
15:41technomancyChouser: delete all the files from the lazy branch except a readme that describes what just happened?
15:41AWizzArdwhy not check it in and leave the lazy branch alive until we see your new checkin works :)
15:41Chouserso cautious you guys...
15:42technomancyI guess the branch has only been around a few days; anyone playing with it will expect breakage and know what to do
15:42AWizzArdif you want to check it in now it would be great timing, because i just wanted to get the freshest version now
15:42hiredman(doc pvalues)
15:42clojurebotReturns a lazy sequence of the values of the exprs, which are evaluated in parallel; arglists ([& exprs])
15:42AWizzArd(doc +)
15:42clojurebotReturns the sum of nums. (+) returns 0.; arglists ([] [x] [x y] [x y & more])
15:42AWizzArdk
15:43taggartclojurebot: welcome back
15:43hiredmanthat is a problem
15:43hiredmanclojurebot: hello?
15:43clojurebotBUENOS DING DONG DIDDLY DIOS, fRaUline hiredman
15:43hiredmanhmmm
15:44Lau_of_DKWhen I want to assign a value to a field in a java class, how do I do ?
15:44Chousercontrib 478 has lazy merged into trunk
15:44AWizzArdLau_of_DK: is there a setter method for that task?
15:44AWizzArdOtherwise I imagine even in Java it can't be done?!
15:44Lau_of_DKYes
15:45ChouserLau_of_DK: if no setter method, use (set! (.field obj) new-value)
15:45Lau_of_DKThere probably is... I was just thinking C# get/set, but Javas not the same
15:45Lau_of_DKThanks
15:45AWizzArdoki
15:45AWizzArdGood good, so the lazy branch has won the game
15:47durka42did anything change with :gen-class?
15:47RaynesDoes anyone know why read-line was redefined?
15:47AWizzArdChouser: now after this checkin the api page needs lots of updates, no?
15:48danlarkinaw clojure-contrib doesn't compile :(
15:49ChouserAWizzArd: clojure.org pages generally document the lastest release, not svn HEAD, the lazy and stream pages notwithstanding.
15:49durka42danlarkin: wfm...
15:51AWizzArdthe exception is the api page?
15:51danlarkindurka42: what's wfm?
15:51durka42works for me
15:51danlarkindurka42: it compiles to .class files?
15:52durka42well, i dunno
15:52durka42"ant" works and builds the jar
15:52danlarkinoh, no, to build .class files you have to do ant -Dclojure.jar=/path/to/clojure.jar
15:53durka42unable to resolve symbol: rrest
15:54danlarkintest-is needs updating
15:54durka42user=> (use 'clojure.contrib.javadoc)
15:54durka42java.lang.Exception: Unable to resolve symbol: rrest in this context (shell_out.clj:53)
15:54durka42so the jar hides the compile errors for later
15:54danlarkinoh yes, and shell out too
15:54durka42sounds like lazy evaluation to me
15:55Chousercommand-line is ok though
15:56durka42is rrest gone?
15:56durka42or is called nnext or something?
15:56danlarkiniya
15:56danlarkinya, rather
15:56hiredmanugh
15:56hiredmanlooks like inits doesn't like lazy
16:02Lau_of_DKThe java notation "45.0f", means (float 45) ? Any short hand for that?
16:03Chouser,(class 45.0)
16:03clojurebotjava.lang.Double
16:03Chouser,(class (float 45.0))
16:03clojurebotjava.lang.Float
16:03ChouserLau_of_DK: I don't think so.
16:05Lau_of_DKk
16:06gnuvincePeople using Slime: swank-clojure is broken after the lazy branch merge
16:06gnuvincebeware
16:06WizardofWestmarcyeah jbondeson already warned me
16:06hiredmanwhat ever happened to reductions?
16:06technomancythey got reduced?
16:07gnuvince,(find-doc "^red")
16:07clojurebot------------------------- clojure.core/reduce ([f coll] [f val coll]) f should be a function of 2 arguments. If val is not supplied, returns the result of applying f to the first 2 items in coll, then applying f to that result and the 3rd item, etc. If coll contains no items, f must accept no arguments as well, and reduce returns the result of calling f with no arguments. If coll has only 1 item, it is return
16:07gnuvincehiredman: hmmm, I guess it was never checked in
16:07hiredman:(
16:08jbondesongnuvince: also don't try to naively fix it like me. Infinite loops in swank FTL
16:08gnuvincejbondeson: heheh ;)
16:08gnuvincejbondeson: I've downgraded back to r1286
16:08gnuvinceI'll wait until I get the word that swank is ok
16:08WizardofWestmarcI'm just going to wait until swank and clojure contrib are fixed
16:08WizardofWestmarconce all that is fully up and running I'll switch
16:08jbondesoni'll just suffer through straight inferior lisp =)
16:09WizardofWestmarcweird, twitter is going crazy on clojure but almost none of it is references to the lazy branch
16:09WizardofWestmarcI'd've expected such a burst right now to be tied to that.
16:10WizardofWestmarc7 posts in the last ~hour, 2 about it (including one from me)
16:11danlarkinlisppaste8: url
16:11lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
16:11gnuvinceI had a function where I named a parameter map
16:11gnuvinceand I could not figure out why calling the function map didn't work
16:12jbondesonhaha, lisp-2 mentality has bitten me too
16:12WizardofWestmarchaha
16:12WizardofWestmarcso glad I was more of a scheme guy for my prior lisp experienc
16:12lisppaste8danlarkin pasted "shell_out patch" at http://paste.lisp.org/display/75660
16:12WizardofWestmarc*experience
16:12WizardofWestmarcI don't expect the million namespaces :P
16:12jbondesongot soooo used to naming lists "list" and then in clojure it really hurt
16:13danlarkinChouser: shell-out patch: http://paste.lisp.org/display/75660
16:15kreigis clojure.contrib includes in the base clojure svn repo?
16:15Chouserdanlarkin: thanks! I've got that and a few others already ... coming soon...
16:15danlarkinChouser: great :)
16:16kreignever mind..
16:18technomancyman... it's really confusing when using swank-clojure to try and figure out what's breaking because it's not implemented for clojure and what's breaking because you're doing it wrong.
16:18technomancyI don't suppose anyone in here is familiar with swank-clojure?
16:20danlarkinI think you get the title of resident elisp expert
16:20gnuvinceGiven a seq of tuples, what's the Clojure way to turn that into a hash map?
16:20Chouser,(into {} '([a b] [c d] [e f]))
16:20clojurebot{e f, c d, a b}
16:20danlarkingnuvince: two-tuples? chouser demonstrated (into {} tuples) earlier
16:21gnuvincewow
16:21gnuvince:)
16:21gnuvinceThanks Chouser
16:21technomancythat's what I was afraid of
16:21technomancyproblem is slime is so coupled to CL; it's pretty hard to read if you're used to regular elisp
16:22Chousergnuvince: np
16:26taggartwhere does one go to see this clojure-related twittering?
16:26WizardofWestmarchttp://search.twitter.com/search?q=clojure
16:27taggartthx
16:27WizardofWestmarcwill update whenever a new tweet is up telling you to refresh
16:27WizardofWestmarcheh I see gnuvince just hit up proggit
16:28WizardofWestmarchaha
16:28Chouser"hey everybody, don't update!"?
16:28WizardofWestmarcYou're a library bitch, so you update! :P
16:29gnuvince"Don't update if you mind having a working SLIME installation"
16:29AWizzArdyup, I found that out a few seconds ago :)
16:30gnuvinceThere
16:30jbondesonSISSIES
16:30gnuvincehttp://www.reddit.com/r/programming/comments/7y59u/rich_hickey_adds_fully_lazy_sequences_to_clojure/c07q57n
16:30jbondesongotta loooove life out on the bleeding edge.
16:30Chouserre-find is now definitely better than re-seq if all you want is a truth value
16:31jbondesonChouser: totally lazified?
16:31Chouseryeah, re-seq returns a lazy-seq, so you can't use it in a nil pun
16:31Chouser(if (seq (re-seq #"foo" blah)) ...)
16:32Chouser(if (re-find #"foo" blah) ...) ; FTW
16:33WizardofWestmarcheh someone's only half following clojure, started asking "what's up with next?
16:34bitbcktwait, what's up with next?
16:35taggartthere's ...more... to it than that
16:35taggartoh ya it's not more anymore
16:35jbondesonChouser: maybe it's just me, but i'd think the latter is more logical than the former.
16:42Chouserjbondeson: well, I've previously avoided re-find because it actually mutates
16:43jbondesonChouser: that i didn't know. haven't played with regex in clojure yet.
16:43jbondesonwhich is odd for an ex-perl programmer to say ;)
16:43WizardofWestmarcI didn't know that about re-find
16:43WizardofWestmarcwhich I use semi-regularly >(
16:44WizardofWestmarcof course usually I just re-find a string and then throw that string away :P
16:44Chouserhm -- looks like only the one-arg form can leak the mutation
16:46Chouser,(let [m (re-matcher #"x\d" "x1x2x3")] [(re-find m) (re-find m)])
16:46clojurebot["x1" "x2"]
16:46hiredmanick
16:47jbondesonthe entire code base i'm working in is a testament to the superiority of functional programming...
16:47Chouserso it's really re-matcher (which is just a java Matcher) that's at fault
16:48WizardofWestmarcjbondeson: your PS?
16:48hiredmanclojurebot: well?
16:48clojurebotI don't understand.
16:48Chouseras long as you don't pass those matchers around, I guess you're ok, and re-find won't hurt you.
16:48WizardofWestmarcor something new?
16:48jbondesoni have a function called SectionExists, that returns a boolean and takes an optional parameter that is also an output
16:48jbondesongod i hate this
16:48jbondesonWizardofWestmarc: no work.
16:48WizardofWestmarcoh
16:48WizardofWestmarcthe other side
16:48WizardofWestmarc"this shit is so horrible..."
16:49WizardofWestmarcI dunno how many of our coworkers would understand functional code though...
16:49jbondesoncourse it could just be the russian programming...
16:52hiredmanI think FP is supposed to make things simpler, no?
16:53WizardofWestmarcit's simpler to debug and work with once the framework is in place at a minimum
16:53hiredman~google how I learned to be lazy
16:53clojurebotFirst, out of 297000 results is:
16:53clojurebotIceBlah: Things I&#39;ve learned whilst being lazy
16:53clojurebothttp://iceblah.typepad.com/mostly_music_lots_of_it_i/2008/12/things-ive-learned-whilst-being-lazy.html
16:53WizardofWestmarcyou could argue it's got a bit more difficulty at first but long term is better.
16:53hiredmanso it seems like danlarkin's json lib works in lazy
16:53danlarkinhiredman: it passes all the tests unmodified! color me surprised
16:54hiredmanvery cool
16:54hiredmanclojurebot: latest?
16:54clojurebotlatest is 1287
16:55technomancyI'm just going to code this *pretending* that the slime-eval function actually works; then when it gets fixed, my mode will be awesome!
16:56jbondesontechnomancy: close your eyes and see the awesomeness that is your working product.
16:57jbondesonmind altering substances may enhance this...
17:03hiredmanclojurebot: clojure is also the brand
17:03clojurebotAck. Ack.
17:04danlarkinso we can't nil-pun re-seq? seems odd that a function with seq in its name needs to have seq called on it :)
17:04jbondesonit's a lazy seq
17:04jbondesonso that's going to be quite common
17:06fanda,(var seq?)
17:06clojurebot#'clojure.core/seq?
17:06fanda,(meta (var seq?))
17:06clojurebot{:ns #<Namespace clojure.core>, :name seq?, :file "core.clj", :line 115, :arglists ([x]), :doc "Return true if x implements ISeq"}
17:07fanda,(:name (meta (var seq?)))
17:07clojurebotseq?
17:07hiredman~def seq?
17:07clojurebotHuh?
17:07hiredmanclojurebot: are you for real?
17:07clojurebotfor is not used often enough
17:07danlarkinhaha
17:07hiredman~def seq?
17:08fandahow do I get the same info, if function (any function) is inside e.g. vector?
17:08fanda,(def x [seq? 123])
17:08clojurebotDENIED
17:08fanda,(let [x [seq? 123]] (first x))
17:08clojurebot#<core$seq_QMARK___3043 clojure.core$seq_QMARK___3043@3deff3>
17:09fanda,(let [x [seq? 123]] (var (first x)))
17:09clojurebotjava.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.Symbol
17:09fandaI cannot apply 'var'
17:09hiredman~def var
17:10hiredmanwhoops
17:10hiredmanfanda: var isn't a function
17:11fandais there any other way around it?
17:11hiredman,(find-var 'seq?)
17:11clojurebotjava.lang.IllegalArgumentException: Symbol must be namespace-qualified
17:11fandajust want to print the function name
17:11hiredman,(find-var (resolve 'seq?))
17:11clojurebotjava.lang.ClassCastException: clojure.lang.Var cannot be cast to clojure.lang.Symbol
17:11hiredman,(resolve 'seq?)
17:11clojurebot#'clojure.core/seq?
17:11hiredman,((comp :name meta resolve) 'seq?)
17:11clojurebotseq?
17:12hiredman,((comp :name meta resolve first) [seq?])
17:12clojurebotjava.lang.ClassCastException: clojure.core$seq_QMARK___3043 cannot be cast to clojure.lang.Symbol
17:12Chousera function does not know its own name
17:12hiredmanyeah
17:12hiredman,((comp :name meta resolve) 'seq?)
17:12clojurebotseq?
17:13Chouserfanda: var is a special form
17:13hiredmana symbol can be resolved to a var and the var maybe bound to a fuction
17:13fandaChouser: too sad that function doesn't know its name
17:13fandajust wanted to print its name
17:13Chouserright, you can store either the var or the symbol in a collection and get the name, but the fn doesn't have a name
17:14hiredmanrhickey_: any chance fn objects may get metadata?
17:16hiredmanactually, I don't care about metadata on fn objects, I just want to be able to quary a fn object for arity information
17:17fandaChouser, hiredman: thanks for help!
17:17ChouserI've asked before. I get the impression that he's not opposed, but that the code-gen for that would be tricky.
17:17hiredmanI see
17:17technomancyjust need to implement decompilation; that's all
17:18hircushiredman: this is to do so programmatically, right?
17:18technomancyif spidermonkey can do it, why can't we? =)
17:18Chouserfanda: if this is just for debugging, you could try to munge something useful out of the str representation.
17:18hiredmanhircus: yes
17:18hircusbecause if it's for human consumption, (doc fn) works
17:18hiredmanI am aware
17:19tashafa,(doc seq)
17:19clojurebot"([coll]); Returns a seq on the collection. If the collection is empty, returns nil. (seq nil) returns nil. seq also works on Strings, native Java arrays (of reference types) and any objects that implement Iterable."
17:19Chouserarity checking at compile time is on the todo, I imagine making the arity aviable through some api could be done at the same time.
17:32technomancyhow do you turn a fully-namespace-qualified var into just a string with the top-level name? not sure of the terminology here, but #'clojure.foo.bar/my-var => "my-var"
17:34dnolen(str (:name (meta #'user/x)))
17:35technomancyah thanks
17:37tashafa,(meta seq?)
17:37clojurebotnil
17:37tashafa,(meta '#seq?)
17:37clojurebotNo dispatch macro for: s
17:37tashafa,(meta #'seq?)
17:37clojurebot{:ns #<Namespace clojure.core>, :name seq?, :file "core.clj", :line 115, :arglists ([x]), :doc "Return true if x implements ISeq"}
17:38tashafa,(*1)
17:38clojurebotjava.lang.IllegalStateException: Var clojure.core/*1 is unbound.
17:38hiredman,'foo
17:38clojurebotfoo
17:38hiredman,`foo
17:38clojurebotsandbox/foo
17:38tashafathx
17:39dnolen technomancy: np
17:39tashafa,(`*1)
17:39clojurebotjava.lang.IllegalArgumentException: Wrong number of args passed to: Symbol
17:40tashafa,(`*1 :name)
17:40clojurebotnil
17:40hiredmanclojure bot does not bind *1 like the repl does
17:40tashafaah..so whats the deal with the sandbox
17:41tashafasry new here
17:41hiredmanit executes code with a restricted set of permisions on the jvm, "sandbox" also happens to be the name of the namespace where it evaluates expressions
17:42tashafagotcha
17:42hiredman`some-symbol just gives you a symbol, uh, "resolved" in the current namespace
17:42tashafathanks again
17:42hiredmande nada
17:43taggartclojurebot: how much do you know?
17:43clojurebotI know 203 things
17:58hiredman~def doall
18:00hircusspeaking of backquote...
18:00hircusis there a way to get the Scheme behavior somehow?
18:01hircus`(1 2 ,(+ 1 2) 4) => '(1 2 3 4)
18:01AWizzArdhircus: the comma is whitespace in Clojure
18:01AWizzArdso your example is the same as if the , were a space
18:02hircusAWizzArd: yup, but I'm showing the Scheme example
18:02hiredman,`(1 2 ~(+ 1 2) 4)
18:02clojurebot(1 2 3 4)
18:02hircusaha!
18:02AWizzArduse ~ instead of ,
18:02hircusthanks
18:02AWizzArdand ~@ instead of ,@
18:02hircusand @ does .. ?
18:03hiredmansplicing
18:03AWizzArd,`(1 2 ~(list 10 20) 3)
18:03clojurebot(1 2 (10 20) 3)
18:03AWizzArd,`(1 2 ~@(list 10 20) 3)
18:03hiredman,`(1 2 ~@(map inc (range 5)) 4)
18:03clojurebot(1 2 1 2 3 4 5 4)
18:03clojurebot(1 2 10 20 3)
18:03hircuscool
18:15danlarkinanyone write a build.xml for a project that uses contrib? when I try to compile to classfiles it complains about contrib files not being on my classpath, but they are
18:39technomancyhttp://gist.github.com/66070 <= barely works, but here it is
18:40technomancy(clojure-test-mode.el)
18:41technomancythat was way harder than it should have been. swank is a minefield.
18:44technomancythat won't work.
18:52technomancytry that instead: http://gist.github.com/66076
18:54technomancyeven better: http://github.com/technomancy/clojure-mode/blob/b76283ae1e3611a6581cf490d0b566c58dd24ba3/clojure-test-mode.el
18:54technomancygnuvince: let me know how that works for you
18:54technomancyor rather, let me know the ways in which it spectacularly fails
18:59stimulihi
19:00stimuliso the lazy branch is either an exciting new age for Clojure ... or a big giant pain in the butt ... I haven't decided yet
19:01Drakesonif it is the latter, you might need to fix your butt :p
19:01stimulitrue
19:02slashus2Is the laziness for both consistency and performance?
19:03stimuliboth of course
19:03stimuli:)
19:03slashus2Consistency is beautiful.
19:13AWizzArdclojurebot: def source
19:20ChouserI've got a pair of lazy-seq objects (in genclass.clj) that both print as ()
19:21ChouserThe class of each prints as clojure.core$map__3709$fn__3711
19:21ChouserAnd (= (vec a) (vec b)) is true
19:21Chouserbut (= a b) is false
19:23stimulicho : the changeover promises to be painful
19:24hiredmanif you don't realize the lazy seqs, how do you know if they are the same?
19:24stimuliyou have to realize them, I think
19:24cooldude127hiredman: magic
19:25stimuliunless they are the same object, perhaps
19:25durka42that would be identical? not =
19:25stimuliyeah
19:25durka42i hope clojure never has as many kinds of equality as CL
19:25cooldude127yeah but it might check identical? first, just to make sure
19:26stimuliright
19:26cooldude127durka42: yeah i think the two it has now are just fine
19:26durka42= identical? same? close-enough?
19:26stimuliif they are identical .. you don't ahve to force the lazy
19:26durka42(close-enough? 2 3)
19:26durka42:for-government-work
19:26cooldude127durka42: i actually had a close-enough? function for dealing with floating-point numbers
19:26durka42maybe = should realize them though
19:26durka42heh
19:26stimuliI don't know if it does that, however
19:26durka42if = is about value equality
19:26stimulitrue
19:27stimulibut if they are HUGE .. it would be a nice optimization
19:27durka42to use magic?
19:27durka42i mean, lazy seqs are things you kind of have to handle carefully to keep them lazy, right
19:27stimuliwell .. yeah .. magic is a lovely optimization .. 'cept if you have negated rules then it gets hard (Datalog joke)
19:27durka42so "don't compare them until you want to realize them" seems ok
19:27cooldude127technomancy: is the test-is emacs stuff in a branch yet?
19:28stimuliis it too early to wonder when contrib will be 100% fixed w/ the new lazy stuff?
19:28technomancycooldude127: yeah, not sure about if it works though
19:28technomancyhttp://github.com/technomancy/clojure-mode/blob/b76283ae1e3611a6581cf490d0b566c58dd24ba3/clojure-test-mode.el
19:29cooldude127technomancy: well obviously that is my job
19:29cooldude127make sure your shit works
19:33cooldude127technomancy: clojure-test-mode is mean. it changed the package of my slime repl
19:33cooldude127just by requiring it
19:34technomancyyes. it is very mean.
19:34technomancyit will probably push you over and take your cotton candy.
19:34cooldude127technomancy: also, you can fix the embedded clojure font-lock problem very easily
19:34technomancyI'll work on its attitude problem right after I fix its brokenness problem.
19:35cooldude127add a space before (ns, (defonce, and (defn
19:35technomancyoh, thanks
19:35technomancycooldude127: it's probably too broken to really hack right now for stuff other than that
19:35technomancygimme a few minutes
19:35cooldude127technomancy: yeah, you still haven't shown with-test any love
19:35cooldude127:(
19:36technomancyone step at a time
19:36cooldude127this is an important step :)
19:36Chouser,(= (map identity nil) (map inc nil))
19:36cooldude127it's the difference between useful and useless :)
19:36clojurebotfalse
19:37cooldude127really?
19:37Chouserthat doesn't seem right
19:37ChouserAnd rhickey's not here (only rhickey_ and rhickey__)
19:37cp2,(inc nil)
19:37clojurebotjava.lang.NullPointerException
19:37cooldude127Chouser: i get true in my repl
19:37Chouser,(= (map identity ()) (map inc ()))
19:37clojurebotfalse
19:37cooldude127is clojurebot on lazy?
19:38Chouseryes
19:38cooldude127or the new truck, i suppose
19:38cooldude127oh that's got something to do with it then
19:38cooldude127that USED to be true
19:38durka42,(inc nil)
19:38durka42,(doall (map inc nil))
19:38durka42i believe it is
19:38durka42what happened to that last evaluation...
19:38clojurebotjava.lang.NullPointerException
19:38clojurebotLazySeq used in 'if'
19:38Chousercooldude127: right
19:38cooldude127Chouser: it really still should be, this looks like a bug
19:38durka42user=> (doall (map inc nil))
19:38durka42()
19:38durka42that definitely doesn't seem right
19:39Chousercooldude127: yes
19:39cooldude127durka42: sure it is
19:39Chouserdurka42: no, that's correct.
19:39durka42it didn't do it, because if it had it would have thrown exception
19:39cooldude127map and stuff will always return a seq
19:39cooldude127which if empty will be ()
19:39cooldude127or a sequence i guess
19:39cooldude127not a seq
19:39durka42so map swallows exceptions now?
19:39cooldude127durka42: no
19:39cooldude127durka42: there is no null pointer exception
19:39durka42(inc nil) throws an exception
19:39cooldude127durka42: cuz nil has no elements, it doesn't call inc at all
19:40durka42oh
19:40durka42got it
19:40hiredman(doall (map inc [nil]))
19:40Chousersorry, didn't mean to confuse
19:40hiredman,(doall (map inc [nil]))
19:40clojurebotjava.lang.RuntimeException: java.lang.NullPointerException
19:40cooldude127map used to return nil or a seq, now it returns a sequence, which can be empty
19:40locksI heard that clojure sucks
19:40hiredman,(doall (map inc (range 10)))
19:40clojurebotLazySeq used in 'if'
19:40cooldude127and apparently those sequences are not always equal
19:40cooldude127which seems wrong
19:40Chouser,(= (map [] []) (map [] []))
19:40clojurebotfalse
19:40hiredmandoall seems kind of broken
19:41Chouserlocks: at this very moment it's sucking slightly more than usual. :-)
19:41cooldude127a lot of things are temporarily broken
19:41locksic
19:41technomancycooldude127: ok, pull again from the clojure-test-mode branch
19:41technomancyI think it works in the base deftest case
19:41Chouserclojure svn rev 1286 doesn't suck at all.
19:41technomancyand now at least there's a TODO so you can know what stuff is known broken
19:42technomancyI gotta get back to work, so fork and hack if you want to make changes.
19:42Chouserthere is?
19:42Chouseroh
19:42cooldude127technomancy: yeah i might just do that
19:43technomancyChouser: heh; talking about my elisp mode. =)(
19:43Chouseryeah, sorry, I figured that out eventually.
19:45slashus2I ran across an interesting sentence in my programming languages text book. Talking about functional languages: "Other factors, such as efficiency, however, have prevented functional languages from becoming more widely used."
19:45technomancythat was true in the 80's; you had to have special hardware for lisp.
19:46slashus2This is comparing it to C, C++, and Java, I imagine.
19:46hiredmanwell, with a completely lazy language it can be difficult to figure out at what point in your code work is happening
19:47slashus2It mentions those languages immediately before it.
19:47cooldude127hiredman: or if it's happening at all
19:47hiredmanwell, that could just be a boldface lie
19:47hiredmantextbooks are full of those
19:47technomancycould be an excuse for not wanting to spend much time covering them in the book.
19:47cooldude127lol
19:48slashus2It has a whole chapter on functional languages.
19:48technomancy"This stuff looks hard. I wonder if I could ignore it?"
19:48technomancyah, ok
19:48durka42fixing lazy sequences is hard, let's go shopping
19:48cooldude127technomancy: elisp's imperativeness bugs the crap out of me sometimes
19:48technomancyyes
19:49hiredmanslashus2: I dunno why your textbook said that, but is in manifestly untrue these days
19:49cooldude127i have no idea how to transform your regexp into something that matches both with-test and deftest
19:49slashus2Not sure, probably just an unsupported rationalization.
19:50technomancycooldude127: luckily that's the only place that uses deftest; the rest of the line numbering stuff comes straight from test-is.
19:50cooldude127technomancy: the part that finds the name of a focused test isn't even used yet, right
19:50cooldude127?
19:50technomancycooldude127: the only problem is that it's going to suck hard for tests that are in the same namespace but a different file
19:50technomancyyeah
19:50technomancyanyway, you can just M-x clojure-test-mode for now
19:50cooldude127k well i think i fixed the hook then
19:50slashus2Lazy sequences aren't that lazy. At least they do something when you tell them to.
19:51cooldude127technomancy: a simple or worked for the hook i think (it looks like it will, but who knows
19:51technomancyk
19:51hiredmanthey are a controled subset of complete laziness
19:51slashus2hehe
19:51durka42it's more of a procrastinating seq
19:51slashus2This is nearly equivalent to the effect of generator functions in python? Could they be called generating sequences too?
19:52cooldude127technomancy: error in process filter
19:52cooldude127idk even what that means
19:53technomancycooldude127: it means something happened in the async handler
19:53cooldude127NOOOO
19:53technomancycooldude127: M-x toggle-debug-on-error to see what's going on
19:53hiredmanslashus2: obviously it is not nearly equivalent. it is far superior
19:53technomancythough... all the elisp-cl-ish macro stuff can make debugging kinda tricky some times
19:53slashus2Well for one, the sequences are not functions.
19:53slashus2I realize that.
19:53cooldude127technomancy: wrong number of arguments, who knows where
19:54technomancybleh
19:54technomancycooldude127: did you M-x slime before launching clojure-test-mode?
19:54cooldude127technomancy: i had slime up already
19:54technomancyok
19:54cooldude127technomancy: does it need to already be in the right ns inside the repl?
19:54hiredman,((comp (partial take 10) iterate) inc 0)
19:54clojurebotLazySeq used in 'if'
19:54technomancycooldude127: it shouldn't, but you could check that
19:54hiredmanmother fitzer
19:55technomancyactually... that might be it
19:55hiredmanthis is not cool
19:55cooldude127technomancy: no it's not
19:55cooldude127technomancy: i mean it might still be an issue, but that's not what this is
19:55hiredman~def partial
19:55hiredman~def comp
19:55technomancycooldude127: well it's a start at least. it has worked on at least one test file. =)
19:55cooldude127technomancy: this appears to be somewhere inside clojure-test-extract-result
19:57hiredman,(comp identity identity identity)
19:57clojurebot#<core$comp__3675$fn__3677 clojure.core$comp__3675$fn__3677@b2c64>
19:57hiredman,((comp identity identity) :a)
19:57clojurebot:a
19:57hiredman,((comp identity identity identity) :a)
19:57clojurebot:a
19:57hiredmanhmmm
19:57technomancycooldude127: what does this get you in your test namespace? (map #(cons (str (:name (meta %))) (:status (meta %))) (vals (ns-interns *ns*)))
19:58cooldude127technomancy: a big mess of gross
19:58hiredman,((partial :a nil) :b)
19:58clojurebot:b
19:58hiredman,((comp identity (partial :a nil)) :b)
19:58clojurebot:b
19:59dreish,(keyword "-)")
19:59clojurebot:-)
19:59cooldude127dreish: LOL
20:00hiredman,(replicate 10 1)
20:00clojurebotLazySeq used in 'if'
20:00hiredman,(replicate 10 '(1))
20:00clojurebotLazySeq used in 'if'
20:00hiredmanoh
20:00hiredmanI get it
20:00hiredmanthis is clojurebot's fault
20:00hiredman(acutally doall's fault)
20:03cooldude127technomancy: I FIGURED IT OUT
20:03cooldude127it's the destructuring bind in extract-result
20:03cooldude127destructuring-bind throws up an error if the thing you pass it doesn't have all the stuff you're trying to get out of it
20:04technomancycooldude127: yeah, but you need that stuff!
20:04technomancyif it doesn't have enough elements, something is wrong
20:05cooldude127technomancy: well i have a couple with-tests that don't actually have tests
20:05technomancyhah! well screw that
20:05cooldude127just useless wrappers
20:05cooldude127lol
20:05technomancyyeah, so you can add a clause skipping empty tests
20:05cooldude127i need to go eat, but i'll work on this later
20:06technomancyk
20:12slashus2I know you can do (.contains [1 2 3 4] 1) if you want to test for collection membership, but will anything like (inseq? sequence member) be added to the api?
20:15technomancy,(doc contains)
20:15clojurebotjava.lang.Exception: Unable to resolve var: contains in this context
20:15technomancy,(doc contains?)
20:15clojurebot"([coll key]); Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or logarithmic time; it will not perform a linear search for a value. See also 'some'."
20:16technomancyslashus2: I think that's in contrib's seq-utils
20:16slashus2That is interesting.
20:16slashus2Will the contrib items be moved into the main language, or do they stay in contrib?
20:17technomancyslashus2: some will get moved
20:18slashus2It is basically a testing ground?
20:18technomancywell, core is never going to contain everything
20:18technomancybut some things are near-universally useful
20:27taggartanyone know of a good web reference for lisp-y terms like "destructuring bing" and "arity"?
20:27taggarterm... bind
20:29Chousertaggart: destructuring is documented here http://clojure.org/special_forms#toc4
20:30Chouserarity just means the number of args a fn takes
20:30taggartthx, just didn't want to have to keep bugging ppl for definitions of words as they come up
20:31taggartreading through SICP now, so very nubish with lisp
20:32Chouserwell, I haven't read that yet, so you're ahead of me.
20:32taggartheh, I'll take what I can get
20:35slashus2Chouser: Have you read Programming Clojure yet?
20:35taggartnot yet
20:36taggartsry lol, not to me
20:42slashus2Will the whole language becoming lazy make "Programming Clojure" obsolete as it currently stands?
20:53Chouserslashus2: I've read much of it -- I haven't gotten to some of the more recent chapters yet.
21:09arohneranyone else get seriously annoyed at all the XML java projects want?
21:10arohnerI'm seriously thinking about re-purposing one of the clojure HTML generators to make XML for java projects I try to run alongside clojure
21:13Chouserlike lancet
21:13Chouser?
21:18arohnersort of
21:18arohnerI thought lancet was more geared towards ant-style stuff
21:18arohnerI want a general purpose XML generator so I don't have to write XML config files
21:18Chouseroh, yes, but I mean ant is meant to be run by xml files, but you can run it via lancet instead.
21:19arohnerah, right
21:19arohnerdoes lancet generate XML or does it call ant code directly?
21:20Chousercalls ant directly, I believe.
21:32hiredman,(map identity (range 10))
21:32clojurebotLazySeq used in 'if'
21:32Chouserworks for me
21:33hiredman,(map identity (range 10))
21:33clojurebotLazySeq used in 'if'
21:33hiredmanyeah, eval-in-box bug
21:33Chouserah
21:34hiredman,(map identity (range 10))
21:34clojurebot(0 1 2 3 4 5 6 7 8 9)
21:34hiredman,((comp (partial take 10) iterate) inc 0)
21:34clojurebot(0 1 2 3 4 5 6 7 8 9)
21:34Chousercongrats
21:34hiredmanI guess
21:34hiredmanthis looks real ugly
21:41clojurebotsvn rev 1288; fixed LazySeq and EmptyList equals/equiv
21:41hiredmansvn rev 1287
21:41clojurebotsvn rev 1287; merged lazy branch -r1236:1286
21:51clojurebotsvn rev 1289; fixed nil punning in genclass, patch from Chouser
21:53durka42woo contrib builds
21:54durka42,nthnext
21:54clojurebotDon't know how to create ISeq from: core$nthnext__4325
21:54durka42nthrest => nthnext?
21:54Chouseryep
21:54hiredman,foo
21:54clojurebotjava.lang.Exception: Unable to resolve symbol: foo in this context
21:55hiredman,partial
21:55clojurebotDon't know how to create ISeq from: core$partial__3681
21:55hiredmanugh
21:55hiredmanstill not fixed
21:56clojurebotsvn rev 1290; fixed (cycle [])
21:58hiredman,partial
21:58clojurebotDon't know how to create ISeq from: core$partial__3681
22:01hiredman,partial
22:01clojurebot#<core$partial__3681 clojure.core$partial__3681@167c6fd>
22:01hiredman,:a
22:01clojurebot:a
22:11clojurebotsvn rev 1291; added sequence
22:12rhickeyeveryone ported to lazy?
22:13cp2im doing so as you mentioned it
22:13cp2although, i dont have much to port :)
22:16hiredmanditto
22:16hiredmanactually, I think I just finished
22:16cp2eh, so
22:16cp2the lazy branch is just a replacement for clojure-contrib ?
22:17cp2sorry, dont quite understand the ordering of the svn
22:17hiredman,((comp (partial take 10) iterate) inc 0)
22:17clojurebot(0 1 2 3 4 5 6 7 8 9)
22:17hiredmancp2: no
22:17hiredmanthere was a seperate branch in the clojure svn
22:17hiredmanclojurebot: svn?
22:17clojurebotsvn is http://clojure.googlecode.com/svn/trunk/
22:17cp2yes i know
22:18cp2its /branches/lazy
22:18hiredmanyes
22:18cp2not /trunk etc
22:18hiredmanbut it just got merged into trunk
22:18cp2oh ok
22:18hiredmansvn rev 1288
22:18clojurebotsvn rev 1288; fixed LazySeq and EmptyList equals/equiv
22:18cp2so all i have to do is checkout from trunk again?
22:18hiredmansvn rev 1287
22:18clojurebotsvn rev 1287; merged lazy branch -r1236:1286
22:18cp2ah
22:18cp2sounds good
22:18hiredmanyes
22:18hiredmanbut that is completely serperate from contrib
22:19hiredmanclojurebot: contrib?
22:19clojurebotcontrib is http://code.google.com/p/clojure-contrib/
22:19cp2well, when i built it the resulting jar was named clojure-contrib
22:19cp2so it threw me off
22:19hiredmanon which lazy porting is on going
22:19cp2yes i know contrib is seperate ;)
22:19hiredmanuh
22:19cp2i see
22:19hiredmancontrib makes clojure-contrib
22:20Wizardofwestmarchas Swank been updated yet anyone know?
22:20hiredmanclojure makes clojure.jar
22:20cp2oh damnit
22:20cp2i had the wrong url
22:20cp2for some reason
22:20Wizardofwestmarcerr swank-clojure
22:20cp2there we go
22:36durka42hmm, 1291 breaks contrib because c.c.monads defines a fn "sequence"
22:36durka42that would be better phrased as "c.c.monads is broken in 1291"
22:38danlarkin~source seq
22:40durka42that one's not so illuminating...
22:40danlarkinoh, that was just for my reference
22:41Chouserfixed in contrib rev 482
22:43durka42,(.startsWith "--goo" "--")
22:43clojurebottrue
22:43durka42,(.startsWith "-goo" "--")
22:43clojurebotfalse
22:43durka42interesting
22:45durka42,(.startsWith nil "--")
22:45clojurebotjava.lang.NullPointerException
22:46hiredman...
22:46durka42weird things happening with gorilla
23:00durka42will you look at that, i fixed gorilla
23:00durka42nil at the end of a seq
23:06cooldude127technomancy: i sent you a pull request!
23:07technomancycooldude127: excellent
23:07cooldude127technomancy: i still don't know if it works. i don't get any highlighting
23:07technomancycooldude127: I predict things are going to get confusing distinguishing between your clojure-mode and clojure-code repos
23:07technomancyheh
23:07cooldude127lol
23:07technomancycooldude127: does C-c ' work over a failing test?
23:08danlarkinmode code
23:08cooldude127technomancy: HOLY SHIT!
23:08danlarkincode mode code
23:09cooldude127technomancy: yeah it worked
23:10cooldude127technomancy: ok that's really cool
23:11cooldude127technomancy: ok it doesn't always work
23:12durka42the humble vim user wonders what C-c ' does
23:12cooldude127durka42: in theory, it shows the result of a failing test
23:12hiredmanwell, in slime.vim it sends the form under the cursor to the repl
23:12hiredmanah
23:13hiredmanactaully C-c C-c
23:13cooldude127technomancy: ok it worked when i messed up the last (is) in a test, but earlier ones don't show
23:14cooldude127yeah, confirmed, only the last is block works
23:19technomancydurka42: it shows the reason for the test failure under point
23:19cooldude127technomancy: is there a reason that once test mode is enabled, it is global? all my buffers say Test
23:20technomancycooldude127: even non-clojure ones?
23:20cooldude127technomancy: ALL OF THEM! even rcirc!
23:20technomancythat's a bug; heh
23:20cooldude127lol
23:20cooldude127really? :p
23:21technomancyunless you want to test snippets that other people paste into the channel on the fly
23:21technomancywhich *would* be awesome
23:21cooldude127technomancy: yeah not what i want tho :)
23:21cooldude127technomancy: but any idea why only the last "is" in a test block gets highlighted? does this happen for you too?
23:23technomancycooldude127: let me see. (failures are not done on a per-test basis but a per-is basis)
23:24technomancycooldude127: I see; yeah, there's a problem there
23:25cooldude127technomancy: yeah i'm not sure why
23:27technomancycooldude127: I think I see the problem; it's in clojure-test-load-reporting
23:27technomancywhere test-is's report gets redefined
23:27cooldude127technomancy: ok, what about it is wrong?
23:27technomancyit resets the metadata for the test var for each failure
23:28technomancywhere it should append it to a vector or something
23:28cooldude127oh
23:28cooldude127technomancy: is that the problem tho when you only have one failure, it's just not the last?
23:29technomancycooldude127: I don't know about that; haven't repro'd
23:29cooldude127oh
23:29cooldude127do you know what you're doing to fix it?
23:30technomancyI'm not sure. I want to avoid data structures that don't have elisp equivalents, so I must stick to vectors and lists
23:31cooldude127lists are probably the best bet
23:31technomancyalists! woo hoo!
23:31technomancysince I need to correlated line numbers with failure data
23:32cooldude127technomancy: so is status only used by you? it's not part of test-is normally?
23:32cooldude127s/status/:status/
23:32technomancyright
23:33cooldude127cool
23:33cooldude127i was hoping that was the case
23:46technomancyugh. now I have to figure out a way to clear metadata in between test runs
23:50cooldude127uh oh
23:50technomancyis there something like set-meta!
23:51technomancyah; reset-meta!
23:53cooldude127technomancy: don't get too crazy reseting metadata, as my testing vars are probably functions, which have important metadata
23:53cooldude127only reset the stuff that needs it
23:54technomancyright; I realized I want to alter with assoc to only set :status to []
23:54cooldude127technomancy: cool :)
23:57cooldude127technomancy: the second you have something that kinda works, PUSH