#clojure logs

2010-01-21

00:26defnalexyk: why is macro a better nick
00:26defnalexyk: my nick is defn because my real life name is devin -- it's actually just a coincidence that clojure has defn
00:27alexykdefn: 'cause macro's beat defn's... ah ok :)
01:26woobyhello, i'm getting a strange exception (that i haven't seen in java) when importing quicktime libraries on OS X
01:26woobyhttp://paste.lisp.org/display/93677
01:27woobythanks in advance for any clues
01:31redalastorIs there a reason why dissoc-in doesn't exist or it was just forgotten?
01:38redalastorOk, found it in contrib. Why isn't it in core?
01:46hoeckwooby: maybe you have to instantiate some QuickTime class before even importing other classes
01:47woobyhoeck: i'm testing that now, i think i have to register an exception handler or something... not sure exactly how that's supposed to work
01:48hoeckwooby: I think, java loads classes on the first usage whereas clojure loads them (and runs static initializers) on :importing them
02:35LauJensenGood morning team !
03:42TheBusbythis may sound like a bizarre question, but what exactly is "-main" for?
03:43TheBusbyevidently it's not required to to compile to class files, and execution begins at the top of the file
03:47Chousuke-main is the function that corresponds to the main method of your class when gen-classing
03:48ChousukeIt looks a bit magical I guess, but the "-" is just the default method prefix of gen-class. It can be overridden.
03:53LauJensenTheBusby: When you compile an executable jar, -main will execute when calling java -jar my.jar
03:54TheBusbyI would expect it would be the enly thing executed though
03:55TheBusbyif you simple do $java helloworld.class though, it'll execute any line preceding -main's definition as well though
03:57LauJensenthough thats right, the jar execution relies on the manifest which points to a place to start, ie. -main
03:59TheBusbyjust not finding an easy way to have a single clj file execute as both a script and a compiled binary
04:02TheBusbythank you for the help though ;)
04:11vu3rdd,(doc identity)
04:11clojurebot"([x]); Returns its argument."
04:11vu3rddWhat exactly is the purpose of identity?
04:13greghto return its argument :)
04:13AWizzArdvu3rdd: when a function foo takes a function F as an argument to transform its other args, then identity can be a nice default for F.
04:14AWizzArdor if foos default is not f and you don't want to transform the other args then pass identity in
04:15AWizzArdor if some program part created a vector of values, where some can be nil or false, then identity can help to get all non-nil and non-false values
04:15AWizzArd,(filter identity [1 2 nil 3 4 5 false false nil nil nil 6 7 nil 8 9 false 10 false])
04:15clojurebot(1 2 3 4 5 6 7 8 9 10)
04:16vu3rddAWizzArd: thanks. I get it now.
04:19esjSalute, Parentherati.
05:19angermanI'm doing something like (let [acc (doseq [_ (range 10)] (ref [])) row-worker (fn [row] (dosync (doseq [i (range 10)] (alter (nth acc i) conj (nth row i)))
05:19angermanand the row-worker is then used to iterate over a resultset from a database. I'm having the very feeling, that what I did is pretty stupid
05:21angermanshould I be using transients?
05:23Chousukewhy are you not just building it functionally?
05:24angermanChousuke: how?
05:25angermanhmmm wait a sec
05:25Chousuke,(vec (for [i (range rows)] (reduce conj [] (range 5))))
05:25clojurebotjava.lang.Exception: Unable to resolve symbol: rows in this context
05:25Chousukeoops
05:25Chousuke,(vec (for [i (range 3)] (reduce conj [] (range 5))))
05:25clojurebot[[0 1 2 3 4] [0 1 2 3 4] [0 1 2 3 4]]
05:26ChousukeI don't see why you'd need a ref
05:26Chousukeyou *can* use transients, but write it without them first
05:27angermanHm. ok. can I reduce maps?
05:27Chousukeit's in many cases trivial to transform code using persistents to code that uses transients.
05:27Chousukeyeah
05:27Chousukethey appear as a seq of [key val] pairs
05:28angermanthe databse is returning something like {:a val1 :b val2 c: val3}
05:28Chousuketo reduce
05:28Chousuke,(seq {:a 'a :b 'b})
05:28clojurebot([:a a] [:b b])
05:28angermanand the end result should look like {:a [val1 ...] :b [val2 ...] :c [val3 ...])
05:29Chousukehm
05:29LauJensenI'm parsing a huge dataset and for each row I need to reject values that arent of a certain type. There are about 23000 types which I accept. Which lookup/datatype is most efficient for determining if I accept or reject the value?
05:30angermanLauJensen: Hashmap? (wild guess)
05:31LauJensenI don't think the hashmap matches vector for speed
05:31angermanwhat are your types? numeric?
05:31LauJensenStrings, but can be coerced to numerical
05:31Chousuke,(merge-with (fn [a b] (conj (if vector? a a [a]) b)) {:a 1 :b 2 :c 3} {:a 3 :b 5 :d 7})
05:31clojurebotjava.lang.Exception: Too many arguments to if
05:32Chousukeeh
05:32Chousuke,(merge-with (fn [a b] (conj (if (vector? a) a [a]) b)) {:a 1 :b 2 :c 3} {:a 3 :b 5 :d 7})
05:32clojurebot{:d 7, :a [1 3], :b [2 5], :c 3}
05:32Chousukethere's a caveat if your values are vectors though
05:32angermanChousuke: ha, you beat me to it, thanks.
05:32angermanChousuke: no, it's always :key -> double
05:33angermanI guess I could initialize a map with vectors
05:33angermanand skip the conditional check
05:33angermanLauJensen: that's why I asked. as for Strings, i think a hashmap is pretty good
05:34angermanand you'll have to compare each value at least once anyway.
05:34LauJensenI'm just thinking that hashmaps require me to double the amount of data, but these are just values, now they need a key as well. With a vector I can just dump the data and run through it
05:35Chousukeuse a set.
05:35Chousukeeveryone forgets about sets :)
05:35angerman(map (partial filter #(contains? keys %)) dataset)
05:35LauJensenah yes ofc
05:35LauJensena set is the way to go
05:35angermanhow do I tell paredit to comment something out?
05:36esj; ?
05:36LauJensen; !
05:37angermanwhen I hit ; it just moves the current line one line down
05:37angermanand inserts a ; where the curser was
05:43LauJensenWell, lets just say - There's a reason I don't use paredit
05:43angermanheh
05:44LauJensenif t is [[1 2] [3 4] [4 5]] and I want #{1 2 3 4 5} returned, is there an idiom for this
05:44LauJensen(reduce #(conj %1 (%2 0) (%2 1)) #{} t)
05:47janjan,(into #{} (apply concat [[1 2] [3 4] [4 5]]))
05:47clojurebot#{1 2 3 4 5}
05:47janjandunno if it is an idiom, but that's how I would say it
05:48LauJensenIts better anyway
05:48LauJensenThough reduce trumps apply in most cases
05:48janjanthe into #{} can be just 'set'
05:48janjani see now
06:04LauJensenNice, thanks jan
06:22janjan,(short-array [1 2 3])
06:22clojurebotjava.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Short
06:22janjanHow is creating short[]'s supposed to work?
06:24the-kennyjanjan: (short-array)?
06:24the-kenny,(doc short-array)
06:24clojurebot"([size-or-seq] [size init-val-or-seq]); Creates an array of shorts"
06:25janjanyea, but then java/clojure won't cast the numbers to shorts
06:28LauJensen,(short-array 5 (map short (range 5)))
06:28clojurebot#<short[] [S@1b548a>
06:29janjanLauJensen: just found out the same thing when you wrote it. Too bad the manual cast is needed
06:29LauJensensure sure :)
06:30janjanhmm, strange thing, that jvm. This works
06:30janjan,(int-array (into-array [1 2 3]))
06:30clojurebot#<int[] [I@137aefa>
06:30janjanand this requires a manual cast
06:30janjan,(short-array (into-array [1 2 3]))
06:30clojurebotjava.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Short
06:31LauJensenNot strange since Clojure seems to coerce numbers to Integers, so anything taking an Int will work, anything else will need a hint or cast
06:31janjanI say short-array already says I want a cast to shorts, just like (short 1)
06:33LauJensenSo you're wondering why reflection doesnt take care of this for you ?
06:37janjansort of
06:37janjan(short 1) casts the number to a short
06:37janjanso why shouldn't (short-array [1 2 3]) do the same?
06:38janjanIt's not like the vm has to protect the programmer from unwanted truncation in this case, he's explicitly asking for truncation
06:39LauJensenWell you see, the thing is... I dont know
06:40LauJensenI would expect it to cast automatically as well
06:40janjanguess I (or someone) should file a bug report + patch :)
06:40janjanbut not until after my class's deadline has passed
07:00LauJensenIs there really no group/group-by fn in core?
07:01LauJensen~source group-by
07:07Mec_Is there any sort of function similar to slurp for web urls?
07:07LauJensenyes, slurp*
07:07Mec_Is that in contrib?
07:08LauJensenyes sir, along side all the other I/O tricks in duck-streams I believe
07:08LauJensen~source slurp*
07:09Mec_Excellent, thanks
07:10LauJensennp
07:13lypanovman i luuuuurve joy of clojure
07:14Mec_what's the proper way to import contrib? its all very confusing
07:17LauJensen(use 'clojure.contrib.duck-streams)
07:17LauJensenIs one way - add :only slurp*) if thats all you want to import
07:18Mec_ah i was trying duck_streams
07:18LauJensenYes the - vs _ is one of the more annoying facets of the JVM
07:21jcromartieclojure makes me happy
07:23LauJensenThats nice :)
07:25jcromartiejust sayinh
07:25jcromartiealso it's early and I am likely to ramble
07:25jcromartieI might be sleep-typing
07:26LauJensenClojure ought to enforce a strict sleep schedule
07:26LauJensenGotta jet
07:27Mec_Are there any other IDEs for clojure? emacs is all sorts of painful on windows and netbeans is a bigger install than windows :x
07:27jcromartiehah hah, very true...
07:28jcromartieI really just use Emacs and a terminal on OS X. What distribution are you using to run it on Windows?
07:28jcromartieAquamacs, with increasing frequency.
07:28Mec_whatever is with clojurebox
07:28jcromartiehmm
07:28Mec_but it doesnt work right
07:28jcromartiewhat is giving you trouble?
07:30Mec_I suppose mostly I just need to redo some keybindings and I'm just putting it off. also meta-. sends me to the middle of a java file instead of source
07:38jcromartiehuh
07:38jcromartieso are there any guidelines on when to use (:foo x) and when to use (x :foo) ?
07:39jcromartieI think it's likely to be a source of confusion for others reading my code if I use both.
07:44Mec_Is there a slurp for binary data? just to output straight to a file, I dont need to do anything to it
07:46esjlau: is the clojureql on clojars your clojureql ?
07:50Mec_(doc slurp*)
07:50clojurebot"clojure.contrib.duck-streams/slurp*;[[f]]; Like clojure.core/slurp but opens f with reader."
07:50Mec_wups
07:57AWizzArdWhich type hint is preferrable? APersistentMap vs IPersistentMap
07:58rhickeyAWizzArd: always Ixxx vs Axxx, i.e. the interface
07:58AWizzArdok good, thanks
07:58rhickeyAxxxs are implementation details
08:02AWizzArdCan deftypes have a documentation string?
08:07ohpauleezAWizzArd: I believe so
08:08jcromartie,(doc deftype)
08:08clojurebot"clojure.contrib.types/deftype;[[type-tag constructor-name docstring? attr-map?] [type-tag constructor-name docstring? attr-map? constructor] [type-tag constructor-name docstring? attr-map? constructor deconstructor]]; Define a data type by a type tag (a namespace-qualified keyword) and a symbol naming the constructor function. Optionally, a constructor and a deconstructor function can be given as well, the defaults being
08:08jcromartieyup
08:08jcromartiewhen in doubt, doc
08:15AWizzArdyes, I just have an older version, and my docstring doesn't contain "docstring"
08:16AWizzArdIs Master now pretty much the most up-to-date branch?
08:20ohpauleezAWizzArd: I believe so, my master is showing a 1.2 snapshot
08:20ohpauleezand is "newer" than new according to the version string
08:22cemerickthe 'new' branch is defunct, last I knew
08:27ohpauleezthat's what i figured, thank you for the confirmation cemerick
08:34noidiI remember seeing a way of creating wrapper-fn:s for methods...
08:45chousernoidi: you may be thinking of memfn, but it doesn't really buy you anything over #(.foo %1 %2)
08:46rhickeywe should deprecate memfn
08:47chouserI noticed clojure.lang.Stream is still there
08:48noidichouser, yeah, and in this case I wanted to pass arguments from a seq to a constructor, so it wouldn't have helped me anyway
08:50noidiand (apply #(Vector3f. %1 %2 %3) vecseq) isn't that bad
08:51rhickeyhttps://www.assembla.com/spaces/clojure/tickets/247-Remove-clojure-lang-Stream-Streamable-and-all-uses
08:54chouserIt's a shame we haven't thought of a way to let the compiler do that for us that still allows for hinting if needed.
08:54chouserHmmm.. maybe ^{tags: int nil String} Vector3f.
08:54chouserer
08:55chouser^{:tags int nil String} Vector3f.
08:55chouser^[int nil String] Vector3f.
08:56rhickeythat's interesting
08:56rhickeyI wonder if sometimes people wouldn't want overloading to work, i.e. when mapping over heterogeneous types
08:57rhickeyvs nailing it down with a hint
08:57rhickeyno class name?
08:58chousersure, just like regular unhinted dynamic calls now, right?
08:58dabdHow should I name the following function http://paste.lisp.org/+20AC? 'match' or 'match?' If x is a collection it returns a string or nil, but if x is a string it returns a value. What are the Clojure conventions?
08:58dabd
08:58chouserrare but occasionally useful.
08:58dabdsorry I meant to say when x is a string returns a *boolean* value
08:58rhickeyMyClass/itsMethod
08:59chouserdabd: usually a ? means only true or false (or maybe nil) is ever returned.
08:59AWizzArdjcromartie: the (doc deftype) you did showed the doc for _contribs_ deftype, not for clojure.core/deftype
08:59jcromartieoh, foo
08:59jcromartiewhat the heck?
09:00chouserrhickey: I don't understand. You're not suggesting MyClass/itsMethod sometimes refer to an instance method, are you?
09:00dabdchouser: thx
09:00AWizzArdWhen I do (doc deftype) in 1.2 it still does not mention how a docstring can be added.
09:00rhickey(map aMethod ...) requires finding the method in all visible classes. We don't trudge around through classes like that up to this point
09:01rhickeyAClass/aMethod tells us it's a class member
09:01rhickeylookup will tell us it's a method
09:01rhickeynot inconflict with AClass/aStatic, just using a class as a namespace, as Java does
09:02chouseryou don't want (map .aMethod ...) to just generate a fn like (fn ([] (.aMethod)) ([a1] (.aMethod a1)) ([a1 a2] (.aMethod a1 a2)) ...) ?
09:02chouserthen no trudging
09:02rhickeyonly conflict is Java allows overloading of fields/methods/instance/static
09:03rhickeychouser: that fn would use reflection, no?
09:03rhickeyno known target type
09:03chouseryeah, maybe not ambigious to anything that knows the class well, but more ambiguous that Foo/bar is today for human readers
09:04chouseryes, reflection, unless they hint with ^[Foo], then you get (fn ... [^Foo a1, a2, a3] (.aMethod a1 a2 a3))
09:05rhickeychouser: then people will always be supplying at least the first hint (hints target)
09:05rhickeyand confucing I think to have vector of target and arg type hints combined
09:06chouserthe target and args themselves are combined already
09:06rhickey(map String/toUpper ["a" "b" "c"]) (map #^[String] .toUpper ["a" "b" "c"])
09:06rhickeychouser: not combined in the signature of the method, nor the docs
09:07chouserHm.
09:07chouserString/.toUpper ?
09:07chouserheh
09:08rhickeyI much prefer class as namespace, just need rules for (public) static trumps field trump method
09:08chouserok
09:10chouserI guess Foo/mem without parens today can only mean a static field, which is not so likely to be confused with an instance member usage.
09:11chouseryou're ok with #^[A B C] for hinting args? No way to hint the return value, but that shouldn't be needed if the args are fully hinted.
09:12chouserhm, and rarely useful in a HOF context anyway
09:12rhickeythinking about it, people would expect the same hint to work on .method calls, no?
09:13chouser#^[BigInteger] (.max #^BigInteger a b) ? goofy
09:13chouser#^[BigInteger] (BigInteger/max a b) ?
09:13rhickeywhat does that mean?
09:14chousertoday you'd say (.max #^BigInteger a #^BigInteger b)
09:16rhickey(.BigInteger/max a b)
09:16rhickeyBigInteger/max is not overloaded
09:21chouserhm! .BigInteger/max isn't bad
09:22chousercould use that for the un-paren as well. (map .BigInteger/max aseq bseq)
09:22rhickeyyes
09:23rhickeyand Classname. for ctor
09:23AWizzArdrhickey: is it possible to attach a docstring to deftypes, so that for example (deftype foo [a b c]), (doc foo) ==> prints the doc string
09:23chouserah, right -- no target to hint there
09:24rhickey(map #^[String] BigInteger. ["1" "2"])
09:25chouserperfect
09:25cemerickmaybe I don't have the backstory, but how is that better than (map #(BigInteger. #^String %) ["1" "2"]) ?
09:25chouserjust less ugly
09:26chouserand means that the common case looks like:
09:26chouser(map BigInteger. ["1" "2"])
09:26rhickeythat's reflective
09:26rhickeysince single arg ctor is overloaded
09:27chouserinstead of (map #(BigInteger. %) ["1" "2"])
09:27chouserright
09:27rhickeyI'm more interested in getting rid of reflection than more sugar
09:28chouserI go with whatever it takes to sell it to you. :-)
09:28rhickeywell, in this case it's a demerit, as yet another way to easily write something slow
09:29cemericklifting something like BigInteger. to a fn when it's not in function position is a little creepy on first blush
09:29chouserno slower than (map #(BigInteger. %) ["1" "2"])
09:29rhickeycemerick: people definitely have that expectation, esp for instance methods, and rightly so
09:29chouserand just as natural to add a hint to the slow version
09:29cemerickreally?
09:30chousercemerick: yep, it comes up pretty often here
09:30cemericke.g. (map .toString [1 2 3])?
09:30rhickeychouser: right, but another way, and one that remove the onus of thinking about the args
09:30rhickeyabsolutely
09:30chousercemerick: exactly
09:30AWizzArdWill there be a way to describe complex types, such as "this is a vector of strings"?
09:30rhickeyAWizzArd: no
09:32cemerickso (still getting my bearings) #^[String List] hints the args to the fn wrapping a named ctor or method following it?
09:32stuartsierraAWizzArd: you can add :doc metadata to the Var holding the type.
09:32stuartsierrae.g. (deftype #^{:doc "My type"} MyType [a b c])
09:33chousercemerick: that's the suggestion
09:33dabdI'm writing a mixed Java/Clojure application and I need to define some constants to be used on both sides. Would you rather define them as static string fields in a, say, Constants Java class or in a properties file?
09:34chousercemerick: the goal (for me) being a mechanism that allows you to start with something that allows HOF use of a method, and yet has a way to "tack on" hints as needed
09:34AWizzArdstuartsierra: ok
09:36stuartsierradabd: Won't make too much difference. Depends on whether you care about recompiling the .java file when the constants change.
09:37rhickeyI guess this could just participate in *warn-on-reflection*
09:37chouseroh, I would hope so.
09:41chouseryeah. postpone this.
09:41chouserwhat do we need -- volatile?
09:41cemerickchouser: but methods aren't functions, and I think it muddies the waters for them to so transparently be interchangeable
09:41rhickeyso, how about deftype and protocol-based compiler!
09:42chouseroh, right -- compiler doesn't need volatile
09:42cemerickrhickey: yeah, I figured that would be your #1 priority
09:42rhickeywould be excellent a la carte project to test detype/protocols.
09:42chouserI started poking at a tool to convert Compiler$FooExpr trees to maps of vectors
09:43AWizzArdyes, that would be an energetic project
09:43chouserjust a couple days ago. There's a bit more to do there, but that would help provide a basis for regression tests of a new compiler
09:44dabdstuartsierra: I will use Java code since I have the flexibility to define more complex constants (Arrays, etc) if I need to.
09:46rhickeyat least we now have the (newnew) compiler we need to port
09:46stuartsierrarhickey: I thought newnew became reify
09:47rhickeystuartsierra: yes, just using the codename
09:47chouserrhickey: you'd want deftypes instead of plain maps for Expr objects?
09:47rhickeychouser: yes, and protocols for the interfaces
09:48rhickeydeftypes mostly for the easy of inline protocol definition
09:48chouserhm. ok.
09:48rhickeywhy hm?
09:49chouserYou want 'emit' inlined in the deftypes? I guess I was hoping for some lexical separation there.
09:49rhickeychouser: needn't be, but without deftype you have no choice
09:50chouserbut I guess as long as I can extend my own emitJS or whatever, I don't need JVM bytecode to be lexically separated.
09:50chouserwell, I had multimethods. But yes, I'm not arguing against deftype at all.
09:50rhickeya critical thing about deftype is you can't write code that depends on the type any more than it would on a map
09:51rhickeyI anticipate emit will be split out. A big goal here is an intermediate AST coming out of analysis
09:51chouserright! users use the same syntax that 'extend' can hook.
09:52rhickeya deftype only defines fields/attributes, everything else is in the protocols
09:52chouserright, so I thought a conversion tool might help define that intermediate AST and allow porting of analysis and emit to happen independently, while being able to check for regression against the current version.
09:53rhickeyIt was a big part of deftype design that code consuming deftypes be no more rigid than that consuming maps
09:53chouserI guess I keep mentioning it because I'm hoping that if you think it's a waste of time you'll tell me.
09:53rhickeychouser: that may not be possible, to the extend we want to improve things in the new design
09:54rhickeye.g. no dynamic vars
09:54rhickeymore host independence
09:55chouserwell, this tool would run after the current analysis is complete, so could capture in persistent structs (deftype, whatever) the final value of dynamic vars.
09:55chouserI guess it does assume though that first pass of the ports don't actually change the semantics at all.
09:56rhickeyyeah, and whe it does, then what? like regression tests that need to change when the behavior spec changes
09:56rhickeylemme start a wiki page for brainstorming on the compiler
09:57chouserif first pass changes semantics, then yes this tool would be of limited usefulness, esp if the new analysis is producing data that can't be computed from values produced by the old analysis.
10:01rhickeyaarg I wish the assembla wiki did tab/shift-tab indent/outdent on lists
10:01chouserwhat web browser do you use?
10:02chousereh, nm
10:02rhickeysafari, but this embedded in Fluid, so opera engine I think
10:03cemerickassembla has a variety of UI issues, IMO
10:03rhickeyseriously this is the number one thing I need - a decent web outliner
10:04chouserI use itsalltext plugin for firefox so I can edit web forms in my favorite text editor, but it doesn't work on rich-text fields like this
10:04cemerickrhickey: if you're willing to step outside assembla for wikis, I'm sure the atlassian guys would be happy to host a confluence instance for you.
10:05cemerickTheir wiki editor is stellar.
10:05rhickeycemerick: I'm not sure confluence wiki is better
10:05rhickeycemerick: I disagree
10:05cemerickrhickey: compared to assemblas?
10:05cemerickit's the best I've ever used *shrug*
10:05rhickeyI've used it and had many list problems
10:06rhickeywikispaces is excellent
10:06rhickeygoogle docs does this aspect better
10:06cemerickv3.0 came with a brand-new wiki editor, perhaps you eval'ed 2.x
10:06rhickeycemerick: when was v3?
10:06cemerickI want to say September-ish?
10:07rhickeyyes, definitely was before that
10:07fogusThat sounds right
10:07cemerickLooks like June, 2009
10:08rhickeywell, if someone wants to research it...
10:08cemerickit's quite remarkable -- drag and drop of images into the editor, great fullscreen mode, nice table editing
10:09stuartsierraThat's all we need, a 6th web site.
10:09cemerickrhickey: what, getting a instance set up, or a comparison of it to X?
10:09rhickeystuartsierra: 6th?
10:09rhickeyI'd be totally happy if one free provider handled everything we need. I just don't see it
10:09AWizzArdOnly some days ago I discovered Project Kenai. This is something like github, BitBucket or Google code. It offers Mercurial, git and subversion repositories, a wiki, issue tracking (BugZilla or even Jira!), a forum, and so on. It's a Sun Microsystems website. http://www.kenai.com/
10:09stuartsierra1) clojure.org, 2) g. groups, 3) github, 4) google code, 5) assembla
10:10cemerickwell, 4 is defunct
10:10stuartsierraNo, 4 is the only place to download pre-packaged binaries.
10:10rhickeystuartsierra: I guess the idea would be atlassian would replace assembla
10:10AWizzArdAtlassian works together with Kenai, by offering Jira.
10:10rhickeyif github counted downloads I'd move them from google code to there
10:11cemerickrhickey: I have no idea what their github integration is like, FYI
10:11rhickeykenai always seems terribly slow when I looked at it
10:11cemerickI was only proposing them for confluence
10:11AWizzArdKenai still is not very fast, true.
10:12cemerickkenai makes me sad every time I go there. Reminds me of sourceforge.
10:12rhickeyyes
10:12AWizzArdDesign is not the best, and there are faster sites, but it is more complete than anything else, and Jira alone makes it more interesting than the competition.
10:12stuartsierraWhat none of these services allow you to do is "frame" their services under your own domain.
10:13AWizzArdyes, not so nice.. only googles Blogger can do that
10:13stuartsierraReally, all things Clojure should be under clojure.org.
10:13AWizzArdyes, that would be best
10:13stuartsierraBut the only way to do that now is to host everything yourself. I've been there, it's a burden.
10:13AWizzArdjira.clojure.org, blog.c.o, code.c.o, and so on
10:14stuartsierraEven hosting a public git repository is surprisingly hard, and it can't match github for end-user convenience.
10:14rhickeystuartsierra: what difference does "under" make? links that go to other domains don't matter much, do they?
10:14AWizzArdwould be one+ week of work to get everything up
10:14stuartsierrarhickey: Yes, I think they do. It's a matter of branding.
10:14rhickeyI guess unified menu
10:15stuartsierraAnd entry-points.
10:15stuartsierraIf someone lands on the Google Code page, they think that's the "official" project page. Same for github or assembla.
10:15stuartsierraYou can explain it to people over and over, but they'll still get it wrong.
10:15stuartsierraHeck, I can barely remember it.
10:15AWizzArdThe blog could stay at google and just be available under blog.clojure.org
10:15rhickeywell, github and assembla are providing a lot
10:16rhickeygc not so much
10:16stuartsierraYes, they are. So it's hard to move away from them.
10:16rhickeyggroups, a ton
10:16AWizzArdJira is free for open source, and many other Atlassian products as well
10:16fogusAtlassian has hosting services that could host most of the services under a common clojure.org hostname. Cost might be an issue
10:16rhickeyAWizzArd: self-hosting is a huge deal
10:17AWizzArdyes, I know.. I am in the process of starting my Clojure DB project and go through exactly those issues right now
10:17stuartsierraI just wish the services offered a *.yourdomain.com hosting option.
10:17rhickeyalso, the github phenomenon shows it's not just the tool, but the sense of place
10:17chouserggroups scares me. spam is managable right now, but it sounds like all spammers would have to do is try and they could crush us.
10:17stuartsierraRight, having a presence on github is important. Less so for Google Code, but still valuable.
10:17rhickeychouser: I;ve seen indications google is now trying to preemptively filter spam for ggroups rather than relying only on moderators
10:18AWizzArdgithub and bitbucket can always have the most recent versions of the code available
10:18chouseroh good. Maybe they'll fix it before the clever spammers decide to target us
10:18AWizzArdbut it would be nicer if clojure.org would be the host of everything clojure related
10:19stuartsierraI don't think there's a better solution right now. I just wish there were.
10:20rhickeyI don't see any solution being less than 3 parts - ggroups/github/assembla or their counterparts. Wikispaces could be folded in if one of them had a decent wiki and we could park domain.
10:20AWizzArdalthough.. does github allow to set your own cname?
10:21cemerickrhickey: I just shot an email off to atlassian. We'll see what they come up with.
10:21liebkeAWizzArd: yes
10:21rhickeyoh, and now build.clojure.org too
10:22rhickeyhudson hosting a whole other can of worms
10:22stuartsierrayes
10:22cemerickrhickey: In the meantime, if you're so inclined, you can run a trial instance and see how it works for you: http://www.atlassian.com/studio/
10:22AWizzArdWell, those Atlassian products are really damn good
10:22stuartsierraFound the old Sourceforge page, still points to Google Code as "current development"
10:23cemerickthat really should just get folded
10:26AWizzArd:-)
10:27AWizzArdIf we would setup everything ourselves then Jira, Confluence and other Apps would be free. Code could stay at github and just set the cname to something like code.clojure.org.
10:27stuartsierraAWizzArd: That's a lot of work.
10:29cemerickhosting a full stack like that would likely require a dedicated corporate sponsor, something beyond just a contribution of funds.
10:30AWizzArd50 Euro per month for a dedicated Core i7 quad core system with 8gb ram and 2x750 gb HD (raid 1)
10:30AWizzArdgoes with 100 mbit online
10:31cemerickthe hardware is nothing. Who's going to manage it?
10:31jkdufairdreamhost.com has free hosting for non-profits, fwiw
10:31cemerickugh
10:32AWizzArdI don't know if there will be so very much managing needed.
10:32jkdufaircrappy?
10:33cemerickjkdufair: yes, but that's not the point -- until someone is willing/able to commit to being the clojure IT admin, this is all moot.
10:33AWizzArdWith the repository still sitting at github+cname and the blog sitting at blogger+cname and probably the same for emails too it won't be soo much.
10:36AWizzArdif git, the blog and email won't be required, then I think jira and confluence could be installed and fine tuned within 3 days
10:37chouserinstallation is only the beginning of the pain.
10:38chouserevery time they find a security bug in some piece of included PHP, you must upgrade immediately
10:38AWizzArdwhich part would be running with php?
10:38cemerickchouser: actually, the nice thing about the atlassian stack is it's java, so the security issues are functionally nil.
10:38AWizzArdright
10:39chouserhm, so you're saying there are better web app products out there than wordpress?
10:39AWizzArdConfluence is not so bad
10:39cemerickbut that's besides the point -- self-hosting isn't really an option without a dedicated corporate "parent"
10:39cemerickchouser: well done, sir ;-)
10:40chouserheh
10:41cemerickI got owned so many times while running WP, I lost count.
10:41chouserdidn't know any better.
10:41chouserwhat I really want to do is spend my time writing a *good* blogging platform.
10:42cemerickchouser: I moved my blog over to confluence last fall. I've got, like, 20 extra hours a week now.
10:42chousersorry, too much sarcasm. will try to stop talking now.
10:42AWizzArdchouser: you can use Google Blogger and set the cname to your own domain.
10:43AWizzArdAnd well, if you have your own machine you can get Confluence for free: http://www.atlassian.com/software/confluence/
10:43AWizzArdfree for open source projects
10:43cemerickor $10 for < 10 users, IIRC
10:45AWizzArdcemerick: this is for commercial use
10:45cemerickyup
10:45cemerickit's the setup we have
10:45AWizzArdsame here :-)
10:45chouserI'm not sure if I'm an open source project or not.
10:45chouserseems a bit unlikely, really.
10:46AWizzArdchouser: visit http://www.blogger.com/signup.g and setup your cname and have your professional blog under blog.example.com
10:46chouserwe used blogger before. We didn't like it, though I don't remember why.
10:48AWizzArdAnyway, when github supports cname entries then it seems trivial to get http://git.clojure.org/ ready.
10:50AWizzArdand when we get a server then jira.clojure.org can be done within one day + a few days fine tuning, same for wiki.clojure.org
10:50AWizzArdAnd this does not seem to require very much administration
10:50fogusIf atlassian turns out to be useable, then confluence does have a news feature that can be used for blogging
10:52AWizzArdthe blog can go to http://blog.clojure.org/ today if rhickey sets this up in his domain account
10:52AWizzArdAnd people who visit http://clojure.blogspot.com/ will automatically be forwarded to blog.clojure.org
10:55cemerickfogus: that's what I use for my blog
10:56cemerickthe biggest issue with JIRA studio will be the git/github integration -- that is, it doesn't exist (yet)
10:56AWizzArdCan you please say more about this?
10:57cemerickfisheye and crucible got git support about a month ago, and I'm sure studio/github integration is in the works
10:57foguscemerick:Yeah, we use it on my project too. It's not fully-featured like most blog platforms, but it's good enough for the types of posts coming out of clojure.blogspot
10:57cemerickmy biggest issue with confluence is the handling of drafts, but that's a minor issue overall
10:57AWizzArdThough blogspot is not bad. And Rich could move it today to clojure.org if he wishes.
10:58defncool - autodoc has come to fruition
10:59lypanovfogus: fogus from joy of?
10:59foguslypanov: One and the same.
11:00lypanovfogus: man, the book rocks.
11:00defnfogus -- your website is awesome
11:03defnthe console mode is really cool
11:03foguslypanov: Thanks! Although it would rock very much less-so without chouser
11:04fogusdefn: That is a funny little thing. The code is available on the githubs if you want it. :-)
11:04lypanovfogus: already told chouser it rocked :D
11:05lypanovstill had to tell you though
11:05defnfogus: i would enjoy that very much :)
11:07fogusdefn: It runs only on Wordpress though
11:07defnfogus: cli2 is it?
11:07fogusyes
11:07chouserhuh, never tried blog.fogus.me in console mode ...doesn't seem to do anything here.
11:07defnfogus: *shrug* -- i think it's cool as hell
11:08chouserah! hehe
11:08foguschouser: It's horribly out of date, so browser compatibility is sketchy
11:08defnchouser: it even makes you hit [space] for MORE in long listings
11:09defnalthough im hung on ls /dev right now
11:09defnI tried C-c already, heh
11:09fogusdefn: which is why it's not my main mode. :-( There are .... some issues
11:11defnfogus: any word on when the next few chapters go up on MEAP?
11:12LauJensenfogus - Never seen that console page before, but I entered 'ls' and its been hanging ever since
11:13defnLauJensen: heh, same thing happened to me
11:15jkdufairwow. console mode is badass. written in clojure?
11:15jkdufairhelp
11:15chouserheh
11:15jkdufairhelp
11:16fogus:-( Oh well, it used to work properly. I should disable that link until I can get things fixed.
11:16jkdufairoh weird focus thing
11:16jkdufairsory
11:16fogusNah not written in Clojure. Javascript mostly
11:16defnfogus: i think it's great regardless, it's worth leaving it up
11:16defnno one seemed to notice it but me anyway :)
11:17defni think i personally broke your console mode
11:17defni hit ls, ls, read the output, typed ls /dev, hung, then i type ls again, and it hangs again
11:18fogusdefn: You can get back to the regular mode with startx
11:18defnlol yes, i figured that out earlier, i thought that was great
11:18defnalso enjoyed `hello`'s output
11:23angermanNote: When using postgresql and big tables, do _not_ randomly query the tables, try to organize your querys by table.
11:25angermanpainful lessen
11:32jasapp_angerman: why?
11:33angermanjasapp_: querying two different tables in a random fashon will result in lots of random IO.
11:34angermanas the big tables are usually accompanied with larger indices, the indices cache seems to be cleared to make room for the index on the other table.
11:35angermanand if your having slow random IO (a SSD might help here a little) it's painful.
11:35cemerickangerman: surely that's a configuration/deployment issue
11:35angermancemerick: sure it is, i never pretended it wasn't.
11:36cemerickangerman: ok, just checking :-)
11:36cemerickI know ø about postgres
11:36angermancemerick: but there are natural contrains, which for me is right now my macbook
11:36defnpolyglot can mean someone who knows more than one language, or programs which are valid in more than one language
11:36defninteresting
11:37defni also didn't know 'pidgin' was a real word.
11:38angermandefn: what's your native language_
11:38angermanpidgin used to be a word my english teacher used to tease us with.
11:38defnangerman: my native lang. is English. Am I writing that poorly? lol
11:39angermandefn: (blush) erm, no, was just checking givin' the pidgin line.
11:39defnAh I see
11:52lypanovpidgins are teh best.
11:53lypanovangerman: not all people are language geeks :P
11:54defni consider myself something of a language geek, but never had seen pidgin outside of the IM client
11:54lypanovhehe
11:54lypanovnat lang con lang or prog lang?
11:54chouserwe are talking about the bird, right?
11:55lypanovchouser: no.
11:55defnnat/prog
11:55defnive been studying a little chinese (mandarin)
11:55defnclojure for breakfast, java for dinner (for interop purposes only ;)
11:56chouseroh, like Pidgin English.
11:56lypanovaka, english.
11:56lypanov:))
11:56chouserI hadn't picked up on the difference in spelling
11:56defnthere are a few different takes on pidgin
11:57chouserI heard some Pidgin English as a kid and hadn't thought to look into spelling differences of the word.
11:57defnwhat is pidgin english?
11:57chouseryay I learned something today.
11:57defnlike a simplified english?
11:57defnA pidgin is a simplified language. Pidgins usually develop because two groups of people need to talk to each other but do not speak the same language.[1][2] Pidgins are not usually as complicated as many other languages.[3]
11:57fogusi thought we were talking about the chat client. :-(
11:58defnfogus: you started this whole mess
11:58defni looked up polyglot and then got to pidgin
11:58defndue to your repo name
11:58lypanov(and its *all* LauJensen's fault)
11:58chouserlypanov: ha
11:58lypanovwell, and mr hickey for being smart and stuff.
11:58cemerickI can *never* remember that keys in an :or map are bare symbols.
11:59defnI can't quit seeing *splats* as globals
11:59defnthat's not the correct terminology is it?
12:00lypanovdeconblabla
12:00chouserthey're as global as anything gets in clojure
12:00chouserI like *earmuffs*
12:00defnoh right
12:00defnwhat about (def OMG 4)
12:00defnis that equiv to ,*earmuffs*,
12:01chouserearmuffs usually indicate you're expected to using 'binding' on it
12:02defnso they behave differently, or is it just idiomatic?
12:02chouserjust a naming convention
12:02defnah ok
12:03defnchouser: any word on Ch.5->* for JoC?
12:04chouserdefn: the next chapter is written but has a lot of editing in its future before it hits MEAP.
12:05chouserchapters 1-4 are getting shrunk to 3 chapters and may contain some new material, but that needs editing before MEAP too.
12:07defnchouser: want help editing? ;)
12:07cemerickI'll bet there's an interesting backstory as to why manning has two clojure books in process.
12:08defnthe first one has a lot of negative comments
12:09chouserdefn: thanks but Manning has someone they trust for that. :-)
12:09technomancydefn: it struck me as pretty sloppy at points. maybe just needs a good scrubbing by a knowledgeable technical editor
12:10defntechnomancy: i hadnt heard about it until I saw JoC on ycombinator
12:10foguscemerick: You're likely correct
12:10defnI read the reviews and the first chapter and wasn't impressed, but you might be right
12:10cemerickfogus: says one of the few people who probably knows ;-)
12:11foguscemerick: If you're ever in the DC area I'll buy you a drink and tell you the story... ok, maybe a few drinks
12:11defnok gents -- off I go. have fn.
12:13ohpauleezhas there been any talk to do some sort of Clojure conference this year
12:13ohpauleezhowever small or independent it may be
12:13technomancyyeah, only we'd call it a conj instead of a conf
12:13ohpauleezhaha
12:13ohpauleezzing
12:13Ashmy other car is a cdr
12:14ohpauleezawesome
12:14rhickeyhttps://www.assembla.com/wiki/show/clojure/Clojure_Compiler_in_Clojure
12:14technomancyseriously though, after ICFP we might try to put something together
12:15ohpauleezthat sounds good to me, I'd be down for helping out or trying to solicit some funds for it
12:18AWizzArdrhickey: thanks for setting this up, it seems like interesting times are coming, again
12:18ohpauleezI'm totally pumped for cinc
12:20chouserme too!
12:20chouserperhaps irrationally so, but there it is.
12:20dabdI have some multimethods that update a map passed to them via an atom. Is there a functional way to do this? I was looking at the accumulators from clojure-conntrib but I don't understand if they can be used for this purpose.
12:21chouserdabd: can they not return an updated map?
12:21rhickeychouser: I don't want to call this cinc, as that is a more ambitious idea (replacing Java). This is a first step, replacing the compiler with one written in Clojure
12:22LauJensenlypanov: Please send me an email once you have a good grasp of Arch and are comfortable in your new shiny IDE, then I'll remove you from the /ignore list :D
12:22rhickeyfull cinc requires a lot of thinking about bootstrapping that I have not yet done
12:22chousersure. still exciting to me. still not entirely sure why. :-)
12:22rhickeyit is exciting, this alone will ease other targets, get more people involved in things that require compiler enhancements, broadedn the understanding of the compiler, enable tools etc
12:23technomancyit will get us out of this "nobody wants to work on a compiler that's going away" slump too, which is important.
12:23LauJensenrhickey: How is this connected with compiler speeds/optimizations?
12:23rhickeyLauJensen: who said it was?
12:24AWizzArdWhen it is written in Clojure, will it be called Compilejure then? ;)
12:24LauJensenNobody - But I have some hopes that the compiler will be speedier in the future, so Im just curious
12:25ChousukeLauJensen: probably through what technomancy said
12:26ohpauleezIf people feel compelled, I'm sure they could take pieces of the work done in PyPy and attempt to move it cinc. The goals and architectures are different, but some ideas translate
12:27rhickeytechnomancy: was that really happening? I thought it was more of - nobody wants to write Java/nobody understands Rich's Java :)
12:28technomancyrhickey: maybe I've been using it as an excuse to cover up the fact that I'm not man enough to dive in and get my hands dirty. =)
12:28LauJensenrhickey: any approximation of how many hours you put into it?
12:29AWizzArdrhickey: true, and your experience will be extremly important for that transition. But it's the destiny of most software to undergo an evolution.
12:30rhickeyAWizzArd: I have no problem with that
12:35fogusAt the first DC clojure group there were many who were adamantly against cinc I was not able to pull the precise reasons out of them.
12:36hiredmanhuh
12:36dabdchouser: the caller of the multimethods needs to resulting updated map
12:36fogus... besides "fragmentation" "big mistake"
12:36ohpauleezfogus: I'd like to hear them, I can't think of any
12:36hiredmanfragmentation?
12:36hiredmanlike cinc as a fork?
12:36rhickeyfogus: as if cinc was just about different target hosts?
12:38fogusrhickey: Granted, it was only a few who voiced those views, but yes, I gathered that they felt it was limited to targeting hosts
12:38fogusAnd I did a poor job of convincing them otherwise I suppose
12:40dabdchouser: http://paste.lisp.org/+20AN I'm passing not the atom explicitly but a closure that updates the map 'vals-fn'. Is there a better way to do this?
12:40fogushiredman: yes. forking
12:43rhickeyIn many ways, the idea of cinc alone has already accomplished the biggest result possible. By working through the question "what facilities did I need to write Clojure, and to support its abstractions, and are they present in Clojure itself?", we are adding those features, and all future Clojure programs will benefit.
12:45fogusrhickey: The consensus among the detractors tended toward a view that introp and multiple platforms are XOR
12:45rhickeythere are many steps short of fully bootstrapped cinc that are interesting and useful - the compiler written in Clojure itself, moving the abstractions to protocols, new data structures written in Clojure
12:45rhickeyfogus: that is absolutely true, and as designed
12:46rhickeypeople presume that targeting multiple hosts implies full portability between hosts - that was never true nor an objective
12:46LauJensenrhickey: How much do you see going into a bootstrap at present?
12:47fogusrhickey: Understood. My only point is that it was viewed as a downside. Try as I might, I was unable to convince them otherwise.
12:47rhickey(rather, attempting full portability)
12:47ChousukeOnce you have all the abstractions that Clojure needs to describe itself, it should become feasible to have a subset of "pure" Clojure that is usable and independent of any host interop, though.
12:48rhickeyChousuke: certainly, and a good sized one
12:48hiredmanfib programs will be cross platform
12:48hiredman:P
12:48rhickeyas a consultant targeting Java and .Net, it is really nice not to have to switch languages, even though you might switch frameworks
12:49rhickeyjust as you might switch frameworks in an all-Java shop
12:49ChousukeExceptions are one thing that are still rather tied to the JVM, but you could use port error-kit to different hosts I guess :P
12:49Chousuke-use
12:50rhickeyMost hosts have exceptions
12:51Raynes(())
12:51rhickeyhiredman: ah, fib
13:06RaynesWhy is Clojure so awesome?
13:07the-kennyBecause it's a lisp
13:07the-kenny:)
13:08RaynesBecause rhickey is the creator.
13:08RaynesAnd he isn't a mindless Lisp purist.
13:10LauJensenRaynes: I think thats an oxymoron
13:11RaynesLauJensen: How would I go about forcefully deleting an unmatched parenthesis in paredit? :>
13:11LauJensenC-x q IIRC
13:11LauJensenBut you might have to ask one of the guys who actually use it
13:11LauJensenI found it horribly annoying
13:11RaynesLauJensen: I can highlight + backspace to delete it, but that is annoying.
13:12RaynesIt's C-q you were thinking of, but that doesn't work with deletions it seems.
13:12RaynesIt's a little annoying at times, but it keeps me safe in the jungle at night.
13:12the-kennyDel works for me
13:12the-kennye.g. backwards deleting
13:13the-kennyMaybe it's a bug here
13:13the-kennybut it's a useful bug
13:13Raynesthe-kenny: Del completely disregards the parenthesis and goes behind it.
13:13the-kennyRaynes: Heh, then it's a bug on my system
13:14Raynesthe-kenny: I want your bugs. :(
13:15ChousukeRaynes: you can use C-q to insert a matching parenthesis
13:15Chousukethen delete
13:15stuartsierraI use C-SPACE to select, then C-w to delete
13:16RaynesThe most annoying thing about paredit IMO is the fact that if you need to wrap something in parens, you have to C-LEFT inside of empty parens, and it leaves a space at the beginning so you have to move forward once and then backspace.
13:16Raynes:(
13:17technomancyRaynes: C-u backspace
13:17stuartsierraRaynes: try M-( on the thing you want to wrap
13:17the-kennyYes, M-( wraps things inside parens
13:17the-kennyIf you want to wrap multiple sexps, put them in a region before M-(
13:18stuartsierrathe-kenny: ooh, didn't know that trick
13:18RaynesI usually just barf, but M-( will get rid of the space problem.
13:18Raynestechnomancy: Awesome.
13:18Raynestechnomancy: What does C-u mean?
13:18technomancyactually if the region is active you don't need M-(, just ( will do it
13:18technomancyRaynes: "prefix arg"
13:19the-kennytechnomancy: Oh, cool
13:19technomancyit's like alternate-fire in a 3D shooter.
13:19RaynesNeat.
13:19stuartsierrathe-kenny: M-( on a region doesn't work for me
13:19stuartsierrabut C-u 4 M-( wraps the next 4 exprs
13:19technomancynice
13:23angermancan I somehow figure out what my java process is doing right now?
13:24lypanovoh. LauJensen hates me now *sad*
13:24LauJensenhaha, ofc not
13:25lypanovactually its probably a good idea for me to disappear anyway till i've finished joy of and the various videos
13:25AWizzArdangerman: http://java.sun.com/javase/6/docs/api/java/lang/Thread.html may have something for you, or http://java.sun.com/javase/6/docs/api/java/lang/System.html
13:25lypanovLauJensen: ;) :D
13:26angermanAWizzArd: there must be something fishy going on though. jvisualvm just froze
13:26LauJensenNot on my account, this is the place to be for questions
13:26lypanovLauJensen: tbh. i'd forgotten how much time reading irc can take, so while i know its a joke, i will go poof for a week or two :)
13:26LauJensenAlright - Enjoy
13:27LauJensenKeep an eye on my blog if you like, I hope I get something up before too long
13:28angermanok, something is _severly_ broken
13:30angermanException in thread "Attach Listener" java.lang.reflect.InvocationTargetException ... hmmm I seee
13:40Raynesangerman: You can ask it very nicely.
13:40Raynes:)
13:40Rayneslypanov: Have you bought me a copy of Joy yet? Let me know when you get around to it. ;)
13:41lypanovheh.
13:41lypanovgo grab in action and we can swap every once in a while.
13:41lypanovin action in $10 today.
13:41lypanov;)
13:43LauJensenOne thing I don't understand about "Joy of Clojure", is how did Fogus ever let himself get talked into only having Chousers picture on the cover?
13:44lypanovLOL
13:44the-kennyhaha
13:44technomancyhopefully when O'Reilly decides to publish a Clojure book it will have a Pirhanamoose on the cover: http://wondermark.com/495/
13:44the-kennyWe should tell clojurebot who is on the cover of joy of clojure :)
13:45the-kennytechnomancy: If I remember right, the git book didn't have a octocat on its cover :(
13:46astoddardI am trying out clojure-1.1.0-par-SNAPSHOT.jar on java 1.6.0_18 do I need or should I use the jsr166y.jar that Rick Hickey put on github?
13:46rhickeyastoddard: yes, you will need that
13:49astoddardrhickey: Thank you. On what machine spec did pvmap rock? (http://paste.lisp.org/display/84027). I am currently seeing pvmap slower than map on a 4 core machine.
13:52the-kennyAnyone who can buy Joy of Clojure (pdf version) for me? I can't use a credit card because I don't own one, and if I want to use Paypal, it forces me to use a credit card too.
13:52rhickeyastoddard: quad-core mac pro
13:53technomancyanyone else getting null pointers when running JMX tests for contrib?
13:54angermanWhat am I doing wrong with the transients? http://gist.github.com/283066
13:54hiredmanwihtout looking: you are bashing them in place
13:54hiredmanand I am wrong
13:54angermanhiredman: O_O
13:55technomancyshame; would have been a great tie-in to my latest blog post
13:55astoddardrhickey: Any reason to think pvmap would be slower today than six months ago? Maybe I just don't have the hardware to take advantage of it yet. (On that one benchmark of course).
13:55hiredmanangerman: maybe you have a partial application or something lazy that isn't realized until it is used on another threa
13:56ohpauleezthat's sort of what it looks like to me
13:56ohpauleezI have run into issues where I was trying to use transients where the recursion and calls were not sitting local
13:56angermanhiredman: Hm.
13:56ohpauleezand once I isolated down, it worked
13:57angermanthe items generator is lazy...
13:57technomancyangerman: that's quite strange; I can't see any place where multiple threads even begin to come into play.
13:58angermantechnomancy: me neither.
13:58ohpauleezangerman: it may or may not help: http://www.pauldee.org/euler1.clj
13:58angermanok, let's see if it's swank that biting me
13:58technomancyangerman: I was going to say, possibly slime threads
13:58technomancytry in an rlwrap repl
13:58ohpauleeztechnomancy: is there any real advantage of rlwrap over Jline?
13:59technomancyohpauleez: it provides all of readline
13:59technomancyjline only gives you like half of the bindings
13:59ohpauleezahhh gotcha, thanks
13:59angermanwow.
13:59Chousukeyou have some redundant partials there I think
13:59angermanok. was slime
13:59technomancyangerman: but it shouldn't be forced at print time since you've got a doall there...
14:00technomancyoh, except perhaps the doall is only forcing the outer lazy seq?
14:00technomancynot sure
14:00angermanhmm 500ms vs. 300ms
14:01Chousuke(apply (p merge-with conj head) (items)) is equal to (apply merge-with conj head (items))
14:02angermanChousuke: thanks. I didn't know that
14:02angermanshould I make the map transient too?
14:04Chousukehmmh
14:04Chousukedo you have no way of merging the vectors before you add them to the map final map?
14:05angermanChousuke: they come in as rows from the database.
14:05angermanit's like I want to select the columns of the resultset
14:05rhickeyastoddard: still works here. You should wrap each of those in a (dotimes [_ 10] (time ...)), since one run might encounter a longer GC puase
14:07angermanChousuke: do you see what I mean?
14:07Chousukehmmh
14:07Chousukeyeah
14:08Chousukeyou could make the map transient I guess but that'll complicate the code a fair bit :/
14:10ChousukeOr maybe you could just write a merge-with that uses transients internally.
14:10angerman~merge-with
14:11angerman,~merge-with
14:11clojurebotjava.lang.IllegalStateException: Var clojure.core/unquote is unbound.
14:17angermanhmm reduce doesn't work with transients
14:17mjt0229Is the correct place for namespace metadata the following: (ns #^{author: me} mynamespace)?
14:18chouserangerman: sure it does
14:18angermanchouser: hmm. ok. *poke code(
14:19chouser,(persistent! (reduce conj! (transient [:a :b]) (range 5)))
14:19clojurebot[:a :b 0 1 2 3 4]
14:19mjt0229ah, yes, that seems to bet he case.
14:23stuartsierra~reader macros
14:25Chousukemjt0229: yes, though it's :author :P
14:25astoddardrhichey: you are quite right. It was a oneoff GC or other JVM issue. It works fine for me too with the dotimes.
14:25astoddardThanks for the help.
14:26mjt0229Chousuke: Yeah, I found it in the clojure source. I was checking because I noticed that in the clojure eclipse plugin, if you run a file that has metadata in the namespace, it doesn't start the repl in that namespace.
14:34zakwilson_I just set up a new machine and I'm having trouble with Clojure on Slime. Function calls typed at the REPL aren't being evaluated.
14:35jkdufairzakwilson_: what platform?
14:35angermanusing transients doesn't seem to be a good idea on this.
14:35zakwilson_jkdufair: Ubuntu 9.10 amd64, Gnu Emacs 23
14:36chouserangerman: why's that?
14:36zakwilson_And Clojure 1.1
14:36jkdufairzakwilson_: ah ok. i found clojure box for win32 and am loving it. not aware of a linux equivalent currently
14:36technomancyzakwilson_: how'd you install?
14:37angermanchouser: I'm trying to merge lots of maps of the kind {:a <double> :b <double> .... :t <double>} into {:a [<double> ...] .... :t [<double> ...]}
14:37technomancyand how did you launch slime
14:37zakwilson_technomancy: How'd I install what?
14:37slyruszakwilson_: are you using the current SLIME head? that won't work
14:37angermanchouser: makeing the innter vectors transient speeds it up a little.
14:38technomancyzakwilson_: how did you install swank-clojure/slime? the best way is to use elpa as documented in http://github.com/technomancy/swank-clojure
14:38slyruszakwilson_: or just checkout commit 3b3f604c396f0c5ceb8bc5a13fa41061bcc96184 or earlier
14:38slyrus(slime, that is)
14:39jasapp_slyrus: of sbcl fame?
14:40slyrussbcl is famous?
14:40jasapp_of course
14:41zakwilson_slyrus: I think the Slime version in the problem. I'll try downgrading.
14:41slyrusthere's a discussion about the underlying cause of the problem on slime-devel
14:41technomancyzakwilson_: if you use the packages from elpa (http://tromey.com/elpa/install.html) it should work seamlessly
14:42technomancyno manual checkouts involved
14:42stuartsierraWhat would be a way to compare performance that's better than microbenchmarks?
14:42slyrustechnomancy: which is to say that the ELPA/SLIME maintainers have decided not to roll slime forward to the current head until this problem is resolved?
14:43zakwilson_technomancy: I'll give that a try
14:44technomancyslyrus: more or less.
14:44technomancyslyrus: been waiting for someone who's gung-ho about both Clojure and CL to make it happen; I just don't have the time to do it myself.
14:46technomancyI took over swank-clojure maintenance from the original author, but I am 90% unfamiliar with the server implementation; I've only been focusing on making it easier to install and launch
14:48stuartsierratechnomancy: Have you had a chance to think about a Maven repo deployment for swank-clojure?
14:48technomancystuartsierra: apart from clojars you mean?
14:49stuartsierrasomething synced to Maven central
14:50technomancystuartsierra: I've been happy with clojars so far. I guess the benefit would be that people using clojure-maven-plugin wouldn't have to add another repository to their list?
14:50stuartsierrayes
14:50technomancyI've been put off by the sluggish response for getting things into central and the general air of bureaucracy, but if people are asking for it I could make it happen.
14:50stuartsierraThe central repository has its flaws, no doubt, but it simplifies deployment for a lot of people.
14:51stuartsierraI'm asking. :)
14:51technomancyI guess it's like apt-get--packages there are always going to be hopelessly behind, but it does serve as a lowest-common-denominator.
14:52stuartsierraIt doesn't have to be that bad, if you're willing to take the time to setup an rsync repository. Turnaround to central is just a couple of days then.
14:52technomancyI haven't had much time for swank recently, but I'll definitely put it on my list.
14:52stuartsierraThat's why I wanted build.clojure.org to have a releases dir, so we can set up sync to central.
14:53technomancyoh that's right--they don't want to sync from a snapshot repo
14:53technomancyI guess that's a feature request for clojars then
14:53technomancydammit; where's _ato when you need him. =\
14:53stuartsierraI think clojars would need to distinguish actual "releases" from "I just threw this up" projects.
14:54stuartsierraWe don't want another Rubygems.
14:54technomancywell rubygems didn't have prerelease versions implemented until like a year ago when I added them
14:54technomancywith mvn at least it has the -SNAPSHOT distinction
14:54stuartsierratrue
14:55technomancyI'm not sure why a separate repository is needed when the version numbers contain all the info that's necessary.
14:55stuartsierraBy the way, could one push Maven-built projects to Clojars?
14:55technomancycertainly
14:55technomancyyou can push any jar that has a pom
14:55stuartsierracool, I'll have to try that
14:56technomancyjust scp pom.xml myjar.jar clojars@clojars.org:
14:57stuartsierraok
14:58stuartsierraWhat if someone pushed a snapshot of something I wrote, e.g. http://clojars.org/clojure-hadoop
14:58stuartsierraCan I override that with my own release?
14:59lypanovzakwilson_: got it working already?
14:59lypanovif not, it was broken for me (and another guy)because i wasn't using technomancy's fork but instead the first hit on google.
15:00somniumstuartsierra: it seems _ato's attention is needed for resolving squatting (wherever he may be)
15:01stuartsierraI may just post as com.stuartsierra:clojure-hadoop, since I use that in my own repos.
15:01zakwilson_lypanov: not yet.
15:01zakwilson_I just got rid of my old slime, swank-clojure, clojure-mode and the like, then reinstalled with elpa. Now it can't find swank-clojure-autoload
15:03zakwilson_I can't start Slime with SBCL either: Couldn't load "/home/zak/.emacs.d/elpa/slime-20091016/swank-loader.lisp": file does not exist.
15:04technomancystuartsierra: yeah, unfortunately that requires manual resolution
15:04technomancygroupIds are first-come-first-serve
15:05stuartsierraok
15:05technomancyzakwilson_: sounds like you still have some manual slime config left in your dotfiles
15:06technomancyyou should be able to remove it, if not try moving it to after the point where package.el is loaded
15:06technomancyI'm not 100% sure how to get sbcl working with the elpa slime, sorry.
15:07zakwilson_I moved the package.el load to the beginning. I'm removing all the manual configuration now.
15:09zakwilson_Alright, my remaining question is, how do I tell it where clojure.jar is?
15:10zakwilson_At least, I hope that's my only remaining question. I'll worry about SBCL later as I'm not actively working on anything CL.
15:11chousercgrand: oh, I didn't realize you wanted a lazy seq
15:12lypanovzakwilson_: doesn't it magically download that?
15:12cgrandchouser: np it wasn't obvious
15:12hiredmanhttp://twitter.com/s_m_conway/statuses/8038881221
15:12cgrandchouser: my best atrocity (defn f [rs] (partition 2 (rest (mapcat (fn [[a b] [c d]] (when (not= b c) [b c])) (cons nil rs) (concat rs [nil])))))
15:14zakwilson_lypanov: it offers to install Clojure. I already have it installed. I'd rather just let it know where to find it, but I suppose I could let it do its thing.
15:15technomancyzakwilson_: you can either set the elisp swank-clojure-classpath var or symlink all the jars you want to use into ~/.swank-clojure
15:17lypanovman.. relearning to use a finger thats been in a cast for 2 months is tough... 2 hours free and its not touching a single key still.
15:18Raynestechnomancy: Oddly enough, symlinking the jars never seemed to work correctly for me. I ended up copying all the jars.
15:18zakwilson_technomancy: thanks. I'm letting it do its own install thing.
15:18RaynesOf course, it's irrelevant now, because I always use swank-clojure-project.
15:19Rayneszakwilson_: If you use swank-clojure-project, all of the jars in your lib/ directory will be slapped on the classpath.
15:23Raynesslyrus: Write it.
15:23Raynes:D
15:25zakwilson_Raynes: I recently found that. Looks useful. Thanks.
15:27technomancyswank-clojure-project is almost certainly what you want unless you're just getting started and trying things out
15:29technomancyswank-clojure is always looking for contributors too. =)
15:31chousercgrand: can I use clojure-contrib?
15:31chousercgrand: can I check something into clojure-contrib and then use it? :-)
15:31foguschouser: I did. But mine was ugly. :-(
15:31stuartsierraFor Git: how do I add an alternate upstream remote repo and fetch its branches?
15:32technomancygit remote add my-remote git://[...]; git fetch my-remote
15:32stuartsierraThat's what I thought, but I don't get any new branches (git branch -a)
15:32foguschouser: (defn f [s] (let [fl (su/flatten s) fq (su/frequencies fl)] (partition 2 (filter #(> 2 (fq %)) fl))))
15:33technomancyyou can also use the github ruby gem where appropriate: if you're in contrib, "github track technomancy" will add my fork of contrib as a remote
15:33stuartsierranever mind
15:33stuartsierraI found the problem, bad URL
15:34kmurph79what do the astericks do on something like: (def *nwords* ...
15:34stuartsierranothing, just naming convention
15:34kmurph79k
15:34technomancykmurph79: it implies that the var is going to be rebound later
15:34Chousuketechnomancy: only sometimes :P
15:35technomancybut technically it's like any other identifier
15:35stuartsierraI think that explanation gets overused. Mostly it just means "Global value"
15:35Chousuke*foo* is also used for unchanging constants
15:35Chousukethough if you adhere to the CL style I think those should be +foo+
15:37technomancywhy do you need a special notation for a top-level var then?
15:37technomancyjust to distinguish it from locals?
15:37stuartsierrayeah
15:37technomancynot sure if I buy that
15:38technomancyI mean, if you've got trouble telling what's a local and what's not, you probably have more serious issues
15:38technomancylike function bodies that are too long
15:38stuartsierraThe idea is top-level globals are "bad", so the naming convention is supposed to remind you to avoid it where possible.
15:39technomancyI don't understand what's bad about immutable top-level values
15:39stuartsierraIn CL they weren't immutable ...
15:39stuartsierraIt's true, it's less of an issue in Clojure.
15:39RaynesIt's a non-issue in Clojure.
15:40tcrayfordI stick asterisks around stuff that might be rebound in certain locations
15:40technomancyif it's longer than that, (excluding logging, arg lists, and exception handling) it requires justification
15:40zakwilson_It's alive. Thanks, guys.
15:41chouserevery def if a namespace-global probably-constant possibly-rebindable reference
15:42chouserso it seems silly to use *earmuffs* to mean global, constant, or rebindable.
15:42tcrayfordaye
15:42technomancychouser: there's a big difference between rebindable and intended-for-rebinding
15:42chouserI think it usually means that it's designed and expected to be rebound, as part of a configuration or something
15:42chouseryes
15:42chouserthat's what earmuffs are for
15:42tcrayfordtake *out* for example
15:43technomancynaming is all about conveying intention
15:43chouser+'s aren't used because most things are mostly constant. I don't want filter to be named *filter* or +filter+
15:43technomancywell you can't rebind filter anyway with direct binding; heh
15:43chouserso a not-meant-to-be-rebound constant should have a plain name, just like filter
15:43chouserhm
15:43chousergood point. :-P
15:44tcrayfordanother note about filter, why doesn't it have a doc string
15:44chouserit does again
15:44zakwilson_Do I have to symlink clojure.jar, and swank-clojure to my projectroot/lib to use swank-clojure-project, or is there a way to give it a static location for those in .emacs?
15:45technomancyzakwilson_: I recommend using leiningen to handle your dependencies
15:45technomancybut if you only have a couple you could copy them to lib/ manually
15:45technomancyit just gets tedious after a while, and you definitely don't want to check them into your version control
15:45technomancyso if other people want to run your project, they have to hunt them down manually if you don't use a dependency manager.
15:48technomancyhehe
15:48technomancytry out leiningen; do "lein new myproject" to get started
15:49zakwilson_It's been a while since I set up my Clojure environment on my last machine (stolen). It's probably a good thing to start over and get up to speed on the latest tools.
15:53technomancyhopefully we've made some progress forward since then. =)
15:55zakwilson_I imagine so. It used to be annoying to build a standalone jar.
15:56technomancy"lein uberjar" now =)
16:06alexyk_do we have a time slots for mindless shouts "clojure is great!" and "I love clojure!"? sometimes I just feel like a dog rolling in the grass when clojure works
16:06Raynesalexyk_: I do it all the time.
16:06alexyk_Raynes: you keep to the grass patch over there
16:07Raynes:)
16:09the-kennyI praise clojure too, but in other channels. They laugh at me because I use java, but all of them love lisp. They didn't knew what to say when I told them about clojure :D
16:10zakwilson_I will admit to an initial knee-jerk "ewww Java!" reaction when I first heard about Clojure
16:10alexyk_lisp has no destructuring, right? maps are not first-class citizens, nor arrays? finally then can hand it back to Guy Steele and thank him for the good run.
16:11alexyk_zakwilson_: I still hate Java though. Alas it's there... but we can use the libs.
16:11sh10151I'm trying to install swank-clojure via ELPA and get some errors
16:11zakwilson_CL has destructuring, but Clojure has a lot of forms that do it automagically
16:11sh10151slime-repl.el:122:39:Error: No setf-method known for slime-connection-output-buffer
16:11sh10151and then
16:11sh10151swank-clojure.el:47:1:Error: Cannot open load file: slime
16:11LauJensenOdd: I have written a parser which chunks data in segments of 100 files then pmaps through the - There's 67k files in total and it blazed through the first 22k using up all the head -then cpu#1 went to 100% load while cpu#2 lingered at 30% - this stretched for about 5 minutes, then they swapped so cpu#2 is now 100% and cpu#1 is 30%
16:11zakwilson_For example, CL's let doesn't destructure. Instead, you'd use destructuring-bind.
16:11alexyk_zakwilson_: can lisp be taught to do the exact same destructuring as Clojure? say Allegro's?
16:12alexyk_I can't imagine going without maps and vectors.
16:12zakwilson_alexyk_: There are libraries that do things like that. metabang-bind is an example.
16:12zakwilson_CL has hash tables and vectors, but not first-class syntax for them. You can add it with reader macros, and there's probably a library that does it.
16:13alexyk_zakwilson_: since I'm a n00b in lispiness, I'd love to see some gurus make a CL emulating Clojure. Then I'll dig my good old Allegro license and try it!
16:13zakwilson_CL hash tables and vectors are mutable though, so it's not exactly like Clojure.
16:14alexyk_Clojure without Java, now that would be fun
16:14zakwilson_Most of what's cool about Clojure can be done in CL, but it's not likely to be quite as polished.
16:14alexyk_zakwilson_: well... my hunch is Clojure will overtake lisp in all respects in a few years anyways
16:14alexyk_meaning non-clojure lisps
16:15zakwilson_The only thing I've really been missing from CL is method combination.
16:15LauJensenzakwilson_: you mean comb?
16:18zakwilson_He left before I could ask about that. What's comb? I don't see it in the API.
16:20alexyk_,(letfn [(f [x & [a b]] (print (str "x:" x ", a:" a ", b:" b)))] (f 1))
16:20clojurebotx:1, a:, b:
16:20alexyk_ah ok works
16:23alexyk_clojurebot has that fearsomness which makes code goes week in the knees and work
16:23arnihermannhas anyone experience with datalog in clojure?
16:41Chousukehmm
16:42Chousukewrote a plugin for lein for running examples easily
16:47dabd I tried (require '[clojure.contrib.str-utils2 :as s]) and then (s/uppercase "asdf") and got java.lang.Exception: No such var: s/uppercase (NO_SOURCE_FILE:9) What am I doing wrong?
16:47chousers/upper-case
16:48hiredman,(require '[clojure.contrib.str-utils2 :as s])
16:48clojurebotnil
16:48hiredman,(s/uppercase "asdf")
16:48clojurebotjava.lang.Exception: No such var: s/uppercase
16:48chouser,(s/upper-case "asdf")
16:48clojurebot"ASDF"
16:49dabdduh! thx
16:49konris there any library to deal with finding sexps inside other sexps, like {:foo "bar" :baz [[[[[4]]]]]} inside [3 4 {:foo "bar" :baz [[[[[4]]]]]}]?
16:50chouserwhat do you mean by "finding"?
16:50chouseryou want to know if something equal to your map exists somewhere inside? true/false?
16:51technomancyanyone else seeing contrib test failures for JMX?
16:51technomancyI'm getting it on some machines but not others and can't figure out the pattern.
16:51alexyk_hmm -- so clojurebot now remembers imports/requires?
16:51technomancyfails on my ubuntu machine, but not on scgilardi's ubuntu VM
16:52konrchouser: yes
16:54konrchouser: actually I want something more flexible, like being able to use a function instead of a symbol to match, ie, {:size #(> % 3)} in {:foo {:size 1}}
16:54chouser(some #{needle} (tree-seq coll? seq haystack))
16:55arohnerchouser: I didn't know about tree-seq. That's really cool
16:56Raynestechnomancy: Is there a way to make Leiningen include unrelated files in the jars it creates? Such as a LICENSE or README for instance?
16:57konrchouser: that's very interesting!
16:57konrchouser: thanks!
16:57chouserkonr: so you should be able to drop your predicate in there in place of #{needle}, and find whatever you're looking for
16:58chouseror use 'filter' instead of 'some' to find all matches
16:58technomancyRaynes: I've thought about adding that, but there's no code for it yet
16:58technomancywould be an easy patch
16:58konrchouser: yes, and I thought I'd have to develop a whole library to deal with this!
16:58Raynestechnomancy: Could be pretty important.
17:00hiredmanuh
17:00hiredmanwhat about ./resources/
17:00hiredmanlast time I put a file in ./resources/ it ended up in the root of the jar
17:01technomancyhiredman: well it'd be better not to have to keep two copies of the readme around
17:02hiredmanoh
17:02hiredmanI see
17:02hiredmanright
17:06scottjhiredman: are there docs on lein-gae?
17:06hiredmannope
17:06scottjwhat commands/features does it provide?
17:07tcrayfordlein help
17:07hiredmanscottj: I would checkout this fork http://github.com/the-kenny/lein-gae
17:08the-kennyhuh
17:08hiredmanmy branch doesn't do much atm
17:08hiredmanit has an appegine-setup command that creates some directories and does some rewriting of procject.clj
17:09the-kennyMy branch doesn't do much more ;) But I have some plans for appengine-push and such things
17:09hiredmanhttp://github.com/hiredman/appengine-helper might be a better choice
17:09the-kennyIt's a bit annoying because it looks like you need the while appengine-sdk-directory
17:09hiredmannot lein though, uses ant
17:09hiredmanyes
17:09the-kennys/while/whole/
17:09hiredmanappengine-helper uses a somewhat dated version of the sdk currently
17:10scottjI was looking at using http://github.com/zitterbewegung/blank-appengine-clj as the base for my project but it looks like it also uses an old sdk
17:10hiredmanbut it works and I have used it for two apps (that do very little)
17:10hiredmanoh
17:10hiredmanthats kind of nice
17:10hiredmanwow
17:11hiredmanthe-kenny: steal that project.clj
17:11the-kennyhiredman: Because of the dependencies?
17:11hiredmanthat looks like the way to go
17:11hiredmanthe-kenny: yeah
17:12hiredmantracking down all the sdk's jars is :(
17:12the-kennypushed it into my Inbox for Todos
17:24alexyk_I want to stick a new value in update-in, regardless of what was there; like
17:24alexyk_,(update-in {} [1 2] (fn [_] 3))
17:24clojurebot{1 {2 3}}
17:24alexyk_is there anything shorter?
17:24dnolenassoc-in
17:24alexyk_oh!
17:25alexyk_clojure is small, but someone already wrote all the functions...
17:37alexyk_can you mix, in map destructuring, :keys [list] and val-name different-key-name?
17:37chousersure
17:37konrIs there a function like partition that uses a functions instead of a number to decide where to split? like (cut-where #(> 3 %) [1 2 3 4 1 2 3]) -> [[1 2 3] [4 1 2 3]]
17:38alexyk_loovely
17:38alexyk_,(let [{a :argh :keys [b c]} {:argh 1 :b 2 :c 3}] [a b c])
17:38clojurebot[1 2 3]
17:40Chousukekonr: split-with?
17:41konrChousuke: Thanks!
17:44arohnerI'm getting tired of writing (:require) lines of the format (:require [a.b.c :as c]). is it possible to write a macro that simplifies that?
17:44jcromartiedoes duck-streams work with basic auth baked into the URL?
17:44jcromartielike https://user:pass@example.com/
17:44alexyk_arohner: I'm tired of the whole use/require/import distinction
17:44technomancyarohner: there's been talk of revamping it
17:45technomancysee the "ns docstring needs work" thread from a few months ago
17:45chouserimport needs to be separate, but use/require should become one thing
17:45scottjWith lein-gae how do you launch your app locally for testing? how do you deploy to gae?
17:45alexyk_chouser: because import is JVM thing?
17:45hiredmanscottj: none of that is there
17:46chouseralexyk_: well, because it means something different. you import classes, you use/require namespaces.
17:46Chousukearohner: sure you can write a macro
17:46hiredmanI just broke ground on it, and then haven't finished it
17:46Chousukearohner: you only need to write something that expands to the proper (ns ...) form :)
17:46arohneroh right, I can always write a macro that generates ns
17:46arohnerI was original thinking, can I write a macro that fits inside ns, or does ns's macroexpansion run first
17:46Chousukearohner: though it might break tools that expect ns :P
17:46dabdMy Java code is passing a null value to a Clojure function however the null value fails the 'nil?' predicate. I am surprised since the documentation mentions that 'nil has the same value as Java null'
17:46jcromartieI'm guessing that java.net.URL is the bottleneck
17:46arohnerChousuke: that's why I don't use "smart" tools :-)
17:47alexyk_if you guys fix ns the tools probably become obsoleted anyways...
17:47chouserarohner: have you looked at the definition of 'ns'?
17:47Chousukearohner: you can also create a helper macro that expands to all the needed calls to require and use and use it in addition to ns, so you don't break tools too badly :p
17:47chouserarohner: I think you'd just have to (in-ns 'clojure.core), define a new fn or macro, and you could start using it in (ns ...)
17:47scottjhiredman: so you use ant for that stuff?
17:48hiredmanscottj: I don't do appengine work regularly, what I have done has been using appengine-helper
17:49hiredmanappengine-helper has some rough edges too, but it has a start-server target for the local server
17:49arohnerchouser: that's the kind of answer I was hoping for! thanks
17:50jcromartie:use and :require are about the most boilerplate-y stuff I have come across yet in Clojure, compared to most other languages it's still not much to complain about :)
17:52jcromartieI feel like maybe they could go away entirely leaving only :use :as in the end.
17:52technomancyjcromartie: you should read the mailing list thread, lots of good ideas there
17:55redalastorHow would you go about converting indexes (0 based) into Excel-like column labels (A to Z, then AA, AB, etc.)?
17:57chouserRaynes: all the good ones do!
17:57jcromartieredalastor: sounds like a simple enough job for the various sequence functions
17:57jcromartie$VISUAL
17:57briansheehanHello, is there a difference between clojure.core/resolve and clojure.core/find-var?
17:57chouserRaynes: mutt, gmail (+ itsalltext), emacs email thingy (whatever its called)
17:57RaynesI use Thunderbird.
17:57Raynes:o
17:57chouserRaynes: I do too, sometimes. It does not count as a "good one"
17:58jcromartiebriansheehan: find-var is only for vars, resolve/ns-resolve is for vars or classes
17:58technomancyRaynes: I write all my mail in Emacs via gnus
17:58arohnerbriansheehan: resolve uses *ns*, so it looks in the current ns by default
17:58RaynesI haven't figured out gnus yet.
17:58chousergnus, that's it. I used that for a while. not bad at all
17:58chouserthough no gmail
17:58RaynesAlbeit, I haven't really tried either.
17:58redalastorjcromartie: I don't want to create a sequence of indexes, just turn a single index into letters.
17:58technomancyit's really nice for mailing lists and news-like stuff
17:58RaynesI've been using thunderbird for like 3 years noe.
17:58briansheehanLooks to me like resolve does everything that find-var can do though.
17:58Raynesnow*
17:59jcromartieright, redalastor, I'm just saying a seq of indexes will probably come into play
18:00arohnerbriansheehan: resolve is a super-set of find-var, because it also looks up classes
18:00arohnerand the signatures are different because you'd have to bind *ns* if you want to look in other namespaces
18:00arohnerwhich is kind of strange
18:01janjanI was wondering, why do we need alength and why doesn't (.length (int-array 3)) work?
18:01janjansome kind of restriction on java reflection?
18:02arohnerjanjan: (.foo bar) means call bar.foo() in java
18:02chouserjava arrasys don't have an instance method named 'length'
18:02redalastorjanjan: length is a property on arrays, not a method.
18:03janjanI thought I had used .something for properties before, but apparently I thought wrong
18:03chousera property?
18:03janjanfield
18:03ChousukeI think array.length is something weird, actually.
18:03chouseryou can do field lookups with (.fieldname obj), so I don't think it's that
18:03Chousukesince if it were a field, (.length array) would work :/
18:03chouserright
18:03arohnerright, it can't be a normal field, or you could do [1,2,3].length = 5
18:04ChousukeI guess it's like int.class or whatever
18:04chousercompiler sugar? huh.
18:04chouserI really know very little java
18:05hiredmanyes
18:05hiredmanthere is, I think, an opcode for arraylength
18:07hiredmanclojurebot: bytecode?
18:07clojurebothttp://homepages.inf.ed.ac.uk/kwxm/JVM/codeByNo.html
18:07hiredmanI should just teach clojurebot the bytecode
18:08janjanhttp://homepages.inf.ed.ac.uk/kwxm/JVM/codeByNo.html
18:08janjanmeant http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html#arraylength
18:09hiredmanclojurebot: arraylength is 0xBE (190)
18:09clojurebotAlles klar
18:09hiredmanclojurebot: 190?
18:09hiredmanthat is not cool
18:09hiredmanclojurebot: arraylength?
18:09clojurebotarraylength is 0xBE (190)
18:09janjan:)
18:10janjannever too late to learn something new, I guess
18:10hiredmanclojurebot: 190?
18:10clojurebotexcusez-moi
18:10hiredmanyay for typo's swallowing exceptions
18:11hiredmanclojurebot: 190?
18:11clojurebotIt's greek to me.
18:11hiredmanclojurebot: 0xBE
18:11clojurebotExcuse me?
18:11hiredmanbah
18:11janjanclojurebot: arraylength?
18:11clojurebotarraylength is 0xBE (190)
18:11janjanclojurebot: invokevirtual?
18:11clojurebotGabh mo leithscéal?
18:11briansheehanarohner: you can give resolve a namespace qualified symbol if you want something outside the current ns
18:13arohnerbriansheehan: ah, right
18:13briansheehanOn the subject of rebinding *ns*, according to clojure.org that's a no-no, can anyone illuminate for me?
18:13briansheehanThat's funny, clojurebot is speaking Gaelic!
18:14devlinsfbriansheehan: I imaging that might ruin hygenic variable capture
18:14ohpauleezbriansheehan: You manipulate the namespace using the ns macro
18:14ohpauleezand you shouldn't manipulate it directly
18:14janjanclojurebot: Gabh mo leithscéal?
18:14clojurebotnot a problem, the average bid for it on getacoder is $821.00
18:14hiredmanohpauleez: you shouldn't use the ns macro for manipulating namespaces
18:14hiredmanthe ns macro is for creating namespaces
18:15hiredmanfor switching namespaces use in-ns
18:15ohpauleezhiredman speaks the truth
18:17zakwilson_So I see there's Postal for sending mail. What if I want to write an SMTP server? Is there a nice library for that?
18:20zakwilson_To be specific, I want something that will receive mail and provide hooks for deciding if an address is valid, and what to do with the data.
18:21scottjhiredman: the readme for appengine-helper has a commandline ant -build ... is that a typo or am I misunderstanding it, my ant doesn't have a -build arg
18:21zakwilson_Is Apache James what I want?
18:22briansheehanhiredman: just being pedantic, both the docs for both ns & in-ns say : "Sets *ns* to the namespace named by the symbol, creating it if needed", sounds like you could use either of them to switch namespaces
18:23hiredmanscottj: sorry, should be buildfile
18:24piccolinomattrepl, how funny, I was just studying how your cassandra bindings allow you to make a function named "get."
18:25jcromartiean I add methods to a proxy'ed object after the fact?
18:26hiredmanbriansheehan: ns has more machinery under the hood, most of which makes the assumption that it is working with a pristine namespace
18:26hiredman,(doc update-proxy)
18:26clojurebot"([proxy mappings]); Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces) to fns (which must take arguments matching the corresponding method, plus an additional (explicit) first arg corresponding to this, and updates (via assoc) the proxy's fn map. nil can be passed instead of a fn, in which case the corresponding method will revert to the default behavior
18:29jcromartiethanks hiredman
18:29jcromartieand clojurebot
18:34jcromartieI don't see anything in the interop page about implementing a constructor from a proxy
18:37jcromartieis that possible?
18:37hiredmannope
18:39jcromartieI guess it's not really necessary with closures
18:45RaynesWhat would be a good name for a clojure-based email client?
18:46RaynesMailCljiant is too hackish.
18:54slyrusgood lord... what is all this stuff maven wants to download and why do i want it?
18:59callapmditch maven. stick with rake or ant
18:59slyruscallapm: believe me, i have no interest in running maven. just trying to build incanter.
18:59technomancyRaynes: didn't you hear about the new rule? you're not allowed to have a J in the name of your clojure programs.
19:00callapmslyrus: woops gotcha. i hear ya.
19:00hiredmanif you put a J in your clojure program names, your nick will be stricken from the logs
19:00Raynestechnomancy: Doesn't matter. There was no good way of fusing Clojure and 'Mail'. I just named it Snail.
19:01technomancyhiredman: I'm enforcing it in the next version of "lein new"
19:01hiredmanpop up a swing window
19:01hiredman"you apear to be starting a project with J in the name, please no puns"
19:05briansheehanJail works for me though.
19:05clojurebotfor is not a loop
19:10mattreplpiccolino: sorry, was afk
19:10piccolinoOh, no problem.
19:11piccolinoI didn't have anything more to say.
19:11piccolinoBut the timing was pretty funny, I pulled up the source on github and saw you pop into the channel on the side of my screen within 5 seconds.
19:11mattrepl=)
19:14Raynesclojurebot: Is for a loop?
19:14clojurebotegal is http://home.pipeline.com/~hbaker1/ObjectIdentity.html
19:29beutdeucehow would i call the java Queue constructor from clojure?
19:30hiredmanQueue is an interface
19:30hiredmanit has no constructor
19:30beutdeucewell, the linkedlist for that matter
19:31beutdeuceLinkedList<Integer> for example
19:31hiredmanwell, you can forget generics
19:31hiredmanthey don't exist
19:31beutdeuceoh
19:31beutdeucehm
19:31hiredmangenerics are a compiler construct
19:31hiredmanthe byte code just deals with objects
19:32hiredmanso in clojure you don't have to care about generics
19:32hiredman,(import '(java.util ArrayList))
19:32clojurebotjava.util.ArrayList
19:32hiredman,(ArrayList.)
19:32clojurebot#<ArrayList []>
19:33hiredmandunno why you would use a LinkedList when you can use clojure's lists
19:33beutdeucehow would i do something like the following in java: Queue<Integer> q = new LinkedList<Integer>();?
19:33beutdeucei wouldn't
19:33hiredmanyou wouldn't
19:33beutdeucepractically i wouldn't, i just want to know hwo
19:34hiredmanno, you wouldn't
19:34hiredman Queue<Integer> q is declaring the variable q to have the type Queue<Integer>
19:34hiredmanclojure is a dynamic language so you don't do that sort of thing
19:35beutdeuceso there are no interfaces in clojure?
19:35hiredmanthere are interfaces
19:35hiredmanyou just don't type everything
19:35hiredmanthere is no need
19:35beutdeucek
19:36hiredman,(import '(java.util LinkedList))
19:36clojurebotjava.util.LinkedList
19:36hiredman,(let [q (LinkedList.)])
19:36clojurebotnil
19:36hiredmanbut generally you would not do that
19:37hiredman,(let [q ()])
19:37beutdeuceyes, i knoew
19:37clojurebotnil
19:37hiredmansince clojure has list literals
19:37beutdeucethnx
19:37rikthevikso here's a question for ya
19:37riktheviklots of times i find what i passed into a function isn't what i meant to pass in. forgetting to @ refs happens all the time
19:38rikthevikare type hints the way to catch improper parameter types?
19:38rikthevikor preconditions
19:38qbgPreconditions would be the way to go
19:38rikthevikalso, how can i verify that an argument is the type of struct-map i think it is
19:39hiredmanyou can check to see if it has the right keys
19:39hiredmanor use a type tag
19:39rikthevikah, that's not a bad idea
19:40beutdeuceare clojure sets automatically sorted?
19:40beutdeucenvm, they are not
19:40chouser_sorted-sets are :-)
19:40beutdeucemhm, thats cool
19:43beutdeucedo sorted-maps sort by whichever elements are Comparable?
19:44hiredman,(sorted-set :a 1)
19:44clojurebotjava.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.lang.Number
19:45beutdeuce,(sorted-map :a 1)
19:45clojurebot{:a 1}
19:45hiredman,(sorted-map :a 1 2 :b)
19:45clojurebotjava.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.lang.Number
19:46beutdeuce,(sorted-map :a 1 2 :b)
19:46clojurebotjava.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.lang.Number
19:46beutdeucelol
19:46beutdeuceweird
19:46hiredmanno
19:46tcrayfordnot weird
19:46hiredman,(.compare 1 :a)
19:46clojurebotjava.lang.IllegalArgumentException: No matching method found: compare for class java.lang.Integer
19:46tcrayfordthings have to be comparable to sort them
19:46hiredmanbah
19:46beutdeuceoh
19:46chouser,(compare 1 :a)
19:46clojurebotjava.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.lang.Number
19:47hiredman,(.compareTo 1 :a)
19:47clojurebotjava.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.lang.Integer
19:47beutdeuce,(sorted-map :a 2 :b 3)
19:47clojurebot{:a 2, :b 3}
19:47beutdeuce,(sorted-map :a "1" :b "10")
19:47clojurebot{:a "1", :b "10"}
19:48hiredman,{:a 1 2 :b}
19:48clojurebot{:a 1, 2 :b}
19:48ctdeanIsn't there a load-file function that will load a clojure file at some arbitrary path?
19:49hiredman,(doc load-file)
19:49clojurebot"([name]); Sequentially read and evaluate the set of forms contained in the file."
19:49ctdeanyep, there it is
19:49beutdeuceis clojure's reduce like Haskells foldr or foldl?
19:49ctdeanmust have some messed up env
19:49ctdeanThanks
19:50hiredmanbeutdeuce: foldl I believe
19:51beutdeucek
19:51hiredmanI tell a lie, it must be foldr
19:51hiredmannope
19:51hiredmanfoldl
19:52hiredman<-- not a haskeller
19:52hiredmanclojurebot: reduce?
19:52clojurebotPardon?
19:52hiredmanclojurebot: foldl
19:52clojurebotexcusez-moi
19:52hiredmanclojurebot: foldr
19:52clojurebotNo entiendo
19:52beutdeucelol
19:52hiredmanhttp://www.zvon.org/other/haskell/Outputprelude/foldl_f.html <-- this is reduce
19:53beutdeucek, does clojure have a foldr?
19:53hiredmannope
19:53beutdeucek
19:53hiredmanclojure is not lazy evaluated
19:53beutdeuceoh, ok
19:53beutdeucei had a feeling it is
19:54hiredmanit is not
19:54beutdeucethere are lazy implementations though of certain functions
19:54hiredmanclojure has lazy sequences, but those are the only lazy things
19:54hiredmanbeutdeuce: yes, functions that consume and produce lazy sequences
20:14RaynesYou access a Java field the same way you access a static method, right?
20:14rhickeyRaynes: static field?
20:14RaynesYes.
20:15rhickeyAClass/aStaticField
20:15rhickeyno parens
20:15RaynesThought so. Thanks.
20:15rhickeyMath/PI
20:16rhickey,Math/PI
20:16clojurebot3.141592653589793
20:19tcrayfordman clojure contrib api docs are really hard to reach via google/moving around the clojure website
20:19tcrayford(actually, its ok via google, just very hard to get to from clojure.org)
20:24rhickeyhttp://clojure.org/ , then User contribs in upper right
20:26tcrayfordperhaps thats slightly poorly labelled?
20:26rhickeycould be
20:27tcrayfordmaybe "library api" or something like that
20:28rhickeyhmm, it's not the main library api
20:28tcrayfordtis true
20:28tcrayfordmaybe just "Contrib API"
20:29rhickeywhat about Contrib library?
20:30tcrayfordbetter
20:30tcrayfordI think
20:31rhickeydone
20:31tcrayfordnice then
20:52alexykI create maps like {1 3, 2 2, 3 2, 4 1, 5 3, 6 4, 7 7} and they also print in sorted key order; coincidence?
20:53tcrayfordshould use sorted-map
20:53alexyk,(let [m {0 2, 1 3, 2 2, 3 2, 4 1, 5 3, 6 4, 7 7}] (assoc m 0 2))
20:53clojurebot{0 2, 1 3, 2 2, 3 2, 4 1, 5 3, 6 4, 7 7}
20:53chouseralexyk: coincidence.
20:53dabdconsing to a vector returns a list, how do I add an item as the first element a of a vector and still get one?
20:54chouserdabd: vectors can't "grow" on the left side, though of course you could copy a new value plus all the elements from the old one into a new one.
20:55chouseralexyk: small literal maps are usually PersistentArrayMaps, which stay in the order yoy put them. but as they get larger they may change concrete type.
20:56alexykah
20:56alexykif I create a sorted-map, does it in all other respects behave like a regular map?
20:56alexyksyntactically
20:57dabdchouser: so to concatenate to vectors you need to do something like (into [] (concat vec1 vec2)) ?
20:57alexyki.e. looks up its own keys, etc
20:57dabdtwo vectors
20:57alexykdestructures
20:57chouserdabd: yes, though if you intend to do that a lot you might consider using a list
20:58chouseralexyk: yep
20:58alexyknice
20:59chouserhave to be more careful about key types than you do with hash-maps
21:01chouserbtw, we cover all this in detail in the upcoming chapter
21:03alexykok here's a trickier one. I create a map with (sorted-map) and then add things to it with (assoc-in sm [a b] v). When taking (vec sm), I'll get things like ["user" {1 2, 2 0, 3 5}]. Does sortedness of sm spread down to {1 2, 2 0, 3 5}?
21:03alexyka is string, b and v are ints
21:04alexykif not, what's the way to create the inner map in sorted order, given that it's never done explicitly -- auto-vivified in assoc-in?
21:07chouserthe sortedness will not spread.
21:08devlinsfalexyk: I think you'd need to write your own version of assoc-in
21:09alexykalas
21:09alexykdevlinsf: i.e. an assoc-in which makes the leaves sorted-map's, right?
21:09devlinsfYeah
21:10devlinsfalexyk: Hmmm... this could be a really good exercise in HOFs....
21:10devlinsfmust write about this later...
21:11alexykdevlinsf: I'm all ears :)
21:11devlinsfGimme a sec to play at the REPL....
21:11alexykkk
21:13chouserI don't see where in the source of assoc-in new hash-maps are created.
21:15chouseroh! it's in assoc
21:15chouser,(assoc nil :a 1)
21:15clojurebot{:a 1}
21:15chouser,(class (assoc nil :a 1))
21:15clojurebotclojure.lang.PersistentArrayMap
21:17devlinsfYeah
21:17devlinsfchouser: Threw me off too
21:18chouseroh no! and direct binding prevents an easy hack to work around it.
21:19jcromartieI'm playing with proxy again, and I am not sure how to do this... I want to pass the proxy itself to one of its methods
21:19chouseryou just need a third arg to the 'get' in there
21:19chouserjcromartie: in the body of a proxy form you can use the word this to refer to itself
21:19jcromartieah, this
21:20devlinsfchouser:
21:20devlinsfchouser: yep
21:20JonSmithdo you have to quote the this?
21:20chouserJonSmith: nope
21:21chouser,(proxy [Object] [] (toString [] (str "This hashCode is: " (.hashCode this))))
21:21clojurebotjava.lang.IllegalStateException: Var null/null is unbound.
21:26devlinsfchouser, alexyk: http://gist.github.com/283450
21:26devlinsfVarious versions of assoc-in
21:27alexykbeautiful
21:27alexykthere's 20 millions records waiting to fly through then right away
21:28chousernote that assoc-in-by calls f for every level, whather it's needed or not
21:28chouserwhether
21:28devlinsfget is eager?
21:28chouserget is a function
21:28devlinsfI guess it has to be...
21:28chouserall args get evaluated before its called
21:28devlinsfWell, okay. Details. Nothing an if-guard won't fix
21:29chouserit would probably be sufficient to provide a base object
21:29alexykso (sorted-map) will also be called every time?
21:29chouser(get m k default-map)
21:30devlinsfI'm thinking more (let [local-k (get m k)] (if k k (f)))
21:30devlinsfAt least for assoc-in-by
21:30chouserdevlinsf: that might not do what you expect if a map has a 'nil' value
21:31devlinsfHmmm... right
21:31alexykis there an empty sorted-map object or only (sorted-map) call ?
21:31alexykI'd settle for assoc-in-2 first :)
21:31devlinsf(if (contains ...) (get ...) f)
21:31chouser(def m (sorted-map)) ; <- there it is!
21:31devlinsfThat'll work
21:31chouserdevlinsf: yes, though that means it does each lookup twice. :-P
21:32alexykchouser: but m will have to be packaged with assoc-in-2 right?
21:32chouserwell, you don't really want it hard-coded. later you'll be wanting to use sorted-map-by with your own comparator
21:32alexykso we're talking a special namespace for those
21:32devlinsfchouser: I'm gonna get this ...
21:32chouserdevlinsf: :-)
21:33alexykchouser: but is assoc-in-2 is called in a loop, and it defines m all the time... ah wait, you mean extra parameter, caller will def it?
21:37devlinsfchouser: There's no get-entry fn or method
21:37devlinsfMy best answer is to go back to the let version, and add a contains check if required
21:37chouserdevlinsf: 'find'
21:38devlinsffind?
21:38devlinsfhmmm.
21:38devlinsfAh!
21:38devlinsfHmmm
21:39chouseryou don't like a constant?
21:39devlinsfme?
21:39clojurebotyour name is clojurebot
21:39chouser(assoc-in-by m (sorted-map) [1 2 3] :val)
21:40devlinsfAh
21:40devlinsfA constant might be better
21:40devlinsfI see what you mean now
21:41devlinsfYes, definitely
21:44devlinsfchouser: renamed associn-by to assoc-in-as
21:54alexykdevlinsf: lovely! -as is a bit confusing. is there a short -default suffix?
21:55alexykassoc-in-with?
21:55clojurebothttp://clojure-log.n01se.net/date/2008-11-21.html#13:04
21:55devlinsfHmmm... I don't see why not
21:56devlinsfalexyk: Done
21:57alexykcool!
21:57devlinsfHmmm... how often does this problem occur?
21:58devlinsfAnyone?
21:59chouserwanting something other than a hash-map for assoc-in?
21:59devlinsfchouser: Yeah
21:59chouserThis is the first I've heard someone ask for it.
21:59RaynesWhat is that emacs mode that highlights the paren you're cursor is on, and the paren that matches it?
21:59Raynesyour*
21:59Raynes/spellfail
22:00devlinsfchouser: Hmmm... okay
22:00devlinsfThe gist will be there, and if it comes up again it should help
22:00devlinsfShould need to go no further
22:01chouserwell, it seems a reasonable feature to have
22:01chouserand it would actually fit right into 'assoc-in', it doesn't need a new fn
22:01devlinsfNot quite
22:01clojurebotmake a note of http://scienceblogs.com/goodmath/2006/11/the_c_is_efficient_language_fa.php it is yet another article about picking c or c++ for performance being naive
22:01alexykdevlinsf: chouser: they don't ask 'cause they don't deal with the twitter graph analysis. you'd be tired to sort it for every view.
22:02devlinsfchouser: What if a map is a key
22:03chouserdevlinsf: assoc-in only take 3 args, yours takes 4
22:03devlinsfchouser: Oh, right Mistook the [k & ks] as variadic
22:06alexykthen we'll need the sistyer update-in-with and stick it into core!
22:06alexyksister
22:07alexykor c.c.vivify or something
22:08devlinsfalexyk: Update-in is trickier
22:09devlinsfI'll throw the idea on the main list, feel free to add your thought alexyk
22:09alexyksure
22:59dabdis there a reason for Clojure changing types of data structures? e.g. two vectors returns a list instead of a vector
22:59dabdconcat
23:00hiredman,(doc concat)
23:00clojurebot"([] [x] [x y] [x y & zs]); Returns a lazy seq representing the concatenation of the elements in the supplied colls."
23:02devlinsfdabd: It has to do with lazynes
23:02dabdok. and a seq is a logical list
23:02devlinsfAlso, it produces a more predicable api
23:03dabdhow do you concatenate two vectors without producing "intermediate" lists?
23:04devlinsfYou mean vectors in, vectors out?
23:04dabdyes
23:04hiredman,(into [] [1 2 3 4] [5 6 7 8])
23:04clojurebotjava.lang.IllegalArgumentException: Wrong number of args passed to: core$into
23:04devlinsf(into [] (concat ...))
23:04devlinsfMaybe reduce could do the job
23:05hiredmanoh
23:05hiredmanduh
23:05dabdbut that produces a lazy seq before creating the final vector
23:05hiredman,(into [1 2 3 4] [5 6 7 8])
23:05clojurebot[1 2 3 4 5 6 7 8]
23:05devlinsf,(reduce #(conj [1 2 3] %) [4 5 6])
23:05clojurebotjava.lang.IllegalArgumentException: Wrong number of args passed to: sandbox$eval--4937$fn
23:05devlinsfRight, duh
23:05dabdhow to do it without laziness?
23:06hiredman,(into [1 2 3 4] [5 6 7 8])
23:06clojurebot[1 2 3 4 5 6 7 8]
23:08dabdhiredman: that was what I meant. thx
23:17hiredmanhttp://www.lambdassociates.org/blog/klambda.htm hohoho