#clojure logs

2015-08-09

00:01rpaulogrrr, cat again
02:22domokatohm, when i put in a hex value, 0xFFBEBEBE for example (for an argb color), I can't convert it to an int because I get a "value out of range" exception
02:23domokato,(int 0FFBEBEBE)
02:23clojurebot#<NumberFormatException java.lang.NumberFormatException: Invalid number: 0FFBEBEBE>
02:23domokatoer
02:23domokato,(int 0xFFBEBEBE)
02:23clojurebot#error {\n :cause "Value out of range for int: 4290690750"\n :via\n [{:type java.lang.IllegalArgumentException\n :message "Value out of range for int: 4290690750"\n :at [clojure.lang.RT intCast "RT.java" 1198]}]\n :trace\n [[clojure.lang.RT intCast "RT.java" 1198]\n [sandbox$eval47 invokeStatic "NO_SOURCE_FILE" 0]\n [sandbox$eval47 invoke "NO_SOURCE_FILE" -1]\n [clojure.lang.Compiler eval "...
02:24hiredman,(Integer/toHexString Integer/MAX_VALUE)
02:24clojurebot"7fffffff"
02:25hiredman,(unchecked-int 0xFFBEBEBE)
02:25clojurebot-4276546
02:26domokatosweet, thanks!
02:27domokatoman, that's not even in the cheatsheet
02:28hiredmanif everything was on whatever cheatsheet, the cheatsheet would just be a listing of everying in clojure.core
03:09irctcHello, quick question : I am trying to import core.async in my REPL : (require '[clojure.core.async] :as async) what's wrong with this ? (runtime exception unable to resolve symbol: async)
03:10irctcthis seem to work though at least doesn't throw an error : (require '[clojure.core.async])
03:11irctcaah nevermind, it's me being stupid : (require '[clojure.core.async :as async])
04:03irctcHello, can someone help me debug my protocol ? I can't find the right way to call it https://www.refheap.com/7739d3471f05b3681fde6b0bf
04:04justin_smithirctc: the first argument to every protocol method must be the object implementing the protocol
04:04justin_smithirctc: traditionally we name it "this"
04:05justin_smithirctc: also, the protocol method is a function, it is not an argument to the object implementing the protocol
04:05irctcDo you mean I should do (add-subscriber subscription-store id context) instead ?
04:05irctchmm thanks just let me 30 secs to process it ^^
04:05justin_smithirctc: that, and you also need to change the declaration and definition of add-subscriber
04:06justin_smiththe declared args must include the this arg
04:06irctcooh I see
04:07irctcevery time, I should have this as first arg ok
04:07irctcand then how will I call it ? like I pasted here ?
04:07justin_smithyes
04:07irctcjustin_smith: thanks a lot I'm going to try that now
04:07justin_smithit's OK not to call the arg "this" - eg. if you don't use the arg, it can be called _
04:09irctcOh I saw that convention thanks again. I shouldn't need it right ? (the memory store will have a redis store counterpart in case it matters-
04:13irctcjustin_smith: Seem to work ! Thanks a ton !
10:58lodin_Is it possible to construct a value x such that (let [[& {a :a}] x] ...) makes sense?
11:06lodin_Or as a test, can (is (nil? (let [[& {a :a}] x] a))) fail?
12:17justin_smithlodin_: what would an ampersand in a let destructure even mean?
12:19AimHere,(let [[& {a :a}] x] a)
12:19clojurebot#error {\n :cause "Unable to resolve symbol: x in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: x in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6704]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve symbol: x in this context"\n ...
12:19AimHere,(let [[& {a :a}] 10] a)
12:19clojurebot#error {\n :cause "Don't know how to create ISeq from: java.lang.Long"\n :via\n [{:type java.lang.IllegalArgumentException\n :message "Don't know how to create ISeq from: java.lang.Long"\n :at [clojure.lang.RT seqFrom "RT.java" 535]}]\n :trace\n [[clojure.lang.RT seqFrom "RT.java" 535]\n [clojure.lang.RT seq "RT.java" 516]\n [clojure.core$seq__4116 invokeStatic "core.clj" 137]\n [clojure.co...
12:20AimHere,(let [[& {a :a}] {:foo 10 :bar 20}] a)
12:20clojurebotnil
12:21justin_smith,(let [[& {a :a}] [:a 0]] a) ; wut
12:21clojurebot0
12:21justin_smithit makes me kind of unhappy that that works
12:40lodin_justin_smith: Hmm, I thought I tried that one.
12:40lodin_Apparently I didn't.
12:45lodin_,(let [{a :a} (seq [:a :A])] a)
12:45clojurebot:A
12:50lodin_but,
12:50lodin_,(let [{a :a} [[:a :A]]] a)
12:50clojurebotnil
12:51lodin_Presumably because [] is associative, and there's no :a in the vector.
12:51justin_smith,(let [[{a :a}] [[:a :A]]] a)
12:51clojurebotnil
12:51lodin_,(let [[{a :a}] [(seq [:a :A])]] a)
12:51clojurebot:A
13:34kwmiebachHi. What does the cljr extension stand for? it is mentioned here: http://clojure.org/reader#The Reader--Reader Conditionals
13:37hyPiRionclojure clr probably
13:37hyPiRionhttp://clojure.org/clojureclr
13:41kwmiebachthank you. and my link above was broken, it should be http://clojure.org/reader#The%20Reader--Reader%20Conditionals
13:49kwmiebachyeah probably :cljr is reserved for the dotnet implementation in reader conditionals
14:02gfredericksare there any strong opinions about indenting styles for top-level reader conditionals?
14:08justin_smithgfredericks: I lament bitter tears over emacs not being able to indent them like hash-maps
14:10gfrederickswhat is backing the emacs identation stuff currently?
14:22justin_smithgfredericks: the magic happens here https://github.com/clojure-emacs/clojure-mode/blob/master/clojure-mode.el#L638
14:45lentils_anyone here experienced with enlive?
14:52lodin_,(let [[a :as x b] [1 2]] a)
14:52clojurebot1
14:52lodin_,(let [[a :as x b] [1 2]] x)
14:52clojurebot[1 2]
14:52lodin_,(let [[a :as x b] [1 2]] b)
14:52clojurebot#error {\n :cause "Unable to resolve symbol: b in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: b in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6704]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve symbol: b in this context"\n ...
14:52lodin_^^^ Bug or features?
14:52lodin_*feature.
14:52justin_smithlodin_: nothing can follow :as
14:53lodin_justin_smith: Why not?
14:53justin_smithbecause after ":as x" the destructure ignores all input
14:53lodin_justin_smith: But why?
14:53justin_smithso anything can follow it I guess, it just won't do anything
14:54justin_smithlodin_: because it was written that way. The destructuring code is weird.
14:54gfrederickslodin_: it's an impl detail, and is confusing, but doesn't prevent anything
14:54lodin_It's not clear from the docs. But when I read "http://clojure.org/special_forms#Special Forms--Binding Forms (Destructuring)-Vector binding destructuring" I see that you could interpret "Finally, ..." as meaning "in the last position".
14:54gfredericksi.e., (let [[a b :as x] [1 2]] b) is what you really want, right?
14:55lodin_I actually prefer to put :as first.
14:55lodin_I always do that with maps.
14:56gfredericksyeah I just mean that it means the same thing
14:58lodin_gfredericks: Right.
14:58lodin_Do you think a patch to allow :as anywhere, or at least in the beginning, would be accepted?
15:00justin_smithI doubt it
15:01gfredericksmore likely a patch that throws if you put anything after the :as clause
15:01justin_smithyeah
15:01gfrederickswhich won't give you what you want of course
15:02justin_smiththe only reason :as doesn't need to be last in a map is because maps are unordered I guess
15:02lodin_I don't really understand the rationale for requiring :as to be the last thing.
15:02gfredericksI haven't thought about it till not but
15:03gfredericksyou could argue that the normal mode of sequential destructuring where each thing is positional gets interrupted in a confusing way if you allow arbitrary clauses in between
15:04justin_smithdestructure is already insane and hairy as code, it would be worse I bet if it had to accept :as anywhere
15:04gfredericksit's visually more confusing because in [a b :as c d e f]
15:04gfredericksc and d are *very* different
15:04lodin_Yeah. Which is why I also gave the option of "in the beginning".
15:05gfrederickssame for [:as c a b d e f]
15:05lodin_I agree that it would be confusing to have keyword in the middle there, particularly when the subforms are not just symbols.
15:07lodin_Interesting. I find the leading style to be much clearer, because when you have even just slightly non-trivial destructuring the :as clause gets hidden far to the right.
15:07justin_smithlodin_: I always put :as on its own line
15:08lodin_like [a {foo :bar {this :that}} :as v].
15:08justin_smithlike that, but with a newline before :as
15:09lodin_Yeah, I was giving an example of v being pushed to the left. Maybe I'm bad at reading destructurings, but I need to look back left to see what v actually contains.
15:10lodin_If I get :as v in the beginning, I know that "what I'm reading now is part of v", instead of having to backtrack to update when v started.
15:11lodin_justin_smith: It makes sense to put :as on it's own line. I should try that.
15:11lodin_I've tried to not use multiline destructurings, because I find it disrupting when reading the let. But I guess that's something I can get used to.
15:12lodin_justin_smith: How do you layout the init-expr that follows the binding-form when binding-form is multiline?
15:14justin_smithusually on the same line as the :as clause, depending on how the rest of the let is laid out
15:16lodin_Ah. Lately, when I have let forms that are too long (usually because it's a vector with long names in it), I have put the init-expr on the next line, but indented.
15:20gfredericksare macros just a lot harder to write in cljs and that's just the end of the matter?
15:20gfredericks(w.r.t. symbol expansion)
15:46justin_smithI've definitely noticed that things that work in clojure macros sometimes don't work in cljs ones
15:47gfredericksI'm starting to think that you just can't use the autoexpansion feature of ` anymore
15:47gfrederickswhich I'm sure encourages simpler macros
15:48justin_smithgfredericks: time to port hygeinic macros from scheme
15:58amalloygfredericks: you mean instead of syntax-quote you just get backquote?
16:00gfredericksamalloy: what's backquote?
16:00amalloylike form other lisps
16:00amalloy*from
16:00gfredericksoh I'ven't another lisp
16:01amalloyjust like, `(a b c) returns (a b c) instead of (foo/a foo/b foo/c)
16:02gfredericksyeah, you only get the unquoting and the gensym features
16:02gfredericksbut what this means in real life is that you still have the symbol expansion feature, it just usually does the wrong thing
16:02gfrederickse.g. `(* 2 3 7) is wrong I assume
16:10gfredericksI think I'm wrong about that, but I have no idea why
16:10gfredericksI.e., I'd assume that expands to ##`(* 2 3 7)
16:10lazybot⇒ (clojure.core/* 2 3 7)
16:10gfredericksand clojure.core/* doesn't exist in cljs
16:29aconz2off topic to discuss how to find jobs as a soon-to-be college grad?
16:34gfredericksgeography might (or not?) be relevant to that question
16:37aconz2currently in Maryland, 90% sure I'll be in Tennessee in 6 months, but ideal is remote
17:10gfredericksdoes anybody understand maven and/or clojure's maven setup well enough to figure out why this commit broke `mvn test`? https://github.com/clojure/test.check/commit/adb0883101e9bb3216539f1f597f6c3075c251f6
17:14gfredericksI can't tell if it fails while trying to run some kind of cljs thing, or fails because there are now extra files under src/main/clojure/
17:18gfredericksthis must have something to do with the pom.contrib thing
17:20hiredmanwell, that is a project.clj for lein, likely what is in the maven pom is out of sync with the changes to project.clj
17:20gfrederickshiredman: it's also a file renaming
17:21gfrederickslooks like it's the extra cljs files under /src/test/clojure that are doing it
17:22gfredericksI'm guessing this is controlled by the clojure-maven plugin
18:18tmtwdwould there be a way to print the value at the key of y in this example?
18:53justin_smithtmtwd: which?
18:54tmtwdhttp://pastebin.com/Brw6mEZA
18:55tmtwdnvm mind though, I think its impossible/unimportant to do what I wanted to do
18:55zardoz2if 3.7V means about 50% of the charge is still there (does it?) , can I rely on it always meaning roughly that, regardless of the age of the battery and the number of cycles?
18:55zardoz2uh wrong channel
19:30tmtwdso, assoc-in is for vectors, and assoc is for hashes?
19:33justin_smithtmtwd: assoc and assoc-in are both for associative collections, associative collections include vectors and hash-maps
19:33justin_smith,(assoc [] 0 :a)
19:33clojurebot[:a]
19:33tmtwdbut they are not interchangeable, i'm trying to see the difference
19:33justin_smith,(assoc-in [] [0 0 0] :a)
19:33clojurebot[{0 {0 :a}}]
19:34justin_smithtmtwd: assoc-in does a series of nested assoc
19:34justin_smithtmtwd: both default to create a hash-map with nil, but are able to set a numeric index on a vector
19:34justin_smith,(assoc [] 0 :a)
19:34clojurebot[:a]
19:35justin_smith,(assoc-in [[[]]] [0 0 0] :a)
19:35clojurebot[[[:a]]]
19:35justin_smith,(assoc nil :a 0)
19:35clojurebot{:a 0}
19:36tmtwdbut, if I have this: (def users [{:name "James" :age 26} {:name "John" :age 43}]), this fails : (assoc users [1 :age] 44)
19:36tmtwdi need to use assoc-in in that case
19:36justin_smithtmtwd: right, that needs to be assoc-in
19:36tmtwdoh I see
19:36justin_smithbut that isn't because of vectors versus hash-maps
19:36tmtwdassoc-in is more "recursive"
19:36justin_smithright
19:36justin_smithit digs in
19:36tmtwdor its like a "deep" version of assoc
19:37justin_smithexactly
19:37tmtwdcool thanks
19:37justin_smithtmtwd: this is incredibly valuable when you have nested immutable data structures
19:39tmtwdi see
19:41justin_smithbecause otherwise you end up writing a lot of boilerplate to get the structures out and put the other stuff in and rebuild it...
20:47jefelanteIs it a bad idea to use a transducer to write an EDN file for data that gets put on the channel and put it back as-is? https://gist.github.com/anonymous/623164e2ffbbec86432f
20:51justin_smithjefelante: you could use mult/tap instead
20:51jefelanteso tap1 = file writer and tap2 = processor?
20:51justin_smithright
20:52justin_smithalso, the fact that you only have one channel means you can't retrieve the data in parallel
20:52justin_smithmaybe you actually want that
20:52jefelantei dont really understand
20:53justin_smithjefelante: you have a single data processing pipeline, where every task is independent, and they could otherwise be done in parallel
20:53jefelanteoh right
20:53justin_smithso you've artificially slowed down your processing (unless there is a pragmatic reason to only make one request at a time)
20:53jefelanteso with mult/tap, I could have the file writer and the processor happening concurrently
20:54justin_smithyes, but with a different design you could be doing all the downloads concurrently
20:54justin_smithwhether that's an improvement is another can of worms of course
20:54jefelanteright, i see what you mean
20:55jefelanteis there another benefit to mult/tap besides just working concurrently? the thing i'm wondering is if maybe its foolish to introduce a transducer that has a side effect
20:55justin_smithjefelante: an idiom I sometimes use is (dotimes [i parallelism] (go ...)) so that the number "parallelism" decides how many parallel data pipelines are created
20:56justin_smithjefelante: transducers and side effects are fine, but with mult/tap the two tasks can go at their own speed
20:56justin_smithwhich may or may not be a good thing...
20:56justin_smithbut usually if one can finish much faster, you'd like it to do so
20:56jefelanteok cool
20:57justin_smithjefelante: also, your task (storing the data on disk as you do the transactions) is something I am doing in my project at the day job right now
20:58justin_smithwe are using kafka which stores all messages for a configurable time period on disk
20:58justin_smithand then using transit to encode the body of the messages
20:59jefelanteive read about kafka, but i have this issue where i have trouble understanding something complicated (like kafka) unless i make the mistakes that necessitated building that thing
20:59jefelantefirst
20:59justin_smithheh, you have a lot of mistakes (or learning one way or another) before you could use kafka, most likely
20:59justin_smithdistributed systems are very hard
20:59justin_smithI'm still very bad at them...
21:00jefelanteyea, speed isn't an issue for me since i'm rewriting a python script that is plenty fast and runs sequentially, but i'm doing it to try and learn how a larger/async system might work
21:00justin_smithme trying to do hammock driven development on my latest project: http://i.imgur.com/8ryWyNJ.gifv
21:01jefelanteit makes one request every ~15 minutes, extracts some information, and occasionally makes additional follow up requests based on that information
21:01justin_smithjefelante: yeah, in that case do the linear version first, and be aware of your options if you want options for speeding it up in the future
21:02justin_smithjefelante: also, though mongo has a bunch of gotchas, it is very easy to use it to store a map of vanilla clojure data as a document for a system like yours
21:02justin_smithwith a bit of the fiddly stuff about using files taken care of
21:03jefelanteahh that's an interesting point
21:07jefelantejustin_smith: thanks
21:16tmtwdI have an atom http://pastebin.com/HFjCJNZF and I want to assoc such that a new item is appended with a new value
21:16tmtwdwhats the best way to achieve this?
21:16justin_smithupdate-in / conj
21:16tmtwdah
21:18justin_smith,(update-in {:items [{:item "program in clojure"}]} [:items] conj {:item "yolo"})
21:18clojurebot{:items [{:item "program in clojure"} {:item "yolo"}]}
21:18justin_smithor with clojure 1.7, there is also update
21:18justin_smith,(update {:items [{:item "program in clojure"}]} :items conj {:item "yolo"})
21:18clojurebot{:items [{:item "program in clojure"} {:item "yolo"}]}
21:19tmtwdcool
21:19tmtwdthat worked :)
21:19tmtwdthanks
21:20axskhey, i need a macro which expands (mymacro a b c) to "a b c" (i need a macro here, as i dont want to eval the symbols, right?) but cant get there since hours. anyone has an idea?
21:21namra,'(a b c)
21:21clojurebot(a b c)
21:22justin_smith,(defmacro symstring [& args] (clojure.string/join \space args))
21:22clojurebot#'sandbox/symstring
21:22justin_smith,(symstring a b c foo)
21:22clojurebot"a b c foo"
21:23justin_smithaxsk: the thing to remember is that the macro gets the literal form as its input, and should return the form that should be evaluated.
21:28axskwow im surprised by the ease of the answer, (though i still dont understand :>) will come back if i cant work it out, thanks a lot
21:28justin_smithaxsk: it's not a hard macro to figure out :)
21:28justin_smithI mean in terms of seeing what it does
21:28justin_smithof course macros are hard, period
21:30justin_smithaxsk: the args to the macro are a sequence of symbols (thanks to the & destructuring), and the macro simply puts those symbols into a string
21:30justin_smith,(symstring (+ 1 1) a b (inc 0))
21:30clojurebot#error {\n :cause "Unable to resolve symbol: symstring in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: symstring in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6704]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve symbol: symst...
21:30justin_smith,(defmacro symstring [& args] (clojure.string/join \space args))
21:30clojurebot#'sandbox/symstring
21:30justin_smith,(symstring (+ 1 1) a b (inc 0))
21:30clojurebot"(+ 1 1) a b (inc 0)"
21:30justin_smithit's literally using the input form
21:32axsk(clojure.string/join \space (a b))
21:32axsk,(clojure.string/join \space (a b))
21:32clojurebot#error {\n :cause "Unable to resolve symbol: a in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: a in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6704]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve symbol: a in this context"\n ...
21:32axsk,(clojure.string/join \space ('a 'b))
21:32clojurebot""
21:32justin_smithaxsk: those are function calls
21:32axsk,(clojure.string/join \space ['a 'b])
21:32clojurebot"a b"
21:32axskah ok
21:32justin_smiththere you go
21:32justin_smith,(clojure.string/join \space '(a b))
21:32clojurebot"a b"
21:33axskguess i got it. read so much about syntax quoting and unquoting, that i forgot that args is a seq of SYMBOLS :)
21:33justin_smithaxsk: yeah, sometimes you have to think outside the "syntax quote" box. If you are not evaluating any args, you don't need syntax-quote
21:34justin_smithaxsk: imho a good macro tutorial would start with list operations, and only introduce ` after the list operations get tedious, so that it's clear that ` is not magic (and why we actually use it)
21:35TEttingerjustin_smith: I believe brave clojure is that way
21:35gfredericksmy macros talk did that
21:35justin_smithgfredericks: awesome
21:35gfredericks~` is not magic
21:35clojurebotAck. Ack.
21:35gfredericks~`
21:35clojurebot` is not magic
21:35TEttinger~~
21:35clojurebot~ is how you get factoids from me
21:37perifhi all
21:37TEttingerhey perif
21:39justin_smithTEttinger: today I ended a nethack game that had like 20 hours of total play time - I was in the astral plane, had made it to one altar, and was about to try a second altar
21:40justin_smithTEttinger: neutral monk, first two wishes were the eye of the aethiopica and the orb of fate
21:41TEttingerI am not very good at nethack
21:41TEttingerI would recommend brogue if you aren't totally bound to a true terminal
21:42justin_smithTEttinger: oh, what all that means is I was within 10 minutes of winning the game, after about 20 hours playing, and made a stupid mistake and game over
21:42TEttingerhaha
21:42TEttingerwell next time
21:42justin_smithby the end, I had 300+ hitpoints plus a magic item that cuts all damage in half
21:42justin_smithso effectively over 600 hp
21:49tmtwdhttp://pastebin.com/YbhmTiT6 how come the js/alert isn't executed when I call this functions?
21:50justin_smithtmtwd: this doesn't answer your question, but you never need a do inside defn like that
21:50tmtwdhm okay when do I use do then?
21:51justin_smithtmtwd: inside if or for
21:51justin_smithor other contexts that only take one expression
21:51tmtwdor cond?
21:51justin_smithsure, yeah
21:52justin_smithtmtwd: that code is weird because line 3 doesn't do anything at all
21:52justin_smithupdate creates a new collection, but you don't do anything with it
21:53tmtwdoh
21:53justin_smithso it's as if it wasn't done at all
21:53tmtwdI thought since atoms were mutable we could change them
21:53justin_smithyou can, but that's not how
21:54tmtwdwould I use assoc-in then?
21:54justin_smithtmtwd: you would use swap
21:54tmtwdoh of course
21:54justin_smithand then you would need to figure out what to do in the swapping function
21:55justin_smithI guess you want to take list-of-items and put it inside a hash-map under the key :items?
21:55tmtwdno I want to take the value of @upcoming-item and append it to @list-of-items (with a key of :item)
21:56tmtwd(def list-of-items (atom {:items [{:item "program in clojure"} {:item "finish web app"} {:item "solve euler problems"}]}))
21:57justin_smithso something like (swap! list-of-items conj {:item @upcoming-item})
21:57justin_smithnope, not quite
21:57justin_smith(swap! list-of-items update :items conj {:item @upcoming-item})
21:58justin_smith,(def list-of-items (atom {:items [{:item "program in clojure"} {:item "finish web app"} {:item "solve euler problems"}]})))
21:58clojurebot#'sandbox/list-of-items
21:58justin_smith,(def upcoming-item (atom "yolo"))
21:58clojurebot#'sandbox/upcoming-item
21:58justin_smith,(swap! list-of-items update :items conj {:item @upcoming-item})
21:58clojurebot{:items [{:item "program in clojure"} {:item "finish web app"} {:item "solve euler problems"} {:item "yolo"}]}
22:01tmtwdalmost works
22:01justin_smithwhat's missing?
22:03tmtwdi get this instead: (def list-of-items (atom {:items [{:item "program in clojure"} {:item "finish web app"} {:item "solve euler problems"} {:item {:item "yolo"}}]}))
22:03tmtwdan extra :item
22:03justin_smithtmtwd: well chang {:item @upcoming-item} to @upcoming-item
22:04justin_smithI didn't know what was in upcoming-item and I just made a random assumption (that was wrong)
22:05tmtwdoh, ok
22:05tmtwdI'll just get my repl out
22:05justin_smithtmtwd: if you get that result, just change {:item @upcoming-item} in my code to @upcoming-item and it will work
22:06justin_smithbut yes, always have a repl open if you are coding clojure
22:06tmtwdjustin_smith, yup tried that, the compiler did not like that
22:07tmtwdjustin_smith, okay got it :)
22:08tmtwdjustin_smith, you were right
22:44gfredericksdnolen: something about the closure-library upgrade in the recent cljs release broke test.check; is there an easy way for me to try out various commits from closure-library?
22:44gfredericks(i.e., to git-bisect the closure-library project by running test.check)
22:45dnolengfredericks: I can't think of an easy way to do that.
22:45dnolengfredericks: what is the problem you're seeing?
22:46dnolenthe only thing I can think of is something about the PRNG we use
22:47gfredericksdnolen: well this is the new code with the hand-rolled PRNG
22:47gfredericksdnolen: something's undefined at a particular point, which feels like it could be distant from the root cause
22:47dnolengfredericks: still then would be goog.math.Long thing
22:48gfredericksright; I didn't see any recent changes to goog.math.Long itself; I'll start adding asserts to the code to track down the root cause location
22:49dnolengfredericks: and you think this is a GCL bug because the error originates from there?
22:49gfredericksdnolen: because explicitly using the older GCL version with new CLJS works fine
22:49dnolenah interesting
22:52dnolengfredericks: in ClojureScript repo, in script/closure-library-release there's a script for local Maven install of GCL
22:53gfredericksdnolen: okay cool, I'll use that if it comes to it
22:58gfredericksdnolen: looks like this returns nil https://github.com/clojure/test.check/blob/master/src/main/clojure/clojure/test/check/random/longs.cljs#L56
22:59gfredericksseems to be an easy workaround if I replace with (long/fromNumber 1)
23:01gfredericksyep everything's passing now
23:07gfredericksI will probably just leave it at that; should I file a ticket?
23:07gfredericksI've never been confident that I was actually doing interop the right way
23:07gfredericksGCL-interop, rather
23:38devnDoes anyone here run their production apps with `lein trampoline run`?
23:39devnHow are people feeling about AOT these days? I've continued to wonder over the years: to AOT, or not to AOT.
23:39devn(when you have plenty of room for a choice)