#clojure logs

2013-09-28

00:05chordhttps://gist.github.com/anonymous/b362df96de01ee91dbad
00:05chordwhy the hell cant it find GLCanvas
00:07chordi've been trying to get an opengl window up for 2 DAYS
00:07chordWHY DOESN'T THIS WORK
00:13chordNM FIXED IT
00:15chenjfchord: are you sure javax.media.opengl.GLCanvas is in your classpath?
00:15chordfixed the problem
00:16chordjogl.jar is bullshit have to use jogl-all.jar
00:16chenjfglad you fixed it
00:16callengames are hard, lets go shopping.
00:16chordcallen I know you keep talking in an attempt to get me to give up
00:17chordnot going to work
00:17callenchord: shopping is fun.
00:17cgagif i have a seq of pairs like this: [[:a b] [:a c] [:a :d]], and i want to get {:a [:b :c :d]}
00:17cgagis there some built in i can use or do i need to do somtehing like this: (reduce (fn [m [k v]]
00:17cgag(assoc m k (conj (m k []) v))) {} ...)
00:24chordguys i think callen is having a heart attack
00:24chordhe stopped responding
00:25cgagrip
00:28chordcgag: you going to help with starcraft clone?
00:28cgagis that's what's going on
00:28chordjust say yes
00:28cgagthat sounds fun, idk if i have time though
00:30cgaghave you considered going shopping instead
00:32callenchord: I'm pretty sure you should go shopping.
00:34chordcgag work on game ok
00:37chordNEW PROBLEM
00:37chord.m2/repository/org/jogamp/gluegen/gluegen-rt/2.0.2/gluegen-rt-2.0.2-natives-linux-i586.jar (No such file or directory)
00:37chordwhy is it not looking for gluegen-rt-2.0.2.jar instead
00:37chordwhere the hell did the natives-linux-i586 shit come from
00:41arrdemcallen: and how goes the cup...
00:41cgagchord how do you plan on doing graphics and stuff
00:41chordjogl
00:41chordarrdem: i need your help dude
00:41cgagis there some existing clojure game stuff
00:41chordarrdem: please help
00:41chordcgag: not that I know of
00:42arrdemchord: don't get me started "helping" you again. I'm being productive right now.
00:42chordarrdem: productive doing what project best friend
00:42callenarrdem: well :)
00:43callenarrdem: we're making good progress, solving problems with large amounts of violence and fear.
00:45arrdemcallen: ah good. shock and awe ftw. I'm buissy ddosing all the things with my crawlers.
00:46holo1chord: "where the hell did the natives-linux-i586 shit come from" -> lein deps :tree
00:47chordlein deps :tree [clojure-complete "0.2.3" :exclusions [[org.clojure/clojure]]] [org.clojure/clojure "1.5.1"] [org.clojure/tools.nrepl "0.2.3" :exclusions [[org.clojure/clojure]]] [org.jogamp.gluegen/gluegen-rt "2.0.2"] [org.jogamp.jogl/jogl-all "2.0.2"]
00:49holo1chord, you should really give up about swearing, unless you're someone really important that too many people worship
00:49chordholo1: I'm a spoiled child I can't stop the behavior
00:51holo1chord, anyways, you're the one to lose about that spoiled theme, because you're likely to not get much help here. your call
00:56chordholo1: so I go shopping now?
01:10chordok I learned i'm suppose to use gluegen-rt-main not gluegen-rt
01:20chordchannel dead
01:20tbaldridgetrolls have a way of doing that
01:20arrdemclojure-cup isn't helping either..
01:21chordarrdem: whats stopping people from making their project before clojure-cup actually started
01:22arrdemchord: there's this thing called honor. you may have heard of it.
01:25chordarrdem: you trust the other people in clojure-cup?
01:32chordI got a window up FINALLY
01:35muhoo recurring PSA: /ignore works, and /ignore -replies ALL works in many clients too
01:37callenarrdem: honor and that competition beginning slapping together code in the first hour is a lot fun
01:37callenlot of fun*
01:48chordcallen do you have a demo of your project
01:49chordyet
01:49`cbpchord: so sc clone will be ready by end of clojure cup then?
01:49chord`cbp: I didn't sign up for clojure cup so no
01:51chord`cbp: what are you working on
01:52`cbpi have like 4-5 projects where im like 10% in hah
01:53`cbpill prolly try to get this weekend a working 0.1.0 of the rethinkdb driver i was supposed to finish like half a year ago or something
01:54chord`cbp: forget rethinkdb go make a driver for voltdb
01:57chord`cbp: what do you think about voltdb?
01:57`cbpchord: never heard of it before
01:58chord`cbp: http://www.youtube.com/watch?v=uhDM4fcI2aI
02:00`cbp:-o
02:02chord`cbp: what does that mean
02:03`cbpill watch it tomorrow, too tired right now
02:29chordException in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: No matching method found: gluPerspective for class javax.media.opengl.glu.GLU
02:29chordhow do I debug this
02:30Apage43doctor
02:31Apage43it hurts when i try to call .gluPerspective on this object
02:32chordApage43: you're not helping, I can see that the class has the method in eclipse
02:33Apage43argument count or types are probably wrong
02:33chordApage43, thats what I was thinking so how do I find out how its being called
02:33Apage43the stack trace ought to tell you that
02:34Apage43ah.. but the AWT thing doesn't give you that
02:34Apage43*but* your code probably isn't calling gluPerspective in very many places
02:34Apage43grep.
02:34chord(.gluPerspective glu 50.0 (float (/ w h)) 1.0 1000.0)
02:34chorddoes that look good
02:35Apage43i have no idea what type that method is supposed to be
02:35chordwtf you're an opengl newb?
02:36Apage43well gluPerspective was deprecated quite a while back, and is part of GLU, not OpenGL proper
02:38chordnot switching to opengl proper yet
02:40callentechnomancy: https://twitter.com/athos0220/status/383807244061536257
02:40Apage43what if you wrap all those args in (double)
02:42chordApage43: wtf that worked, what kind of defaults was clojure using
02:43Apage43the method has a version that takes four doubles, and a version that takes four floats. the call was ambiguous (and floats are problematic too)
02:43amalloyit was using doubles, except where you specifically asked it yo use a float
02:45ggherdovhello. Is there a web framework for clojure, like django for python or rails for ruby?
02:45Apage43your garlic is now truncated to 24-bits
02:46arrdemApage43: aw..... what happened to the sign bit?
02:46arrdemggherdov: sort of. we have Luminous.
02:46ggherdovarrdem: thanks, looking it up.
02:46arrdemggherdov: http://www.luminusweb.net/
02:46arrdemggherdov: I spelled it wrong :/
02:47ggherdovarrdem: thanks for the link
02:48chordso I got a window up that fills it red
02:48chordnow what do I do to finish my game
02:49Apage43you'll need to figure out blue and green windows, then you lay those side by side at 1/3 pixel width, and fill a screen with them
02:50arrdem(Float. "NaN")
02:51chordOk guys I made an opengl window I PROVED I CAN DO IT, now you guys are all going to flock to help me with starcraft clone like you all promised remember
02:52Apage43"No, in javascript isNaN doesn't check that something isn't a number, it checks if its Not a Number. You should use typeof, but you still need isNaN if you might see Not a Number, because typeof Not a Number is number."
02:53Apage43this was pretty confusing when I said it out loud to someone
02:53rplacasure, NaN is a number
02:53rplacaat least in the sense that it has type "number"
02:53Apage43but the data was being tripped through JSON, which meant there wouldn't be any NaNs
02:54rplacabecause it's the result of an arithmmetic operation on numbers
02:54ggherdovarrdem: a quick web search brought up the name "compojure". What is that? a DSL for web development?
02:55arrdemggherdov: Compojure is a routing based request server system.
02:56ggherdovarrdem: ok thanks
03:01n_bAnyone that can provide direction on the best way to reuse haml templates in a ring app?
03:03n_bOr should I just bite the bullet and port them to laser?
03:11muhoowatman
03:11muhooggherdov: also pedestal.io
03:12ggherdovmuhoo: checking !
03:12muhoostill think lein should disallow project names like clj-* or *-clj
03:13muhooenforced creativity
03:22amalloymuhoo: well, it already disallows *jure
03:22amalloysee "LEIN_IRONIC_JURE"
03:23chordso when I jam my clojure code into github am I suppose to do git init inside the src directory or in the directory containing src
03:23TEttingerjuure
03:24TEttingercleaudzhoor
03:28TEttingerclodžure
03:38SgeoSomething's off with the slides here http://www.infoq.com/presentations/racket
03:38SgeoI get the sense I'm looking at the slides at the wrong times
03:46chordyou guys mad that I succeeded in setting this up: github.com/chord-rts/rts
03:46chordwww.github.com/chord-rts/rts
03:48callenchord: don't think anybody cares mate. :)
03:48chordcallen: you lie
03:49callenmuhoo: I agree.
03:50callenmuhoo: better nomenclature through fascism!
03:50callen(inc muhoo)
03:50lazybot⇒ 2
03:50chordcallen: i demand you contribute to the project
03:51chordcallen: I did first commit
03:52indigo'Night Clojure peeps
03:52chordno
03:52chordyou help me indigo
03:52chordon my project
03:53nightflyyou sure know how to build a team
03:53chordnightfly you gonna join?
03:53nightflyI have no time
03:53chordwhat are you spending your time on nightfly
03:54nightflywork, school, and own looong backlog of projects
03:54chordnightfly which projects
03:57chordwhy do you all abandon me and the starcraft clone project
04:04chordwhat will it take for you guys to help my project
04:18georgekwhat could be the problem if in response to 'lein ring server' I get java.io.IOException: The system cannot find the path specified -- this is following the modern-cljs tutorials
04:19georgekmy project.clj and all the other files look like the tutorials
04:59chordstarcraft clone
04:59chordyou help me now
05:00callengeorgek: are you competing in Clojure Cup?
05:01chordcallen are you going to help me with my game after clojure cup
05:18jonasendoes anyone else get "Wrong number of args (3) passed to: reader-types$indexing-push-back-reader" with the newest clojurescript release?
05:28sm0kehey i am trying to split a string on , and each one on :..i cant figure it out ##(map (doto s/trim (partial s/split #":")) (s/split " a:b, c:d , e:f " #"\s*,\s*"))
05:28lazybotjava.lang.RuntimeException: No such namespace: s
05:28sm0kesorry
05:29sm0ke,(map (doto clojure.string/trim (partial clojure.string/split #":")) (clojure.string/split " a:b, c:d , e:f " #"\s*,\s*"))
05:29clojurebot("a:b" "c:d" "e:f")
05:29ro_stsplit first by , then by : ?
05:29sm0kero_st: yes
05:30sm0keso i want something like ((a,b) (c,d) (e,f))
05:31sm0kealthough i can do a map again...but wanted something concise
05:31ro_st,(->> (clojure.string/split "a:1,b:2,c:3" #",") (map #(clojure.string/split % #":"))
05:31clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
05:34sm0kero_st: oh yea there is also a trim there
05:34ro_ston which? the stuff to be : split?
05:35sm0keno after split by , i trime each string first then split on :
05:36ro_sthttps://www.refheap.com/19101
05:38ro_stsm0ke: comp partial and juxt are your friends :-)
05:38ro_stmany times you can avoid anon fns completely by using them
05:39chordsm0ke help me with my project
05:40chordsm0ke you help me with my project: github.com/chord-rts/rts
05:40chordwww.github.com/chord-rts/rts
05:41ro_stsm0ke: here's a quick demo of juxt and comp togehter https://www.refheap.com/19101
05:57chordro_st help me with my game
06:01piranhahow do I make js object in cljs without using clj->js?
06:01piranhaI recall something like (js-obj "a" "b")
06:19z3phyrAlmost every library in clojure requires JVM...
06:24hitekiz3phyr: ... or CLR ?
06:27z3phyrincanter
06:27z3phyrdatomic
06:28z3phyrleiningen
06:28z3phyrring
06:29z3phyreven they named it clojars....
06:32z3phyrhmm...
06:33z3phyrClojure core mainline has no official support for the CLR too
06:33z3phyrClojureCLR should become 'another language'
06:34z3phyrmuch like joxa
06:35hitekiok
06:35z3phyrjoxa feels like a dead project too.....
06:38Pupnik_its also not the only lisp for erlangvm
06:52sm0kewhat wrong with this ## map( #([(first %) (second %)]) (["a" "b"]))
06:52sm0ke,map( #([(first %) (second %)]) (["a" "b"]))
06:52clojurebot#<core$map clojure.core$map@1661ab8>
06:53sm0keoh crap wait
06:53sm0keyes actually on repl i get ArityException Wrong number of args (0) passed to: PersistentVector
06:55sm0ke,(map #([(first %) (second %)]) '(["a" "b"]));i actually meant
06:55clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (0) passed to: PersistentVector>
06:57sm0kei actually want to cast second arguemnt to an int
06:59pyrtsasm0ke: The #(...) special form requires a function to be called as first argument.
06:59pyrtsaEither use #(vector a b) or (fn [...] [a b]).
06:59sm0keok i found a ugly hack ##(map #(identity [(first %) (Integer. (second %))]) [["a" "1"]])
06:59lazybot⇒ (["a" 1])
07:00sm0kethat is ugly right?
07:00sm0ke,(map #(vector (first %) (Integer. (second %))) [["a" "1"]]); as pyrtsa said
07:00clojurebot(["a" 1])
07:01sm0kethis feels much better i guess
07:01pyrtsaOr (juxt first #(Integer. (second %)))
07:01sm0ke,(doc juxt)
07:01clojurebot"([f] [f g] [f g h] [f g h & fs]); Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). ((juxt a b c) x) => [(a x) (b x) (c x)]"
07:02pyrtsaI think I'd go with something like: (fn [[k v]] [k (Integer. v)])
07:03sm0kepyrtsa: yea i think after learning clojure i am getting obsessed with anonymous fns
07:03sm0kei should try something more readabble
07:03pyrtsasm0ke: The destructuring in my latest snippet makes it more readable IMO
07:04sm0kepyrtsa: yea thanks thats much better
07:05pyrtsaYw.
07:08sm0keok so i am now trying to make it handle null cases ##(map #(vector (first %) ((fnil Integer. "1") (second %))) [["a" "1"] ["b"]])
07:08lazybotjava.lang.ClassNotFoundException: Integer.
07:08Glenjaminis the idea to take a map of key->string-number and get a list of [key number] ?
07:12pyrtsa,(map (fn [[& [k v]]] [k (some-> v (Integer.))]) [["a" "1"] ["b"]])
07:12clojurebot(["a" 1] ["b" nil])
07:25sm0kei think i got disconnected
07:25sm0ke,((fnil Integer. "1") "2")
07:25clojurebot#<CompilerException java.lang.ClassNotFoundException: Integer., compiling:(NO_SOURCE_PATH:0:0)>
07:26sm0keisnt Integer . a function?isnt Integer. a function in clojure?
07:27pyrtsasm0ke: "Integer." isn't a function but a special form (together with the arguments) that requires to be wrapped inside an s-expression.
07:27pyrtsa#(Integer. %) is a function.
07:27pyrtsaAnd (some-> argument (Integer.)) does the same as ((fnil #(Integer.)) argument)
07:28pyrtsaOh, sorry, meant to add the % placeholder after "Integer." in the latter of course.
07:29sm0ke,((fnil #(Integer. %) "1") nil)
07:29clojurebot1
07:30pyrtsa,(some-> nil (Integer.))
07:30clojurebotnil
07:30pyrtsa,(some-> "123" (Integer.))
07:30sm0ke,((some-> "1" #(Integer. %)) nil)
07:30clojurebot123
07:30clojurebot#<NumberFormatException java.lang.NumberFormatException: null>
07:30sm0kehmm i dont understand some-> still
07:31pyrtsasm0ke: `some->` is a macro that does equally crazy things to the forms in it as do `->` and `->>` and `some->>`.
07:32noncom|2hi, I'm trying to construct the vector of arguments for a proxied class elsewhere and then just pass it to (proxy) like (proxy [MyClass] prepared-args-vector ...) but it does not work.. how can I do that?
07:32pyrtsaThey don't work together with #(...) or (fn [...] ...) because they change their form.
07:32pyrtsasm0ke: Just see my example above. You don't need the #(...) wrapping aroung `Integer.` there.
07:32sm0kethanks pyrtsa ..i will have a look at those macros you mentioned
07:34igstanI'm getting started with cljs and I can't get a browser-connected repl to work. does anyone see anything wrong with these? https://gist.github.com/igstan/3d2c2160a9672cdd42d8
08:04sm0keok so i have a list like [[1 2] [3 4]] on which i want to apply a function inside try catch form and reutnr the first suceesful result
08:05bz_gHi there
08:05bz_g(Disclaimer: I'm into the clojurecup, lurking here for help!)
08:06sm0kethe problem is clojure gives me "can recur only from tail position"
08:06sm0kewhy that limitation..specially when jvm cant optimize tail recurions
08:06sm0keso my (recur) from is inside the catch form
08:08bz_gI'm now wrestling with friend's authentication, trying to let users login through github *or* a normal account.
08:08pyrtsasm0ke: loop / recur are for tail-recursive recursion. If you wan't non-tail-recursive, just call the function recursively.
08:09TEttinger(remove nil? (map #(try (apply / %) (catch Exception _ nil)) [[1 2 0] [3 4]]))
08:09sm0kepyrtsa: omg i think i am losing brain cells
08:09sm0kethanks lets me try that
08:09pyrtsaCertainly you can achieve your goal without recursion too, e.g. using reduce.
08:10bz_gI managed to use friend for github auth, or for classical auth, but if I define two workflows, it will go through both of them until one succeeds...
08:10pyrtsa...and reduced.
08:10sm0kepyrtsa: how does recuce helps here? isnt it for combining a seq into some value
08:10sm0kereduce*
08:11TEttingersm0ke: does it need need to be a recursive thing?
08:11TEttinger(first (remove nil? (map #(try (apply / %) (catch Exception _ nil)) [[1 2 0] [0 0 1] [3 4] [1 2]]))) seems to work
08:11TEttingernot in a bot because they block off catch
08:11sm0keTEttinger: no it doesnt...its just that i dont know anything better
08:11sm0ke:D
08:11sm0keTEttinger: OMG!
08:11TEttingerfor me that returns 3/4 , seems right?
08:11sm0kebut but does it short circuits?
08:12pyrtsasm0ke: It does.
08:12TEttingeruh I think mine might not
08:12TEttingersince it does do a map
08:12sm0kehmm let me get my detective lenses to understand
08:12pyrtsa(Although map may do up to 31 steps of extra work with chunked sequences, not that it matters much.)
08:13pyrtsaTEttinger: map is lazy.
08:13TEttingeryes, is remove?
08:13pyrtsaI think so.
08:13pyrtsafilter is.
08:13TEttinger,(remove nil? (repeat nil))
08:13pyrtsaAnd remove uses filter.
08:13clojurebotExecution Timed Out
08:14pyrtsaTEttinger: You're printing the result.
08:14TEttingeroh!
08:14TEttinger,(first (remove nil? (repeat nil)))
08:14pyrtsaThere's no first either.
08:14clojurebotExecution Timed Out
08:14pyrtsa... in that sequence. .)
08:14pyrtsa:)
08:14TEttingerheh
08:15sm0keTEttinger: how does it short circuits, could you please explain?
08:15TEttingersm0ke, uh pyrtsa can explain better. it's a lazy seq
08:15TEttinger(inc pyrtsa)
08:15lazybot⇒ 1
08:15hyPiRionsee
08:16hyPiRion,(do (remove nil? (repeat nil)) :no-print)
08:16clojurebot:no-print
08:16pyrtsasm0ke: Look up laziness in Clojure. :)
08:17TEttingersm0ke, it's pretty important to do, too. I've been bit by lazy seqs where I didn't expect them before...
08:17sm0keOK i know one thing for sure repeat is lazy..
08:17TEttingersm0ke, nope. only one kind of repeat is :)
08:17TEttinger,(repeat 3 "whee")
08:17clojurebot("whee" "whee" "whee")
08:18TEttingeractually I could be wrong
08:18TEttinger,(class (repeat 3 "whee"))
08:18clojurebotclojure.lang.LazySeq
08:18TEttingeryou are correct!
08:18pyrtsaTEttinger: And chunks:
08:18pyrtsa,(let [a (atom nil)] [(first (filter #(< 1000 %) (map (fn [x] (reset! a x) x) (range)))) @a])
08:18clojurebot[1001 1023]
08:18pyrtsa,(let [a (atom nil)] [(first (filter #(< 31 %) (map (fn [x] (reset! a x) x) (range)))) @a])
08:18sm0keTEttinger: actually the repl realizes the lazyseq here
08:18clojurebot[32 63]
08:18pyrtsa,(let [a (atom nil)] [(first (filter #(< 30 %) (map (fn [x] (reset! a x) x) (range)))) @a])
08:18clojurebot[31 31]
08:19TEttingerinteresting, pyrtsa
08:20pyrtsaSo internally, map and filter use a granularity of 32, in the current version of Clojure.
08:20sm0keTEttinger: it doesnt...##17:14 < lazybot> ⇒ 1
08:20pyrtsa...unless you give a chunked seq to them, with a different chunk size.
08:20sm0ke17:15 < hyPiRion> see
08:20sm0ke17:15 < hyPiRion> ,(do (remove nil? (repeat nil)) :no-print)
08:20sm0ke17:15 < clojurebot> :no-print
08:20sm0keomg sorry wrong paste
08:20sm0ke,(first (remove nil? (map #(try (do (println %) (apply / %)) (catch Exception _ nil)) [[1 2 0] [0 0 1] [3 4] [1 2]])))
08:20clojurebotsm0ke: Excuse me?
08:21hyPiRionheh
08:21pyrtsa(And chunked seq's are practically not documented at all.)
08:21TEttingeryeah it can't do catch
08:21sm0ketry that is prints everything
08:21sm0kehyPiRion: sorry man didnt mean to wake you up
08:21TEttingeroh that's what you meant!
08:21pyrtsasm0ke: Suggestion: use `lein repl` or Emacs or something for playing around with things like that.
08:22sm0kepyrtsa: i am already on a repl
08:22hyPiRionsm0ke: no worries, I'm quite awake. It's 2 pm here
08:22pyrtsaCool. :)
08:23sm0keso can we have show circuting try catch on seq without recusrions?
08:23pyrtsasm0ke: Pretty much everything is a recursion internally. But you can achieve it with reduce (and `(reduced result)`).
08:24TEttingeryeah sm0ke, it short circuits for me at 32 I think. it evals 32 or 31 or so, then stops and gets the first
08:24pyrtsaI mean, everything of map, filter etc.
08:26sm0keTEttinger: But you snippet prints every element when i put a println form
08:26sm0keinside the try form
08:26pyrtsasm0ke: How long was your sequence then? More than 32 elements?
08:28sm0kepyrtsa: yea its not long..but the action which i want to do on each item needs a socket operation so its pretty expensive
08:28pyrtsasm0ke: Working on it... Wait a sec.
08:28sm0ke:D nice guys
08:28sm0kei am like the 'Lauging clown' as coined by zeromq guide
08:30sm0kei think we can have it if clojure had a (drop-until) or something like that
08:30pyrtsadrop-while, yes. It works.
08:31sm0kegive me give me
08:31pyrtsaWell... (first (drop-while pred xs)) should probably do the job.
08:33sm0kethis has to be weird ..even this prints everything (first (drop-while nil? (map #(try (do (println %) (apply / %)) (catch Exception _ nil)) [[1 2 0] [0 0 1] [3 4] [1 2]])))
08:33pyrtsaThe map is the problem here.
08:33pyrtsaIt's chunked.
08:35pyrtsaThis definition gives you a simple and totally lazy map: (defn map1 [f xs] (reductions (fn [_ x] (f x)) nil xs))
08:36pyrtsasm0ke: Try it in place of map in your above snippet.
08:37sm0kepyrtsa: let me try
08:38TEttingersm0ke ah, there's another. you can just call lazy-seq on your vector
08:38sm0kepyrtsa: yea that works..
08:38TEttingerand that will have a chunk of 1
08:38pyrtsaTEttinger: That's a good one.
08:38pyrtsaThe best advice actually.
08:38TEttingerthanks
08:39pyrtsaTEttinger: Oh, does it work like that, actually? The documentation looks like not.
08:39sm0keTEttinger: nope doesntworks ..(first (drop-while nil? (map #(try (do (println %) (apply / %)) (catch Exception _ nil)) (lazy-seq [[1 2 0] [0 0 1] [3 4] [1 2]]))))
08:39TEttingerargh ran the wrong code
08:39pyrtsaTEttinger: lazy-seq is used when making the recursion step lazy.
08:40sm0keso the issue here is that the seq we are working with is not lazy?
08:41pyrtsasm0ke: It's not fully lazy. It's lazy with chunks of 32 elements.
08:41sm0kepyrtsa: can we make it lazy with chunk of 1? :D
08:42pyrtsasm0ke: I think that's something that's still missing in Clojure.
08:42pyrtsa:)
08:42sm0ke:(
08:42pyrtsaPatches welcome, I suppose.
08:42TEttingerI am pretty sure this can be done though
08:42pyrtsaIIRC, Fogus blogged about it like 3 years ago. But his blog is offline since a few weeks ago.
08:42pyrtsaTEttinger: Definitely.
08:43sm0kepyrtsa: what is that map1 thing you gave?
08:43pyrtsasm0ke: It's my best quick tip for you to get the job done.
08:43pyrtsaEffectively does the same as map but with a chunk size of 1.
08:44pyrtsa(And with one sequence as argument only, as you see.)
08:44sm0kehmm it works but not very intutive for me
08:48pyrtsasm0ke: I think it is if you understand reductions.
08:48pyrtsaBut here's an alternative impl (map2): https://gist.github.com/pyrtsa/6741499
08:49pyrtsaI need to go. Have a good one. ->
08:50sm0kethanks pyrtsa
08:51jonasentechnomancy: I guess this is ok while developing: https://github.com/technomancy/syme/blob/master/src/syme/web.clj#L21
08:52jonasentechnomancy: I'm thinking of doing the same thing..
08:54pyrtsaOh, one more thing...
08:55pyrtsasm0ke: Of course you can change any sequence to lazy with this: (defn lazy [xs] (reductions (fn [_ x] x) nil xs))
08:56hyPiRionNo value of making a sequence lazy when it's already realized
08:57igstanhow does js array access look like in cljs?
08:57sm0kegood one
08:58sm0kei am goined to name is unchunked and copy it shamelessly @ pyrtsa
08:58igstanfound out. it's (aget js-array index)
09:04piranhaanybody using cljsbuild crossovers here? Can't get it to work :(
09:26dissipatewtf, who wrote the 4th solution to FizzBuzz in clojure here: http://rosettacode.org/wiki/FizzBuzz#Clojure ? that solution is cray
09:30hashcathi , can anyone give me a reason why clojure rather than other lisp on jvm?
09:31jowaghashcat: immutability
09:31jowaghashcat: composable abstractions, opposed to inheritance
09:31hyPiRiondissipate: crazy?
09:32dissipatehyPiRion, yep.
09:32jowagambrosebs: does core.typed recognize a "type kind" concept, or I should just use (marker) protocols for that?
09:32hashcatjowag: helpful, thanks. honestly, My first lisp is clojure
09:32dissipatehyPiRion, do you understand all of those solutions to FizzBuzz in Clojure?
09:33ambrosebsjowag: what do you mean?
09:34hashcatambrosebs: kind can be recognized as type of type.
09:34hyPiRiondissipate: well, yes. But I think any person who has worked with Clojure for some time would
09:34hyPiRionSome of them aren't that idiomatic though
09:36ambrosebsI don't see how marker protocols are relevant, so I assumed jowag was talking of something else?
09:36dissipatehyPiRion, i don't understand why 'f' and 'b' have to be passed to 'str' in the 4th solution
09:36ambrosebswe have higher kinded/rank types in core.typed.
09:37hyPiRiondissipate: concatenating strings together
09:37hyPiRion,(let [f "foo" b "bar"] (str f b))
09:37clojurebot"foobar"
09:37dissipatehyPiRion, ah, i see. yeah, it's not too bad actually. i think i initially freaked out about the verbosity.
09:38dissipatehyPiRion, which ones aren't idiomatic?
09:38jowagambrosebs: i meant type of types
09:39dissipatei like the 3rd solution
09:39jowagambrosebs: e.g. I soemtimes want to accept symbol or a keyword. If I just use something like Named protocol, it is more of a duck typing
09:40hyPiRiondissipate: second one is on one line. third one starts with `(lazy-seq (map` (map is lazy)
09:41dissipatehyPiRion, so the third one needs to be fixed. the 5th one is idiomatic?
09:41hyPiRiondissipate: coulda replaced the whole if-let thing with an "or" if used correctly
09:41hyPiRionthat's what I would do
09:42hashcatjowag: https://github.com/clojure/core.typed/wiki/User-Guide#higher-kinded-variables
09:42dissipatehyPiRion, edit the page and fix it up. :D
09:42ambrosebsI don't think jowag is talking about higher rank types. Named is just an interface.
09:43ambrosebsjowag: I think you mean you want a supertype, not a type of types.
09:43jowagambrosebs: well yes, but it can be a poor man's solution if you to represent a set of types
09:44jowagambrosebs: maybe, I'm not at home in type theory
09:44ambrosebsjowag: do you mean union types?
09:44ambrosebs(U Symbol Keyword)
09:45jowagwell union is not extensible
09:46hashcatcould someone help me with eclipse? when I type "(def" and expect a complement of "(defprotocol"
09:46hashcatit just show me "(defn". what did I miss?
09:46hyPiRionhttps://www.refheap.com/19104 probably
09:48ambrosebsjowag: what's wrong with Named?
09:48IamDrowsyhashcat: do you have a running repl instance?
09:49hashcatIamDrowsy: I don't know whether it already run or not
09:51hashcatI just create a project and expect complementation would work
09:51jowagambrosebs: currently it serves the purpose, but it does not convey the message, if I wanted to accept an identifier and not any type implementing Named (e.g. namespace or string may implement Named protocol in the future)
09:53IamDrowsyso load the file in a repl (strg + alt + s) and try again
09:53ambrosebsjowag: I think I need to see some code. I don't know what you mean.
09:53hashcatIamDrowsy: strg?
09:53IamDrowsyctrl :) sry
09:55dissipatehyPiRion, i see, thanks for the example.
09:55hashcatit still only show me defn
09:55hashcatand slow down
10:00IamDrowsyhm.. it works for me. do you have a window "REPL @ ...." open now?
10:00IamDrowsyif not try to start the repl via menu (Clojure -> Load file in Repl)
10:01jowagambrosebs: it is not a practical problem, just me wrapping my head around all this type stuff and imagining what-if
10:01jowagambrosebs: anyway thanks for help
10:02jowagand everybody please support http://www.indiegogo.com/projects/typed-clojure :)
11:14hashcatIamDrowsy : sorry, I was leaving
11:22hashcatstill only defn
11:45juliangindiDoes anyone have a "better" debugging tool? I just got a stack-trace that does not mention any source code files I created
12:13nDuffjuliangindi: clj-stacktrace will make your stack traces cleaner / easier to work with
12:13nDuffjuliangindi: ...and if you want something serious and don't mind overhead setting it up, there's ritz
12:17seangrov`nDuff: you recommend ritz? I still haven't used it, might be time to play with it a bit
12:19juliangindinDuff: clj-stacktrace looks pretty good. I'm gonna give that a whirl.
12:19nDuffI don't use ritz habitually -- actually, if I need to trace something in execution, I'm just as likely to reach for Light Table (and set it back down after) -- but it's a good tool; just has a lot of moving parts that need to be set up just so to work.
12:27john2xhow do I get the md5 hash of a string in clojure?
12:30ivangetting a NullPointerException after my JavaScript builds, am I doing something wrong? https://www.refheap.com/027b8ba6b2a2ee49daa784ef0/raw
12:31jonasenjohn2x: http://stackoverflow.com/a/415971/24946
12:31nDuffjohn2x: ideally, use apache commons-codec's DigestUtils; the version in the Java standard library is pretty funky.
12:31nDuffjohn2x: (org.apache.commons.codec.digest.DigestUtils/md5 "string")
12:32john2xthanks!
12:34Jardawhen using hickup.form, is there a way to easily pass classes for the elements created and/or error descriptions?
12:35GlenjaminJarda: you can pass a map as the first argument, which will become the element's attributes
12:51sm0kehello is it a good practice to have blocking parts of your code inside a go block?
12:52sm0kei have an application where on part is a ring server..another is a database handler part
12:52sm0kecan i just put their main entry point inside seperate go blocks?
12:53sm0kealthough i have read core.async author telling somewhere that go blocks should be used for cpu intensive tasks
12:54sm0kebut to be honest most applications rarely write things which are cpu intensive per se..but depend a lot on network io database io etc
12:54sm0keconsidering that i think go blocks are useless than
12:56sm0keotoh i can just spawn a thread but i would really like to make use of channels which are really nice imo
12:56sm0keblah blah bleh..
12:57ivanoh, I see, I managed to guess that my .cljs file needed an (ns )
12:58sm0keivan: haha living dangerously..i never tried on without a (ns)
12:59sm0ke.cljs? whats that clojure script/
12:59sm0keis that really something worth trying in production?
13:00ivanyes
13:00sm0kei always have a feeling that compiling to js is a bad idea
13:01nDuffjavascript is an awful language. Why would you want to write in it directly?
13:01sm0kenDuff: to save the pain of having to debug in js first than on cljs
13:02nDuffsm0ke: *shrug*. It's a matter, I suppose, of how heavily interop-dependent your code is.
13:02sm0kenDuff: its not like when your js crashes ...you know where to look for in cljs? or is it?
13:02nDuffsm0ke: if 95% of your cljs all runs in native Clojure, you can have your unit tests happen before it ever touches a browser.
13:03nDuffsm0ke: ...and, well, you can have the other 5% unit tested in a browser, too, if you need to.
13:03nDufflook at the Pedestal dataflow model for an example of things done right.
13:03seangrov`sm0ke: There's also source maps, but cljs may be too young for you
13:03nDuffalmost everything that matters is in code that's very easy to reproduce and prove behavior for.
13:04nDuffsm0ke: anyhow -- I've had CLJS in production for over a year, and it works for me.
13:04sm0kenDuff: i really have a feeling(tm) that unut testing 95% of your cljs doesnt really tells you how it would behave in a browser..
13:04sm0keunit*
13:04nDuffsm0ke: that "feeling" would be wrong, if you keep it interop-free.
13:04nDuffsm0ke: which is why you do all the interop in the 5%. :)
13:04sm0kehmm i really cant say much..i havent had a look at cljs
13:05sm0kebut i have seen fails like coffescript, cappuchino, gwt etc etc
13:05sm0ke:/
13:05nDuff...the debugging stack there is beautiful.
13:05nDuffSeriously. Thing of beauty. Love it.
13:06sm0kenDuff: you are insane
13:06nDuffsm0ke: I think the difference between us is that you treat generated javascript as code to be debugged. That's a mistake.
13:06sm0keits ugly as hell ... trying to write 20 lines of code which you can do in 1 line of js
13:07nDuffsm0ke: ...unless you dive into compiler-generated assembly for C, why would you dive into compiler-generated javascript?
13:07nDuffOh. Well, yes, the java bits are ugly because they've Java.
13:07nDuffThat's unavoidable. The *toolchain*, though, is beautiful.
13:07sm0kenDuff: oh so you really belive that "Js is assenbly of browser"?
13:07sm0keassembly*
13:08nDuffsm0ke: Exactly -- I do drink that kool-aid.
13:09sm0kei really think js is too high level to be considered an assembly
13:09hashcatwhat's the best ide for clojure?
13:10nDuffsm0ke: it's an _awful_ high-level language. Better to just ignore what it does badly and focus on using the good parts -- which is to say, the really fast JIT compilation in modern browsers.
13:10nDuffhashcat: the general consensus is emacs.
13:10nDuffhashcat: you can see the survey for a breakdown of what people use.
13:10nDuffhashcat: http://cemerick.com/2012/08/06/results-of-the-2012-state-of-clojure-survey/ <- there hasn't been one for 2013.
13:10hashcatnDuff: can it be integrated with lein?
13:10sm0kenDuff: agreed awful..but its too good for dom manipulation...couldnt have been better
13:11hitekihashcat: yes it can
13:11dnolenjonasen: http://cljsfiddle.net, cool!
13:11hashcatbut how?
13:11hitekihashcat: as far as I remember there is even a lein emacs mode available on marmalade (elein)
13:11sm0kewait a minute ..i was here asking about the concurrency shit..i am still not able to figure out in clojure
13:12sm0kesomehow whenever is ask about concurrency i never get a reply
13:12nDuffhashcat: watch some of the live-coding videos from the Overtone folks for an idea of just how good the integration is.
13:12hyPiRioneh what
13:12hyPiRiondoesn't cl-format work with *err* ?
13:12sm0kei use vim
13:13sm0keand i hate enter meta alt control space
13:13nDuffhashcat: this video is years old, and the tools have gotten better since then, but see http://vimeo.com/22798433
13:13sm0ke:D
13:14nDuffsm0ke: I use the right tool for the job. For 80% of the languages I work on that's vim, but for Clojure, it's Emacs.
13:14sm0kenDuff: wow you can do that? you must be having evil in emacs than?
13:15nDuffsm0ke: nope.
13:15nDuffsm0ke: I've had finger-memory for multiple editors for decades now.
13:15sm0kenDuff: you must be chuck norris than
13:16hashcatbut why emacs drop 10%?
13:16nDuffNewcomers, I'm guessing.
13:16sm0kecomiler doesnt warn nDuff he warns the compiler
13:17hashcatok, I give it a try
13:17sm0kehey hashcat also try vim with fireplace plugin
13:18hashcatno. I tried intelliJ and eclipse. using gedit now
13:19sm0kehashcat: haha good one
13:19nDuffhashcat: if you want a configuration that's pre-built, the fellow who put together that video is behind https://github.com/overtone/emacs-live
13:19hashcatintelliJ and eclipse are silly enough.
13:19sm0kehey nDuff you got any apps with clojure in production?
13:19nDuffsm0ke: not public, but yes.
13:20sm0kenDuff: just want some advice ... how do you handle concurrency..i mean you use threads..future..goroutines?
13:21hashcatnDuff:it looks great!
13:22sm0kewhat the hell is that glow
13:22nDuffsm0ke: everything I have in production predates core.async. atoms, mostly; refs, occasionally; agents, fairly often.
13:22scottjsm0ke: the glow is fake
13:23nDuffsm0ke: If you want a good discussion of which concurrency primitives to use when, I strongly suggest reading Joy of Clojure
13:23sm0ke:D i knew it those emacs guys will do anything to seduce new people
13:23sm0kenDuff: which chapter in particular?
13:23sm0kenDuff: also i dont think it would be covering core.async?
13:24sm0keas its fairly old book
13:24nDuffthe upcoming second edition might touch on core.async
13:24nDuff(and said second edition _is_ available in early access)
13:24nDuffI don't have chapter titles/numbers memorized.
13:25sm0kenDuff: ok ill have a look thanks
13:27ivanis there some way to control lein-cljsbuild's :jvm-opts?
13:28mdeboardHas there been a particular design pattern that's been settled around wrt channels?
13:28mdeboardor is it pretty much piles of functions
13:40dnolenpretty sweet - http://cljsfiddle.net/fiddle/swannodette.test-logic
13:42dnolenmdeboard: not sure what you mean
13:45bbloomdnolen: ambrosebs: RE: type providers - I explain how that gist dnolen pointed out differs from F#'s type providers https://news.ycombinator.com/item?id=6462374
13:46mdeboarddnolen: Well, for example at work, we use a mediator pattern to declare how "subapps" within a single application communicate with each other. What signals subapps' controllers handle & emit, and so on. In this dumb little HTML/JS game I'm working on, I'mjust kind of making up a design pattern around channels, and was wondering if there's a better way.
13:47mdeboardright now I'm just piling up functions and calling them e.g. https://gist.github.com/6744265
13:47mdeboardrelevant bit at line 102
13:48mdeboardinitialize all the channels, then pass them to relevant consumers
13:49dnolenmdeboard: at first glance looks fine, however 75-90 those fns aren't different
13:49mdeboardyeah, I'm still trying to get my spaceship to fly around atm before I put in more abstractions
13:50mdeboardbut I mean imagine a much larger program I guess, would it still just be directly initializing the channels and passing them to consumers? I do'nt know what I'm asking really.
13:51dnolenbbloom: nice
13:52bbloomin my best jesse pinkman voice: decomplected, bitch
13:53dnolenmdeboard: using core.async takes some getting used to - you'll figure out a nice pattern soon enough I suspect. But yes making channels and sending them to other fns w/ go blocks is not unusual.
13:53mdeboardAlrighty. I Just collapsed 75-90 down into (init-chan)
14:06juliangindiHey every. I'm attempting to grab some data from a JSON api response but am having difficulties because the type is String. Are there any libraries that will make parsing this data easier?
14:08gfredericksjuliangindi: you want to parse a json string? cheshire will do that with one function call
14:09juliangindigfredericks: This looks super badass. Thanks!
14:11gfredericksjuliangindi: if you're using clj-http to get the "api response", it will do it for you as well
14:11gfrederickswith the :as :json option
14:12mdeboardjuliangindi: Cheshire is amazing
14:12mdeboardNeed it for clojurescript imo
14:12mdeboardthough I guess `(.parse js/JSON s)`
14:13juliangindiHmm. I'm running into this error: clojure.lang.PersistentArrayMap cannot be cast to java.lang.String
14:13juliangindiwhen using Cheshire
14:14mdeboardjuliangindi: how are you using it
14:14jonasendnolen: I tried to update to the latest clojurescript version but I couldn't make it work.. I got "Wrong number of args (3) passed to: reader-types$indexing-push-back-reader". I'll try again tomorrow..
14:14gfredericksjuliangindi: does (cheshire.core/parse-string "{}") work for you?
14:15dnolenjonasen: it depends on tools.reader 0.7.8, it's a declared dep
14:15jonasenmaybe I pull in the wrong version via some other dependency..
14:16juliangindigfredericks: That does work for me
14:16dnolenjonasen: would love to get warnings in this :)
14:17dnolenjonasen: still it's amazing
14:17dnolenhttp://cljsfiddle.net/fiddle/swannodette.test-match
14:17jonasenyes.. there is still a WIP.
14:18jonasenbut I'm really happy with the perf of the edit/compile/run cycle... it's faster than cljsbuild for me :)
14:19juliangindigfredericks: Got it working =)
14:21dnolenjonasen: yes this is going to be a great tool, thanks much
14:21mdeboardjonasen, dnolen: This is kind of like dommy's `set-text!` isn't it? https://github.com/Prismatic/dommy/blob/master/src/dommy/core.cljs#L50
14:22dnolenmdeboard: yeah I should probably use that, never used dommy before though
14:22mdeboard(not saying it's redundant, earnest question)
14:22jonasendommy is available (but I haven't actually tried it :)
14:23jonasenI'm more used to domina
14:23mdeboardTheir blog post on it boasts some pretty good performance gains, at least over jquery DOM manip
14:23mdeboardhttp://blog.getprismatic.com/blog/2013/4/29/faster-better-dom-manipulation-with-dommy-and-clojurescript
14:23jonasenmdeboard: yeah, I'm sure it's great
14:24gfredericksjuliangindi: good
14:35mdeboardI've been relying on cljsbuild to inject cljs dep into my project because the last version of cljs I tried didn't play well with core.async. Is there a version I can put in my project.clj now
14:36dnolenmdeboard: latest core.async and CLJS work fine together
14:37radixheya, do most people who want to do asynchronous I/O in clojure just use jetty directly?
14:39radixasync socket I/O in particular
14:40juliangindiI am attempting to get some data within a particularly ugly data structure. Could anyone tell me how I could make this cleaner? https://gist.github.com/Julian25/6744759
14:42radixhum. got confused I think :)
14:42mdeboarddnolen: Is latest of each on maven?
14:42dnolenmdeboard: should be
14:42mdeboard0.1.242.0-44b1e3-alpha for core.async and 0.0-1909 for cljs? Those are compat?
14:43callendnolen: thanks for posting cljsfiddle, that's cool!
14:44dnolencallen: thank jonasen since he did all the actual work :)
14:44callendnolen: I know, just glad to be aware of it. we might use it to fiddle around for our Clojure Cup project :)
14:44callenjonasen: thanks for making cljsfiddle :)
14:44jonasencallen: that would be awesome... hope it helps
14:44mdeboardjuliangindi: Is this json you're talking about?
14:44jonasencallen: thanks
14:45juliangindimdeboard: Yeah, I parsed the JSON string and now I'm just trying to get one piece of data from it
14:46callenjonasen: do you have a Twitter I can follow?
14:46mdeboardjuliangindi: Yeah I mean it's basically like JSON in any other language, you have to walk the tree. I'd just use named attribute access for the easiest way.
14:46jonasenI do, but I don't use it much: https://twitter.com/jonasenlund
14:47mdeboard(:foo (:bar (:baz (:wut (:lol (parse-string :body))))))
14:47juliangindimdeboard: Yeah, I think I'll have to use a mixture of named attributes and numbered indexes
14:47bbloom(doc get-in)
14:47clojurebot"([m ks] [m ks not-found]); Returns the value in a nested associative structure, where ks is a sequence of keys. Returns nil if the key is not present, or the not-found value if supplied."
14:47mdeboardjuliangindi: Or you could use clojure.zip
14:47callenjonasen: well just in case :)
14:47mdeboardbbloom: Nice
14:47bbloom(get-in whatever [:foo 5 :bar 2 3 4])
14:48mdeboardVery nice
14:48bbloomjust a tree of maps & vectors
14:48callenmaking update-in do the right thing with scalars that can get promoted to vectors is fun.
14:48bbloomusing vectors as "paths" in a tree is good fun & quite useful
14:49mdeboard`(get-in {:foo [0 1 2 3 {:bar [4 5 [6 7 8 [9 10 11]]]}]})
14:49mdeboard?
14:49bbloom,(get-in {:foo [:x :y] :bar [:z]} [:foo 1])
14:49clojurebot:y
14:50mdeboardman tha'ts slick
14:50bbloom(update-in {:foo [:x :y] :bar [:z]} [:foo 1] inc)
14:50mdeboardpeople ar esmart
14:50bbloomer, i mean
14:50bbloom,(update-in {:foo [5 10] :bar [15]} [:foo 1] + 2)
14:50clojurebot{:foo [5 12], :bar [15]}
14:52bbloomwhat's awesome about that is you can chain it ##(-> {:foo [1 2]} (update-in [:foo] conj 3) (update-in [:foo 1] + 10) (update-in [:foo] (partial mapv inc)))
14:52lazybot⇒ {:foo [2 13 4]}
14:52bbloomlet's you do imperitive-ish field-by-field updates w/o mutation & clean syntax
14:54dobry-denIn ever emacs nrepl config I encounter, people either have nrepl exceptions left default (open up a buffer that you have to :q on any exception) or they turn off the notification entirely so all you get is a minibuffer error without even a line number.
14:55dobry-denIdeally exceptions would display in some temporary buffer that I dont need to painstakingly navigate to just to close. Is there a middleground?
14:58dobry-den(nrepl-popup-on-error nil) (nrepl-popup-stacktraces-in-repl t) (nrepl-popup-stacktraces nil) is what I have, but it just displays a one-liner in the minibuffer.
15:05mdeboardIs there something special I need to do to use (:use-macros) in my ns definition? I created a src/cljs/clj_typeshooter/macros.cljs file and updated my ns def to read https://gist.github.com/mattdeboard/6744997 but when I go to cljsbuild, it tells me it can't find "macros.clj"
15:05mdeboardHow do I let cljsbuild know that it's a cljs file, not clj ?
15:05mdeboardOh, it needs to be a clj :)
15:15mdeboardAnyone spot anything particularly wrong with this macro? https://gist.github.com/mattdeboard/bf1c291b96e048461c19
15:16dobry-den~update-ch?
15:16clojurebotPardon?
15:18mdeboardThat's just a channel that would be passed in to the function that invoked `go-handle!'
15:18mdeboardThis is actually a macro for use with CLJS, for UI event handlers to update an "update channel" to redraw the canvas
15:18dnolenmdeboard: you need ~update-ch in order to insert whatever the user provided
15:19mdeboardOh, I see
15:19dobry-denyeah that's what i meant
15:20mdeboardbe that as it may, still getting the following: Caused by: clojure.lang.ExceptionInfo: Could not locate cljs/core/async__init.class or cljs/core/async.clj on classpath: at line 1 src/cljs/clj_typeshooter/macros.cljs
15:20mdeboardis it because I'm not requiring cljs.core.async?
15:21mdeboardThat doesn't work either. I dunno why I ever bother with macros, they just turn into a huge timesink for me :P
15:22dobry-denmdeboard: dude, same. i was just about to ask if anyone could point me in the right direction for writing a macro that can dynamically set the ns: https://www.refheap.com/19116
15:24dobry-denor maybe there's a better way to have a set of requires/imports/uses that you want consistent across a group of namespaces
15:24Leonidascan I say to leiningen to refer to an local git checkout somehow?
15:25Leonidasso I don't have to upload every change to clojars again and again.
15:25dobry-denLeonidas: i bet so, https://github.com/technomancy/leiningen/blob/master/sample.project.clj
15:27mdeboardWhoops, forgot to delete macros.cljs, that was throwing the error.
15:27winkLeonidas: not git checkout, but local .m2 is pretty easy. see http://stackoverflow.com/questions/8738664/dependencies-in-maven-local-repositories-with-leiningen or something
15:27Leonidasdobry-den: uhm, sorry for being dumb but I scanned it and couldn't find it… which option is that?
15:28dobry-denneither could i
15:28Leonidasohhai wink :)
15:28winkehlo :)
15:30Leonidaswill try lein-localrepo
15:30piranhadnolen: hi, I'm having a really strange (as in: have no idea what's going on) error when using 1909, but everything compiles nicely when using 1877
15:30piranhaerror is here: http://paste.in.ua/8774/
15:31dnolensomehow you're not getting tools.reader 0.7.8
15:31piranhahm ok
15:31winkLeonidas: or google roudn for local maven repo. been a while
15:31clojurebotCool story bro.
15:32piranhaoh it was in my project.clj, version 0.7.6... :\
15:32Leonidaswink: yeah. but it is still kinda a bother compared to PYTHONPATH trickery, unfortunately.
15:33piranhadnolen: I thought removing tools.reader from deps in project.clj should've helped, is that right? Because it did not and I had to bump its version there...
15:34dnolenshould just work
15:34dnolenpiranha: you can confirm with lein deps-tree
15:34piranhaok! :)
15:34piranhathanks
15:34dnolenpiranha: https://github.com/the-kenny/lein-deps-tree
15:35dnolenpiranha: I just tried it on core.async itself and I saw 0.7.8
15:35piranhaheh ok :)
15:36piranhaI also had a question about how do I write a macro properly...
15:36piranhaI have one and when it executes cljs reports 'Use of undeclared Var ....'
15:37piranhait's quite simple, but I still don't understand what's wrong: https://github.com/piranha/pump/blob/master/src/pump/def_macros.clj#L16
15:37technomancyLeonidas: you want checkout deps; check `lein help faq`
15:38dnolenpiranha: what does it say is undeclared?
15:39piranhadnolen: something like that: WARNING: Use of undeclared Var warmagnet.components/Navbar at line 16 cljs/warmagnet/components.cljs
15:39piranhathat's when I do (defr Navbar ...) in ns warmagnet.components
15:40Leonidastechnomancy: okay, thanks, will try.
15:42the-kennyhuh? The lein deps-tree plugin was just for 1.x if I remember correctly
15:42the-kennyIt's functionality was merged to 2.0 as lein deps :tree
15:42the-kennys/It's/Its/
15:45dnolenpiranha: when do you see this? during auto build?
15:45piranhadnolen: yes
15:46dnolenpiranha: do you see this if you do a clean build
15:46dnolen?
15:46Leonidastechnomancy: works, thanks!
15:48piranhadnolen: yep
15:49dnolenpiranha: huh, would need a minimal project that exhibits the issue to investigate further, I don't see anything obviously wrong w/ your macro at the moment
15:50piranhadnolen: ok! :) well if you have time, cloning github.com/piranha/pump and running cljsbuild there will show this problem, but I'll make smaller project if you want after clojure cup :)
15:50mdeboardomfg my handler macro works
15:50mdeboardwhat the hell
15:50mdeboardSomething is wrong, I wrote a macro that works
15:53mdeboardliterally cannot believe https://gist.github.com/mattdeboard/6745533
16:13mdeboarddobry-den: I did it! https://github.com/mattdeboard/clj-typeshooter/blob/master/src/cljs/clj_typeshooter/macros.clj#L3
16:14tbaldrid_mdeboard: why send 1? why not the result of body?
16:16mdeboardbecause so far the functions for which I wrote this macro are just channel consumers. This is just for handling what would otherwise be callback logic in JS
16:19mdeboardtbaldrid_: Though you're right, I'd probably need another variant that puts the result of body into the channel
16:19mdeboardeventually
16:19technomancyjudging from the clojurecup web site, I'm guessing a hidden rule is that you have to be listening to chiptune while working on it
16:19technomancychiptunes
16:21kaskohi guys at the api docs appears this function that I need: pow multimethod algo.generic Return the pow of x and y..
16:21kaskohow can I call it?
16:22indigoHah, one print copy of "How to Solve It"
16:22indigoIs that book really that good
16:23hyPiRionindigo: it's good if you can follow the mathematics in it
16:23hyPiRionit's not terribly difficult, but it's aimed for mathematicians
16:25juliangindiSo, I'm trying to construct a rudimentary caching system in Clojure and cannot quite seem to figure out how to have a global variable that always contains an updated version of a hash-map. The idea is that I will check to see if a particular key exists in this hash-map and if it does, return that value. If not, ill set a new value for that key. Any ideas?
16:25mdeboardjuliangindi: An atom is one way
16:25dobry-denjuliangindi: use an atom?
16:26mdeboardjuliangindi: (def my-cache (atom {:foo 1}))
16:26dobry-denseems like textbook atom semantics you described
16:26juliangindialrighty, I have not used those before but I'll check them out
16:26technomancyjuliangindi: can you just use a memoized function?
16:26technomancy(only works if you never have to expire anything)
16:26Apage43or use https://github.com/clojure/core.memoize if you do need expiry
16:27mdeboard(swap! my-cache #(update-in % [:foo] inc))
16:27juliangindioh wow, I think memoize will be perfect
16:27technomancymemoize is basically just a way of wrapping an atom around a function like a cache; simpler but less flexible
16:29Apage43https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L5739-L5753
16:30seangrov`technomancy: Is the chiptunes comment because of the design or some videos?
16:31technomancyseangrov`: just the look of clojurecup.com
16:32hyPiRionMan, I'm going to take time off for clojurecup.com next year.
16:32technomancyI should do another post on music I like to code to
16:32seangrov`technomancy: Bummer, thought I cloud have found some good chiptunes to listen to
16:33technomancylistening to http://zabutom.se/album/zeta-force right now and it is great
16:33juliangindiIs there a way to "reset" a memoized function after a certain amount of time?
16:33seangrov`Thanks technomancy, will check it out
16:33hyPiRionjuliangindi: no, not unless you do that yourself
16:33technomancyjuliangindi: I submitted a patch for that, but it was rejected. core.memoize has it though
16:34juliangindiOh, ok. I'll check ut core.memoize
16:34technomancyit's pretty easy to write a copy of regular memoize that puts the atom on the fn as metadata
16:34technomancyhttp://dev.clojure.org/jira/browse/CLJ-804 <- juliangindi
16:35technomancyhuh I just noticed someone suggested "make a Guava-wrapping contrib" as a solution O_O
16:36technomancyjuliangindi: actually it's not difficult
16:36technomancy(alter-var-root #'memoized-version (constantly pre-memoized-version)) <- resets
16:36julianginditechnomancy: You guys rock. I'll give that a shot
16:36technomancygood luck
16:39hyPiRiontechnomancy: that would remove memoization altogether again though.
16:39technomancyderp; that is true
16:40hyPiRion(comp memoize (constantly pre-memoized-version)) would work though
16:40hyPiRion(I guess)
17:06dobry-denWhat's the difference between calling (def x ...) a second time vs. using alter-var-root?
17:14marcopolo2technomancy: This site is bringing back memories :)
17:14konrhow can I remove the prefix from a keyword? Like :foo/bar -> :bar
17:15indigodobry-den: It's possible to wrap an existing definition with alter-var-root
17:16marcopolo2,(name :foo/bar)
17:16clojurebot"bar"
17:17dobry-denindigo: yeah, to clarify, what's the difference between updating an existing def by just invoking def again vs using alter-var-root
17:17dobry-deni have some hacky code that just uses def again and just learned about alter-var-root
17:18technomancyusing def at runtime is usually a hint that someone is trying to program imperatively; using alter-var-root signals to me that someone probably knows what he's doing but is being too clever for his own good.
17:21callentechnomancy: says the author of robert.hooke
17:21seangrov`tbaldridge: Thanks for the deep-walking macro video, was fun to skim through
17:21callenenabler of all things AOP and awesome.
17:21technomancycallen: no, it's way too clever
17:21technomancyit should be considered a measure of last resort
17:21callentechnomancy: I'm pretty close to doing a talk just about robert.hooke and Dire.
17:22callentechnomancy: The Metaobject Protocol rises again!
17:28marcopolo2are macros evaluated inner to outer?
17:53cpetzolddoes anyone know if there's a known issue with loops in go blocks in latest cljs?
18:12callencpetzold: yep
18:12callencpetzold: use a newer version
18:12cpetzoldyeah, just updated core.async to latest and it's fine now, thanks callen
18:14Glenjaminthat reminds me, i've had a note in my inbox for months to remind me to try and implement catch+ for Dire
18:21mdeboardWhere can I find changelog for clojurescript? I upgraded to build 1909 and it is giving me grief
18:22cgagif i have a bunch of pairs like [:a :b] [:a :c] [:a d] and want to get a map: {:a [:b :c :d]}, is there a better way to do that than something like: (reduce (fn [m [k v]] (assoc m k (conj (m k []) v))) {} ...)
18:23amalloy(into {} pairs)
18:23amalloyoh
18:23cgagi feel like maybe there's some std lib thing i'm missing
18:24amalloycgag: well, update-in/fnil are nicer than assoc/conj with a default value
18:25amalloywhat you want is almost (group-by first), but you want to also call second on the vals; if you like, that function is in flatland/useful: (groupings first second pairs)
18:29mdeboarddnolen: Does `js/window' no longer "satisfy INamed" ? https://github.com/clojure/clojurescript/compare/r1853...r1909#L11L6214
18:31cgagthe update-in/fnil version isn't bad
18:31cgagi'll look at that groupings function
18:32cgaggroup-by was my first thought
18:34Glenjaminpossibly turn the vectors into single element maps and then merge-with?
18:35Glenjaminunsure if that'll be any better
18:35cgagGlenjamin: that's what i did first, turned them into maps that looked like {:a [:b]} and used merge-with concat
18:35cgagbut i thought reduce might be more clear
18:36amalloycgag: yikes. merge-with into, not merge-with concat
18:36cgagneither is bad, i just thought something like groupings might already exist
18:37amalloytry your merge-with/concat version on (repeat 2000 {:a [:b]}) for a fun time
18:37cgagyeah good call
18:39cgagthis was just a tiny exercise but i'll keep useful/groupings in mind for larger stuff
18:39cgagthanks
19:10dobry-dentechnomancy: i basically define (def conn (d/connect uri)) but need to replace conn with a fresh connection when i (recreate-and-seed-db) which returns the new conn.
19:11dobry-denso for now i just (def conn ...) again in (recreate-and-seed-db) fn which doesnt always seem to work. but that's the best ive got
19:12dobry-denbecause i'm in a perpetual idea-famine.
19:12dobry-dena drought of smart.
19:14Glenjaminsounds like you might be better off with an atom
19:25radixhmm. I just upgraded to clojure 1.5.1 from 1.3 and I can't use "doc" in my repl any more... did that get changed?
19:28ToBeReplacedradix: idk if anything changed, but (use 'clojure.repl) will get you there
19:29radixhuh. ok. maybe it's just how "lein repl" starts it up
19:29radixToBeReplaced: yeah that worked, thanks :)
19:47chordyou guys going to help with starcraft project in clojure
19:49chordSOMEONE ANSWER ME
19:49mgaare:D
19:50chordmgaare help me with the project www.github.com/chord-rts/rts
19:51radix-_-
19:51radixhuh, gloss looks pretty rad.
19:52chordwhat?
19:52clojurebotwhat is short for ,(doc ...)
19:53seangrov`clojurebot: botsnack
19:53clojurebotbotsnack is forget botsnack
19:56chordyou guys got clone the code and CONTRIBUTE NOW
19:57chordso you guys admit your girlfriend cheated on you
19:58callenhe is seriously fixated on the unfaithful girlfriend thing. Sniffs of projection.
19:58callenseangrov`: Clojure Cup is going well. How are you?
20:00chordcallen: CLONE MY CODE AND CONTRIBUTE
20:04danielglauserI'm sure folks are busy with the Clojure Cup bit if anyone isn't, I'm looking for good resources to get folks started with ClojureScript
20:04danielglauserI'm aware of the O'Reilly book, are there any blogs or other web pages that folks recommend?
20:06chorddanielglauser: just use coffeescript instead
20:07danielglauserRight...
20:07chordjavascript is imperative based you're trying to fight too much
20:24dnolendanielglauser: http://github.com/magomimmo/modern-cljs
20:24dnolendanielglauser: my blog covers bits of core.async w/ respect to CLJS http://swannodette.github.io/
20:25danielglauserThanks dnolen, that's exactly what I'm looking for!
20:51mullrI'm having some trouble getting source maps to work with clojurescript (1909). The .js.map file is built and appears to be referenced appropriately from the .js file, but chrome devtools aren't doing anything with it. Does anybody know a way to diagnose this problem? (some kind logs inside of chrome, perhaps)
20:52mullrThe only thing in my setup that's maybe a little strange is that I'm using a file: URL, but afaict that's supposed to work.
20:54seangrov` mullr: I don't think file: URLs are supported
20:54seangrov`Are you sure they are?
20:54mullrwell, I can't find any sign that they aren't
20:54mullrI'll try with a web server (which I should have already done of course)
20:55seangrov`It's probably a security issue - I could never get them to work properly with chrome
20:55seangrov`+ source maps
20:55seangrov`mullr: Have you had them working before? If not, I recommend checking out dnolen's post on it - uses brepl, but a good way to confirm that it's working properly
20:57mullrseangrov`: I haven't actually seen them working, no. I've been referring to dnolen's post as well. Are things currently limited to only the brepl, or should I expect them to work with lein cljsbuild auto et. al. as well?
20:58seangrov`mullr: Kind of, but there's a lot of post-editing that needs to be integrated to make it all smoother
21:00mullrThe file: url was it; running things through a web server gets me significantly farther. Thanks!
21:01seangrov`squidz has a gist/post somewhere with more instructions
21:05squidzHere was my post on it. I'm not sure if anything has changed, but between that and dnolen's post you should be able to get started http://beandipper.github.io/
21:06squidzmullr: I also used a shell script together with leincljsbuilds :notify-command to copy the sourcemaps to an external server
21:07mullrSuccess! The heavy hammer of 'cd /; python -m SimpleHTTPServer' lets me work in place with the absolute paths in the .js.map file
21:07squidzthat way, you can have it copy over the sourcemaps every time lein auto compiles
21:07dobry-dendanielglauser: yeah, modern-cljs is awesome
21:08seangrov`squidz: I think that's probably best as a pr for lein-cljsbuild
21:08seangrov`Probably as a few extra keys
21:09squidzyeah I only did it that way because I needed to have my compiled clojurescript + sourcemaps on an apache+php server so doing it that way kind of automates it
21:10seangrov`Looking forward to having it ironed out a bit, and wouldn't mind using it myself at this point. Should probably look into extending lein-cljsbuild
21:11callenproductivity today was lost because an API lifting something that should've stayed in a map to a keyword arg. Resist the urge folks.
21:11squidzyeah I also considered maybe contributing something, but I needed something fast so I scratched my own itch with a quick hack
21:15ambrosebsbbloom: thanks about the F# type providers clarification. I guessed it would be something like that.
21:16chordHaskell > F#
21:17Bronsaprimitive support almost there for CinC :P
21:17ambrosebsBronsa: awesome!
21:24chordyou dumb
21:24chordI KNOW YOU'RE ALL DUMB DUMB DUMB DUMB DUMB DUMB DUMB
21:41bbloomambrosebs: yeah, iirc type providers use .net's modules (which are the true compilation unit within assemblies, which are essentially DLLs and EXEs) in the compiler to pull of their trick
21:42bbloomambrosebs: basically you segregate pre and post type provided code by files & the compiler recognizes files that provide types & then compiles them as a separate stage
21:42bbloomthe type checker runs once per stage
21:43bbloomthe more interesting aspect of them is how they integrate with the IDE :-)
21:59technomancyI guess I should have given him a warning
21:59technomancywhatever
21:59KeletIn Bash on Windows, my 'lein repl' does not properly work, up/down arrows and such give unicode symbols instead of doing what they should.
21:59KeletAny ideas?
21:59Kelet(Using Git Bash)
22:00KeletWorks ok in cmd.exe though
22:01indigoKelet: Hm let me try
22:02indigoLol, it doesn't even find lein
22:02Keletindigo: I had to download lein from the bin of the repo, and change 2.3.3-snapshot to 2.3.2
22:03Keletseeing as leiningen comes with lein.bat for windows and not the shell script
22:03indigoWhy don't you try going LANG=C lein repl
22:04indigoWhat I usually do on Windows to avoid pain and suffering is run Linux VMs via Vagrant
22:04Keletsame problem
22:04indigoAnd then just SSH in
22:05indigoWeeelll... I'm out of ideas; just use cmd.exe and git bash in separate windows for now ;P
22:05Keletlol
22:05arubinKelet, Just a guess: http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started#Enhancing_the_Environment
22:06arubinThis sounds like a common problem in UNIX-like OSes where readline is not installed or readline support was not added, but I do not know much about lein.
22:07arubins/added/enabled/
22:08callentechnomancy: he has spent several weeks getting warned by the channel itself
22:08indigoOh sweet
22:08indigochord finally got kicked
22:09KeletBut all he wanted to do was create a Starcraft clone in Clojure..
22:09indigoKelet: He's been trolling #ruby, #python and #haskell before he hit us
22:09indigoThey all have him on their banlists
22:09Keletwhere does he go next? Maybe he will go irc.mozilla.org #rust :O
22:09technomancyI'll consider the kick a warning before he gets on the banlist I guess.
22:10indigoKelet: Probably nodejs next ;P
22:11indigoI'm surprised at how tolerant this channel has been, actually
22:11indigoYou guys rock :)
22:12KeletOh well, tomorrow I'm beginning on my first real Clojure code for a huge Clojure project I'm starting to satisfy my fantasy of creating an expansive worldbuilding algorithm
22:12KeletWhich is: using Markov chains to generate realistic names :O
22:14KeletI did a good amount of the Clojure koans though, which were a great way to learn some things
22:14arrdem(inc technomancy) ; death to trollz
22:14lazybot⇒ 77
22:14callen(inc technomancy)
22:14lazybot⇒ 78
22:14indigoKelet: Good luck :)
22:15callenarrdem: I'm pretty excited about what we have so far :)
22:15arrdemcallen: congrats! I have the slowest Mongo table ever!
22:15KeletYep, I'm excited, although to be frank, I am still somewhat considering using Racket. Although I am familiar with some other JVM languages so I'll probably stick here.
22:16KeletEither way it will be my first real dip into a Lisp
22:16arrdembrb my desktop filled itself with molasses and needs a clean.
22:16callenarrdem: we don't know what our query performance is going to be like. We're just kinda hoping and praying ES does the right thing.
22:16arrdemcallen: I dumped the 2.45M #clojure messages into one Mongo table and it isn't exactly happy. Trying to send it into neo4j because reasons.
22:17indigocallen: What are you guys trying to do
22:17callenarrdem: what kind of queries against Mongo/Neo?
22:17callenarrdem: you probably *do not* want to use Neo4j.
22:18callen2.45 million documents shouldn't be that big of a deal, ordinarily.
22:18indigoKelet: IMO Racket is good as a PL research platform; Clojure is good for getting real work done
22:18callenhowever clownshoes MongoDB might be.
22:18callenindigo: We're Simonides.
22:18callenindigo: http://clojurecup.com/app.html?app=simonides
22:19indigoOh, Clojure Cup :D
22:21indigoInstead we use a hacky EAV store ORM on top of MySQL
22:21arrdemcallen: you were saying?
22:21callenarrdem: what sort of queries are you going to be doing?
22:21callenindigo: horrific.
22:22arrdemcallen: neo4j is just about the right tool because we're trying to do graph edge counting queries for the most part
22:22arrdemcallen: we could have mashed it into Mongo but why bother
22:22callenarrdem: okay, so it's an actual graph problem.
22:23callenarrdem: godspeed.
22:23arrdemcallen: the issue is getting away from the bulk of the (largely junk) #clojure logs and getting the community graph we seel
22:23arrdemcallen: my thanks, clearly we need it
22:23indigocallen: If Rich Hickey is God, the developers that I work with are satanists ;)
22:24callenarrdem: *shrugs* we haven't conquered our query patterns yet although a lot of good progress has been made.
22:24arrdemindigo: that belongs in a fortune file :D
22:25indigoarrdem: I'll submit to bash :P
22:25arrdemcallen: haha if we can get the data to behave, everything else is trivial and awesome. if.
22:25indigoHopefully my fellow developers aren't going to get too upset
22:25callenarrdem: there were multiple problem spots for our problem. A few are solved, one or two remain.
22:26allenj12is there a way yo get fmap or do i have to use contrib?
22:26allenj12to*
22:26callenallenj12: you really want fmap?
22:26callenallenj12: if so, look at fluokitten.
22:27allenj12callen: hmm eitther that or a better way to search within a list of hash maps
22:28callenallenj12: ffs, you don't need fmap or fluokitten for that.
22:28allenj12callen: lol sry a haskell friend sitting next to me suggested it
22:33allenj12callen: is there a reverse of get-in im basically searching that structure to see if a something matches one of the values in the hash map
22:33callenallenj12: just filter the list of hash-maps.
22:34callensearching a structure? you said it was a list of hash-maps.
22:34allenj12callen: sry thats what i ment
22:34allenj12callen: list of hash maps
22:34callenfilter the list of hash-maps.
22:36chordcallen are you done with clojure cup yet?
22:36arrdemtechnomancy: ^
22:36callenchord: nobody's going to make your thing for you.
22:36callenchord: stop asking.
22:36allenj12so if im looking for ({ :board (2 3 4) :cost 2} {:board (5 4 6) :cost 7}) i can search for a matching board value directly by filtering directly?
22:37callenallenj12: you can't figure out how to do this with filter?
22:37allenj12callen: i prolly can i just didnt think i could directly do it since i want something specifically in the hash map ill play around
22:38chordarrdem: have you looked at the project I started www.github.com/chord-rts/rts
22:38callenallenj12: just filter it.
22:38callenallenj12: do you know what filter does?
22:38allenj12calen: yea returns a sew of just the elemnts that return true in a function
22:39callenallenj12: okay...so filter the list of hash maps using a function that checks what you want to check.
22:39john2xhow do dynamically I create functions with their names coming from a list of strings, and their bodies are similar?
22:39allenj12callen: kk sry if that was dumb
22:40callenallenj12: it's not about dumb/smart, it's about forcing you to just confront the problem.
22:40callenthe smartest people are the best at dithering about and avoiding the problem.
22:40allenj12callen: kk
23:03yedi_how does pallet relate to things like ansible and puppet? I'm trying to figure out my deployment strategy for a clojure webapp on aws (i've never had to do this devops stuff before)
23:06callenyedi_: use Ansible.
23:06callenyedi_: unless you're in Clojure Cup, in which case, use Puppet or Pallet.
23:07yedi_I was thinking ansible because apparently the learning curve is really gradual, but pallet seemed clojure based and i wanted to know if they were basically the same kind of software, or if pallet is something different
23:07yedi_but I'm assuming they're the same, and pallet has a similar level of complexity to puppet?
23:07nightflycallen: is Ansible really mature enough to recommend over Puppet?
23:08eggheadcallen: why not ansible in clojure cup
23:08eggheadoh lol
23:08eggheadb/c all the time will be wated trying to deploy
23:08eggheads/wated/wasted
23:09callenI would prefer my competitors use Puppet or Pallet so they get slowed down.
23:10bmabeynightfly: for its age ansible is remarkably mature. The community isn't as large as puppets but it is very friendly and growing fast
23:22arrdemanyone care to reccomend an RPC library for Clojure?
23:25tbaldridgearrdem: somethings should not be done, much less discussed :-P
23:25yedi_whose winning clojurecup
23:25tbaldridgeyedi_: the guys writing in scala
23:26arrdemtbaldridge: -_- I have an embarasingly parallel problem that I need to throw more than one machine at... some things are nessecary evils. especially on the clojurecup deadline.
23:26tbaldridgeeh, I suppose that's not the best time to go and roll your own RPC lib :-P
23:26arrdemyou don't say....
23:27`cbphurrah!
23:27arrdemI don't even need a full blown RPC library... I just need a way for workers to get the next 100 inputs from a server :/
23:28tbaldridgearrdem: I'd be tempted to just use HTTP to talk to a simple ring server, have a single end point, and a multimethod that dispatches off the type of the message
23:28tbaldridgehave the other end talk to it via slurp
23:28tbaldridgeand no, I'm not joking :-)
23:28arrdemyeah that's probably the easiest thing to do sadly.
23:29juliangindiIf I had a memoized function that made an API call, would subsequent calls with the same arguments still call the API?
23:30nightflyno
23:30nightflythey'd just hit the cache
23:31juliangindihm. The API console is still registering api calls
23:32juliangindiMy code, if that helps. https://gist.github.com/Julian25/6748965
23:32technomancyarrdem: send forms to eval over redis?
23:33technomancyarrdem: you can see my ~200loc worker system over rabbit (die-roboter) but if you don't need guaranteed delivery then redis is fine
23:34tbaldridgearrdem: + 1 for rabbit. shouldn't take long to get running
23:34technomancyeh
23:34technomancyamqp is a really complicated protocol
23:35technomancyIME the main thing it gets you over redis is that you can have jobs automatically go back on the queue if the worker that takes them dies before acking
23:35technomancyif you don't need that, you probably don't need amqp
23:37chordanyone want to help starcraft clone project
23:38tbaldridgetechnomancy: idk, I had rabbit up and running in about 1 hour. You don't have to know a thing about amqp to get the Rabbit Java API up and going.
23:38arrdemtechnomancy, tbaldridge: okay thanks I'll check rabbit out once I test forcing more threads on my one machine
23:39chordtbaldridge and arrdem you going to help with project www.github.com/chord-rts/rts
23:40technomancytbaldridge: there's a pretty big pile of terminology you have to un-tangle to find the specific subset you need for a worker mechanism. maybe not a big deal, but maybe not something you want to spend time doing on a 48-hour deadline when the alternative is http://redis.io/commands#list
23:40technomancydepends on whether you can afford to lose data, really
23:44m00nlightIs there a way to store the hadoop result into hbase directly instead of output a text file?
23:51chordhadoop sucks shit
23:54m00nlightchord: ??
23:54lazybotm00nlight: Definitely not.
23:54m00nligh_chord: ??
23:54lazybotm00nligh_: What are you, crazy? Of course not!
23:54chordm00nlight: why you using hadoop
23:55m00nligh_to process log
23:55m00nligh_lazybot: crazy? what do you mean?
23:56arrdemtechnomancy, tbaldridge: turns out forcing 512 worker threads on my dev machine totally worked without involving other nodes :D
23:57chordm00nligh_ help me work on starcraft clone written in clojure
23:58m00nligh_chord: You're not kidding :)?
23:59chordm00nligh_ I just learned how to make an opengl window but everyone in this channel is being stingy about helping me with it: www.github.com/chord-rts/rts
23:59nightflyyou need to do more on your own