#clojure log - Sep 28 2013

The Joy of Clojure
Main Clojure site
Google Group
IRC
List of all logged dates

0:05 chord: https://gist.github.com/anonymous/b362df96de01ee91dbad

0:05 why the hell cant it find GLCanvas

0:07 i've been trying to get an opengl window up for 2 DAYS

0:07 WHY DOESN'T THIS WORK

0:13 NM FIXED IT

0:15 chenjf: chord: are you sure javax.media.opengl.GLCanvas is in your classpath?

0:15 chord: fixed the problem

0:16 jogl.jar is bullshit have to use jogl-all.jar

0:16 chenjf: glad you fixed it

0:16 callen: games are hard, lets go shopping.

0:16 chord: callen I know you keep talking in an attempt to get me to give up

0:17 not going to work

0:17 callen: chord: shopping is fun.

0:17 cgag: if i have a seq of pairs like this: [[:a b] [:a c] [:a :d]], and i want to get {:a [:b :c :d]}

0:17 is there some built in i can use or do i need to do somtehing like this: (reduce (fn [m [k v]]

0:17 (assoc m k (conj (m k []) v))) {} ...)

0:24 chord: guys i think callen is having a heart attack

0:24 he stopped responding

0:25 cgag: rip

0:28 chord: cgag: you going to help with starcraft clone?

0:28 cgag: is that's what's going on

0:28 chord: just say yes

0:28 cgag: that sounds fun, idk if i have time though

0:30 have you considered going shopping instead

0:32 callen: chord: I'm pretty sure you should go shopping.

0:34 chord: cgag work on game ok

0:37 NEW PROBLEM

0:37 .m2/repository/org/jogamp/gluegen/gluegen-rt/2.0.2/gluegen-rt-2.0.2-natives-linux-i586.jar (No such file or directory)

0:37 why is it not looking for gluegen-rt-2.0.2.jar instead

0:37 where the hell did the natives-linux-i586 shit come from

0:41 arrdem: callen: and how goes the cup...

0:41 cgag: chord how do you plan on doing graphics and stuff

0:41 chord: jogl

0:41 arrdem: i need your help dude

0:41 cgag: is there some existing clojure game stuff

0:41 chord: arrdem: please help

0:41 cgag: not that I know of

0:42 arrdem: chord: don't get me started "helping" you again. I'm being productive right now.

0:42 chord: arrdem: productive doing what project best friend

0:42 callen: arrdem: well :)

0:43 arrdem: we're making good progress, solving problems with large amounts of violence and fear.

0:45 arrdem: callen: ah good. shock and awe ftw. I'm buissy ddosing all the things with my crawlers.

0:46 holo1: chord: "where the hell did the natives-linux-i586 shit come from" -> lein deps :tree

0:47 chord: lein 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"]

0:49 holo1: chord, you should really give up about swearing, unless you're someone really important that too many people worship

0:49 chord: holo1: I'm a spoiled child I can't stop the behavior

0:51 holo1: chord, anyways, you're the one to lose about that spoiled theme, because you're likely to not get much help here. your call

0:56 chord: holo1: so I go shopping now?

1:10 ok I learned i'm suppose to use gluegen-rt-main not gluegen-rt

1:20 channel dead

1:20 tbaldridge: trolls have a way of doing that

1:20 arrdem: clojure-cup isn't helping either..

1:21 chord: arrdem: whats stopping people from making their project before clojure-cup actually started

1:22 arrdem: chord: there's this thing called honor. you may have heard of it.

1:25 chord: arrdem: you trust the other people in clojure-cup?

1:32 I got a window up FINALLY

1:35 muhoo: recurring PSA: /ignore works, and /ignore -replies ALL works in many clients too

1:37 callen: arrdem: honor and that competition beginning slapping together code in the first hour is a lot fun

1:37 lot of fun*

1:48 chord: callen do you have a demo of your project

1:49 yet

1:49 `cbp: chord: so sc clone will be ready by end of clojure cup then?

1:49 chord: `cbp: I didn't sign up for clojure cup so no

1:51 `cbp: what are you working on

1:52 `cbp: i have like 4-5 projects where im like 10% in hah

1:53 ill 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

1:54 chord: `cbp: forget rethinkdb go make a driver for voltdb

1:57 `cbp: what do you think about voltdb?

1:57 `cbp: chord: never heard of it before

1:58 chord: `cbp: http://www.youtube.com/watch?v=uhDM4fcI2aI

2:00 `cbp: :-o

2:02 chord: `cbp: what does that mean

2:03 `cbp: ill watch it tomorrow, too tired right now

2:29 chord: Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: No matching method found: gluPerspective for class javax.media.opengl.glu.GLU

2:29 how do I debug this

2:30 Apage43: doctor

2:31 it hurts when i try to call .gluPerspective on this object

2:32 chord: Apage43: you're not helping, I can see that the class has the method in eclipse

2:33 Apage43: argument count or types are probably wrong

2:33 chord: Apage43, thats what I was thinking so how do I find out how its being called

2:33 Apage43: the stack trace ought to tell you that

2:34 ah.. but the AWT thing doesn't give you that

2:34 *but* your code probably isn't calling gluPerspective in very many places

2:34 grep.

2:34 chord: (.gluPerspective glu 50.0 (float (/ w h)) 1.0 1000.0)

2:34 does that look good

2:35 Apage43: i have no idea what type that method is supposed to be

2:35 chord: wtf you're an opengl newb?

2:36 Apage43: well gluPerspective was deprecated quite a while back, and is part of GLU, not OpenGL proper

2:38 chord: not switching to opengl proper yet

2:40 callen: technomancy: https://twitter.com/athos0220/status/383807244061536257

2:40 Apage43: what if you wrap all those args in (double)

2:42 chord: Apage43: wtf that worked, what kind of defaults was clojure using

2:43 Apage43: the method has a version that takes four doubles, and a version that takes four floats. the call was ambiguous (and floats are problematic too)

2:43 amalloy: it was using doubles, except where you specifically asked it yo use a float

2:44 * arrdem attempts to ward off 32 bit floating point with garlic

2:45 ggherdov: hello. Is there a web framework for clojure, like django for python or rails for ruby?

2:45 Apage43: your garlic is now truncated to 24-bits

2:46 arrdem: Apage43: aw..... what happened to the sign bit?

2:46 ggherdov: sort of. we have Luminous.

2:46 ggherdov: arrdem: thanks, looking it up.

2:46 arrdem: ggherdov: http://www.luminusweb.net/

2:46 ggherdov: I spelled it wrong :/

2:47 ggherdov: arrdem: thanks for the link

2:48 chord: so I got a window up that fills it red

2:48 now what do I do to finish my game

2:49 Apage43: you'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

2:50 arrdem: (Float. "NaN")

2:51 chord: Ok 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

2:52 Apage43: "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."

2:53 this was pretty confusing when I said it out loud to someone

2:53 rplaca: sure, NaN is a number

2:53 at least in the sense that it has type "number"

2:53 Apage43: but the data was being tripped through JSON, which meant there wouldn't be any NaNs

2:54 rplaca: because it's the result of an arithmmetic operation on numbers

2:54 ggherdov: arrdem: a quick web search brought up the name "compojure". What is that? a DSL for web development?

2:55 arrdem: ggherdov: Compojure is a routing based request server system.

2:56 ggherdov: arrdem: ok thanks

3:01 n_b: Anyone that can provide direction on the best way to reuse haml templates in a ring app?

3:03 Or should I just bite the bullet and port them to laser?

3:11 muhoo: watman

3:11 ggherdov: also pedestal.io

3:12 ggherdov: muhoo: checking !

3:12 muhoo: still think lein should disallow project names like clj-* or *-clj

3:13 enforced creativity

3:22 amalloy: muhoo: well, it already disallows *jure

3:22 see "LEIN_IRONIC_JURE"

3:23 chord: so 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

3:23 TEttinger: juure

3:24 cleaudzhoor

3:28 clodžure

3:38 Sgeo: Something's off with the slides here http://www.infoq.com/presentations/racket

3:38 I get the sense I'm looking at the slides at the wrong times

3:46 chord: you guys mad that I succeeded in setting this up: github.com/chord-rts/rts

3:46 www.github.com/chord-rts/rts

3:48 callen: chord: don't think anybody cares mate. :)

3:48 chord: callen: you lie

3:49 callen: muhoo: I agree.

3:50 muhoo: better nomenclature through fascism!

3:50 (inc muhoo)

3:50 lazybot: ⇒ 2

3:50 chord: callen: i demand you contribute to the project

3:51 callen: I did first commit

3:52 indigo: 'Night Clojure peeps

3:52 chord: no

3:52 you help me indigo

3:52 on my project

3:53 nightfly: you sure know how to build a team

3:53 chord: nightfly you gonna join?

3:53 nightfly: I have no time

3:53 chord: what are you spending your time on nightfly

3:54 nightfly: work, school, and own looong backlog of projects

3:54 chord: nightfly which projects

3:57 why do you all abandon me and the starcraft clone project

4:04 what will it take for you guys to help my project

4:18 georgek: what 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

4:19 my project.clj and all the other files look like the tutorials

4:59 chord: starcraft clone

4:59 you help me now

5:00 callen: georgek: are you competing in Clojure Cup?

5:01 chord: callen are you going to help me with my game after clojure cup

5:18 jonasen: does anyone else get "Wrong number of args (3) passed to: reader-types$indexing-push-back-reader" with the newest clojurescript release?

5:28 sm0ke: hey 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*"))

5:28 lazybot: java.lang.RuntimeException: No such namespace: s

5:28 sm0ke: sorry

5:29 ,(map (doto clojure.string/trim (partial clojure.string/split #":")) (clojure.string/split " a:b, c:d , e:f " #"\s*,\s*"))

5:29 clojurebot: ("a:b" "c:d" "e:f")

5:29 ro_st: split first by , then by : ?

5:29 sm0ke: ro_st: yes

5:30 so i want something like ((a,b) (c,d) (e,f))

5:31 although i can do a map again...but wanted something concise

5:31 ro_st: ,(->> (clojure.string/split "a:1,b:2,c:3" #",") (map #(clojure.string/split % #":"))

5:31 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading>

5:34 sm0ke: ro_st: oh yea there is also a trim there

5:34 ro_st: on which? the stuff to be : split?

5:35 sm0ke: no after split by , i trime each string first then split on :

5:36 ro_st: https://www.refheap.com/19101

5:38 sm0ke: comp partial and juxt are your friends :-)

5:38 many times you can avoid anon fns completely by using them

5:39 chord: sm0ke help me with my project

5:40 sm0ke you help me with my project: github.com/chord-rts/rts

5:40 www.github.com/chord-rts/rts

5:41 ro_st: sm0ke: here's a quick demo of juxt and comp togehter https://www.refheap.com/19101

5:57 chord: ro_st help me with my game

6:01 piranha: how do I make js object in cljs without using clj->js?

6:01 I recall something like (js-obj "a" "b")

6:19 z3phyr: Almost every library in clojure requires JVM...

6:24 hiteki: z3phyr: ... or CLR ?

6:27 z3phyr: incanter

6:27 datomic

6:28 leiningen

6:28 ring

6:29 even they named it clojars....

6:32 hmm...

6:33 Clojure core mainline has no official support for the CLR too

6:33 ClojureCLR should become 'another language'

6:34 much like joxa

6:35 hiteki: ok

6:35 z3phyr: joxa feels like a dead project too.....

6:38 Pupnik_: its also not the only lisp for erlangvm

6:52 sm0ke: what wrong with this ## map( #([(first %) (second %)]) (["a" "b"]))

6:52 ,map( #([(first %) (second %)]) (["a" "b"]))

6:52 clojurebot: #<core$map clojure.core$map@1661ab8>

6:53 sm0ke: oh crap wait

6:53 yes actually on repl i get ArityException Wrong number of args (0) passed to: PersistentVector

6:55 ,(map #([(first %) (second %)]) '(["a" "b"]));i actually meant

6:55 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (0) passed to: PersistentVector>

6:57 sm0ke: i actually want to cast second arguemnt to an int

6:59 pyrtsa: sm0ke: The #(...) special form requires a function to be called as first argument.

6:59 Either use #(vector a b) or (fn [...] [a b]).

6:59 sm0ke: ok i found a ugly hack ##(map #(identity [(first %) (Integer. (second %))]) [["a" "1"]])

6:59 lazybot: ⇒ (["a" 1])

7:00 sm0ke: that is ugly right?

7:00 ,(map #(vector (first %) (Integer. (second %))) [["a" "1"]]); as pyrtsa said

7:00 clojurebot: (["a" 1])

7:01 sm0ke: this feels much better i guess

7:01 pyrtsa: Or (juxt first #(Integer. (second %)))

7:01 sm0ke: ,(doc juxt)

7:01 clojurebot: "([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)]"

7:02 pyrtsa: I think I'd go with something like: (fn [[k v]] [k (Integer. v)])

7:03 sm0ke: pyrtsa: yea i think after learning clojure i am getting obsessed with anonymous fns

7:03 i should try something more readabble

7:03 pyrtsa: sm0ke: The destructuring in my latest snippet makes it more readable IMO

7:04 sm0ke: pyrtsa: yea thanks thats much better

7:05 pyrtsa: Yw.

7:08 sm0ke: ok so i am now trying to make it handle null cases ##(map #(vector (first %) ((fnil Integer. "1") (second %))) [["a" "1"] ["b"]])

7:08 lazybot: java.lang.ClassNotFoundException: Integer.

7:08 Glenjamin: is the idea to take a map of key->string-number and get a list of [key number] ?

7:12 pyrtsa: ,(map (fn [[& [k v]]] [k (some-> v (Integer.))]) [["a" "1"] ["b"]])

7:12 clojurebot: (["a" 1] ["b" nil])

7:25 sm0ke: i think i got disconnected

7:25 ,((fnil Integer. "1") "2")

7:25 clojurebot: #<CompilerException java.lang.ClassNotFoundException: Integer., compiling:(NO_SOURCE_PATH:0:0)>

7:26 sm0ke: isnt Integer . a function?isnt Integer. a function in clojure?

7:27 pyrtsa: sm0ke: "Integer." isn't a function but a special form (together with the arguments) that requires to be wrapped inside an s-expression.

7:27 #(Integer. %) is a function.

7:27 And (some-> argument (Integer.)) does the same as ((fnil #(Integer.)) argument)

7:28 Oh, sorry, meant to add the % placeholder after "Integer." in the latter of course.

7:29 sm0ke: ,((fnil #(Integer. %) "1") nil)

7:29 clojurebot: 1

7:30 pyrtsa: ,(some-> nil (Integer.))

7:30 clojurebot: nil

7:30 pyrtsa: ,(some-> "123" (Integer.))

7:30 sm0ke: ,((some-> "1" #(Integer. %)) nil)

7:30 clojurebot: 123

7:30 #<NumberFormatException java.lang.NumberFormatException: null>

7:30 sm0ke: hmm i dont understand some-> still

7:31 pyrtsa: sm0ke: `some->` is a macro that does equally crazy things to the forms in it as do `->` and `->>` and `some->>`.

7:32 noncom|2: hi, 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?

7:32 pyrtsa: They don't work together with #(...) or (fn [...] ...) because they change their form.

7:32 sm0ke: Just see my example above. You don't need the #(...) wrapping aroung `Integer.` there.

7:32 sm0ke: thanks pyrtsa ..i will have a look at those macros you mentioned

7:34 igstan: I'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

8:04 sm0ke: ok 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

8:05 bz_g: Hi there

8:05 (Disclaimer: I'm into the clojurecup, lurking here for help!)

8:06 sm0ke: the problem is clojure gives me "can recur only from tail position"

8:06 why that limitation..specially when jvm cant optimize tail recurions

8:06 so my (recur) from is inside the catch form

8:08 bz_g: I'm now wrestling with friend's authentication, trying to let users login through github *or* a normal account.

8:08 pyrtsa: sm0ke: loop / recur are for tail-recursive recursion. If you wan't non-tail-recursive, just call the function recursively.

8:09 TEttinger: (remove nil? (map #(try (apply / %) (catch Exception _ nil)) [[1 2 0] [3 4]]))

8:09 sm0ke: pyrtsa: omg i think i am losing brain cells

8:09 thanks lets me try that

8:09 pyrtsa: Certainly you can achieve your goal without recursion too, e.g. using reduce.

8:10 bz_g: I 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...

8:10 pyrtsa: ...and reduced.

8:10 sm0ke: pyrtsa: how does recuce helps here? isnt it for combining a seq into some value

8:10 reduce*

8:11 TEttinger: sm0ke: does it need need to be a recursive thing?

8:11 (first (remove nil? (map #(try (apply / %) (catch Exception _ nil)) [[1 2 0] [0 0 1] [3 4] [1 2]]))) seems to work

8:11 not in a bot because they block off catch

8:11 sm0ke: TEttinger: no it doesnt...its just that i dont know anything better

8:11 :D

8:11 TEttinger: OMG!

8:11 TEttinger: for me that returns 3/4 , seems right?

8:11 sm0ke: but but does it short circuits?

8:12 pyrtsa: sm0ke: It does.

8:12 TEttinger: uh I think mine might not

8:12 since it does do a map

8:12 sm0ke: hmm let me get my detective lenses to understand

8:12 pyrtsa: (Although map may do up to 31 steps of extra work with chunked sequences, not that it matters much.)

8:13 TEttinger: map is lazy.

8:13 TEttinger: yes, is remove?

8:13 pyrtsa: I think so.

8:13 filter is.

8:13 TEttinger: ,(remove nil? (repeat nil))

8:13 pyrtsa: And remove uses filter.

8:13 clojurebot: Execution Timed Out

8:14 pyrtsa: TEttinger: You're printing the result.

8:14 TEttinger: oh!

8:14 ,(first (remove nil? (repeat nil)))

8:14 pyrtsa: There's no first either.

8:14 clojurebot: Execution Timed Out

8:14 pyrtsa: ... in that sequence. .)

8:14 :)

8:14 TEttinger: heh

8:15 sm0ke: TEttinger: how does it short circuits, could you please explain?

8:15 TEttinger: sm0ke, uh pyrtsa can explain better. it's a lazy seq

8:15 (inc pyrtsa)

8:15 lazybot: ⇒ 1

8:15 hyPiRion: see

8:16 ,(do (remove nil? (repeat nil)) :no-print)

8:16 clojurebot: :no-print

8:16 pyrtsa: sm0ke: Look up laziness in Clojure. :)

8:17 TEttinger: sm0ke, it's pretty important to do, too. I've been bit by lazy seqs where I didn't expect them before...

8:17 sm0ke: OK i know one thing for sure repeat is lazy..

8:17 TEttinger: sm0ke, nope. only one kind of repeat is :)

8:17 ,(repeat 3 "whee")

8:17 clojurebot: ("whee" "whee" "whee")

8:18 TEttinger: actually I could be wrong

8:18 ,(class (repeat 3 "whee"))

8:18 clojurebot: clojure.lang.LazySeq

8:18 TEttinger: you are correct!

8:18 pyrtsa: TEttinger: And chunks:

8:18 ,(let [a (atom nil)] [(first (filter #(< 1000 %) (map (fn [x] (reset! a x) x) (range)))) @a])

8:18 clojurebot: [1001 1023]

8:18 pyrtsa: ,(let [a (atom nil)] [(first (filter #(< 31 %) (map (fn [x] (reset! a x) x) (range)))) @a])

8:18 sm0ke: TEttinger: actually the repl realizes the lazyseq here

8:18 clojurebot: [32 63]

8:18 pyrtsa: ,(let [a (atom nil)] [(first (filter #(< 30 %) (map (fn [x] (reset! a x) x) (range)))) @a])

8:18 clojurebot: [31 31]

8:19 TEttinger: interesting, pyrtsa

8:20 pyrtsa: So internally, map and filter use a granularity of 32, in the current version of Clojure.

8:20 sm0ke: TEttinger: it doesnt...##17:14 < lazybot> ⇒ 1

8:20 pyrtsa: ...unless you give a chunked seq to them, with a different chunk size.

8:20 sm0ke: 17:15 < hyPiRion> see

8:20 17:15 < hyPiRion> ,(do (remove nil? (repeat nil)) :no-print)

8:20 17:15 < clojurebot> :no-print

8:20 omg sorry wrong paste

8:20 ,(first (remove nil? (map #(try (do (println %) (apply / %)) (catch Exception _ nil)) [[1 2 0] [0 0 1] [3 4] [1 2]])))

8:20 clojurebot: sm0ke: Excuse me?

8:21 hyPiRion: heh

8:21 pyrtsa: (And chunked seq's are practically not documented at all.)

8:21 TEttinger: yeah it can't do catch

8:21 sm0ke: try that is prints everything

8:21 hyPiRion: sorry man didnt mean to wake you up

8:21 TEttinger: oh that's what you meant!

8:21 pyrtsa: sm0ke: Suggestion: use `lein repl` or Emacs or something for playing around with things like that.

8:22 sm0ke: pyrtsa: i am already on a repl

8:22 hyPiRion: sm0ke: no worries, I'm quite awake. It's 2 pm here

8:22 pyrtsa: Cool. :)

8:23 sm0ke: so can we have show circuting try catch on seq without recusrions?

8:23 pyrtsa: sm0ke: Pretty much everything is a recursion internally. But you can achieve it with reduce (and `(reduced result)`).

8:24 TEttinger: yeah sm0ke, it short circuits for me at 32 I think. it evals 32 or 31 or so, then stops and gets the first

8:24 pyrtsa: I mean, everything of map, filter etc.

8:26 sm0ke: TEttinger: But you snippet prints every element when i put a println form

8:26 inside the try form

8:26 pyrtsa: sm0ke: How long was your sequence then? More than 32 elements?

8:28 sm0ke: pyrtsa: yea its not long..but the action which i want to do on each item needs a socket operation so its pretty expensive

8:28 pyrtsa: sm0ke: Working on it... Wait a sec.

8:28 sm0ke: :D nice guys

8:28 i am like the 'Lauging clown' as coined by zeromq guide

8:30 i think we can have it if clojure had a (drop-until) or something like that

8:30 pyrtsa: drop-while, yes. It works.

8:31 sm0ke: give me give me

8:31 pyrtsa: Well... (first (drop-while pred xs)) should probably do the job.

8:33 sm0ke: this 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]])))

8:33 pyrtsa: The map is the problem here.

8:33 It's chunked.

8:35 This definition gives you a simple and totally lazy map: (defn map1 [f xs] (reductions (fn [_ x] (f x)) nil xs))

8:36 sm0ke: Try it in place of map in your above snippet.

8:37 sm0ke: pyrtsa: let me try

8:38 TEttinger: sm0ke ah, there's another. you can just call lazy-seq on your vector

8:38 sm0ke: pyrtsa: yea that works..

8:38 TEttinger: and that will have a chunk of 1

8:38 pyrtsa: TEttinger: That's a good one.

8:38 The best advice actually.

8:38 TEttinger: thanks

8:39 pyrtsa: TEttinger: Oh, does it work like that, actually? The documentation looks like not.

8:39 sm0ke: TEttinger: 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]]))))

8:39 TEttinger: argh ran the wrong code

8:39 pyrtsa: TEttinger: lazy-seq is used when making the recursion step lazy.

8:40 sm0ke: so the issue here is that the seq we are working with is not lazy?

8:41 pyrtsa: sm0ke: It's not fully lazy. It's lazy with chunks of 32 elements.

8:41 sm0ke: pyrtsa: can we make it lazy with chunk of 1? :D

8:42 pyrtsa: sm0ke: I think that's something that's still missing in Clojure.

8:42 :)

8:42 sm0ke: :(

8:42 pyrtsa: Patches welcome, I suppose.

8:42 TEttinger: I am pretty sure this can be done though

8:42 pyrtsa: IIRC, Fogus blogged about it like 3 years ago. But his blog is offline since a few weeks ago.

8:42 TEttinger: Definitely.

8:43 sm0ke: pyrtsa: what is that map1 thing you gave?

8:43 pyrtsa: sm0ke: It's my best quick tip for you to get the job done.

8:43 Effectively does the same as map but with a chunk size of 1.

8:44 (And with one sequence as argument only, as you see.)

8:44 sm0ke: hmm it works but not very intutive for me

8:48 pyrtsa: sm0ke: I think it is if you understand reductions.

8:48 But here's an alternative impl (map2): https://gist.github.com/pyrtsa/6741499

8:49 I need to go. Have a good one. ->

8:50 sm0ke: thanks pyrtsa

8:51 jonasen: technomancy: I guess this is ok while developing: https://github.com/technomancy/syme/blob/master/src/syme/web.clj#L21

8:52 technomancy: I'm thinking of doing the same thing..

8:54 pyrtsa: Oh, one more thing...

8:55 sm0ke: Of course you can change any sequence to lazy with this: (defn lazy [xs] (reductions (fn [_ x] x) nil xs))

8:56 hyPiRion: No value of making a sequence lazy when it's already realized

8:57 igstan: how does js array access look like in cljs?

8:57 sm0ke: good one

8:58 i am goined to name is unchunked and copy it shamelessly @ pyrtsa

8:58 igstan: found out. it's (aget js-array index)

9:04 piranha: anybody using cljsbuild crossovers here? Can't get it to work :(

9:26 dissipate: wtf, who wrote the 4th solution to FizzBuzz in clojure here: http://rosettacode.org/wiki/FizzBuzz#Clojure ? that solution is cray

9:30 hashcat: hi , can anyone give me a reason why clojure rather than other lisp on jvm?

9:31 jowag: hashcat: immutability

9:31 hashcat: composable abstractions, opposed to inheritance

9:31 hyPiRion: dissipate: crazy?

9:32 dissipate: hyPiRion, yep.

9:32 jowag: ambrosebs: does core.typed recognize a "type kind" concept, or I should just use (marker) protocols for that?

9:32 hashcat: jowag: helpful, thanks. honestly, My first lisp is clojure

9:32 dissipate: hyPiRion, do you understand all of those solutions to FizzBuzz in Clojure?

9:33 ambrosebs: jowag: what do you mean?

9:34 hashcat: ambrosebs: kind can be recognized as type of type.

9:34 hyPiRion: dissipate: well, yes. But I think any person who has worked with Clojure for some time would

9:34 Some of them aren't that idiomatic though

9:36 ambrosebs: I don't see how marker protocols are relevant, so I assumed jowag was talking of something else?

9:36 dissipate: hyPiRion, i don't understand why 'f' and 'b' have to be passed to 'str' in the 4th solution

9:36 ambrosebs: we have higher kinded/rank types in core.typed.

9:37 hyPiRion: dissipate: concatenating strings together

9:37 ,(let [f "foo" b "bar"] (str f b))

9:37 clojurebot: "foobar"

9:37 dissipate: hyPiRion, ah, i see. yeah, it's not too bad actually. i think i initially freaked out about the verbosity.

9:38 hyPiRion, which ones aren't idiomatic?

9:38 jowag: ambrosebs: i meant type of types

9:39 dissipate: i like the 3rd solution

9:39 jowag: ambrosebs: 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

9:40 hyPiRion: dissipate: second one is on one line. third one starts with `(lazy-seq (map` (map is lazy)

9:41 dissipate: hyPiRion, so the third one needs to be fixed. the 5th one is idiomatic?

9:41 hyPiRion: dissipate: coulda replaced the whole if-let thing with an "or" if used correctly

9:41 that's what I would do

9:42 hashcat: jowag: https://github.com/clojure/core.typed/wiki/User-Guide#higher-kinded-variables

9:42 dissipate: hyPiRion, edit the page and fix it up. :D

9:42 ambrosebs: I don't think jowag is talking about higher rank types. Named is just an interface.

9:43 jowag: I think you mean you want a supertype, not a type of types.

9:43 jowag: ambrosebs: well yes, but it can be a poor man's solution if you to represent a set of types

9:44 ambrosebs: maybe, I'm not at home in type theory

9:44 ambrosebs: jowag: do you mean union types?

9:44 (U Symbol Keyword)

9:45 jowag: well union is not extensible

9:46 hashcat: could someone help me with eclipse? when I type "(def" and expect a complement of "(defprotocol"

9:46 it just show me "(defn". what did I miss?

9:46 hyPiRion: https://www.refheap.com/19104 probably

9:48 ambrosebs: jowag: what's wrong with Named?

9:48 IamDrowsy: hashcat: do you have a running repl instance?

9:49 hashcat: IamDrowsy: I don't know whether it already run or not

9:51 I just create a project and expect complementation would work

9:51 jowag: ambrosebs: 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)

9:53 IamDrowsy: so load the file in a repl (strg + alt + s) and try again

9:53 ambrosebs: jowag: I think I need to see some code. I don't know what you mean.

9:53 hashcat: IamDrowsy: strg?

9:53 IamDrowsy: ctrl :) sry

9:55 dissipate: hyPiRion, i see, thanks for the example.

9:55 hashcat: it still only show me defn

9:55 and slow down

10:00 IamDrowsy: hm.. it works for me. do you have a window "REPL @ ...." open now?

10:00 if not try to start the repl via menu (Clojure -> Load file in Repl)

10:01 jowag: ambrosebs: it is not a practical problem, just me wrapping my head around all this type stuff and imagining what-if

10:01 ambrosebs: anyway thanks for help

10:02 and everybody please support http://www.indiegogo.com/projects/typed-clojure :)

11:14 hashcat: IamDrowsy : sorry, I was leaving

11:22 still only defn

11:45 juliangindi: Does anyone have a "better" debugging tool? I just got a stack-trace that does not mention any source code files I created

12:13 nDuff: juliangindi: clj-stacktrace will make your stack traces cleaner / easier to work with

12:13 juliangindi: ...and if you want something serious and don't mind overhead setting it up, there's ritz

12:17 seangrov`: nDuff: you recommend ritz? I still haven't used it, might be time to play with it a bit

12:19 juliangindi: nDuff: clj-stacktrace looks pretty good. I'm gonna give that a whirl.

12:19 nDuff: I 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:27 john2x: how do I get the md5 hash of a string in clojure?

12:30 ivan: getting a NullPointerException after my JavaScript builds, am I doing something wrong? https://www.refheap.com/027b8ba6b2a2ee49daa784ef0/raw

12:31 jonasen: john2x: http://stackoverflow.com/a/415971/24946

12:31 nDuff: john2x: ideally, use apache commons-codec's DigestUtils; the version in the Java standard library is pretty funky.

12:31 john2x: (org.apache.commons.codec.digest.DigestUtils/md5 "string")

12:32 john2x: thanks!

12:34 Jarda: when using hickup.form, is there a way to easily pass classes for the elements created and/or error descriptions?

12:35 Glenjamin: Jarda: you can pass a map as the first argument, which will become the element's attributes

12:51 sm0ke: hello is it a good practice to have blocking parts of your code inside a go block?

12:52 i have an application where on part is a ring server..another is a database handler part

12:52 can i just put their main entry point inside seperate go blocks?

12:53 although i have read core.async author telling somewhere that go blocks should be used for cpu intensive tasks

12:54 but 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:54 considering that i think go blocks are useless than

12:56 otoh i can just spawn a thread but i would really like to make use of channels which are really nice imo

12:56 blah blah bleh..

12:57 ivan: oh, I see, I managed to guess that my .cljs file needed an (ns )

12:58 sm0ke: ivan: haha living dangerously..i never tried on without a (ns)

12:59 .cljs? whats that clojure script/

12:59 is that really something worth trying in production?

13:00 ivan: yes

13:00 sm0ke: i always have a feeling that compiling to js is a bad idea

13:00 * nDuff disagrees

13:01 nDuff: javascript is an awful language. Why would you want to write in it directly?

13:01 sm0ke: nDuff: to save the pain of having to debug in js first than on cljs

13:02 nDuff: sm0ke: *shrug*. It's a matter, I suppose, of how heavily interop-dependent your code is.

13:02 sm0ke: nDuff: its not like when your js crashes ...you know where to look for in cljs? or is it?

13:02 nDuff: sm0ke: if 95% of your cljs all runs in native Clojure, you can have your unit tests happen before it ever touches a browser.

13:03 sm0ke: ...and, well, you can have the other 5% unit tested in a browser, too, if you need to.

13:03 look at the Pedestal dataflow model for an example of things done right.

13:03 seangrov`: sm0ke: There's also source maps, but cljs may be too young for you

13:03 nDuff: almost everything that matters is in code that's very easy to reproduce and prove behavior for.

13:04 sm0ke: anyhow -- I've had CLJS in production for over a year, and it works for me.

13:04 sm0ke: nDuff: 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:04 unit*

13:04 nDuff: sm0ke: that "feeling" would be wrong, if you keep it interop-free.

13:04 sm0ke: which is why you do all the interop in the 5%. :)

13:04 sm0ke: hmm i really cant say much..i havent had a look at cljs

13:05 but i have seen fails like coffescript, cappuchino, gwt etc etc

13:05 * nDuff doesn't consider GWT a "fail" at all.

13:05 sm0ke: :/

13:05 nDuff: ...the debugging stack there is beautiful.

13:05 Seriously. Thing of beauty. Love it.

13:06 sm0ke: nDuff: you are insane

13:06 nDuff: sm0ke: I think the difference between us is that you treat generated javascript as code to be debugged. That's a mistake.

13:06 sm0ke: its ugly as hell ... trying to write 20 lines of code which you can do in 1 line of js

13:07 nDuff: sm0ke: ...unless you dive into compiler-generated assembly for C, why would you dive into compiler-generated javascript?

13:07 Oh. Well, yes, the java bits are ugly because they've Java.

13:07 That's unavoidable. The *toolchain*, though, is beautiful.

13:07 sm0ke: nDuff: oh so you really belive that "Js is assenbly of browser"?

13:07 assembly*

13:08 nDuff: sm0ke: Exactly -- I do drink that kool-aid.

13:09 sm0ke: i really think js is too high level to be considered an assembly

13:09 * nDuff *has* admittedly had to dive into generated javascript, but looks forward to not having to do that with source maps getting mature.

13:09 hashcat: what's the best ide for clojure?

13:10 nDuff: sm0ke: 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:10 hashcat: the general consensus is emacs.

13:10 hashcat: you can see the survey for a breakdown of what people use.

13:10 hashcat: http://cemerick.com/2012/08/06/results-of-the-2012-state-of-clojure-survey/ <- there hasn't been one for 2013.

13:10 hashcat: nDuff: can it be integrated with lein?

13:10 sm0ke: nDuff: agreed awful..but its too good for dom manipulation...couldnt have been better

13:11 hiteki: hashcat: yes it can

13:11 dnolen: jonasen: http://cljsfiddle.net, cool!

13:11 hashcat: but how?

13:11 hiteki: hashcat: as far as I remember there is even a lein emacs mode available on marmalade (elein)

13:11 sm0ke: wait a minute ..i was here asking about the concurrency shit..i am still not able to figure out in clojure

13:12 somehow whenever is ask about concurrency i never get a reply

13:12 nDuff: hashcat: watch some of the live-coding videos from the Overtone folks for an idea of just how good the integration is.

13:12 hyPiRion: eh what

13:12 doesn't cl-format work with *err* ?

13:12 sm0ke: i use vim

13:13 and i hate enter meta alt control space

13:13 nDuff: hashcat: this video is years old, and the tools have gotten better since then, but see http://vimeo.com/22798433

13:13 sm0ke: :D

13:14 nDuff: sm0ke: 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:14 sm0ke: nDuff: wow you can do that? you must be having evil in emacs than?

13:15 nDuff: sm0ke: nope.

13:15 sm0ke: I've had finger-memory for multiple editors for decades now.

13:15 sm0ke: nDuff: you must be chuck norris than

13:16 hashcat: but why emacs drop 10%?

13:16 nDuff: Newcomers, I'm guessing.

13:16 sm0ke: comiler doesnt warn nDuff he warns the compiler

13:17 hashcat: ok, I give it a try

13:17 sm0ke: hey hashcat also try vim with fireplace plugin

13:18 hashcat: no. I tried intelliJ and eclipse. using gedit now

13:19 sm0ke: hashcat: haha good one

13:19 nDuff: hashcat: 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:19 hashcat: intelliJ and eclipse are silly enough.

13:19 sm0ke: hey nDuff you got any apps with clojure in production?

13:19 nDuff: sm0ke: not public, but yes.

13:20 * nDuff does backend tooling more than anything else.

13:20 sm0ke: nDuff: just want some advice ... how do you handle concurrency..i mean you use threads..future..goroutines?

13:21 hashcat: nDuff:it looks great!

13:22 sm0ke: what the hell is that glow

13:22 nDuff: sm0ke: everything I have in production predates core.async. atoms, mostly; refs, occasionally; agents, fairly often.

13:22 scottj: sm0ke: the glow is fake

13:23 nDuff: sm0ke: If you want a good discussion of which concurrency primitives to use when, I strongly suggest reading Joy of Clojure

13:23 sm0ke: :D i knew it those emacs guys will do anything to seduce new people

13:23 nDuff: which chapter in particular?

13:23 nDuff: also i dont think it would be covering core.async?

13:24 as its fairly old book

13:24 nDuff: the upcoming second edition might touch on core.async

13:24 (and said second edition _is_ available in early access)

13:24 I don't have chapter titles/numbers memorized.

13:25 sm0ke: nDuff: ok ill have a look thanks

13:27 ivan: is there some way to control lein-cljsbuild's :jvm-opts?

13:28 mdeboard: Has there been a particular design pattern that's been settled around wrt channels?

13:28 or is it pretty much piles of functions

13:40 dnolen: pretty sweet - http://cljsfiddle.net/fiddle/swannodette.test-logic

13:42 mdeboard: not sure what you mean

13:45 bbloom: dnolen: 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:46 mdeboard: dnolen: 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:47 right now I'm just piling up functions and calling them e.g. https://gist.github.com/6744265

13:47 relevant bit at line 102

13:48 initialize all the channels, then pass them to relevant consumers

13:49 dnolen: mdeboard: at first glance looks fine, however 75-90 those fns aren't different

13:49 mdeboard: yeah, I'm still trying to get my spaceship to fly around atm before I put in more abstractions

13:50 but 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:51 dnolen: bbloom: nice

13:52 bbloom: in my best jesse pinkman voice: decomplected, bitch

13:53 dnolen: mdeboard: 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:53 mdeboard: Alrighty. I Just collapsed 75-90 down into (init-chan)

14:06 juliangindi: Hey 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:08 gfredericks: juliangindi: you want to parse a json string? cheshire will do that with one function call

14:09 juliangindi: gfredericks: This looks super badass. Thanks!

14:11 gfredericks: juliangindi: if you're using clj-http to get the "api response", it will do it for you as well

14:11 with the :as :json option

14:12 mdeboard: juliangindi: Cheshire is amazing

14:12 Need it for clojurescript imo

14:12 though I guess `(.parse js/JSON s)`

14:13 juliangindi: Hmm. I'm running into this error: clojure.lang.PersistentArrayMap cannot be cast to java.lang.String

14:13 when using Cheshire

14:14 mdeboard: juliangindi: how are you using it

14:14 jonasen: dnolen: 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:14 gfredericks: juliangindi: does (cheshire.core/parse-string "{}") work for you?

14:15 dnolen: jonasen: it depends on tools.reader 0.7.8, it's a declared dep

14:15 jonasen: maybe I pull in the wrong version via some other dependency..

14:16 juliangindi: gfredericks: That does work for me

14:16 dnolen: jonasen: would love to get warnings in this :)

14:17 jonasen: still it's amazing

14:17 http://cljsfiddle.net/fiddle/swannodette.test-match

14:17 jonasen: yes.. there is still a WIP.

14:18 but I'm really happy with the perf of the edit/compile/run cycle... it's faster than cljsbuild for me :)

14:19 juliangindi: gfredericks: Got it working =)

14:21 dnolen: jonasen: yes this is going to be a great tool, thanks much

14:21 mdeboard: jonasen, 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:22 dnolen: mdeboard: yeah I should probably use that, never used dommy before though

14:22 mdeboard: (not saying it's redundant, earnest question)

14:22 jonasen: dommy is available (but I haven't actually tried it :)

14:23 I'm more used to domina

14:23 mdeboard: Their blog post on it boasts some pretty good performance gains, at least over jquery DOM manip

14:23 http://blog.getprismatic.com/blog/2013/4/29/faster-better-dom-manipulation-with-dommy-and-clojurescript

14:23 jonasen: mdeboard: yeah, I'm sure it's great

14:24 gfredericks: juliangindi: good

14:35 mdeboard: I'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:36 dnolen: mdeboard: latest core.async and CLJS work fine together

14:37 radix: heya, do most people who want to do asynchronous I/O in clojure just use jetty directly?

14:39 async socket I/O in particular

14:40 juliangindi: I 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:42 radix: hum. got confused I think :)

14:42 mdeboard: dnolen: Is latest of each on maven?

14:42 dnolen: mdeboard: should be

14:42 mdeboard: 0.1.242.0-44b1e3-alpha for core.async and 0.0-1909 for cljs? Those are compat?

14:43 callen: dnolen: thanks for posting cljsfiddle, that's cool!

14:44 dnolen: callen: thank jonasen since he did all the actual work :)

14:44 callen: dnolen: I know, just glad to be aware of it. we might use it to fiddle around for our Clojure Cup project :)

14:44 jonasen: thanks for making cljsfiddle :)

14:44 jonasen: callen: that would be awesome... hope it helps

14:44 mdeboard: juliangindi: Is this json you're talking about?

14:44 jonasen: callen: thanks

14:45 juliangindi: mdeboard: Yeah, I parsed the JSON string and now I'm just trying to get one piece of data from it

14:46 callen: jonasen: do you have a Twitter I can follow?

14:46 mdeboard: juliangindi: 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:46 jonasen: I do, but I don't use it much: https://twitter.com/jonasenlund

14:47 mdeboard: (:foo (:bar (:baz (:wut (:lol (parse-string :body))))))

14:47 juliangindi: mdeboard: Yeah, I think I'll have to use a mixture of named attributes and numbered indexes

14:47 bbloom: (doc get-in)

14:47 clojurebot: "([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:47 mdeboard: juliangindi: Or you could use clojure.zip

14:47 callen: jonasen: well just in case :)

14:47 mdeboard: bbloom: Nice

14:47 bbloom: (get-in whatever [:foo 5 :bar 2 3 4])

14:48 mdeboard: Very nice

14:48 bbloom: just a tree of maps & vectors

14:48 callen: making update-in do the right thing with scalars that can get promoted to vectors is fun.

14:48 bbloom: using vectors as "paths" in a tree is good fun & quite useful

14:49 mdeboard: `(get-in {:foo [0 1 2 3 {:bar [4 5 [6 7 8 [9 10 11]]]}]})

14:49 ?

14:49 bbloom: ,(get-in {:foo [:x :y] :bar [:z]} [:foo 1])

14:49 clojurebot: :y

14:50 mdeboard: man tha'ts slick

14:50 bbloom: (update-in {:foo [:x :y] :bar [:z]} [:foo 1] inc)

14:50 mdeboard: people ar esmart

14:50 bbloom: er, i mean

14:50 ,(update-in {:foo [5 10] :bar [15]} [:foo 1] + 2)

14:50 clojurebot: {:foo [5 12], :bar [15]}

14:52 bbloom: what'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:52 lazybot: ⇒ {:foo [2 13 4]}

14:52 bbloom: let's you do imperitive-ish field-by-field updates w/o mutation & clean syntax

14:54 dobry-den: In 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:55 Ideally exceptions would display in some temporary buffer that I dont need to painstakingly navigate to just to close. Is there a middleground?

14:58 (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:05 mdeboard: Is 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:05 How do I let cljsbuild know that it's a cljs file, not clj ?

15:05 Oh, it needs to be a clj :)

15:15 Anyone spot anything particularly wrong with this macro? https://gist.github.com/mattdeboard/bf1c291b96e048461c19

15:16 dobry-den: ~update-ch?

15:16 clojurebot: Pardon?

15:18 mdeboard: That's just a channel that would be passed in to the function that invoked `go-handle!'

15:18 This is actually a macro for use with CLJS, for UI event handlers to update an "update channel" to redraw the canvas

15:18 dnolen: mdeboard: you need ~update-ch in order to insert whatever the user provided

15:19 mdeboard: Oh, I see

15:19 dobry-den: yeah that's what i meant

15:20 mdeboard: be 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:20 is it because I'm not requiring cljs.core.async?

15:21 That doesn't work either. I dunno why I ever bother with macros, they just turn into a huge timesink for me :P

15:22 dobry-den: mdeboard: 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:24 or maybe there's a better way to have a set of requires/imports/uses that you want consistent across a group of namespaces

15:24 Leonidas: can I say to leiningen to refer to an local git checkout somehow?

15:25 so I don't have to upload every change to clojars again and again.

15:25 dobry-den: Leonidas: i bet so, https://github.com/technomancy/leiningen/blob/master/sample.project.clj

15:27 mdeboard: Whoops, forgot to delete macros.cljs, that was throwing the error.

15:27 wink: Leonidas: 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:27 Leonidas: dobry-den: uhm, sorry for being dumb but I scanned it and couldn't find it… which option is that?

15:28 dobry-den: neither could i

15:28 Leonidas: ohhai wink :)

15:28 wink: ehlo :)

15:30 Leonidas: will try lein-localrepo

15:30 piranha: dnolen: 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:30 error is here: http://paste.in.ua/8774/

15:31 dnolen: somehow you're not getting tools.reader 0.7.8

15:31 piranha: hm ok

15:31 wink: Leonidas: or google roudn for local maven repo. been a while

15:31 clojurebot: Cool story bro.

15:32 piranha: oh it was in my project.clj, version 0.7.6... :\

15:32 Leonidas: wink: yeah. but it is still kinda a bother compared to PYTHONPATH trickery, unfortunately.

15:33 piranha: dnolen: 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:34 dnolen: should just work

15:34 piranha: you can confirm with lein deps-tree

15:34 piranha: ok! :)

15:34 thanks

15:34 dnolen: piranha: https://github.com/the-kenny/lein-deps-tree

15:35 piranha: I just tried it on core.async itself and I saw 0.7.8

15:35 piranha: heh ok :)

15:36 I also had a question about how do I write a macro properly...

15:36 I have one and when it executes cljs reports 'Use of undeclared Var ....'

15:37 it'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:37 technomancy: Leonidas: you want checkout deps; check `lein help faq`

15:38 dnolen: piranha: what does it say is undeclared?

15:39 piranha: dnolen: something like that: WARNING: Use of undeclared Var warmagnet.components/Navbar at line 16 cljs/warmagnet/components.cljs

15:39 that's when I do (defr Navbar ...) in ns warmagnet.components

15:40 Leonidas: technomancy: okay, thanks, will try.

15:42 the-kenny: huh? The lein deps-tree plugin was just for 1.x if I remember correctly

15:42 It's functionality was merged to 2.0 as lein deps :tree

15:42 s/It's/Its/

15:45 dnolen: piranha: when do you see this? during auto build?

15:45 piranha: dnolen: yes

15:46 dnolen: piranha: do you see this if you do a clean build

15:46 ?

15:46 Leonidas: technomancy: works, thanks!

15:48 piranha: dnolen: yep

15:49 dnolen: piranha: 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:50 piranha: dnolen: 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:50 mdeboard: omfg my handler macro works

15:50 what the hell

15:50 Something is wrong, I wrote a macro that works

15:53 literally cannot believe https://gist.github.com/mattdeboard/6745533

16:13 dobry-den: I did it! https://github.com/mattdeboard/clj-typeshooter/blob/master/src/cljs/clj_typeshooter/macros.clj#L3

16:14 tbaldrid_: mdeboard: why send 1? why not the result of body?

16:16 mdeboard: because 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:19 tbaldrid_: Though you're right, I'd probably need another variant that puts the result of body into the channel

16:19 eventually

16:19 technomancy: judging 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:19 chiptunes

16:21 kasko: hi guys at the api docs appears this function that I need: pow multimethod algo.generic Return the pow of x and y..

16:21 how can I call it?

16:22 indigo: Hah, one print copy of "How to Solve It"

16:22 Is that book really that good

16:23 hyPiRion: indigo: it's good if you can follow the mathematics in it

16:23 it's not terribly difficult, but it's aimed for mathematicians

16:25 juliangindi: So, 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:25 mdeboard: juliangindi: An atom is one way

16:25 dobry-den: juliangindi: use an atom?

16:26 mdeboard: juliangindi: (def my-cache (atom {:foo 1}))

16:26 dobry-den: seems like textbook atom semantics you described

16:26 juliangindi: alrighty, I have not used those before but I'll check them out

16:26 technomancy: juliangindi: can you just use a memoized function?

16:26 (only works if you never have to expire anything)

16:26 Apage43: or use https://github.com/clojure/core.memoize if you do need expiry

16:27 mdeboard: (swap! my-cache #(update-in % [:foo] inc))

16:27 juliangindi: oh wow, I think memoize will be perfect

16:27 technomancy: memoize is basically just a way of wrapping an atom around a function like a cache; simpler but less flexible

16:29 Apage43: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L5739-L5753

16:30 seangrov`: technomancy: Is the chiptunes comment because of the design or some videos?

16:31 technomancy: seangrov`: just the look of clojurecup.com

16:32 hyPiRion: Man, I'm going to take time off for clojurecup.com next year.

16:32 technomancy: I should do another post on music I like to code to

16:32 seangrov`: technomancy: Bummer, thought I cloud have found some good chiptunes to listen to

16:33 technomancy: listening to http://zabutom.se/album/zeta-force right now and it is great

16:33 juliangindi: Is there a way to "reset" a memoized function after a certain amount of time?

16:33 seangrov`: Thanks technomancy, will check it out

16:33 hyPiRion: juliangindi: no, not unless you do that yourself

16:33 technomancy: juliangindi: I submitted a patch for that, but it was rejected. core.memoize has it though

16:34 juliangindi: Oh, ok. I'll check ut core.memoize

16:34 technomancy: it's pretty easy to write a copy of regular memoize that puts the atom on the fn as metadata

16:34 http://dev.clojure.org/jira/browse/CLJ-804 <- juliangindi

16:35 huh I just noticed someone suggested "make a Guava-wrapping contrib" as a solution O_O

16:36 juliangindi: actually it's not difficult

16:36 (alter-var-root #'memoized-version (constantly pre-memoized-version)) <- resets

16:36 juliangindi: technomancy: You guys rock. I'll give that a shot

16:36 technomancy: good luck

16:39 hyPiRion: technomancy: that would remove memoization altogether again though.

16:39 technomancy: derp; that is true

16:40 hyPiRion: (comp memoize (constantly pre-memoized-version)) would work though

16:40 (I guess)

17:06 dobry-den: What's the difference between calling (def x ...) a second time vs. using alter-var-root?

17:14 marcopolo2: technomancy: This site is bringing back memories :)

17:14 konr: how can I remove the prefix from a keyword? Like :foo/bar -> :bar

17:15 indigo: dobry-den: It's possible to wrap an existing definition with alter-var-root

17:16 marcopolo2: ,(name :foo/bar)

17:16 clojurebot: "bar"

17:17 dobry-den: indigo: yeah, to clarify, what's the difference between updating an existing def by just invoking def again vs using alter-var-root

17:17 i have some hacky code that just uses def again and just learned about alter-var-root

17:18 technomancy: using 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:21 callen: technomancy: says the author of robert.hooke

17:21 seangrov`: tbaldridge: Thanks for the deep-walking macro video, was fun to skim through

17:21 callen: enabler of all things AOP and awesome.

17:21 technomancy: callen: no, it's way too clever

17:21 it should be considered a measure of last resort

17:21 callen: technomancy: I'm pretty close to doing a talk just about robert.hooke and Dire.

17:22 technomancy: The Metaobject Protocol rises again!

17:28 marcopolo2: are macros evaluated inner to outer?

17:53 cpetzold: does anyone know if there's a known issue with loops in go blocks in latest cljs?

18:12 callen: cpetzold: yep

18:12 cpetzold: use a newer version

18:12 cpetzold: yeah, just updated core.async to latest and it's fine now, thanks callen

18:14 Glenjamin: that reminds me, i've had a note in my inbox for months to remind me to try and implement catch+ for Dire

18:21 mdeboard: Where can I find changelog for clojurescript? I upgraded to build 1909 and it is giving me grief

18:22 cgag: if 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:23 amalloy: (into {} pairs)

18:23 oh

18:23 cgag: i feel like maybe there's some std lib thing i'm missing

18:24 amalloy: cgag: well, update-in/fnil are nicer than assoc/conj with a default value

18:25 what 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:29 mdeboard: dnolen: Does `js/window' no longer "satisfy INamed" ? https://github.com/clojure/clojurescript/compare/r1853...r1909#L11L6214

18:31 cgag: the update-in/fnil version isn't bad

18:31 i'll look at that groupings function

18:32 group-by was my first thought

18:34 Glenjamin: possibly turn the vectors into single element maps and then merge-with?

18:35 unsure if that'll be any better

18:35 cgag: Glenjamin: that's what i did first, turned them into maps that looked like {:a [:b]} and used merge-with concat

18:35 but i thought reduce might be more clear

18:36 amalloy: cgag: yikes. merge-with into, not merge-with concat

18:36 cgag: neither is bad, i just thought something like groupings might already exist

18:37 amalloy: try your merge-with/concat version on (repeat 2000 {:a [:b]}) for a fun time

18:37 cgag: yeah good call

18:39 this was just a tiny exercise but i'll keep useful/groupings in mind for larger stuff

18:39 thanks

19:10 dobry-den: technomancy: 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:11 so 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:12 because i'm in a perpetual idea-famine.

19:12 a drought of smart.

19:14 Glenjamin: sounds like you might be better off with an atom

19:25 radix: hmm. 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:28 ToBeReplaced: radix: idk if anything changed, but (use 'clojure.repl) will get you there

19:29 radix: huh. ok. maybe it's just how "lein repl" starts it up

19:29 ToBeReplaced: yeah that worked, thanks :)

19:47 chord: you guys going to help with starcraft project in clojure

19:49 SOMEONE ANSWER ME

19:49 mgaare: :D

19:50 chord: mgaare help me with the project www.github.com/chord-rts/rts

19:51 radix: -_-

19:51 huh, gloss looks pretty rad.

19:52 chord: what?

19:52 clojurebot: what is short for ,(doc ...)

19:53 seangrov`: clojurebot: botsnack

19:53 clojurebot: botsnack is forget botsnack

19:56 chord: you guys got clone the code and CONTRIBUTE NOW

19:57 so you guys admit your girlfriend cheated on you

19:58 callen: he is seriously fixated on the unfaithful girlfriend thing. Sniffs of projection.

19:58 seangrov`: Clojure Cup is going well. How are you?

20:00 chord: callen: CLONE MY CODE AND CONTRIBUTE

20:04 danielglauser: I'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:04 I'm aware of the O'Reilly book, are there any blogs or other web pages that folks recommend?

20:06 chord: danielglauser: just use coffeescript instead

20:07 danielglauser: Right...

20:07 chord: javascript is imperative based you're trying to fight too much

20:24 dnolen: danielglauser: http://github.com/magomimmo/modern-cljs

20:24 danielglauser: my blog covers bits of core.async w/ respect to CLJS http://swannodette.github.io/

20:25 danielglauser: Thanks dnolen, that's exactly what I'm looking for!

20:51 mullr: I'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:52 The 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:54 seangrov`: mullr: I don't think file: URLs are supported

20:54 Are you sure they are?

20:54 mullr: well, I can't find any sign that they aren't

20:54 I'll try with a web server (which I should have already done of course)

20:55 seangrov`: It's probably a security issue - I could never get them to work properly with chrome

20:55 + source maps

20:55 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:57 mullr: seangrov`: 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:58 seangrov`: mullr: Kind of, but there's a lot of post-editing that needs to be integrated to make it all smoother

21:00 mullr: The file: url was it; running things through a web server gets me significantly farther. Thanks!

21:01 seangrov`: squidz has a gist/post somewhere with more instructions

21:05 squidz: Here 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:06 mullr: I also used a shell script together with leincljsbuilds :notify-command to copy the sourcemaps to an external server

21:07 mullr: Success! The heavy hammer of 'cd /; python -m SimpleHTTPServer' lets me work in place with the absolute paths in the .js.map file

21:07 squidz: that way, you can have it copy over the sourcemaps every time lein auto compiles

21:07 dobry-den: danielglauser: yeah, modern-cljs is awesome

21:08 seangrov`: squidz: I think that's probably best as a pr for lein-cljsbuild

21:08 Probably as a few extra keys

21:09 squidz: yeah 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:10 seangrov`: 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:11 callen: productivity today was lost because an API lifting something that should've stayed in a map to a keyword arg. Resist the urge folks.

21:11 squidz: yeah I also considered maybe contributing something, but I needed something fast so I scratched my own itch with a quick hack

21:15 ambrosebs: bbloom: thanks about the F# type providers clarification. I guessed it would be something like that.

21:16 chord: Haskell > F#

21:17 Bronsa: primitive support almost there for CinC :P

21:17 ambrosebs: Bronsa: awesome!

21:24 chord: you dumb

21:24 I KNOW YOU'RE ALL DUMB DUMB DUMB DUMB DUMB DUMB DUMB

21:41 bbloom: ambrosebs: 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:42 ambrosebs: 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:42 the type checker runs once per stage

21:43 the more interesting aspect of them is how they integrate with the IDE :-)

21:59 technomancy: I guess I should have given him a warning

21:59 whatever

21:59 Kelet: In 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:59 Any ideas?

21:59 (Using Git Bash)

22:00 Works ok in cmd.exe though

22:01 indigo: Kelet: Hm let me try

22:02 Lol, it doesn't even find lein

22:02 Kelet: indigo: I had to download lein from the bin of the repo, and change 2.3.3-snapshot to 2.3.2

22:03 seeing as leiningen comes with lein.bat for windows and not the shell script

22:03 indigo: Why don't you try going LANG=C lein repl

22:04 What I usually do on Windows to avoid pain and suffering is run Linux VMs via Vagrant

22:04 Kelet: same problem

22:04 indigo: And then just SSH in

22:05 Weeelll... I'm out of ideas; just use cmd.exe and git bash in separate windows for now ;P

22:05 Kelet: lol

22:05 arubin: Kelet, Just a guess: http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started#Enhancing_the_Environment

22:06 This 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:07 s/added/enabled/

22:08 callen: technomancy: he has spent several weeks getting warned by the channel itself

22:08 indigo: Oh sweet

22:08 chord finally got kicked

22:09 Kelet: But all he wanted to do was create a Starcraft clone in Clojure..

22:09 indigo: Kelet: He's been trolling #ruby, #python and #haskell before he hit us

22:09 They all have him on their banlists

22:09 Kelet: where does he go next? Maybe he will go irc.mozilla.org #rust :O

22:09 technomancy: I'll consider the kick a warning before he gets on the banlist I guess.

22:10 indigo: Kelet: Probably nodejs next ;P

22:11 I'm surprised at how tolerant this channel has been, actually

22:11 You guys rock :)

22:12 Kelet: Oh 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:12 Which is: using Markov chains to generate realistic names :O

22:14 I did a good amount of the Clojure koans though, which were a great way to learn some things

22:14 arrdem: (inc technomancy) ; death to trollz

22:14 lazybot: ⇒ 77

22:14 callen: (inc technomancy)

22:14 lazybot: ⇒ 78

22:14 indigo: Kelet: Good luck :)

22:15 callen: arrdem: I'm pretty excited about what we have so far :)

22:15 arrdem: callen: congrats! I have the slowest Mongo table ever!

22:15 Kelet: Yep, 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:16 Either way it will be my first real dip into a Lisp

22:16 arrdem: brb my desktop filled itself with molasses and needs a clean.

22:16 callen: arrdem: 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:16 arrdem: callen: 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:17 indigo: callen: What are you guys trying to do

22:17 callen: arrdem: what kind of queries against Mongo/Neo?

22:17 arrdem: you probably *do not* want to use Neo4j.

22:18 2.45 million documents shouldn't be that big of a deal, ordinarily.

22:18 indigo: Kelet: IMO Racket is good as a PL research platform; Clojure is good for getting real work done

22:18 callen: however clownshoes MongoDB might be.

22:18 * indigo made this decision a while ago

22:18 callen: indigo: We're Simonides.

22:18 indigo: http://clojurecup.com/app.html?app=simonides

22:19 indigo: Oh, Clojure Cup :D

22:20 * indigo wishes he used Mongo at work

22:21 indigo: Instead we use a hacky EAV store ORM on top of MySQL

22:21 arrdem: callen: you were saying?

22:21 callen: arrdem: what sort of queries are you going to be doing?

22:21 indigo: horrific.

22:22 arrdem: callen: neo4j is just about the right tool because we're trying to do graph edge counting queries for the most part

22:22 callen: we could have mashed it into Mongo but why bother

22:22 callen: arrdem: okay, so it's an actual graph problem.

22:23 arrdem: godspeed.

22:23 arrdem: callen: the issue is getting away from the bulk of the (largely junk) #clojure logs and getting the community graph we seel

22:23 callen: my thanks, clearly we need it

22:23 indigo: callen: If Rich Hickey is God, the developers that I work with are satanists ;)

22:24 callen: arrdem: *shrugs* we haven't conquered our query patterns yet although a lot of good progress has been made.

22:24 arrdem: indigo: that belongs in a fortune file :D

22:25 indigo: arrdem: I'll submit to bash :P

22:25 arrdem: callen: haha if we can get the data to behave, everything else is trivial and awesome. if.

22:25 indigo: Hopefully my fellow developers aren't going to get too upset

22:25 callen: arrdem: there were multiple problem spots for our problem. A few are solved, one or two remain.

22:26 allenj12: is there a way yo get fmap or do i have to use contrib?

22:26 to*

22:26 callen: allenj12: you really want fmap?

22:26 allenj12: if so, look at fluokitten.

22:27 allenj12: callen: hmm eitther that or a better way to search within a list of hash maps

22:28 callen: allenj12: ffs, you don't need fmap or fluokitten for that.

22:28 allenj12: callen: lol sry a haskell friend sitting next to me suggested it

22:33 * arrdem glowers at mongodb

22:33 allenj12: callen: 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:33 callen: allenj12: just filter the list of hash-maps.

22:34 searching a structure? you said it was a list of hash-maps.

22:34 allenj12: callen: sry thats what i ment

22:34 callen: list of hash maps

22:34 callen: filter the list of hash-maps.

22:36 chord: callen are you done with clojure cup yet?

22:36 arrdem: technomancy: ^

22:36 callen: chord: nobody's going to make your thing for you.

22:36 chord: stop asking.

22:36 allenj12: so 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:37 callen: allenj12: you can't figure out how to do this with filter?

22:37 allenj12: callen: 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:38 chord: arrdem: have you looked at the project I started www.github.com/chord-rts/rts

22:38 callen: allenj12: just filter it.

22:38 allenj12: do you know what filter does?

22:38 allenj12: calen: yea returns a sew of just the elemnts that return true in a function

22:39 callen: allenj12: okay...so filter the list of hash maps using a function that checks what you want to check.

22:39 john2x: how do dynamically I create functions with their names coming from a list of strings, and their bodies are similar?

22:39 allenj12: callen: kk sry if that was dumb

22:40 callen: allenj12: it's not about dumb/smart, it's about forcing you to just confront the problem.

22:40 the smartest people are the best at dithering about and avoiding the problem.

22:40 allenj12: callen: kk

23:03 yedi_: 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:06 callen: yedi_: use Ansible.

23:06 yedi_: unless you're in Clojure Cup, in which case, use Puppet or Pallet.

23:07 yedi_: 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:07 but I'm assuming they're the same, and pallet has a similar level of complexity to puppet?

23:07 nightfly: callen: is Ansible really mature enough to recommend over Puppet?

23:08 egghead: callen: why not ansible in clojure cup

23:08 oh lol

23:08 b/c all the time will be wated trying to deploy

23:08 s/wated/wasted

23:09 callen: I would prefer my competitors use Puppet or Pallet so they get slowed down.

23:10 bmabey: nightfly: for its age ansible is remarkably mature. The community isn't as large as puppets but it is very friendly and growing fast

23:22 arrdem: anyone care to reccomend an RPC library for Clojure?

23:25 tbaldridge: arrdem: somethings should not be done, much less discussed :-P

23:25 yedi_: whose winning clojurecup

23:25 tbaldridge: yedi_: the guys writing in scala

23:26 arrdem: tbaldridge: -_- 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:26 tbaldridge: eh, I suppose that's not the best time to go and roll your own RPC lib :-P

23:26 arrdem: you don't say....

23:27 `cbp: hurrah!

23:27 arrdem: I 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:28 tbaldridge: arrdem: 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:28 have the other end talk to it via slurp

23:28 and no, I'm not joking :-)

23:28 arrdem: yeah that's probably the easiest thing to do sadly.

23:28 * arrdem is not enjoying his first brush with "big" data

23:29 juliangindi: If I had a memoized function that made an API call, would subsequent calls with the same arguments still call the API?

23:30 nightfly: no

23:30 they'd just hit the cache

23:31 juliangindi: hm. The API console is still registering api calls

23:32 My code, if that helps. https://gist.github.com/Julian25/6748965

23:32 technomancy: arrdem: send forms to eval over redis?

23:33 arrdem: you can see my ~200loc worker system over rabbit (die-roboter) but if you don't need guaranteed delivery then redis is fine

23:34 tbaldridge: arrdem: + 1 for rabbit. shouldn't take long to get running

23:34 technomancy: eh

23:34 amqp is a really complicated protocol

23:35 IME 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:35 if you don't need that, you probably don't need amqp

23:37 chord: anyone want to help starcraft clone project

23:38 tbaldridge: technomancy: 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:38 arrdem: technomancy, tbaldridge: okay thanks I'll check rabbit out once I test forcing more threads on my one machine

23:39 chord: tbaldridge and arrdem you going to help with project www.github.com/chord-rts/rts

23:40 technomancy: tbaldridge: 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:40 depends on whether you can afford to lose data, really

23:44 m00nlight: Is there a way to store the hadoop result into hbase directly instead of output a text file?

23:51 chord: hadoop sucks shit

23:54 m00nlight: chord: ??

23:54 lazybot: m00nlight: Definitely not.

23:54 m00nligh_: chord: ??

23:54 lazybot: m00nligh_: What are you, crazy? Of course not!

23:54 chord: m00nlight: why you using hadoop

23:55 m00nligh_: to process log

23:55 lazybot: crazy? what do you mean?

23:56 arrdem: technomancy, tbaldridge: turns out forcing 512 worker threads on my dev machine totally worked without involving other nodes :D

23:57 chord: m00nligh_ help me work on starcraft clone written in clojure

23:58 m00nligh_: chord: You're not kidding :)?

23:59 chord: m00nligh_ 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:59 nightfly: you need to do more on your own

Logging service provided by n01se.net