#clojure logs

2010-01-28

00:00clojurebot(1 2 3 4 5 6 7 8)
00:08crazzyford(let [foo [[1 2] [2 3]]]
00:08crazzyford (reduce #(conj %1 (last %2)) foo))
00:08crazzyford,(let [foo [[1 2] [2 3]]]
00:08crazzyford (reduce #(conj %1 (last %2)) foo))
00:08clojurebotEOF while reading
00:08crazzyford,(let [foo [[1 2] [2 3]]] (reduce #(conj %1 (last %2)) foo))
00:08clojurebot[1 2 3]
00:17alexykcool
00:28alexykcrazzyford: problem with order: need ((3 2) (2 1)) => (3 2 1), but conj on seq prepends, not appends
00:28alexyk,(conj '(3 2) 1)
00:28clojurebot(1 3 2)
00:28alexykwrong
00:28alexykwhat appends for seqs?
00:29alexykand it's inefficient too
00:46alexykwhat's "but last"?
00:46alexyki.e. need same as rest but for but last
01:04technomancythe Japanese cover for Programming Clojure intrigues me: http://ssl.ohmsha.co.jp/cgi-bin/menu.cgi?ISBN=978-4-274-06789-1
01:05technomancywhy is a cat walking down a staircase?
01:05technomancyand what does the first door lead to?
01:11dnolentechnomancy: FP bliss? STM heaven? mice?
01:14krumholt_i would bet on mice
01:15technomancythat'd be my guess too
01:18RaynesOh. The fact that messages are only available via POP once is a gmail thing.
01:18RaynesI guess that solves the "Well, how the hell do I delete messages after so many specified days, considering the folder will be closed and the messages no longer available?" question.
01:41Raynes"generally, i feel C lets me actually do what i want instead of making a puzzle out of it" heh heh.
01:47qedthere is so much to know in clojure
01:48qedlisp, java, clojure, concurrency
01:49qedthey're al interwoven
01:49qedall*
01:50qedtechnomaz: that's a chunked seq to infinity
01:51qedand that's a lazy-cat
01:59tomojRaynes: hah
01:59tomojis "what I want" in this case a bunch of low-level crap?
01:59tomojotherwise...
01:59Raynestomoj: Those words came from a guy who believes C is the one true and only language.
01:59tomojyeah
01:59tomojI think I remember someone talking about a similar guy before
01:59tomojmay have been you ?
01:59RaynesNope.
02:00RaynesThis idiot is relatively recent.
02:00tomojhehe
02:00tomojit's blub, no?
02:00qedi have a friend hwo blieves that
02:00qedbelieves*
02:00qedhe's partially rigth
02:00qedright*
02:00qedwow i can't type.
02:00tomojhttp://en.wikipedia.org/wiki/Paul_Graham#Blub
02:00RaynesJust because C exists doesn't mean other languages are worthless.
02:01qedRaynes: of course not, but it doesn't mean lisp is the only answer either
02:01RaynesNobody said it is. :p
02:01tomojhave either of these people actually learned clojure or another lisp?
02:01qednot me or you
02:01qedbut some people act like that
02:01qedtomoj: no, doesn't make their point any less substantial
02:01Raynestomoj: The guy I was speaking of apparently knows a Lisp.
02:01qedC still owns a lot of the landscape
02:02tomojsure
02:02RaynesBut apparently also think's it's a much lesser language others.
02:02tomojI was just thinking that it could be Blub unless they've actually learned a lisp
02:02RaynesHe also enjoys coding declaratively in C.
02:02qedC has a lot of boilerplate crap which i dont like, but it's blazing fast, it works for OS level stuff, etc.
02:02RaynesWhich is like enjoying hot steamy sex with a roll of barbed wire.
02:02qedi dont like C, but it's a necessary evil
02:02qed(for now)
02:03Raynesqed: I don't have anything against C, in case that's how it seems.
02:03qedcan you imagine the JVM startup time for your kernel?
02:03hiredmanthere are plenty of other nicer languages that can get as low level (or lower) than C
02:03tomojI was thinking that as we get more and more cpu cores, the need for C over e.g. clojure for performance reasons will go down?
02:03hiredmanclisp, forth
02:03hiredmanetc
02:03RaynesI have problems with people who disregard functional programming because "C can do this."
02:04tomojheh
02:04qedRaynes: i can totally sympathize
02:04hiredmantomoj: the jvm will have to be written in clojure
02:04hiredmanneed a clojure to asm compiler
02:04qedRaynes: again though, it doesnt mean FP is the *one true answer*
02:04tomojhiredman: oh, I guess I was wrong then
02:04hiredmandid you guys see the thing about Factor?
02:04RaynesI never said it was. :o
02:04qedhiredman: which thing?
02:05qedi saw something on HN
02:05hiredmanthe removal of asm bits, replaced with bits in Factor
02:05hiredmansimilar idea
02:05qedyeah i saw that
02:05qedRaynes: i didnt mean to characterize you as thinking such a thing
02:05RaynesJust sayin'.
02:05qedRaynes: but that's the world we live in
02:05hiredmanthere is already a metacircular jvm (or two?)
02:05Raynes:)
02:06qedif it's not FP, it's the exact opposite of FP
02:06qedit's like religion vs atheists
02:06qedthere can be no middle ground
02:06qedwhich si sad
02:06hiredmanyou can't do FP all the way down
02:07qedhiredman: sure, but people will conveniently forget that at opportunistic points along their line of reasoning
02:07hiredmancomputers (except for the odd graph reduction fpga) are register machines these days
02:07qedpeople are dumb
02:07qedjust run benchmarks and stfu
02:07tomojwhat is the verb for what deftype does when you list an interface/protocol?
02:07qedthats my philosophy
02:07hiredmanit makes me mad that people still use C
02:07tomoj"implement"?
02:07hiredmanFORTH
02:07qedC
02:08qedit doesnt make me mad. it's part of our history.
02:08qedwe wouldnt be who we are without it
02:08qedit's like waves vs particles
02:08hiredmancinc -> jvm in clojure -> clojure to asm compiler -> clojureOS
02:08qedwe define ourselves a lot of times by what we aren't
02:08dnoleni like C
02:08hiredman:P
02:08dnolenC is simple
02:08qedit's only natural we have that !clojure or !lisp
02:09dnolenClojure is also pretty simple.
02:09hiredmanC is not horrible, but there are better choices
02:09qedhow much better is totally subjective
02:09qedIMHO
02:10hiredmanfor lowlevel stuff everyone should be using some kind of forth or other stack oriented language
02:11qedforth strikes me as being completely esoteric
02:11qedbut i dont know much about it
02:11hiredmanclojurebot: google FORTH
02:11clojurebotFirst, out of 8960000 results is:
02:11clojurebotForth (programming language) - Wikipedia, the free encyclopedia
02:12clojurebothttp://en.wikipedia.org/wiki/Forth_(programming_language)
02:12qedhiredman: ive read the wiki
02:12qed: HELLO ( -- ) CR ." Hello, world!" ; HELLO <cr>
02:12dnolenwhat are the advantages to stack oriented languages? what I've experienced isn't that cool.
02:12qedthat just doesnt strike me at all as expressive
02:12hiredman ( -- ) is a comment
02:13hiredmanas is ; HELLO <cr>
02:13qedso wtf is it there
02:13hiredman( -- ) is more like a docstring
02:13qedwhat a terrible example
02:13hiredman( -- ) is showing the state of the stack
02:13tomojhmm, is there a way to provide an implementation of a protocol method for all types?
02:13tomojprotocols generate interfaces, where I want something like an abstract class I suppose
02:14qedim sorry hiredman
02:14qedbut i just do not see forth being a viable alernative to C
02:14tomojcurrently I have a deftype which implements my protocol along with IFn and defines invoke in terms of one of the protocol methods
02:14qedtheoretically may
02:14qedmaybe
02:14qedbut in practice, hell no
02:14hiredmanqed: why not?
02:14tomojbut deftype which implements this protocol
02:14tomojoops, but I want any deftype which implements this protocol to get IFn for free
02:14qedit just feels like gibberish, cruft, junk, excess
02:15hiredmanqed: you are having the same reaction people have to lisp parenthesis
02:15qedhiredman: perhaps
02:15qedim just providing a visceral reaction
02:15qedlike i said, i dont know jack about forth
02:15qedthe parens never bothered me though when i started learning lisp
02:16hiredmanso?
02:16clojurebotmadison is http://github.com/danlarkin/madison/tree/master
02:16qedthis just looks sloppy, like im writing ASM
02:16Raynesqed: I've written some Factor. I assure you, it's much more awesome than it looks.
02:16hiredmanyou can actually easily drop in ASM, and that is used to bootstap forth
02:16qedive written a little factor
02:17qedi enjoy factor a lot
02:17dnolenRaynes: what are the advantages. Honestly curious.
02:17dnolenI'm talking about non-trivial programs.
02:17qedhiredman: i dont know jack. just saying...
02:17hiredmanit's like ->
02:18tomojoh, just use Object
02:18tomoj:)
02:19Raynesdnolen: http://concatenative.org/wiki/view/Factor/FAQ/Why%3f Might be helpful.
02:20hiredmanhttp://www.complang.tuwien.ac.at/forth/faq/why-forth
02:21RaynesI wish Factor had a decent GUI toolkit.
02:21RaynesI would be all over that.
02:24dnolenhiredman: most of the commentary seems equally applicable to a competent lisp.
02:25dnolenRaynes: hiredman: I suppose it's like Haskell. I have to try it to care. I will. I elieve in y'alls opinions.
02:25dnolenelieve -> believe
02:26hiredmandnolen: sure, the mental model is fairly similar
02:26hiredmanof course a nice systems programming lisp would do as well
02:29tomojhaskell isn't suitable for the low-level stuff?
02:29tomoj(I don't know it well yet)
02:30hiredman:|
02:30hiredmanI think you'd find the type system to restrictive
02:30hiredmantoo
02:30tomojah
02:31hiredmanat a low level you really want to be able to munge stuff
02:31hiredmanyou'd have to do everything through some kind of monad
02:32dnolentomoj: hiredman: looking at the great language shootout, I think Haskell is amenable to "low level stuff"
02:32dnolenbut it does seem to require "expert" now how.
02:32dnolennot sure that so different from optimized Clojure ;)
02:33hiredmanspeed is not the same thing as low level
02:33dnolento me low level really means two things - speed + memory
02:33dnolenthat's about it.
02:33hiredmanright
02:34hiredmanwith haskell everything (peice of memmory) is strongly typed
02:34jlongsterIs there any way to clear the cache of the `memoize` function?
02:34hiredmannope
02:35tomojre-memoize the original function? :/
02:35hiredmanbest to just write your own custom memoize
02:36jlongsterok
02:57RaynesOh boy.
02:57Raynes"FoxPro: Not as popular as it should be."
03:00Raynes"Compared to Visual Foxpro, I think the other programming languages have actually progressed backwards. While Visual Foxpro's philosophy seems to be less coding and less complexity, other languages like Java (which I'm studying now) do not seem to understand the concept."
03:32jlongsterWhat's the easiest way to generate XML from Clojure?
03:33Raynesjlongster: http://nakkaya.com/2009/10/10/processing-xml-with-clojure/ Helped me.
03:33_bobjoin #scala
03:34jlongsterRaynes: perrrfect. thanks!
03:34jlongsterI'm surprised how hard it is to find things in Clojure's docs sometimes.
03:34RaynesNo problem.
03:34Raynes_bob: (insert \( IRC) ;)
03:35RaynesI stumbled upon that blog post when I was writing my twitter clojure redditbot.
03:36jlongsterRaynes: nice. Is there any way to inspect a .jar file with java? It seems I don't have that class... I just updated clojure-contrib recently
03:37RaynesI'm pretty sure that Java has lots of stuff for manipulating .jar files, but I can't tell you anything about that.
03:37Raynesjlongster: If you open the jar with Emacs, you'll be able to check.
03:38jlongsterRaynes: yeah, I just grepped it and it does seem to have it. must be my loading it. thanks.
03:39RaynesI was surprised the first time I accidentally opened a jar with Emacs. I was like "wut".
03:40jlongsterRaynes: oh, wow, I see what you mean
03:41hiredmanjars don't contain a lot of metadata
03:42RaynesJars are just zip files with a META-INF folder and a clever extension.
04:29tomojhmm
04:30tomojis anyone else seeing "yhca: No such nick/channel" ?
04:34esjnegatory
04:34tomojseems my client decided to arbitrarily display that message in #clojure
04:47greghthere's an irc worm going around, clicked on any links recently?
04:48hiredmantomoj: irssi?
04:48tomojnope, erc
04:49hiredmanI think it's spambots doing ctcp requests in various channels then disapearing
04:49tomojsomeone told me the intended attack was to auto-open a particular url, nothing auto-opened for me
04:49tomojat least, not in my browser...
04:49hiredmanI get a few things like that with random strings as nicks a few times a day
04:51hiredmangot some more with nick mdfro
04:51hiredmanmbfro
04:52tomojI got some earlier from another nick as well, guess I can safely ignore it
04:52tomojthere it goes again :/
05:15Rayneshiredman: You have the prettiest nick color in the channel on my client. It's golden.
05:15RaynesI just... I just thought you should know.
05:19tomojis there a way to depend on slim clojure(-contrib) jars with lein?
05:20tomojI see them in http://build.clojure.org/snapshots/ but can't figure out how to tell lein to use them
05:20Raynestomoj: Look in their .pom file.
05:20tomojah, ok
05:20tomojthanks
05:20Raynestomoj: You need to look for groupId and artifactId.
05:22tomojhuh, looks like they don't have .pom files
05:22RaynesYeah, I just noticed that.
05:22RaynesHrm.
05:22tomojthe jars are there but no poms
05:23tomojI guess I can install the slim jars in my local repo
05:35tomojI can't build contrib at all now :/
05:36tomojcan't find class clojure.contrib.pprint.ColumnWriter even though it's sitting right there in classes/
05:36tomojoh, that's the problem I guess
06:03tomojgahh
06:03tomojafter I tried building clojure-contrib from git my project broke
06:04tomojeven though I've removed the jars I built...
06:04tomojhttps://gist.github.com/c613e69d43a17fb50fe6
06:04tomojlook familiar/
06:04tomoj?
06:06esjperhaps contrib and clojure are out of sync ?
06:06esjI keep stringing myself up that way, and get the same Rest error msg
06:06tomojhmm
06:07tomojI wonder why it worked before, same project.clj
06:07Raynestomoj: That error happens when contrib isn't built against the version of Clojure you're using.
06:07tomojmaybe I had some old contrib hanging around
06:07RaynesYou need to make sure you're synced up, like esj said.
06:07tomojis clojure-contrib-1.2.0-master-SNAPSHOT OK?
06:08tomojI removed everything from org.clojure from my local repo and reran lein deps
06:08tomojdidn't help :/
06:09tomojah well I'll figure that out later, I submitted the code before I broke it
06:09esj:)
06:10LauJensentomoj, safe bet is using these
06:10LauJensen[[org.clojure/clojure "1.1.0-new-SNAPSHOT"]
06:10LauJensen [org.clojure/clojure-contrib "1.1.0-new-SNAPSHOT"]]
06:11tomojah, thanks
07:06esjdoh, missed a debugging #_ when scanning code.... must find way to highlight the commented out text in emacs. Anybody done it ?
07:10esji have all my clojure-modes and paredits in place
07:10esjmaybe a different color scheme, if it knows #_ is a comment
07:46LauJensenesj : I suspect that you can add #_ in clojure-mode.el same place as ";" is registered
07:46esjLau, yeah that sense, thanks !
07:47esjI'm scared of messing with emacs plumbing, I always end up with a wet floor.
07:49esjemacsfu is weak with this one.
07:53LauJensenhehe
07:54LauJensenThe nice think with clojure mode, is that if you break it, hit "git pull" and its back on track :)
07:54Chousukedo you mean "git reset"? :P
07:56LauJensenGo back to sleep :)
07:56the-kennyLauJensen: That's the nice thing with *everything* which is under revision control :)
07:58esj(set (make-local-variable 'comment-start-skip)
07:58esj "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
07:59RaynesI need 300 CCs of Clojure; stat!
07:59esjlol
07:59RaynesOh no! He's going into cardiac arrest! Get me a crash cart!
07:59Raynes:D
08:00Hali_303hi!
08:00esji think its coffee that's needed here....
08:00LauJensenlol
08:00Hali_303how do I debug a running clojure web application?
08:11rhickeydrewr: it's not really sugar, as at some point we will need macroexpand that takes an env, and a way to pass it
08:20esjHali_303: http://stackoverflow.com/questions/1665760/compojure-development-without-web-server-restarts
08:20Hali_303esj: thanks
08:23the-kennyesj: Oh, I didn't know the :reload key. Cool!
08:23esjyeah ! :reload is awesome
08:35RaynesLauJensen: What is that mode that highlights the parenthesis the cursor is on, and the paren that matches it?
08:35RaynesIt's really useful, but I can't remember it's name. :(
08:39Chousukeshow-paren-mode?
08:39clojurebotΜΟΛΩΝ ΛΑΒΕ
08:39Chousukewhat.
08:39ohpauleezhaha
08:39RaynesChousuke: That's it, thanks!
08:40ohpauleezWhy did cb do that? too funny
08:40esji'm glad cb is feeling better today
08:40pjacksonIs there any activity around Clojure on Android at the moment?
08:41Chousukeohpauleez: I think it randomly responds to lines if they happen to match a factoid
08:41ohpauleezahhh
08:41Chousukeohpauleez: fuzzily, of course
08:42ohpauleezpjackson: None that I know, I was trying to get clojure on the Blackberry, but it makes use of parts of the JVM I can't port over
08:44esjis (last x) expensive if x is a sorted collection? would (first (rseq x)) be preferred ?
08:47unfo-i would assume a sorted collection is sorted at init.. dunno tho'
08:47G0SUBHow does (bit-shift-left) work? Does it expect numbers in binary?
08:48unfo-G0SUB, at least bitwise opers in other languages don't expect that
08:48unfo-i don't see why it would in clojure
08:48G0SUBunfo-: yeah, figured that out. thanks.
08:49esjunfo-: yeah, I think you're right, I'm just wondering if the when I call (last x) its going to traverse to the end of the seq and return that, or have a smarter way at its disposal ? (rseq x) is constant time, hence (first (rseq x)) must be too.
08:49G0SUBunfo-: any idea how I can get the ordinal of a character?
08:50unfo-esj, Usage: (last coll)
08:50unfo-Return the last item in coll, in linear time
08:50G0SUBunfo-: OK, (int) works.
08:51esjhow embarrasing. sorry, will rtfm next time.
08:51unfo-esj, so yeah. (first (rseq x)) is faster :)
08:52unfo-esj, no no! I learned something new myself :)
08:52esj:
08:52unfo-i checked the source for first
08:52esj:)
08:52chouser~seen stuartsierra
08:52clojurebotstuartsierra was last seen quiting IRC, 1003 minutes ago
08:52unfo-hmmmh if you have _last_ that implies a finite list. why wouldn't the language itself implement last as first rseq ?
08:53chouseris x a vector here?
08:53chousermust be for rseq to work. so you can just use 'peek'
08:53unfo-a collection of any sort
08:54chouserrseq only works for reversible collections
08:54esjin my particular case its a sorted-set
08:55unfo-chouser, what collection is not reversible?
08:55chouserlist, map
08:55unfo-hmmmh sounds odd
08:55chouserer, hash-map anyway, and hash-set
08:55unfo-i mean... last implies order, and order (in my head) implies the possibility to reverse that order
08:56chouserwell Reversible is only for things for which rseq can be O(1)
08:56unfo-aaaa
08:56unfo-chouser, that is the thing i was missing here
08:56unfo-thanks
08:57chouserinteresting. I guess (first (rseq x)) simply doesn't mean the same as (pop x)
08:58chouserthey're essentially the same for vectors. But pop works and rseq fails for lists, and pop fails but rseq works for sorted sets and maps.
08:58ohpauleezchouser: that does seem a little odd
08:58ohpauleezimplementation detail?
08:59chousernope
08:59chouserwell
08:59chouserthe structures used internally by these collections have a direct impact on what they can do efficiently and what they can't.
09:00chouserthose internal operations are then mapped to interfaces (eventually protocols) that can take advantage of them
09:00ohpauleezright
09:00chouserso vectors can add/remove from one end, so they support the stack ops push/pop/peek
09:00ohpauleezas can lists
09:00pjacksonohpauleez: Righto, thanks.
09:01ohpauleezpjackson: no problem
09:01chouservectors are also indexed so they can support reversible op rseq
09:02ohpauleezright (I just wrote about this... giving a clojure talk today at Drexel's MCS meeting) :)
09:02chouserah, great.
09:02chouserso ... what seems odd?
09:03ohpauleezjust commenting on the fact the interfaces don't match exactly in certain cases...
09:03ohpauleezre: "(first (rseq x)) simply doesn't mean the same as (pop x)"
09:04ohpauleezbut it was me not taking into account the structures
09:04ohpauleezI was misreading what you were originally saying
09:04chouseroh, right. rseq is about starting on the right vs. the left (at least that's how I think of it -- not sure rhickey ever uses those terms)
09:04ohpauleezright
09:04chouserwhile peek/pop is about doing the opposite of the last conj, regardless of the end.
09:05chouserbut yes, I see what you're saying.
09:05chouserit's the same as conj going in the same order as seq for vectors but not for lists.
09:05ohpauleezit's just like conj
09:05ohpauleezwhich is a great idea
09:05ohpauleezahhhh you beat me to it
09:06ohpauleezthe beauty of programming to an interface and not an implementation
09:06chouseryes, as long as you don't make cross-interface assumptions. :-)
09:17unfo-so in order to make last O(1) it would have to be data structure specific versus (last coll) ?
09:17unfo-i.e. one last for lists, one last implementation for vectors and so forth
09:17unfo-or reversible seqs in general
09:18unfo-and it would be O(1) in some cases only
09:18unfo-i.e. for reversible / indexed collections only
09:19unfo-also, this gave me new motivation to read the last chapter of the prog clojure book :)
09:21chouser'last' could be made to work in constant time for reversible collections, but doesn't right now.
09:22chouserright now it uses 'seq' and just walks to the end.
09:23chousertake-last is in the same boat, though you may note the docstring is worded carefully to allow for the possibility of O(1) behavior later for some collections.
09:25jcromartiewhen I start swank-clojure-project in a certain directory, it appears that the current working directory is set to something inside of the src/com/whatever directory
09:26jcromartieI need to load things in a ./resources directory off of my main project root
09:28Hali_303how do you debug clojure apps step by setup? jswat or in slime?
09:28Hali_303/s/setup/step
09:35jcromartieI added "resources/" to the custom classpath that swank-clojure-project builds
09:37chouserwell, I just followed the instructions for building contrib with a custom clojure, and it appears to have worked.
09:37chouserso that's good
09:37chouserbut I have absolutely no confidence that that's what it actually did.
09:38chouseranyone have a suggestion on how to know for sure which clojure.jar it just used to compile and test contrib?
09:39cemerickchouser: if you look at the pom that was installed (assuming you ran install rather than just package), then that pom will indicate what version of the clojure jar was used.
09:39chousertons of .jar urls were printed during the process, but none of them are a patch to a clojure.jar, afaict
09:40chousercemerick: I did use "package". But either way, the version is "clojure:1.2.0-master-SNAPSHOT", which doesn't tell me if it's my patched version or the lastest from the web.
09:40chouserI guess I could tweak the name of my custom one and make sure that makes it through.
09:41cemerickchouser: or install your clojure.jar as 1.2.0-master-SNAPSHOT, and run an offline build
09:42chousercemerick: is that what the contrib README describes? I think that's what I did, though I'm not quite sure about "install"
09:42cemerickchouser: stuff like this is why version numbers in the maven world move pretty fast
09:43cemerickchouser: I haven't looked at the latest contrib readme, this is generally applicable. "install" is just the deployment of an artifact to one's local repository.
09:43cemerick~/.m2
09:43clojurebotHuh?
09:43chouseris that what ant ci-build does?
09:45cemerickI presume so -- I don't think the maven repo there is a separate environment (like nexus, artifactory, etc)
09:45chouserdrat. "mvn package" in contrib isn't telling me which clojure version it's using. not the path, not even the maven-compatible version string
09:46chouserhehe. "mvn clean" required downloading 13 new files
09:46cemerickchouser: it's using whatever is defined in the pom
09:46rhickeyJava One in San Francisco from September 19-23, 2010
09:47rhickeyKenai dead
09:47rhickeyhttp://www.oracle.com/technology/community/sun-oracle-community-continuity.html
09:48cemerickI've been 100% happy with all the oracle news I've seen so far.
09:48cemerickKenai was a cherry on top, IMO.
09:48rhickeyI thought the Netbeans story was weak
09:48rhickeyalthough not bad
09:49cemerickI think it's just about right -- alternative languages, UI, mobile.
09:49rhickeyand possibly good tey don't burden it with Oracle support
09:49chousercemerick: the pom.xml in the contrib directory? if so, then this is not doing the right thing.
09:49cemerickthe "enterprisey" stuff that JDeveloper does is absolutely uninteresting, IMO
09:49rhickeycemerick: alternative langs - where is that info?
09:49rhickeyjust re: netbeans?
09:49cemerickrhickey: a tweet, eons ago in twitter terms
09:49cemerickyeah
09:50rhickeyok, saw that
09:50rhickeythe real issue will be around dev resources for it
09:50cemerickchouser: dependency info is only ever taken from the effective pom of the project being built
09:50rhickeycommitted to Eclipse, will allow Netbeans to exist is how I read it
09:50chousercemerick: ok, I think I've got it.
09:51AWizzArdI have (def x '(fn [#^String y] (.compareTo y "hi"))) and would like to type hint that y is a String, so that when *warn-on-reflection* is set to true and I do (eval x) I won't get a reflection warning. How to do that?
09:51cemerickrhickey: it's hard not to improve on so little before...
09:51rhickeycemerick: I always got the impression there were a bunch of Netbeans devs in Europe
09:52chouserit may have been doing the right thing before, but I think I was also right to doubt it. It would have fallen back silently to a downloaded clojure and not tested my patches at all.
09:53ChousukeAWizzArd: that should work.
09:53ChousukeAWizzArd: but I think there's a bug with eval and metadata. Or did that get fixed? :
09:53cemerickrhickey: there are, but my impression is that most of them have been generally involved in stuff that is definitely the purview of jdeveloper -- e.g. database wizards, etc, or tilting at RIA windmills.
09:53chouserso I guess the right way is to clean out my ~/.m2/ of old versions, use a custom version string from clojure, and name that custom version when building contrib.
09:53cemerickchouser: always run an offline build if you want to use locally-installed artifacts
09:53chouserI hope this is a win for somebody, because it sure isn't a win for me.
09:54chousercemerick: how do I run an offline build?
09:54AWizzArdChousuke: my Clojure reports me a warning
09:54cemerickchouser: -o
09:54chousercemerick: thanks.
09:55AWizzArd,(let [x '(fn [#^String y] (count y))] x)
09:55clojurebot(fn [y] (count y))
09:55AWizzArdthe #^String is gone
09:55rhickeycemerick: I think a bigger issue will be how Oracle approaches the set of Scala/Clojure/JRuby/Groovy/Jython/Rhino
09:55cemerickchouser: us maven hordes thank you for your patience while we install the implants.
09:55AWizzArdCan with-meta be used here? If yes: how?
09:55chousercemerick: :-)
09:56chouser,(set! *print-meta* true)
09:56clojurebotjava.lang.IllegalStateException: Can't change/establish root binding of: *print-meta* with set
09:56chouser(binding [*print-meta* true] (prn '(fn [#^String y] (count y))))
09:56chouser,(binding [*print-meta* true] (prn '(fn [#^String y] (count y))))
09:56clojurebot(fn [#^String y] (count y))
09:56chouserAWizzArd: it's still there. Metadata is not printed by default.
09:56cemerickrhickey: I didn't notice any talk about JCP, but if they can cut that knot, I don't see why they'd be threatened.
09:57cemerickslower languages need bigger hardware!
09:57rhickeyheh
09:57AWizzArdchouser: my system says #^{:line 1} (fn [y] #^{:line 1} (count y))
09:58AWizzArdI copy/pasted your example into my repl
09:58rhickeycemerick: it's less a matter of threat than support - Sun was on their way to embracing a multi-language world
09:58chouserAWizzArd: there was a quoted form metadata bug. update your clojure.
09:58AWizzArdchouser: okay, I will try that
10:04cemerickrhickey: really? If that were the case, then javafx script wouldn't exist.
10:05rhickeycemerick: that doesn't follow IMO - they had JRuby and Jython devs on staff
10:05cemericke.g. there's a large divide between the engineering and front office on the language issue.
10:06cemerickor, at the very least, they'd make the javafx apis usable by other languages. *shrug*
10:06rhickeytrue, but it's the investment that matters, not productization
10:09abrenkchouser: "mvn dependency:copy-dependencies" copies your dependencies (only clojure.jar in case of clojure-contrib) to target/dependency - like "lein deps"
10:10cemerickrhickey: I totally disagree. Look at the path that F# has followed for contrast. Not that I want Sun/Oracle to be blessing particular languages, but adoption follows productization, at least among the masses.
10:10abrenkchouser: perhaps you could then compare md5sum's to check if it's the jar you want to use
10:11rhickeycemerick: things have to exist before they get adopted. If no one had supported the JRuby folks when they left...
10:11chouserabrenk: hm, interesting idea.
10:11abrenkchouser: but close your eyes for some time after invoking the command - it will download loads of stuff first time you use it... ;-)
10:12chouser:-)
10:12chouserjvm is my machine and my OS. maven is my distro.
10:14AWizzArdsorry guys, where did the build.xml file for Clojure Contrib move?
10:15chouserAWizzArd: she's gone. we love maven now
10:15AWizzArdaah, I see
10:15stuartsierraAWizzArd: it died a well-deserved death
10:15chouserAWizzArd: the README gives instructions
10:15AWizzArdgood good
10:15chouserstuartsierra: there you are!
10:15stuartsierrahere I are
10:15AWizzArdI just have a script which downloads Clojure, Contrib and other libs and compiles them automatically. That’s why I didn’t see it.
10:15chouserstuartsierra: I've been stacking up some verbal abuse for you.
10:16stuartsierraBring it on.
10:16chouserstuartsierra: but it's getting kinda stale, so I'd best throw it out.
10:16chouserstuartsierra: I just wrote to the dev list. I'd appreciate advice if I'm doing something the wrong way.
10:17stuartsierraI added instructions to the readme about this yesterday, I think.
10:18chouserthe instructions were very helpful, thanks.
10:18stuartsierraI'm considering bringing back build.xml just for this particular case
10:18stuartsierraI don't want to, because it's more maintenance work.
10:18chouserif the steps I outlined are correct and the best way, I can just write a script so it's still a single step for me.
10:19chouserbut I really don't want there to be any holes. I don't want to push patches to clojure thinking I tested contrib against them, only to discover later that they're in fact untested.
10:20stuartsierraAs far as I know, if you install Clojure locally, that will always be the latest snapshot, and Maven will use that.
10:20chouserso you don't think I need to delete old clojure.jar's or use -o
10:20stuartsierraUsing -o might be a good idea.
10:20AWizzArd-o in maven?
10:20stuartsierraDeleting old jars is definitely unnecessary.
10:20cemerickI think -o is very worthwhile in this situation.
10:20stuartsierrayes,
10:21stuartsierraI'll add that to the README
10:21chouserok thanks
10:21AWizzArdGood. I will have to update my script to use maven.
10:21cemerickchouser: Alternatively, you could just install your custom clojure jar using the git hash as the version number or something.
10:22cemerickFundamentally, the fact that version numbers are steady for *so* long is an issue in general.
10:22stuartsierraMaven manages snapshot versions automatically.
10:22chouserthat sounds interesting. would I manually copy the clojure.jar into ~/.m2/ and tweak it's name?
10:23cemerickBut if you're targeting 1.2.0-master-SNAPSHOT, there's a *big* disparity between that snapshot on Jan 1 and Jan 31 (or whatever)
10:23AWizzArdBtw, it would be good to think about people behind firewalls. In my company I need something to download and run maven on it. If it wants to reload dependencies from the web then people behind a FW have a challenge.
10:24cemerickchouser: http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html is the blessed way to do manual installations.
10:24stuartsierraMaven gives all snapshots unique names! You don't have to do anything.
10:25cemerickstuartsierra: yes, but you have to explicitly specify one of those unique snapshots to get locked into it
10:25stuartsierrayes
10:25stuartsierrathe versions plugin helps with that too
10:25chouserhow would I do that?
10:26abrenkmvn versions:lock-snapshots
10:26cemerickso what I'm saying is that it wouldn't be the worst thing in the world if the version numbers bumped some insignificant bit on a fairly regular basis
10:26stuartsierracemerick: I agree
10:27chousercemerick: that wouldn't help me though, right?
10:27stuartsierraIf we can convince rhickey to adopt Maven, that would be a single command.
10:27cemerickchouser: no, not until the version numbers start changing upstream.
10:27cemerickyup
10:27stuartsierrachouser: http://mojo.codehaus.org/versions-maven-plugin/
10:27rhickeystuartsierra: adopt maven for what?
10:27stuartsierrarhickey: Clojure
10:28stuartsierraTo do automated releases
10:28stuartsierraWith fixed version numbers.
10:28chouserI don't think I want lock-snapshots
10:29chouserI want the build of clojure to report some unique version number (git sha1 would be perfect, but whatever) that I can then take over to the contrib build and be 100% confident that's the version of clojure that it uses.
10:30stuartsierrarhickey: Replace Ant with Maven. Let Maven manage versioning and releases. Make regular numbered releases each time stuff changes.
10:30Chousukethat's problematic with branches though :/
10:30stuartsierratrue
10:30rhickeychouser: see, I don't havethat problem, and won't until I get the next version of contrib I guess. I pointed ant at the version of Clojure I wanted and had no questions. I don't see these things making anything significantly easier
10:31chouserrhickey: I'm with you 100%
10:31cemerickrhickey: maven makes integrating with things like hudson *trivial*. That'd be the biggest win for you IMO.
10:31cemerickor, for the project, perhaps :-)
10:32rhickeywin how? by making interim things into releases?
10:32chouserI can see how maven (esp. as cleaned up by lein) is good for higher-level libs or apps to pull together various stable lib releases. So far it's a net lose for me on contrib.
10:33rhickeyhudson pulls from git, produces builds, etc
10:33cemerickrhickey: but if the artifacts coming out of that process can't be tracked in a regular way, a lot of value is lost.
10:33stuartsierraThe problem is that too many people want to depend on something that is essentially a moving target.
10:34rhickeyI don't know why anyone would want an interim build they didn't pull and build themselves, i.e. if no human has characterized it as something in particular. Git has identifiers
10:34rhickeycorresponding to checkins at least
10:34rhickeywhat would maven numbers correspond to?
10:35Hali_303how to call a method in the superclass in the init function set up by gen-class :init?
10:35AWizzArdstuartsierra: this new maven thing does not work from behind a firewall. I see how it tries to download something. Is there a way to include everything, so that I only need to tell it where my clojure.jar is and it will compile everything?
10:36chouserHali_303: you don't, it gets called for you after :init. you can provide more code for after the superclass ctor is done by providing :post-init
10:36stuartsierraOk, ok, I'm rewriting build.xml.
10:36cemerickrhickey: it's *possible* we could generate version numbers based on the git rev
10:36chouserooh, that's even better than dishing out verbal abuse. ;-)
10:37Hali_303chouser: so init is a transformation of parameters (in Java the stuff that's inside super()), while post-init is Java's constructor after the call to super()?
10:38chouserHali_303: sure, that's one way to think about it. :init takes your ctors args and produces super-class ctor args and your objects own state
10:38Hali_303chouser: hm. state is like fields for a class, right?
10:39chouserHali_303: state *is* a field for your class. the only one you get, and it's public final
10:39rhickeyurk - Oracle's edge service seems to have cached a broken version of their dev tools webcast http://www.oracle.com/events/productstrategy/index.html
10:40chouserstuartsierra: you can't provide a maven task that lets you name a particular clojure.jar file to use?
10:40stuartsierraI don't know how
10:40AWizzArdI have a sorted-set-by into which I conj (deftype User [name password age]) instances. It orders objects by :name. When I now want another collection include all users, but ordered by age then sorted-set-by is not good, as it allows only one object with a given age.
10:40Hali_303chouser: I see, thanks :)
10:40stuartsierrachouser: Maven doesn't really work that way
10:41rhickeythe Java one had a brief mention of alternative languages and invokedynamic
10:41AWizzArdIs there a collection that would automatically sort its contents but which accepts duplicates?
10:41chouserstuartsierra: ok. thought that might be easier than maintaining a separate build.xml for ant.
10:41AWizzArdCurrently I use sorted-map-by which maps from an age to a set of Users which have this age.
10:41cemerickstuartsierra: I've an idea. 2m.
10:41stuartsierraok
10:42RaynesThis channel will be as popular as #haskell in no time.
10:43RaynesThis is the most solid block of text versus exit/entrance messages I think i've seen in this channel.
10:47AWizzArdCan i use an older build.xml file to compile a fresh contrib checkout?
10:47stuartsierrano
10:48stuartsierrathe directories are different
10:48AWizzArdI see.
10:49AWizzArdIs the download at google code compiled with the current clojure master?
10:49RaynesI noticed/got bitten by that.
10:49stuartsierraAWizzArd: the downloads are compiled with Clojure releases
10:49RaynesI couldn't figure out why I couldn't browse str-utils.clj on github through the direct link. :>
10:50AWizzArdI see. Well, that's a bit unfortunate for me today then *sigh*.
10:52esjAWizzArd: you could change your sorted-set-by comparator to use function of name and age ?
10:53chouserAWizzArd: if you're only using the sortedness of the map and not actually looking things up by key, you might consider sorted-set-by insetad, and do what esj is suggesting
10:55cemerickstuartsierra: Create an optional profile that defines the clojure dependency as system scoped -- that would make using any clojure.jar as easy as {{mvn -P custom-clojure package}}. http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#System_Dependencies
10:55cemerickYou could even parameterize the <systemPath> property so people can point to any jar file.
10:56AWizzArdesj: yes, that would probably help.
10:56AWizzArdchouser: looking up things by key can be done with sorted-set-bys too
10:56stuartsierracemerick: But there's still the dependency on clojure-maven-plugin, won't help people behind a firewall.
10:56AWizzArdthough the lookup can indeed be ugly
10:57cemerickstuartsierra: are you worried about the version of clojure that the plugin uses, or the fact that people wouldn't be able to get the plugin itself?
10:57stuartsierracemerick: the latter
10:58cemerickoh, I didn't think that was an objective at all.
10:58AWizzArdfor corporate users it's most helpful to download something that includes all, like the .zip files that github offers. When it comes with the build.xml file one can simply type "ant" and give the path to clojure.jar and it works.
10:58cemerickwait, why is being behind a firewall problematic?
10:58stuartsierracemercik: Maven tries to download the Internet every time you run it.
10:59cemerickstuartsierra: hardly. It needs to grab what it needs once, but then -o solves any connectivity issues.
10:59cemerickIn the same category as not being able to clone from github, IMO.
10:59stuartsierraGood point.
10:59AWizzArdcemerick: you can go to the github website and just download the .zip file from there.
10:59stuartsierrayeah
10:59stuartsierraI guess some people do that. :)
10:59cemerickAWizzArd: a zip of what?
11:00AWizzArdcemerick: of the freshest clojure master or contrib master
11:00cemerickso?
11:00clojurebotshhhh!
11:00AWizzArdcemerick: this worked until recently
11:00stuartsierraI wish people would just use releases.
11:00AWizzArddownload clojure-contrib.zip and type "ant
11:01cemerickAWizzArd: I'm not following how that's related to build issues.
11:01cemerickstuartsierra: it's a natural response when releases are so far apart *shrug*
11:01AWizzArdcemerick: i just downloaded clojure and contrib from github
11:02AWizzArdThen I tried to do this mvn package
11:02AWizzArdcemerick: at that point it stopped, because it tried to download something from the internet
11:02cemerickAWizzArd: oh, these are source tree zips?
11:02AWizzArdcemerick: yes
11:03cemerickheh, never noticed that.
11:03stuartsierraOf course, it would be pretty easy to deploy pre-built snapshot ZIPs...
11:03AWizzArdcan github somehow automatically compile the freshest clojure and clojure-contrib as soon someone makes a commit
11:03cemerickThat's a little perverse.
11:03chouserisn't that what build.clojure.org is?
11:03stuartsierraI mean, Hudson already compiles JARs for every commit.
11:03cemerickI have zero sympathy for any kind of connectivity issues, though.
11:04chouserAWizzArd: have you considered using build.clojure.org instead?
11:04AWizzArdchouser: would be fine for me. Didn't know about it. Does it always use master of both, clojure and contrib?
11:05stuartsierrait builds each branch
11:05AWizzArdcemerick: it's not so much about sympathy but about corporate rules.
11:05AWizzArdstuartsierra: which clojure.jar does it use? The one from master or from par?
11:05chouserheh, it claims contrib is failing.
11:05AWizzArdoh yes, seems so
11:06cemerickAWizzArd: I understand, used to be in that world myself. But it's a broken environment, I don't think it's worth designing around.
11:06chouserI don't see where it shows the failure details though.
11:06stuartsierra"console output"
11:06rhickeySo, Netbeans gets much better story in this presentation: http://oracle.com.edgesuite.net/ivt/4000/8104/9236/12627/lobby_external_flash_clean_480x360/default.htm
11:06cemerickPeople who happen to be in such environments are likely either not going to use clojure anyway, or will absolutely use official releases.
11:06rhickeyalso Hudson
11:07AWizzArdI am in such an environment but often use the newest versions of clj and contrib
11:07cemerickHudson owns its space, that was a lock.
11:07cemerickAWizzArd: sorry :-(
11:08rhickeycemerick: you still want someone to pay for devs
11:08AWizzArdwell, this hudson thing would be fine for me and most likely others
11:08cemerickrhickey: right, I meant that it was lock that it would be built upon
11:08rhickeycemerick: I had no idea if Oracle had something of their own there
11:09rhickeythese public commitments are important
11:09cemerickyes, hugely
11:09rhickeynot they that will deliver, but in their absence people will bolt
11:10rhickeyah, Flash - I have to quit and restart my browser between each of these webcasts
11:11cemerickI generally keep long-lived flash stuff in safari, which seems to fare better than firefox
11:12cemerickotherwise, flashblock to the rescue
11:13Hali_303how can I call methods of the superclass in post-init? I've tried (.methodname this params), but it doesn't seem to work
11:13stuartsierraSo how about this: we fix build.clojure.org, tell people to use that if they want to follow development.
11:13Hali_303"no matching method found"
11:13Hali_303do I need to use :exposes-methods?
11:14AWizzArdstuartsierra: would be fine by me
11:14rhickeystuartsierra: it's broken how?
11:17stuartsierrarhickey: for contrib, yes
11:17rhickeyhow so?
11:17stuartsierraHudson is configured to build with Ant, I changed it to Maven.
11:17rhickeyAH
11:17stuartsierraThe configuration with Maven is probably simpler, just need to change it.
11:18stuartsierraAnd I *really* don't want to recreate build.xml, now that I look at what a mess it was.
11:18cemerickstuartsierra: I verified that the profile/system-scoped dep approach will work for chouser's use case, FWIW.
11:18stuartsierraok
11:18stuartsierraI'll look at that again
11:28AWizzArdrhickey: did you sign up for the free plan on github?
11:28rhickeyAWizzArd: I have a paid plan
11:29AWizzArddoes that support a free cname setting?
11:29rhickeygot me
11:29AWizzArdMaybe you could have them show the github page under http://git.clojure.org/
11:31angermanis it just me or is JNA somehow backwards? Maybe it's just because I need so many structs that are invervowen.
11:42stuartsierraOk, just pushed new POM with "local" profile and updated README instructions.
11:42stuartsierrachouser: this will allow you to specify the path to clojure.jar
11:43stuartsierraAnd I emailed Dysinger about build.clojure.org, he says he can fix it today
11:43chouserstuartsierra: great, thanks!
11:43stuartsierrayou're welcome
11:44AWizzArdgood
11:45stuartsierraYou still need Maven to do the build, and Maven usually requires network access.
11:45AWizzArdstuartsierra: also when I download from build.clojure.org?
11:46stuartsierraAWizzArd: I don't understand
11:46AWizzArdyou said that I still will need Maven
11:46chouserstuartsierra: internet access is not a problem for me, and AWizzArd should be fine with build.clojure.org downloads.
11:46AWizzArdah okay, that was for chouser
11:46stuartsierraAWizzArd: build.clojure.org only hosts pre-compiled JARs.
11:46AWizzArdyes, so no Maven needed
11:47stuartsierracorrect
11:48chouserah, so fun. I love having smart co-workers.
11:48AWizzArdin your company?
11:49chouserI just explained clojure's persistent collections and gave an overview of the reference types and their relationship to the ideas of value, identity and state in about 25 minutes.
11:50chouserhow clojure's persistent collections work, I should say.
11:50rhickey25 minutes? wow - always takes me at least an hour
11:52chouserI talked fast :-) And glossed over details unrelated to the questions he was asking.
11:52chousermaybe not enough for him to know and remember forever, but a good anchor point for future discussions.
11:56chouserdoes anyone know what this is about: http://twitter.com/mircbot
11:58cemericka prog-lang golfing channel, looks like
11:59chouseryeah, that's my guess. I was hoping to see the code snippets somewhere.
12:00hchbawchouser: Here I guess: http://golf.shinh.org/
12:03Hali_303hm. it seems that for some reason I still cannot call a method in the ancestor class in :post-init. I suppose it is simply (.methodname this), right?
12:05chouserHali_303: that should work if you haven't overridden it, assuming you named your first arg 'this'
12:08Hali_303chouser: yes! http://pastebin.com/d44f9d537
12:09chouserHali_303: that's not working?
12:11Hali_303chouser: yes. java.lang.IllegalArgumentException: No matching method found: add
12:13Chousukemaybe it's ambiguous
12:14ChousukeI think sometimes you get that error if the reflector can't figure out what method it should use
12:14Chousuketype hinting can help.
12:19AWizzArdIs (= ::MyDeftype (type obj)) the most performant way to check if obj is a MyDeftype instance?
12:20Chousukehmmh
12:20Chousukeprobably not.
12:20ChousukeI think there's a function just for that.
12:20ChousukeI just can't remember what it's callde
12:21AWizzArdinstance? is for comparison with classes
12:21AWizzArdthis is probably not what you mean
12:22ChousukeOh, hm, I was thinking of protocols
12:22Chousukethey have "satisfies?"
12:22Chousukeideally, you should be using that instead of checking the type directly I suppose :)
12:23stuartsierraisa?
12:25stuartsierraisa? works for tags created with 'derive' too
12:26technomancystuartsierra: I just mean saying "foo" isnta String is wrong.
12:26stuartsierraah
12:27technomancyI know, I know, there are only so many good words in the English language... but I think "is" is important enough to get right. =)
12:27AWizzArdChousuke: I just don't have a protocol for that. So I manually check for that type.
12:27esjis there a way to bind the 2nd argument of a function as in partial ?
12:27esjI'd like a point-free version of (every? #(contains? % :t) [{:t 1} {:h 2}])
12:27esjbut the arg order of contains? is backwards for this
12:28esjsomething like (every? (partial contains? :t) [{:t 1} {:h 2}]) is what I'm after ?
12:28Chousukewhat's wrong with (every? :t ...)
12:28AWizzArdyes, but you would need to store that function, such as (def esjs-contains? #(contains % :t))
12:28Chousukeare the values false?
12:29esjAWizzard: but then I still have a 'pointful' function somewhere
12:29Chousukedon't take the point-free stuff too seriously.
12:30Chousukemaking that particular code-snippet point-free will just make it more difficult to understand :/
12:30esjChousuke: thanks, you're right. And your (every? .) works, stupid that i didn't notice
12:30Chousukeand if all the values you care for are true, you can just use :t as the function instead of contains? :)
12:30Chousukeright.
12:31esjthanks.
12:31cemerickChousuke: isn't all point-free harder to understand?
12:31cemerickobviously not for some, but....
12:31esjits so compelling !
12:33Hali_303Chousuke, thanks I'll debug that using Clojure sources
12:34Chousukecemerick: well, I like to use partial application with filter or map sometimes
12:35cemerickit seems to always, always be more verbose, and the order of application is backwards from what's baked into my brain.
12:36Chousukecemerick: but if you saw teh full disclojure point free screencast, that's exactly the kind of point-freedom I do not want to see :P
12:36cemerickhrm, I didn't
12:36esjoh, I really liked it
12:36Chousukeor, the examples at the beginning were still fine but the one at the end was just horror
12:36cemerickesj: linky?
12:36esj1 sec
12:37esjhttp://www.vimeo.com/channels/fulldisclojure
12:37esjepisodes 6 and 7
12:37esjI'm learning a lot from them
12:38Chousukethere's a lot more mental baggage in point-free expressions than in pointy (:P) expressions
12:38Chousukeespecially once they grow past a few composed functions
12:39esji'm ill placed to judge comparative mental load as I'm straining under everything being new :)
12:41Chousukethe named variable is a kind of a black box that denotes all the processing done so far, so you can examine further expressions "standalone".
12:42Chousukewith point-free style, you don't have that benefit
12:43esjtrue
12:43Chousukeso when choosing how to structure your code, try to find balance between the increased mental burden of having no variables, and the noise that too many variables brings to code
12:43RaynesI'm a point-freeniac in Haskell.
12:43RaynesI go out of my way to compose functions in completely unreadable ways just to be point-free.
12:43Chousukepoint-freeness makes more sense in haskell because it's less noisy.
12:43RaynesJust because the code looks awesome afterwards.
12:44Chousukein clojure, point-free code tends to be just as noisy as the alternative
12:44Chousukewhich makes it less appealing
12:44esji dunno, I like to be rid of #(... %1) etc
12:45esjfeels perly
12:45Chousukewell, yes.
12:45esjbut that's obviously just for anon funcs
12:45Chousukeif I have something I can do with (partial f a b) instead of #(f a b % %2) I will use partial. but that's pretty much it
12:45esji guess I'm just a kid with a new toy right now --- ooooh shiny
12:46Drakesonhow can I add a new method to an already loaded java class?
12:46chouserrhickey: any chance that macroexpand could respect :inline ?
12:47ChousukeDrakeson: is that even possible? /:
12:47technomancyDrakeson: that's not how Java works. =(
12:47technomancy(step 1: port your code to smalltalk...)
12:47Drakesontechnomancy: so, jvm does not support that?
12:47DrakesonI know "Java" does not allow that
12:48ChousukeI wonder if you can do it through reflection
12:48technomancyI've read a bit about interface injection in JDK7, so something like that may be possible in the future, (don't quote me on that) but not right now.
12:49Chousukeit might be possible, but it's not something the JVM is designed to do.
12:49ohpauleezYou could do it if you had the original class, you can hotswap
12:49ohpauleezand you could also do it if you were working in ObjC
12:49ohpauleezhaha
12:49avarushi
12:51Drakesonohpauleez: but there is no clojure for ObjC (nudge nudge :p )
12:51ohpauleez:)
12:53rhickeychouser: yes - could you put in a ticket please?
12:54chouseryessir!
12:54chousershould the ticket mention anything about &env or &form?
12:58RaynesI wroteded a macro. :)
12:58Raynesstuartsierra: This one actually works. :D
13:04noidiman, namespaced symbols (::foo) are a brilliant idea
13:05noidiis it taken from some other Lisp, or unique to Clojure?
13:11noidiafter about a year of messing with Clojure I'm still amazed at how well all the features fit together to form a whole that's greater than the parts :)
13:12patrkrisI'm trying to get `lein deps` to download clojure-contrib-1.1.0, but I'm not sure which version-string to use. Can anybody help? (Sorry if this message is a duplicate.)
13:12yasonnoidi: yeah, same here. Though I have the principle that I haven't learned a language until I find a few persistent gripes about it :)
13:15alexykchouser: do you remember how we sorted pairs by decreasing one key and another breaking ties? e.g.,
13:15chouseryason: here, you can use mine: http://paste.lisp.org/display/91391
13:15alexyk,(sort-by first > [[1 2][2 2][2 3]])
13:15clojurebot([2 2] [2 3] [1 2])
13:15noidiClojure's something like anti-C++... every time I think that, after 10 years, _now_ I know all the pitfalls, I find another new way in which the pieces of the language do _not_ work together :)
13:16alexykI need the second key to also be in decreasing order
13:16alexyki.e. [2 3][2 2]
13:16noidisorry, language gripes always bring C++ to my mind :P
13:17cemerickChousuke: yeah, it looks like pointfree really goes off the farm in a real use case. I can see it being really useful if I were doing more complicated maths, but the comprehension overhead is pretty high.
13:17chouseralexyk: I guess you need a more complicated comparator
13:18yasonchouser: especially number 2 boggles my mind, too
13:18yasonnoidi: you missed java, then? :)
13:18alexykchouser: ah, found your snippet! (sort-by (fn [[k v]] [(- (count v)) k]) coll)
13:18alexykI save them in treasured files :)
13:18chouserheh. I should do that.
13:19chouserI'm forever writing snippets then wanting them later and not finding them.
13:19rhickeychouser: is there an interaction between &env/&form and :inline?
13:19chouserrhickey: just changes to macroexapdn
13:19alexykchouser: IRC logs are great... but my snippets usually go into working code right away and then git, so kinda shoulda be there
13:19rhickeychouser: macroexpand hasn't yet changed as a result of them
13:20chouserrhickey: so perhaps a separate ticket is best. did you want macroexpand to take explicit &env/&form args?
13:20alexykchouser: rhickey: there was some doubt another day whether (-> ) consumes type hints for forms in the right order, has it been mulled over?
13:21rhickeymacroexpand won't need to change until there is a macro-let of some sort
13:21alexyk(-> #^TH1 form1 #^TH2 form2)
13:23chouseralexyk: I think the only problem may be that the hint is not used when there are no parens around the fn. I don't remember the order of the hints coming up.
13:24rhickeyonce there is macro-let, then a macro that itself does expansions will need to pass &env to macros it is expanding
13:24chouseroh, ok.
13:25rhickeythere was a ticket already for &env and &form
13:25rhickeybut defmacro needs doc update
13:28chouseris there a standard java object with a settable field?
13:28rhickeychouser: dunno about standard, but you can use clojure.lang.Box for experimentation
13:29rhickeyhas public field val
13:29chouserperfect, thanks.
13:33alexyk,(sort-by (fn [[x y]] [(- x) (- y)]) [[1 2][2 2][2 3]])
13:33clojurebot([2 3] [2 2] [1 2])
13:34alexykso (- x) is the unary minus?
13:35alexykapparently
13:35jasappis there something else it might be?
13:52noidiis there a library for hooks (like in emacs)?
13:54technomancynoidi: you wouldn't really need a library for that, just (doseq [h my-hook] (h))
13:54technomancysince clojure isn't a lisp-2
13:55noidiI just hoped that maybe contrib would have those couple of functions so I wouldnt have to write them myself :)
13:56noidiit wouldn't be the first time I've reimplemented something in contrib :P
13:58alexykin the chain of ->>, I need to do the last thing only if the sequence is not empty; what's a syntactically pleasing way?
13:59alexykthe problem is that max-key can't handle an empty seq
14:01ohpauleezalexyk: there's a piece in contrib
14:01ohpauleezto short circuit ->>
14:01ohpauleezon nulls
14:01alexykaha
14:01alexykwhere approximately?
14:01ohpauleezlet me find it for you, hang on
14:02ohpauleez-?> clojure.contrib.core maybe
14:03alexykok
14:03noiditechnomancy, okay, that was a whopping 3 lines of code: one for the hook atom, one for adding hooks, and one for calling them :D
14:03noidiso yeah, there's no library that could make that simpler
14:03ohpauleezalexyk: http://richhickey.github.com/clojure-contrib/core-api.html#clojure.contrib.core/-?%3E
14:05technomancysweet
14:05alexykthat's nice but I'm handling seqs; so my nil is []
14:06alexykI think max-key is buggy if it chokes on []
14:10jlongsterIs there any way to convert a keyword to a string? (:http => "http")
14:12noidialexyk, is #(when (not (= % [])) the-last-thing) too ugly?
14:12noidias the last item of your chain
14:12alexyknoidi: I did this: ((fn [s] (if (empty? s) [] (apply max-key first s))))
14:13alexykalmost the same; you can abbrev. (not (= )) to (not= )
14:13alexykbut I guess empty? is more explicit
14:14alexykjlongster: (name :keyword)
14:15jlongsteralexyk: thanks
14:17alexykis there a single-word test for (not (empty? ))
14:17alexykwe need clojurebot to yell at people not closing parens
14:18alexykhiredman: add a check, once in a while, to yell at non-closers :)
14:18samlin compojure, how can you write full html? (html [:html5 doctype])
14:20technomancyalexyk: then he would yell at sad people too. =(
14:20cemericksaml: take a look at enlive for html templating
14:21alexyktechnomancy: well, Stalin preferred to just shoot them; so yelling is OK :)
14:21samlcemerick: thanks
14:21alexykwell it should yell at the optimists too; at all unbalanced-paren people
14:22alexykor pick them randomly. smileys can be parsed out
14:22rhickey_alexyk: single-word test for not empty? == seq
14:22cemericksaml: you can use any templating engine you like BTW -- everything from string concatenation to jsps to stuff like enlive. The compojure handlers put no restrictions on you in that regard.
14:22alexykrhickey_: ah right! thx
14:24samlcemerick: cool. i'm new to java web development. i'll look at server faces
14:24cemericksaml: ouch, but OK ;-)
14:24avarusserver faces :O
14:24samlis it bad?
14:24cemerickpretty high up there on the pain scale, IMO
14:24samlhaha i see
14:25cemerickI <3 enlive. It's incredibly powerful, composable, perfectly integrated with the clojure programming model...
14:25avarus:)
14:26avarusclojure+jetty+compojure+enlive?
14:26clojurebotvimclojure is http://kotka.de/projects/clojure/vimclojure.html
14:26avarusclojure+jetty+compojure+enlive?
14:26clojurebotclojurebot is not a benchmarking platform
14:26avarus:!
14:29alexyknow I understand the old smileys I've seen long time ago, like ( : - ) -- I thought they symbolized happily bald folks, but they were from 'em lispers
14:31noidicemerick, wow, enlive looks awesome
14:31cemerickuh-huh
14:32cemerickIt could use about 2x documentation/tutorials -- everything is covered in what's in the readme, the selector syntax, and the wiki, but I suppose I need to have concepts pounded into my head from a bunch of different directions.
14:32cemerickThe source is small though, so one can definitely come to understand it thoroughly in a reasonable amount of time.
14:33noidiI've never seen a selector-based templating library before
14:33dnolennoidi: it's amazing
14:33cemerickI guess ruby got one recently as well. Not sure who got there first. Probably been around in obscurity for 5 years.
14:33ohpauleezcemerick: I second the enlive motion, totally enjoyable
14:34dnolenI've been working on a comprehensive tutorial but it'll probably take me a couple of weeks to finish it
14:34noidilike all great ideas, it seems awesome and so obvious in retrospect, that I bet everyone's kicking themselves now, saying "why didn't I think of that" :)
14:34cemerickdnolen: oh, nice. I finally came to understand clone-for last night, which I think completed the circle for me. I'm planning on writing that up, at the very least.
14:34dnolenI actually think enlive with a couple of helper macros would make it killer. I think it could put even the Django/Mako templating engines to shame. And I think those two are pretty nice.
14:36dnolennoidi: the most powerful thing is that you don't need to mix up code and markup. You can actually mix and match whatever the designer comes up with in HTML/CSS.
14:36noidiis it possible to combine enlive with xml-filter to fill out XML templates?
14:36cemerickThere needs to be some kind of auto-compositing option for the common case, I think.
14:36cemericknoidi: it's xml-resource, and yes
14:36cemerickI'm all xhtml over here
14:36dnolencemerick: I've been pondering that. one thing I came up with looks like this:
14:37noidioops, I meant zip-filter.xml
14:37noidibut okay, cool that XML works
14:37dnolen(templ foo "bar.html"), this automatically generates a template with mappings to all elements with CSS ids
14:37dnolenneed to think about how to deal with classes.
14:37dnolennoidi: enlive isn't ideal for xml yet, doesn't handle namespaces, tho I think cgrand has that on his todo list.
14:37chousernoidi: yeah, zip-filter.xml doesn't have much value in the face of enlive. I should quantify any remaining gap, help enlive fill it, and retire zip-filter.xml
14:38cemerickI never got that far -- right now, I have one template with the main scaffolding as input, which takes a single root node from a snippet as an arg, and merges the two.
14:38cemerickah, right, the namespaces issue
14:38noididnolen, that's what I found so brilliant. it's one step cleaner and more designer friendly than the attribute-based languages (<h1 template:content="$heading">...) and yet allows you to use a real programming language
14:39cemerickcgrand1: maybe you should go ahead and put 'templating' as the headliner in enlive's readme again :-)
14:59pdkfor the people who got the early access version of practical clojure do you think it's still worth keeping your preorder
15:01chouserpdk: is it possible to return it for a refund or something?
15:02pdknah i don't have the early access, i just preordered it a few weeks ago and found out it was delayed into may
15:02chouseroh, I see.
15:02pdkwhen i preordered it was set for feb 5 on amazon
15:02avarusand how much $$$?
15:03pdkguess programming clojure or something else is cheap enough to get that in the meantime and keep the preorder anyway
15:03pdkamazon's preorder discount puts it around $32 usd
15:03pdkfor practical clojure
15:03pdkand programming clojure is around $20 usd off there
15:03chouseryeah, they're having some truoble getting it written. http://tinyurl.com/yek8w4z
15:05avarussounds ... strange :)
15:06pdkseems a bit odd since that's dated far before this date change but hey
15:07pdki was initially unsure about programming clojure due to one amazon review and the fact that it probably wouldn't help for the new stuff in 1.0 and 1.1 but i guess there'd be no harm in going with one book in the meantime and keeping the preorder
15:07avarusthe pragmatic bookshelf book?
15:07chouserpdk: of course I personally recommend http://joyofclojure.com ...but the time scale of that may not work for you.
15:08pdkyes avarus
15:08avarusin fact I am starting to learn clojure and bought programming clojure
15:08avarushaven't started though :P
15:09avarusit's not wrong to read it, right?
15:10chouserHalloway's Programming Clojure is good.
15:10Chousukehm
15:10avarusk
15:10ChousukeI did git repack on an old repository and the size increased.
15:10chouserheh. oops.
15:10ChousukeI guess I should've run git gc instead
15:10ChousukeI think repack is just one of the tools that gc uses
15:11Chousuke... right. repack does not remove duplicates it seems :)
15:11pdki'm more wondering how much weight folks here would lend to the points in reviews like this http://www.amazon.com/review/RWA6CJKB9C79X/ref=cm_cr_pr_viewpnt#RWA6CJKB9C79X
15:11Chousukethat's better. down to 7.4 MB from 24
15:12Chousukegit-svn clones really balloon quite quickly :/
15:12the-kenny /url 1
15:12the-kennywhoops
15:14chouserpdk: that's interesting. I suspect that reviewer may be having a hard time remembering what it was like to not know lisp.
15:14hyp3rvigi1anti just read programming clojure last week...it's a good book. i recommend reading it, especially if you're new to clojure
15:14avarusfine :)
15:14chouserwhich is a common issue among people who know lisps.
15:14chouser:-)
15:14avarusI don't :P
15:15avarusmy life started with pascal :)
15:15avarusstill like it hee
15:15chouserI think for someone with background in ruby or python, Programming Clojure will do a good job of getting you from zero to something quickly and easily
15:15doublindirectionso I noticed that parallel.clj is deprecated, are there any alternatives?
15:16chouserdoublindirection: there's a 'par' branch of clojure
15:16avarusI also downloaded the peepcode video but it's far too fast for me :)
15:16avarusI also don't like this example project
15:17chouserthen to get you from "something" to really *getting* the language, I'd recommend Joy of Clojure. ;-)
15:17avarusif it's finished I really will take a look
15:17avarusalready bookmarked
15:19pdki came into it with some java/python/c++ background and at least elementary common lisp/c, i was figuring i'd use pcl or programming clojure to learn the parts of clojure specifically i didn't already know and refer back to acl/on lisp and such for more practice on the lisp mindset front
15:19pdki assume the halloway book would suit that purpose at least though it probably wouldn't cover new stuff since 1.0
15:19doublindirectionchouser: thanks
15:20doublindirectionchouser: the 'par' branch seems to be somewhat old
15:20avaruschouser: do you write the book or why are you recommending it? :)
15:20chouseravarus: yes, I'm co-writing it.
15:21pdkhm what sort of prior background are joy of clojure and clojure in action geared for
15:21avarusah, makes sense, chouser|chris houser :D
15:21chouserdoublindirection: yeah, hasn't been updated in a while.
15:22avarusinteresting :)...
15:22chouserpdk: I think clojure in action is meant for programmers with no lisp experience. joy of clojure might move a bit to fast at first for that -- some lisp or clojure background would help.
15:24pdki read through graham's acl at least if that counts as preparedness for gearing into a lisp mindset :p
15:25avaruscan one say that clojure is a simple language?
15:26hiredmanyes
15:26hiredmanthere are something like seven special forms, everything is built on top of that
15:27avarus:)
15:27ChousukeI don't think having few fundamental building blocks is enough to make a language simple.
15:27chouserI think that's McCarthy's lisp. Clojure has a few more for interop
15:27jasappI dunno, CL has something like 20, and it's anything but simple.
15:27hiredmanchouser: are you sure?
15:27Chousukeout of those seven special forms you could build a hideously complicated language.
15:28Chousukebut, as far as languages go, Clojure is definitely fairly simple.
15:29avarusand it's completely different to what I was used before
15:29Chousukethat it is :)
15:29chouser(. try catch new deftype reify case)
15:30hiredmanah right
15:30hiredmannew stuff
15:30ChousukeI don't consider deftype an interop form
15:31Chousukereify definitely is one, though :)
15:31chouserChousuke: yeah, maybe not. but it's built on its own special form.
15:32chouserand it's definitely about operating in a host environment that can do objecty things fast.
15:32Chousuke~def deftype
15:32chousercase is even less interop, but again about leveraging things the host vm can do fast.
15:33Chousukeit might be interesting to write a spec for Clojure
15:33Chousukebut quite a lot of work, too :P
15:34chouserI imagine there will be a compiler-emit protocol that will act as a sort of low-level spec.
15:34pdknah just be terse like the api docs
15:34pdkafter all they say r5rs was 50 pages :p
15:38hiredmanyou know, even with cinc, clojure depends on the asm library
15:38chouserand the jvm
15:39chouser...but only for the jvm. cinc on parrot will depend on parrot things, not asm or jvm.
15:39hiredmanchouser: it seems like the bits that are jvm calls would be much easier to replace then the library used to emit bytecode
15:41avaruswon't clojure stay with the jvm?
15:41avarusthat's one reason I want to learn it :)
15:41chousersure it will
15:41avarusphew :)
15:41chouseras long as the jvm is viable, clojure will be there.
15:41dnolenspeaking of Clojure and Objective-C it seems like projects like MacRuby have workarounds for the lack of the GC
15:42chouseravarus: but there are places where the jvm is not viable, and I want to write clojure there too.
15:42drewrhear hear
15:42avarusah I see
15:42dnolenaka iPad :P
15:42hiredman:(
15:42avaruswhich ipad? :P
15:42avarusthe fsc one or the apple one? :P
15:42hiredmanif I can't write clojure on it, why would I write clojure for it?
15:43chouserclient-side in browsers, on the iphone, for short-lived command-line scripts, in apps scriptable only with lua, etc.
15:43avarushttp://images.fixya.com/F/Fujitsu/177x150/22207168.JPG <-- fujitsu ipad
15:43hiredmanI want a n900 now
15:44chouserhiredman: :-)
15:44avarusI wanted it :)
15:44Hali_303question: how to deal with external java frameworks that use subclassing extensively? eg Swing or SWT
15:44avarusbut I wait for a thinner, lighter and better version :)
15:44hiredmanI figure if I save $5 a week it will be 2.6 years before I can buy one
15:44Hali_303the problem is, that when constructing the GUI, sometimes I need to override a method
15:44chouserHali_303: usually 'proxy' is sufficient.
15:45chouser~proxy
15:45clojurebotproxy is <Chouser> proxy teases with its ease of use, then suddenly betrays.
15:45chouserexcept for that little detail of course.
15:45Hali_303chouser: yes, if the GUI framework follows the listener pattern
15:45hiredmanHali_303: I would use those things as little as possible, extensive use of subclassing is bad design
15:45alexykeven with *print-length* set, I managed to call a fun with debugging output. Now I have a certain word being printed into the repl. Can it be stopped somehow without killing the repl?
15:45hiredmanHali_303: listeners are generally interfaces
15:45alexykand I meant a certain word 5 million times.
15:46Hali_303hiredman: yes, that is why proxy works, because I can create that and add it using the addListener style method
15:46alexykfortunately I run under screen and so can detach it and let it enjoy the buffer
15:46chouseralexyk: if you set up your repl with repl-utils set-break-thread!, then probably. otherwise, probably not.
15:46samlhey, I want to use proxy to implement Foo that has to provide .start() method. but i need to have member variables because .start() does not take any parameter
15:46Hali_303hiredman: however, many times I'd need to subclass a method (template method design pattern was used)
15:46ChousukeI think it would be cool to have Clojure running with LuaJIT or something
15:46alexykchouser: interesting -- how do I set that break?
15:46Chousukewould make it much more usable for scripting
15:46hiredmanlua is pretty neat
15:47hiredmanHali_303: "subclass a method"
15:47chouserhm... are a lot of people using "lein repl" to start their repls now?
15:47Chousukechouser: I am, actually!
15:48Chousukechouser: since my clj script is currently broken
15:48chouserheh
15:48hiredman:|
15:48Hali_303hiredman: that is a macro that expands into "subclass in order to override a method" :D
15:48dnolenlein repl is great.
15:48avaruschouser: I have a bash script "clj" that does java -jar clojure.jar
15:48chouserChousuke: does it load some file of user settings at startup?
15:48Chousukechouser: didn't check.
15:49chouseralexyk: (clojure.contrib.repl-utils/add-break-thread!)
15:49alexyka-ha
15:49hiredmanI just type ^R rlwrap and zsh fills in the rest of rlwrap java clojure.main
15:49Chousukechouser: it just runs clojure.main I think
15:49alexykso that will intercept Ctrl-C?
15:49chouseralexyk: right
15:50chouserhiredman: :-) I did that for a long time. bash, but still...
15:50chousersure
15:50chouseroops, wrong window
15:51alexyk100% of rlwrap -- it's so happy to get such a rare exercise
15:51chouserheh
15:52samlhow do you call super class method in proxy when you are overriding it?
15:52kotarak(doc proxy-super)
15:52clojurebot"([meth & args]); Use to call a superclass method in the body of a proxy method. Note, expansion captures 'this"
15:52alexykbtw, you can measure progress by rlwrap's memory usage
15:52samlkotarak: hanks
15:53jcromartiehow would I use _ args in defmacro?
15:53jcromartie_#?
15:53clojurebotmarg is 1
15:55kotarakjcromartie: exactly
15:55alexykhmm -- apparently screen's memory usage stays constant and rlwrap's goes up, when repl prints stuff.
15:55alexykalthough why would rlwrap need stuff not typed in, I dunnp
15:56alexykor it's the fact that java is running under rlwrap...
15:58LauJensenStill no sign of life from Ato ?
16:00alexykwell it finished! kids, use gnu screen
16:00alexykmy precious 26g of data is still there
16:00chouserheh. not bad.
16:01alexykchouser: so I can add-break-thread at any point, right?
16:01alexykon a running repl
16:01chouseryep
16:02chouserit'll store a reference to the thread you use to call it, and next time you hit ^C will stop that thread.
16:03alexyknice
16:04chouser(using deperacted and widely denounced Thread methods)
16:04alexykwhoever did that is a deity for my precious repl
16:04chouseralexyk: you're welcome. :-)
16:05alexykthx :)
16:05kotarakAh. Thread. Another glorious design example of "experience language designers".
16:05alexykprophets are often misunderstood in their times for their archaic ways
16:08alexykbtw warn-on-reflection has a field day with repl-utils :)
16:09chouserno doubt
16:09chousernone of that stuff as to be fast.
16:10chouserhas to be
16:11alexykok, time to test the Ctrl-C. What's the simplest way to fill your repl with crap?
16:12drewr,(repeat 0)
16:12chouser@(promise)
16:12clojurebotExecution Timed Out
16:12alexykI want to see output scroll like crazy
16:13drewr,(doseq [x (repeat 0)] (print x))
16:13hiredmandrewr: why would you do that?
16:13clojurebotExecution Timed Out
16:13chouserhehe
16:13kotarakhiredman: because alexyk wants "to see output scroll like crazy"
16:13alexykdrewr: (repeat 0) works in repl fine. Ctrl-C slays it! Yay!
16:14alexykand stuff is still there.
16:14alexyk(I tested with a cheaper repl)
16:14chouserheh
16:15alexykchouser: you should charge incanter customers extra for the bundled Ctrl-C intercept
16:15chouserincanter is for sale?
16:15alexykthey will know to need and pay for it! kidding :)
16:15chouser:-)
16:15alexykif it were, the repl-saver would be a product
16:15chouserheh
16:15jcromartieis it possible to get the actual arity involve in a "wrong number of args" exception?
16:16liebkechouser: umm, no :-)
16:16jcromartiealso can someone take a second look at this macro? http://gist.github.com/gists
16:17hiredmanI think you need to post the url of the actual gist first
16:17jcromartieoops
16:18alexykliebke: I haven't forgotten about bloggin', but the KDD deadlines are 2/{2,5} :)
16:18jcromartieI was too quick with the C-c
16:18jcromartiehttp://gist.github.com/289151
16:18liebkealexyk: blogging about mongodb? I got tired of waiting and blogged about it myself :-)
16:19hiredmanjcromartie: and what exception do you get?
16:19alexykliebke: aha! am gonna see! are you excited about it?
16:19liebkealexyk: good luck with the KDD submission
16:19liebkealexyk: it's awesome
16:19jcromartiehiredman: Caused by: java.lang.IllegalArgumentException: Wrong number of args passed to: user$eval--2200$fn--2202$fn
16:19jcromartiein the stack trace, I think that's the source
16:19liebkei blogged about it a while ago
16:19alexykthx! KDD is in Washington, not Paris, this year, so -- doubling the efforts! :)
16:19jcromartiefrom Agent$Action.doRun
16:20liebkeDC? I should go if it is
16:20alexykyep
16:20kotarakjcromartie: the anon fn you send-off has to take the state of the agent as argument
16:20jcromartieah I'm missing the arg for the agent itself
16:20jcromartieright
16:20liebkecool, that's where I am
16:20alexykliebke: I'll look you up then if there or visiting with the gov't!
16:21jcromartiethanks kotarak
16:21jcromartiehiredman
16:21kotarakjcromartie: np
16:21liebkealexyk: sounds good
16:21jcromartieAnd if anybody wants to critique that macro (now that it works) I would appreciate it
16:21jcromartiesame Gist http://gist.github.com/289151
16:22jcromartie(assuming atomic-spit is my own library function)
16:22jcromartieI feel like my indentation style is...lacking...
16:26chouserjcromartie: I'd recommend moving your watch fn out to its own defn
16:26jcromartiehmm, yeah, make it take all the necessary args
16:29jcromartieI'm not sure how I'd access the saver agent
16:31chouserhm.. could you use that instead of :save?
16:32jcromartieyeah, for some reason I thought the key needed to be a keyword
16:33jcromartieoh, and the path too. looks like a closure is the best way here
16:34chouseractually, if you used a syntax like this, you wouldn't need any macro at all (def foo (saved-ref "/tmp/foo" (ref {})))
16:34jcromartiethat's true
16:35avarusgood night :)
16:35jcromartieI don't know why I got it in my head that a macro was needed
16:36chouserjcromartie: well, to do any kind of def* generally requires a macro
16:36jcromartiea voice of sanity!
16:41jcromartiemuch better: http://gist.github.com/289151
16:42alexykhow do I totally obliterate a var?
16:42chouserns-unmap
16:42alexykkk
16:43chouserjcromartie: extra features even. :-)
16:44jcromartieyup, thanks for the head check
16:44chouserheh. sounds painful.
16:44jcromartieyeah I guess, in a hockey context
16:45chouseryou lost your send-off though
16:46alexykI usually compute results as seqs, e.g. res, and then evaluate it with (count res). Is there a fun which will do that and return the actual res?
16:46chouseralexyk: doall
16:46alexykah
16:47jcromartiechouser: now, is this is behaving the way I expect it to, and executing all of these send-offs in order?
16:47jcromartiebecause that's the important part
16:47jcromartie(send-off added in the most recent version) http://gist.github.com/289151
16:52chouserjcromartie: yes
16:52chouserwatches are call synchronously, so you can be sure that you're calling your send-offs in order
16:52chouserthe actions you send will be queued in order and executed in order.
16:53chousernone will be skipped, which might not be ideal for this case.
16:53jcromartieThe docs say that's the case for an agent, but this is a ref
16:53jcromartie"Note also that watch fns may be called from multiple threads simultaneously."
16:54chouserhm...
16:54jcromartieor am I misunderstanding that
16:54jcromartieIt kind of says both
16:54tomojdarn, my TA won't let me use clojure instead of java for homework
16:54jcromartie,(doc add-watch)
16:54clojurebot"([reference key fn]); Experimental. Adds a watch function to an agent/atom/var/ref reference. The watch fn must be a fn of 4 args: a key, the reference, its old-state, its new-state. Whenever the reference's state might have been changed, any registered watches will have their functions called. The watch fn will be called synchronously, on the agent's thread if an agent, before any pending sends if agent or ref. Note tha
16:54jcromartieoh
16:54tomojoh well
16:54chouserjcromartie: yeah, I see it.
16:56chouserI guess I don't know. :-/
16:56jcromartiewhere's rhickey when you need him
16:57chouserhm. I think you could solve that problem with the same solution as skipping unneeded writes.
16:57jcromartiehmm?
16:57chouseryou don't save old versions, right? just the latest?
16:57jcromartiejust the latest, yeah
16:57jcromartieI try to write to a temp file and then rename it to the final path
16:57jcromartie(which has its own issues)
16:57jcromartieI should really just use a freaking database
16:57jcromartiewhat's wrong with me
16:57chouserok, so your save-agent could do a flying read of the ref, writing out the lastest version
16:58chouserlatest.
16:58jcromartietrue
16:58chouserit could save as a value of the agent the last value it wrote.
16:58jcromartieah, brilliant
16:58chouserif the value of the ref = the value of the agent, don't bother writing
16:59jcromartie"brillant!"
16:59chouserthat way if your sends get out of order, no matter -- you write the latest. if the sends pile up fast, no matter you write the latest and skip the rest.
16:59jcromartiefantastic solution
17:00chouseror you could just use http://fleetdb.org/
17:00chouseroh wait, does that use json? hmph.
17:01chouserhm, that must not be the one I was thinking of.
17:05chouseror maybe that is what I was thinking of and just hadn't looked at it that closely yet.
17:05jcromartieworking nicely, thanks chouser
17:05chouserjcromartie: sure!
17:05jcromartiethere are all sorts of options for nosql
17:05jcromartieof course the default is to just go with rails and mysql
17:05jcromartiebut where's the fun in that?
17:05chouseryeah, I know. and we're writing yet another one at work. :-)
17:06jcromartietokyo cabinet is great but it's not concurrent
17:06jcromartiethat kind of makes it an odd choice for clojure
17:06jcromartiebut here I am synchronizing my writes
17:06jcromartieso...
17:07chouserjcromartie: it would be nice to add to your solution a tie-in to STM so your transaction doesn't commit until written to disk.
17:07jcromartiehmm
17:07chouserbut Clojure's STM doesn't support that kind of hook yet.
17:07chouserso as long as you don't need the D of ACID, you're all set.
17:11jcromartieyeah
17:21chouserrhickey: got time for a ref-watcher question?
17:21rhickeysure
17:22cemerickHrm. And I'm not. :-/
17:22chouserif a watch on a ref does a send-off with the value of the ref, are those agent actions guaranteed to be queued in order?
17:22chouser*sigh* sounds like fun. I'm trying to pull together something in Chicago, just so I can go. :-]
17:22rhickeychouser: yes, should be
17:23chouserok. the add-watch docstring says "watch fns may be called from multiple threads simultaneously" so I wasn't sure.
17:24chouserdoes that just mean if the watch fn is added to multiple reference objects?
17:24rhickeychouser: back up, in order relative to what?
17:24chouserin order relative to the commits on the ref
17:24rhickeyno
17:24chouserok
17:25jasapp~seen somnium
17:25clojurebotsomnium was last seen parting #clojure, 1279 minutes ago
17:25rhickeysends are only ever in order relative to thread of sender+agent, so multiple sends from the same watcher to the same agent will be in order
17:25chouseryes
17:25rhickeythat's the only promise
17:26chousersends from a watcher on an agent will be in the same order
17:26rhickeywhich is only a specific case of the general agent send order guarantee
17:26chouseryes, ok.
17:27chouserwell there, now you're all warmed up for the meet-up. :-)
17:28jcromartiethanks :)
17:29rhickeythanks for the warmup!
17:29chouserjcromartie: so, looks like you need your solution after all.
17:30chouserheh
17:33rhickeyPlenty
17:34cemerickoh my gawd, 'this' in javascript is painful to deal with
17:34jcromartiewhat's the idiomatic way to update a hash-map with a few kv pairs?
17:35technomancyjcromartie: assoc as long as nothing's nested
17:35jcromartieah right
17:36chouserjcromartie: or merge or conj
17:36jcromartieand (apply assoc m kvs) if I have something like (fn update [x & kvs])
17:36chouserdepends on the from of the kv pairs you want to update. oh 'into' is good to.
17:37jcromartieyeah
17:37jcromartieI think it will be a map coming in, actually
17:37chouseryes, from alternative key/vals, apply assoc is probably right.
17:37jcromartiebut if it's a map arg then into works
17:37jcromartie,(into {} {:foo :bar :bat :baz})
17:37clojurebot{:foo :bar, :bat :baz}
17:38chouseryes. and uses transients. :-)
17:38jcromartieinto is just conj applied, right?
17:38chouseryes
17:41abrenktechnomancy: Hi! Is it a bug or a feature that "lein install" does not install pom.xml in the local repository?
17:42technomancyabrenk: I just checked in a fix last night
17:42abrenktechnomancy: This way another local project does not pick up transitive dependencies if I don't copy it there myself. So it looks like a bug to me.
17:42technomancyit was a bug
17:42technomancyyup yup
17:42abrenktechnomancy: Ah! Should have pulled first. Still got the version from two days ago... :-(
17:43technomancyI hope to do a release soon
17:43rhickeychouser: I bet you could get a bunch of Clojurians together in Chicaco
17:43chouserI hope so.
17:43chouserI have a contact at ThoughtWorks for some space, and someone who has an (old?) clojure user's group email list.
17:44technomancywho wants to come to a Seattle clojure meeting?
17:44chouserMaybe I'm underestimating the number Clojurites in Fort Wayne...
17:44hiredmantechnomancy: I'll come
17:45technomancyhiredman: cool.
17:46technomancyI've talked to 3 or 4 others who would
17:46technomancymaybe a couple weeks from now?
17:46abrenktechnomancy: Now the poms there. Thanks to Rob for the quick fix! :-)
17:46hiredmansure
17:49alexykso -- there's -?> but not -?>> ; ?
17:49alexyktechnomancy: I wonder whether polyglot maven will overtake lein?
17:49alexykor perhaps lein can be fed to it
17:50technomancyalexyk: I have my doubts about whether software developed in secret can really take off
17:50technomancyon top of that there's just a lot of latent maven hate... I don't want to fight that fight.
17:51alexyktechnomancy: lein should come with a logo "maven inside" :)
17:51alexykthen harmony will follow :)
17:51chousertechnomancy: the faq is lovely
17:51technomancyalexyk: I've already had people tell me they ignored lein for a while just because they saw the word "maven" in the readme.
17:51technomancyit's like a visceral subconscious reaction
17:52neotykif you look at poliglot maven it is nearly same syntax
17:52technomancychouser: I had a lot of fun with that. =)
17:52neotykas leiningen
17:52alexykwell that's just silly. After reading the O'Reilly book for 2 days I saw that maven is OK and in fact meaningful. The obvious and simple way to do a repo; XML is now replaceable with YAML/DSLs. What's not to love?
17:52chouserI touched maven for the first time last night and find it's reputation fairly well-deserved.
17:52petrillialex - What release supports YAML? XML gives me the screaming heebie-jeebies.
17:53alexykchouser: it's just like Philadelphia. You have to live there for 2 years to start appreciating it.
17:53chouserheh
17:53abrenkAt least it's a start that everybody seems to be okay with the repository layout
17:53petrilliAn acquired taste? :)
17:53chouserI lived in Camden for 3 months. Does that count?
17:53alexykchouser: month for 3!
17:53neotykalexyk: no, after 3 years you are fed up again
17:53neotykat least for maven
17:53alexyk:)
17:53abrenkI can live with a couple of tools that all work with the same filesystem layout.
17:54chousergah, I cannot make sense of boost's docs or lack thereof
17:54alexykthe problem with maven you have to RTFM. Folks blame TFM.
17:54alexykor rather their lack of RTFM'ing.
17:54neotykfor sure documentation is not strong side
17:55alexykit's like blaming the down escalator for not taking you up while running up
17:55alexykneotyk: the book is fine
17:55petrillialex - I thnk it's the amount of documentation you have to read before it "makes sense".
17:55neotykbut it is oss so source is docs
17:55alexykbook! book. Too much usage, too much web.
17:55neotykalexyk: but it is a book
17:56neotykand what it takes for user after checkout srources is mvn install
17:56neotykwhy book
17:56alexykdunno, book's fine to me. Anteater on the cover. What else do you need? O'Reilly font instills confidence and transports meaning straight to brain.
17:56neotykor mvn jetty:run
17:57alexykchouser: why didn't you do O'Reilly btw?
17:57petrilliSo the ant eater injects knowledge into your brain directly? That sounds troubling.
17:57alexyknothing beats their typography
17:57petrilliI have a feeling I'm going to be upping my Safari bookshelf subscription to "unlimited"
17:57alexykpetrilli: if you put it like that, indeed. Then the Anteater would suck the remainder out probably instead.
17:57neotykI believe that people hate maven because they are forced to use it by theirs enterprise environments
17:58chouseralexyk: Manning came to me. If it weren't for them and Fogus, I wouldn't be writing a book at all.
17:58alexykchouser: ah ok. MEAP is aswesome. You'll see a fraction of my $$ soon :)
17:58petrillineo - And yet I hate Eclipse without trying :)
17:58chouseralexyk: great, thanks!
17:58alexykand I put it right onto the kidnle
17:58alexykkindle
17:58abrenkchouser: Any chance that that Manning is doing EPUB some time in the near future?
17:58alexykmy DX is full of MEAPs
17:59neotykpetrilli: who doesn't hate eclipse?
17:59chouserabrenk: I think you get epub when it's done.
17:59technomancyabrenk: was about to ask that; they're the only tech publisher I buy from that still makes me convert .pdfs to .mobis myself
17:59abrenkThe PDF isn't that great on my Sony reader.
17:59petrillineo - I'm forced to use Rational Software Architect at work, and it makes me miss regular Eclipse. And a drano martini.
17:59abrenkPragPub rocks format-wise.
17:59alexyklater...
17:59petrillialex - I have a few on my Kindle, but find searching/reference not quite what I'm looking for. Plus I've yet to master cut-and-paste to my Mac :)
18:00neotykHad to use Rational Rose long ago, happy to work in emacs recently :)
18:00abrenkAt least an epub for the finished book would be nice. Great to hear there's a chance.
18:00petrillineo - I tried Enclojure, but I find myself still using SLIME+swank-clojure
18:01chouserI don't remember where I saw that, but yeah, I think epub and mobi will be provided, though not for the MEAP.
18:01petrilliMEAP?
18:01neotykpetrilli: once you pop emacs+slime+swank-clojure you can't stop
18:01abrenkManning Early Access Program
18:01jcromartieindeed
18:01petrilliOh OK, is there a new Clojure book from them?
18:01jcromartiealthough I found that I don't see stdout when I'm running slime
18:01jcromartiewhat's up with that?
18:02petrilliThat and 25 years of Emacs wiring to my fingers.
18:02abrenkpetrilli: two, actually
18:02the-kennyjcromartie: It's in *inferior-lisp*
18:02jcromartieah
18:02the-kenny(the buffer)
18:02jcromartiethanks!
18:02the-kennythere is some var to redirect it
18:02petrilliabrenk - NICE! I
18:02abrenkpetrilli: mentioned on clojure.org including a discount coupon
18:03petrilliabrenk - grazie
18:04jcromartiecan someone explain the arg bindings to the defmethod on line 28 here? http://github.com/francoisdevlin/Full-Disclojure/blob/master/src/episode_007/episode_007.clj
18:04petrilliI have the O'Reilly book, which is pretty good, so I might pick up the MEAP for Clojure in Action, which seems to continue on futher
18:04the-kenny4/url 1
18:04the-kennywhoops again.. sorry
18:05AWizzArdesj and chouser: the idea of using a sorted-set to store (deftype User) instances for lookup by age does not work out. I can indeed first compare the age of the user, and in the case it is equal to another user compare the (unique) username. This indeed works to store all users. The problem is that the lookup does not work so well anymore then.
18:05chouserlookup by what?
18:05AWizzArdlookup by age
18:06chouserdid you consider using subseq for that?
18:06AWizzArdI would like to have a sorted collection into which i can all Users. They all should be sorted by age.
18:06AWizzArdchouser: yes, get and subseq
18:06abrenkpetrilli: aha! - it's the same book as from pragpub.com. didn't know oreilly publishes it also.
18:06AWizzArdbut I can not simply do (get users {:age 15}) to get all users that are 15
18:06petrilliabrenk - sorry, it's the pragpub one... I'm just old and forgetful, and have too many books on my desk
18:06AWizzArdI have to do (get users {:age 30 :username "chouser"})
18:07AWizzArdbecause the comparator also checks the username I need to provide one
18:07AWizzArdbut I don't have them when I want to ask who is 21
18:07chouserright. perhaps you want a sorted map of age to vector of people
18:08AWizzArda map or sorted map was my previous solution. The key is the age and the value is a set of the users that are as old as the key says
18:09AWizzArdbut when i then ask who is between 21 and 25 i first need to union 5 sets
18:09chouserthe right choice of data structure depends just as much on what kinds of questions and updates you're going to do as the data itself.
18:10AWizzArdyes
18:10chouseractually, maybe only the kinds of questions and updates.
18:10chouserif you want ranges of ages, subseq on a sorted set is probably best
18:10AWizzArdwould be perfect, only that many people could be 30 years old
18:10jcromartiewhat kind of multimethod dispatch value is [1]?
18:10chousersince looking up a single age will also return more than one resulte, that's actually the same question.
18:11AWizzArdbut the set can only hold one such person
18:11hiredman,(type [1])
18:11clojurebotclojure.lang.PersistentVector
18:11hiredman,(ancestors [1])
18:11clojurebotnil
18:11hiredman,(ancestors (type [1]))
18:11clojurebot#{clojure.lang.Sequential clojure.lang.IPersistentCollection clojure.lang.IMeta java.lang.Iterable clojure.lang.Associative clojure.lang.Obj clojure.lang.IEditableCollection clojure.lang.IFn clojure.lang.Seqable clojure.lang.Streamable java.util.List java.io.Serializable java.lang.Comparable java.lang.Runnable java.lang.Object clojure.lang.IPersistentVector clojure.lang.ILookup java.util.concurrent.Callable clojure.lang.I
18:11jcromartiewell yeah
18:12jcromartiebut I mean in the code here http://github.com/francoisdevlin/Full-Disclojure/blob/master/src/episode_007/episode_007.clj#L28
18:12jcromartieline 28
18:12jcromartieit doesn't make sense
18:12Chousukeit's [l]
18:12hiredmanthat is not [1]
18:12jcromartieah shoot
18:12AWizzArdchouser: a map with age as key and sets of users as values is probably the best solution for now
18:12hiredmanLong is the dispatch
18:12jcromartiewhat's wrong with me :)
18:12ChousukeI suggest you get a better font :)
18:12jcromartieyeah really
18:12AWizzArdotherwise I would have to implement a specialized datastructure
18:18chouserI really don't think so
18:19petrillithat'd be an optimization to consider once you figure out that it's not fast enough :)
18:19AWizzArdas long people are only between 0 and 120 years old it's fine
18:19jcromartieStructMaps seem to be hard to serialize/deserialize
18:20jcromartiehow would you write/read them again?
18:20AWizzArdbut when there are very very many keys it is not so nice
18:21AWizzArdI just thought there could be already some kind of magic tree in the JVM, even if mutable, which will keep its elements sorted and allow duplicates and fast access to subsets
18:22chouserAWizzArd: http://paste.lisp.org/display/94065
18:22chousersorry, typo on your nick
18:22chousergotta go
18:23hiredmanyou could always shove it into an sql database
18:25tomojwhat would you name my when-let-re macro which takes (when-let-re [[foo bar baz] regexp string] body) into (let [[match? foo bar baz] (re-matches regexp string)] (when match? body)) ?
18:26AWizzArdchouser: good that seems to work, thanks for your tip.
18:32vsteinIs = and hash the criteria for making keys in persistent map unique?
18:36AWizzArdI think that is the default
18:38vstein(let [a {:n (- (+ Integer/MAX_VALUE 1) 1)} b {:n Integer/MAX_VALUE}] (when (= a b) (when (= (hash a) (hash b)) (= {a :z} {b :z}))))
18:38vsteinreturns false
18:39tomojhmm, I wonder how to avoid (if-let [...] (if-let [...] foo bar) bar)
18:40tomojI guess all the functions in the second if-let can just return nil for nil and then (let [... ...] (if (and ... ...) foo bar))
18:50alexykis there a mean or avg fun in stdlib?
18:53alexykwhat's the real division, vs rational / ?
18:53AWizzArd,(double (/ 10 3))
18:53clojurebot3.333333333333333
18:53AWizzArd,(/ 10 3.0)
18:53clojurebot3.3333333333333335
18:54alexykah. .0
18:54chouservstein: very odd.
18:55chouseroh, duh.
18:55chouservstein: I was misreading your final expression
18:55vsteinchouser: Oh?
18:55AWizzArdvstein: try (identical? a b)
18:56chouservstein: numbers of different types may represent the same magnitude but not be .equal, and thus will not be the same as keys in a map
18:56vsteinAWizzard; Should not have to be identical? right
18:57chouser= generally does the right thing, but map keys cannot without violating the java.util.Map contract
18:57chouser,(get {(int 1) :a} (long 1))
18:57clojurebotnil
18:58chouser,(get {(long 1) :a} (long 1))
18:58clojurebot:a
18:58chouser,(= (int 1) (long 1))
18:58clojurebottrue
18:58vstein(when (= a b) ?
18:59chouser= is "better" than .equals. The java.util.Map contract is in terms of .equals
18:59chouser,(.equals (int 1) (long 1))
18:59clojurebotfalse
18:59AWizzArdchouser: http://paste.lisp.org/display/94065#1
19:00chouserAWizzArd: yes, those last two show that your set contains no people with :age 4 and no name.
19:01chouserif you want everyone of age 4, I showed you how to do that. >= 4 < 5
19:01AWizzArdyes, but why does >= {:age 4} work and include those users that have age 4?
19:02AWizzArdyour first example
19:02chouserthey are greater than {:age 4} according to person-key
19:02chouserbut not equal
19:02vsteinchouser: Oh yes, I see
19:02AWizzArd,(compare nil "abc")
19:02clojurebot-1
19:02AWizzArdokay
19:05AWizzArdGood tip with the juxt, I didn’t notice this function before.
19:10AWizzArdhttp://www.cpubenchmark.net/high_end_cpus.html
19:10AWizzArdoops, wrong window
19:27alexyksay I have a seq of pairs [k v], say spairs. I currently assemble them into a map with (->> spairs (apply concat) (apply hahs-map)). Is it fast or should a transient be faster, and which one?
19:27alexykhash-map, or sorted-map
19:28ctdeanYou could just do (reduce #(apply assoc %1 %2) {} pairs)
19:29alexykctdean: yep, or (reduce (fn [r [k v]] (assoc! r k v)) (transient {}) pairs)
19:30alexykthen ->> ... persistent!
19:33alexykapply is probably faster than destructuring there
19:33chouseror (into {} spairs) and it'll do transients for you
19:34alexykaha!
19:36ctdeanIf you are using plain into, make sure that each pair is a vector or a map entry.
19:47jcromartieis there any sort of idiom for saying "do any of the values for this list of keys in this map match this value"
19:48jcromartiesomething like (some #{(:foo x) (:bar x)} [y]) works
19:49jcromartiebut it's still a bit clumsy
19:51hiredman,(reduce #(some (partial = 1) ((apply juxt [:x :y :z :a]) %)) {:a 1 :b :c 3})
19:51clojurebot5
19:51hiredmanor
19:51hiredman,(#(some (partial = 1) ((apply juxt [:x :y :z :a]) %)) {:a 1 :b 2 :c 3})
19:52clojurebottrue
19:52hiredman,(#(some (partial = %2) ((apply juxt %3) %)) {:a 1 :b 2 :c 3} 1 [:x :y :z :a])
19:52clojurebottrue
19:53ctdeanhere's another
19:54ctdean,(includes? (vals (select-keys {:a 1 :b 2 :c 3} '(:x :y :z :a))) 1)
19:54clojurebotjava.lang.Exception: Unable to resolve symbol: includes? in this context
19:54ctdeanNeeds seq-utils
19:56jcromartieis there any good documentation on clojure.test?
19:56jcromartieis test-is exaclty the same?
19:56jcromartiebecause clojure.org only documents clojure.contrib.test-is
19:57tomojclojure.contrib.test-is is just the old name
19:58tomojit was included in clojure itself so changed to clojure.test
19:58jcromartieOk
19:58tomojI guess the docs are for 1.0.0
19:58jcromartiehmm
19:58tomojor pretty old anyway, it's been quite a while
19:58jcromartieIs there any sort of guide on unit testing in clojure?
19:58tomojhmm
19:59tomojI haven't found much myself
19:59tomojif you're using emacs maybe look into clojure-test-mode
19:59tomojbut as far as how to actually write the tests, I don't remember finding anything
19:59tomojI mean, besides what's in clojure/test.clj
20:00hiredmanjcromartie: what is wrong with http://richhickey.github.com/clojure/clojure.test-api.html
20:00tomojthe basic idea I think is to just break up your code into small (and, as much as possible, referentially transparent) functions and then write some is assertions on their return values
20:00hiredmanI got there by following the "API" link on clojure.org
20:01tomojI guess we can't do quickcheck without a type system, huh?
20:01tomojhmm, maybe we could with typehints/inference?
20:02tomojoh, someone already did it http://kotka.de/projects/clojure/clojurecheck.html
20:03jcromartiehiredman: the problem was I couldn't find it :)
20:03tomojvery old though it seems
20:03tomoj(and incomplete)
20:05jcromartiehiredman: I went down the clojure.contrib route
21:03jcromartieI have a bunch of indian programmers waiting for me to finish and some people assuming that I used Ruby on Rails and who will probably freak out when they find out I didn't
21:14jcromartieI'm feelin' it now though :)