#clojure logs

2013-07-28

00:29seangrovednolen: Will check on the bug for the patch tomorrow afternoon and update it
01:05futileits quiet
01:05futileyall must be hackin away at some cools tuff
01:16Raynesfutile: Psh, I'm playing video games, eatin' fried chicken, and watching television.
01:17futileim sorry
01:33futileok that settles it, im gonna write something cool
01:34futilewish me luck
01:34eggheadhmm, I wonder if I could wrap a lamina channel in a core.async channel
01:35eggheadseems to be foolhardy
01:36eggheadis it enough to just implement the read-port write-port and close protocols?
02:32functionform!commands
02:32functionformoops, sorry forgetting my irc
02:34functionformcheck out my first macro guys, i'm really proud of it
02:34functionformhttp://pastebin.com/xRJw9Rtz
02:35functionformbasically you can use it to thread over every item in a collection without having to type map or use anonymous functions
02:35functionformclojure blows me away. this is my first lisp granted, but its just so exciting how simple you can make your end code look
03:03futile(do (defmacro map-> [coll & clauses] (let [g (gensym)] `(for [~g ~coll] (-> ~g ~@clauses)))) (map-> [1 2 3] inc even?))
03:03futiledo not like.
03:20callenfutile: brought that one on yourself mate :)
03:20futilecallen: i did?
03:20callenfutile: reading noobie code. Be nice to noobies.
03:21futilei was.
03:21futilehe wasnt in here at the time
03:21callenlogs exist. be nice.
03:21futilei would be happy to explain why i think its a bad idea if he comes back
03:21futileim not being un-nice
03:21futilebtw i just made a cocoa-based fuzzy-matching widget
03:22futilenow just gotta use it somewhere
03:27futileoh wait, its unrelated to clojure.
03:27futilesorry
03:42steverI am new to clojure and building a simple web app. Was wondering what is the best way to guard against cross side scripting. php has "htmlspecialchars" and "strip_tags". Is there equivalents in clojure/luminus?
03:50hoeck1stever: looks like luminus is using https://github.com/danlarkin/clabango for templating, which in turn is modeled after the django templating engine
03:51ddellacostastever: see also http://stackoverflow.com/questions/2897587/escape-sanitize-user-input-in-clojure-compojure
03:52ddellacostaI've had luck using the org.apache.commons.lang.StringEscapeUtils solution.
03:52hoeck1so, at least in templates, everthing is save by default if you use {{foo}}, you have to issue a {{foo|save}} to *not* strip out html chars
03:55futilei vaguely remember a middleware for protecting against cross site scripting
03:55futilemaybe it was in lib-noir?
04:00sontekThis might be an odd question, but are elisp and clojure lisp similar? Would knowledge of one transfer to the other pretty well?
04:02futileno.
04:02futilesontek: no.
04:03sontekSo the different dialects are pretty different?
04:04futilesontek: they have very different semantics, syntax, and idioms.
04:04futilesontek: clojure is immutable by default, focuses in higher-order functions, and has very different data types and core functions library
04:05futilesontek: see http://technomancy.us/169
04:05futileits very informative on this topic
04:06sontekfutile: thanks!
04:06futilek
05:00dwardhas anyone ever used lamina or aleph?
05:08AtKaaZis there a function already which does check if a substring is inside a certain string?
05:08AtKaaZor how would you do it? contains?("abc","a") == true
05:16AtKaaZ,(.indexOf "abc" "c")
05:16clojurebot2
05:19bhuemerhello, hi! I was wondering if you know any benchmarks/articles on how software-transactional memory performs as contention increases? I'm wondering as it says at least in Java Concurrency in Practice that CAS synchronisation performs worse than lock synchronisation when there's a lot of contention (think roundabout vs traffic lights on junctions)? wouldn't the same thing apply to software-transactional memory?
05:54LajjlaRaynes, do you still love me the most
06:51ddellacostacan someone help me understand how I can use with-redefs in Midje, using the around form? https://github.com/marick/Midje/wiki/Setup-and-teardown#around
06:54ddellacostahuh, not really sure what the point of "around" is, now that I'm reading the doc output
06:54ddellacostaI guess I can just wrap the whole thing in my with-redefs, but I wish I had something like use-fixtures in clojure.test.
07:24TEttingeris there any way to get clojure to AOT compile an application but not AOT-compile a library it require-s?
07:26TEttingerI seem to be encountering an odd bug in a lib I am using (hiphip, https://github.com/Prismatic/hiphip ) related to the use of (load "anothernamespace") in AOT'ed code
08:00GlenjaminHi guys, I'm trying to add new relic to my clojure app running on heroku as an uberjar - but i can't figure out how to get the jar up there so i can start up with -javaagent
08:01GlenjaminCan anyone point me in the right direction?
08:17ker2x_friendly greetings \o/
08:19ker2x_i'm learning clojure, i discovered condition-map (awesome) and i found that we can overload a fonction on arity, now the question is : can we define a condition map for each overloaded fonction ?
08:21llasramker2x_: At least according to http://clojure.org/special_forms yes.
08:22ker2x_this is the definition that say yes ? (fn name? ([params* ] condition-map? exprs*)+)
08:24ker2x_well, that make sense now. thank you :)
08:26hyPiRion,(let [f (fn ([a] {:pre [(integer? a)]} (+ a 10)) ([a b] {:pre [(integer? a) (integer? b)]} (+ a b)))] [(f 1 2) (f 1)])
08:26clojurebot[3 11]
08:26hyPiRionso yes
08:30ker2x_thank you. i tested something else on try clojure, overloading with same arity but different condition-map, doesn't work. :)
08:31ker2x_(defn diviser ([a b] "divide a with b" {:pre [(not= b 0)]} (/ a b)) ([a b] {pre [(= b 0)]} (println "nope") )) java.lang.RuntimeException: Can't have 2 overloads with same arity
08:32hyPiRionYeah, preconditions aren't guards in that sense
08:32ker2x_that could have been fun :)
08:33ker2x_but not realistic. :)
08:33snake-johnemacs users question: I spot a function in the middle of the screen with my eyes. I want to jump to the source with M-.. But to reach the function i have to type M-f many times. and then finally M-. to reach the source. how can I short this up?
08:34Glenjaminctrl+r functionname ?
08:36snake-johnyes that turbos my navigation thanks! I hope I won't forget
08:45snake-johnI sometimes get exceptions like clojure.core.async$eval10960.invoke (NO_SOURCE_FILE:2) . Why isn't the source-file and therefore the line-number known? I for sure loaded the macro which causes the exception from a.clj file….
08:45ker2x_i'm at ~60% of "clojure in action" :)
08:47hyPiRionsnake-john: because the function was most likely generated at runtime, meaning it has no source
08:47hyPiRionYou should print the entire stack trace to get where it crashed
08:50snake-johnyes your absolutely right the macro generates a function that's then executed…. unfortunately the nrepl shows only 20 lines of stack trace and no other namespace of my source files show up
08:51snake-johnhow do I print the entire stack trace?
08:53hyPiRion(pst) in the repl, or a (try (some-expressiin-here) (catch Exception e (.printStackTrace e))) within the code
08:53hyPiRionI'd recommend the first one, if you're running in the repl
09:02snake-johnok thanks I tried try-catch but still getting not enough information in the stack traces… I think because the error happens while the macro is being parsed… anyway I will find the error
09:12snake-johnHas anybody looked at the source of https://github.com/clojure/core.async? Theres a function emit-state-machine wich produces a state-machine fn. I would love to see the source of this on the fly geared fn. But cannot find a way to print it out?
09:13snake-johnI meant on the fly generated fn
09:19foolanohi
09:21foolanosay i have a function foo that returns something, what's the idiomatic way to populate a list of size n by calling foo() n times?
09:21llasramsnake-john: macroexpand perhaps?
09:22llasramfoolano: `repeatedly`?
09:22sandhu(repeatedly n foo)
09:22sandhuhttp://clojuredocs.org/clojure_core/clojure.core/repeatedly
09:23foolanoawesome. Thank you!
09:26xsynCan anybody tell me why this doens't work:
09:26xsynhttps://gist.github.com/anonymous/6098526
09:27hyPiRionxsyn: what would you like (name (keys data)) to do?
09:29llasramAlthough that's the proximate problem (for [id [user-list] ...] ...) itself looks somewhat confused
09:31snake-john@llasram thanks I finally achieved it with (map #(clojure.pprint/pprint %) (seq (emit-statemachine …))
09:35llasramCool beans
09:35llasramsnake-john: FYI, in IRC, you usually just refer to people's nicks to reference them. No @-prefix required
09:37snake-johnok thank you for telling me! I did not know thanks
09:48xsynhyPiRion: I'd like it to return a strong of the keys from the dat map
09:48xsynand compare them against the id's in the user-list
09:53xsynhyPiRion: At a higher level I'm trying to manipulate the data into a specific form so that I can render it nicely with d3
09:54xsynI'm a clojure noob, and it's made me a bit unstuck
09:54xsynbecause I'm pretty sure what I'm doing is more hacky than idiomatic
09:54hyPiRionokay, I assume the user-list is a list of ids, where all ids are strings?
09:55hyPiRionlike, ["foo" "bar" "baz"]
09:55xsynuser list is an array of maps
09:55xsynala
09:55xsyn{:last_name Lubowitz, :crypted_password $2a$10$mzQup4i4rQbrSu4qphSUBuHIzguT6mOFvu8HRlTH56fnd/Y/7/TGq, :updated_at #<DateTime 2013-07-28T11:31:05.491Z>, :username tawannalubowitz, :created_at #<DateTime 2013-07-28T11:31:05.491Z>, :email tawanna@acme.inc, :_id #<ObjectId 51f500f9c2e64bb14589bbd7>, :first_name Tawanna, :activation_code_created_at #<DateTime 2013-07-28T11:31:05.489Z>, :department DevOps, :role user, :activation_code 6d0d2
09:56hyPiRionah, okay
09:56xsynand data looks like this
09:57xsyn{:_id #<ObjectId 51f50026c2e64bb14589bbb1>, :51f50433c2e6566054df2e31 {:inf3 aldo@acme.inc, :adv1 aldo@acme.inc, :adv2 aldo@acme.inc, :adv3 aldo@acme.inc, :trt2 aldo@acme.inc, :trt3 aldo@acme.inc, :email guy@cloudafrica.net, :trt1 aldo@acme.inc, :department Human Resources, :inf2 aldo@acme.inc, :inf1 aldo@acme.inc}, :51f179e1e508cd7cc7fa6330 {:inf3 aldo@acme.inc, :adv1 aldo@acme.inc, :adv2 casey@acme.inc, :adv3 dorie@acme.inc, :trt2 b
09:57xsynsee there is the key :51f50433c2e6566054df2e31
09:57xsynI'm trying to get that, turn it into a string
09:57xsynand then map that id against the id's in user-list
09:58hyPiRionah, ok
10:00xsynbut the problem is actually casting (name (keys data))
10:03llasramI think you have other problems, but for that particular issue -- `keys` returns a *sequence* of map keys, while `name` expects a *single* `Named` object
10:03llasramIf that were the only problem, `(map name (keys data))` might be what you were looking for
10:07xsynllasram: Yeah, I'm just getting to see that
10:07xsynwhat is the best way to match an id on a keyword?
10:07xsynor is my entire approach to this wrong?
10:09hyPiRionxsyn: I just quickly wrote this, may be of help https://www.refheap.com/16993
10:10hyPiRionwhere convert-to-string converts the ObjectId to a string
10:10hyPiRion(I also tried to make it clojure-friendly, not sure if I succeeded at that)
10:10hyPiRion*new-to-clojure-friendly
10:12xsynyou and me both :)
10:17xsynhyPiRion: Thank you, that'll go a long way
10:20xsynI need to start hanging out here more, maybe I'll learn something
10:25hyPiRionxsyn: you certainly will if you stay here long enough :)
11:00SomelauwLol, I wrote my first chess program. It can backtrack 2 moves (so one move for black, one move for white) before slowdown explodes.
11:00SomelauwI didn't do any optimization yet.
11:01hyPiRionSomelauw: heh, you should have a look at alpha-beta pruning
11:01hyPiRionSlowdown's still going to be horrible though, but at least you can potentially go one move further
11:02SomelauwhyPiRion: I will try that.
11:12Somelauwthat can only be implemented using reduce
11:14hyPiRionSomelauw: yeah, I did it for one of my projects for university
11:15hyPiRionSomelauw: https://github.com/hyPiRion/snigilbot/blob/master/src/snigil/players/minimax.clj#L71-L93
11:16Somelauwno, it can't be implemented using a simple, reduce, because it has to break immediately as sson as it found a bad value
11:16SomelauwhyPiRion: I'll take a look at it
11:16Somelauwmaybe this is one of the things that is easier to express imperatively than functionally
11:16hyPiRionSomelauw: You can use reduced
11:17hyPiRionwhich short-circuits the reduce
11:19hyPiRionOh, mind you, I'm not keeping track of the optimal path. I just save the first move, not all of them.
11:24SomelauwI can't find examples of reduced and it's doc is short.
11:25Somelauw,(reduce (fn[a b] (if (= b 3) (reduced 3)) b)(range 6))
11:25clojurebot5
11:25bbloom,(reduce (fn[a b] (if (= b 3) (reduced 3) b))(range 6))
11:25clojurebot3
11:25bbloomyou've got a misplaced paren
11:26Somelauwoh, yeah, I was experimenting in lein repl, so I had to type them manually :P
11:26sdegutis,(reduce + [1 2 3]) ; /cc Somelauw
11:26clojurebot6
11:27sdegutis,(reduce conj [[1] [2] [3]]) ; /cc Somelauw
11:27clojurebot[1 [2] [3]]
11:27sdegutishmm maybe that actually makes it *more* confusing
11:27Somelauwtry cons
11:27Somelauw,(reduce cons [[1] [2] [3]]
11:27clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
11:28Somelauwin some language that worked
11:28sdegutis,(reduce cons [[1] [2] [3]])
11:28clojurebot(([1] 2) 3)
11:28Somelauwbut I've never seen reduced in another language
11:29sdegutisSomelauw: its just reduce
11:29Somelauwit's like some magic break statement
11:29sdegutisnope
11:29sdegutisit calls the fn with the first and second elements, takes the result, and calls it with that plus the next element, etc
11:30hyPiRionsdegutis: reduced, not reduce
11:30sdegutis,reduced
11:30clojurebot#<core$reduced clojure.core$reduced@575e7e>
11:30sdegutisoh
11:30sdegutis,(doc reduced)
11:30clojurebot"([x]); Wraps x in a way such that a reduce will terminate with the value x"
11:30sdegutiswhoa
11:30r0bgleesono_O
11:30bbloomSomelauw: reduced is a common trick, however
11:30r0bgleesonnever seen that before
11:30sdegutiswhat.. how... but...
11:30Somelauwsdegutis: that's what I was thinking as well
11:31bbloomsdegutis: the reduce function just checks for (instance? Reduced ...)
11:31bbloomand if it finds it, then it bails
11:31hyPiRionyou can e.g. implement every? with it
11:31bbloomit's super useful :-)
11:31r0bgleesonbbloom: i'm clojure newb, but can't you just return early or break from reduce() without that?
11:32bbloomr0bgleeson: no, there is no "break"
11:32hyPiRion(defn every? [pred coll] (reduce (fn [_ b] (or (pred b) (reduced false))) coll))
11:32hyPiRionwell actually, that's a wrong implementation, but you get the idea
11:32bbloomr0bgleeson: are you coming from Ruby? or somewhere else?
11:33bbloomif you're coming from ruby, you're probably familiar with break vs return and procs vs lambdas, right?
11:33r0bgleesonbbloom: yup, Ruby.
11:33r0bgleesonyeah
11:33sdegutisno i dont actually
11:33sdegutiscan someone please do a real world example of reduced?
11:33Somelauwsdegutis: alpha beta pruning probably
11:33bbloomsdegutis: just think of it like (reduce-until pred ...)
11:34bbloomonly the pred is not an arg
11:34bbloomr0bgleeson: http://journal.stuffwithstuff.com/2013/01/13/iteration-inside-and-out/
11:34r0bgleesonbbloom: all it does i return an instance of "Reduced", which reduce() detects and breaks from?
11:34bbloomr0bgleeson: precisely
11:34r0bgleesonthanks
11:34bbloomhttp://journal.stuffwithstuff.com/2013/02/24/iteration-inside-and-out-part-2/
11:36hyPiRionbbloom: hmm, do you think there could be a performance increase by implementing some, every? and friends with reduce/reduced?
11:36jonasenbbloom: I saw you guys made progress on fipp with rrb-vector -- awesome!
11:36r0bgleesonbbloom: thank you
11:36jonasenbbloom: what's the next step for cljs-fipp?
11:36bbloomhyPiRion: so not really for "some", since it returns the first success, it's naturally linear
11:37bbloomhyPiRion: but every? etc could probably benefit from reduce for *large* input
11:37bbloom"some" is linear, but a hypothetical "some?" could be a monoid parallelizable by reduced
11:38bblooms/reduced/reduce/
11:38bbloomjonasen: https://github.com/brandonbloom/fipp/issues/7
11:39bbloomtransduce should be trivial to port
11:39bbloomit's probably < 1 day for me to get good cljs fipp, but i don't personally have a use for it & have a ton of other irons in the fire :-)
11:39jonasenI could try to port transduce
11:40jonasenand then I can look at what's next (I have a use case for cljs pprint :-)
11:41hyPiRionbbloom: Hm, I thought the speedup from different CollReduce extensions would speed it up somewhat for large colls, but perhaps the overhead for smaller collections is too significant.
11:42bbloomhyPiRion: hmm, you may be right. i don't know what the overhead of reduced is
11:42bbloomi guess it would bypass the lazy sequences, which may help
11:42bbloomit's trivial to try, you can write a foldable every? function in 1 minute
11:42bbloomlet me know what you get! :-)
11:43hyPiRionoh, hahah. Alright, I'll have a shot at it
11:43bbloomhere, i'll write your monoid for you: #(and %1 %2)
11:43bbloomdone.
11:43bbloom:-)
11:43bbloomer and the unit value is true
11:43hyPiRionyeah
11:43bbloomand is already a monoid, but since it's a macro, you can't use it as such
11:58SomelauwWell, my code did become faster (but not smarter because I probably made an error somewhere).
12:03Somelauwnext step. Parallelizing the reduce and enabling strict type interference?
12:15sontekhow easy is it to re-use java libraries within Clojure? So, for instance, could I use the cassandra java library? Or do I have to use a clojure specific lib?
12:15bbloomextremely easy
12:16bbloomhttp://clojure.org/jvm_hosted
12:16bbloomhttp://clojure.org/java_interop
12:17hyPiRionoh darn, totally forgot about lein and its jvm speedup tricks
12:33hyPiRionbbloom: https://www.refheap.com/3b18fa584237430760c7cd1d5 -- obviously not conclusive, but it seems valuable to peek into it at least
12:33hyPiRion(using latest criterium for benchmarking)
12:38clj_newb_2345anyone having problems with core.async
12:38clj_newb_2345where it claims that a socket is closed
12:38clj_newb_2345the channel is never explicity closed ?
12:38clj_newb_2345s/the channel/yet the channel/
12:41hyPiRionNow I just need to figure out how to benchmark that implementation properly. Any core devels out there which knows what is required (how to benchmark) to get a performance improvement patch into core?
12:47dwardhas anyone ever used lamina or aleph?
12:48clj_newb_2345yes
12:48clj_newb_2345I played with it for a bit while trying to do websockets with clojure
12:48clj_newb_2345I ended up concluding I was about 20 IQ point short of really understanding it.
12:48dwardhow was the preformance?
12:48dwardhaha
12:48clj_newb_2345oh, I never measured performance.
12:49clj_newb_2345I just wanted a real time editor
12:49clj_newb_2345a real time collaborative editor
12:49clj_newb_2345that was it
12:49dwardcool, ya it's got a lot of stuff
12:49bbloomhyPiRion: lemme see...
12:50bbloomhyPiRion: killer!
12:51dwardlucene IndexWriters and IndexReaders are threadsafe, I want to strap lamina up to a dataflow, index it with lucene, and run bayesian inference to do deduplication
12:51dwardor maybe I will strap it directly to elasticsearch
12:51bbloomhyPiRion: what about small collections?
12:51bbloom< arraymap & vector sized. so like 5 to 25 or so
12:52dwardif lamina preforms how it says it does, i think it would be awesome, but i'm worried
12:52bbloomhyPiRion: i believe reducers have a cutoff, so presumably that should just switch to a normal loop
12:56hyPiRionbbloom: running on it now. Still seems faster on average for all cases, but keep in mind I'm only doing vectors now
12:56hyPiRionAnd now I have to do an errand, so I'll be back later.
12:56bbloomhyPiRion: yeah, seqs would naturally be linear anyway
12:56hyPiRionyeah
13:05clj_newb_2345dumbass question: in http://clojure.github.io/core.async/ how does alt! and alts! differ?
13:06bbloomclj_newb_2345: alt! is like a switch statement (static branches) and alts! is like a map lookup (dynamic branches)
13:09clj_newb_2345bbloom: do you have an exmaple of alts! doing something cool?
13:10clj_newb_2345bbloom: alt! = sleect from posix right?
13:10clj_newb_2345s/sleect/select
13:10bbloomclj_newb_2345: iirc, posix alts takes an array of handles to wait on, right?
13:10bbloomin that case, it's more similar to alts!
13:10clj_newb_2345bbloom: and they return one with of them has a msg
13:10clj_newb_2345bbloom: which sounds like core.async's alt!
13:12bbloomclj_newb_2345: alt! is a macro, alts! is a function
13:13bbloomthe select keyword in Go is like alt! and the reflect.Select function is like alts!
13:13bbloomit's statically known set of channel ops vs dynamic set
14:16sontekYou guys are beautiful unique snowflakes
14:33jonasenbbloom: https://github.com/jonase/transduce/compare/cljs
14:34seangroveTrying to run the script/test for the clojurescript repo, getting Exception in thread "main" java.lang.RuntimeException: No reader function for tag queue, compiling:(/Users/sgrove/code/tmp/clojurescript/bin/cljsc.clj:1720) on the master branch
14:35bbloomjonasen: cool! whenever you're ready, send over a pull request. I'll likely merge it with no-to-few changes when i get some time to test it out in the next day or two
14:36jonasenbbloom: ok
14:36seangroveOk, something strange going on with that error, disregard it for now
14:37bbloomjonasen: if you want to keep going with your adventure, michalmarczyk's rbb fork/branch is the basis to use
14:37bbloomjonasen: i'll probably merge his rbb branch once he makes the relevant optimizations to clojure.rrb-vector
14:38jonasenbbloom: I'll take a look at that next.
14:39bbloomjonasen: also, i'd just hard-code the various concrete types for IPretty for now
14:39bbloomjonasen: you'll just need to grep core.cljs for the various concrete type names and put those into the extend-protocol macro.
14:39bbloomotherwise, we'll need to wait for dnolen and cemerick on CLJS-527 :-)
14:41justin_smithsontek: ❄
14:41bbloomjonasen: thanks for taking this project on :-)
14:42jonasenbbloom: thanks for your guidance!
14:42bbloomjonasen: you're free work for me. guidance is the minimum payment i can provide!
14:42bbloomyou're DOING free...
14:42bbloomi accidentally a word
15:12clj_newb_2345when developing a clojure app which fires off events when a key is being held down,
15:12clj_newb_2345what should the time sampling be?
15:12clj_newb_234510 ms? 100 ms?
15:14justin_smithclj_newb_2345: maybe the better question to ask is what is a reasonable rate for updates from input - and then work back from that, no need to produce events faster than updates are needed
15:14justin_smithif the results are audio, you get one answer, if it is moving images, another
15:16seangroveI must be doing something strange - http://search.maven.org/remotecontent?filepath=org/clojure/tools.reader/0.7.5/tools.reader-0.7.5.jar doesn't seem to be a valid jar file
15:16seangroveIs that not the right place to download the jar?
15:45seangroveBronsa: Have a question for you re: tools.reader
15:47seangroveLooks like you say that clojure.land.LispReader will read ":foo/bar/baz" and tools.reader will throw an error
15:47seangroveThe cljs core test suite actually tests that the reader is able to read symbols with two /'s: https://github.com/clojure/clojurescript/blob/master/test/cljs/cljs/core_test.cljs#L204
15:48seangroveIs the test wrong so that I should update it, or am I misunderstanding?
16:13konr``Is there a way to macroexpand hiding the fully qualified names? The output of macroexpand-1 is quite illegible
16:14alandipertkonr``: one thing you can do is (require 'clojure.pprint) and (pprint (macroexpand...))
16:14alandipertkonr``: err, (require '[clojure.pprint :refer [pprint]) that is
16:14alandipertkonr``: or really, at the repl, just (use 'clojure.pprint). phew.
16:17konr``alandipert: a good use for this old friend!
16:20clj_newb_2345is there any open source alternative to datomic?
16:22bbloomclj_newb_2345: it's too awesome. anybody who understands how awesome it is would feel too bad competing with rich. everybody else is clueless ;-)
16:23clj_newb_2345bbloom: why are you always one step ahead of my thought process?
16:23technomancyclj_newb_2345: you can implement value-driven workflows in databases with more pleasant licenses, they just don't work that way by default
16:27clj_newb_2345what odes "paid perpeutual" mean?
16:27clj_newb_2345for license, does it mean it's not a monthly fee?
16:28clj_newb_2345alright, what's a good datomic tutorial?
16:28konr``clj_newb_2345: there is one in datomic's website
16:28konr``clj_newb_2345: the 'getting started' http://docs.datomic.com/getting-started.html
16:29technomancythere is also a separate #datomic channel
16:29clj_newb_2345konr``: nice, thanks
16:29clj_newb_2345technomancy: noted
16:29technomancyclj_newb_2345: are you going to change your nick when you get better at clojure?
16:29konr``clj_newb_2345: and a more thorough here: http://docs.datomic.com/
16:29clj_newb_2345technomancy: yeah, I'll change it to 2346 when I understand datomic
16:30technomancyformer-clj-newb isn't taken
16:30technomancyheh
16:37callenthese benchmarking results for Selmer are sensational
16:37callenit's keeping pace with Stencil and Mustache.clj
16:37callena massive upgrade from Clabango.
16:38callenhttps://gist.github.com/bitemyapp/6100049
16:51dark_elementIs there any way I can destructure fields in deftype? https://www.refheap.com/16997
16:54vraidi want to include a jar called "mt4j-desktop.jar", placed in a local repository found by lein, but i can't figure out how the :dependencies http://en.wikipedia.org/wiki/Special:Search?go=Go&amp;search=_ has to look, any directions?
16:57vraiddependencies [[ _ ]] ..
16:58gfredericksvraid: it's in your local maven repo under ~/.m2?
17:06justin_smithyou should be able to open the jar and look at the project.clj - there is probably an automatic translation from the directory structure too but I am less sure of how that works
17:06justin_smitha jar is basically just a zip file
17:07vraidgfredericks: it's in a folder in the project
17:07RaynesIt is exactly just a zip file. It just has metadata.
17:08sdegutiswoo im successfully lurking on irc
17:12gfredericksvraid: so what did you mean by "placed in a local repository found by lein"?
17:12gfredericksdid you mean you _want_ to place it in one, or that it's already there?
17:12vraidthe jar is there
17:13gfredericksare you trying to deploy it to the local repo on that machine?
17:13vraidbut i trip on adding it to the project file, i'm not sure what to name it
17:13vraidah wait, i have to process the jar file first?
17:13nDuffvraid: did you add it manually, or was it imported by a Maven-compatible tool?
17:14gfrederickswhat makes you think that lein will find it just because it's in a folder in the project?
17:14nDuffvraid: if the latter, its coordinates would already be in that tool.
17:14gfredericksyes typically you will manually deploy it to your local repo (in ~/.m2)
17:14gfrederickswhich involves picking the group-id, artifact-id, and version
17:15gfredericksdepending on where this jar came from there might be an appropriate choice that you can discover by unzipping the jarfile and looking at a pom.xml or project.clj or something
17:15gfredericksbut you might also be able to get away with making something up
17:16gfredericksnDuff: can't `lein deploy` handle this now?
17:16gfredericksI thought I saw that mentioned somewhere
17:16git_well thats all folks
17:16git_ht tp://ww w.youtube.com/watch?feature=player_detailpage&v=ZQAjJAvLtZA
17:16nDuffgfredericks: probably. Haven't tracked clrosely.
17:16git_http://www.youtube.com/watch?feature=player_detailpage&amp;v=ZQAjJAvLtZA
17:16git_:)
17:16vraideverything feels so gimped on windows
17:17nDuff...who the heck has a spambot emit a typo'd version of its URL before the correct one?
17:17nDuffHuh.
17:17nDuff(exact same typo elsewhere as well)
17:17justin_smithI figured he was just alluding to the fact that it was time for him to go to church
17:17vraidnDuff: automatic join, manual text
17:20justin_smithsdegutis: excellent example of apophasis
17:24sdegutisgit_ uhh
17:46vraidnDuff, gfredericks: okay, i've got maven up and working now
17:47danlarkinanyone have thoughts on bishop and/or liberator?
17:47gfredericks$google mvn install-file
17:47lazybot[Maven Install plugin - Usage] http://maven.apache.org/plugins/maven-install-plugin/usage.html
17:47gfredericksvraid: ^ docs on the command you'll want
17:48vraidmany thanks
17:49kmicubishop early on f4
17:52danlarkinhaha
17:52danlarkinnot quite what I meant
17:55gfredericksopposite colored bishop endgames are drawish
18:14vraidgfredericks: finally got it, thanks
18:14gfredericksvraid: w00t
18:15vraidapparently maven doesn't work in powershell
18:15vraidtook me 20 minutes to figure that out
18:16gfredericksI certainly couldn't've told you that
18:17clojurenewbhey guys… I'm confused… how can I add a 'distinct' as the last step in a thread last macro ?
18:17technomancygfredericks: yeah, you don't need mvn install:install-file any more
18:17vraiddo i add the .m2/repository to the project file?
18:18gfredericksvraid: no it should be looking there automatically
18:18gfredericksyou just need to add the artifact to :dependencies using the appropriate group/artifact/version
19:31seangrovednolen: Could use some help running the cljs test suite when you're around
19:42onrhttp://clojurekoans.com/
19:44eggheadCLJS
19:44eggheadis a lot of fun :)
19:47dnolenseangrove: what's up?
19:51seangrovednolen: How can I set the print-fn while running the tests? I finally got them half-way running, but they're bailing out with: Error: No *print-fn* fn set for evaluation environment
19:51seangroveHow do you kick off the test suite?
19:51dnolenseangrove: ./script/tests
19:51dnolenseangrove: you shouldn't have to set print-fn
19:55seangrovednolen: Then I guess this patch may have caused more havok than I realized
19:55seangroveWhere is *print-fn* set when running test? I run V8_HOME=/opt/boxen/homebrew/bin script/test and get the error
19:58dnolenseangrove: in test/cljs/test_runner.cljs
20:02seangrovednolen: Alright, then this is a bit baffling. I'll keep going through it.
20:02seangroveThanks for the heads up
20:05clj_newb_2345anyone familiar with statistical profiling on clojure?
20:06clj_newb_2345I have this system, whose cpu usage, according to "top", just umped from 10% to 30%
20:06clj_newb_2345I'd love to know why
20:08callenI use jvisualvm and yourkit.
20:09nDuff(YJP == YourKit)
20:09clj_newb_2345better than visual vm?
20:09clj_newb_2345hmm
20:09clj_newb_2345time to try both
20:09callenclj_newb_2345: yourkit is more "industrial", visualvm is nicer to use.
20:09clj_newb_2345which is more powerful?
20:09clj_newb_2345I want vim, not notepad :-)
20:10clj_newb_2345I want the most powerful one
20:10clj_newb_2345learning curves be damned :-)
20:10callenwell yourkit is commercial
20:10callena couple hundred dollars I think
20:10callenvisualvm is free
20:11clj_newb_2345err, I'm a grad student
20:11clj_newb_2345I can't afford yourkit
20:11clj_newb_2345that was easy to decide
20:11callenlol.
20:12callenso much for using the more powerful tool.
20:12clj_newb_2345is yourkit more powerful?
20:12dnolenseangrove: I'm willing to help out, but the there seem to be classpath issues with tools.reader
20:12callenclj_newb_2345: what do you suppose "industrial" meant?
20:12clj_newb_2345provides support and hand holding
20:12clj_newb_2345and consultants
20:12dnolenseangrove: which what I'm concerned about, ./script/repl and try to require tools.reader doesn't work
20:12clj_newb_2345maybe drinks + dinners at bars if you're in charge of sales
20:13Raynesclj_newb_2345: If you need yourkit for an open source project you can get a free license key as long as you mention yourkit in the README or something.
20:13clj_newb_2345it's research
20:13clj_newb_2345not open source
20:19seangrovednolen: Yeah, got that working. The problem was I was downloading a bad jar for tools.reader. I wasn't able to run the tests before though (CLOJURESCRIPT_HOME was pointing somewhere random from last year when I first got into cljs), and now that I have the tests running, there are a few broken ones
20:21dnolenseangrove: ok, sounds like you've got a handle on it then.
20:21seangrovednolen: Yeah, do have a question around the symbols though
20:21dnolenseangrove: what's up?
20:22clj_newb_2345damn it
20:22clj_newb_2345yourkit is not giving me my free evalutain key
20:22clj_newb_2345it must be like "we can detect over the internet that you are poor, so no 15 day evaluation for you"
20:22seangroveThe new reader throws an error on e.g. (name ':foo/bar/baz), which is expected from the readme, but there's a test in core_test.cljs that asserts that it should be alright https://github.com/clojure/clojurescript/blob/master/test/cljs/cljs/core_test.cljs#L204
20:22seangroveYou can see the ntoe about the difference here: https://github.com/clojure/tools.reader#differences-from-lispreaderjava
20:23seangroveJust wondering which is right
20:25dnolenseangrove: probably something to bring up with Bronsa - personally I think tools.reader should probably allow the edge cases that the standard reader allows.
20:26seangrovednolen: Yeah, messaged him a bit ago, sounds like it's not clearly decided yet
20:27clj_newb_2345dumb question: what java functions lets me do statistical sampling on my own?
20:28squidzwhat kind of sampling?
20:28clj_newb_2345statisticall sampling
20:28clj_newb_2345I want to know what the stack frames of threads
20:31Bronsaseangrove: dnolen the doc at http://clojure.org/reader explicitely says that symbols (and thus keywords) can only contain one '/' in the middle of the name, I follwed that
20:33dnolenBronsa: yes, question is whether tools.reader should be eager about errors around such things
20:33dnolenseangrove: in anycase it's a small thing, feel free to change those tests to remove extraneous slashes
20:34dnolenseangrove: in your updated patch (also when you put a new patch please squash and delete the old one)
20:36seangrovednolen: Will do
20:37seangrovednolen Bronsa: Another question then around tagged literal support
20:37seangroveLooks like tools.reader doesn't provide an implementation for #queue, but there are a few tests around that https://github.com/clojure/clojurescript/blob/master/test/cljs/cljs/core_test.cljs#L1720
20:38seangroveWell, two
20:38Bronsaseangrove: clojure doesn't either, AFAIK it's a clojurescript specific thing
20:38Bronsathe ticked on CLJ hasn't been merged yet
20:40Bronsaseangrove: https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/compiler.clj#L757
20:41dnolenseangrove: but I'm assuming you can work around this?
20:41Bronsasure
20:41Bronsajust change that to r/*data-readers* cljs/*data-readers*
20:41Bronsa(assuming r == clojure.tools.reader)
20:42seangroveOk, sounds good, I'll give that a try
20:43dnolenseangrove: Bronsa: thx!
20:43Bronsaseangrove: remember that tools.reader doesn't use clojure.core/{*default-data-reader-fn* *read-eval* *data-readers*} you have to use the tools.reader/whatever equivalent
20:43Bronsathat was for backward compatibility I think
20:44Bronsayeah. for clojure-1.3.0 compatibility
20:44seangroveBronsa: Maybe you can check over the patch in a bit to see if there are any glaring omissions?
20:45Bronsasure
20:53bbloomok data structures experts…. if i use subseq on a sorted-map… does that prevent all / part / none of the unselected branches of the tree from being garbage collected?
20:55sdegutisi wonder, is it possible to start up a JVM from C and pass data and call functions back and forth?
20:55sdegutisbut initiating it all from the C side?
20:55sdegutisi wanna add Clojure scripting to this Mac app
20:56Bronsabbloom: it wouldn't look so
20:56bbloomBronsa: really? i thought the opposite from a cursory glance at PersistentTreeMap.java
20:57bbloombut maybe i'm reading this wrong...
20:57Bronsabbloom: I just quickly glanced at seqFrom but it looks to me like it's just creating a Seq out of the remaining nodes
20:58bbloomBronsa: that was my first thought too, but keep digging, it's more subtle than that
20:58bbloomit's producing a stack that represents some spine of the tree & then traversing the tree along that spine
20:58bbloomcheck out `static public class Seq`
20:59Bronsablargh, I assumed Seq was a simple Cons
20:59bbloomnope, it's effectively a closure :-)
21:01bbloombut the implementation has both val & branch nodes for both red & black, so conceivably this is only putting value nodes in for the subset of the tree that would be outside of the subseq
21:01bbloomalso, compare:
21:01bbloom(doc subvec)
21:01clojurebot"([v start] [v start end]); Returns a persistent vector of the items in vector from start (inclusive) to end (exclusive). If end is not supplied, defaults to (count vector). This operation is O(1) and very fast, as the resulting vector shares structure with the original and no trimming is done."
21:01bbloom(doc subseq)
21:01clojurebot"([sc test key] [sc start-test start-key end-test end-key]); sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a seq of those entries with keys ek for which (test (.. sc comparator (compare ek key)) 0) is true"
21:02bbloomi think that branch/value indirection makes this work! clojure's data structures rock.
21:07seangrovednolen: Alright, patch is updated with all the changes: http://dev.clojure.org/jira/browse/CLJS-540
21:07dnolenseangrove: great thanks, tests pass?
21:07seangroveLooking at how I can delete the previous attachments...
21:07seangroveYeah
21:07bbloomBronsa: am you studying it? :-)
21:08seangroveOk, cleaned up
21:12Bronsabbloom: what, the PersistentTreeMap$Seq implementation?
21:12bbloomBronsa: yeah
21:12Bronsano, I'm too sleepy right now
21:12bbloomhaha ok, fair enough
21:16Bronsaseangrove: doesn't the repl need to switch to tools.reader too?
21:17seangroveBronsa: Not sure it has to happen all at once
21:18seangroveIdeally it would, but the main difference right now is just the metadata from tools.reader. Functionally, everything seems to work the same
21:19sdegutisobjc -> c -> java -> clojure, and back again
21:24dnolenseangrove: sweet seems to work, will push shortly
21:25seangrovePhew, thanks
21:25seangroveWas quite a bit of work to get into the guts of cljs with a properly-working env
21:26dnolenseangrove: Bronsa: reader doesn't seem to add any significant time to compilation time
21:27Bronsadnolen: I'm happy to hear that
21:27seangroveBronsa: tools.reader seems very nicely done, thank you for it
21:31Bronsadnolen: on a side note - tools.reader can read [+-]Infinity as Double/[+-]Infinity, I think clojurescript should special-case on that in emit-constant Double
21:31clj_newb_2345what is the idiomatic way to send a fixed-rate message to a go channel?
21:31clj_newb_2345I'm currently using a java Timer,
21:32clj_newb_2345with a task which does (go (>! my-channel :tick))
21:32clj_newb_2345however, I think this is bad, since when I run it at 10milli seconds,
21:32clj_newb_2345it fore off 100 go requests per second, which sometimes appears to starve the go-threads trying to read from the channel
21:48bbloomBronsa: https://gist.github.com/brandonbloom/6101597
21:49bbloomi mailed the list too, b/c that behavior was kinda odd :-P
21:53mischovSo is 'do' a macro or a function or what?
21:53bbloommischov: special form
21:53bbloomit's a magic SUPER macro
21:54mischovWhere would I go to find source for special forms?
21:54bbloomCompiler.java
21:54mischovThanks
21:54RaynesI could have swore you said "Where can I go to find the special forces." mischov.
21:54Bronsabbloom: mmmh now I'm super curious
21:55bbloomBronsa: i am continuously surprised & delighted by clojure's stdlib
21:55mischovRaynes: The magic SUPER special forces.
21:57bbloomBronsa: what i'm really looking for is the ability to slice a sorted map and have it stay a sorted map
21:58justin_smithclj_newb_2345: the jvm is going to cause problems if you want the timings to be accurate, gc and realtime are a tricky combo
22:00mischov... 8000 lines of compiler.java later... "oh java....."
22:00clj_newb_2345no one has embarked on clojure in clojure yet?
22:00bbloommischov: heh, yes. it's particularly verbose b/c it's coded very functionally, which requires lots of boilerplate in java
22:00bbloomclj_newb_2345: there is some GSOC work going on this summer on that
22:01clj_newb_2345why are such important projects being left to GSOC ?
22:01Bronsathat would be my work :P
22:02seangroveclj_newb_2345: A lot of work, presumably
22:02clj_newb_2345not to say GSOC people aren't qualified; but it seems like such core projects would have the interests of those who have developed Clojure for years
22:02bbloomclj_newb_2345: why is it important?
22:03bbloomclj_newb_2345: it's unlikely that any other implementation will supplant the primary java implementation any time soon
22:03bbloomclj_newb_2345: even if one was "ready" there would be significant migration cost
22:03bbloomfor what benefit?
22:04clj_newb_2345bbloom: your pragmatism is making my idealism seem irrational
22:04bbloomthat's the goal :-)
22:04seangrovebbloom: Presumably, there's some payoff in being able to develop tooling
22:04bbloomself-hosting is a neat trick & it's quite useful for many reasons… none of which are meaningful objectives of clojure
22:05seangroveLowering the bar to contributing by removing most of the Java-stuff could help the clojure ecosystem develop quicker
22:05bbloomseangrove: quicker isn't necessarily better
22:05bbloomseangrove: and lots of clojure-ports of various parts pop up as people develop the need for them
22:06seangrovebbloom: Tooling-wise, it might be
22:06bbloomsee tools.reader, clojurescript, my backtick, etc etc
22:06clj_newb_2345I guess part of it not being self hosting
22:06clj_newb_2345and java being a mess
22:06clj_newb_2345is that there's only one implementation
22:06seangroveJust thinking about hypothetical benefits of self-hosting
22:06clj_newb_2345unlike, say scheme
22:07Bronsa,(meta '^:foo []) ;; just a quick reminder that Compiler.java is full of unhandled edge-cases
22:07clojurebotnil
22:07bbloomhttps://github.com/languages/Clojure & https://github.com/languages/Scheme
22:07bbloom#24 vs #35
22:07bbloomnot saying popularity matters, but having more than one scheme implementation isn't helping solve the problems clojure is solving
22:08bbloomand obviously, lots of people need those problems solved!
22:08bbloomi'd love to have a self hosting compiler
22:08seangroveIt's definitely a nice-to-have, but I don't see any strong, immediate benefits
22:08bbloombut it's just not a priority for the core team & few people who are capable are interested
22:09seangroveSounds like we're in violent agreement
22:09bbloomseangrove: i'm trying to help clj_newb_2345 understand :-)
22:09clj_newb_2345I'm convinced.
22:09clj_newb_2345I'll sacrifice my ability to read Clojure internals
22:09clj_newb_2345for the benefit of a non-fragmented community.
22:09bbloomlearn java, it's not so bad :-)
22:09seangroveUhg
22:10bbloomhaha yeah, yeah i know
22:10seangroveclj_newb_2345: I guess learn java, or be happy that clojure moves - slowly - more and more to clojure
22:10clj_newb_2345I hope Compiler.java is written with variable names consisting solely of the ltters o, l, 0, and 1
22:10seangrovehence clojure.tools.reader vs clojure.lang.LispReader
23:07seangroveI think the clojurescript project is one of the biggest projects using the closure compiler
23:07seangroveMore often than not clojurescript resources show up when googling for closure compiler errors
23:08bbloomseangrove: could just be google results personalization :-)
23:08bbloombut i wouldn't be surprised if it was by far the biggest use outside of google or other closed organizations
23:10seangroveI've caused an error with the cljs output with duplicate fn param names being emitted, mainly because of the "_" name
23:10seangroveGoogled the closure error to understand it better, and cljs tickets popup
23:11seangroveI hope google is able to personalize searches that well for me - it'd make me feel like we're old friends
23:11clj_newb_2345is there a way, from clojure, to get how much CPU / memory this particular JVM instance is using up?
23:14seangroveIs there a way on github to see the evolution of a line over time? I want to know when a section of code was changed immedaitely after some commit
23:16clj_newb_2345is this similar to git blame?
23:16seangroveclj_newb_2345: Yeah, like git blame, but asking "who/what changed this line immediately folloeing this commit?"
23:16bbloomyeah, i don't think you can do that on github, but you can use blame --before
23:17seangroveThanks, will check it out
23:17bbloomor maybe --since
23:17bbloomor something like that
23:17bbloomgit blame rev -- file
23:17bbloomlike that
23:17bbloomthen you can do `git blame rev^ -- file`, i think
23:19seangroveAh, damn, this function moved from compiler.clj to analzyer.clj at some point. Actually need something like codeq more
23:20bbloomnope!
23:20bbloomuse -M
23:21seangroveWell, I can `git log file`, find the oldest commit for it, then see whether the function is in it
23:21bbloomblame takes a -M flag, just like diff and a few others, for move detection
23:21seangroveAh, wow
23:22bbloomsuccess!?
23:22clojurebotclojure success stories is http://dev.clojure.org/display/community/Clojure+Success+Stories
23:22bbloomlol
23:23seangroveI don't *think* so... it looks like it might have migrated to an intermediate file first. Let me try -M on that file
23:24bbloomuse -M 40 or something
23:24seangrovebbloom: I still maintain a datalog query would be somewhat nicer ;)
23:24bbloomseangrove: surely something somewhere in datalog lang takes a -M argument ;-)
23:26seangrovebbloom: Sure, but if I could just query for "give me all the revision history for these two functions, the first compiler/analyze-fn-method and the second analyzer/analyze-fn-method", I can ask it for the things I care about (functions and their history) rather than things git knows about (line blocks)
23:27bbloomhey man, we here in clojure land can only reinvent computing so fast
23:27seangroveHeh, I think codeq does this already, I just need to fix up Jida and get it in working shape
23:27solusHow would someone write the following logic in clojure? https://gist.github.com/anonymous/63b5efe27a1ed6059dbd
23:30solusgiven collections A and B if an element in B intersects an element in A "modify" C
23:40bbloom*sigh* cedric
23:40technomancyclojurebot: tell bbloom how killfiles work
23:40clojurebotbbloom is a dendrologist
23:40seangrovebbloom: I don't understand the email, but it looked like he was being helpful
23:40bbloomlol
23:41bbloomhe was being marginally helpful, but i can't help but read his emails in comic book guy voice
23:41seangroveYeah, fair enough
23:41seangrovebbloom: But have you considered that datomic is not open source, and is therefore invalid?
23:42seangroveAnd that also means any time it's even remotely referenced everyone should be reminded about it :P
23:42technomancyI have no idea what this thread is, but it sounds like you're implying that I agree with Cedric
23:43technomancyand that scares me... might be time for me to sign off
23:43seangrovetechnomancy: I agree as well, but it's rarely relevant when he brings it up
23:43bbloommy thread is completely unrelated to datomic
23:43seangroveOh, I know, he didn't mention it this time ;)
23:43bbloomexcept that in the sense that both my thread and datomic love awesome data structures
23:43bbloom<3
23:44solusHow would someone write the following logic in clojure? https://gist.github.com/anonymous/63b5efe27a1ed6059dbd
23:44solusgiven collections A and B if an element in B intersects an element in A "modify" C
23:44bbloomseangrove: the real issue is that he didn't explain if/how his advice changes my experiment. i don't think it does
23:45bbloomsure, i could do what he says… to make my tiny little test code more robust lol
23:45bbloomi wouldn't mind if he ALSO addressed whether or not finalizers vs reference queues would impact my measurements
23:46seangrovebbloom: It's all over my head anyway, the work of greater minds. I'm just focused on some small analyzer code, and glanced at the thread, and it appeared a remarkably coherent email for him.
23:47bbloomseangrove: no, you're right. i wouldn't be complaining if it was anybody else
23:47bbloomi'd have just said "huh, ok. i didn't know that existed & i don't really care" then continued to wait for somebody to address my actual question
23:49arrdemsolus, is there some order gurantee to these collections/
23:49arrdem*?
23:49clojurebot* is just for when you are lazy and sloppy
23:49arrdemdarn tootin
23:49solusno
23:50seangrovehah
23:51arrdemsolus, so the approach is probably (reduce (fn [[a c] el-of-b] ..) b)
23:51bbloom* is also for when there aren't enough words in the english language :-)
23:51arrdembbloom: it's really nice when counting infinite sets too!
23:52arrdemsolus, so (fn ..) is a function which implements a single update to c as desired, returning the pair [a, new-c]
23:52arrdemor at least that's how I'd wangle it.
23:53solusI only need new-c but yes that is the idea
23:53arrdemsolus, yes but reduce is a sequential update operator
23:53arrdemso the idea here is that you step for each item in b retaining a and "updating" c
23:54arrdemok so (let [a ..] (reduce (fn [c el-of-b] ..) {} b)) would be better
23:54solusthat makes sense
23:55solusI staarted typing some nested doseq then I was like nah there has to be a less strange way of doing this
23:55arrdem,(doc doseq)
23:55clojurebot"([seq-exprs & body]); Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by \"for\". Does not retain the head of the sequence. Returns nil."
23:56arrdemyeah doseq was not the right tool.
23:56arrdem,(doc for)
23:56clojurebot"([seq-exprs body-expr]); List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, rightmost fastest, and nested coll-exprs can refer to bindings created in prior binding-forms. Supported modifiers are: :let [binding-form expr ...], ...
23:56arrdemand for's right out. reduce is definitely the right tool.