#clojure logs

2014-01-06

00:11t3soroHello Clojurians
00:11t3soroHow can i prevent a (deliver) to a promise from delivering twice during a transaction that might get retry'd?
00:16bbloomt3soro: deliver it asynchronously with an agent
00:16bbloomt3soro: sends to agents are held until after a transaction succeeds
00:23t3sorothanks bbloom
00:38arrdemyarrr
00:39arrdemis there a (ninc) function in someone's snippet library?
00:39bitemyapparrdem: ninc?
00:39arrdembitemyapp: I keep needing an (inc (or 0 val))
00:39arrdemwe.. (or val 0)
00:39bitemyapp...
00:39arrdem*well
00:40arrdemninc Nillable Inc
00:40bitemyappseems like you could just write it eh? :)
00:40bitemyappseems silly though.
00:40bitemyappjust embedding the (or ...) is straight-forward.
00:40arrdembitemyapp: the point is that this is the 15th or so time I've done so :P seems like it should exist somewhere for re-use...
00:41seangrov`fnil?
00:41arrdemseangrov`: what is this form? I don't know of it..
00:42bitemyapparrdem: fnil is a more generic way to do it.
00:42bitemyappninc doesn't seem advisable.
00:42arrdem,(doc fnil)
00:42clojurebot"([f x] [f x y] [f x y z]); Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third positions (y, z). Note that the function f can take any number of arguments, not just the one(s) being nil-patched."
00:42arrdemcute
00:42seangrov`,((fnil + 0) nil 10)
00:42clojurebot10
00:42seangrov`\o/
00:43arrdemlein new me.arrdem/detritus
02:28tommo_can some1 verify if this is valid code? (:gen-class ^{Manifest {:name "clj impl" :author "author" :description "desciption"}})
02:29tommo_i'm trying to add a class-level annotation
02:35amalloythat can't be right - metadata has to attach to something
02:35amalloyi don't know how to do annotations, but that ain't it
02:38tommo_ah silly me, attached it to class name
02:39tommo_and it looks like it works
02:39bitemyapptommo_: https://github.com/clojure/clojure/blob/master/test/clojure/test_clojure/genclass/examples.clj
02:41tommo_thanks bitemyapp, amalloy
03:12seriously_randomhow to avoid nesting while using take in a map: http://pastebin.com/kFxjMxdq
03:16TEttinger,(reduce into [] '((1 2 3) (1 2 3) (1 2 3)))
03:16clojurebot[1 2 3 1 2 ...]
03:16TEttingerseriously_random: ^
03:16seriously_randomTEttinger, can't I do something inside map function?
03:17seriously_randomTEttinger, I could also use flatten, but I want map to return non-nested sequence
03:17vijaykiranseriously_random: usually map is m -> m
03:17TEttingeryeah, if you use map on a 3-element sequence you get back a 3-element sequence
03:18TEttingerthey may be nested elements
03:18TEttingerbut still 3
03:21seriously_randomTEttinger, http://pastebin.com/9w2ntvbn
03:22TEttingerthe difference between reduce into [], and flatten, is flatten goes through the whole nesting and flattens all of it, reduce into [] removes one layer of nesting
03:23TEttinger,(reduce into [] '((1 2 3 (4 5 6)) (1 2 3 (4 5 6)) (1 2 3 (4 5 6))))
03:23clojurebot[1 2 3 (4 5 6) 1 ...]
03:25seriously_randomTEttinger, or better is to avoid creating nested sequences
03:25amalloy(reduce into [] (map f coll)) is a pretty silly way to write (mapcat f coll)
03:26TEttingerright, mapcat
03:26TEttingerI was thinking of the output
03:45seriously_randomTEttinger, ended up with apply concat (for instead
03:46TEttingernot... mapcat?
03:46seriously_randomhttp://pastebin.com/R3Yjim6b
04:45jazzornHey! Question: probably some of you know http://www.youtube.com/user/jekor and the "Haskell Deconstructed" Tutorials where jekor rebuilds well know applications in haskell. I read trough Programming Clojure and liked the practica alot because they point in the same direction to get better in reading and writing and more important 'good haskell style'. Is there some known source you would recommend to 'get better in reading and writing clojure', like e.g.
04:45jazzorn well written clojure code of medium size that makes uses of common patterns, best practices, and so on ... ? Thanks and have a nice day!
04:52llasramjazzorn: Leiningen is a generally well-designed, approachable project, which has the big benefit that you'll already actually use if working in Clojure
04:53hyPiRionllasram: oh dear lord, Leiningen is not using common patterns and best practices
04:53fredyrjazzorn: and clojure source ofc
04:53llasramHaha
04:53hyPiRionIt's worth to have a look at, but don't assume stuff we do in there is something you will do yourself
04:54andrew__are all the functions and forms built into the language listed here, or is this only a subset: http://richhickey.github.io/clojure/clojure.core-api.html
04:54llasramhyPiRion: You have a better example? :-) I honestly think it's pretty decent
04:55llasramandrew__: FYI, the official clojure repos are on github, but under the 'clojure' org, so e.g. not under user 'richhickey'
04:55TEttingerdon't ever look at my code for "good practices"
04:55hyPiRionllasram: I'm not sure, but 4clojure and lazybot perhaps?
04:56TEttingernice little snippet from my current project (aget ^"[Lcom.badlogic.gdx.graphics.g2d.TextureAtlas$AtlasSprite;" cleaned idx)
04:56llasramandrew__: To answer your question -- most of the lowest-level special forms are implemented in the compiler itself, currently in Java
04:57TEttingerjazzorn, I learned a lot hacking on lazybot
04:57andrew__llasram: ok, i just wanted to know the actual Clojure forms that make-up the langauge
04:57TEttingerit's fairly good source, well-documented but a lot of files. thankfully it's all sandboxed, so if you make a mistake it still launches and prints the error in the console
04:58hyPiRion(inc TEttinger)
04:58lazybot⇒ 11
04:59TEttingerhooray
04:59hyPiRionI usually struggle to find source code recommendations for new clojure programmers, so it's nice to get that one confirmed
04:59TEttingerlazybot has a mongodb dependency, which is fairly easy to set up
05:00TEttingerI actually had a harder time setting up and maintaining lucene for one of the plugins I wrote
05:00llasramTEttinger: I was going to make some snide comment about them (both? I believe) using mongo, and thus not following best practices, but (originally) held my tongue :-)
05:00TEttingeris congomongo deprecated?
05:01llasram`ring` and `compojure` show signs of being older projects, but may be the most widely-used Clojure projects following clojure itself
05:01llasramTEttinger: Not that I'm aware of. Just referring to MongoDB itself :-)
05:02TEttingerllasram, is datomic preferred these days?
05:02llasramTEttinger: You are making it difficult to inject passing database snobbery!
05:03TEttingerit's what I do man
05:03llasramHeh
05:03TEttingerhey it could be worse
05:03TEttingercould be Oracle's commercial DB
05:04llasramjazzorn: BTW, you'll probably get a wider range of suggestions if you ask on the Clojure mailing list. Especially versus this time of day on IRC -- this is probably maximum US sleepytime
05:06llasramTEttinger: All I ask of my databases is that they be libre and not lose my data as a design decision. Everything else I'll evaluate on an application-specific basis
05:07TEttingerI'm in california... but then again, I'm on Pacific Nonstandard Crazy Time
05:09llasramTEttinger: Yeah... Actual maximum might be in another 30-60 minutes, but we do have a number of EST early-risers
05:09TEttingerstill, bay area and seattle seem to be prime clojure dens
05:10llasramDark caves, filled with slithering parentheses
05:13jazzornwell, i'll jump into core-api for a while ... thanks
05:31andrew__i'm trying to make sense out of this: http://pastebin.com/iTY30wD0 When doing something like (count) on a very large sequence, is this suggesting that it will throw away values it doesn't need, if it can, and thus avoid memory problems on large seqs?
05:35llasramandrew__: Clojure tries to be relatively aggressive about generating code which doesn't unnecessarily hold references to values it no longer needs (i.e. "locals clearing"). Garbage collection and the design of lazy sequences (essentially single-linked lists where the "next" element may be a function to call) does the rest
05:36ucbhey hey llasram
05:36llasramGood <time of day>
05:37ucbmorning for me, good $TZ_GREETING for you as well
06:10pepijndevosCan I do CouchDB-style compare-and-set! in Clojure? That is, compare a revision, not the whole data.
06:11arcatangood morning, in the universal greeting time!
06:21pepijndevoshrm, there are some java.util.concurent.atomic classes that have a mark or stamp, but they ALSO require the reference.
06:21andrew__llasram: so does (count) actually evaluate and remember all the values in a seq? also 2) is just prepeding your name with a colon enough to "message" you on here?
06:22llasramandrew__: Just mentioning someone's nick is usually enough to highlight it in most IRC clients
06:23llasramandrew__: As for `count` -- I'm not really sure how to answer that
06:23andrew__the code snippet I provided is confusing
06:23andrew__it suggests that count is by nature not head-retaining, therefore, how are values "remembered" if it evaluates everything at once?
06:25llasramUnfortunately I can't quite tell the source of your confusion
06:26llasramFor lazy sequences, `count` just walks it as a single-linked list and counts the number of entries, so it doesn't need to hold on to any earlier references
06:27andrew__how can I get 5th element like this without error: (nth (repeatedly 1e6 (rand-int 10)) 5)
06:28andrew__it reports "java.lang.Integer cannot be cast to clojure.lang.IFn "
06:28llasramThat kind of exception means you provided something else where Clojure expected a function, which is the case for the second argument of `repeatedly`
06:29llasram(rand-int 10) vs e.g. #(rand-int 10)
06:29andrew__oh, i meant a function literal
06:29llasramYou meant a function literal?
06:33andrew__Yes I meant what you wrote, the #() expression. fixed. so my test reveals that using time and nth to access an element in a long lazy seq, indeed it takes longer for the first call, then short for the second. this is even true after (count) has been used to evaluate all elements, thus suggesting count does not actually cause values to be remembered, and the seq remains lazy
06:37llasramandrew__: Oh, I see what you are saying. No, that's not correct. Realization of lazy seq each element happens only once for a given concrete instance of a lazy seq
06:37llasramandrew__: Try creating a seq which needs to e.g. call Thread/sleep to realize each element
06:37andrew__llasram so count is not "realizing" the list
06:37llasramandrew__: It is
06:38llasramandrew__: Something else is confounding your empirical results
06:38andrew__if it is realizing it, then why is it not "head retaining" -- wouldn't knowing the "head" mean that it was realized?
06:39llasramWhen you walk a single-linked list, you only need to hold on to your "here" reference as you walk each element, you don't need to keep a reference to the first element you started at for each iteration
06:39andrew__ok, so keeping a reference to an element is not the same as having it "realized"
06:40andrew__what I don't understand about this code snippet http://pastebin.com/iTY30wD0 is that the 2 (count) calls are separate expressions, so why would one depend on the other as far as retaining a reference to head elements? llasram
06:40llasramBecause they have an evaluation order imposed by the order in which they appear in the code
06:41andrew__but once one of them is evaluated, why would references be held when that expression ends? why does the order of the two count calls affect whether each of them holds onto references to head or not? each one does it count, returns a value, then the next one does the same. why would order matter?
06:42deadghostanyone have a good book for java?
06:42deadghostall this multi component factory talk is freaking me out
06:43deadghosthttp://api.libreoffice.org/examples/examples.html
06:44deadghostI assume if I want to use the api from clojure
06:44deadghostI'd have to understand the java
06:45llasramandrew__: Because the two sequences returned by `split-with` are both lazy sequences which close over references to the original sequence. The "head" sequence is short and fits in memory. Causing it to be realizes, realizes the original sequence up through those number of elements.
06:46llasramUntil it is realized, the "tail" sequence holds on to those "head" elements via it's reference to the original sequence. Because the "head" is small, this is fine
06:47broquaintdeadghost: You mostly need to understand how to call Java from Clojure which isn't too bad if you've got halfway decent API docs.
06:48llasramandrew__: Swapping the order of the calls leads to the un-realized "head" sequence holding its reference to the original sequence, which walking the "tail" portion forces to be fully realized, and thus blow the heap
06:48deadghostbroquaint, I guess I'll try winging it
06:50andrew__llasram ...thinking
06:53pepijndevosHas anyone tried backporting cljs datastructures to Clojure?
06:53hyPiRionpepijndevos: check out Mori by dnolen
06:54hyPiRionwait what, I read wrongly
06:54broquaintGood luck, deadghost :)
06:54hyPiRionI thought you meant implementing Clojure data structures in js
06:54pepijndevosI was going to say...
06:54pepijndevosNo, I want to mess with the ones already in Clojure.
06:55pepijndevosBut messing with Java is no fun
06:55pepijndevosSo I though I could backport the Cljs ones to Clojure instead
06:55hyPiRionSounds interesting
06:56pepijndevosSpecifically, I'm interested in making PersistentTreeMap more like a list, and do stuuf like NavigableMap in Java.
06:57pepijndevosThere is a TreeMap in Java as well, which supports NavgiableMap stuff. But I also want to be able to look up by index.
06:59philandstuffyou could crib ideas from core.rrb-vector and data.avl
06:59andrew__llasram i guess the fundamental source of my confusion is with regards to how references are getting held based on two different function calls. behind the scenes, Clojure must try to optimize by saying "oh, he needs to look at the head of this sequence in the next function call, so I won't throw away any values while I walk this list." is that right?
06:59andrew__Clojure determines how to handle a lazy seq based on just on a sequence function being called (like count), but also based on what other function calls neighbor it
07:00andrew__*based not on just a sequence function (typo above)
07:00pepijndevosphilandstuff, avl doesn;t look bad at all! hmmm
07:03llasramandrew__: Maybe it would help to think of lazy sequences as closures over whatever they need to compute the next element
07:04llasramandrew__: The immediate return values of `split-with` haven't evaluated anything yet, and so both are closures over the original sequence
07:05philandstuffpepijndevos: yeah anything by michalmarczyk is generally worth a peruse
07:05llasramClojure doesn't do anything at the semantic level you're describing -- it just tries to be aggressive about clearing local references which are no longer necessary, and the rest of the resulting behavior follows from GC
07:06pepijndevosphilandstuff, maybe I can persuade him to implement NavigableMap. It provides all the other things I want.
07:07amalloyandrew__: (1) lazy sequences are never realized twice (they are always saved). (2) iterating over a lazy sequence releases references to the walked-over elements. (3) the GC can only collect elements to which there are no pointers. (4) as a necessary result of 1, 2, and 3, if you call an iterating function f on a collection c, and then call another function g on c, then c cannot be GCed during f
07:07llasramandrew__: Anyway, I've got to go, but I hope it becomes clear to you :-)
07:07seangroveWeird. Seems like the body for POST requests to my ring server are not coming in at all, even though I'm sending it through cURL or the browser. Anything obvious to check?
07:07amalloyseangrove: some middleware has already read the body
07:07andrew__llasram perhaps my confusion is that this is a let form, the result of which has nothing to do with specific values inside the sequences, but rather just with their counted size. The let form only needs to know those values for the purpose of counting them and then those values are thrown away, since nothing is getting stored
07:07amalloyand since it's a stateful stream, you can't re-read
07:07seangroveAh, that could be, yeah
07:08andrew__llasram therefore the evaluation of the let form needs to remember head in order to fulfill its task
07:09seangroveamalloy: Yeah, looks like it. I had removed most middleware, just not enough, heh.
07:11andrew__llasram here is another test that suggests I'm understanding this better:
07:12andrew__I can do this fine, because no values are being remembered, only counted items: (count (range 1e8)) -- but, I cannot do this: (def v (split-with #(< % 12) (range 1e8))) followed by (def v (split-with #(< % 12) (range 1e8)))
07:12andrew__llasram that was supposed to say followed by (count (v 1))
07:13andrew__the only difference is that values are remembered in one, not the other. just as in the first let form.
07:20dsrxis there a way to write a 0-arity fn with #() ?
07:20hyPiRionyeah, skip %'s inside them
07:20hyPiRion,(repeatedly 10 #(rand-int 10))
07:20clojurebot(6 1 3 5 7 ...)
07:21dsrxhmm...
07:21dsrxweird. getting a cljs "Invalid arity: 1" error when I use #([]), but not when I use (fn [] [])
07:22hyPiRionthat's because #([]) is (fn [] ([]))
07:22dsrxohh
07:22hyPiRion,'#([])
07:22clojurebot(fn* [] ([]))
07:22dsrxof course
07:24dsrxthanks
07:24hyPiRionnp
07:27seangroveHrm, another oddity. If I add (ring.middleware.json/wrap-json-params) to my ring routes, it causes a 404...
07:28seangroveSeems like ring-middlewares can be pretty tricky to compose
08:13augustlseangrove: I found running middlewares before method/path matching to be a problem..
08:14augustlseangrove: I use a routing lib that wraps the middleware around the individual post-routing FNs so that you don't run into problesm with middlewares that redirects or reads the read-once body
08:21pepijndevosIs there a way to serialize clojure data, maintaining structural sharing?
08:26mdrogalispepijndevos: I wonder if Fressian does that under the hood.
08:26mdrogalisProbably not though.
08:27augustlpepijndevos: as in compose two serialized blobs, or to encode the internal in-memory structural sharing your current mem has?
08:27seriously_randomis map here doing just mod 3? http://pastebin.com/7Bt2DHDY
08:28pepijndevoshmm. I don't know. I just want to avoid exploding memory by serializing and then deserializing map sharing structure.
08:29pepijndevosSo I gues the latter
08:29pepijndevosAlternatively, I could maybe use data.diff to store just the difference and recreate the structural sharing uplon load,
08:30augustlpepijndevos: storing facts/events and deriving the map from that might make sense yeah
08:33arcatanseriously_random: it calculates the nearest integer towards zero that is divisible by 3
08:34seriously_randomarcatan, where can I read more about (map # %?
08:35augustlseriously_random: #(foo %) compiles to (fn [arg1] (foo arg1))
08:36augustlso % is the argument passed to the fn
09:02TEttingerseriously_random: ##(str "compare the output of " (#(+ % %) 5) " and " ((fn [n] (+ n n)) 5) )
09:02lazybot⇒ "compare the output of 10 and 10"
09:02TEttingerseriously_random: ##(str "then, compare the output of " (#(+ %1 %2) 5 7) " and " ((fn [x y] (+ x y)) 5 7) )
09:02lazybot⇒ "then, compare the output of 12 and 12"
09:06pepijndevosWhat is the namespace magic required to look up a function by name and call it?
09:07pepijndevos(like ((lookup "assoc" clojure.core) {} :foo 1)
09:07TEttingerI think it's resolve
09:07TEttinger,(doc resolve)
09:07clojurebot"([sym] [env sym]); same as (ns-resolve *ns* symbol) or (ns-resolve *ns* &env symbol)"
09:08TEttinger,(resolve assoc)
09:08clojurebot#<ClassCastException java.lang.ClassCastException: clojure.core$assoc cannot be cast to clojure.lang.Symbol>
09:08TEttinger,(resolve 'assoc)
09:08clojurebot#'clojure.core/assoc
09:09TEttinger,(resolve (symbol "assoc"))
09:09clojurebot#'clojure.core/assoc
09:09TEttingerthere you go
09:09pepijndevos&(#'clojure.core/assoc {} :a 1) ; is a var callable.. can;t remember
09:09lazybot⇒ {:a 1}
09:10TEttingerhow's your afternoon going, pepijndevos?
09:11pepijndevosgood, getting a database together :D
09:24rurumate_(type (char \newline))
09:24rurumate_,(type (char \newline))
09:24clojurebotjava.lang.Character
09:24rurumate_why can type not tell me if it's a primitive?
09:25teslanickIs anything in Clojure a primitive?
09:25pepijndevosyea
09:25TEttingeryes, contents of arrays
09:25rurumate_I would think so
09:25TEttingerI think type is autoboxing it because there's no class for char that doesn't promote to Character
09:26rurumate_is there something like type which doesn't do autoboxing?
09:27TEttingerI wonder that myself.
09:30pjstadigprimitive types are compile-time types, you can't inspect them at runtime without autoboxing
09:31pjstadigyou know you have them, or not, by looking at the source code
09:31TEttingerso (type x) calls (class x), and that calls a method on Object
09:31pjstadig,(type type)
09:31clojurebotclojure.core$type
09:32pjstadigi believe type (and class?) are functions, so their arguments get boxed when they are called
09:32pjstadigor they desugar into a call to some RT method that take Objects or something
09:33pjstadig~source type
09:33pjstadig~source class
09:36CookedGryphonHey, I'm having an issue with core.async - No implementation of method: :emit-instruction of protocol: #'clojure.core.async.impl.ioc-macros/IEmittableInstruction found for class: clojure.core.async.impl.ioc_macros.Jmp
09:37TEttingerpjstadig, did it send those in a notice?
09:37CookedGryphondoes anyone know what that means?
09:37pjstadigTEttinger: do those not show publically?
09:37pjstadighttp://is.gd/UfrUwQ
09:37TEttingerCookedGryphon, more people should be awake soon, lots of them use async
09:39TEttinger,(type (into-array [(char \newline)]))
09:39clojurebot[Ljava.lang.Character;
09:39TEttingerwow
09:40TEttingeroh, generics can't have primitives, they need to be objets inside
09:40TEttingerso that vector is making it a Character not a char
09:40hyPiRion,(type (into-array Character/TYPE [\newline]))
09:40clojurebot[C
09:41hyPiRionThat's probably what you want
09:41TEttingerno, my goal was to find the type
09:41hyPiRionah, alright
09:41hyPiRionYeah, an Object can't be a primitive
09:41TEttingerCharacter/Type means I know it already, unless I can call that without knowing it?
09:41hyPiRionor the other way around: A primitive can't be an object
09:59rurumate_,(type (aget (into-array Character/TYPE [\newline]) 0))
09:59clojurebotjava.lang.Character
09:59pepijndevosHow do I "apply" the result from clojure.data/diff?
10:01pepijndevosFor added entries I could maybe do (fn recursive-merge [& maps] (apply merge-with recursive-merge maps))
10:24hcumberdaleHi :)
10:25hyPiRionhello
10:25hcumberdaleI'm trying to insert multiple rows like in https://github.com/clojure/java.jdbc "Example Usage" but this does not work if I generate the maps with (map ...) because of the result is a '({ } ... {} )
10:26hcumberdalehow to transform '({} {}) to {} {} ? macro needed?
10:27hyPiRioneither macro or apply
10:27augustlhcumberdale: (apply the-fn (map ..))
10:28hyPiRionyeah, (apply mysql-db :fruit '({} {})) also works
10:29hyPiRion(apply j/insert! mysql-db :fruit '({} {})) I mean
10:29hcumberdaleIllegalArgumentException insert called with columns but no values
10:30hcumberdalesorry missed a (
10:32hcumberdaleworked, thx
10:35hcumberdaleis this also possible for update! ?
10:35hcumberdalemultiple updates with one call?
10:35augustlhcumberdale: "apply" is generic to any function
10:36hcumberdaleI meant the api clojure jdbc
10:36hcumberdalecan't find an example for multiple updates
10:57jjl`_how on earth does midje autotest manage to run my test suite without me even noticing? it's BLAZING fast
11:13kes_Can someone suggest a way to refactor https://gist.github.com/7d063b410e1b4c5bfdd5 ? Seems like that should all be one thing.
11:18broquaintkes_: Wants another function? https://www.refheap.com/22515
11:20augustlkes_: I wouldn't write functions like that. I would maybe have written a get-factor function and then just done the key lookup as needed
11:20augustlkes_: data is an abstraction in and of itself, no need to wrap it even more in a function :)
11:20jjl`_and i just commented another approach on the gist
11:21augustlkes_: so, (:city (factor-by-zipcode zipcode factors-table))
11:21augustljjl`_: not sure what the point is of getter fns :)
11:22jjl`_augustl: likewise, but without seeing more code, i'm not going to tell someone they're wrong :)
11:22augustljjl`_: I like to issue a word of warning when I see someone abstracting data in getter fns and the like, based on personal experience in seeing java devs do that when they learn clojure
11:23jjl`_augustl: i haven't had that experience, but i get it
11:24augustlGet it. Get it?
11:26augustlkes_: fyi, (defn get-factor [factors-table zipcode] (first (filter #(= (:zip %) zipcode) factors-table)))
11:27hcumberdalewhats the best way to re-order a vector for jdbc processing?
11:27augustlhcumberdale: got an example?
11:32kes_augustl: Thanks, sorry for the delay in response. :)
11:34ToBeReplacedhcumberdale: maybe https://github.com/ToBeReplaced/jdbc-format ?
11:35pepijndevos$findfn {:a 1 :b 2 :c 3} :a :b [1 2]
11:35lazybot[]
11:36pepijndevos$findfn {:a 1 :b 2 :c 3} [:a :b] [1 2]
11:36lazybot[clojure.core/mapv clojure.core/map clojure.core/replace clojure.core/pmap clojure.core/keep]
11:37pepijndevosSince assoc can take many keys, I kind of epected there would be a way to get many keys as well.
11:38joegalloThat would be a very easy thing to write, if you want it.
11:39CookedGryphonhi, I think I'm having some bad interactions between core.async and core.match
11:39CookedGryphonNo method in multimethod 'to-source' for dispatch value: class clojure.core.match.OrPattern
11:41CookedGryphonactually, it might be to do with aot compilation, not core.async at all...
11:52CookedGryphondoes anybody have any clues as to what No implementation of method: :emit-instruction of protocol: #'clojure.core.async.impl.ioc-macros/IEmittableInstruction found for class: clojure.core.async.impl.ioc_macros.Jmp means?L
11:52justin_smithsounds like a bug in core.async that an error like that would even show up
11:54justin_smithmaybe an aot / library version mixup? see if stopping clojure, lein clean, restarting helps. That's my first goto when I get errors that don't even make any sense in terms of the code in my app.
11:54CookedGryphoni've done that, no joy
12:16katoxHey, been fighting Om lately but I'm still unclear about some state/props intents. Cut out of app init here: https://www.refheap.com/22520
12:16dnolenkatox: can you be more specific?
12:17dnolenkatox: tried to keep the semantics more/less in line with React
12:17seangrovednolen: Just pushed our first om app to production today
12:17katoxI wanted to init the app with state and put there a chan to of events
12:18katoxso I expected this to belong into state
12:18katoxif I'm not mistaken re-render should occur after a state change
12:18dnolenseangrove: whoa awesome!
12:19dnolenkatox: yes re-render will occur eventually on a state change.
12:19katoxdnolen: the problem is that the definition in the bin is somehow incomplete
12:19tbaldridgeseangrove: "DEPLOY ALL THE ALPHA CODE!!" :-P
12:19arcatan\o/
12:19tbaldridgeseangrove: "DEPLOY ALL THE ALPHA CODE!!" :-P
12:19tbaldridgebleh wrong window, sorry for the report
12:19katoxdnolen: I'm not sure what's missing, the .-props are not yet there
12:19tbaldridge*repost
12:20seangrovetbaldridge: heh, presumably the second time was to fix a bug with the alpha code ;)
12:20tbaldridgelol, nice
12:20arcatanwait, there's a jar on clojars, it can't be alpha
12:20dnolenkatox: the first agument to the life-cycle protocols is *NOT* the owner
12:20dnolenkatox: it's the reify instance
12:20seangroveReact is pretty sound though, it's what we were looking to build towards anyway. Om has some sharp edges and we lost ~1 day to some things, but it's definitely a net +
12:20dnolenkatox: that's why you're code isn't working
12:21katoxdnolen: ah!
12:24CookedGryphonwith core.async, can you recur from the result-expr of at alt! ?
12:28katoxdnolen: so disregarding this bug, is it okay to setup a channel in pre-render will-mount, save it into state and process it pre-render as well
12:28pepijndevosHuh... *ns* is clojure.core in a different namespace.
12:29pepijndevosOr... I guess *ns* is not lexical...
12:29Bronsapepijndevos: it is not indeed.
12:29katoxdnolen: accummulating more changes that'll be reflected on next render
12:29Bronsapepijndevos: (let [cur-ns *ns*] (defn ..)) will do what you want
12:29pepijndevoslol, ok
12:30rurumate_Help, I'm getting java.lang.ClassNotFoundException: clojure.tools.logging.impl.LoggerFactory in all :aot namespaces
12:30rurumate_what seems to be the problem here?
12:30dnolenkatox: seems ok to me, but note if you set-state! before/during IWillUpdate phase, then all phases after it will see it
12:30rurumate_this used to work, just made some changes to dependencies in project.clj
12:31hiredmanrurumate_: delete ./target and try again
12:32jballanccore.logic question...why doesn't this return (1)? (cl/run* [q] (cl/membero 1 '(q 2 3)))
12:33rurumate_jballanc: I dunno, looks like it should
12:33hiredmanbecause 'q is not q
12:33dnolenjballanc: what hiredman said
12:33jballanchuh...but this does? (cl/run* [q] (cl/membero 1 [q 2 3]))
12:33rurumate_oh
12:33jballancd'oh
12:33jballancyeah, ok...guess I need a refill on the coffee
12:33jballanc:P
12:33rurumate_hiredman: it worked, thanks
12:34rurumate_+ hiredman
12:35rurumate_maybe #clojure should get karma points
12:36bbloom(inc #clojure)
12:36lazybot⇒ 7
12:36bbloomdone.
12:37S11001001bbloom: my thought exactly
12:40katoxdnolen: thanks, makes sense
12:40dnolenkatox: yeah we used to pass the owner to life-cycle implementations, but it was tedious
12:41dnolenkatox: in the future Om component constructor fns may stop taking cursors as it's a potential source of confusion
12:41dnolenkatox: instead IRender would take it, and everyone else would need to get it via om/get-props
12:42katoxdnolen: sounds more straightforward
12:42katoxdnolen: the bug above must have crept in when refactoring to a newer version
12:43katoxdnolen: somehow I couldn't find it ;) - parameter blindness
12:43rasmusto,;)
12:43clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
12:43rasmusto,:)
12:43clojurebot#<RuntimeException java.lang.RuntimeException: Invalid token: :>
12:44jballanchmm...ok, another one -- why doesn't this terminate? (cl/run* [q] (cl/membero 2 q) (fd/bounded-listo q 2))
12:46hiredmanwhat do you mean by not terminate?
12:50dnolenjballanc: bounded-listo isn't really relational, it needs to come first
12:51dnolenjballanc: it a simple hack to prevent some basic bad scenarios not a real solution.
12:51dnolenjballanc: perhaps jim duey's Arrow based work can provide more termination but I haven't had time to think about it.
12:52hansel-hanCan anyone that's written an ebook recommend an input format? I'd like to translate my Pages.app book into something compatible with Pandoc.
12:54technomancypeople seem to like asciidoc
12:54technomancythat's what they used for the clojure cookbook
12:55CookedGryphondoes anybody here understand alt!, I've been banging my head on this one line of code all day: https://www.refheap.com/0e98bf67f7a20db53acc85d6f
12:55tbaldrid_technomancy: I think that's mostly because the publisher only allows asciidoc. But rkneufeld would know more.
12:56technomancytbaldrid_: huh. I know cemerick is always singing its praises and bemoaning markdown
12:56technomancywhich is reasonable; markdown is terrible
12:56tbaldrid_CookedGryphon: the event-stream should only have a single argument in the handler (val, not val ch)
12:57CookedGryphonI tried that too iirc, one second I'll try
12:57hiredmanCookedGryphon: you can't recur from a non-tail position
12:57technomancyhansel-han: what's the book?
12:57hansel-hanCookedGryphon: does that code actually work? alt! takes a vector of channels in that form and i don't see how alt! in that example would do anything other than hang indefinitely.
12:57CookedGryphonhansel-han: don't know yet, it's yet to compile
12:58CookedGryphonhansel-han: it's meant to wait until it's able to push to the other loop just above it
12:58hiredmangiven the result of the alt! is let bound, the bodies of the alt! are not in tail position
12:58hansel-hantechnomancy: it's not clojure or dev related. i just imagine that someone here might have some experience. i'm checking out asciidoc.
12:59rkneufeldtechnomancy: hello! We use asciidoc solely because that is what O'Reilly dictated to us.
12:59hansel-hanrkneufeld: if you werent' constrained, would you have another preference?
13:00jballancdnolen: ah, indeed...thanks for the tip!
13:00rkneufeldhansel-han: I like asciidoc for the features it provides, but editor integration is not great, and the tooling is klunky. I *might* try constraining myself to write a shorter book using just Markdown (a la "The Senior Software Engineer"), but that comes with some serious limitations (specifically layout)
13:01jballancdnolen: I'll have to look into Arrows some more
13:01technomancyrkneufeld: is it accurate that asciidoc has most of the features of docbook?
13:02hansel-hanyeah, i couldn't really see an endgame with vanilla markdown in regard to images. someone just recommended http://www.literatureandlatte.com/scrivener.php to me
13:02rkneufeldtechnomancy: I think so, I don't know for certain. I do know that in production O'Reilly staff converts the book to docbook and works with it in that format over asciidoc.
13:02hyPiRionIf I were serious, I'd do LaTeX even for ebooks. Although you should be very comfortable in LaTeX before you go down that road.
13:02hyPiRions/were/was/
13:03technomancywere is actually right for that
13:03rasmustowhat's wrong w/ LaTeX? Most of it is plain text
13:03technomancyfwiw
13:03rkneufeldI think in general, if you're new to the tools and writing, I'd start with simple Markdown and get the content down first.
13:03rasmustounless you're doing tables and eqns and things
13:03rkneufeldA complex toolchain is a surefire way to burn tons of time avoiding the task at hand (writing a book)
13:04hansel-hanrkneufeld: agreed. i made sure to write almost all of the content before i began looking for answers to this question. i know me. i would've let this decision blockade the book for years
13:04technomancywhat you really need to do is invent a sexp-based publishing format and use that
13:05hansel-hantechnomancy: it took a lot of effort to not yak shave down that path when i was trying to write chapter 1!
13:06technomancyprotip: you can use the Computer Modern font without using LaTex and everyone will still think you used LaTex so you look smart
13:06rkneufeldtechnomancy: Ha!
13:07bitemyapptechnomancy: spent an hour yesterday poring over neighborhoods in Seattle with a native from the city. She was another strong vote in favor of the PNW.
13:07S11001001technomancy: I enjoy texinfo, which gives cmr output by default
13:08rasmustos/poring/pouring amirite? (pnw joke)
13:08hansel-hanCookedGryphon: what's your intention with `[[predict-data event-history]] (recur [])`?
13:08bitemyapprasmusto: it doesn't rain on the west coast, it drizzles and mists.
13:08rasmustobitemyapp: we call it rain though
13:08bitemyapprasmusto: I'm from Ohio, there is no rain here, just mild sneezes.
13:08hiredmanwhy would you not want to use latex?
13:08bitemyappin Ohio, rain means you'd get soaked in 30 seconds.
13:09bitemyapprasmusto: I just find the moaning about the rain silly given how flaccid it is :P
13:09bitemyappa light mist is refreshing :)
13:09CookedGryphonhansel-han: I want to accumulate events, while the long running prediction function is running, and then when that loop is in a position to accept new data, push it there
13:09rasmustofor sure, especially at the coast
13:09bitemyapprasmusto: where are you in the PNW?
13:09CookedGryphonand process all the events it received in the meantime
13:09rasmustobitemyapp: portland
13:09technomancybitemyapp: nice; hope it works out
13:10bitemyapprasmusto: cool. Paying Seattle a visit sometime in the next month or two.
13:10rasmustosweet
13:10dnolena pretty significant CLJS enhancement, http://dev.clojure.org/jira/browse/CLJS-615, if someone wants to apply and test that would be awesome
13:10bitemyapptechnomancy: I was initially put off by how expensive Seattle was compared to Austin, but after running the numbers, I don't think it makes nearly as much of a difference as simply leaving the bay area will.
13:11technomancybitemyapp: especially if you want to be outside the city
13:11dnolenalso namespaced keyword destructuring appears likely for 1.6, would be nice to get this in CLJS http://dev.clojure.org/jira/browse/CLJS-745
13:11dnolenif it happens
13:12hiredmanCookedGryphon: have you considered a buffered channel?
13:12bitemyapptechnomancy: eventually. I'll probably live around capitol hill initially. I won't move out of the city until I'm ready to get a house - want to soak up the area until then.
13:12CookedGryphonhiredman: yep, I don't think that'll give the behaviour I want though
13:12CookedGryphonI want predict to be doing as much work as it can
13:13CookedGryphonwithout blocking new events
13:14CookedGryphonI don't really know how many events to consume with a buffered channel
13:14CookedGryphonbefore I set predict off
13:14CookedGryphonas i want to batch as many events as I can, without waiting for idle time or anything like that
13:16gdevdnolen, where do I send the results of my test runs?
13:16dnolengdev: ?
13:16arrdemwhelp hackernews is still screwed... guess I'm gonna have a productive day.
13:17gdevdnolen, or did you just mean test it out for ourselves?
13:17kzararrdem: It's been screwed all day uk time :(
13:17kzar(Interestingly it was displaying a cloudfare error for a while, didn't realise they were using that.)
13:17dnolengdev: apply the patch, run script/build, try the installed CLJS in an existing project
13:17arrdemkzar: US-CENTRAL here, it's been down since about 2000HRS yesterday
13:17dnolengdev: if everything works ok please say so on the ticket
13:18TimMcThere's a lot of tech fail today. Anything systemic?
13:18dnolengdev: the patch need to be reviewed, but it's helpful to know it doesn't break everything before especially for a large patch like this
13:18kzarTimMc: Everyone's hungover post christmas?
13:19TimMcPlausible.
13:19gdevdnolen, okay will do, sorry I forgot that I had a username on jira
13:19arrdemkzar: it's been more than a week man... nobody should be hung over that long
13:19rasmustoarrdem: you forget new years eve
13:19kzarmy old housemates are probably still drunk now
13:20bitemyappkzar: russian?
13:20rasmustoarrdem: oshi, it has been a week though ;o
13:20arrdemI mean I'm on vacation and still drinking, but that's not the point :P
13:20TimMcarrdem: I would ascribe it more to post-vacation knowledge loss.
13:20bitemyapparrdem: you're still on vacation?!
13:20kzarheh
13:20TimMc"What's this button do again? Let's find out."
13:20arrdembitemyapp: yeah. school resumes the 13th
13:21kzarbitemyapp: I got them some north korean rice (whiskey?) recently and they didn't waste any time
13:21bitemyappkzar: I was right, wasn't I?
13:22kzarNo, they're English / Welsh but they can drink
13:22bitemyappoh that'll do it.
13:22TimMcI believe that conforms to stereotype as well.
13:27stuartsierraPeter Seibel invented his own markup format for "Practical Common Lisp"
13:28bitemyappstuartsierra: are you our new "#catfacts!" person?
13:28bitemyappstuartsierra: also, done any Haskell? I'm tinkering with module parameterization there.
13:28stuartsierraReferencing earlier discussion with hansel-han.
13:29stuartsierrabitemyapp: No, I have not used Haskell.
13:29bitemyappstuartsierra: well that explains why you use Clojure I guess. Thanks anyway.
13:30xnilthat's insulting
13:30bvecchiI recommend Pandoc for anything Markdown related. It can output epub among other formats.
13:30bitemyappxnil: not really. Clojure's quite nice.
13:31Cr8I use pandoc mostly because I type in "regular" markdown, but occasionally use tools that expect "github" markdown
13:31xnili'm not offended :P
13:31xnili don't even use clojure, i'm just here because it's a lisp
13:31Cr8and pandoc can translate for me
13:32Cr8though usually if I can choose I render w/ multimarkdown
13:32Cr8"a lisp"
13:32bitemyappxnil: have you used Shen? I've been trying to find somebody that's actually tried it.
13:32logic_progbitemyapp: I bought the shen book
13:33logic_progI also read a few chapters.
13:33hyPiRionbitemyapp: have you? I'm sort of tempted to.
13:33xnilbitemyapp: i'm having a look at it
13:33llasramIf only the license weren't so insane...
13:33logic_progoverall impression: many nice ideas, but the cllojure port doesn't seem stable enough to do anything with it
13:34technomancyI'd be surprised if anyone invested a lot in shen with a license like that
13:34bitemyapphyPiRion: I'm only curious enough to inquire, the type system isn't good enough to be worth personally investigating.
13:34bitemyapphyPiRion: if you want types, FP, and to live in the future...
13:34hyPiRionoh man, license
13:34hyPiRion=(
13:34xnilbitemyapp: i've only used clojure/scheme/racket/CL/elisp myself
13:35bitemyapparrdem: Racket is kinda nice for implementing programming languages.
13:35xnilracket and scheme being the only ones i have any decent experience in
13:45TimMcOK, I just looked through the Shen spec. What's so horrible about it?
13:45hyPiRionTimMc: the nonfree license?
13:45arrdemhyPiRion: agreed.
13:46TimMcI mean in practical terms.
13:46arrdemTimMc: Shen is really cute, but the license is assinine and disuades me from using it at all
13:46hyPiRionIsn't the license a practical issue? :p
13:46TimMcLike, what's a practical scenario where this becomes a problem?
13:47arrdemTimMc: I don't see that I need one. I object to not being able to hack on the language core if I want to, and thus choose not to use Mark's latest creation elegant as it may be.
13:47xnilwhen you try to distribute your software, TimMc
13:47arrdemxnil: no read the license. you can use shen inside another project, you just can't change shen at all ever.
13:47arrdemxnil: it's a read but don't touch "open" license
13:48xniloi
13:48bitemyapparrdem: it's actually impressive that somebody found a way to be more obnoxious than Clojure's CA.
13:48xnilhow morbid
13:48bitemyappalmost like it was competition among Lispers to see who could attract the fewest contributors.
13:48arrdembitemyapp: eh... I think the CA is entirely reasonable but w/e
13:48bitemyappas if that was ever a problem for a Lisp, too many contributors.
13:48technomancyhe's got a bit of a chip on his shoulder because he wasn't able to make a living with OSS and thinks he can blame that on the license
13:49bitemyapparrdem: taken in isolation, yes, but seeing other lang communities are run, I'm not seeing it.
13:49bitemyapptechnomancy: need to have a knack for sales, marketing, and drumming up contract work if you want to make a living off OSS.
13:49arrdembitemyapp: shrug. legal isolation is kina the first thing that I'd worry about in this case.
13:49hyPiRionThe problem isn't really the CA itself, it is the "Please send a printed version with your signature"-issue
13:49bitemyapparrdem: that's not what I said.
13:50arrdem0.o
13:50TimMcarrdem: So if you wanted to use Shen as one component of a redistributable larger project, you couldn't tweak your copy of Shen?
13:50technomancythe CA is just emblematic of deeper-seated "we're not interested in your help" issues
13:50bitemyapparrdem: what I said meant, "if you analyze it isolated from all counter-examples seems okay"
13:50arrdemTimMc: that's my understanding yes
13:50TimMcHuh. That *is* weird.
13:50arrdemexactly.
13:50TimMcI guess I'm not too bothered by that, though.
13:51TimMcHow many people ship an altered version of Clojure?
13:51bitemyapptechnomancy: it's particularly offensive how it locks out people from countries with less than reliable/practical mail delivery.
13:51arrdemMark actually has an essay somewhere in which he defends this model...
13:51xnilbitemyapp: CA?
13:51hyPiRionTimMc: I do all time, sort of
13:51bitemyapptl;dr I want somebody else to sacrifice their time so I can hear about Shen.
13:51arrdemxnil: Contributor Agreement
13:51technomancyTimMc: it was really common in the pre-1.2 days
13:51TimMcI can see doing that for an internal project, of course, but who'd do that with a redistributable?
13:51hyPiRionI use cl-format and there's this bug
13:51technomancywe patched it to fix locas-clearing bugs
13:51bbloom*shrug* it would be nice to have an electronic CA, but sheesh people, it literally takes ~120 seconds and a stamp to submit. Given the amount of time invested in a quality patch, a physical CA is such a silly thing to complain about
13:52arrdembbloom: haha. took me an hour, but only because I included a letter with it :P
13:52TimMcbbloom: I don't have a printer. Some people don't live in the US. I want to contribute *now*.
13:52TimMc^ Three main reasons.
13:53arrdemTimMc: so sign the bloody thing, photograph it, email it to me and I'll mail it for you
13:53TimMcheh
13:53TimMcDoes that pass the lawyer test?
13:53technomancyjust bribe someone with a CA to submit it under their own name
13:53technomancyproblem solved
13:54hyPiRionbbloom: I had to buy an envelope, figure out how many stamps for overseas mail, buy said stamps, then do those steps you mentioned. Also wait 2 weeks.
13:54hyPiRionIt's not really about time though, it's about lowering the barrier
13:55bbloomTimMc: i don't know how any modern geek survives without a printer. i hate printing shit and avoid it often, but sometimes you gotta friggin do paperwork here on planet earth. the non-US thing is the only real issue for some folks, and even that it's not a big issue. the contribute "now" thing is silly because your patch isn't even going to get looked at for weeks/months, so why the rush?
13:55TimMcbbloom: Most patches aren't all that complicated. You want to lower the barrier for simple, initial participation so that the same people can then go on to submit bigger and better patches later.
13:55TimMcbbloom: Because I don't want to spend time/effort on a patch until I know it will matter.
13:56technomancyI only got a printer recently when we started homeschooling
13:56technomancyeveryone reasonable accepts things signed on a tablet
13:56bbloomTimMc: so email the list & ask if such a patch would be considered/accepted
13:56TimMcbbloom: It's all fine and dandy that this isn't a barrier for you, but I think you should listen when other people say it's a barrier for them.
13:56pmonks+1 - DocuSign etc. aren't that hard to use...
13:57bbloomTimMc: i understand it's a barrier for some folks & think it's silly it hasn't been addressed yet, but everybody acts like it's the end of the world
13:57pjstadigyay! The semi-whatever CA rant
13:57TimMc*shrug* It is part of why I have given up on contributing to Clojure.
13:58TimMcpjstadig: Monthly, I think.
13:58bbloomTimMc: my view on this changed when i started getting a few PR from folks on some github projects
13:58bbloomreviewing a patch is A FUCKLOAD OF WORK
14:00bbloomit's a crappy filter, but if the activation energy of buying some stamps is too high, then i'm probably not interested in your contributions. at this point, there are enough contributors & users that major issues will be fixed immediately if discovered & anything else is not in any rush what so ever
14:00bbloomthere are clearly much better filters
14:00bbloomand i'd prefer clojure used a better filter :-P
14:01TimMcThe larger issue is the general hostility towards patches.
14:01bbloomso that's the much more interesting topic, IMHO
14:02bbloomlike i said: patches are a lot of work
14:02TimMcSometimes I think Core's preference is to remain bug-compatible instead of fixing bugs. And that way lies Win32.
14:03bbloomeh, Win32 only happens when you keep moving forward at 200MPH and maintain bug compatibility. clojure is moving much much much much slower than windows ever did
14:03mdrogalisbbloom: I'm reading this conversations backwards for funsies, but for non-Americans, the price to get a CA is extraordinarily high.
14:04mdrogalisSomething on the order of $300 for some places in EU.
14:04bbloom$300 to mail a letter to the US!?
14:04hyPiRionmdrogalis: @_@
14:04bbloomi don't believe that
14:04mdrogalisYeah, I was stunned too. Let me find the tweet chain.
14:05mdrogalishttps://twitter.com/michaelklishin/status/398168946194780161
14:05mdrogalis$153. Kinda of off, but not totally.
14:06bbloomi still don't believe this
14:06koreth__You don't have to use FedEx. Regular mail is not $153 even from Russia.
14:06mdrogaliskoreth__: I assume you signed it from Russia?
14:06bbloomyeah, seriously
14:07koreth__No, but I have been to Russia and sent stuff from there to the USA for less than that.
14:07bbloompeople send postcards from all over the world for a buck or two each
14:07mdrogalisI kind of sway back and forth on this topic because I never know how much it *actually* costs. I never tried to mail something internationally.
14:07arrdemI wonder if a CA microdotted onto a postcard would count...
14:08arrdemmdrogalis: lived in the UK for three years, international mail gets silly fast
14:08bbloommdrogalis: USPS for a letter form US to Russia is $1.10
14:08bbloommdrogalis: i dunno about the other way
14:08bbloomi can't imagine it's dramatically more
14:08mdrogalisPerhaps someone should tell Klishin that.
14:08pjstadigi think the reason that people might use FedEx is because otherwise you don't get reliable delivery or something
14:09mdrogalisAh
14:09technomancysend ten copies of a CA using cheap mail
14:09mdrogalisFlooded Durham
14:09technomancythat's totally not ridiculous, yeap
14:09bbloomtechnomancy: lol was literally going to suggest TCP mailing
14:11katoxdnolen: I just caught myself in the bug you mentioned
14:11dnolenkatox: yes, props will only be what you think it is in render, it could be something different elsewhere
14:12katoxdnolen: created (om/build component app-state opts) and defined component as (fn [app opts])
14:12katoxdnolen: the arity checker is fine with that but it is super easy to slip this in
14:14dnolenkatox: oh that's different problem really, Om might get more runtime validation during development to catch simple errors
14:15koreth__To beat a dead horse, I was curious and went to the Russian post office's web site. The cost to mail a *registered* letter via air mail to the USA is the equivalent of US$2.50. http://www.russianpost.ru/autotarif/Autotarif.aspx?viewPost=13&amp;countryCode=840&amp;typePost=2&amp;viewPostName=Registered%20letter&amp;countryCodeName=USA&amp;typePostName=AVIATION&amp;weight=5&amp;value1=1&amp;postOfficeId=0
14:16bbloomkoreth__: well there you have it :-)
14:16katoxdnolen: yeah, I should have written similar not the same
14:16bbloommdrogalis: you're in charge of telling Klishin
14:16pmonksWriting and contributing patches can be hard work. Reviewing patches can be (usually is) hard work. There's enough hard work in the contribution process already that it seems rather silly to add more incidental effort by requiring CAs in dead tree format.
14:17katoxdnolen: the cause the var/param containing something different than one'd expect
14:17technomancypmonks: well if you drive people away, there's less work for you as amaintainer
14:17pmonksAre you really a maintainer then?
14:17mdrogalisbbloom: *Huge sigh* I have to *do* something?
14:17TimMcbbloom: I assume the guy knows what he's doing re: mail.
14:17mdrogalisKnew I should have just lurked.
14:18pjstadigpmonks: sure, you maintain status quo
14:18technomancypmonks: no comment
14:18bbloomTimMc: apparently not
14:18pmonks:-D
14:18tbaldrid_bbloom: technomancy: while we're on the subject of OSS community structure I found this talk interesting: http://vimeo.com/82175816
14:18TimMcbbloom: I remember this conversation. He specifically said that regular mail was just not reliable enough.
14:19tbaldrid_it's basically a 40min talk about distributed "lock-free" teams of people maintaining code via github.
14:19bbloomTimMc: i'm skeptical
14:19pmonksI'll shut up now - I'm too dumb to ever be likely to contribute to Clojure (though both maintain and contribute to other OSS).
14:19TimMcI mean, he lives in Russia, I don't. It seems silly to me, but I don't have enough information.
14:19pjstadig"YOUR PERSONAL EXPERIENCE IS INVALID!"
14:19insamniac,(partition 2 '(+ 4 * 3 - 7))
14:19clojurebot((+ 4) (* 3) (- 7))
14:20insamniac,(-> 2 (+ 4) (* 3) (- 7))
14:20clojurebot11
14:20insamniacbut how do i make this do that:
14:20insamniac,(-> 2 (partition 2 '(+ 4 * 3 - 7)))
14:20clojurebot((+ 4) (* 3) (- 7))
14:20insamniac:(
14:21mdrogalisAlright, I told him.
14:21mdrogalisNow we wait.
14:21bbloomTimMc: my GF is a flight attendant. her nephew in Tennessee had a class project to get postcards from family members. the nephew won by a landslide b/c she sent post cards from all over the world. i just texted her, she said she sent a postcard from saint petersburg for a few bucks & it got there in about a week
14:21TimMcinsamniac: What is the intended result there?
14:21insamniaci want to thread 2 through the results of the partition
14:21insamniacinstead of threading it into the form that starts with partition
14:21mdrogalisReply: https://twitter.com/michaelklishin/status/420273418433740800
14:21TimMcbbloom: The two complaints were latency and reliability.
14:22TimMc(and the variability of that latency)
14:22TEttinger,(map #(-> 2 %) (partition 2 '(+ 4 * 3 - 7)))
14:22clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to clojure.lang.IFn>
14:22insamniaczoinks
14:22bbloomTimMc: ok, so cost is not a significant barrier. latency for a postcard was about a week, but yes, can vary to many weeks, and i just don't believe that reliability is that big an issue
14:23TimMcMy point isn't that you *can't* get a letter from point A to point B, it's that telling someone they may have to wait up to 3 month and send 10 copies is not particularly friendly.
14:23TEttinger,(map (fn [[f arg]] (f 2 arg)) (partition 2 '(+ 4 * 3 - 7)))
14:23clojurebot(4 3 7)
14:23bbloomi'm saying that it's more like up to 6 weeks and it's not 10 copies, it's 1.02 on average
14:23TimMcinsamniac: -> is a macro, it's modifying the call to partition
14:24TimMc##(macroexpand-1 `(-> 2 (partition 2 '(+ 4 * 3 - 7))))
14:24lazybot⇒ (clojure.core/partition 2 2 (quote (clojure.core/+ 4 clojure.core/* 3 clojure.core/- 7)))
14:24bbloomTimMc: and if you'll recall what i said at the beginning, i agree that the CA should be electronic & that the international complain is the only legitimate one
14:24TimMcOK.
14:24bbloomcomplaint*
14:25mdrogalisbbloom: Klishin says he's gonna beat you
14:25mdrogalis.. That didn't actually happen
14:25TEttinger,(map (fn [[f arg]] (f 2 arg)) (partition 2 [+ 4 * 3 - 7]))
14:25clojurebot(6 6 -5)
14:25insamniacyeah, so instead i want to use the macro to thread the value 2 through the result of partition
14:25insamniac,(-> 2 (+ 4) (* 3) (- 7))
14:25TEttingerok, the problem was it remained quoted
14:25clojurebot11
14:25insamniacis there a pretty way to do that?
14:25pjstadiginsamniac: right, but the result of partition isn't available until runtime, and macros happen at compile time
14:25TEttingeroh you want reduce
14:26TEttinger,(reduce (fn [base [f arg]] (f base arg)) 2 (partition 2 [+ 4 * 3 - 7]))
14:26clojurebot11
14:27TimMcinsamniac: (-> FOO (partition BAR BAZ)) is (partition FOO BAR BAZ)
14:27insamniacthere we go
14:27insamniacthanks
14:27TEttingerno prob
14:31TEttingeroh, insamniac, I don't think it will work on a quoted list. a list may need to be converted to vector first
14:31TEttinger,(reduce (fn [base [f arg]] (f base arg)) 2 (partition 2 '(+ 4 * 3 - 7)))
14:31clojurebot7
14:31TEttingeryeah, just the last element in the list
14:32pjstadigwith a vector + * and - are actually evaluated to vars, which can be called to invoke their functions
14:32pjstadigwith a quoted list you are calling the symbol '+ or '* or '- which will return its second argument because the first isn't a map (i think)
14:33pjstadig,(+ 2 7)
14:33clojurebot9
14:33pjstadig,('+ 2 7)
14:33clojurebot7
14:33pjstadig,('+ {'+ :foo} 7)
14:33clojurebot:foo
14:33TEttingerI'm actually not sure how to unquote in clojure, I almost never use quotes
14:33pjstadig,((eval '+) 2 7)
14:33clojurebot9
14:33pjstadigTEttinger: eval
14:33xnil,`(,+ 2 7)
14:33clojurebot(clojure.core/+ 2 7)
14:34pjstadigor you could resolve-var
14:34TEttingeryeah, that's why I guess. my lazybot forbids eval
14:34clojurebotTitim gan éirí ort.
14:34xnilor quasiquote.
14:34justin_smith,(resolve '+)
14:34clojurebot#'clojure.core/+
14:34technomancy,(doc resolve-var)
14:34clojurebotexcusez-moi
14:34llasramxnil: Your common lisp is showing :-)
14:34pjstadigfine...resolve then
14:34llasram,`(~+ 1 2)
14:34clojurebot(#<core$_PLUS_ clojure.core$_PLUS_@cf767d> 1 2)
14:34llasramBut you never see that in practice
14:35technomancypjstadig: I thought it was something I didn't know about, heh
14:35xnillol
14:35justin_smithresolve is probably the most lightweight / idiomatic way to go from symbol to fn via var
14:35justin_smith,((resolve '+) 1 2)
14:35clojurebot3
14:35TimMcNonsense, what you *really* want to do is spit to disk with some wrappings and then load-file.
14:35TimMcClearly superior.
14:35justin_smithheh
14:36pjstadigor just write a compiler
14:40dhkl#node
15:07gtrakis there an overview of om-cursors and the 'build' fn anywhere yet? trying to figure out how that works :-).
15:10nooniani've just started with om, but my understanding is you call build passing a component, a cursor to be passed to that component, and a map, and anything you put in a map for the :opts key in that map will be passed to the component as a third argument
15:11noonianthe cursor is your app's state, but it also has info about the path from the root of that state, you can treat it like a map inside your components
15:13noonianso if your state is (atom {:m {:foo 17}}) and passed to your root component as 'app', then if you passed a sub-component (:m app) it would get a cursor that acts like {:foo 17} but you update it using om/transact! or om/update! and it can be passed as a cursor to other components
15:14gtrakhmm, the cursor is the state, then?
15:14gtrakright, there's the get-props function to get it back out
15:15gtrakerr, hmm. get-state returns __om_state, get props is __om_cursor
15:15clojurebotYou don't have to tell me twice.
15:16gtrakit doesn't seem like om-cursor contains state that we're supposed to rely on
15:16gtrakbut rather framework bookkeeping
15:17noonianuh, it depends on which state you want
15:17noonianget-state returns the state of the component, which I haven't been using really
15:18noonianthe cursor is the state of your app at any given moment with info about how to get to it's position relative to the root app's state
15:20noonianyou could modify the simple example on the github page like this to see an example of using the data in the cursor: https://www.refheap.com/22526
15:21noonianif you wanted the data to change you would wrap it in an atom
15:22gtrakah, so that map {:name "Jim"} get merged in with whatever it takes to be a cursor.
15:22noonianbut still treat the cursor like a map
15:22noonianright, it will be a cursor when the component gets it, but you can read from it like a normal map
15:22gtraksince you never actually call to-cursor yourself
15:22gtrakI see..
15:22nooniani don't think so
15:23gtrakso, when the examples use 'build', they're passing along the cursor that's passed into the top-level component
15:23noonianif you used (atom {:name "Jim"}) and you wanted to update it in the component you could do (om/update! data assoc :name "Bob")
15:23noonianright
15:23gtrakthat makes more sense :-)
15:24noonianin the todo example he passes sub-trees of the top-level state, but you can still use update! on it and things because as a cursor it knows how to find that sub-tree in the root state
15:24noonianthis is totally just my understanding btw and I might be off on a few points
15:25gtrakyea, np, pre-alpha, at our own risk and all that :-).
15:25fredyrnoonian: just a small thing, in your update example
15:25fredyrnoonian: you need to specify the path
15:26fredyr(om/update! data [] assoc :name "bob")
15:26nooniani don't think update! expects the path, isn't that for om/transact! ?
15:27fredyrwell, it did at least
15:27fredyri might have changed since
15:28dnolennoonian: both use cursor path information, it's just that transact! can take additional path information
15:29dnolengtrak: cursors are just wrappers around CLJS collections that tracks path information
15:29dnolengtrak: kind of like a weak form of zippers
15:29noonianright, update! just uses the path of the cursor you give it and gives the data at that cursor's path to your update fn
15:30dnolengtrak: cursors also represent a kind of weak policy, because applications will be concurrent you can't manipulate cursors outside of the render phase, you can only use them to update app state.
15:31gtrakwhat's it mean to manipulate a cursor?
15:31dnolengtrak: any operation at all beyond updating the app state
15:31dnolengtrak: printing, collection operations, all invalid
15:32gtraksay, re-rooting a component?
15:32gtrakin the dom?
15:32gtrakjust trying to think of a use-case
15:32dnolengtrak: there's no such thing in React as re-rooting
15:33dnolengtrak: you will destroy something in one location in the DOM and just recreate it somewhere else.
15:35bbloomwhich is not ideal, but probably not a problem in practice unless your app is 100% focused on drag/drop of excessively complex components :-)
15:38dnolenthis is a pretty awesome write up on Om which pretty much "gets it" http://adamsolove.com/js/2014/01/06/om-experience-report.html
15:39gtrakah, great
15:41bbloomnice
15:43noonianthanks
15:44bbloomdnolen: heh i like this line in the conceptual overview: "While it may not seem so at first, it's useful to preserve something like React's component local state for two reasons"
15:44bbloom:-P
15:45avshalomis there the equivalent of (progn ...) in clojure? I noticed this in emacs lisp, but haven't seen it in clojure
15:45bbloomavshalom: do
15:45bbloomavshalom: many constructs have implicit dos however, like fn and let bodies
15:45avshalombbloom: ah, thank you
15:45gfredericksbbloom: holy smokes you're right (about removing cons from ISeq)
15:46dnolenbbloom: heh yeah I totally didn't get what you were saying before, totally get it now
15:46gfredericksI would've bet upwards of five imperial dollars that wouldn't have compiled
15:46dnolenbbloom: React's setState decoupled from rendering is a rock solid idea
15:46dnolenbbloom: always being able to detect state transitions is *rocking*
15:47jergasondo i need to declare functions before I can use them?
15:47jergasonor does that all get worked out at compile time?
15:47bbloomjergason: generally, declare before use
15:47bbloomjergason: there is a "declare" function for late binding, but it's recommended that you only use it for mutual recursion
15:48jergasonman im coming from LOOSY GOOSY javascript where everything gets hoisted for you
15:48bbloomdnolen: i'm really enjoying the evolution of your thinking on this b/c it's a deep lesson in how two super smart people in the same field can just talk right past each other :-)
15:48jergasonand then running stuff in the repl convinces me it is all in scope at the same time
15:50bbloomjergason: yeah, can be misleading that way. sometimes i restart my repl just to make sure i got my declaration order right. i know that dnolen just slaps some extra declare statements in there & patches it up later, which is also a totally valid approach
15:50logic_progdnolen: one of the main thesis of facebook react is "dom updates are expensive, so let's batch them together, opengl-rendering-style, in a requestAnimationFrame" to reduce # of re-flows
15:50logic_progdnolen: is this logic still true if I only manipulate svg nodes, and no css/html nodes?
15:50bbloomlogic_prog: yes
15:50logic_progdnolen: i.e. my entire webpage is just one gigantic SVG element
15:50dnolenlogic_prog: yes they are still in the DOM
15:50logic_progbbloom: why? why would an svg element trigger a reflow
15:50jergasonlogic_prog: when you say it like that it is weird that more people aren't doing this
15:50bbloomlogic_prog: reflows are probably the biggest issue, but not the only one
15:51schaeferre Om/React - is there a way to incorporate third-party (non-react) JS widgets?
15:51bbloomlogic_prog: consider styles too. anything that gets computed by flowing data through dom relationships must be computed on read
15:51gfredericksbbloom: so I think removing it prevents programs such as: ISeq x = PersistentList.EMPTY; ISeq y = x.cons(42);
15:51logic_progjergason: yeah, at some point I was like css: absolute, static, relative -- this shit sucks. I just want to say "you, go put yousefl at 50,50
15:51gfredericksapparently clojure's java source just doesn't ever do that
15:51dnolenschaefer: I think integrating React components is simple
15:51bbloomschaefer: yes, see the "refs" in the react docs
15:51bbloomschaefer: http://facebook.github.io/react/docs/working-with-the-browser.html
15:52dnolenschaefer: any solution for doing that in React probably valid for Om too.
15:52logic_progbbloom, dnolen: noted, thanks for clarifications
15:52gtrakdnolen: I can almost make something useful after ~1 hour of looking at it, so it's not *that* bad :-). I did some game programming in school, it feels like the update/render loops of a scene-graph. One of the exercises we had to do was to make update and render run in separate threads.
15:52bbloomgfredericks: something like that :-)
15:52gtrakbut that was C#.. clojure's way better at this :-)
15:52seangroveI think it might be good to give a talk at the first SF cljs meetup on Om
15:52seangroveSeems fitting
15:53schaeferbbloom dnolen : thanks! i'm primarily a server-side guy building a UI (almost) for the first time. i'm familiar with JS frameworks like Vaadin and RAP but I don't really understand their underpinnings
15:54bbloomdnolen: adam's comment about FRP/Rx dataflows rings so true to me
15:54dnolenbbloom: 100% agree
15:54bbloomdnolen: "yeah, it looks nice now. but you played compiler in your head, manually represented a dataflow... then changed some shit & need to recompile manually too!"
16:16kschraderdnolen: Any talks scheduled in NYC about Om?
16:17dnolenkschrader: yes I think when it's a bit more fully baked
16:17kschradercool, will watch my giant flood of Meetup emails for something
16:18petehuntseangrove: if there's an sf om meetup i'd be happy to represent team react
16:26tommoi'm using clojure as a scripting language for my game and i'm trying to load a clojure class at runtime
16:26tommobut when i try to instantiate it with newinstance
16:26tommoi get this exception: Caused by: java.io.FileNotFoundException: Could not locate cljscript__init.class or cljscript.clj on classpath
16:26tommothe compiler doesn't seemto be outputting a __init suffix on any of the output classes
16:27technomancytommo: are you using gen-class?
16:27tommoactually scratch that apparently it does
16:27tommoi see it right here, and yes
16:27tommoso it literally just isnt on the classpath for some weird reason then...
16:27gtraktommo: seems like you should use the clojure runtime itself to require and load namespaces, any reason why not?
16:28tommosimply because i already had a scripting api which used java and loaded scripts from classes so i thought it would be a simple impl
16:28tommoso i should go for that instead gtrak ?
16:28gtrakyea
16:29gtrakyou don't want to be subject to load-order issues
16:29tommothanks
16:30gtrakhere's an example: http://en.wikibooks.org/wiki/Clojure_Programming/Tutorials_and_Tips#Invoking_Clojure_from_Java
16:30gtrak1.6 (not released yet) has a new api for this though
16:31tommocool, will keep my eyes open
16:31gtrakmight be informative: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/api/API.java
16:32gtrakoh huh, I thought that had more in it
16:38stuartsierraThe Java API is new in Clojure 1.6.
16:39stuartsierraoh, someone already said that. nevermind.
16:46gfrederickssomehow it wouldn't have even ocurred to me to try to fix that problem; but now that clojure.api exists it seems obvious that it had to be fixed :)
16:47stuartsierraThe "unofficial" API has always been RT.var and Var.invoke.
16:47gfrederickswhich made sense to me since I understand what vars are
16:49gfredericksbut anybody who doesn't has to conclude that calling clojure from java is hard/weird
16:50gfrederickswait it didn't actually get any easier did it?
16:51hiredman*shrug* it still is an ffi, clojure is not java
16:53gfredericksI think it was just the fact that it takes two calls to call something; but I guess one call would be a perf antipattern
16:53tbaldrid_gfredericks: two callse?
16:53tbaldrid_*calls?
16:53gfrederickstbaldrid_: one to look up the var, the other to call it
16:54bbloomthe var lookup is static at compile time in clojure
16:54hiredmangfredericks: but the lookup should be in a static init anyway
16:54tbaldridgegfredericks: right, the correct way is to look up the var once, and cache it, then call it whenever needed
16:54akhudekis there a better way to build specialized namespaces than https://github.com/Prismatic/hiphip/blob/master/src/hiphip/double.clj ?
16:54gfrederickstbaldridge: bbloom: hiredman: yep that's what I meant by "perf antipattern"
16:54bbloomakhudek: hiredman surely has a macro for you :-)
16:54hiredmanhttp://dev.clojure.org/jira/browse/CLJ-1188 http://dev.clojure.org/display/design/Improvements+to+interop+from+Java
16:56hiredmanakhudek: I took a pass at changing how hiphip does it https://github.com/hiredman/hiphip/blob/foo/src/hiphip/impl.clj
16:56hiredmanthe macro isn't very generic and could be better
16:56tbaldridgegfredericks: at any rate, it's better than it would be in something like Python. There you'd have to lookup the fn from the module every time you want to call it, that is if you want it to respond to redefs. That's something I see as a major plus in Clojure. Vars are first class, not a entry in a hashmap.
16:57hiredmanpart of the complication is due to the reader qualifying symbols based on *ns* at read time and resolving classes that way to
16:57hiredmanvars are super!
16:57gfrederickstbaldridge: that's an interesting point
16:59akhudekhiredman: is there an advantage to doing it this way?
17:00stuartsierratbaldridge: Yeah, hadn't thought of it that way. There's a performance cost to deref'ing the Var, but that's better than a hash lookup.
17:00hiredmanakhudek: way less gross in my opion than the read-string thing
17:02bbloomstuartsierra: yup, it's just an extra pointer indirection, which the JVM chews through like nobody's business
17:03hiredmananother alternative might be some using load or load-file directly, which would make the existing approach more palatable to me
17:03akhudekhiredman: what are the issues with the load-string approach?
17:04hiredmanakhudek: the macro approach in generally will play nicer with clojure's compilation model
17:05hiredmanwith the macro approach once the code has been compiled you don't need the compiler any more, with load-string you need the compiler twice
17:06hiredmane.g. once to compile the call to load-string, then once when load-string is actually executed
17:06akhudekhm, maybe there is a smarter way to accomplish what I'm attempting than specializing namespaces
17:07akhudekI'm trying to extract schema's from sql databases into clojure code, then having a set of functions/macros be sepcialized to each extracted schema
17:07hiredmanstatically parameterizable namespaces would be nice
17:07hiredmanwith the macro approach you get real line numbers in errors too
17:08hiredman(as real as you ever get from clojure)
17:08akhudekthat would be very helpful
17:10hiredmanthere was a neat haskell(based?) module system released recently
17:10hiredmanhttp://plv.mpi-sws.org/backpack/
17:11hiredmanit would be interesting to build something like that for clojure as a replacement for the ns macro
17:12akhudekthis also reminds me of c++ templates
17:12hiredmanoh sure
17:12hiredmanvery similar with the same code explosion
17:13hiredmanthe load-string approach is the same
17:13akhudekyeah
17:13akhudekan inherits the same "where the hell did that error come from?" I suppse
17:13hiredmanmaybe? I dunnoo
17:21akhudekthe basic design problem I have is https://www.refheap.com/22535
17:34bitemyapparrdem: http://i.imgur.com/97juRl7.gif
17:44hiredmanakhudek: how fluid do you expect the schema to be? e.g. do you need to generate the code for the schema everytime?
17:46akhudekhiredman: no, it will be updated rarely. The prototype code I have actually generates a file for it as a preprocessing step. But it could also be done using a memoized call every time the app is compiled.
17:47akhudekNot sure which approach is better. Probably the latter as it saves having an extra lein plugin and would also catch differences between production and dev schemas.
17:48akhudekWell, assuming you don't aot compile I guess. So maybe not much of a difference.
17:49hiredmanakhudek: you could also just generate the clojure code once and check it in
17:49hiredman(some people seem to be allergic to this approach though)
17:51akhudekhiredman: yeah, though I prefer regenerating it as part of the build process. A big motivation for this is to catch errors in user code that talks about database objects. So if your database changes in a bad way (e.g. remove a needed column), then the app code will fail to compile. If you generate once you lose this.
17:51akhudekgenerate the schema once, that is
17:52[Neurotic]Quick stupid question - easiest way to do a boolean check if one string is in another? re-find?
17:52hyPiRion.contains
17:52Raynes&(.contains "foo bar baz" "bar")
17:52lazybot⇒ true
17:52hiredmanakhudek: use core.typed, generate the clojure code once, regenerate the type information everytime and see if it type checks :)
17:52[Neurotic]ah just use the interop
17:52[Neurotic]fair enough. Cool, will do that then. tag
17:52[Neurotic]tha*
17:53[Neurotic]tah* :/
17:56hiredmanhttp://research.microsoft.com/pubs/173076/information-rich-themes-v4.pdf
17:56akhudekhiredman: That would be cool, but how would it handle multiple schemas? E.g. using multiple databases? I need to look into core.typed more deeply. Are you thinking of an approach where you have a 'column' type? Can you define a set of keywords as belonging to a type?
17:58seangrovepetehunt: Well, a CLJS meetup with a talk on Om
17:58seangroveBut maybe we'll just do lightning talks and put Om off until next month, give it a little time to settle
17:58akhudekhiredman: thanks, that looks very interesting, will read through it
17:58bitemyappseangrove: when is this happening?
17:59hiredmanakhudek: I dunno, I was sort of joking, it depends on how far you want to push it to what extend that would be useful and how much type annotating you would need to do
17:59seangrovebitemyapp: 27th, I think
17:59seangroveWaiting for confirmation from Etsy in SF
18:00seangroveThey're being awesome about hosting it
18:00bitemyappseangrove: is it reasonable to assume CLJS'ers would be interested in the wider scope of functional ->JS languages?
18:00seangroveProbably a good fit for a lightning talk
18:00bitemyappthat's what I intended
18:00bitemyappseangrove: the 27th would be enough time for me to present on Fay and what kind idioms arise there for things like DOM interaction.
18:00seangroveI'd like to see that as well
18:01hiredmanif you want some kind of tool to catch errors at build time core.typed seems reasonable
18:01bitemyappseangrove: okay, I'll pencil in hammering out a lightning talk for Fay as my co-project alongside the ElasticSearch stuff I'm doing for Simonides.
18:02seangroveWith all that extra "free time" you have ;)
18:02bitemyappoh yes, tons. I'm positively swimming in free time while trying to get cantankerous half-assed parsers working. :)
18:02bitemyappactually, the most recent one has been pretty great.
18:02bitemyappand the author is very communicative.
18:02bitemyappseangrove: been to Chaya SF yet?
18:03akhudekhiredman: I'm not entirely sure where I'm going with this. The current prototype stuff is really quite simple, it just synthesizes some common sql queries. The macro provides checking on column and table names and automatic retrieval by primary key. Our code base has a lot of this sort of boring boilerplate. Something more clever using types could be useful though. Either way, seems like an interesting paper worth reading through.
18:03seangrovebitemyapp: By the way, thanks for the tip on ansible. Marissa had it up and running super smoothly in 1.5 days, never doing any sysadmin stuff before
18:03seangrovebitemyapp: I think I might have meet someone there a few years ago, not sure...
18:03bitemyappseangrove: yeah ansible is probably the best choice for anybody who hasn't developed any bad habits already.
18:04bitemyappseangrove: ansible is a bit harder for me to swallow because I'm sitting on a massive stockpile of idempotent Python code, haha.
18:04bitemyappit's like trying to get a Common Lisp user to give up their micro-language ecosystem built on the back of sacrificed goats and macros.
18:05sshackSo what are people using for SQL schema migrations these days? Lobos is missing quite a few of PG datatypes I'd like to use.
18:05bitemyappsshack: use Migratus.
18:05akhudeksshack: we use flyway
18:05bitemyappsshack: it's practical, lets you write straight-up sql files, and handles merges intelligently.
18:05sshackWill look at both
18:05bitemyappsshack: downers? it's a bit pissy about filenames and timestamp formats.
18:06akhudekflyway is similar
18:06sshackflyway is java. Recommendations for a clojure based solution?
18:06bitemyappAlso, I'm pretty sure the author of Migratus is a crypto-fan of Max Headroom. neutral on that one.
18:06bitemyappsshack: Migratus is Clojure.
18:07bitemyappsshack: it's a leiningen plugin.
18:07akhudeksshack: flyway has a command line app and there is a lein plugin, though we don't use the lein plugin.
18:07sshackbitemyapp: Currently maintained?
18:07bitemyappsshack: as maintained as it needs to be.
18:07sshackakI shall look into it some more then.
18:07bitemyappthere's only so many things you can do with executing SQL files based on migration history.
18:07sshackbitemyapp: Point.
18:08bitemyappsshack: Clojure projects tend to become "done" faster than those in languages like Java
18:08bitemyappthis can sometimes make it hard to tell what's "unmaintained" vs. merely "done"
18:08rasmustohow can something that's "infinitely extensible" ever be done?
18:08rasmusto:P
18:09bbloomrasmusto: just put the extensions outside the radius of the done core & you're good :-)
18:09sshackbitemyapp: Have you used migrates with heroku? I don't think there would be any gotcha's, but it never hurts to ask.
18:10bitemyappsshack: hum. I dunno. Only thing is getting the URL syntax right?
18:10sshackThat shouldn't be a problem.
18:10bitemyappsshack: I generally used a local or production postgres instance with migratus.
18:10rasmustobbloom: ah, ok. speaking of which, is there a good code analysis tool that'll tell me what fns I'm using and which I can deprecate? All of my stuff is contained in a single project
18:10sshackWell, I'll have to give it a try.
18:11bitemyappsshack: best way to roll. And seriously though, it's pissy about the filenames. Find a filename example and work off of that.
18:11rasmustokibit/bikeshed?
18:11sshackbitemyapp: Thanks for the hint.
18:13bitemyappsshack: I mention this because the last time I used migratus I raged for like an hour trying to remember the fucking format. It's a goddamn death-trap.
18:13bitemyappbut once I got it working with my own little migration file generator, I was in heaven.
18:14sshackWhy did you write a migration generator?
18:15bitemyappit's not a migration generator
18:15bitemyappit's an empty file maker that injects the format into the filename that migratus expects
18:15bitemyappbecause it wants a migration name and timestamp.
18:16sshackThat format makes perfect sense to me
18:16sshackIt's exactly how I'd do it.
18:17bitemyappsshack: well you'll probably jive with pjdstadpidfgjdkgahhhhconsonantsfndig's way of thinking then
18:19devntbaldridge: hola
18:19devntbaldridge: you around?
18:19tbaldridgedevn: yeah
18:19devnah sweet!
18:19devni was going to try and goad you into taking a moment to weigh in on an overtone thread
18:20devntbaldridge: https://groups.google.com/forum/#!topic/overtone/RmhlMQJL6-k
18:20sshackbitemyapp: Who is pjd...?
18:20devnsee the post at the bottom: sam's questions related to replacing the event system in overtone with core.async
18:21bitemyappsshack: look at migratus' github.
18:22sshackahh.
18:22devntbaldridge: with some guidance, i think sam and company could be convinced, but i simply cannot speak to some of the questions he's raising at the moment
18:24tbaldridgedevn: I think the main problem would be with the way concurrency is handled in the two systems. Overtone likes to have "hard eventing" I'll call it.
18:24tbaldridgeThat is to say, you can say "run this event at this ms, not one ms sooner or later".
18:25tbaldridgeCore.async uses alot of queues, and each time an event/go gets scheduled it gets thrown into a thread pool, the exact time that events are run is undefined.
18:25devnmore "scheduling" than eventing
18:25sshackbitemyapp: Ahh I see you wrote a little scaffold generator for migrates id-name-dir-timestamp.sql
18:25tbaldridgeyeah
18:25devntbaldridge: surely there's some disgusting hack to make that happen in core.async 3:)
18:26sshackWhat -;; separator requirement is annoying. it'd be nice to just have raw sql files.
18:26devns/in/with
18:26devntbaldridge: for some of the stuff he's talking about, i agree with you, it's all about scheduling
18:26devnbut for other things, the current "at this ms" thing doesn't really map 1:1 with what a user of overtone is trying to do
18:29devntbaldridge: if you're making a sequence of notes that are to be played according to a particular bpm, time signature, etc. i agree we're talking more about scheduling than "eventing", but if you have a sampled piano and want to pass the note value you played to 3 other instruments, i could see core.async being a good fit
18:29devnforming connections between fx, insts, etc.
18:30tbaldridgedevn: agreed, so perhaps using core.async at a higher level is a good idea. But I wouldn't want to build the guts of a synth on it. The interface perhaps.
18:31devnlike [my guitar] ->> [fx1]+-+[fx2]+-+[fx3]
18:31devntbaldridge: yeah, that might be the ticket
18:32devntbaldridge: in any event, if you feel the urge to weigh in on that thread, it'd be cool to see what comes out of the discussion with sam.
18:32tbaldridgesure
18:33tbaldridgewe talked at CodeMesh in Dec, not about this exactly but we're not strangers at least :-)
18:33devni think for sending notes and what-not from external instruments, core.async is a big win
18:34devnthe (at) macro can be funky. you specify (now) as an arg to at. I think having that be core.async might be a better fit
18:35devnbut as i state in that thread, im not an overtone expert and haven't contributed to the core of it, so i might be way off base to suggest that
18:48arrdembitemyapp: har ahr
18:48arrdembitemyapp: level 11.5, grinding der dotaz 'cause toothpick is giving me shit
18:49bitemyapparrdem: <3
18:50arrdemthinking of which. is there a favored way to structure assertions and condition checking? I saw dire but haven't played with it yet.
18:53bitemyapparrdem: dire is more for AOP wackos like me.
18:53bitemyapparrdem: especially people that write a lot of services and stuff.
18:54bitemyapparrdem: most people I see using pre-conditions and post-conditions, but that can get out of hand quickly and isn't very composable/clean - which is why I favor dire.
18:54bitemyappthere's a better way to do things like AOP/dire (cough monads) but that's for another day.
18:58alewso with AOP, you collect all functionality relating to some logical unit (like logging, or authorization) into one module that gets called into and dispatched based on who is calling?
19:00arrdemaaand drow fed puck
19:01tommo_as suggested earlier i'm now trying to load a clojure file into java through the runtime
19:01tommo_but when i call compiler.loadfile i get a nullpointer
19:01tommo_which originates from class.getclassloader line
19:01bitemyapparrdem: I am going to positively die when you hit 13 from happiness.
19:01tommo_do i need to somehow initialise the runtime before loading anything?
19:01tommo_the wiki says it should automatically setup the runtime
19:01arrdembitemyapp: good then I'll get to stop listneing to you talk about monads
19:01hiredmandon't do that
19:02hiredmanRT.var("clojure.core","load-file").invoke(...);
19:02hiredman(or the java api if you have that)
19:02tommo_the files are not on the classpath, btw
19:05bitemyapparrdem: hahahaha. as if.
19:05sshackbitemyapp: What behaviour did migratus exhibit when it took issue with your migration filenames?
19:05bitemyapparrdem: I'll be the Tupac of Monads. You'll get my lessons from the GRAAAAAVE
19:05bitemyappsshack: you're going further back in history than my hedonistically ravaged mind can reach.
19:06sshackI'm getting an exception here, but it's not clear what's causing it.
19:06bitemyapplancepantz: welcome stranger.
19:06bitemyappsshack: sounds like the clock on your hour of raging just started. Good luck!
19:06sshackbitemyapp: Alright. Cheers anyways. Thanks for the heads up one the filename issue.
19:07tommo_thanks hiredman, worked
19:07bitemyappsshack: I've got some betting squares going on the over/under for that ~60 minutes, let me know how long it takes in the ed.
19:07bitemyappend*
19:07bitemyappsshack: sensible error messages appear to be foreign to most Clojure libraries/tools
19:08tommo_small problem though, originally it was loaded as a class file so i had class level runtime annotations for script metadata
19:08sshackSeems to be. Annoying thing is, that'd probably make people overall 4x more productive.
19:08tommo_any ideas for a simple way to do a similar thing with the rt?
19:09arrdembitemyapp: I'd tend to agree...
19:09bitemyappsshack: well if they cared about sensible errors and catching things at the right time, it'd have a type system.
19:09bitemyappsshack: but here we are.
19:09bitemyappsshack: My solution is to spread the suffering around and then roll around in it like a dog in mud. Your results may vary.
19:09sshackI'd use haskell, but the tooling there is horrible. And no one believes in relational databases (they're not academically interesting anymore)
19:10bitemyappsshack: oh, you gotta pull from the more practical people to find that kind of tooling, like Snoyman's stuff.
19:10bitemyappsshack: what you're thinking of is persistent + postgres bindings + esqueleto.
19:11bitemyappsshack: nothing wrong with Haskell, just the libraries you were aware of. See here: http://hackage.haskell.org/package/esqueleto
19:11bitemyappsshack: idea being, use persistent as a generic backend, specialize query semantics as needed with things like esqueleto.
19:12sshackI'm gonna leave haskell alone for a while.
19:12bitemyappsshack: I've found the tooling to be generally better and more reliable than clj so far, with non-overlapping gaps in library coverage (between clj and hs) compared to Python.
19:13bitemyappe.g. Clojure has a bad and unreliable library for ElasticSearch, Haskell has no library beyond simply using the HTTP + JSON stuff.
19:13sshackAlso, there are many things with absolutely zero library coverage. Like payment processors or mail services (mail gun, postmark, etc)
19:13bitemyappgiven my druthers, I'd not get fooled and go with the latter scenario.
19:13bitemyappsshack: languages like Haskell and Clojure are for people brave enough to write a library/tool.
19:14sshackFor now, it seems to be true.
19:14arrdembitemyapp: which is why we like the :D
19:14bitemyappand have done the ROI calculation to determine that they're willing to make the things they want to get the language they want.
19:14sshackI've no problem with writing libraries. Just being forced to.
19:14technomancyyou mean with enough free time?
19:14sshacktechnomancy: Bingo.
19:14bitemyapptechnomancy: it's just an ROI calculation whose neutral point shifts over time as the library ecosystem matures.
19:14hiredmantime is always in short supply
19:15bitemyappif you're not going to get a lot of leverage out of a better language then you'd probably be most productive in Rails/Django anyway.
19:15bitemyappcopy-pasta your way to nirvana and all that.
19:16Jardauser=> (clojure.string/join ":" (split-at 2 "1122"))
19:16Jarda"clojure.lang.LazySeq@9e1:clojure.lang.LazySeq@a01"
19:16Jardais this expected?
19:16Jardaor I guess it is
19:16Jardabut how can I accomplish what I'm trying to do, to get "1122" -> "11:22"
19:16arrdemJarda: interpose may be more useful....
19:16amalloy&((juxt str pr-str) (range 3))
19:16lazybot⇒ ["clojure.lang.LazySeq@7480" "(0 1 2)"]
19:17amalloyie, don't use str to turn sequences into strings
19:18amalloybut you can, say, ##(clojure.stinrg/join ":" (map (partial apply str) (split-at 2 "1122")))
19:18lazybotjava.lang.ClassNotFoundException: clojure.stinrg
19:18amalloy&(clojure.string/join ":" (map (partial apply str) (split-at 2 "1122")))
19:18lazybot⇒ "11:22"
19:19Jardaamalloy: ok thanks
19:20alewbitemyapp: what's wrong with Elastisch?
19:20arrdemgod I swear I'm gonna start instalocking Drow so that nobody else does....
19:21bitemyappalew: *holds face in hand and weeps*
19:21bitemyapparrdem: you've turned into a real pubbie now. You've embraced fear and hatred. Let it flow through it, use it as a weapon!
19:22arrdembitemyapp: the rage compells me...
19:22bitemyapparrdem: the hate is swelling in you now. Take your drow bow. Use it. Tiny is unarmed. Strike him down with it. Give in to your anger.
19:27arrdembitemyapp: more like I reach the state of zen beyond trolling and rage
19:28bitemyapparrdem: that's the ticket.
19:28bitemyapparrdem: that's how you go 25-4 in a game your team lost. the zen.
19:30koreth_,(apply format (cons "%c%c:%c%c" "1122"))
19:30clojurebot"11:22"
19:31sshackIs there an easy way to see what class path a leineingens plugin is getting? I'm trying migrates migrations here and missing clojure/java.jdbc
19:32arrdeminstalock drow here we go.,..
19:32noonian_i've found i also get that error sometimes when using aot compilation and i need to lein clean
19:32noonian_specifically with java.jdbc
19:34technomancysshack: don't run migrations in a plugin
19:35akurilinAnybody else got pinged by Hickey's sister?
19:35sshackWhy not?
19:35technomancysshack: it just doesn't make sense
19:35technomancyit should happen in a project namespace
19:36sshackMy thoughts are it does. I can have migrations run as a hook during deployment.
19:36technomancyyou don't need a plugin for that
19:36technomancyjust use lein run
19:46bitemyappakurilin: ...what?
19:46bitemyappakurilin: https://groups.google.com/forum/#!topic/clojure/-PoYv8wUpwE
19:47bitemyappakurilin: forward me the email please.
19:48akurilinbitemyapp: your cma@ account?
19:49bitemyappakurilin: https://www.mail-archive.com/clojure@googlegroups.com/msg76604.html
19:49bitemyappakurilin: son of a...she apparently *is* Hickey's sister, if rplevy is to be believed.
19:49bitemyappakurilin: yeah why not. I know somebody (not me) that is looking for a Clojure gig and I could toss the hookup over the fence.
19:49RaynesI thought we had already established that she was indeed his sister.
19:50bitemyappRaynes: I don't get the mailing list firehose.
19:50RaynesNo, I mean we talked about this personally when she sent me a recruitment email. Or so I thought.
19:50RaynesI mentioned that I had gotten an email from Rich Hickey's sister.
19:50bitemyappRaynes: no, you didn't tell me :(
19:50bitemyappor you talked to otherMe instead of meMe
19:51RaynesPerhaps it was someone else I talked about it with...
19:52bitemyappakurilin: danke schön. email forwarded. :)
19:52akurilinAnyway, it's cool that clojure is a family business ;)
19:52bitemyapphaha, I think his brother did some Clojure here and there too.
19:53technomancyhe did a bunch of the logos
19:53technomancy(and some coding too)
19:54akurilinDid he make those $50 tshirts?
19:54akurilinThose things better be bespoke ;)
20:04devnhow do I require cljs.reader in script/repljs?
20:11dnolendevn: there still no require REPL special case, would love a patch for that.
20:11dnolendevn: there is in-ns, load-file, and a load-namespace special REPL cases
20:24devndnolen: yeah, figured out i had to do it through (ns ...)
20:25devndnolen: could you give me a clue? is the state of the art to turn "{\"foo\": \"bar\"}" into {:foo "bar"} still js*?
20:26dnolencljs.reader/read-string should work
20:26devndnolen: with #js, you mean?
20:26dnolendevn: oh are you trying to convert JSON into CLJS data?
20:26devnyes
20:27dnolendevn: (js->clj (js/JSON.parse ...))
20:28devndnolen: much obliged. it's been awhile since i've clojurescripted and js->clj used to be something hand-rolled
20:28devni didn't know if that's what the cool folks were using
20:30devndnolen: also, i noticed all the tests for #js were on (... "#js ..." ...) and not (... #js ...)
20:31devnbut that totally doesn't matter. my bad.
20:31devn:)
21:06bitemyapparrdem: mumbur?
21:14deadghostuntil now in my mind it was "rick" hickey
21:14deadghostrich hickey is kind of a funny name
21:15gfredericks,(set "rich hickey")
21:15clojurebot#{\space \c \e \h \i ...}
21:16gfredericks,(set "richhickey")
21:16clojurebot#{\c \e \h \i \k ...}
21:17deadghost,(reverse "rich hickey")
21:17clojurebot(\y \e \k \c \i ...)
21:17darthdeushey guys, anyone here using lighttable?
21:18noonianyeah, i use it
21:18noonianit's purty
21:19darthdeusare you using the paredit plugin?
21:20noonianhmm, it seems to exhibit paredit like behavior but i didn't do anything to set it up
21:21nooniani didn't think the plugin system had been release yet
21:21darthdeusparedit like behavior? :o
21:21darthdeusi've tried this https://groups.google.com/forum/#!topic/light-table-discussion/BIyWHnRcoWc but some thing don't seem to work
21:21nooniani have paredit commands in my command pane
21:22noonianwhat isn't working?
21:22darthdeusah there's a typo, he spelled "shift" as "shit" :D
21:22noonianyeah lol i read that in the thread
21:24darthdeusi'm kinda noob at paredit thingy, is there a way that i can easily change something like (foo 1) into (bar (foo 1)) ?
21:26andrew__llasram: it finally clicked for me, and I get it now. thanks for help.
21:30nooniandarthdeus: just figured it out, start with (foo 1), then put cursor on the left side of the paren and type '(bar ', then bring up the command pane (or use hotkey) and run "Paredit: Grow Right"
21:31nooniansorry, should be '(bar)' then grow right
21:32darthdeusperfect, thanks :)
21:32tommo_how can i access an instance variable from a java class i'm proxying?
21:34tommo_ahh got it
21:34tommo_didnt notice the implit this argument
21:35nooniando you just use .varname?
21:36noonian(.varname obj)?
21:37tommo_yep
21:37nooniancool
21:37tommo_(.varname this)
22:02andrew__if into-array creates a Java array (not a Clojure literal of any type), then is there any purpose to using it if your code base is entirely in Clojure and you do not interact with java in any way?
22:04RaynesWell, if you need array-like performance.
22:04noonianprobably not for most programs
22:04RaynesBut you usually don't.
22:04RaynesAnd if you do, you'll be acutely aware of it.
22:06Raynesdnolen has an interesting post about using Java arrays for performance sensitive code in Clojure, but I can't find it since he moved blogs.
22:08dnolenandrew__: all the array support in Clojure(Script) is for doing performance sensitive work, if you don't need it don't use it
22:08Raynesdnolen: Where is that blog post?
22:08Raynes:(
22:08dnolenRaynes: posterous
22:08RaynesAnything pre-2013 seems to have vanished off the face of the interwebs.
22:08dnolenRaynes: I'll never write another blog again on anything that isn't backed by Git that I don't have copies of on my local machine
22:09RaynesOh.
22:09RaynesOh dear. So all of those posts are just lost!?!?!
22:09dnolenRaynes: yep
22:09RaynesGoodness.
22:09dnolenRaynes: hmm actually looks like way back machines archived some of it
22:10dnolener waybackmachine
22:16myfriendIf I downloaded leiningen, I do not have to manually download the clojure zip from the website right?
22:16myfriendmy understanding is that clojure is centrally hosted and lein will always pull from the central servers?
22:16akhudekmyfriend: right
22:17akhudekmyfriend: the specific version that it pulls is in your project.clj
22:17myfriendakhudek, so what about when I don't have an internet connection
22:18akhudekmyfriend: if you've pulled it at least once in the past it will be cached in your local maven repository under ~/.m2
22:18hiredmanif you are familiar with maven, that is what lein does
22:18andrew__thanks guys, i was wondering what the array support was for
22:18andrew__i can feel your pain about lost blog posts.
22:18myfriendalright, thank you akhudek
22:41darthdeuscan i somehow stop lighttable when it's processing stuck in a loop?
22:42Rayneskill -9 :p
22:44lsdafjklsddnolen: hey man, is there an issue with updates not being propagated down into build-all components?
22:44dnolenlsdafjklsd: not that I'm aware of
22:45lsdafjklsddnolen: maybe I'm just doing something wrong, buy I'm trying to pass owner state from the root, to a UL component, and then into the children li elements that are built through build-all
22:45lsdafjklsddnolen: when I updated the node state, the re-render happens and refreshes properties on the ul component, but code that uses it in the li does not update for some reason
22:46R_Macyhas anyone had any problems using core.typed with cursive?
22:46dnolenlsdafjklsd: did the value actually change for those components?
22:47lsdafjklsddnolen: I'm basically comparing the changed 'current-id' to the id of the li element to set a class
22:47lsdafjklsddnolen: and if it's the same, set the class. so for one I would assume that would eval to true
22:48dnolenlsdafjklsd: would need to see a minimal example
22:48lsdafjklsdok
22:55tommo_whats the easiest way to convert a variadic arg (arrayseq) into a java array of primitive ints
22:55tommo_i tried (ints (into-array Integer args)) but it doesnt work
22:55S11001001tommo_: into-array.
22:56S11001001tommo_: ints is a type hint, not a coercion function
22:56tommo_oh
22:56S11001001and Integer is not the primitive int type, it's the class java.lang.Integer
22:56lsdafjklsddnolen: Here is a gist... if you could take a look at it real quick that would be amazing. https://gist.github.com/lsdafjklsd/8294408
22:57lsdafjklsddnolen: It's just a list titles, and when you click an item in the sidebar that becomes active below. simple master child
22:58dnolenlsdafjklsd: what version of Om are you on, 0.1.4?
22:58lsdafjklsddnolen: ya
22:58S11001001,(into-array Long/TYPE [1,2,3])
22:58clojurebot#<long[] [J@c007bd>
22:58tommo_and S11001001 the exception is because the values im passing in are actually longs
22:58S11001001^ tommo_
22:59tommo_yeah, :p
22:59tommo_thanks
22:59S11001001yeah they are at that
22:59S11001001,(into-array Integer/TYPE [1,2,3])
22:59clojurebot#<int[] [I@d81e23>
22:59S11001001,(into-array Long [1,2,3])
22:59clojurebot#<Long[] [Ljava.lang.Long;@14dd6be>
22:59S11001001note the type printed
23:00dnolenlsdafjklsd: oh are you trying to set the state of a parent from a child?
23:00tommo_yeah i thought it was the other way around
23:00lsdafjklsddnolen: ya
23:00S11001001,Object/TYPE
23:00clojurebot#<CompilerException java.lang.RuntimeException: Unable to find static field: TYPE in class java.lang.Object, compiling:(NO_SOURCE_PATH:0:0)>
23:00dnolenlsdafjklsd: yeah not going to work and don't plan on supporting that
23:00lsdafjklsddnolen: yea it felt bad
23:01lsdafjklsddnolen: what's the idomatic way? refs?
23:01dnolenlsdafjklsd: oh so I see what you're having trouble w/, communicating between parents and children
23:02lsdafjklsddnolen: ya
23:02dnolenlsdafjklsd: you could do this a couple of ways, I prefer to use core.async for this
23:02dnolenlsdafjklsd: I think passing an atom to the child could also work, and the parent could have a watcher fn on it.
23:03dnolenlsdafjklsd: you could also just do it with callbacks too
23:03lsdafjklsddnolen: so the list items would be passed a channel where an active id gets pushed on to, and if it matches their ID add the class?
23:03dnolenthat's what the React folks do
23:04lsdafjklsddnolen: i'd like to go the core.async route
23:04dnolenlsdafjklsd: the parent will get the id and render the children, adding that information to that particular child
23:04lsdafjklsddnolen: ok
23:04andrew__why does (compare 10 5) return 1 ? The docs for compare don't really explain this
23:04andrew__`1
23:04lsdafjklsddnolen: I tried that here, like in the {:opts {fn, but the child wouldn't refresh, or update
23:05lsdafjklsddnolen: even though the parent UL is firing
23:05dnolenlsdafjklsd: because the parent needs to modify the child
23:05dnolenlsdafjklsd: it takes some getting used to but you basically always need to flow information down
23:05lsdafjklsddnolen: like doing assoc on the e right?
23:05dnolenlsdafjklsd: yep associng some data onto the child
23:06lsdafjklsdhmm I'll try that again, that seems good
23:06lsdafjklsddnolen: good info, still learning the ropes. really appreciate you taking a look at it
23:06dnolenlsdafjklsd: no problem
23:06dnolenlsdafjklsd: the TodoMVC has to do this exact same thing for which child is being edited
23:07dnolenlsdafjklsd: worth taking a look at
23:07lsdafjklsddnolen: ok
23:07lsdafjklsddnolen: and while I have you, when I use build, what is the owner in the component?
23:07lsdafjklsddnolen: itself?
23:07dnolenlsdafjklsd: https://github.com/swannodette/todomvc/blob/gh-pages/labs/architecture-examples/om/src/todomvc/app.cljs#L58
23:08dnolenlsdafjklsd: owner is the real backing React component
23:09lsdafjklsddnolen: so if I build something from the root render fn, that built items 'owner' arg is the react component of itself, not the root?
23:09dnolenlsdafjklsd: not the reify instance, that why the first argument to all the life cycle methods are ignored unless you need to implement some other stuff for some reason
23:09mtndew4brkfstandrew__: looks like compare functions similarly to < and > and goes left to right, and left (10) is greater than right (5) so it returns a positive int
23:09andrew__ah, thanks, that makes sense
23:09dnolenlsdafjklsd: yes, only the function you pass to om/root can get at the root React backing component
23:10lsdafjklsddnolen: gotcha
23:10lsdafjklsddnolen: it's not inject itself into the child component as the owner argument
23:10dnolenlsdafjklsd: no it does not
23:10lsdafjklsddnolen: awesome, thanks again man
23:11dnolenlsdafjklsd: every time you call build you're constructing a React component behind the scenes
23:11lsdafjklsddnolen: that sortable example is a gift too, holy cow
23:11dnolenlsdafjklsd: that delegates to your reify instance
23:11dnolenlsdafjklsd: yeah that was fun to do, very impressed w/ React.
23:11lsdafjklsddnolen: perfect, that's what I thought
23:13andrew__there is an arity for sort-by that looks like this: (sort-by keyfn comp coll) but the docs do not say what "comp" represents, can anyone advise?
23:14mtndew4brkfstcomparitor function, maybe?
23:15andrew__actually, now I get it, I see comp is the optional comparator function
23:15andrew__i tend to need docs to be more explicit, i'll have to get used to that