#clojure logs

2011-06-17

00:27seancorfieldpromise/deliver vs delay - if you know what the resulting expression is going to be but you just don't want it available at initialization time (because it depends on some as yet uncomputed value), is there any reason to use promise (and deliver it when said uncomputed value is computed) vs delay (assuming you know it will never be accessed until after said value is computed?
00:27seancorfieldit feels like using promise/deliver is "side-effecty" and not very functional...
00:37ViciousPlant\/join #python
01:16zakwilsonI got to talk about Clojure to a .NET meetup I randomly went to because its organizer said it would be about things other than .NET. I wish I'd been more organized.
02:32Scriptoris there a nice way to view all the clojars besides http://clojars.org/repo? Alternatively is there a clojure lib for scraping clojars?
02:42raekseancorfield: I'm curious... what lead to the cyclic dependency?
02:46tomojcan you generate an efficient permutation on longs using a seeded Random? or do you need a skippable random?
03:26nathanmarztomoj: i don't think so -- the docs for random say it won't generate all possible longs. I think you can do it by using the lower or upper half of a UUID
03:28tomojhmm
03:28tomojthat will give me one piece of one permutation
03:30tomojbut how to generate the UUIDs repeatedly when you don't know which longs you'll need?
03:30tomojs/repeatedly/repeatably/
03:30nathanmarzoh you want it to be repeatable
03:30nathanmarzno idea there
03:33tomojactually..
03:33tomojI think the problem is finding f so that (f seed) returns a pseudorandom bijection on the longs
03:34tomojbut since it's the longs, I bet having (f seed) just be a hash function would work well enough
03:35tsdhIf there is some java method setFoo(Map<String, Integer>), can I call that from clojure with (.setFoo my-obj {"One" 1, "Two" 2})?
03:38raektomoj: it might be possible to use a Linear Feedback Shift Register: http://en.wikipedia.org/wiki/Linear_feedback_shift_register
03:39raekI think I have read somewhere that you can configure the polynom so that for x bits, it will step through each of the 2^x states once, except for the all-zero one
03:42tomojhttp://www.cs.rit.edu/~ark/pj/doc/edu/rit/util/DefaultRandom.html
03:42tomojI wonder if that one has that property
03:42tomojif so it would be especially convenient
03:43tomojbecause it can skip to any step very quickly
03:45tomojwow, it's so simple https://gist.github.com/85e0c07a7cbfe7367d75
04:17tomojthat supposedly has a period of about 2^64, but you pass a positive long to skip ahead
04:17tomojso you need two skips to exhaust the period?
04:24tomojindeed
04:29TobiasRaederMorning :)
04:44tsdhIs clojure.org down?
04:47tsdhHm, works again...
04:52tsdhIs there some conversion utility to convert clojure collections to java collections? Like [1 2 3] ==> ArrayList<Integer>, {"1" 1, "1" 2} ==> HashMap<String, Integer>,...
04:58sidstsdh: clojure collections already implement the java collection interfaces
04:59sids,(isa? (type []) java.util.List)
04:59clojurebottrue
04:59tsdhsids: Yes, but that doesn't help when you need to set java attributes of Collection/Map types.
05:01tsdhOh, wait. My test was wrong...
05:02sidsyou can get an an ArrayList from a vector like: ##(java.util.ArrayList. [1 2 3])
05:02sexpbot⟹ #<ArrayList [1, 2, 3]>
05:05tsdhHm, but that doesn't work recursively. ,(java.util.ArrayList. [ [1 2 3] [4 5 6] ])
05:05tsdh##(java.util.ArrayList. [ [1 2 3] [4 5 6] ])
05:05sexpbot⟹ #<ArrayList [[1 2 3], [4 5 6]]>
05:05fliebeltsdh: check clojure.walk
05:07tsdhfliebel: Yes, I've already used it. Just wanted to be sure there's no existing solution.
05:07raektsdh: why is it not enough to use the clojure data structures directly in your case?
05:09tsdhI work with some java lib, and when I invoke some java setFoo(List<String>) from clojure, it will most probably work, but as soon someone tries to use getFoo().add("Hi there"), he'll get an UnsupportedOperationException.
05:10raekah, you need the mutation...
05:10tsdhNot *me*, *they*. :-)
05:11raeka recursivly define function would be very easy to write
05:11raek-d
05:12raekbut protocols would be nice here
05:13tsdhraek: Yeah, I already have some defmulti for the other way round. Unpacking some java union-like type into native clojure structures.
05:24raektsdh: my idea: https://gist.github.com/1031113
05:25tsdhraek: Hey, very nice!
05:32tsdhraek: Plugged it in, tested it, and it works fine.
05:49raektsdh: this might not work. there is an ambiguity in the dispatch since a PersistentList is both a ISeq and an Object. maybe a multimethod with a default implementation is better
05:51tsdhraek: Anything is an Object. Does the order of classes in extend-protocol not determine the exact dispatching?
05:54raektsdh: it does not
05:58tsdhraek: Hm, ok. We support only a small range of attribute types, so I guess I would be fine if I delete Object and add Number, String, Boolean explicitly instead, right?
06:02raektsdh: drop-in replacement with multimethods: https://gist.github.com/1031156
06:02raektsdh: mm, yes. I think so
06:05tsdhraek: I think I go with the modified protocol version. It might be faster and I get an error if I've forgotten some type.
06:06raek(discussion: http://groups.google.com/group/clojure-dev/browse_thread/thread/fb3a0b03bf3ef8ca/2b5701b57a28236b)
06:08ilyakIs there something like (map but not lazy?
06:09ilyaksomething that eagerly applies a function to each seq element
06:10raekilyak: (doall (map ...))
06:10tsdhilyak: (doall (map ...))?
06:10tsdhHaha!
06:11tsdh:-)
06:11tsdhraek: You were faster, but I typed in one more char.
06:11raekilyak: if you don't care about the values, use (dorun (map ...)) or (doseq [element coll] ...)
06:12raekdoseq has the same syntax as for and can be defined as (dorun (for ...))
06:13ilyakraek: That's two levels of indentation
06:13ilyakI guess I have to do my own domap
06:15raekilyak: doseq is only one level
06:17ilyaknope, doseq is at least five
06:17ilyakbecause "coll" gets really really pushed right
06:18ilyakthe problem with let-style [bin dings]
06:18ilyak is that they indent really bad if there's something complex in there
06:29raekthen you can break up the complex stuff in with helper functions or let some of the parts
06:34tsdhIn clj 1.3, is the doc function gone?
06:37clgvtsdh: not that I heard of
06:38tsdhGot it. It's in the clojure.repl namespace which is not used by default.
06:39clgvtsdh: it's used in the repl by default I guess ;)
06:41tsdhclgv: No, that's the problem. At least not in the REPLs I get with "lein repl" or SLIME.
06:41clgvtsdh: oh ok.
06:41clgvI had clojure 1.3 running in CCW
06:42clgvbut I don't know if there is a possible scenario of a clojure 1.2 repl implementation running 1.3 inside
06:42clojurebotAlles klar
06:42clgvclojurebot: aber sicher doch
06:42clojurebotI don't understand.
06:43tsdhclgv: What version? I've seen some discussion on the net that said only version of clojure 1.3 starting with alpha4 are affected.
06:45clgvtsdh: what exactly do you mean? I ran the current CCW with a clojure 1.3 alpha8 1-2 weeks ago
06:48tsdhclgv: Hm, ok. I use a very recent git version which I frequently update. But I'm pretty sure I have that clojure.repl is not loaded behavior since I've switched to 1.3 a few month ago.
06:49tsdhclgv: Maybe CCW knows about this and executes (use 'clojure.repl) for you.
06:50clgvtsdh: likely. they don't simply start a clojure.main/repl but use nrepl
06:57jonasenAnother proof reading / feedback request: https://github.com/jonase/mlx/wiki/Lottery
07:32fliebelReading this, I'm wondering, will the work for Clojure, or is the JVM to bloated for that? http://www.lowendbox.com/blog/yes-you-can-run-18-static-sites-on-a-64mb-link-1-vps/
07:33fliebelRunning Clojure rockets to 80MB instantly, but even before Android, phones ran Java, so what gives?
07:34fliebelIs it just a matter of choosing a smaller heap size?
07:41raek(re-find #"^...$" s) == (re-matches #"..." s)
08:46mattmitchellis it possible to have a defmacro define multiple argument sets?
08:46stuartsierrasure, just like a function
08:47pdk(doc defmacro)
08:47clojurebot"([name doc-string? attr-map? [params*] body] [name doc-string? attr-map? ([params*] body) + attr-map?]); Like defn, but the resulting function name is declared as a macro and will be used as a macro by the compiler when it is called."
08:47pdk(defmacro foo ([arg1 arg2] ...) ([arg1 arg2 arg3] ...))
08:48mattmitchellstrange, what do you guys think the problem might be with this: https://gist.github.com/1031351
08:53raekmattmitchell: you don't syntax-quote the single-arg version
08:54raekso you call the macro itself during macro expansion time
08:54raek([body] `(with-server default-core ~body))
08:55pdkif one of the arguments in the 2 arg version is optional
08:55pdkit's not gonna have an easy time telling which to run :p
08:55mattmitchellahh ok!
08:55mattmitchellthat makes sense
08:55mattmitchellpdk: yeah, i thought about that too
08:56mattmitchellpdk: maybe using a pre condition on the server-name arg?
08:59raek,((fn ([_] :one) ([_ & _] :many)) 1)
08:59clojurebot:one
12:10clgvs/clojar/clojure/
12:10sexpbot<clgv> always wanted a clojure slingshot :D
12:17clgvhmmm is it safe to use 'use multiple times?
12:17gfrlogwhat would be unsafe about it?
12:17clgvI mean multiple times for the same namespace in the same file?
12:18gfrlogwhy would you do that? normally you utilize (:use) within the (ns) declaration anyhow
12:19gfrlogI don't think I've ever written (use ...) within a clojure file
12:20clgvI build a DSL where I only want to have one (:use ..) in (ns ..) to keep it short, but I will have to load some other files which I want to do via a setup macro that I have to use anyway.
12:20clgvbut it seems safe to call 'use multiple times for the same namespace
12:21gfrlogit might well be that calling it the second time has no effect unless you give it the :reload option
12:21clgv&(doc use)
12:21sexpbot⟹ "([& args]); Like 'require, but also refers to each lib's namespace using clojure.core/refer. Use :use in the ns macro in preference to calling this directly. 'use accepts additional options in libspecs: :exclude, :only, :rename. The arguments and semantics for :exc... http://gist.github.com/1031738
12:22clgv,(doc use)
12:22clojurebot"([& args]); Like 'require, but also refers to each lib's namespace using clojure.core/refer. Use :use in the ns macro in preference to calling this directly. 'use accepts additional options in libspecs: :exclude, :only, :rename. The arguments and semantics for :exclude, :only, and :rename are the same as those documented for clojure.core/refer."
12:22clgvthere is a :reload option?
12:23gfrlogyeah it's weird that it's not mentioned there. I use it in the repl all the time.
12:23gfrlogI bet the emacs folks don't need to bother with all that, so I can see how you might never need to know about it
12:24clgvI dont use emacs ;)
12:24gfrlog~guards
12:24clojurebotSEIZE HIM!
12:25technomancy~botsnack
12:25clojurebotthanks; that was delicious. (nom nom nom)
12:25gfrlogclojurebot needs to eat after a good seizing
12:26arohnerdoes anyone have experience using c.c.lazy-xml on documents larger than RAM?
12:27no_mindis it possible to convert a lazy sequence to a list ?
12:28gfrlog,(class (list* (range 10)))
12:28clojurebotclojure.lang.ChunkedCons
12:28clgvxml documents larger than RAM: for that document I wonder what the average information per symbol is
12:28gfrlogno_mind: for most purposes there's no distinction
12:29gfrlogclgv: 1/100 of a bit? :)
12:29clgv&(type (doall (range 10)))
12:29sexpbot⟹ clojure.lang.LazySeq
12:29clgvhumm no list obviously...
12:29gfrlogstill a lazy seq, just already realized
12:29gfrlog,(class (list* (range 100000000000)))
12:29clojurebotjava.lang.ExceptionInInitializerError
12:29clgvgfrlog: lol @ 1/100 bit ;)
12:29gfrlog,(class (list* (range 1000000)))
12:29clojurebotclojure.lang.ChunkedCons
12:30gfrloghmmmm
12:30gfrlog,(class (list* (range)))
12:30clojurebotclojure.lang.ChunkedCons
12:30gfrlogweird
12:30no_mindgfrlog: I am generating nodes for enlive. Where I use map to geenrate nodes, I get clojure.lang.LazySeq@905c02 in the output
12:31gfrlogno_mind: if you're converting to string, try pr-str instead of str
12:31gfrlog,((juxt pr-str str) (range 10))
12:31clojurebot["(0 1 2 3 4 5 6 7 8 9)" "clojure.lang.LazySeq@9ebadac6"]
12:32no_mindgfrlog: nah, I need list not str
12:32arohnerclgv: I can tell you the doc is 6GB compressed, 30GB uncompressed. that should give you an approximation :-)
12:33gfrlog8/5 bits of info per byte of xml
12:33clgvarohner: uhhh less than 1/5 bit already ;) but probably much more
12:33scgilardi:reload is mentioned in the doc for require
12:33clgverr less^^
12:34gfrlogno_mind: I'm not sure what you mean by "get clojure.lang.LazySeq@905c02" then
12:35gfrlogscgilardi: ah hah -- right, because the doc for use refers to require
12:36no_mindgfrlog: the output shows clojure.lang.LazySeq@905c02 instead of html tags. Which means the lazy-seq is not returning the maps contained
12:37gfrlogno_mind: what is "the output"?
12:37gfrlogto me that implies you're converting the lazy seq to a string at some point
12:37no_mindgfrlog: leave it
12:39gfrlog,(let [x (range 10)] (map str [x (list* x)]))
12:39clojurebot("clojure.lang.LazySeq@9ebadac6" "(0 1 2 3 4 5 6 7 8 9)")
13:07amalloy-raek, tsdh: you can defmethod Object without worrying about order/overriding, because the multimethod dispatch will check isa? and find the most specific impl
13:16Cozeygood day. Is there a way to add system-scoped jars to cake project?
13:18amalloy-Cozey: there might be, but you shouldn't
13:18amalloy-hm. my bouncer seems to be stealing the plain "amalloy" nick
13:19gfrlogwell that was fun
13:19amalloy-gfrlog: that's bizarre. it won't let me. this is like being homeless
13:19gfrlogyes, just like it
13:19halfprogrammergfrlog: amalloy: wat u guys up to?
13:19Cozeyok so how should I do this: I will deploy to a container, which provides javax.mail.* classes, but for running tests etc i should have this jar somehow added to the project.
13:20gfrloghalfprogrammer: mischief?
13:20justinkohow do I get a symbol's id?
13:20halfprogrammerswapping identities
13:20justinkothe "unique identifer"
13:20dnolenjustinko: ?
13:20amalloyyou can do anything with juxt
13:20justinkodnolen: the hash id
13:21amalloy-gfrlog: i guess i don't understand irc at all. i have that nick registered, even
13:21dnolen,(hash 'foo)
13:21clojurebot-1634041172
13:21dnolen,(hash 'bar)
13:21clojurebot-1634229906
13:21gfrlogamalloy-: I don't think the NickServ asked me for a pw; but I'm in ERC so I'm not really sure of anything
13:22dnolenjustinko: I don't think those are guaranteed to be unique tho.
13:22dnolenjustinko: do you just want to check for object equality?
13:22justinkodnolen: sorry, I meant its function representation
13:22halfprogrammergfrlog: you started using emacs!
13:23gfrlogamalloy-: I guess the only reasonably way to deal with this is for you to consider me your voice from this point forward. If you ever want to say anything, just let me know.
13:23gfrloghalfprogrammer: so far just for IRC
13:23dnolenjustinko: ?
13:23justinkodnolen: the stuff that looks like adfs@fUre74s
13:23gfrlogman my fingers are always typing "reasonably" for "reasonable"
13:23dnolenjustinko: that's just Clojure munging to generate class names for fns.
13:23halfprogrammergfrlog: have fun
13:24kryftAre there fancier repls available than the standard + jline?
13:24dnolenkryft: cake
13:24amalloy-emacs
13:24gfrloghalfprogrammer: I gotta do things like google for how to switch buffers :(
13:24hiredmanhttps://github.com/hiredman/Repl
13:25justinkodnolen: fns?
13:25dnolenjustinko: functions.
13:25hiredmanhttp://www.thelastcitadel.com/images/Screenshot-Repl.png
13:25dnolen,(fn [])
13:25clojurebot#<sandbox$eval142$fn__143 sandbox$eval142$fn__143@92d6d2>
13:25dnolenjustinko: every function generates a class.
13:25halfprogrammergfrlog: ha ha ha. There is a w3m mode available in emacs for web surfing. use that :P
13:26gfrlogoh heavens
13:26kryftdnolen: Thanks.
13:26justinkodnolen: (def a "foo") <-- is there a unique identifier (or id) for this?
13:26justinkodnolen: for "a"
13:26kryfthiredman: Your repl attained perfection in January 2010?-)
13:27hiredmanYes
13:27dnolenjustinko: if such a thing a did exist, what would it be useful for?
13:27Cozeyok, this is the answer to my question: http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html
13:27hiredman(fyi it spins up 23 threads at start)
13:27chouserjustinko: like this? ## (var a)
13:27sexpbotjava.lang.Exception: Unable to resolve var: a in this context
13:28chouserbleh. #'user/a
13:28gfrlog,(let [a 10] (var a))
13:28clojurebotjava.lang.Exception: Unable to resolve var: a in this context
13:28gfrlogwhat are function parameters?
13:28chouserlocals
13:28chousernot vars
13:28amalloygfrlog: not easily accessible
13:28gfrloglocals is the formal term?
13:29chouserwell. formally they're variables in the mathematical sense
13:29gfrlogbut if we're discussing what (let ...) does, we would talk about locals?
13:29chouserbut locals highlights both that they're immutable and that they always have lexical scope
13:30chouserThat's the term Rich suggested once, and I like it.
13:30gfrlogsounds good to me
13:30kryftchouser: I love the final version of JoC, by the way. It inspired me to resume my learning project which was temporarily shelved before Christmas.
13:30justinkoin Ruby, you can call .object_id on any object, and it is guaranteed to be unique
13:30chouserkryft: excellent!
13:31hiredmanjustinko: ick
13:31justinko(I ordered JoC last night)
13:31amalloyjustinko: that doesn't really exist
13:31hiredmandoing things that rely on pointer identity is icky
13:31kryftchouser: Actually that's what inspired my repl question, as I was just about to try the interactive examples in chapter three. :) (Or, er four, or whatever it was. I've had too much work and too little sleep.)
13:32amalloyhiredman: meh. often that's true, but eg keywords are interned and that's useful
13:32seancorfieldraek: sorry i missed you re: cyclic dependency last night
13:32dnolenjustinko: but what do people use actually .object_id for?
13:32justinkoI'm just playing around in the repl and just wanted to see how things relate to each other: (def a "foo") (def b a)
13:32gfrlogamalloy: that's a performance thing, not a functionality thing
13:33amalloygfrlog: i could probably be convinced, but that was not my previous understanding
13:33seancorfieldthe cyclic dependency was compiling file A (a log4j appender) which depended on file B which depended on ... which imported c3p0 which relied on log4j which tried to load the appender in its initializer (while it was still being compiled)
13:33gfrlogjustinko: oh man, now you're going to have to find out about vars
13:34justinkodnolen: If there is an array of "foo"'s, and I want to get a specific "foo", I can find it via its object_id
13:34gfrlogamalloy: what was your understanding? My assumption is they are interned for faster comparisons
13:34amalloyjustinko: you can use ##(identical? 'a 'a) to test for that sort of thing
13:34sexpbot⟹ false
13:34dnolenjustinko: but doesn't Ruby have an object identity equality operator?
13:34gfrlog,(let [x "foo"] [(identical? x x) (identical? x "foo")])
13:34clojurebot[true true]
13:35amalloygfrlog: i guess maybe that's all it is
13:35amalloyi can't think of any other specific benefits
13:35gfrlogamalloy: although the results of that last call to clojurebot are making me question everything
13:35justinkoyes, you don't really need to ever use object_id, I just use it to look at things "under the hood"
13:36amalloygfrlog: java interns strings in some circumstances but not all
13:36gfrlogamalloy: compiler optimization?
13:36gkoHow to I change the value of clojure.java.javadoc/*core-java-api* in user.clj?
13:36gfrlog,(let [is-foo? #(= % "foo")] (is-foo? "foo"))
13:36clojurebottrue
13:36amalloy&(let [x "foo" y (str "fo" "o")] (identical? x y))
13:36sexpbot⟹ false
13:36dnolenjustinko: yeah there's nothing like that in Clojure, tho as you say, it's not really a useful feature.
13:36gfrlogah hah
13:36gfrlogthere it goes
13:36chousersybols aren't interned the way keywords are, because they support metadata
13:37chouserbut Java is free to intern strings
13:37amalloygfrlog: iirc java interns any string that appears as a constant in a source file, basically
13:37gfrlogthat is sensible
13:37amalloystrings you compute on the fly aren't interned
13:37chouserif anything, all this shows why you generally don't want to be using 'identical?'
13:38justinko,#(symbol "foo")
13:38clojurebot#<sandbox$eval154$fn__155 sandbox$eval154$fn__155@67e92a>
13:38dnolenchouser: except when you need to ;)
13:38chouserright-o
13:38amalloyjustinko: just the , will do. or & if you want to talk to sexpbot; no #
13:39amalloythe ##(+ 1 2) notation is for evals embedded in conversation, and needs two #s
13:39sexpbot⟹ 3
13:40justinko,#(keyword "foo")
13:40clojurebot#<sandbox$eval158$fn__159 sandbox$eval158$fn__159@b11287>
13:40justinkothat's guaranteed to be unique, right?
13:40amalloyuh
13:40amalloyas long as, again, you stop putting # in there
13:40amalloy#(...) is defining a new anonymous function and then throwing it away, so it will be different every time
13:40justinkoamalloy: I meant to do that
13:41gfrlogObject#hashCode says it usually returns the object's address, if not overridden
13:41justinkoohhh okay
13:41amalloy,[#(keyword "foo"), #(keyword "foo)]
13:41clojurebotEOF while reading string
13:41dnolenjustinko: but it's generally overidden in Clojure.
13:41amalloy,[#(keyword "foo"), #(keyword "foo")]
13:41clojurebot[#<sandbox$eval162$fn__163 sandbox$eval162$fn__163@157011e> #<sandbox$eval162$fn__165 sandbox$eval162$fn__165@ac8360>]
13:41gfrlog,(.hashCode (new Object))
13:41clojurebot3411100
13:41amalloydnolen: you can get at it anyway though
13:42amalloyi think it's in System
13:42hiredmanjustinko: are you sure you just don't want to call gensym?
13:42gfrlog,(System.identityHashCode :foo)
13:42clojurebotjava.lang.ClassNotFoundException: System.identityHashCode
13:42gfrlog,(System/identityHashCode :foo)
13:42clojurebot25476649
13:42amalloy&(let [x "test"] [(hash x) (System/identityHashCode x)])
13:42sexpbot⟹ [3556498 2933385]
13:42gfrloghow do I browse my previous statements in ERC?
13:43amalloyM-p, M-n
13:43gfrloglike up-arrow in other clients
13:43gfrlogvery good
13:43gfrlogthx
13:43amalloygfrlog: that's another nice thing about emacs. i don't use erc, but M-p is used all over so i figured it'd be right
13:44Scriptorprevious/next sentence
13:44gfrlogfunny I can loop back to the beginning of the history with M-n
13:44amalloyScriptor: except when it does something else :P
13:44gfrlogsee stuff I said yesterday
13:45Scriptorooh, that reminds me
13:45Scriptoris there a nice way to view all the clojars besides http://clojars.org/repo? Alternatively is there a clojure lib for scraping clojars?
13:45technomancyScriptor: there's lein-search
13:45clojurebotHuh?
13:46technomancyit uses lucene rather than scraping in recent versions
13:46technomancyhttps://github.com/technomancy/lein-search/tree/lucene if you are not on the latest from git
13:46technomancyworks with other mvn repos too
13:46halfprogrammergfrlog: C-h m - This will list down all the possible key combinations for the current buffer
13:47halfprogrammergfrlog: C-h k - Takes a input key combination and will tell you what it will do.
13:47amalloyhalfprogrammer: untrue
13:47Scriptortechnomancy: thanks!
13:47amalloyC-h m displays mode-specific bindings; C-h b displays all
13:48halfprogrammerI said for the current buffer. So whatever is applicable for the current modes :)
13:49amalloyhalfprogrammer: that wouldn't list C-b, for example
13:49amalloygranted he might not want that
13:49halfprogrammerhmm
13:52gfrlogcan I use VIM from emacs?
13:52Scriptorsupposedly
13:52arunknwhy would you want that?
13:52gfrlogthen I would know how to use emacs
13:52amalloygfrlog: (1) M-x shell, (2) vim, (3) cry
13:53arunkngfrlog: (4) use emacs again
13:53gfrlogI use vim because an old mathematician/CS-prof told me to
13:53justinkodnolen: you're right, hash isn't guaranteed to be unique: http://stackoverflow.com/questions/909843/java-how-to-get-the-unique-id-of-an-object-which-overrides-hashcode
13:54amalloysrsly though even if you love vim that would make you cry. emacs/shell will mess up all the vim bindings
13:54amalloy&(hash "x")
13:54sexpbot⟹ 120
13:54amalloy&(hash 120)
13:54sexpbot⟹ 120
13:54Scriptorisn't there an emacs plugin for vim?
13:54arunknI use vim when I am not using lisping.
13:54arunknmostly
13:54amalloyScriptor: viper
13:54gfrlogObject#hashCode isn't even guaranteed to be the address; docs just say it probably is
13:54amalloyoh, the other way around
13:54kryftAny vimpulse users here?
13:54gfrlogarunkn: it is possible to do both?
13:55Scriptorgfrlog: it's weird when you switch back
13:55Scriptorand you'll always be worse at one than the other, I think
13:55halfprogammersomewhat
13:55gfrlogScriptor: it strikes me as being similar to trying to maintain qwerty and dvorak skills
13:55gfrlogor ruby and python :)
13:56halfprogammersometimes i confuse the key bindings. but mostly I am okay with it
13:57Scriptorgfrlog: or xbox and ps3? :)
13:57gfrlogyes
13:57gfrlogor....pants and kilts?
13:57halfprogammerha ha ha
13:57Scriptorbut yea, I definitely still prefer vim for non-lispy stuff
13:57Scriptor(non-lispy coding)
13:58gfrlogScriptor: what advantages does it have? I don't know of any, I'm just locked in
13:58gfrlogother than familiarity when shelling into an HPUX machine
13:58amalloygfrlog: the main thing i hear cited is modal editing
13:59aaelonywhat is the most idiomatic way to "loop" over 2 or more collections in a nested fashion? Is something like (map #(myfn) %1) list) extensible to not only an i from 1 to n but also i & j, or even i & j & k ?
13:59Scriptorgfrlog: for emacs? The best sum-up I've heard is that emacs is a better dev environment, while vim is the better text editor (in terms of actually moving around making edits)
13:59halfprogammergfrlog: you can edit things very fast. Has excellent plugin support. And as amalloy said, it has modal editing.
13:59amalloyaaelony: ##(doc for) is great
13:59sexpbot⟹ "Macro ([seq-exprs body-expr]); List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, rightmost ... http://gist.github.com/1031908
13:59gfrlogif I abandon vim I could quit binding my capslocks to escape
14:00amalloygfrlog: and bind it to ctl instead
14:00gfrloghaha
14:00halfprogammergfrlog: it is especially useful when you are doing a ssh over a 56kbps line where echoing back the key you pressed takes abt 1 sec
14:00amalloy&(for [x (range 4) y (range 4)] [x y]) ; aaelony
14:00sexpbot⟹ ([0 0] [0 1] [0 2] [0 3] [1 0] [1 1] [1 2] [1 3] [2 0] [2 1] [2 2] [2 3] [3 0] [3 1] [3 2] [3 3])
14:00Scriptorheh, one nice thing about windows-on-macbook is that my thumb is always on C
14:01aaelonyexcellent, thanks! I like avoiding loop & recur :)
14:01amalloyaaelony: for is extremely powerful. read the docstring to see its other cool features
14:02halfprogammeram not too familiar with common lisp myself. but why does clojure not have CL style loop?
14:02aaelonyamalloy: thanks, re-reading the documentation. Often the docs are written in a way that takes me a while to truly understand what the docs are intending to describe.
14:02technomancyhalfprogammer: mostly because working with sequences is just more pleasant
14:04halfprogammerIts funny when CL books (land of lisp and practical common lisp) dedicate one full chapter to describe what a loop construct can do
14:04amalloyhalfprogammer: probably not enough chapters
14:04hiredmancan cl's loop execute in parallel?
14:06dnolenhalfprogammer: from what I understood CL's loop is there because TCO is not a requirement for CL. Clojure has lazy-sequences / recur.
14:06halfprogammerhiredman: no idea
14:06hiredmananswer is: no because the cl spec doesn't deal with threads at all
14:07hiredmansetting aside the imperative nature of cl's loop
14:07amalloydnolen: that seems overly specific; i think it's there because it lets you express a lot of notions compactly, much like clojure's for
14:07amalloymy main gripe is its imperative nature, as well
14:08dnolenamalloy: why? loop does what map/filter/reduce does in Clojure in constant space.
14:08hiredmanclojurebot: what can the hyperspec tell us about this problem?
14:08clojurebothyperspec is not applicable
14:09hiredmanclojurebot: please solve my problems using the knowledge contained in the hyperspec
14:09clojurebothyperspec is not applicable
14:11chouserWhen suggesting new features for 'for' or 'doseq', rhickey has at times pointed to the size of the docs for CL's LOOP as sufficient reason for why we don't want it.
14:12hiredmanmmmm
14:12chouserhm. that was pithy and succinct in my head. oh well.
14:12halfprogammerhmm
14:13amalloychouser: pithy, succint, concise, and terse?
14:13chouseramalloy: and also short
14:19jweiss_in a construct like (take-while #(not (zip/end? %)) (iterate f root)), where f does stuff with the tree and returns zip/next, the seq stops one too soon. it doesn't process the last node. anyone know how to fix that?
14:20hiredmanhave f return [node (zip/next node)]
14:22gfrlogamalloy: how'd you get your nick back?
14:22amalloygfrlog: went around znc and logged into freenode directly
14:22amalloywhen Raynes wakes up or whatever, i'll make him explain irc to me again
14:24amalloy-`amalloy: maybe you could have used juxt?
14:24gfrlogso sorry
14:24arohnerchouser: did your lazy-xml improvements get published anywhere?
14:25halfprogammergfrlog: http://www.irchelp.org/irchelp/irctutorial.html
14:25amalloyi hope there's an etiquette section in there :P
14:26gfrloghalfprogammer: earlier amalloy was on the alternate nick "amalloy-" and for some reason I was able to switch to "amalloy" but he wasn't
14:26Scriptorgfrlog: it didn't ask you to auth with nickserv?
14:26gfrlogScriptor: not that I noticed, which I thought was weird. But I'm on ERC so it's possible I didn't see it
14:27Scriptorthe promp will show up in the mini-buffer thing at the bottom
14:29chouserarohner: they're wip in clojure.data.cml
14:29chouserclojure.data.xml
14:29halfprogammergfrlog: http://www.magic-league.com/play/register_nick.php
14:29halfprogammergfrlog: ^ how to register your nick
14:29gfrloghalfprogammer: yeah, both amalloy and I have done that
14:29amalloyhalfprogammer: i get the feeling you're providing helpful advice to people who aren't here
14:30gfrlogamalloy: ?
14:30amalloygfrlog: in the sense that this would be cool stuff to know but isn't really relevant to the issues you and i were having
14:30gfrloggotcha
14:31arohnerchouser: thanks
14:31halfprogammeramalloy: I thought you have not registred your nick and gfrlog was able to use your nick. My bad.
14:31amalloyhalfprogammer: my nick is registered
14:31amalloywhich is why i don't understand that gfrlog could use it
14:31amalloyand i couldn't :P
14:32gfrloghalfprogammer: the weird parts are 1) he IS registered and 2) he couldn't switch to it himself
14:32ScriptorI think gfrlog just missed the nickserv password prompt, it's not very obvious
14:32gfrloganybody know any registered nicks I could try?
14:32Scriptoryou can switch to a registered nick but only temporarily, I think
14:32amalloyScriptor: if you can "miss" the password prompt it's not really securing anything, is it?
14:32amalloyi see
14:32halfprogammertry mine
14:33gfrloghalfprogammer: somebody not in the room I mean
14:33gfrlogerc automatically appends a punctuation apparently
14:33halfprogammerhmm
14:33Scriptorgfrlog: try Scriptonomicon
14:33Scriptoralt nick of mine
14:33ScriptorI think
14:33Scriptonomiconhmm
14:33halfprogammerhey, try rhickey :P
14:33ScriptonomiconI think something happened
14:34Scriptoralright, now is there a prompt at the very bottom?
14:34Scriptonomiconnothing obvious
14:34Scriptonomiconlemme check the buffer list
14:34Scriptorhmm, maybe I forgot to group it
14:34Scriptonomiconor just wait a minute and see if it kicks me out :)
14:34ScriptonomiconC-x o doesn't switch to anything...
14:34no_mindI have a map expresion which calls a function f returning map. The result of map expression is a sequence of maps as required. The problem is, for certain conditions, the function f called by map returns a sequence of maps instead of map. How do I ensure that the maps in the sequence of maps returned by f are merged with other maps ?
14:34ScriptorScriptonomicon: that switches windows
14:34Scriptortry C-x b
14:35jcromartieHow do I make "binding" play well with parallelized routines
14:35Scriptonomiconnot seeing anything
14:35gfrlog`dangit
14:35amalloyno_mind: make it always return a sequance of maps, sometimes only one item long
14:35jcromartiehypothetically: I have a web app, and I want to render parts of it in parallel, and I use (binding [*user* current-user] (pmap render parts))
14:36Scriptorgfrlog`: you do see a horizontal blank space right below your buffer, right?
14:36amalloy"sequance". incredible
14:36jcromartieinstead of passing all of the interesting "global" (really per-request) special variables in to each function that might be interested in them
14:36jweiss_hiredman, sorry, your earlier suggestion you meant (take-while (fn [[i j]] (not= i j)) (iterate f root))
14:36gfrlog`Scriptor: yes
14:36no_mindamalloy: ok
14:36Scriptorand nothing showed up in there?
14:36gfrlog`no
14:36amalloy&(doc bound-fn) is often helpful for that, jcromartie
14:36sexpbot⟹ "Macro ([& fntail]); Returns a function defined by the given fntail, which will install the same bindings in effect as in the thread at the time bound-fn was called. This may be used to define a helper function which runs on a different thread, but needs the same bindings in place."
14:37Scriptorweird
14:37jcromartieawesome, amalloy
14:37gfrlog`there's a "[i]" thing in the buffer status bar that I think highlighted when I first switched to Scriptonomicon
14:37jcromartiealso http://cemerick.com/2009/11/03/be-mindful-of-clojures-binding/
14:37Scriptorgfrlog`: right click it and it'll switch you to that
14:37gfrlog`amalloy: that is a terribly interesting function
14:37gfrlog`Scriptor: I'm using emacs over SSH, not sure right-clicking will be effective
14:37halfprogammerhalfasleep. bfn
14:37gfrlog`didn't do anything
14:38Scriptorah
14:42gfrlogso I guess it's probably my fault with ERC. still doesn't explain why amalloy couldn't switch though
14:42amalloygfrlog: i assume that's an issue with my znc config somehow
14:47arohnerchouser: I'm still seeing memory usage go up when doing (dorun (pull-parser/lazy-source-seq))
14:52amalloyarohner: of course memory usage will go up. it's using memory. but it will be memory that's eligible for garbage collection, in theory
14:57zerokarmalefthttps://gist.github.com/1032035 <= is this a result of floating point error or what?
14:57opqdonutno
14:58opqdonutthe latter predicate is false for 2.725
14:58opqdonutso no numbers are taken
14:58opqdonutyou might've been looking for filter
14:58zerokarmaleftoh derp
14:58opqdonutor (take-while #(<= % upper) (drop-while #(< lower %) measurements))
14:59chouserarohner: I've got unit tests in there that are meant to demonstrate that xml events and nodes are not being help unnecessarily.
15:00chouserarohner: if you can find or write a test like that which fails, that would be a huge help.
15:01chouserarohner: I haven't gotten around to testing large inputs yet, but in the small it seems to be working in several cases where it used to hold onto too much.
15:04zakwilsonIs there a way to get ClojureQL to use fully qualified column names all the time? I want to be able to joins on tables that have columns of the same names and get back maps that aren't too hard to use in updates.
15:28mattmitchellhow do i test if a variable is bound or unbound?
15:28amalloy&(doc bound?)
15:28sexpbot⟹ "([& vars]); Returns true if all of the vars provided as arguments have any bound value, root or thread-local. Implies that deref'ing the provided vars will succeed. Returns true if no vars are provided."
15:29chouserhuh. seems weird that's variatic
15:29amalloymattmitchell: just too simple sometimes, eh?
15:29amalloychouser: you'd prefer [vars], or [var]?
15:31mattmitchellamalloy: :) well I tried that, but seeing the docs there, I noticed that it takes a var, so I had to do (bound? (var my-un-bound-var))
15:31amalloyindeed, or #'my-var
15:31mattmitchellamalloy: ahh ok coo
15:32mattmitchellcool that is
15:32hiredmanonly one usage in src/clj with a single arg
15:35hiredmanclojurebot: unix vm is http://www.cs.gmu.edu/cne/itcore/virtualmachine/unix.htm
15:35clojurebotYou don't have to tell me twice.
15:36gfrloghiredman: does clojurebot keep old bindings?
15:36hiredmanold bindings?
15:37gfrlogyou just gave it a definition right?
15:37gfrlogbound "unix vm" to that url?
15:38hiredmanyes, clojurebot stores them in a derby db on disk
15:38gfrlogand they can be overwritten?
15:38hiredmanthey can be deleted and added to
15:38gfrloghmm
15:38hiredman(it is effectively a multi-map)
15:39gfrlogah, so it gives a random value?
15:39gfrlog~unix vm
15:39clojurebotunix vm is http://www.cs.gmu.edu/cne/itcore/virtualmachine/unix.htm
15:39hiredmanyes
15:39gfrlogokay. then my question is less important.
15:39gfrlogI thought it would be worrying that good information gets overwritten
15:39hiredmanand you and specify other relations besides 'is'
15:40hiredmanclojurebot: two things |are| more than one thing
15:40clojurebotYou don't have to tell me twice.
15:40gfrlogclojurebot: unix vm isn't http://www.yahoo.com
15:40clojurebotit's a UNIX system! I know this!
15:40hiredmanclojurebot: two things?
15:40clojurebottwo things are more than one thing
15:40gfrlog~two things
15:40clojurebottwo things are more than one thing
15:40hiredmanfor relationships besides 'is' you use the pipe syntax
15:40gfrlogso just for grammar?
15:41hiredmanfor now
15:41gfrlogcool
15:42EviousAre there any good guides/tutorials/references about functional programming in Clojure? Specifically, the macros/conventions/tricks developed for said purpose?
15:42hiredmanclojurebot's data layer is kind of disgusting
15:42gfrlog:)
15:43Scriptorwait, clojurebot can be trained?
15:43gfrlogclojurebot: Scriptor |doesn't| know you can be trained
15:43clojurebotYou don't have to tell me twice.
15:43gfrlogclojurebot: Scriptor?
15:43clojurebotScriptor doesn't know you can be trained
15:44gfrlogaw dang
15:44Scriptorgfrlog: sit
15:44ScriptorI guess you might need to indicate what 'you' is referring to
15:45gfrlogit's got a bit of templating I think...at least for nicks
16:00cemerickhiredman: derby? How quaint. :-)
16:01cemerickI remember killing myself trying to get cloudscape working back in the day.
16:10mattmitchellI need to write a test, that proves that a clojure fn calls a method on a java object. How can I do this?
16:11opqdonutproduce a mock object that logs calls and then delegates them to the real object
16:11opqdonutand inject it
16:12tsdhAre java enum constants not constant things I can use with `case'?
16:12mattmitchellopqdonut: how can i create a java mock in clojure?
16:12opqdonutuse, e.g., reify
16:12hiredmantsdh: java enums are, if I recall, ints
16:13hiredmanbut there are a couple of different ways to use them together with case
16:13tsdhhiredman: No, they are basically singleton objects I think.
16:13hiredmantsdh: incorrect
16:14tsdhhiredman: Really, I mean you can have enums with constructors and methods...
16:14hiredmansure, but each "constant" is infact an int
16:15tsdhhiredman: Hm, but then, why does my (case Foo/BAR 1 Foo/Baz 2 (throw (RuntimeException))) always throw?
16:17amalloyhiredman: those statements stopped being true in java 1.5, or else you're being misunderstood
16:18hiredmanamalloy: no kidding
16:18amalloyjava has enums, which are basically classes with N "singleton" instances, one for each enum constant
16:18tsdhFrom the JLS: An enum constant defines an instance of the enum type.
16:19hiredmanwell, then, carry on
16:19amalloythey're kinda a pain to use from clojure though, i believe
16:19tsdhOk, so that means I cannot use enum constants in case, right?
16:19amalloytsdh: there's an open ticket on jira somewhere discussing that
16:21cemerickEnum support will probably never land in case
16:21cemericktsdh: you can get around it to some extent by doing something like: http://cemerick.com/2010/08/03/enhancing-clojures-case-to-evaluate-dispatch-values/
16:22amalloycemerick: when is the SoC survey closing? i need to see the results!
16:22cemerickamalloy: Monday
16:22cemerickGot to give the weekend tinkerers time to get in
16:22tsdhcemerick: Oh, great! I'll use that.
16:23gfrlogls
16:23gfrlogwhoops
16:23gfrlogwell that could have been worse
16:23cemericktsdh: Heed the note at the top of that post. :-)
16:23amalloy[sudo] Password for gfrlog:
16:23gfrlogiamrhickey123
16:23Bronsallol
16:23mattmitchellhmm, so I have an instance of a java object. Using reify, I'm not sure if that will allow me to mock a method on that object?
16:23gfrlogaw dang
16:24amalloymattmitchell: reify only supports interfaces
16:24mattmitchellamalloy: ahh ok. Is there a way to mock a java class instance?
16:24cemericktsdh: it works fine for me for enums, but if you AOT code that uses case+ and attempt to run it with a different version of an enum class on the classpath, bad things may happen
16:24tsdhcemerick: My enums come from an external java library that is in a jar. So no AOT here.
16:24amalloyyour path of least resistance is probably to proxy the class, but someone else probably knows a "better" way
16:24mattmitchellamalloy: rather, a method on a java object?
16:25cemericktsdh: AOT of your Clojure code; has nothing to do with the Java library
16:25raekmattmitchell: if the code you need to test accesses the object though an interface, it's very easy to make a mock object that implements the same interface
16:25amalloy&(.size (proxy [java.util.ArrayList] [] (size [] 10)))
16:25sexpbotjava.lang.IllegalStateException: Var null/null is unbound.
16:25cemerickSo, if you AOT your Clojure with v1 of the java lib, but then run the AOT'd classfiles with v1.1 of the java lib, things *may* break
16:25amalloy,(.size (proxy [java.util.ArrayList] [] (size [] 10)))
16:25clojurebotjava.lang.RuntimeException: java.lang.IllegalStateException: Var null/null is unbound.
16:25tsdhcemerick: I only compile one different namespace containing only gen-classes for some custom exceptions. That's ok, isn't it?
16:26amalloyhrm. anyyway mattmitchell, that's kinda-vaguely how you might mock out a method
16:26opqdonutmattmitchell: unfortunately there's no easy way if the method is not in an interface
16:27cemericktsdh: Sounds like it — just make sure the code that's using case+ isn't being transitively included in the AOT.
16:27mattmitchellok yeah, this is just a class with no interface
16:27mattmitchellhttp://lucene.apache.org/solr/api/org/apache/solr/core/CoreContainer.html
16:27opqdonutbut being able to unit-test things like that means that you need to structure your code in a specific way
16:27tsdhcemerick: I added a notice so that I'll never forget.
16:27cemerickheh
16:29fliebelcemerick: Do you have any fancy visualization plans for the survey?
16:30cemerickfliebel: Nothing beyond what I did for the first one.
16:30cemerickUnless someone has other grand ideas.
16:31cemerickI remember seeing something equivalent to a mod_ring floating around a few months ago. Anyone have a link handy?
16:34tsdhcemerick: I get a compile error with your case+ (http://pastebin.com/CMzVs8G5)
16:34Scriptortsdh: getting an unknown paste id on that
16:35fliebelcemerick: Really? Awesome! I need to compare that to ring-fastcgi.
16:35tsdhScriptor: I don't. Maybe your IRC client copies the trailing ) ?
16:35tsdhhttp://pastebin.com/CMzVs8G5
16:35justinkomulti-methods are blowing my mind
16:36cemericktsdh: funky; what if you pull (EdgeDirection/INOUT nil) out into two clauses?
16:36cemericktsdh: which version of Clojure?
16:36tsdhcemerick: Tried that, same error. I use 1.3 from git.
16:36tsdhcemerick: State as of yesterday.
16:37Scriptortsdh: oh, yes it does
16:37Scriptordamnit ERC
16:37Scriptorand damnit eyes for checking for that and still not seeing it earlier
16:37tsdhScriptor: I use rcirc which DTRT.
16:37cemericktsdh: hrm, I suspect the macro doesn't work under 1.3 — I've never seen an error like that before.
16:37fliebelcemerick: This was my answer to the all-in-one server: http://pepijndevos.nl/the-perfect-server/
16:38Scriptorcemerick: I found a link about using a WAR file and using apache as a proxy to tomcat, assuming that's probably not it though?
16:38cemerickfliebel: yours is what I was thinking of :-)
16:38cemerickScriptor: ^^
16:39fliebelcemerick: Oh, I thought you had something in the other half of the venn.
16:40amalloyjustinko: i find myself wanting to replace every if/cond with a multimethod. kinda overdoing it though
16:40Scriptorah, ring_fastcgi
16:42gfrlogfliebel: clever email obfuscation
16:42fliebelgfrlog: You mean the rot13? :) I had one in Clojure as well...
16:43gfrlogfliebel: I like it because to a bot it still looks like a plain email
16:43fliebelgfrlog: Yea, I figured I should write a DSL that can be expressed in valid email addresses.
16:44gfrlogunless it checks tlds...I've never heard of .pbz
16:45fliebelgfrlog: Would be fun to set up that as an email and see how much spam it gets :)
16:46gfrlogpbz is the cTLD of the country Peanut Butterz
16:47tsdhcemerick: Really strange. The expansion looks correct to me. http://pastebin.com/THwz4N2S
16:48tsdhcemerick: But haveing the code in front of me, I can at least understand the error message.
16:49amalloytsdh: you can't put objects in code :P
16:49amalloyie, the expansion does NOT look good, because you would never type #<EdgeDirection INOUT> in code yourself
16:50tsdhamalloy: Exactly
16:50tsdhand the solution is also provided in the error message...
16:50fliebelgfrlog: http://en.wikipedia.org/wiki/.bz
16:50gfrlog,(read-string "#<Foo BAR>")
16:50clojurebotjava.lang.RuntimeException: java.lang.Exception: Unreadable form
16:50amalloyyes, although i don't know that defining a print-dup resolves the issue?
16:51gfrlogah ccTLD is the term
16:52amalloytsdh: fwiw, (fn [i] (normal-edge? i)) is just normal-edge?, and the next is just (complement normal-edge?)
16:52tsdhamalloy: indeed.
16:52cemericktsdh: The more sane thing would be to, when it's clear that clauses are known to be enums, code is emitted to match on corresponding enums, and not the enum values themselves.
16:52amalloygfrlog: does what?
16:53gfrlogamalloy: lets you refactor your code purely by deleting things
16:53cemerickI think that's how ataggart was making enums work in his early 1.3 case patches, anyway.
16:53gfrlogprobably only the first of the two is an example of that
16:54mattmitchellis there a way to alias a var so that it points to another var in a diff namespace?
16:54tsdhcemerick: First I've thought wrapping a (binding [*print-dup* true] ...) around the case would help, but that's not true. What's a "corresponding enum"?
16:56tsdhAh, I need to add a (defmethod print-dup ...)
16:56cemericktsdh: case+ would determine that the dispatch values evaluate to enums, and emit a case form that used symbols for those enums instead of the enums themselves. So an enum Foo/Bar would turn into 'some.package.Foo/Bar.
16:57cemericktsdh: I think the print-dup hint is a red herring rabbit hole in this case. :-)
16:57tsdh:-)
16:58cemericktsdh: I have that blog post in my browser-tab-backlog; might take a whack at revising the code therein to be 1.3-friendly next week-ish.
16:58tsdhI'll check your blog.
16:59mattmitchellHmm, I have a main ns. I want require other ns's and alias to a short name within the main ns. The problem is, my other ns's need a var in the main set in order to function. If I require the other ns's in the main ns, then "use" the main ns in the others, I get "java.lang.Exception: Cyclic load dependency"
16:59cemericktsdh: what, you don't subscribe already?
16:59mattmitchell^ I know that sounds confusing
16:59cemerick;-)
17:03gfrlogah good now I'm not the only one doing that
17:04gfrlogspeaking of TLDs, the internets say ICANN will approve commercial TLDs
17:06hiredmanclojurebot: destructuring
17:06clojurebotdestructuring is http://clojure.org/special_forms#let
17:09gfrlogamalloy: figure it out yet?
17:09amalloygfrlog: yes
20:00cwmaguireIs there a function to run multiple functions with a parameter? e.g. (for [f [+ - *]] (f 1))
20:02midscwmaguire: juxt? http://clojuredocs.org/clojure_core/clojure.core/juxt
20:03cwmaguireof course!
20:03cwmaguirethanks
20:03cwmaguireI'm rusty
20:05mids,((juxt + - /) 4 3)
20:05clojurebot[7 1 4/3]
20:11__name__Everyone loves juxt.
20:17amalloy__name__: and if you don't, we'll (juxt draw quarter) you
21:08davekongI clojure-contrib.jar to my classpath but am having trouble loading the namespace at the REPL, what should I be typing to add e.g. the seq namespace or say all of them
21:10amalloydavekong: you can't require them all at once; you need to specify each *namespace* you want, not each *library* (whereas in project.clj you specify at a library level)
21:11amalloyso eg (use 'clojure.contrib.seq) (separate even? (range 10))
21:16davekongamalloy: thanks