#clojure logs

2014-06-30

00:00fitzie '(om/build node {:cx 20 :cy 20}) -> node, ' (om/build-all node [{:cx 20 :cy 20}{:cx 30 :cy 30}]) -> text thing
01:02FrozenlockAfter 10 min of compiling a uberjar: "Release versions may not depend upon snapshots." Thanks... that would have been nice to know it just before compiling...
01:32FrozenlockMy uberjar refuses to run :'-(
01:32FrozenlockException in thread "main" java.lang.NoClassDefFoundError: clojure/tools/reader/reader_types/Reader
01:55taliossounds like your uber jar isn't very uber
01:56Frozenlockit's a lamejar
01:56FrozenlockTried upgrading lein, but I get the same result
01:58taliosdo you actually have a dependency defined for clojure? or is lein giving that for you? uber would only pack the declared deps afaik
01:58taliosif its anything like other uberjar type setups
01:58FrozenlockYup, sweet clojure 1.6.0
01:59FrozenlockI also tried adding manually clojure.tool.reader, but without any difference.
02:14FrozenlockI think I found the problem...
02:14Frozenlockpiggieback with the :repl-options/:injections
02:19FrozenlockMay the #clojure logs help some future souls :-p
04:10latkHow should I be making ajax requests from cljs ?
06:12broquaintlatk: cljs-http or cljs-ajax perhaps?
06:12magopian_!seen cgrand
06:13magopianLast seen : Jan 22 05:31:49 2014 (22 weeks, 5 days, 04:40:15 ago)
06:14magopianmaybe i'll find another way to contact him than waiting here for him to connect ;)
06:15eagleflolatk: goog.net.XhrIo
06:16yocapybara!seen sritchie
06:20magopianyocapybara: that doesn't work, you need to do something like /msg nickserv INFO <nickname>
06:21yocapybaramagopian: thanks! I was trying to remember what the command was then I saw your query and jumped in :) thanks for the tip
06:52noidi_what's the best Clojure debugger for stepping through code? preferably one that doesn't require installing Emacs :)
06:54noidiCCW doesn't work too well for stepping as you constantly end up inside Clojure's implementation
07:00eaglefloRitz is the best I've tried, but that's for Emacs
07:06clgvnoidi: that happens also when you use "step over"?
07:10noidiclgv, no, only when stepping in. but a debugger is pretty useless without the ability to selectively step into functions.
07:15clgvnoidi: well thats the problem of clojure being implemented as java - I mean on a pure clojure vm that would eb easy for the debugger ;)
07:16clgvnoidi: maybe there are filtering options such that you can filter out clojure.lang.*?
07:20noidiclgv, that's a great idea! thanks!
07:27martinklepschAnyone aware of some switch to let liberator render instead of download CSVs?
07:29noidiunfortunately the filters don't seem to work in CCW :/
07:32clgvnoidi: ok I guess it's mainly the unaltered java debugger that is used there
07:39instilledhi. is there a way to use (expect …) and others from ns clojure.contrib.mock.* for fns/vars not declared dynamic? unfortunately I don't own the code I'm mocking. If not, is (with-redefs-fn …) the only way to go?
08:00martinklepschI'm suddenly getting an error that "hostname" cant be nil when trying to compile my uberjar — the hostname is saved in an env var and retrieved via environ but how does that even matter during uberjar compilation?
08:11Glenjaminmartinklepsch: aot compilation involves running the clojure code
08:11Glenjaminwhich triggers any side effects in the top-level of your namespaces
08:13martinklepschGlenjamin, does aot of my main namespace also aot all the other namespaces?
08:14martinklepschbecause the source of the error is in another namespace
08:15martinklepschGlenjamin, btw, I realized slightly to late that you were at EuroClojure! Wanted to grab you and thank you personally for all the time you spend here helping people :)
08:15perplexahellow. i have a function that reads contents of a file and gets called repeatedly from different locations in the code. to make it load the data only nce, would i use a macro that just creates a function that returns the file's contents?
08:16martinklepschperplexa, what about just using (def x (slurp ...)) and using that reference?
08:24Glenjaminmartinklepsch: yeah, AOT is "infectious" as someone put it recently
08:26martinklepschhuh, ok. So how do you get around that? It's kind of as well: ns.core requires ns.index requires ns.retrieval — index and retrieval use the env var but only retrieval fails even though it's further down the requiring chain than index?!
08:30martinklepschAnd it worked before with makes it even wierder
08:31perplexamartinklepsch: i'm gonna look into it. thanks
08:42perplexamartinklepsch: but slurp also doesn't cahce the file read ;p
08:44noidi(def x (delay (slurp ...)))
08:45noidithat will load the file the first time you deref x and return the cached contents on subsequent derefs
08:45perplexathat's pretty much what i am looking for :)
08:45noidithat will also avoid loading the file at compilation time (which is what would happen with (def x (slurp ...)))
08:50perplexanoidi: can i somehow wrap that in a function? ;x
08:50perplexalike, (defn x [target] (delay (slurp target)))
08:50perplexathat yields a delay object ;x
08:51perplexahm
08:51perplexa(defn x [target] @(delay (slurp target))) seemms to do it
08:53perplexameh. that creates new delays every time
08:55perplexanoidi: any way to wrap that inside a function?
08:59Glenjamini think you want memoize
08:59Glenjamin,(doc memoize)
08:59clojurebot"([f]); Returns a memoized version of a referentially transparent function. The memoized version of the function keeps a cache of the mapping from arguments to results and, when calls with the same arguments are repeated often, has higher performance at the expense of higher memory use."
09:00Glenjaminmartinklepsch: simplest way is to only read the env as part of your application's -main function, or the equivalent
09:01perplexathanks :) gonna check in a few
09:06martinklepschGlenjamin, I see. I wonder though how that worked in the first place then
09:09tolitiushaving several files/functions to compile, is there a way to see what [which file/function] Clojure compile is doing (e.g. logging)?
09:09tolitius*compiler
09:11clgvdef-ing file contents is usually not a good idea
09:11clgvbetter compose a file-loading function with the rest of the programm
09:12clgvperplexa: ^^
09:13perplexai'm actually using the load-props function from here: http://stackoverflow.com/questions/7777882/loading-configuration-file-in-clojure-as-data-structure
09:14perplexaand i want it to be cached and not call load-props every time i access a property
09:14perplexabut i'm new to clojure and really don't even have an idea what i am doing :)
09:14perplexajust trying all of the suggestions that get thrown at me
09:24martinklepschGlenjamin, ok so I previously had a very minimal main namespace that actually didn't require anything getting these env vars. When I now get these env vars in main how would I access them in the other namespaces?
09:24Glenjamini'd either pass around a config map from main
09:25Glenjaminor have a config namespace that provides access to the env wrapped in a function/delay or similar
09:28perplexaGlenjamin: memoize is friggin' awesome, exactly what i wanted. thank you
09:46jdkealyis it possible to use karma tests with om ?
09:50martinklepschGlenjamin, that config namespace sounds like the simplest solution in my case. I'm surprised though about the trouble this is causing me right now. Wonder at what stage it might be worth looking into something like stuartsierra's component lib.
10:17benzapwas wondering, if I wanted to make my own remote repl, and I wanted to return results being sent from the server to the client, would I wrap each call made to the repl in a (print-str & body), or is there another way to do this?
10:18borkdudewhat does The Joy of Clojure 2nd edition offer compared to the first edition?
10:31benzaphaving an issue figuring out how to catch stdout, and the result of a sexp within clojure
10:31benzap,(with-out-str (print-str (map (partial + 1) [1 2 3 4]) (println "Hello World!")))
10:31clojurebot"Hello World!\n"
10:33benzapwoops
10:33benzap(with-out-str (print-str (println "Hello World!") (map (partial + 1) [1 2 3 4])))
10:33benzapwhat i'd like to see is "Hello World!\n(2 3 4 5)"
10:35rplaca,(with-out-str (do (println "Hello World!") (println (map (partial + 1) [1 2 3 4]))))
10:35clojurebot"Hello World!\n(2 3 4 5)\n"
10:35rplacabenzap: ^
10:44dbasch,(map inc [1 2 3 4]) ;; benzap
10:44clojurebot(2 3 4 5)
11:12wei__how do I call something like StaticClass.StaticClass2.method(arg1, arg2) in Clojure?
11:13cbpClass1$Class2/method
11:14cbpyou also need to import Class1 and Class$Class2
11:27wei__cbp: does this work if Class2 is defined as a static class inside of Class1?
11:29wei__oh! got working. you have to literally (:import [Class$Class2]). thanks for the help
11:29mordocaiHello, I am wanting to make a super simple UI for a Conway's game of life style application I am working on. I want to display a grid of cells, and support pause/play/quit. Would seesaw be my best bet or is something else recommended? Doesn't need to be GUI, if there is a console based library that will work well.
11:29radixdoes anyone have a description of clojure's implementations of lists and vectors? I'm wondering if they're implemented as HAMTs or in the "usual" way
11:30wei__mordocai: there’s https://github.com/sjl/clojure-lanterna/
11:30_alejandromordocai: https://github.com/sjl/clojure-lanterna/
11:30_alejandrowei__: too fast
11:30wei__:) referenced from http://stevelosh.com/blog/2012/07/caves-of-clojure-01/
11:31cbpradix: http://hypirion.com/musings/understanding-persistent-vector-pt-1
11:31radixhooray :) thanks cbp
11:32mordocaiLooks like it'll probably do what I need. Thank goodness it isn't curses (or if it secretly is, I don't have to deal with it)
11:32radixcbp: great, that's what I was hoping. what about lists, are they typical conses?
11:35pjstadigradix: they are not typical conses in that dotted pairs are not allowed, and there's a difference between a clojure.lang.PersistentList and clojure.lang.Cons
11:36pjstadigbut they both behave the same through the sequence abstraction
11:36radixok, yeah, I knew about no dotted pairs, ... I guess I meant "typical linked list"
11:37radixin other words, putting something at the end needs to reallocate the whole thing?
11:37pjstadigradix: yeah they are pretty typical linked lists
11:37pjstadigradix: yes
11:37radixok cool, that helps a lot, thank you :)
11:37radixvecs are super cool.
11:42Willis1mordocai, if you want to get more ambitious you can try this: https://github.com/oakes/play-clj
11:45gfrederickscan somebody using lein 2.4.2 try `lein help release` and let me know if it hangs?
11:45ndalyit doesn't for me
11:46ndaly"Leiningen 2.4.2 on Java 1.7.0_51 OpenJDK 64-Bit Server VM"
11:47gfrederickshrm
11:47gfredericksI bet this is related to having lein-release in my profile
11:48gfredericksyep
11:49gfredericksdoes anybody know if this new `release` task is meant to have the same functionality as the lein-release plugin?
11:49gfredericksor be able to provide it rather
11:57{blake}mordocai, I had trouble with lanterna. It's not something well-documented, supported or widely used, I don't think. (I also used it for a Game Of Life thing.)
11:57benzapwas wondering, how does the repl capture both the stdout, and the last evaluation?
11:57hotcoreIn Clojure, you would define Person with a single line:
11:57hotcore(defrecord Person [first-name last-name])
11:57hotcoreand work with the record like so:
11:57hotcore(def foo (->Person "Aaron" "Bedra")) ; What does the ->Person mean? Something like "new"?
11:58benzaphotcore: you sure it isn't (def foo (Person. "Aaron" "Bedra"))
11:58gfredericksdefrecord creates a pair of constructor helpers
11:58benzap,(defrecord Person [f l])(Person. "Ben" "Zap")
11:58clojurebotsandbox.Person
11:58gfredericksit essentially did a (defn ->Person [first-name last-name] (Person. first-name last-name))
11:59hotcorebenzap nope. Copied it from the book "Programming Clojure 2nd ed"
11:59gfredericksthere's also map->Person
12:00hotcoregfredericks thx, I get it. Have to read more docs then.
12:02gfrederickshotcore: hopefully the docstring for defrecord mentions this
12:02gfredericks,(doc defrecord)
12:02clojurebot"([name [& fields] & opts+specs]); (defrecord name [fields*] options* specs*) Currently there are no options. Each spec consists of a protocol or interface name followed by zero or more method bodies: protocol-or-interface-or-Object (methodName [args*] body)* Dynamically generates compiled bytecode for class with the given name, in a package with the same name as the current namespace, the given f...
12:02gfrederickssomewhere in the ...
12:05benzapso i'm guessing it's preferred to use ->Person to signify that you're using a clojure record type, instaed of making it ambiguous such that it looks like a java class
12:05benzapor something
12:05hotcoreOK thx for the help.
12:07gfredericksbenzap: there's also a couple advantages to using regular functions instead of interop
12:07gfrederickse.g., you get to avoid :import, and you allow various dynamic abilities that come with vars
12:37dene14_Hi guys, any ideas why alia limiting me at 16 connections to cassandra? for sure, I've set core-connections-per-host to 64 and sending ~40 flows of data to my app
12:37dene14_I've only able to regulate connection pool between 1 and 16 connections
12:43benzapwas wondering, is there a way to return the results of a sexp, and also include all stdout calls as well?
12:44benzap,(let [println (fn [msg] (str msg " foo!"))] (println "I pity the"))
12:44clojurebot"I pity the foo!"
12:46cbpI don't really know what you're asking for but you can bind *out* to a StringWriter
12:48benzapcbp: I mean, say I have a function that has a bunch of (printlns), and I want those concatenated into the (sexp result)
12:48benzap,(do (println "add me to this result") (inc 1))
12:48clojurebotadd me to this result\n2
12:48benzapwat
12:48benzapso basically waht clojurebot is doing
12:49benzap,(do (println "add me to this result") (println "another line") (inc 1))
12:49clojurebotadd me to this result\nanother line\n2
12:49benzaphow is it taking stdout, and incorporating it into the result?
12:51cbp,(let [f #(do (println 1) 2) sw (java.io.StringWriter.)] (binding [*out* sw] (let [x (f)] (str sw x))))
12:51clojurebot"1\n2"
12:52benzapah, I see
14:02martinklepscha question for the vim people here: how have you setup your vim to "split" namespaced fns or namespaces with multiple segments into multiple words so you can move through them with `w`?
14:13PigDudewhich is normal for c which will not be falsy? (defn f ([a b] (f a b default-c))..) or (defn f [a b & [c] ... (or c default-c) ...) ?
14:13PigDude1st style is like in erlang but apart from falsy behavior is there a difference? is one preferred?
14:14iamjarvomartinklepsch: did you see this setup somewhere?
14:14arrdemPigDude: the 1st style won't really work in Clojure unless you have a nilable 3rd argument and are invoking via apply.
14:14bbloomPigDude: if i understand your question, you're asking about default arguments? prefer arity overloading
14:15peterkoHi #clojure, if I want to enhance my Java app with an Clojure REPL, which implementation/project would you recommend?
14:15PigDudebbloom: erm which is arity overloading? :)
14:15martinklepschiamjarvo, no
14:15amalloyPigDude: the first one. do the first one
14:15PigDudehehe ok
14:18Janiczekmartinklepsch: would :set iskeyword-=. help you?
14:18PigDudethank you
14:19Janiczekmartinklepsch: /KEYWORDS here: http://vimdoc.sourceforge.net/htmldoc/usr_05.html
14:19martinklepschJaniczek, there is some conversation in #vim going on about that and tpope basically says it's a no-go
14:19hiredmanpeterko: it depends what you want, if you embed an nrepl server you can connect to it from any nrepl client (which most editors people write clojure in have)
14:20amalloymartinklepsch: i'm not a vim user, but what about using "f." or something to go inside of these symbols instead of treating them as separate words?
14:20tpopenot without breaking other behaviors that is
14:20tpopeamalloy: exactly what I recommended
14:21Willis1 peterko - take a look at this: http://hack-tastic.blogspot.com/2013/05/unable-to-resolve-symbol-original-ns.html
14:21Willis1It's actually simpler now since the nrepl folks fixed the bug mentioned
14:22peterkohiredman: well, I'm pretty new to Clojure, what's a nrepl server? I want to provide a commandline for users to be able to write code "on-the-fly"
14:22bbloommartinklepsch: don't forget that you can use ; after f.
14:23martinklepschbbloom, whats `;` supposed to do?
14:23peterkothe app is just a toy project built on top of NASA's World Wind SDK, so it's a globe. I want users to be able to add various stuff from the repl
14:23amalloyi'm learning all about vim today, apparently
14:24bbloom:help ;
14:24hiredmanpeterko: a console in a gui kind of application?
14:24benzapwas wondering, how could I bound a set of expressions to a given namespace?
14:24Janiczekbbloom: huh, how did I not know about ";" :) basically it repeats the motion?
14:24bbloomJaniczek: yup
14:24peterkohiredman: yes, exactly
14:24martinklepschbbloom, :)
14:24hiredmanincanter has some kind of gui console repl
14:24amalloythere's even http://stackoverflow.com/questions/1523602/the-behavior-of-to-repeat-the-last-t-command-bothers-me-can-you-help-me-make which is about how ; is useless after t
14:25bbloomamalloy: i prefer the way ; works with t the way it is now. it composes for macros better
14:26amalloysure, you wouldn't want to actually change it
14:26bbloombut apparently 7.3.235 changed it
14:26amalloy"repeat previous thing" is more useful than "repeat previous thing unless it's useless in which case do something smart"
14:26bbloomand there is a compat option
14:27tpopewhat on earth, this isn't true at all
14:27bbloomamalloy: well, it could be argued that t should be redefined to be move-right-one-char, then do "till"
14:27tpope; after a t skips a next character match
14:27puredangerpeterko: maybe https://github.com/matlux/jvm-breakglass ?
14:27bbloomtpope: seems it was changed in patch 7.3.235
14:28bbloom*shrug* i didn't notice
14:28tpopebbloom: word. it's also not true in much older vim
14:28amalloy(which is three years ago)
14:28bbloomi guess it doesn't matter that much then
14:28tpopeso it was probably a brief regression
14:28tpopeprobably affected whatever one patch level it was ubuntu had in stable 4 years ago
14:29peterkopuredanger: that looks promising, thanks
14:36pradeepchi .. i have a vector of hash-maps.. i want to remove those hash-maps from the vector whose some field is nil. how can i achieve this
14:37martinklepschpradeepc, use `remove`
14:37cbp(remove #(when (nil? (:some-field %))) maps)
14:37cbper
14:37cbpwithout the when
14:37johnwalkerwhy not
14:38johnwalker(filter :some-field maps)
14:38Chousukestrictly speaking that removes falses too
14:38johnwalkerthats true
14:38arrdemand maps where the :some-field is present but associated to nil.. but that may be a feature
14:39turbofailactually that seems to be exactly what's asked for
14:39johnwalker(filter #(-> % :some-field some?) maps)
14:39arrdem&(doc some)
14:39lazybot⇒ "([pred coll]); Returns the first logical true value of (pred x) for any x in coll, else nil. One common idiom is to use a set as pred, for example this will return :fred if :fred is in the sequence, otherwise nil: (some #{:fred} coll)"
14:40arrdemjohnwalker: I think that's gonna be a sequence type error
14:40johnwalker&(doc some?)
14:40lazybotjava.lang.RuntimeException: Unable to resolve var: some? in this context
14:40arrdem&(doc any?)
14:40lazybotjava.lang.RuntimeException: Unable to resolve var: any? in this context
14:40amalloy(filter (comp some? :some-field) maps)
14:40cbp(doc some?)
14:40clojurebot"([x]); Returns true if x is not nil, false otherwise."
14:41amalloy(remove (comp nil? :some-field) maps)
14:44pradeepcamalloy: martinklepsch : thanks
14:48martinklepschI'm trying to setup my program so that I can AOT compile it but it uses env vars and that broke during the compiling process. So Glenjamin suggested to have a config namespace that uses delay or something similar to not use the env vars during compilation. I'm not sure how to set that up though, the following still breaks: https://gist.github.com/mklappstuhl/0150be874ebc4fc2e1f7
14:49Glenjaminmartinklepsch: the problem is that the def's form will be evalled so it can be assigned
14:49Glenjamindo you really need AOT?
14:49martinklepschGlenjamin, I use the uberjar to run it inside a docker container
14:50martinklepschGlenjamin, can I get an uberjar without AOT?
14:50Glenjaminyou can skip aot in uberjars
14:50Glenjaminone sec
14:50martinklepschGlenjamin,uf — really? :D
14:50cbpmartinklepsch: the delays are meant to wrap the (def (r/tcp- ...)
14:50Glenjaminyeah, you can delay conn itself
14:50martinklepschcbp, yeah that makes more sense
14:50Glenjaminthen only access it as a deref
14:50Glenjaminor invert control and build up runtime state via -main
14:51Glenjaminoh, i might have been wrong about the uberjar aot thing
14:52Glenjaminhttps://github.com/timmc/lein-otf seems to do some stuff
15:04martinklepschcbp, Glenjamin, so with delay it'd look somewhat like this: https://gist.github.com/mklappstuhl/0150be874ebc4fc2e1f7
15:04martinklepsch?
15:06cbpmartinklepsch: yes
15:17jonathanjis there syntax in Clojure for mimicking this Java: } catch (Foo | Bar | Baz e) { ... } ?
15:22PigDudeif i have an async api, how does the channel writer receive a response?
15:22PigDudei am figuring out some things with core.async
15:24PigDudehow do i know which <! corresponds with an input from my >!?
15:24martinklepschcbp, and if I use this connection in multiple places it's probably best to put it into the config namespace and use that from everywhere else right?
15:25ttasteriscoPigDude: what do you mean by "channel writer receive a response"?
15:26jumblemuddle_Is there an irc channel for play-clj?
15:27PigDudettasterisco: (>! adder [1 1]) => 2 ? (where my channel in this example computes sum)
15:27ttasteriscoerm, the channel doesnt do anything
15:27PigDudettasterisco: for what i'm doing, i want (>! c msg) (>! c msg) ..... see if all messages were processed successfully
15:28PigDudettasterisco: i must be using the wrong terminology then
15:28ttasteriscothe syntax is (put! [channel] [data])
15:28ttasteriscosomeone else must take the data from the channel
15:28ttasteriscoand do whatever it wants with it
15:28PigDudeoh, right
15:28PigDudebut how do i know if the puts were successful?
15:28PigDude(that they did not throw, for instance)
15:28Glenjaminthey either block, or queue - it's always* successful
15:29ttasteriscoputting data in the channel will always be successful unless the channel is closed
15:29PigDuderight, i used the wrong terminology
15:29Glenjamintechnically a channel can be full, but this isn't supposed to happen if you set the buffer properly
15:29PigDudehow can the putting code be aware of the success of the taking code?
15:29Glenjaminif you need a reply, you need something to reply on
15:29ttasteriscoPigDude: you're thinking incorrectly
15:29PigDudeso i need two channels?
15:29ttasteriscono
15:29ttasteriscoyou can use the same
15:30PigDudettasterisco: of course i'm thinking incorrectly, there's one blog post about this
15:30PigDudettasterisco: so i'm lost :)
15:30ttasteriscoas Glenjamin said, if you need a reply, it's up to you to define a protocol
15:30Glenjamini think you can send a reply channel down the channel
15:30Glenjaminthen take off that
15:30Glenjamin*if* you really do want an RPC-like thing
15:30PigDudeah ok
15:30PigDudeso like erlang but i have to do it myself
15:30Glenjaminbut don't quote me on that
15:30PigDudeand no atoms
15:31PigDudeso, for instance, I could do this?:
15:31Glenjaminthere's probably a lib that implements async RPC over channels for you somewhere
15:32ttasteriscoPigDude: there's actually more than 1 blog post. there's also a few videos
15:32Glenjaminhere's an example https://gist.github.com/thheller/6140975
15:33PigDudeput many tagged values, then take, identifying success of the put batch by checking for the tags in the tagged response?
15:33Glenjaminthere's some rpc discussion here: https://groups.google.com/d/topic/clojure/P95cOfuXBUs/discussion
15:34Glenjaminalthough, it's worth asking why you want to track success, and whether you could structure things differently
15:34PigDudefair point,
15:35PigDudeOK, thanks!
15:35PigDudethis helps a ton
15:35Glenjaminas a disclaimer, i've watched a few talks on core.async - but never used it
15:36PigDudemy only reference points are various queues, and erlang's mailbox mecahnism
15:36PigDudeit sounds like you just need to manage more stuff yourslef with this
15:37PigDudeesp. wrt error handling
15:37Glenjamini've seen fairly little discussion of error handling :)
15:37Glenjamini guess how to handle errors depends on how you're using the channels, and therefore is too high a level for core.async to worry about
15:39_alejandroPigDude: I'd also recommend Timothy Baldridge's screencasts on core.async
15:39_alejandroHe dives into error handling fairly well
15:39ttasteriscoPigDude: are you trying to do anything specific with core.async?
15:39Glenjaminoh, i shall have to check them out
15:39_alejandrohttps://tbaldridge.pivotshare.com/
15:39Glenjaminwith such a low level abstraction, it's best to talk in concrete use-cases imo
15:40PigDudettasterisco: yea, an async logger
15:40fifosineWhat's the best way to implement an authorization technique for a REST api written with liberator?
15:40Glenjaminheh, if logging fails, who do you tell?
15:40ttasteriscoPigDude: so I'm gonna assume you'll want 1 channel shared by several writers and one single reader that takes the messages from the channel?
15:41ttasterisco"one single reader" as in one entity, not necessarily one thread doing the taking :p
15:42ttasteriscofifosine: I guess everyone recommends Friend. how complex is your authorization scheme?
15:42fifosinettasterisco: I don't know… that's part of my problem, I'm not sure how I should be doing authorization, I just know I need it.
15:43PigDudettasterisco: hm ...
15:44ttasteriscofifosine: typically you have a set of resources that you want to have protected with some kind of special access. e.g. using RBAC
15:44ttasterisco(role based access control)
15:45fifosinettasterisco: I know that I want pretty much all of my resources only to be accessed by a user
15:45fifosine*registered user
15:45fifosineI have no idea if i need to set cookies, or do tokens, or ssl. I'm pretty lost here
15:45PigDudettasterisco: imagine an API that takes a list of numbers and returns if they are prime. (prime? & ns) would put! all those numbers and read the channel for a tagged response [n prime?]. so, the code could put 1000 numbers at once, then by reading tagged values it would be able to return all prime? results
15:46martinklepschCan one do something like :refer [[this :as that] ...] ?
15:48ttasteriscoPigDude: ok, I can imagine that. what's the question? :)
15:49ttasteriscofifosine: you're falling more into authentication that authorization. how you want to implement your auth strategy really depends on your needs. i.e. are you just trying to protect some website? or is it an API? is the client the browser or something like a mobile app?
15:49gfredericksmartinklepsch: there's a renames feature inside of :require
15:50gfredericksI can never remember how it works exactly
15:50gfredericks,(require '[clojure.string :rename {join s-join}])
15:50clojurebotnil
15:50gfredericks,s-join
15:50clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: s-join in this context, compiling:(NO_SOURCE_PATH:0:0)>
15:50gfredericks,(require '[clojure.string :rename {s-join join}])
15:50clojurebotnil
15:50gfredericks,s-join
15:50gfredericks
15:50clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: s-join in this context, compiling:(NO_SOURCE_PATH:0:0)>
15:50fifosinettasterisco: Oh, sorry, I mean authentication. It's a simple REST api.
15:50gfredericks,(require '[clojure.string :renames {s-join join}])
15:50clojurebotnil
15:50gfredericks,s-join
15:50gfredericks
15:50clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: s-join in this context, compiling:(NO_SOURCE_PATH:0:0)>
15:50gfredericks,(require '[clojure.string :renames {join s-join}])
15:50clojurebotnil
15:50gfredericks,s-join
15:50clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: s-join in this context, compiling:(NO_SOURCE_PATH:0:0)>
15:50gfredericksokay I give up
15:50ttasterisco,(require '[clojure.string [refer [join :as j]]) (j "a" "b")
15:50clojurebot#<RuntimeException java.lang.RuntimeException: Unmatched delimiter: )>
15:50nathan7gfredericks: you realise it doesn't keep context
15:51gfredericks,*ns*
15:51clojurebot#<Namespace sandbox>
15:51gfredericks,(def x 2)
15:51clojurebot#'sandbox/x
15:51gfredericksx
15:51gfredericks,x
15:51clojurebot2
15:51gfredericks,(require '[clojure.string :as nathan7])
15:51clojurebotnil
15:51gfredericks,nathan7/join
15:51clojurebot#<string$join clojure.string$join@8ad131>
15:51nathan7oh, it does? that's kind of crazy
15:51ttasterisco,(do (require '[clojure.string [refer [join :as j]]) (j "a" "b"))
15:51clojurebot#<RuntimeException java.lang.RuntimeException: Unmatched delimiter: )>
15:51metellus,clojure.string
15:51clojurebot#<CompilerException java.lang.ClassNotFoundException: clojure.string, compiling:(NO_SOURCE_PATH:0:0)>
15:52gfredericksthe require docstring doesn't mention this at all :/
15:52ttasterisco(require '[clojure.string [refer [join :as j]]]) (j "a" "b")
15:52ttasterisco,(require '[clojure.string [refer [join :as j]]]) (j "a" "b")
15:52clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No value supplied for key: true>
15:52fifosinettasterisco: Oh, sorry, I mean authentication.  It's a simple REST api.
15:52gfredericksoh I got it
15:52gfrederickssuper confusing
15:53gfredericks,(require '[clojure.string :refer [join] :rename {join s-join}])
15:53clojurebotnil
15:53gfredericks,s-join
15:53clojurebot#<string$join clojure.string$join@8ad131>
15:53gfredericks,join
15:53clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: join in this context, compiling:(NO_SOURCE_PATH:0:0)>
15:53ttasteriscofifosine: is it just consumed by a browser client? or mobile apps, etc?
15:53Glenjamin,(doc require)
15:53clojurebot"([& args]); Loads libs, skipping any that are already loaded. Each argument is either a libspec that identifies a lib, a prefix list that identifies multiple libs whose names share a common prefix, or a flag that modifies how all the identified libs are loaded. Use :require in the ns macro in preference to calling this directly. Libs A 'lib' is a named set of resources in classpath whose contents...
15:53gfredericksmartinklepsch: ^ that's how it works
15:53hyPiRiongfredericks: that's not confusing, is it? You must refer it first, then rename.
15:53Glenjamindo you get both symbols, or only one?
15:53gfrederickshyPiRion: wouldn't be ambigious to only rename amirite?
15:53Glenjaminif you had a join before, is it now clobbered?
15:53gfredericksGlenjamin: just one, see the error on `join`
15:54Glenjaminthat seems misleading from the api usage imo
15:54fifosinettasterisco: I'm writing it to be consumed by the browser, but I may try to take it into an app
15:54Glenjamin,(def join 1)
15:54clojurebot#'sandbox/join
15:54ttasteriscohttp://stackoverflow.com/questions/14610957/how-to-rename-using-ns-require-refer
15:54Glenjamin,(require '[clojure.string :refer [join] :rename {join s-join}])
15:54clojurebotnil
15:54Glenjamin,join
15:54clojurebot1
15:55Glenjamini should really stop using the public repl to try things out
15:55Glenjaminbut it's so handy!
15:55FrozenlockGlenjamin: Don't you have a REPL always running on your machine?
15:55Glenjaminonly when i'm doing clojure stuff :)
15:56FrozenlockWhich is not always?!? *gasp*
15:56Frozenlock:-p
15:56Glenjaminheh, if only
15:56Glenjaminthe require docstring doesn't even mention :refer :s
15:57fifosinettasterisco: Both at some point
15:57ttasteriscofifosine: the strategy is usually for a token based authentication
15:57fifosinettasterisco: Is there a lib I should use for this?
15:57ttasterisco$google clojure friend
15:57lazybot[cemerick/friend · GitHub] https://github.com/cemerick/friend
15:59fifosinettasterisco: Is using the auth token easy to implement in friend?
16:00ttasteriscoI can't really comment on that, my experience with Friend is very limited :p
16:01Frozenlockfifosine: My experience with friend is that it's a little complicated, but better than everything else...
16:01amalloygfredericks: require/rename, not require/renames
16:02amalloyoh, you got there eventually
16:02ttasteriscofifosine: if you're ok with testing a still alpha library that only easily supports cookies for now, then I have to advertise my own library :p
16:02fifosinettasterisco: I thought you said to use an auth token?
16:02ttasteriscofifosine: ye, but you said for now a browser. you can always change later
16:03ttasterisco(or even mix them)
16:04gfredericksamalloy: all of my thought processes I put on full display in IRC
16:05gfredericksif it's not worth wasting everybody's time with in a public forum, is it really worth thinking about?
16:08Glenjamin(inc gfredericks)
16:08lazybot⇒ 73
16:10Jaoodfifosine: or use rails
16:50whodidthiswhen can we has euroclo videos
17:06dorolubaHi! When looking at om-data-vis, I see the line in project.clj: [org.clojure/clojurescript "0.0-2234" :scope "provided"]. I looked up what scope "provided" means to Maven, but I don't see how it helps in Clojurescript. Any ideas?
17:08noncom|2,(doc class?)
17:08clojurebot"([x]); Returns true if x is an instance of Class"
17:08noncom|2(class? 1 Integer)
17:08noncom|2,(class? 1 Integer)
17:08clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (2) passed to: core/class?>
17:08Glenjamin,(class? Integer)
17:08clojurebottrue
17:08Glenjamin,(class? "Int")
17:08clojurebotfalse
17:09Glenjamin,(instance? Integer Class)
17:09clojurebotfalse
17:09Glenjaminheh
17:09whodidthis,(instance? Long 1)
17:09clojurebottrue
17:09Glenjaminoh right
17:09amalloydoroluba: it means maven should assume that cljs will wind up in the classpath somehow, and not try to include it as a formal dependency
17:09Glenjamin,(instance? Class Integer)
17:09clojurebottrue
17:09Glenjamini wish docstrings differentiated between arguments and words
17:12dorolubaamalloy: Thanks! I guess I should remove "provided", because I'd hope Maven includes it...
17:15noncom|2yeah!
18:19riotonthebay_CLJS question: I'm trying to use something found in google-closure-library-third-party. I'm depending on it explicitly, but can't access it. Is there something else I need to be doing?
18:20ttasterisco|awayriotonthebay_: check http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html
18:23riotonthebay_ttasterisco|away: Thanks for the link. I've seen this and am aware of :libs. I'm not sure how to reference something from a leiningen dependency, however.
18:50amalloyhm. i've got this macro, (keyed [a b c]) expands to {:a a :b b :c c}. i've been using it for ages and it's nice, but i recently realized it means i can't just rename locals and then update the places in which they're used
18:50amalloylike if i decide to call a "absolute" instead of a, and then use its rename, the map that i return changes. bummer
18:50cespareI'm having a problem where loading an EDN-ified record from a file fails with a ClassNotFoundException. Works fine from a repl; not from the code running from my uberjar. Ideas?
18:56hiredmanyou don't have the source file that defines that record type loaded
18:57cesparehiredman: it's weird -- the file where the exception occurs is the same one where the record type is defined
18:57cesparethe record is defined at the top
18:57hiredmanwhat reader are you using?
18:57cespareread-string; about to use edn/read-string now to see if that works.
18:57hiredmanrecord type read literals aren't really part of edn
18:58hiredmanthey are part of the edn superset that clojure code uses
18:58hiredmancespare: try just read-string
18:58nathan7amalloy: many languages with { key: value } style records have { key } for this
18:58cespareThat's what we're doing.
18:58cesparehiredman: ^^
18:59hiredmancespare: pastebin the exception from read-string?
18:59nathan7amalloy: maybe do (keyed [:a absolute b c])
19:00hiredmancespare: how are you printing the record? could the record contain another record?
19:01cesparehiredman: http://pastie.org/9341826
19:01cesparehiredman: We're printing with prn
19:01cesparehiredman: the record does contain another record, but those are also defined at the top of the same file, and the exception is about the outer one.
19:04hiredmancespare: put a (prn (.getCanonicalName WeightData)) in the file to have it print out what it thinks the classname for the record is
19:04hiredmanat this point I would guess some kind of bug around _/- in a record name
19:05hiredmancespare: it looks like you are aot compiling, you may also want to clear out target/
19:05cesparehiredman: http://pastie.org/9341842 has a bit more info about the record
19:05cesparehiredman: definitely not aot compiling; getting rid of the aot is what made this issue appear ;P
19:06cesparehiredman: I've reproed without any target dir at all.
19:07hiredmancespare: ah, I would double check your record names all match up, it is very possible a name changed, but it kept working with a stale class file in target
19:07cesparehiredman: the getCanonicalName returns the same as in the edn file: "ml_lib.model.WeightData"
19:08cesparehiredman: the stale name thing doesn't seem possible. I've lein cleaned a bunch and the issue is happening on many machines.
19:08cesparehiredman: additionally, the same thing works in the repl if I require the file beforehand.
19:09cesparejust not when calling the jar directly with java.
19:10hiredmancespare: how do you know the namespace is loaded?
19:10cespareIf I add aot back in, it works.
19:10cesparehiredman: becauase the place where the exception is thrown is in the same namespace.
19:10hiredmancespare: how do you know the namespace that defines the records is loaded?
19:11cesparethat is the same namespace.
19:11fifosineCan anyone recommend a simple library for implementing an authentication scheme that uses an auth token? I'm attempting to write a RESTful api using Clojure and authentication is the one thing that's stumping me.
19:11cesparesee the stack trace.
19:11hiredmancespare: a namespace is a compilation environment, you can load and run code defined in a given namespace without loading the namespace
19:12hiredmancespare: is the namespace in question required anywhere?
19:12dbaschfifosine: I had that problem and ended up doing it myself. Not sure if any libraries out there are mature enough
19:12cesparehiredman: in the stack trace, model_manager requires the ml-lib.model namespace at the top
19:12fifosinedbasch: Do you have a github repo I could investigate? I have no idea how I'd implement my own auth-token authentication scheme.
19:12cespare(or rather model-manager in clojure-land)
19:13dbaschfifosine: unfortunately mine is private, but it's really not that hard
19:13dbaschfifosine: for tokens I use java UUID
19:13dbaschkeep them in a postgresql db
19:14dbaschthey have a ttl that gets refreshed if the user continues to use it
19:14andyfcespare: Is the record name a key in your default-data-readers? Or do you supply an option map to edn/read with key :readers ?
19:14fifosinedbasch: So a user posts their credentials to a resource, if it's successful, do they get a token, stored in their cookie?
19:15dbaschfifosine: yes
19:15hiredman,(defrecord Foo [])
19:15clojurebotsandbox.Foo
19:15dbaschalthough in my case I don't care how they store it, this is an api
19:15hiredman,#sandbox.Foo[]
19:15clojurebot#<RuntimeException java.lang.RuntimeException: Record construction syntax can only be used when *read-eval* == true>
19:15hiredmanbut anyway, he is trying to do that thing
19:15fifosinedbasch: How do you send the token to them in a way that is secure?
19:15cespareandyf: neither. Why would that be necessary?
19:15hiredmanwhich doesn't require the reader to be the maps
19:16dbaschfifosine: of course, my api is ssl-only
19:16hiredmancespare: what does (prn (.getClassloader WeightData)) say?
19:16andyfI am pretty sure that using the edn reader to read records requires at least one of those things to work
19:16cesparehiredman: answered above. "ml_lib.model.WeightData"
19:16arrdemdbasch: so I actually got asked about that yesterday... did you wind up doing ssl at the Ring layer or do you have a proxy?
19:17cespareandyf: again, works fine when aot is on, works fine from the repl
19:17dbascharrdem: I have a proxy, and do it over nginx
19:17hiredmancespare: new method
19:17arrdemdbasch: that's what I thought was standard. ok.
19:17cesparehiredman: sorry
19:17fifosinedbasch: Ok, so you mandate all requests use ssl, they send you creds, and you respond with the token. Then do all further requests require it in session-store or as a parameter?
19:17hiredmancespare: getClassLoader not getCannonicalName
19:17dbaschfifosine: as a parameter
19:17cesparehiredman: #<AppClassLoader sun.misc.Launcher$AppClassLoader@6411c21b>
19:17andyfWith clojure.edn/read? I don't see how
19:17cespareandyf: i'm just using read-string
19:17cespareandyf: clojure.core/read-string
19:18andyfThat is in clojure.core which is different
19:18fifosinedbasch: Are you using liberator by any chance?
19:18cespareandyf: same thing occurs with clojure.edn/read-string
19:18hiredmancespare: what version of clojure?
19:18cesparehiredman: 1.5.1
19:18dbaschfifosine: no, compojure
19:19andyfSorry when you said edn I assumed you were using clojure.edn/read or clojure.edn/read-string
19:19fifosinedbasch: Ok, just curious cause liberator was suggested to me for it complying with all http specs
19:19hiredmancespare: what does the reader literal look like?
19:20cesparehiredman: if you mean the string I'm trying to read, I put an example at the bottom of http://pastie.org/9341842
19:21dbaschfifosine: no idea if liberator would have helped me, I wasn't aware of liberator when I built this (6 months ago more or less)
19:21hiredmancespare: I would try swapping the _ with - in the printed string
19:22hiredmancould very possibly be some kind of bug in _ and - handling in records
19:22cesparehiredman: but leave the . instead of a /
19:22cespare?
19:22hiredmanright
19:22fifosinedbasch: When the user logs out, do you delete the record from the db or just mark it expired?
19:22hiredmanml-lib.model.WeightData
19:22dbaschfifosine: I null it out just to be sure, but it's not really necessary
19:22hiredmanif at all possible I would avoid namespaces with - in the name all together
19:22hiredman(dunno if that would help here)
19:23cesparehiredman: same ClassNotFoundException with ml-lib.model.WeightData
19:23dbaschfifosine: it's nice because it allows me to look at the db and see who's logged in at a glance
19:23cesparehiredman: and why would it be working when we have aot enabled or from the repl, if such a bug exisetd?
19:24hiredmancespare: good point
19:24fifosinedbasch: Sorry if answering these questions is tiresome—I'm trying to write my first webapp in Clojure. Did it take a lot of effort to make your api ssl-only?
19:24hiredmanit must be a classloader thing
19:24hiredmanah
19:24dbaschfifosine: no, the hardest part was buying the cert :)
19:24fifosineI don't really know what's necessary to make sure that happens. Is it even a clojure thing?
19:24hiredmanOh
19:24hiredmancespare: something is fishy
19:24cesparehiredman: if this matters, I'm running the thing with java -cp path/to/proj.jar clojure.main -m project.handler
19:25hiredmancespare: I would check your classpath, if the record didn't come from an aot generated classpath, it's classloader should be a DynamicClassLoader
19:25hiredmancespare: not the sun.misc.Appwhatever
19:27hiredmanthe sun misc whatever classloader only sees the classfiles that exist on disk/in jars at launch, not the dynamically generated classfiles
19:27hiredmanso if a record claims to have been loaded from sun.misc, it must have been aot compiled
19:27cesparehiredman: ok, that was due to my :gen-class I put on the model namespace as part of trying to find the problem
19:27cesparehiredman: Without the gen-class, the problem still happens, but indeed the class loader is DynamicClassLoader
19:28hiredmanok, so that sort of makes sense now at least
19:28hiredmanthe class is visible from the dynamic classloader, but not the sun.misc whatever that is trying to load it
19:28hiredmanso the question is, why is that the classloader trying to load it
19:29andyfcespare: Not your original question, but if you do not have strong trust in the source of data you are reading you should consider using the read or read-string in clojure.edn, not clojure.core. See http://clojuredocs.org/clojure_core/clojure.core/read
19:29hiredmanif you put (prn @clojure.lang.Compiler/LOADER) in read-introspectable-models what does it print?
19:30cespareandyf: makes sense. I do have strong trust in this edn data though.
19:31cesparehiredman: ok, trying that
19:32cesparehiredman: uh, #<Unbound Unbound: #<Var: --unnamed-->>
19:32hiredmanhuh
19:33hiredmancespare: that is very weird
19:33hiredmanin order for clojure code to be compiled LOADER *must* have a value
19:34hiredmancespare: you said it worked in the repl?
19:34amalloybut once compilation is over, ie at runtime, it'd be normal for that not to be bound, right, hiredman?
19:35hiredmanamalloy: yeah, this might just be a *terrible* bug in record reader literals
19:35cesparehiredman: yes. When I run things from the repl, the prn I put in that function shows #<DynamicClassLoader clojure.lang.DynamicClassLoader@d430c4f>
19:35hiredmancespare: you may be able to work around it by switching to a tagged literal
19:35ttasteriscodbasch: are you using nonces? or are you vulnerable to replay attacks? :)
19:36hiredmancespare: slightly more work, but then the data really would be edn, not clojure's superset of edn
19:36cesparehiredman: that requires this separate data_readers.clj file?
19:36hiredmancespare: that or you pass a map ofr readers in to edn/read or edn/read-string
19:37cesparehiredman: hmm, ok, I'll see if that works.
19:37arrdemttasterisco: how do you replay an ssl link? you'd have to determine what call takes place in each ssl'd transmission and then replay the packets to a closed one time channel..
19:38ttasteriscooh, he's using ssl, right
19:41hiredmannice litte repro case:
19:41hiredmanjava -jar target/clojure-1.7.0-master-SNAPSHOT.jar -e "(do (ns foo.bar) (defrecord Foo []) (defn -main [] (prn (->Foo)) (read-string \"#foo.bar.Foo[]\")))" -m foo.bar
19:44cesparehiredman: sure enough, works fine from repl.
19:44amalloyhiredman: why not (read-string (prn-str (->Foo)))?
19:45cesparehiredman: i'm hoping using edn proper will solve the problem for us...but in the meantime, is this a bug that we should file somewhere?
19:45hiredmanamalloy: I didn't have any prn at first
19:45hiredmancespare: I am typing one up
19:45cesparehiredman: thanks!
19:50hiredmanhttp://dev.clojure.org/jira/browse/CLJ-1457
19:53{blake}Hey, all: Parsing XML using clojure.xml parse and zip and getting back :tag :a-tag, :attrs :a-attr, :content :a-content in a map, when I'd just like :a-tag :a-content. Thought about using the startparse in parse but that seems like a rabbit hole.
19:53fifosinedbasch: How do you force https-only?
19:54{blake}Was looking at walk. Seems like it should work but I can't seem to do anything with it but return exactly what I pass in or...nothing.
20:02cesparehiredman: thanks
20:02cesparehiredman: Got everything working using edn/read-string with explicit readers.
20:04hiredmancool
20:14fowlslegsIs there a way I can convert a BigInt or BigInteger to a binary string or to bytes?
20:15fowlslegsOR is there a way I can perform bitwise operations on BigInts or BigIntegers such as bit-xor?
20:18pjstadigfowlslegs: have you looked at the javadocs for BigIntegeR?
20:19amalloy$google javadoc biginteger xor
20:19lazybot[BigInteger (Java Platform SE 8 ) - Oracle Documentation] http://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html
20:22dbaschfifosine: via nginx
20:22pjstadigbit-xor used to work for BigIntegers back in 1.2
20:22pjstadigyet another thing that was broken needlessly by clojure.lang.BigInt
20:25fowlslegs.toByteArray might work for what I'm doing
20:26pjstadigor the xor method on BigInteger?
20:26hiredmanshould have used a rules system for generating Numbers.java instead of writing it by hand
20:27fowlslegsDidn't even see that. Thanks pjstadig.
20:27hiredmanpjstadig: it doesn't look that was accidentally broken
20:27pjstadighiredman: or just not introduce the BigInt class
20:27hiredmanNumbers.java seems to expressly rule out "bignums" for bit operations
20:29hiredmanhttps://github.com/clojure/clojure/commit/601d9521f88f8fb00e670d2823857cdcb2b2e1c3
20:29hiredmanI wonder what the rationale for that was
20:29pjstadigtrue because bit ops don't work for BigDecimal anymore either
20:30hiredmanpjstadig: I suspect that don't work for BigInt either
20:30hiredmanthey
20:30pjstadignope
20:31hiredmanat work every commit message references the jira ticket behind the work, I wish clojure had that policy sometimes
20:31hiredmannot that I would expect there to be much useful discussion in the jira ticket
20:32pjstadigi'll have to ask taggart, since i work with him now
20:32hiredmanhah, well, see if he remembers
20:32hiredmanfrom 2011
20:32pjstadigyeah
20:33pjstadigit's worth a try
20:33hiredmanOh, that might be pre jira anyway
20:33pjstadighelp us taggart. You're our only hope!
20:33amalloyi recall the decision to disallow some bitops for bignums being made. seemed like some of them don't totally make sense for an arbitrary number of bits?
20:34hiredmanhttp://dev.clojure.org/jira/browse/CLJ-767
20:34pjstadigBigInteger implements them (which doesn't necessarily mean its correct)
20:36hiredmanhttps://groups.google.com/forum/#!topic/clojure-dev/IZHL8ASNjKY
20:37hiredmanrich's jls link doesn't work anymore of course
20:39pjstadigthe discussion said that Big* shouldn't work with shift ops, and that the bit ops should have primitives as default, but the patch removed Big* support for bit ops
20:40hiredmanthat is a splitting a hair pretty fine
20:41hiredmanI really should finish Archimedes
21:03fitzcljs/om/js-interop question re: https://www.refheap.com/87685 why aren't the x and y coordinates of the circles being updated on tick? (and yes, I realize using om for this is probably dumb)
21:10ivanfitz: om might not be looking for changes in that mutable .nodes structure
21:10ivanI might have missed other errors, so YMMV with that idea
21:12fitzI'm assuming that's what's happening, just not sure of how to rectify it
21:14arrdemI seem to recall that there was a REPL tool for pulling examples from clojuredocs. Is this the case?
21:22fitzfigured it out btw, switching to (om/update (data :nodes (js->clj n))) and (data "x")/(data "y") worked