#clojure logs

2014-03-08

00:07dsrxfirefaux: "clojure programming" has a great section on their implementation, although I don't think it goes through the source or anything
00:08dsrxhm, but probably not helpful for writing your own
00:29KlaufirI see (= (.concat "a" "b") "ab") . Where does the .concat function come from?
00:36TravisDKlaufir: It's actually short hand for (. "a" concat "b"), which is the calling the concat method of the java String "a" with argument "b"
00:36TravisDSo it's the concat method of java.lang.String
00:36TravisDone extra the in there
00:51abaranoskyI've got some carmine values in Redis encoded using Snappy. I want to thaw them out at the REPL for debugging purposes but the Clojure reader is barfing on the string printed out in the REids monitoring logs.... any ideas?
00:56KlaufirTravisD: thanks
01:59muhoofirefaux: there is also a thing, i think, called "clojure atlas" which maps all the interfaces in the datastructures, IIRC
02:03firefauxthat's interesting, but it's not free
02:03firefauxor at least it says you can try it for free for a little while
02:04firefauxI can figure out what implements what pretty easily, what I want is essentially a javadoc for the datastructures
02:14firefauxalright, I'll figure this stuff out in the morning
02:14firefauxit's late
02:22MattAbbottHas anyone here used net.async?
02:22FrozenlockIs there a function to pause an atom watch?
02:23MattAbbottNot to my knowledge; is there a reason you can't just remove it and add it again later?
02:24FrozenlockI don't think it would cause any problem... I was just hoping for an easier approach :p
02:25MattAbbottI suppose you could have a boolean that the watch function checks each time it's called, but that doesn't sound any cleaner...
02:26FrozenlockYou mean with a dynamic binding around it? (binding [*watch-enable* false] (do-some-stuff ...))
02:31MattAbbottor (def watch-enabled (atom true)) (add-watch _atom nil (fn [k r o n] (if (deref watch-enabled) (do-some-stuff)))
02:31MattAbbottjust spitballing
02:32FrozenlockIs one preferable?
02:38MattAbbottI honestly couldn't tell you. I haven't used dynamics enough to know their proper uses
02:50mr-foobaris there a way to read edn (with custom tags) in clojurescript ?
02:54ddellacostamr-foobar: cljs.reader does it, not sure about custom tags though
02:55ddellacostamr-foobar: ah, should be possible: https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/reader.cljs#L575-L580
02:55ddellacostamr-foobar: neat, didn't know that was possible until you asked the question actually
02:57mr-foobarddellacosta: alright ! will try it out.
02:57FrozenlockOh that's nice!
02:57ddellacostayeah, cool stuff.
03:00mr-foobarha ha, I think I had an empty untitled.cljs ... and lein cljsbuild auto was throwing a NullPointerException #or-at-least-thats-what-I-think-happened
03:28SegFaultAXWhat have I done? https://gist.github.com/SegFaultAX/9427306
03:28amalloySegFaultAX: reimplemented google guava?
03:28amalloyor one of the other functional-java libraries out there
03:30SegFaultAXamalloy: :D
03:30SegFaultAXamalloy: Well it's a fun demonstration anyway.
03:30amalloysure. i did the same thing the first time i wrote java after learning clojure
03:31SegFaultAXI haven't really had a need to with Guava being a thing and all. But someone asked me what map, filter, and reduce might look like in Java-land.
03:32SegFaultAXSo this is, I think, the minimal implementation.
03:32chareok guys why does clojure not have something that can compete with rails, its really sad that we are still using imperative based languages like ruby and python, why are we not helping clojure win
03:34SegFaultAXchare: That's a common question. The usual answer is that the Clojure community tends to prefer small, focused libraries composed together over large monolithic frameworks.
03:36chareSegFaultAX: ok so then what are those libraries that you would put together to mimic rails
03:36SegFaultAXchare: Have you looked at luminus? It's a good starting point.
03:37chareSegFaultAX: no, i only have heard of compojure
03:38SegFaultAXchare: Ring and Compojure are at the center of any clojure web app.
03:38SegFaultAXI also really like liberator.
03:42bob2I'm getting less convinced by it - all the hooks aside from the last (ie post! etc) are racey
03:57SegFaultAXamalloy: Had to do it: https://gist.github.com/SegFaultAX/9427306#file-main-java-L49
03:58amalloySegFaultAX: incidentally, your generic types aren't as broad as they could be
03:59SegFaultAXamalloy: How can I make it unify to object automatically?
03:59SegFaultAXOr the nearest super.
04:00SegFaultAXCan I just set an upper bound explicitly on U? `U extends Object` or something.
04:02amalloypublic static <T, U, V extends U> U reduce(Function2<V, ? super T, V>, Iterable<? extends T>, V) looks vaguely right to me, although of course i haven't tried it
04:03SegFaultAXOh yea, wildcards. Good call.
04:03amalloyU extends Object is meaningless. everything extends Object
04:03SegFaultAXI don't know how to get Java to unify types like that.
04:04amalloyi don't understand what you're asking. i know what unification is and how it applies to types, but "unify to object automatically"? what is "it"? what's automatic?
04:06SegFaultAXGiven types A, B, and C, that share a common supertype, find the most specific super of all three. So like Integer Integer Integer would be Integer, but Integer String Boolean would be Object
04:07amalloyokay...so that's a function with four type args: public <R,A extends R, B extends R, C extends R> R(A a, B b, C c)?
04:08SegFaultAXamalloy: Yes, exactly. Thanks.
04:12SegFaultAXIs it possible to represent that with an arbitrary number of types?
04:15amalloySegFaultAX: how could you write a function that involves an arbitrary number of types at all?
04:16amalloyif you arbitrarily choose any N ahead of time, it's easy to write that function, so i assume that's not what you meant
04:18amalloy(and if you don't choose the N ahead of time, the function can't possibly have a signature, which is what i meant)
04:18SegFaultAXConsider an call with an arbitrary number of Function<T, ? extends R>
04:19SegFaultAXSo like juxt(Function<T, ? extends R>... fns)
04:20amalloy? is fixed there, that's just one type
04:20SegFaultAXamalloy: I see. Do you understand what I meant, though?
04:22amalloySegFaultAX: i'm not sure. that seems like the right type declaration to me
04:22amalloyassuming reasonable bindings for T and R
04:25SegFaultAXWell think of the function juxt in Clojure. Juxt should return a function that takes 1 argument (eg a Function<T,U>) and returns a list of invocations on that argument. But each function could have a different return type, so you'd want to get the nearest supertype of all those return types.
04:25SegFaultAXI'm trying to figure out how to model that in Java generics.
04:27amalloywell, your collection of functions will be stored in some List<Function<X,Y>>, where X and Y are fixed (ie, not wildcards)
04:28amalloyso whatever type is the common supertype of all the return values, will need to be a parametric type of that collection
04:28amalloythen you just need to specify a bound for X and Y which is compatible, right?
04:29SegFaultAXRight.
04:29SegFaultAXWell the input is fixed.
04:30SegFaultAXIt's a List<Function<T, something>> and I'll return a Function<T, List<common supertype>>
04:30SegFaultAXJust like juxt, we assume all functions have a compatible domain.
04:31amalloyyou're constraining T too much there again. you want a List<Function<? super T, something>>...
04:31amalloyie, it's fine if one of the functions accepts any Object, they don't have to accept only String
04:32SegFaultAXAh, yes.
04:32SegFaultAXAnyway, it's the `something` part I'm not sure how to make Java do (or if it's possible to express)
04:34amalloypublic <I,O,In super I, Out extends O> Function<I,O> juxt(Function<In,Out>... fs) maybe?
04:35SegFaultAXThat could work.
04:35SegFaultAXLet me try.
04:35amalloyreally i'm just taking the "obvious" two-type signature and introducing a new variable for each type that needs to "bend" in one direction or the other
04:36amalloyalthough what i actually wrote can be simplified to: public <I,O> Function<I,O> juxt(Function<? super I, ? extends O>... fs)
04:37SegFaultAXYea, I simplified.
04:37SegFaultAXI took your meaning anyway :)
04:37amalloydoes it work?
04:41SegFaultAXActually the additional type parameters make it easier to type.
04:41SegFaultAXErm, physically type that is. :)
04:41amalloyif you say so
04:47SegFaultAXIs <Foo super Bar> not valid?
04:47SegFaultAXBecause when I refactored it to use a named type bound, it complained about syntax.
04:48SegFaultAX(extends is obviously fine)
04:48amalloysuper and extends should fit in the same contexts. why don't you paste the actual declaration?
04:49SegFaultAXamalloy: Apparently not a thing http://stackoverflow.com/questions/4902723/why-cant-a-java-type-parameter-have-a-lower-bound
04:50SegFaultAXBecause I was trying to get it to type check first, but it wouldn't.
04:50amalloyoh, sure. <Foo super Bar> is never needed, because you can write <Bar extends Foo>
04:50amalloysuper is only needed for ? bounds
04:50SegFaultAXYea
04:51SegFaultAXBut I didn't know super didn't work in that context.
04:51amalloyi didn't either
04:52SegFaultAXOh switching them can't work either.
04:52SegFaultAXDerp.
04:54amalloywell, that's about the extend of my generics expertise
04:54amalloy*extent
04:55SegFaultAXYea, no forward decls of type variables or lower bounds.
05:09ddellacostais it bad to use &env in a macro?
05:09ddellacostaI'm not sure how else to get ahold of the values of symbols at macro evaluation time.
05:12clgvddellacosta: not by default, depends what you do with it
05:13clgvddellacosta: you really need the value of a symbol on macro expansion time?
05:13ddellacostaclgv: actually, I'm not even sure it's going to help me get at the value of the passed in symbols...totally lost as to how to do that. :-(
05:13ddellacostaclgv: yeah
05:13ddellacostaclgv: I suppose there are reasons that I shouldn't be doing that?
05:13clgvddellacosta: are the symbols local bindings or refering to variables?
05:13ddellacostareferring to variables
05:14clgvthen you can resolve them
05:14clgv,(resolve 'clojure.core/inc)
05:14ddellacostaclgv: resolve gives me nil
05:14clojurebot#'clojure.core/inc
05:14clgv,(resolve 'inc)
05:14clojurebot#'clojure.core/inc
05:14ddellacostathat doesn't work for local bindings
05:14clgvright you said variables and not local bindings. that's why I asked ;)
05:14ddellacostaclgv: oh, sorry
05:15ddellacostaI thought you meant more...colloquially. haha
05:15ddellacostaclgv: my confusion
05:15ddellacostaum, anyways, yeah, they *are* local bindings
05:16ddellacostaclgv: I'm wondering if actually this should just be a function.
05:16clgvyeah, you have to lookup values (if any) from &env - as far as I know there is no other way if you need the value on macro expansion. but maybe you dont and just should generate code that is using the value...
05:17clgvyou'll only need the value if there is something to calculate during the macro expansion based on the value
05:18ddellacostaclgv: yeah, now that I'm thinking about it I think that I've been doing it all wrong...it should not be a macro I believe. Whenever I run into this kind of problem I realize I probably didn't need a macro in the first place, since I can use the reader in functions just as easily.
05:18ddellacostaclgv: anyways, thanks, sorry again for the confusion...
05:19clgvddellacosta: well, if you want a second opionion just post the idea of what you want to do with a small example
05:19ddellacostaclgv: okay, let me give this a shot first...
05:42clgvstrange. tools.cli gives ma the value of an option that was processed in the :arguments value...
05:49chareWhy does def have this restriction: ...you may be tempted to try to write it as a function. ...def is a special form. You must generate def at macro time; you cannot make “dynamic” calls to def at runtime.
05:51clgvchare: can you describe your problem with that?
05:51charewhy can't you call def in a function???
05:51lazybotchare: Yes, 100% for sure.
05:52clgvchare: you can, but it does not make sense
05:52charewhat do you meanL
05:53clgvchare: "def" is used to create a global namespace variable that is bound to some value (including functions)
05:53chareso why would that make calling it in a function a problem
05:53clgvchare: you probably want "let" since you seem to want names for "local variables" (= local bindings) in a functions
05:54chareNO
05:54ddellacostaclgv: it was all much easier as a simple function. I was making things much harder on myself by making it into a macro. :-P
05:55clgv,(defn bla [x] (def y x) (inc x))
05:55clojurebot#'sandbox/bla
05:55clgv,y
05:55clojurebot#<Unbound Unbound: #'sandbox/y>
05:55clgv,z
05:55clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: z in this context, compiling:(NO_SOURCE_PATH:0:0)>
05:55clgv,(defn bla [x] (def z x) (inc x))
05:55clojurebot#'sandbox/bla
05:55clgv,z
05:55clojurebot#<Unbound Unbound: #'sandbox/z>
05:56clgvchare: you'll get faster to your goal, if you describe your actual problem
05:56chareI am just curious
05:58clgvas I said, "def" is just intended to define global variables in the current namespace usually functions and constants
05:58clgvseldomly global state - which is usually not a good idea
06:08felherCan I create a function that passes its [& args] to a constructor of some class? Something like (defn my-object [& args] (apply new MyClass args)). This doesn't work because (I guess) new is a macro and not a function.
06:12clgvfelher: "new" is a special form. and no that wont work as function
06:12felherclgv: okay, thanks :)
06:12clgvfelher: for a constructor invocation you need to know how many args to pass at compile time
06:13felherclgv: yeah, I kinda expected something like that. ty :)
08:26sm0kehey any way to disable jline completely for lein repl?
08:56llasramsm0ke: Look in the Leiningen sample project file for the example "dumbrepl" alias
08:56llasramYou can just use `lein run` to run the `clojure.main` REPL
09:10sm0kellasram: but that wont set classpath
09:10sm0kei can very well use java -cp clojure.jar clojure.main then
09:10llasramUm
09:10llasramThe `lein run` solution does set that classpath
09:10llasramOtherwise how could it even find Clojure :-)
09:11sm0kemay be but still it wouldnt be a nrepl right?
09:12sm0kewhich means i can not use it from any ide
09:12llasramSure.... So, you want something that both is a dumb IO REPL, *and* a process that acts as an nREPL server?
09:12sm0kewell i just do not want the prompt to read through jline
09:13sm0keeverything else should be as is
09:13llasramInteresting
09:14sm0kellasram: my point being, i can use rlwrap lein repl, and get better readline support
09:14sm0kethan jline would ever be able to provide
09:15sm0kethere was a pr for this https://github.com/technomancy/leiningen/issues/33
09:15sm0kebut it seems to be lost in time :P
09:16llasramwow, #33
09:16llasramyeah :-)
09:16sm0kenow specially after lein uses reply it seems impossible to disable jline
09:17sm0kereply is tightly integrated in lein source, and asking reply to disable jline would be like a sick joke
09:18sm0kei mean reply is nothing but jline over nrepl!
09:20llasramThat's not really true... I mean, it has to actually be a client, and integrates with completion to provide completion
09:23sm0kethats what nrepl does
09:23sm0keprovides server and client
09:26clgvrepl-y has been much better than rlwrap in most of my use cases.
09:29sm0keclgv: may be for emacs
09:29sm0kebut the vim support is eternally broken
09:31sm0kei dont see how jline can defeat rlwrap, which is nothing but a thin wrapper on readline, readline >>> jline
09:53clgvsm0ke: I am using CCW and on remote machines command line ;)
10:08gfredericks:repl-options :init is not composable
10:25egasimusHey everyone, could anyone please have a look at my issue on StackOverflow?
10:25egasimushttp://stackoverflow.com/questions/22271087/building-opencv-and-vision-dlls-to-use-with-clojure-on-windows-7
10:25egasimusI'm trying to get Vision, a wrapper for OpenCV, to run on 64-bit Windows 7.
10:25egasimusI'll be back shortly if anyone wants to get in touch over IRC.
10:29thenerd2Yourkit is awesome, and they often have a free early access program (EAP) where you can download and use a copy for a month or so
10:38gfredericksI guess if you wrap each use of :init with (do ...), then they'll all compose
11:15TravisDCan anyone think of a good naming conventions for functions with possibly random outcomes?
11:17seangroveTravisD: I don't, but I like the idea of marking them actually
11:19TravisDYeah, seems like it would potentially save a lot of confusion. I was thinking of adding a "$" at the end, to link it to gambling or something.
11:33mdeboardHi, I have a question that probably doesn't have a good answer. I'm learning Elixir and the same programming pattern called a destructuring bind in Clj is called pattern matching in Elixir.
11:34mdeboardSo something like `x = [1, 2, 3]; [a, b, c] = x` is pattern matching in Elixir. Is it "powered" the same way in Clojure?
11:34mdeboardThat is, is destructuring bind using pattern matching under the hood or no
11:38TravisDmdeboard: I don't have any experience with Elixir, but it seems like it would be odd for them to reimplement it. If the syntax is the same, my guess is that they just use destructuring binds somewhere
11:39mdeboardTravisD: Well, Elixir is not related to Clojure at all. Runs on different VM (OTP) and everything
11:39TravisDOh, in that case, I'm not sure
11:39mdeboard(You should check it out)
11:39TravisDAre you wondering if they use the same algorithm?
11:40mdeboardYeah, I guess I am
11:40TravisDI'm guessing it's very similar
11:41isaacbwpattern matching usually means something different in programming languages
11:41isaacbwwell, similar
11:41isaacbwbut different
11:52mdeboardisaacbw: You mean different things in different languages? or?
11:54isaacbwwell, it's the same concept
11:55isaacbwbut usually when a language has pattern matching, it means something more like a switch statement
11:55isaacbwhttp://xahlee.info/ocaml/pattern_matching.html
11:55isaacbwdestructuring is sort of a rigid pattern matching I suppose
11:56TimMcisaacbw: Not really. Destructuring is a part of pattern matching, but it lacks the dispatch feature.
11:56mdeboarddispatch feature?
11:57TimMcWith pattern matching you can say "if it matches this pattern, destructure & bind this pattern and execute this form, otherwise do this other one."
11:57mdeboardahhh
11:57mdeboardright
11:58mdeboardGood distinction, thanks
12:01TravisDSo I've been trying to get a reasonable implementation of sparse vectors. Would anyone mind giving suggestions? https://www.refheap.com/54488
12:04TravisDMostly, I am wondering if this is an appropriate use of a multimethod
12:04bbloomTimMc: although we recover a (slightly broken) variant of pattern match "dispatch" with if-let, if-some, when-let, when-some
12:08TimMcHah, true.
12:09hyPiRionWe have a so-to-say proper one with core.match
12:09TimMcIt's kind of a degenerate case.
12:09TimMc(if-let, not core.match)
12:11bbloomTimMc: yeah, the "bad" part of pattern matching is the fact that it's ordered choice like cond
12:11bbloomcond is OK in small dosages, but too much of it is a serious issue b/c it thwarts refactoring
12:11TimMcHmm, yeah.
12:11bbloomit's hard to reorder clauses w/o invalidating some subtle assumption about previously checked conditions
12:11TimMcThat has not bitten me yet, thankfully.
12:11bbloom"pattern matching" has become synonymous with "ordered choice"
12:14technomancycore.match is nice, but without pattern matching in the core language you don't get a lot of its benefits around libraries
12:14TimMctechnomancy: Lovin' that OCaml?
12:15technomancylike we have to use exceptions for error conditions instead of matching against [:ok, value]
12:15technomancyTimMc: currently thinking of erlang, but sure =)
12:15technomancydid the comma give it away?
12:16TimMcNo, why?
12:16TimMcIs that a thing in OCaml?
12:17technomancyit's a thing in everything that isn't lisp/forth afaik
12:17TimMchah
12:18TimMcOh, you mean the comma in the thing you said after me.
12:18TimMcAre you time-travelling again?
12:21mdeboardlol
12:22mdeboard`{:ok, file} = File.open "some_file.txt"` is a pattern match
12:22mdeboardI'm really digging Elixir
12:22mdeboardNot that this is #elixir-lang
12:24TimMcI definitely want to give it a try.
12:26mdeboardunfortunately it kind of occupies the same niche as Clojure in terms of things I'd use it for, so I doubt I'd be able to use it in day-to-day work
12:27mdeboardalso it's still sub-1.0 release
12:28mdeboardbut it excites me in the same way clojure excited me a few years ago
12:28seangrovemdeboard: Raynes is also very into it
12:28mdeboardtitillating
12:28mdeboardIt's a scintillating language
12:29mdeboardseangrove: Yeah
12:41isaacbwgod I'm so excited to be back with lisp. I've been spending way too much time with JavaScript
12:44seangrove"JavaScript is really Scheme in C-clothing!"
12:45woahjust throw away like half the language and the rest is pretty good
12:45isaacbw,(str "hello" "world")
12:45clojurebot"helloworld"
12:46woah(+ 2 2)
12:46clojurebot4
12:46woahoh wow awesome
12:46isaacbwoh, you don't need the leading comma?
12:47woahguess not
12:47isaacbwI just wrote a new lisp for the sole purpose of powering a bot in my IRC channel XD
12:48Umschwung(defn [x] x)
12:48Umschwung(defn id [x] x)
12:49UmschwungSo it doesn't allow function definitions, too bad. :P
12:49hyPiRion(+ (- 10))
12:49hyPiRion(+ 2 2)
12:49clojurebot4
12:49Umschwung(apply + '(1 2 3 4 5))
12:50hyPiRionJust for specifics I guess then
12:50Umschwung,(apply + '(1 2 3 4 5))
12:50clojurebot15
12:50Umschwung,(defn id [x] x)
12:50clojurebot#'sandbox/id
12:50Umschwung(id 10)
12:50Umschwung,(id 10)
12:50clojurebot10
12:50UmschwungHah, cool.
12:51hyPiRion(identity foobar)
12:51lazybotfoobar has karma 0.
12:51seangrove(sqrt hyPiRion)
12:51hyPiRionheh
12:52seangrove(inc hyPiRion)
12:52lazybot⇒ 34
12:52Umschwung(inc Umschwung)
12:52lazybotYou can't adjust your own karma.
12:53Umschwung(/ 42 0)
12:53Umschwung,(/ 42 0)
12:53clojurebot#<ArithmeticException java.lang.ArithmeticException: Divide by zero>
12:54UmschwungLooks like I blew up the universe again. Oh, well...
13:30shiranaihitoI'm getting an error saying: "IllegalArgumentException: :db.error/not-an-entity Unable to resolve entity: :user/email" - but I have no clue what's wrong with this: https://www.refheap.com/2a87df6ca5c23804e2bdf42c0 -- any ideas? (i'm using Cursive Clojure with IDEA)
13:44seangrove$seen noprompt
13:44lazybotnoprompt was last seen quitting 13 hours and 36 minutes ago.
13:47muhoo(inc inc)
13:47lazybot⇒ 6
13:51mheldanybody here use functionaljobs.com?
13:59bjorkintoshyeah, why?
14:06mheldaww yeah http://functionaljobs.com/jobs/8692-clojure-programmer-data-scientist-at-weft
14:24PinkPrincessI'm having some issues with core.async. I hope linking to pastebin is not discouraged and go right ahead: http://pastebin.com/VdazyHkN
14:25PinkPrincessThe code is rather riddled with debugging attempts, but essentially: All the expected ">!" are printed, but only a fraction (roughly 10%) of the "<!" are printed.
14:26PinkPrincessI'm pretty confident in all the external calls used in the code snippet.
14:26PinkPrincessIf anyone has a suggestion as to what I'm doing wrong, I'd be very grateful.
14:27PinkPrincessIf it's any help, the entire process takes a *long* time.
14:27eraserhdI'm pretty certain I'm doing it wrong, but can anyone tell me why: I'm trying to use ns-interns at ns load time (at the bottom) to capture defns with a certain meta. I'm not getting all of them.
14:27PinkPrincessIt's fetching and parsing about 14000 HTTP requests.
14:28isaacbwwhat do you call the thing being checked in an if statement?
14:28eraserhdisaacbw: condition?
14:29isaacbwhmm, I suppose that works! I was thinking of another word, but maybe it's a false memory :P
14:30PinkPrincessDo you get the expected mappings if you run it at the REPL, eraserhd?
14:31eraserhdPinkPrincess: No.
14:31eraserhdActually, let me reload my REPL.
14:32eraserhdOh wow, this time I only got one of the mappings.
14:33seangroveBit by circular deps.
14:33PinkPrincessAnd you really do want ns-interns (as opposed to ns-map and friends)?
14:35eraserhdMy project actually doesn't have circular deps. That's a pet peave. I keep it acyclic.
14:36eraserhdSo I extracted the collector function, and I call it after I require, and I get different results?
14:38PinkPrincessCan you share a small example on pastebin, eraserhd?
14:38seangroveeraserhd: Sorry, I meant I had just been bit ;)
14:39eraserhdOh, heaha.
14:39eraserhdPinkPrincess: I figured it out. I will share for your amusement.
14:39PinkPrincessI am kind of curious now. ;)
14:43eraserhdPinkPrincess: https://gist.github.com/eraserhd/9437765
14:47eraserhdOh, now I'm not so sure I understand. I assumed that ^{:handler ~keystroke} was being evaluated prematurely, but then I wouldn't get any.
14:49PinkPrincessHeh.
15:04PinkPrincessWell, as long as it's solved.
15:05eraserhdEr, not solved :(
15:05PinkPrincessOh, I thought you figured it out.
15:05eraserhdI thought I did as well, but I didn't. :)
15:06PinkPrincessAh, like that.
15:15eraserhdBaffled as to what I'm missing. I have a macro which expands to (do (def x ...) (alter-meta! #'x assoc ...)) and I get random results?
15:16PinkPrincessCouldn't you simply add the meta-data inside the (def)?
15:16eraserhdProbably. I'm not sure why the meta-data isn't coming trhough, but I got similar results when I tried that.
15:17PinkPrincessSo it expands to (def #^{:some :stuff} x ...)
15:17PinkPrincessThat does sound rather strange.
15:17hyPiRioneraserhd: (def ~(with-meta x metadata) ...) ?
15:17bbloom~top-level
15:17clojurebotGabh mo leithscéal?
15:18bbloomclojurebot: top-level is hopeless
15:18clojurebot'Sea, mhuise.
15:18bbloomeraserhd: do what PinkPrincess says b/c def is weird
15:18eraserhdLet me try.
15:22eraserhdWorks in the REPL, sort of? ...
15:23eraserhdBut not when I require the file.
15:26PinkPrincessUgh.
15:28eraserhdAha! It is evaluating to the same symbol every time!
15:29eraserhd,(defmacro m [] `(def x# 42))
15:29clojurebot#'sandbox/m
15:29eraserhd,(m)
15:29clojurebot#'sandbox/x__25__auto__
15:29eraserhd,(m)
15:29clojurebot#'sandbox/x__25__auto__
15:29eraserhd,(m)
15:29clojurebot#'sandbox/x__25__auto__
15:29PinkPrincessOhh.
15:29eraserhdNot what I expected. I might not understand x#
15:30PinkPrincessMaybe some gensym?
15:30hyPiRiongo (let [x (gensym)] ...)
15:30hyPiRiondo*
15:31eraserhdI will, but first I'm going to understand why that happens...
15:31Bronsaeraserhd: the x# gensym is generated at read-time rather than runtime so you get the same symbol every time
15:34PinkPrincess,(repeatedly 5 gensym)
15:34clojurebot(G__121 G__122 G__123 G__124 G__125)
15:34PinkPrincessClojurebot is pretty cool.
15:35PinkPrincessDoes it ever reset its namespace/jvm?
15:37eraserhdStill no go.
15:38eraserhd,(defmacro m [] `(def ^:x ~(gensym) 42))
15:38clojurebot#'sandbox/m
15:38eraserhd,(m)
15:38clojurebot#'sandbox/G__175
15:38eraserhd,(:x (meta #'G__175))
15:38clojurebotnil
15:38ruzuclojurebot: I <3 U
15:38clojurebotNo entiendo
15:39eraserhdOh, but alter-meta! should work now.
15:39hyPiRion,(defmacro m [] `(def ~(with-meta (gensym) {:x true}) 42))
15:39clojurebot#'sandbox/m
15:39hyPiRion(m)
15:39hyPiRion,(m)
15:39clojurebot#'sandbox/G__52
15:40hyPiRion,(meta #'sandbox/G__52)
15:40clojurebot{:x true, :ns #<Namespace sandbox>, :name G__52, :column 0, :line 0, ...}
15:40PinkPrincessYay! \o/
15:41eraserhdhyPiRion: !!!
15:45eraserhdWell, now I have a minor problem to resolve, but got to go. Thanks!
15:45PinkPrincessBest of luck.
15:45PinkPrincessDo any of you have experience with putting and taking many thousands of large data structures with core.async?
15:46PinkPrincessIf I log all my puts and takes, everything it put onto the channel as expected, but when taking until I read nil, it seems to just... stop prematurely.
15:46PinkPrincessis put onto*
15:46hyPiRionwhen you put on nil, that means you close the channel, right?
15:46PinkPrincessSo it'll log 13864 puts, but log between 1600 and 2000 takes.
15:47PinkPrincessYes, but you can't actually "put" it.
15:47PinkPrincessIt'll do that when it closes.
15:47PinkPrincessBut supplying >! with nil is an error.
15:47PinkPrincessSo it is safe to assume it doesn't put nil itself, as this would throw an error (as far as I understand it.)
15:48ruzuis avout the go-to lib for distributed stuff?
15:48PinkPrincessIt may close prematurely, I suppose.
15:49PinkPrincessI haven't really heard of avout, ruzu. Sorry.
15:50seangroveUhg, circlural deps are making my head heurt
15:50PinkPrincessA perhaps related question: when does a core.async channel close if left alone?
15:50PinkPrincessNever?
15:50ruzuthere's always akka i guess
15:50seangroveMaybe I should cheat for now and rely on js' late-binding. Just use fqn for the functions...
16:02_Bravado IIRC async channels don't close on their own
16:04PinkPrincessThen that shouldn't be the problem at least.
16:20firefauxwhat's the difference between IPersistentMap's assoc and assocEx methods?
16:46amalloyfirefaux: assocEx is a legacy thing that's never called
16:46firefauxoh
16:47firefauxso would it be ok for me to implement APersistentMap and then have assocEx throw whatever the "not implemented" exception is called?
16:48firefauxI guess it's called NotImplementedException
16:48amalloysure, UnsupportedOperationException
16:48firefauxoh wait, that was a 3rd party library I found with that
16:48firefauxyeah, UnsupportedOperationException sounds familiar now
16:49amalloyanyway, what (.assocEx m k v) is supposed to do is the same as (.assoc m k v), except that if k already has a mapping in the map already it throws an exception
17:21seangroveIs there no pretty-printer for cljs?
17:22seangroveDamn
17:23dnolen_seangrove: nope
17:23dnolen_seangrove: you could probably port fipp though
17:24bbloomseangrove: it's already ported
17:24bbloomhttps://github.com/brandonbloom/fipp/pull/12
17:25seangrovebbloom: Oh, that looks nice
17:41PinkPrincessHas anyone tried making many thousand requests with http-kit? I now wonder if this is what's causing my issues.
17:41isaacbwdoes anyone here know of any material on how wolfram alpha works? Whitepapers, maybe?
17:42_Bravadoit works mostly on ego
17:43isaacbwlol
17:44_BravadoStephen Wolfram would give Kanye West and Paul Graham a run for their money
17:45AimHerePfft. Wolfram revolutionised All Of Science. Kanye West only invented Rap Music, and Paul Graham built the internet.
17:45_BravadoThat said, his personal area of expertise would be cellular automata, or at least thats what his early work was focused around
17:45AimHereWell he created Mathematica too; presumably it's better than Maple now; it wasn't when I last checked it out
17:48_Bravadowolfram alpha actually has some basic info on their site and iirc a blog. It actually let me down quite a bit when it was first opened
17:48pdk[17:43] <AimHere> Pfft. Wolfram revolutionised All Of Science. Kanye West only invented Rap Music, and Paul Graham built the internet.
17:48pdkit wasn't al gore?
17:49ruzual gore got a bum rap
17:49AimHereProbably a division of labour. Gore just did the bits that weren't made out of lisp
17:50_Bravadoso all of it
17:50AimHereExcept Yahoo. Well Yahoo's airline thingummy. Except not now. And Reddit. Well not now either. But Hacker News is made out of Lisp, so people say.
17:50seangrovednolen_: What's the way in Om to rearrange some data before passing it on to a sub-component? E.g. (def as {:numbers [0 1 2 3] :letters ["x" "y" "z"]}) (defn my-om-com [data owner opts] (om/build sub-com (om/graft {:sub-com-new-data 42, :sub-com-renamed-data (:letters data)} data))) ?
17:51seangrovednolen_: If I'm moving as' :letters to :sub-com-renamed-data (where sub-com expects it to be), it's a cursor, so I can't graft it.
17:51seangroveAh, maybe just assoc it
17:52TimMcpdk: Al Gore was misquoted.
17:52pdkdid reddit have some lisp in the backend early on
17:52seangroveTimMc: True. He actually invented ARPANet
17:52TimMc:-P
17:52TimMcpdk: Yup, used to be lisp
17:53TimMcpdk: http://www.redditblog.com/2005/12/on-lisp.html
17:53pdkaptly named article
17:54TimMcBut I get to write Clojure at work, which makes up for it plenty.
17:56pdkwhat sort of things are companies hiring for clojure looking for on a resume
17:56ianeslickAnyone familiar with the cause of this error: JSC_MISSING_PROVIDE_ERROR. required "orchestra.app" namespace never provided at ... when building clojurescript?
17:57_BravadoI need to come up with projects to raise my clojure skills and get better acquainted with the full capabilities. Maybe i'll do something with storm / trident
17:57seangrove_Bravado: That would be a pretty bit project. Takes a lot of work to get Storm running properly
17:58ruzui wish i could write clojure at work. currently it's a top-to-bottom microsoft shop with a lot of bad c#. i tell myself not to give up hope, because then i would have nothing.
17:59dnolen_seangrove: I don't see the problem
18:00_BravadoI've gotten storm to work before a couple steps past hello world heh
18:00_Bravadohttps://github.com/yieldbot/marceline is what i'm really interested in trying out
18:00seangrovednolen_: (:sub-com-renamed data) is a subkey of the data I'm trying to graft, and it's going to be a cursor, and one cursor can't be grafted onto another
18:01seangrovednolen_: I've just moved it to opts for the time being, but I'll need to revisit it, I think
18:01dnolen_seangrove: why don't you just assoc the data you need on?
18:02seangrovednolen_: I did do that, but there were some unrelated issues. No worries.
18:02gfredericksclojure.repl/dir should fallback to checking local aliases
18:03ianeslickdnolen_ Is there a particular trigger that causes a namespace to not be pulled in during CLJS compilation with the error JSC_MISSING_PROVIDE_ERROR?
18:07dnolen_ianeslick: it doesn't exist or misnamed
18:08mr-foobarin cljs, do macros have limitations ?
18:08dnolen_mr-foobar: can't interact w/ runtime
18:09ianeslickdnolen_: Very odd because the file is there in the out directory, properly compiled, and used by another file successfully.
18:12dnolen_ianeslick: I'm assuming it's one of your own files?
18:13dnolen_ianeslick: 2 things come to mind - make sure you're following JVM classpath conventions for your project, also make sure there isn't another auto build process running or something like that
18:13ianeslickYes. I'm building a worker JS file with Pedestal and the main file, which uses app.cljs in the non-worker condition compiles fine, but the worker fails.
18:13dnolen_do a clean build
18:13ianeslickCould be some parallel builds going on.
18:13ianeslickThe internals of the pedestal build tools can be odd.
18:15TimMcpdk: I think that varies quite a bit.
18:15mr-foobardnolen_: ah, that basically means I can't ~cljs-code right ?
18:15TimMcpdk: Actually, a friend of mine just posted a Clojure job, but he didn't include qualifications: http://functionaljobs.com/jobs/8692-clojure-programmer-data-scientist-at-weft
18:15pdkneat
18:15dnolen_mr-foobar: no
18:16pdki get emails from recruiters for clojure once in a while though i feel at this point i may be too rusty to make a good showing
18:16TimMcI think most companies just want someone who can learn quickly and start writing code quickly. :-P
18:16dnolen_mr-foobar: it just means you can interact between runtime and compile time
18:16gfredericksthat was easy: https://github.com/fredericksgary/repl-utils/blob/master/src/com/gfredericks/repl.clj#L26
18:16pdkthat and i have yet to actually do anything substantial with it
18:16pdki learned clojure in like 2010
18:17gfredericksback in the wild days
18:17gfrederickswhen vars were vars and seqs were lazy
18:17pdkwhen you just downloaded one zip for clojure.contrib
18:18pdkhell i even got a recruiter for clojure who said he was from apple
18:18pdknot sure how legitimate that was since apple using it just made me do a double take
18:18gfredericksin a big enough company somebody's using it for something marginal enough
18:18TimMcProbably an internal project, like usability testing or intranet stuff.
18:20gfrederickseither that or they rewrote iTunes
18:20Null_Apdk: clojure at apple?
18:21pdkfrom what it sounded like yes
18:21Null_Ai wonder if it's because they're using storm-project.net
18:21gfredericksIn the town of Lake Clojure1.0beggon, where the vars are dynamic, the seqs are fully lazy, and the arithmetic operations are autopromoting.
18:22dnolen_pdk: Apple has been using Clojure since the second Conj pretty sure
18:22pdkdayum
18:28hiredmanthere were some apple recruiters handing out бизнес cards and free itunes songs at one of the conjs
18:30akhudekI assumed that they were just there recruiting, would be surprised to hear they use clojure
18:30akhudekEsp. given their stance on the jvm
18:30hiredmanhttps://www.linkedin.com/jobs2/view/6669521
18:31hiredmanoh foo
18:31dsrxapple have a bunch of really ancient java sites using WEbObjects
18:32hiredmanI think I just did the equivilant of "I'm feeling lucky" and just assumed the result was relevant
18:32akhudekhiredman: what is that? I get a login gate
18:32dsrxit's a job posting from a few months ago for a clojure engineer at apple
18:32akhudekoh, interesting
18:32hiredman"This is a preview of the Clojure Engineer- iTunes job at Apple. To view the full job listing, join LinkedIn - its free!"
18:33hiredmananyway, apple has big backend services, and these days those are pretty much always on the jvm everywhere
18:33akhudekthat's true
18:35gfredericksor MRI or node or the pee aitch pee virtual machine
18:35isaacbwall those big backends running on node and all that
18:35TimMcAnd then there are the companies that hire Clojure and Haskell developers to do Java development
18:36TimMcjust because they know these are *probably* smart devs. :-P
18:36TimMcIt's a dirty trick, and I wonder if Apple was doing that.
18:37TimMchiredman: That job description doesn't actually mention Clojure again. There's just one relevant qualification: "Experience developing large-scale web-based applications using Java and other object-oriented languages."
18:43ianeslickdnolen_ It's probably because the file in question is using ^:shared
18:50danielszmulewiczTrying to set a value in user session with liberator... struggling again...
18:52ianeslickdnolen_ Thanks for the input; it was due to a whitelist being applied within Pedestal.
19:11dissipatewhy is (or) nil and (and) true?
19:14Jahkeupdissipate: check out the source for or and and (lol) on the rpel
19:14Jahkeup*repl
19:14Jahkeup(source or) reveals that the macro defined for or returns nil when called without any args
19:15dissipateJahkeup, ok, i see. but why?
19:15dissipateJahkeup, it seems inconsistent
19:16Jahkeupdissipate: tbh I do see where you're coming from, the recursion in the `and` macro makes sense with it being true with no args
19:16TimMcJahkeup: More importantly, that's how Boolean logic is defined, for consistency.
19:16JahkeupTimMc: yes, I didn't wanna say that so broadly though, but you're right
19:17dissipateJahkeup, why isn't 'or' true with no args?
19:17Jahkeupdissipate: like TimMc its all boolean logical operations
19:17dissipateJahkeup, what do you mean?
19:18TimMchttps://en.wikipedia.org/wiki/Logical_disjunction#Definition
19:19TimMc"The disjunctive identity is 0, which is to say that OR-ing an expression with 0 will never change the value of the expression. In keeping with the concept of vacuous truth, when disjunction is defined as an operator or function of arbitrary arity, the empty disjunction (OR-ing over an empty set of operands) is often defined as having the result 0."
19:19dissipateTimMc, but that's my point, it does not seems consistent to me
19:19noonian(or) returning nil makes sense to me, formal semantics aside, no truthy thing to return a truthy value for
19:19TimMcThat is, (or a b c false) is always equal to (or a b c), so (or) is equal to (or false).
19:19dissipatenoonian, and what about 'and' with no arguments?
19:20noonianthat seems more ambiguous heh
19:20noonian,(doc and)
19:20clojurebot"([] [x] [x & next]); Evaluates exprs one at a time, from left to right. If a form returns logical false (nil or false), and returns that value and doesn't evaluate any of the other expressions, otherwise it returns the value of the last expr. (and) returns true."
19:20TimMcnoonian: De Morgan's law.
19:21TimMcMore or less.
19:21dissipateTimMc, are you saying clojure is consistent here?
19:22noonianyes he is, consistent with the semantics of or and and in boolean logic
19:23dissipatenoonian, but (or false) is not the same as (or) in clojure
19:23nooniani guess it doesn't come up in a lot of other languages where or and and are always infix operators
19:24nooniandissipate: because false is not the same thing as nil, but both are falsey values so it doesn't usually matter, and if you care about the difference you just have to do a bit more work and use nil? or false?
19:25dissipatenoonian, nil and false are two completely different things in my book
19:26noonianthe only reason clojure has both of them is because java does
19:26nooniani don't usually care unless i'm worried about puting nil on an async channel heh
19:29ruzuanyone know if this is worthwhile -> http://shop.oreilly.com/product/0636920030409.do
19:31Jabberzstyle question - I have a Java API that requires you to create like 5 objects, run a bunch of setters and such, to all but call a single execute method. Should I do all the mutation in a let parameter definition, or within a let body?
19:32Jabberzmost of the setters don't need to be saved, i.e. don't generate a return value, so I have a lot of "_ (.setBlah ..)" stuff going on
19:32dissipatenoonian, i still don't think it is consistent. it makes no sense
19:32noonianimo if the mutating methods don't return anything go ahead and do it in the body
19:32nooniandissipate: what about it seems inconsistent?
19:32Jabberznoonian: problem is like 1/2 of them do return something, 1/2 don't, it's a bit tangled
19:33Jabberzsome statics ,some objects passed around, etc
19:33dissipatenoonian, (and) and (or) should both return nil
19:33dissipateor rather, evaluate to nil
19:35bob2Jabberz, wrap it up in a function?
19:37Jabberzbob2: this is pretty much the function, i have the tangled mess in the let parameters, then the one method of value in the body
19:37nooniandissipate: idk if i agree, and evaluates it's arguments until on of them is falsey (where it returns the falsey value) or there are no remaining arguments (where it returns the last argument evaluated)
19:37noonianso if there are no arguments and it returns nil, it is as if it encountered a nil value
19:37Jabberzif it were a little less tangled, I guess putting it in the body would be good, but there's like a couple of things i gotta capture from the java setters
19:38dpathakjyou can think of 'and' as "truthy unless at least one arg is falsy", and 'or' as "falsy unless at least one arg is truthy"
19:38tomjack`anyone else noticed clojure-mode ignoring clojure-backtracking-indent for names ending in "fn"?
19:39dpathakjand if there are no arguments, none are falsy, and none are truthy
19:39noonianyeah, dpathakj gives form to my thoughts
19:39JabberzI guess talking through it, i've convinced myself - the java mutation mess can be in the let parameters so it can save some of the return vars it needs to use
19:40noonianJabberz: yeah, nothing wrong with that, and if you don't want tons of _'s you can use one with a do block until the next value you need to keep a reference too
19:40Jabberzah, nice, thanks noonian
19:43dnolen_Om 0.5.2 out, now easy to use with Om components from Reaget/Quiescent/plain React, also possible now to interpret local state operations - easy to force a component to write it's local state into the global application state and instance by instance basis
19:43dnolen_lots of possibilities for debugging here when coupled with :instrument
19:46tomjack(= b (and (and) b) (or (or) b)) ?
19:47tomjackthe zero arities make r/reduce make sense
19:47tomjackwell, they would...
19:47tomjack:(
19:47nooniandnolen_: nice!
19:48Wild_Cat,(and)
19:48clojurebottrue
19:48tomjackwonder why they aren't inlined fns
19:49dnolen_noonian: pretty powerful stuff IMO. You can pick a local/global state transition strategy at instance level
19:50tomjackI guess you're not supposed to use those as HOFs anyway?
19:50tomjackoops maybe sore subject :X
19:52hyPiRiontomjack: huh? They cannot be HOFs
19:52hyPiRionfunctions take evaluated arguments, whereas `or` and `and` take forms, and may short-circuit
19:55tomjackwait, why the fuck are there zero arities?
19:55tomjackoh, in case you macroexpand to (and) or (or), I guess?
19:55tomjackexactly
19:56hyPiRionyeah, in case other macros generate such a form.
19:57tomjackoh
19:57tomjackif they could also be used as HOFs, it wouldn't make sense to complain that it didn't short-circuit when you used it that way
19:58tomjackso I don't see a problem with allowing both, except that you can't
19:58tomjackbut what puzzles me is why there is a zero arity when they can't be used as HOFs
19:59tomjackso that people doing demo talks can do (and) and (or) after (+) to show off?
19:59hyPiRionBecause you can macroexpand it
20:00hyPiRionIt turns out that monoids are great to avoid special cases, and when you're writing macros, having (and) and (or) available instead of replacing them is sensible
20:01tomjackor maybe just because it was easy to write..
20:01Bronsatomjack: makes it possible to write `(and ~@body) without thinking about the possibility of body being empty
20:01Bronsafor example
20:02noonianspecify! is pretty cool
20:04tomjackI guess that is a pretty good reason
20:05dnolen_noonian: incredibly useful.
20:05nooniani hadn't seen it before looking at your examples
20:08mr-foobardnolen_: possibly a vague question, I just read om/wiki/BasicTutorial. Is there a general guideline for assigning core.async channels to components ?
20:09dnolen_mr-foobar: not yet, not enough generic components to understand what the best practices are yet.
20:12mr-foobardnolen_: If my understanding is correct, I can bypass core.async completely by purely (swap! ...) global state just as icky javascript.
20:13dnolen_mr-foobar: calling swap! on the global state is not recommend unless you really know what you are doing
20:13dnolen_likely to opt out of a lot of things that Om is designed to handle / optimize
20:16mr-foobardnolen_: right. still trying wrap my head around cursors :)
20:33igorwdoes core.logic have relations/constraints on types, such as 'symbolo', 'keywordo' and such?
20:40danielszmulewiczAnyone has played with Liberator (the REST library)?
20:40danielszmulewiczplayed/worked
20:52bob2yes
20:53bob2protip: keep the giant graph open in a browser tab + enable trace
20:53danielszmulewiczbob2: I'm struggling with setting the value in the ring session. Would love to look at an example.
20:54bob2never used sessions, sorry
20:54bob2http://mmcgrana.github.io/ring/ring.middleware.session.html looks simple enough, though
20:55bob2ie return a response with :session set to whatever you want
20:55danielszmulewiczbob2: No problem, thanks for the tip, I'm doing that. Normally, I have a good experience with Liberator, but I always trip over the user sessions.
20:55danielszmulewiczbob2: Yes, wrap-session is configured.
21:06MattAbbottso is there anyway to pull in one local clojure project without setting up a full repo?
21:06MattAbbottI just want to be able to give it the path to my project dir...
21:15TimMcMattAbbott: What for? Are you developing against it?
21:15TimMcOr is it like... a personal REPL tools thing?
21:16TimMcThe correct answer differs by use-case.
21:16MattAbbottI'm developing two projects in parallel. Indeed, I'm pulling the former out of the latter, as it will be general enough to be useful on its own. I just don't want to go through the trouble of setting up a private repo to hack this out right now
21:17MattAbbott(my temporary solution has been to put a soft-link in the dependent project's src that points to the other project's src, but that's going to cause problems when its project.clj is non-trivial)
21:23TimMcMattAbbott: Leiningen supports "checkout dependencies", which allow you to override a stated dependency with another lein project elsewhere on disk.
21:24TimMcThat's probably what you want during development.
21:24TimMcIt's basically equivalent to what you're already doing, but better-supported.
21:26MattAbbottI see. I was under the impression the project had to have a slot in a repo already or else that mechanism would complain. I'll have to play with that.
21:26TimMcHmm... I see.
21:27TimMcIt may require that the dependency can be otherwise resolved, yes.
21:27TimMcIn that case you might want to do a `lein install` on the dependency project first so it's at least in your m2 cache.
21:29MattAbbottah that's a good idea.
21:30TimMcI mean, you can also just use that approach without using checkout deps, but that can slow you down a bit.
21:30MattAbbottright
21:30TimMcHowever, both aspects (local install and checkouts symlink) are things that can complicate debugging, because you eventually *will* forget they're in place. :-P
21:49rufoa<MattAbbott> ah that's a good idea. << I made a lein plugin a while back to automate this which you might find useful: https://github.com/rufoa/lein-checkout-deps
21:50MattAbbottcool. I'll take a look at it
22:36mildfateI have a function that takes 4 arguments that I'd like to map onto a list of pairs plus a "default" pair that is applied to every pair in the list. How do I do this since partial function application isn't quite built-in?
22:47dsrx,(def foo [x y z a] (str x y z a))
22:47clojurebot#<CompilerException java.lang.RuntimeException: Too many arguments to def, compiling:(NO_SOURCE_PATH:0:0)>
22:47dsrx,(defn foo [x y z a] (str x y z a))
22:47clojurebot#'sandbox/foo
22:48dsrx,(map #(foo %1 %2 :de :fault) [[1 2] [3 4] [5 6] [7 8]])
22:48clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: sandbox/eval72/fn--73>
22:49noonian,foo
22:49clojurebot#<sandbox$foo sandbox$foo@87d0a5>
22:50hyPiRion,(map #(apply foo :de :fault %&) (partition 2 (range 1 9)))
22:50clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (3) passed to: sandbox/foo>
22:51noonian,(for [[e1 e2 & others] [[1 2] [3 4] [5 6] [7 8]] (apply foo e1 e2 :de :fault others))
22:51clojurebot#<RuntimeException java.lang.RuntimeException: Unmatched delimiter: )>
22:51chouserTotal hours: Rate: Total:
22:51noonian,(for [[e1 e2 & others] [[1 2] [3 4] [5 6] [7 8]]] (apply foo e1 e2 :de :fault others))
22:51clojurebot("12:de:fault" "34:de:fault" "56:de:fault" "78:de:fault")
22:52chouserHm. oops.
22:52chouser,(map #(apply foo :de :fault %1) (partition 2 (range 1 9)))
22:52clojurebot(":de:fault12" ":de:fault34" ":de:fault56" ":de:fault78")
23:01dsrxis there a good explanation somewhere about what the "provided" scope for leiningen/maven is?
23:07nooniani'm not sure what you mean
23:12ruzuinteresting -> http://sicpinclojure.com/
23:53isaacbwanyone here read the oreilly or manning books on hbase? I'm wondering which one to get