#clojure logs

2015-02-25

02:33rntzis there a good way to drop the first Nth elements from a PersistentList, and be guaranteed I get a PersistentList back?
02:33rntz('drop returns a LazySeq)
02:35rntzI guess I could (list* (drop N orig-list)), but presumably that copies everything in orig-list
02:35rntzwhich isn't what I want
02:37rntz(for that matter, is there a function to drop N elements from (either end of) a vector?)
02:37TEttingerrntz, why do you need a list specifically?
02:38TEttingerthe append at front behavior?
02:38rntzTEttinger: I'd like not to have to think about how laziness interacts with performance here, and I know that using a plain old eager data structure will work just fine :P
02:39rntzI'd also just like to know, for future reference, whether this is possible
02:39TEttingerwell think about how persistent immutable data structures work
02:39TEttinger(list* (drop N orig-list)) should share structure with orig-list
02:39TEttingernot sure there
02:40rntzsince (list* (drop N orig-vector)) could not share structure, I'm dubious that (list* (drop N orig-list)) will
02:40rntzunless the lazy seq *remembers* whether it was created from a list or a vector
02:40TEttingerif you want the best performance and an eager data structure, 1D arrays are still the fastest thing on the JVM
02:40rntzwhich is possible but would be hella weird
02:41TEttinger$google hiphip prismatic
02:41lazybot[Prismatic/hiphip · GitHub] https://github.com/Prismatic/hiphip
02:41TEttingergood clojure lib for dealing with arrays idiomatically
02:42rntzI don't need something optimized. I just want to know whether I can drop N elements from a list and get a list back (if the answer is "no", that's good to know too!)
02:42rntzoh, also, 'pop won't work on an arbitrary lazy seq, only on IPersistent things
02:45TEttingerdamn, zach just quit
02:45TEttingerztellman is the guy when it comes to low-level performance knowledge in clojure
02:46TEttingerhe might know off the top of his head how lists and seqs share structure
02:47amalloyTEttinger: well uh, for lists and seqs it's really easy. for vectors and maps it's more complicated
02:47TEttingeramalloy is also a performance guru yay! I thought you would be asleep
02:47amalloyalso (list* x) === (seq x)
02:48TEttingerso I guess the question is how to un-lazy a seq
02:48rntzeh, I'm just going to use a vector instead of a list and use subvec & rseq
02:48amalloyrntz: you are looking for nthnext
02:49amalloywhich just calls nth N times
02:49amalloyer, calls next
02:49rntzamalloy: er, won't (list* x) force side-effects in x, while (seq x) won't?
02:49amalloyrntz: no
02:49amalloyit is literally just a call to seq
02:49amalloy~def list*
02:49amalloyit doesn't do any compying or whatever
02:49amalloynthnext is the non-lazy version of drop
02:50rntzyeah, nthnext does look like what I'm looking for, thanks
02:50amalloyyou're welcome
02:51TEttinger(inc amalloy)
02:51lazybot⇒ 230
02:51rntzah, I see. does 'seq force the head of a lazy sequence or something?
02:51amalloyrntz: yes
02:51amalloyalso converts various other seqable things which are not yet seqs to become seqs
02:52amalloyeg, ##[1 2 3] isn't a seq, but ##(seq [1 2 3]) is
02:52lazybot[1 2 3] ⇒ [1 2 3]
02:52lazybot(seq [1 2 3]) ⇒ (1 2 3)
03:02TEttingeris this a new lazybot feature?
03:02TEttinger##(reductions *' (range 2 5))
03:02lazybot⇒ (2 6 24)
03:02TEttinger##(reductions *' (range 2 5)) ##(reductions *' (range 3 30))
03:02lazybot(reductions *' (range 2 5)) ⇒ (2 6 24)
03:02lazybot(reductions *' (range 3 30)) ⇒ (3 12 60 360 2520 20160 181440 1814400 19958400 239500800 3113510400 43589145600 653837184000 10461394944000 177843714048000 3201186852864000 60822550204416000 1216451004088320000 25545471085854720000N 562000363888803840000N 12926008369442488320000N 31022420086661971... https://www.refheap.com/97766
03:03TEttingerah, when there's more than one ## in a line
05:25sveriHi, why does this: (doseq [m [{:foo "bar"} {:foo "bar2"}]] (println (key m))) throw: ClassCastException clojure.lang.PersistentArrayMap cannot be cast to java.util.Map$Entry?
05:26Glenjamin,(key {:foo "bar"})
05:26clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to java.util.Map$Entry>
05:26Glenjamin,(keys {:foo "bar"})
05:26clojurebot(:foo)
05:26Glenjamin,(key (first {:foo "bar"}))
05:26clojurebot:foo
05:28sveri-.-
05:28sveriGlenjamin: thank you, I had a different expectation which was plainly wrong
05:30sverifunny thing is, the first iteration of my method was correct, but then I started "thinking" about it and made it crash by "fixing" it -.-
05:58dysfunwoo, my first paid clojure project has gone live
05:59kaplandysfun, how was working on it like?
06:00dysfunlovely. i was the only dev :)
06:00dysfunwell, on the clojure side anyway
06:00kaplanoh. what was it about?
06:00dysfuni inherited a lot of frontend
06:00dysfunoh the clojure is basically just some template rendering stuff and a cms backend
06:01dysfunone of the pleasing things is people are saying it loads really quickly. and that's before i've even properly optimised the images
06:01dysfunyou know, the sort of thing php is quite good at and most people would have done in php
06:03dysfunbet it wouldn't load quite so quickly in php without some sort of cacheing though
06:16devllcongrats dysfun
06:18devlldo you have blogs or anything similar on workflow of developing Clojure apps?
06:26subhashgodevil : I am working on a tutorial of that sort: https://github.com/subhash/clj-stack
06:28piranhaanybody familiar with pedestal here? I have strange behavior and I'm not sure what's going on: http://paste.in.ua/10418/
06:28piranhait doesn't match any route I have
06:31devllsubhashgo: nice.
06:32subhashgoThanks devil
06:33subhashgopiranha: Are you sure you have defined home-page?
06:33dysfundevll: what sort of apps are you developing?
06:34piranhasubhashgo: yeah I'm pretty sure
06:34piranhaif I change routes to just [[["/" {:get home-page}]]] - it works
06:34subhashgoYeah that's the customary way, I guess
06:35devlldysfun: a search engine for a small audience. I used casperjs for crawling.
06:35dysfunso it's a website, essentially?
06:35devllyes.
06:36dysfunwell my workflow, i'd probably start with `lein new luminus myapp' and then remove the bits I don't want
06:36devllI used react,webpack for front end.
06:36dysfunom (clojurescript) is a fantastic library around react
06:39devllyes. I am a little bit tight on schedule and future collaborators know nothing about Clojure,so I am trying keep it simpler.
06:40devllI definitely checkout OM for next release.
06:42KneivaIs there a more concise way to do this: (for [a1 actions a2 actions a3 actions a4 actions a5 actions a6 actions a7 actions a8 actions] [a1 a2 a3 a4 a5 a6 a7 a8]) ?
06:42devllbtw why luminus over compojure?
06:42dysfunluminus is just a bundle of components. one of them is compojure
06:42dysfunit's a sensible default webapp template
06:42subhashgopiranha: It seems to work for me
06:43dysfuni customise it quite heavily tbh, but it's handy being able to get going straight away even if lots of it gets deleted
06:43dysfuni really dislike how it handles middleware. that's usually one of the first things to get replaced
06:43alhimik45Kneiva: somethin like ,(map vector [1 2 3] [4 5 6] [7 8 9])
06:43dysfuni also now use aleph for serving my web requests
06:44alhimik45,(map vector [1 2 3] [4 5 6] [7 8 9])
06:44clojurebot([1 4 7] [2 5 8] [3 6 9])
06:46piranhasubhashgo: argh, what can this be...
06:46devllI saw the benchmarks the other day. I havenot used them yet. I will checkout them soon.Thanks for sharing.
06:47Kneivaalhimik45: nope, I want all the combinations
06:47alhimik45Kneiva: oops, I misread your question
06:52Kneivamath.combinatorics might give what I need. I was just wondering if there is a more concise way to do it without a library.
06:53subhashgopiranha: Maybe I am missing something, here's my paste: http://paste.in.ua/10419/
07:03Kneivayep, permutations is the thing. Maybe I'll make a macro to avoid using that library.
07:22clgvhow do I configure jetty programatically to work when proxied by apache? the apache config is working via mod_proxy/mod_proxy_http - but when proxing my.domain.de/app to jetty, it uses my.domain.de/somejettyhostedpage instead of my.domain.de/app/somejettyhostedpage
07:28Guest18004Hi all, I have a clojurescript (chestnut template) site running locally and to test it in a mobile I have hard coded my local ip in the dev.clj and dev.cljs for weasel and figwheel and that works. But I'm at a loss how to make that work in a team environment, any ideas?
07:30justin_smithGuest18004: do you want other people on your team to access the repls? or just the app?
07:37clgvGuest18004: how about using 127.0.0.1? ;)
07:42Guest18004justin_smith: I was not very clear, each dev runs their own thing, it is more about what is a good strategy for keeping local dev settings out of the repository
07:43justin_smithoh, a gitignored config.edn file of course
07:43justin_smithkeep it in a standard place, but make sure git doesn't prompt for checking in changes
07:43justin_smiththen read the file to get your settings
07:44justin_smith(and complain if it isn't present of course0
07:44justin_smith)
07:50mibr0789How can I import several Java classes I have stored in a vector? import will complain that it can't import the actual vector I am providing.
07:54AeroNotixmibr0789: show your code, please?
07:57mibr0789(def classes [com.company.lib.Class1 com.company.lib.Class2]) then I would like to something like (import classes), or (doseq [c classes] (import c))
07:57AeroNotixmibr0789: what are you trying to solve?
07:57justin_smithmibr0789: that doesn't work because import is a macro
07:57mibr0789justin_smith: exactly
07:58mibr0789AeroNotix: I have a lot of classes, and I need them all imported. I also need them to be added to one kind of registry. I could do that manually, but then I would need to hardcode all classes twice. Once for the imports and once for the addition to the registry.
07:59justin_smithmibr0789: you can use classes without using import you know
07:59justin_smithit suffices if they are on the classpath
07:59justin_smithimport just makes using them more concise
07:59justin_smithimport doesn't trigger or facilitate any loading behavior
08:00mibr0789justin_smith: but I do want them easily accessible from the REPL
08:00dnolenmibr0789: there's no way to do that. It's often requested often declined enhancement.
08:01mibr0789dnolen: oh.. ok. Thank you, then I know I should stop trying :)
08:02AeroNotix,(clojure.core/import* "java.util.Date")
08:02clojurebotjava.util.Date
08:02justin_smithmibr0789: this is why I prefer to just use the user ns, and require / refer my other namespaces, then I only need to set up my convenience stuff in that one ns
08:02justin_smithinstead of needing magic
08:02AeroNotixmibr0789: you can hack something together with that^ but it's gross, y'know?
08:02noidiwhat does :failing-size mean in test.check's result map?
08:03mibr0789AeroNotix: Thanks, yeah, I'd rather not then :)
08:03dnolenmibr0789: you just need explicit imports, given that writing imports are not what we spend most of our time doing this is considered minor annoynace, and a benefit for code reading.
08:05mibr0789justin_smith: I see, makes sense
08:06justin_smithmibr0789: you can either have a user.clj in your project, or use an injection in your project.clj to set up your user ns in the :dev profile
08:06timvisheri'm having trouble with weasel which is confusing because it's been working up until now flawlessly. it hangs forever trying to connect to the repl, with no feedback
08:06timvisherall i see in the dev console is 'switching protocols' and then nothing
08:07mibr0789dnolen: hmm I see. I'm okay with that then :)
08:07timvisheri see `<< Started Weasel server on ws://0.0.0.0:9001 >>` in the cider repl
08:07timvisherthe request it's making goes to `ws://localhost:9001/`
08:08dnolentimvisher: if you're using weasel/piggieback with latest ClojureScript, you need SNAPSHOT releases of both
08:08dnolentimvisher: even then there are piggieback issues that need to got sorted out
08:08timvishernuts :(
08:09timvisheris the latest safe version combination published anywhere?
08:09timvisheri was using weasel@0.4.2 and piggieback@0.1.3 and just bumped everything in the hopes that it would fix it
08:09timvisherwhich felt wrong from the get-go :)
08:10dnolentimvisher: no you'll want to stick to an older ClojureScript, that's also old weasel/piggieback combo
08:11dnolentimvisher: hopefully piggieback will go the way of the dodo in the not too distant future (apologies to the dodo)
08:11timvisherdnolen: ah
08:11timvisheri was at 0.0-2655
08:12dnolentimvisher: if Weasel is important to you I would stick w/ that
08:12timvisheri'm now up at 0.0-2913
08:12timvisherok
08:13timvishernow we're down to the question of why with that version combo my weasel won't connect :D
08:13dnolentimvisher: because piggieback is fundamentally broken
08:13dnolenevery answer comes back to that
08:14timvisheris anything developing that's better at this point? i don't follow the community as well as i should anymore :(
08:14timvisherbah. looks like i'm heading back to `cljsbuild auto`
08:14dnolentimvisher: yes I added real fundamental support so that there can be a proper ClojureScript nREPL server
08:15jcromartieanybody here using https://github.com/mylesmegyesi/conveyor
08:15dnolentimvisher: cemerick will likely get to that when he can
08:15timvisherbtw, i noticed that a bunch of the goog.x.x NAMESPACE not defined errors went away when i bumped the cljs version. is that expected? because it's _awesome_
08:15dnolentimvisher: I and others will continue to submit quick fix patches to piggieback until that transition happens
08:15timvisherdnolen: that's awesome. glad to hear it.
08:18timvisheris the rhino repl still the recommended way to get a non-browser js repl?
08:23dnolentimvisher: Node.js, Rhino, Nashorn - take your pick
08:24Kristienwould it have been possible for syntax-quote to be a special form, or could it only exist as a reader mechanism?
08:34cemerickkristian-: the ` syntax needs to be manifested in some way, and so it would always have had a reader component. You might enjoy https://github.com/brandonbloom/backtick if you're interested in such things.
08:35spinningarrowdoes anyone have experience using midje? Whenever I run `lein midje :autotest`, it doesn't rerun the tests when the source file is changed. Instead it just says "No facts were checked. Is that what you wanted?"
08:41spinningarrowam I doing something wrong?
08:41spinningarrowfrom the wiki on midje's github page, it seems like it should just work
08:45Kristiencamerick: quote exists as an alternative to ' just wondering why there's no syntax-quote alternative to `
08:45Kristieni'll look at the link you sent
08:53cemerickKristien: oh, I see what you mean; yes, syntax-quote could be a macro, and is in various reconceptions and other languages
08:53timvisherdnolen: thanks. i'll try to find the docs to get those set up somehow :)
09:01spinningarrowupdate: even when I run it from the repl (`lein repl` followed by `(midje.repl/autotest)) I get the same result
09:30clgvHow do you debug compojure routes?
09:31justin_smithclgv: pass a "request map" of your own making (likely just a map literal), :uri is the most important key here, and see if the returned data looks right
09:32justin_smithpass that to the handler you generate, that is
09:32justin_smithyou can easily do this in a repl
09:32justin_smithor clojure.test
09:32justin_smithor whatever
09:34clgvjustin_smith: the problem is that I need to find out in a complex routing system where it fails to find the correct handler
09:34justin_smithclgv: well, you can test the whole "app" generated by compojure, then you can try compiling any subset of routes individually
09:34justin_smith(and testing those individually)
09:36clgvthat's no it either. I probably need some kind of tracing which shows the tested routes and whether they passed or failed
09:41justin_smithwhy not individually compile each route and attempt to match it?
09:42justin_smiththis is where a proper function based router rather than a macro would come in handy
09:42Glenjaminthe macro compiles down to one particular function
09:43Glenjaminso core.trace in the right spot should do that
09:43justin_smithGlenjamin: right, but if it were a higher order function, you could build your routes out of individual functions, and easily test your decomposed functions
09:43Glenjaminthat's what compojure does just beneath the macro
09:43justin_smithGlenjamin: of course you can probably do this with compojure too, but you are fighting against the grain
09:43justin_smithsure
09:44clgvjustin_smith: no that is not possible
09:44justin_smithI'm just saying, as soon as you start debugging and wanting to decompose things, the macro becomes an annoyance instead of a convenience
09:44Glenjaminyes, agreed
09:44justin_smithclgv: it's not possible to compile each of your routes alone?
09:45justin_smithclgv: compojure routes can be composed
09:45justin_smithit's just a question of refactoring
09:45Glenjaminhrm, it's a protocol: https://github.com/weavejester/clout/blob/master/src/clout/core.clj#L40
09:45Glenjamini dunno if you can core.trace that
09:46justin_smithugh, yeah, that's not so friendly to runtime twiddling is it
09:46clgvjustin_smith: I mean it is not feasible in reasonable time constraints
09:46justin_smithwow, how many routes do you have?
09:46clgvplenty nested ones
09:46Glenjaminhrm, it's actually pretty annoying
09:46Glenjaminhttps://github.com/weavejester/compojure/blob/1.1.8/src/compojure/core.clj#L92 is the route generator
09:47Glenjaminbut it generates anonymous functions
09:47clgvactually the whole thing works - but when I wrap a context with a prefix path around it, it stops to work
09:47justin_smithclgv: OK, I'm out of suggestions. This is why we made our own data structure / higher order function based router.
09:50clgvwithout success...
09:54Glenjaminsomething like (alter-var-root #'if-route (fn [f] (fn [&args] (prn args) (apply f args))) ?
09:57wkfgood morning folks... is there a way to find the file system path of the source code file associated with a namespace?
09:57michaler`clgv: you can also just build your own version of compojure with the tracing changes in place..
10:09razum2umanyone knows why cljsbuild doesn't minify the *min in advanced mode? (names are minifies, dead code eliminated, but whitespaces & "\n" still present)
10:12clgvhumm, routes as pure data structure would be awesome to debug now
10:14justin_smithwkf: there is a trick using classloaders. Typically it won't be a "file", it will be a resources inside a jar under ~/.m2/; it can be easier to just run "lein cp" to see the list of jars it sets up on the classpath, and look in the apropriate jar
10:14justin_smithwkf: many tools (including vim fireplace and emacs cider and intellij cursive) do this automatically, and take you to the source in the apropriate jar when you ask to see the source
10:15wkfjustin_smith: I'm writing a test for a function that reloads a namespace when the source file containing the namespace is touched
10:15justin_smithwkf: also, if all you want is to see the source of some function, you can just use clojure.repl/source for that
10:15justin_smithwkf: oh, OK. I'll see if I can dig up the classpath based trick.
10:16wkfso I want to find the file associated with my test namespace, so I can touch it
10:16wkfjustin_smith: awesome, thank you
10:16wkfjustin_smith: it looks like I could probably use tools.namespace to search the project directory, and find it that way
10:16wkfbut if there's a better way, that would be wonderful... thanks a bunch for the help
10:17justin_smithwkf: aha, I was just looking at the tools.namespace docs myself :)
10:19wkfjustin_smith: well, I'm glad I wasn't too far off then ;)
10:26clgvok, let's have a different angle on that. I have a working compojure webapp. how do I add a prefix directory to the routes easily (routes are nested multiple times via c.c/context already
10:30jballancanyone have tricks they use to pretty-print forms in Vim?
10:35justin_smithwkf: you can probably either use this, or copy the apropriate classpath interrogation tools, to find what you want https://github.com/clojure/java.classpath/blob/master/src/main/clojure/clojure/java/classpath.clj
10:44wkfjustin_smith: thanks a bunch, the path ahead has become clearer
10:51justin_smithso it's official, ring's wrap-resource fails for files named "foo."
10:51justin_smithtime to make a minimal failing example and file a bug report I guess...
10:52justin_smithwell - I guess it could be tomcat doing it
11:03wkfjustin_smith: https://gist.github.com/48c587b5fefe0ce441cc seems to work. thanks again!
11:04justin_smithwkf: using tools.namespace?
11:18wkfjustin_smith: indeed, which uses clojure.java.classpath
11:19justin_smithcool
11:19mpenetjustin_smith: is the routing lib you were mentioning OSS?
11:19justin_smithmpenet: yes, caribou/polaris
11:19mpenetthanks
11:20justin_smithit's data driven, built up by functions (but also supports multimethods)
11:20justin_smithI'm sure you're all excited to know it's not a ring wrap-resource bug, but rather an issue with tomcat!
11:20justin_smith(moved on to bugging the tomcat people now)
11:40hlprmnkywin /2
11:40hlprmnky>_<
11:40hlprmnkybeen that kind of morning, sorry
11:45csd_Does clojure have a core function that does something like (merge-thing {:a {:b "b"}} {:a {:c "c"}}) => {:a {:b "b", :c "c"}}
11:46justin_smithcsd_: merge-with
11:46justin_smith,(merge-with merge {:a {:b "b"}} {:a {:c "c"}})
11:46clojurebot{:a {:c "c", :b "b"}}
11:46csd_ah
11:46justin_smithyou can use any other custom function you like in merge-with
11:46csd_i had looked at it but wasnt sure what function i'd need to give it
11:46justin_smithbut merge is usually sufficient
12:01TimMc&(merge-with {} merge-with)
12:01lazybot⇒ #<core$merge_with clojure.core$merge_with@600a41b2>
12:02justin_smith&(merge-with {} merge-with merge)
12:02lazybotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.core$merge
12:02justin_smith:(
12:03TimMc&(merge-with merge-with merge-with)
12:03lazybot⇒ #<core$merge_with clojure.core$merge_with@600a41b2>
12:04TimMcyesss
12:04justin_smith&(merge-with get get)
12:04lazybot⇒ #<core$get clojure.core$get@5598b751>
12:05justin_smith&(merge-with Double/NaN Double/NaN)
12:05lazybot⇒ NaN
12:06hyPiRion,(merge-with 'last {:a :b} {:a :c})
12:06clojurebot{:a :c}
12:09justin_smithhyPiRion: ahh that's trickier than it looked at first...
12:12TimMc(def identity (partial merge-with unchecked-inc))
12:13justin_smithsuddenly identity has exciting new error messages for bad arities...
12:18TimMc&((partial merge-with unchecked-inc) {:a 5} {:a 6})
12:18lazybotclojure.lang.ArityException: Wrong number of args (2) passed to: core/unchecked-inc
12:19justin_smithOK, not as exciting as I hoped
12:19TimMcPurple monkeys for sure.
12:19justin_smith&((partial merge-with unchecked-add) {:a 0} {:b 1})
12:19lazybot⇒ {:b 1, :a 0}
12:20justin_smith&((partial merge-with unchecked-add) {:a 0} {:a 1})
12:20lazybot⇒ {:a 1}
12:20justin_smithoh, of course, because that actually makes sense
12:20justin_smith&((partial merge-with unchecked-add) {:a 0} {:a "boot"})
12:20lazybotjava.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
12:20justin_smithmuch better!
12:20justin_smithI would be pretty confused if identity gave me that error
12:26justin_smithOK this amazed me: ##(apply str (map (zipmap (map char (range (int \a) (inc (int \z)))) (map char (range (int \z) (dec (int \a)) -1))) "wizard"))
12:26lazybot⇒ "draziw"
12:26justin_smith~magic
12:26clojurebotIt's greek to me.
12:27TimMcOooh, is that like a half-inverse palindrome?
12:27justin_smithTimMc: that's a decent name for it, yeah
12:28justin_smiththat code is just doing a tr a-z z-a
12:29TimMcI don't see *how* it's doing it, and I think there's a shorter way.
12:29justin_smithTimMc: yeah, I'm just using zipmap to make a mapping from a-z to z-a
12:30justin_smithI am sure there is something more concise, but that sufficed for banging it out
12:30TimMcoh, got it
12:30justin_smithmaybe clojure.string has a tr
12:32TimMcI mean, if you just want reversal and not tr...
12:32TimMc&(apply str (map #(char (+ 122 (- 97 (int %)))) "wizard"))
12:32lazybot⇒ "draziw"
12:32justin_smithno, the magic thing is that tr = reverse
12:32justin_smithfor this particular word :)
12:33justin_smithoh wait
12:33justin_smithno, that works, yeah
12:33justin_smith&(apply str (map #(char (+ 122 (- 97 (int %)))) "fighter"))
12:33lazybot⇒ "urtsgvi"
12:35TimMcHey, I don't have a /usr/share/dict/words anymore!
12:44justin_smith("Ariz" "Ir" "Mn" "Polk" "Yb" "Zola" "bevy" "by" "girt" "grit" "hovels" "lo" "sh" "trig" "vole" "wizard")
12:44justin_smiththat's all the matches in my dict
12:45justin_smith(I made it case insensitive)
12:49justin_smithmy code https://www.refheap.com/97781
12:51TimMcwizard grit hovels
12:51justin_smithhell, you could make vole fit too - it's a forest creature that might infest a hovel
12:51TimMcvole bevy
12:51justin_smithyou may even have a bevy of voles in a wizard grit hovel
12:52justin_smith*in wizard grit hovels
12:56samfloresis there any poll that indicates the IDEs/editors usage for Clojure development?
12:56kaplanEmacs would probably top the list
12:57justin_smithsamflores: there is a yearly poll, and emacs is definitely up there
12:58mnngfltgsamflores, https://cognitect.wufoo.com/reports/state-of-clojure-2014-results/
12:58justin_smithhttp://blog.cognitect.com/blog/2014/10/20/results-of-2014-state-of-clojure-and-clojurescript-survey
12:58samfloresthanks, guys
12:58samflores(inc mnngfltg)
12:58lazybot⇒ 2
12:58samflores(inc justin_smith)
12:58lazybot⇒ 196
12:59justin_smithinteresting, vim and cursive tied...
13:00samfloresI'm a Vim+fireplace guy. I didn't expect it to be more used than LT or Eclipse
13:01justin_smithI'm with the 0.90% using emacs+inferior-lisp
13:01justin_smithwhich beats out amalloy_ and his friends using emacs+slime
13:01justin_smith(0.45%)
13:03samfloresI've tried to use emacs several times, even before started learning Clojure. It's not for me :\
13:03justin_smithsamflores: I switched to evil recently, my wrists are super thankful
13:04justin_smith(evil is the vim emulation mode in emacs)
13:04samfloresI've used it too. that's the only way emacs was usable for me
13:04justin_smithyeah, I like emacs features, but can't do the keybindings any more
13:05justin_smithbut luckily that's not a big issue
13:05samfloresbut it still required I relearn a lot of concepts
13:05justin_smithtrue that
13:05justin_smithit's an odd dinosaur
13:05justin_smithmost people don't realize emacs is older than vim
13:05samfloresnever got in the mood to that
13:05justin_smithand more archaic
13:15xemdetiaI keep people saying they switched to vim because of RSI but what were the sort of gestures that were causing people RSI? I mean was it the two or three step chords or what?
13:16justin_smithxemdetia: things like C-x C-c, C-x C-f
13:16justin_smithC-u M-x inferior-lisp
13:17justin_smiththe more chords you do, especially in sequence, the worse it is for rsi
13:17justin_smithwith evil mode I can avoid most of my heavily used chords outright
13:17justin_smithother than shift-key stuff of course
13:17xemdetiahmm :( I feel like I am typing more when I am in vim
13:18justin_smithfor the bio-mechanics more typing but less chording (within reason) is better for you
13:18justin_smithI could quote shakira "wrists don't lie" - the pain went away
13:19ShayanjmI honestly don't think i've ever really had an issue just clicking around sublime and being completely ignorant to the many hotkeys that may/may not help me
13:20Shayanjmmight just be me, but my biggest bottleneck throughout the day is usually not the number of lines of code I can write/hr
13:20justin_smithShayanjm: for me it's not just speed of writing, but speed of editing
13:20justin_smithmy code may end up only being a line or two longer (or even shorter), but a lot of editing goes between
13:21Shayanjmjustin_smith: that's a little bit more fair. For clojure using paredit for editing in sublime is much nicer than having to manually deal with parenthesis editing
13:21justin_smithmaybe I type too much and don't think enough :)
13:21Shayanjmbut yeah, I usually end up spending a good deal of time just thinking about the problem before actually writing code
13:22justin_smithShayanjm: I get lost. I end up needing pen and paper when I code that way. If I had the attention span for that kind of programming I think I'd likely be using haskell.
13:24nopromptdnolen: i'm not sure if this has been resolved or if it's an issue for bronsa, there
13:24nopromptdnolen: is something up with using backtick.
13:24dahbiomech impact form chording mostly evaporated when i switched to the datahand
13:25daheverything becomes pretty equal
13:25nopromptdnolen: (require '[foo.core :as f]), `f/bar does one of two things. either it just does 'f/bar or it throws clojure.lang.Symbol cannot be cast to clojure.lang.Namespace.
13:27Shayanjmjustin_smith: my workflow is to loosely write out on pen + paper what I want to accomplish
13:27Shayanjmplay around in the REPL to mock inputs & outputs
13:27Shayanjmand when I get something I like, I throw it into a file and commit
13:28Shayanjmneedless to say I go through a lot of yellow legal pads
13:29nopromptdnolen: i'm not sure where to open the issue though.
13:32dnolennoprompt: what do you need `f/bar for in this case at runtime?
13:33dnolennoprompt: not saying it isn't an issue but seems solidly in low priority category
13:33justin_smithShayanjm: my preference is a fountain pen on graph paper
13:33Shayanjmtoo bougie for me ;)
13:34justin_smithShayanjm: recently picked up a vintage parker vacuumatic with a broken filler, used a 10cc syringe (they sell them for doing printer cartridge refills) to top it off with noodler's black ink
13:34justin_smith)
13:34Shayanjmsmh
13:34ShayanjmI just grab a bic out of my big bag of bics
13:35Shayanjmgrab my floppy yellow legal pad
13:35justin_smithit's cheaper than any keyboard I would seriously consider using
13:35ShayanjmI've never owned a decent mechanical keyboard either
13:35Shayanjmbut that's more laziness than anything else
13:36justin_smithI love my kinesis freestyle - it's not even mechanical, but the split lets me put my trackpad in the middle, and hold my hands a more comfortable width
13:36arrdemgo to amazon, order a Mk. 1 Das in Cherry Blues, wait two days, drive everyone insane with the clicking,
13:36justin_smiththat is, a width that is natural for my shoulders, and not forced by an artifical design
13:36mmitchellanyone have tips for setting up a good clojure.test + emacs environment? I'm using cider and its test-mode, but wondering if there's something better or recommended?
13:37Shayanjmjustin_smith: what machine do you code on?
13:37ShayanjmDesktop/laptop?
13:37justin_smithlaptop, system76 with 32 gigs of ram
13:37markmmI have a def that I am trying to set! within a function but it gives me IllegalStateException Can't change/establish root binding of: mything with set
13:38markmmThey are both in the same namespace
13:38Shayanjmgotcha. I think I need to upgrade
13:38ShayanjmMBP 8GB ram. mine is one of the unfortunate few that got hit with some weird graphics issues
13:38Shayanjmso I have to get that addressed at some point/get my company to buy me a new set up
13:39puredangermarkmm: you can only set! a dynamic var within a binding scope. if you really want to change the root binding, use alter-var-root.
13:40markmmpuredanger: Ah ok got it, must have misunderstood the docs
13:40markmmthanks
13:41puredangeror to say that a different way, dynamic bindings make changes that you can see in your call stack. if you want globally visible changes, then you have to change the root value.
13:42nopromptdnolen: we use it to produce error messages that have the fully qualified name of say a protocol or type.
13:42markmmpuredanger: This code will never run in more than one thread so dynamic will work for me
13:42nopromptdnolen: we may have the protocols in one ns and the impl in another but want to produce error messages that don't suck. :)
13:43winkhello fine clojure people, I have a request. Anyone using .lein-classpath and could shoot me a quick example over at https://github.com/technomancy/leiningen/pull/1830 - honestly unsure how to bulletproof testing this commit.
13:43dnolennoprompt: yeah I don't know why that doesn't work, ticket + patch welcome
13:43nopromptdnolen: ex. (throw (js/Error. (str (pr-str obj) " must satisfy " `p/IFoo " and " `p/IBar "."))
13:44nopromptdnolen: i can't determine the exact location of the bug. is it in the analyzer or tools.reader?
13:44dnolennoprompt: just a ticket is fine too, but I'm not going to have time to look into any time soon, the list of more important todos for me is far too long
13:44dnolennoprompt: no idea
13:44nopromptdnolen: it starts in forms-seq and lands in tools.reader. haha
13:44nopromptdnolen: i'm telling you, once i get my evenings back i'm gonna be helping a lot more.
13:45nopromptdnolen: but fair enough, i'll open it up.
13:46dnolennoprompt: cool thanks, yeah I can't say why that doesn't work. But low hanging fruit like this just needs to get picked up by the community more and more if this stuff is going to get fixed
13:46dnolennoprompt: there's probably at least ~50-70 tickets just like this one in JIRA that have been lying around forever
13:46puredangerdnolen: do you have a newbie tag in CLJS?
13:47dnolenpuredanger: my JIRA fu is quite low, I don't know how to do such a thing
13:47puredangerjust go to the labels field and type a label name :)
13:47dnolenpuredanger: ah heh, ok :)
13:47puredangeractually, since all projects share, there is one that I've used in CLJ
13:47puredangerit should auto-complete
13:47dnolenpuredanger: cool
13:48puredangerI can give you a report for newbie jiras in CLJS if you like
13:49dnolenpuredanger: what is the report for? Like a summary after I've actually tagged them?
13:49puredangeryeah, and then we could link that somewhere
13:49dnolenpuredanger: ah that's great
13:50dnolenpuredanger: k will try to do some tagging on Friday
13:52puredangerdnolen: http://dev.clojure.org/jira/secure/IssueNavigator.jspa?mode=hide&amp;requestId=10616
13:52puredangeror you can search for it in Filters as "[CLJS] Newbie-friendly"
13:57dnolenpuredanger: thanks
14:23amalloyjustin_smith: we are the 1%
14:24justin_smithhaha
14:26amalloyjustin_smith: vim definitely has superior keybindings. i'm surprised you got RSI in emacs, though...even with ctrl/caps switched? before i did that i got some Emacs Pinky, but after the swap it's been years with no problem
14:26justin_smithamalloy: yeah, even with control swapped
14:26justin_smithit didn't get to the point of serious injury
14:26justin_smithjust enough to start getting the wrist pain and I was like "fuckit, typing should not cause pain, period"
14:27justin_smithamalloy: control swapped and a split keyboard even
14:31ajmagnificoOK, so I guess I had a fundamental misunderstanding about pmap
14:31ajmagnificoI was under the impression that pmap would open # of cores + 2 threads
14:32hiredman~pmap
14:32clojurebotpmap is not what you want
14:32amalloyajmagnifico: fundamental misunderstanding: "you should use pmap in real life"
14:32ajmagnificohaha
14:33ajmagnificoamalloy: I want to to process a collection, but don't want more than N threads working on it at a time
14:33ajmagnificowhat would you recommend?
14:33ajmagnificoI put (println) statements in each of the functions that would be run,
14:33ajmagnificoand it looks like pmap starts ALL of them all at once.
14:33hiredmanone of core.asyncs pipeline functions might work well
14:35ajmagnificoOK, I lied
14:35hiredmanhttps://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async.clj#L546
14:35justin_smith,(into #{} (repeatedly 1000 #(rand-int Double/NaN)))
14:35clojurebot#{0}
14:35ajmagnificoI was apparently unaware of just how many cores were on the machine I'm using
14:35ajmagnifico(it's a remote box)
14:37ajmagnifico(dec ajmagnifico)
14:37lazybotYou can't adjust your own karma.
14:39amalloyjustin_smith: i could not have predicted the behavior of (rand-int Double/NaN)
14:39justin_smithamalloy: same here, that's why I had to try it...
14:40justin_smithamalloy: it ends up being (* n (rand)) and then the int coercion must turn it to 0?
14:40justin_smith,(int Double/NaN)
14:40clojurebot0
14:40justin_smiththere we go
14:41justin_smithweird
14:41ajmagnificohiredman: thanks, looking into it now
14:48justin_smithfascinating article - someone found a bug in the java sort function using formal verification http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/
14:50amalloyjustin_smith: the conclusion at the end, about the java community's response, was kinda sad
14:51justin_smithyeah, that is very sad
14:51bashedIs it possible to retrive the columns in a record? Or, create a record using the values in a vector as its columns?
14:51justin_smithI hope we see more of these formal method driven fixes
14:51justin_smithbashed: check out zipmap
14:52justin_smithbashed: that's what I use to make maps from csv files with a starting header
14:52bashedjustin_smith: I guess that works perfectly. Thanks.
14:52bashedHah, that was exactly what I wanted to do. To make maps for loading a csv file.
14:53justin_smithbashed: I wonder how I guessed?
15:04bashedjustin_smith: I guess you either work for the NSA or google.
15:04justin_smithbashed: it was the use of the word "column"
15:05justin_smithalso, instead of zipmap, if you know the order in the csv at the time the record is defined, (apply ->MyRecord row-data) works too
15:05bashedjustin_smith: ah, that makes more sense.
15:06bashedjustin_smith: I used that initially, but I also wanted the column names for storing them in a sqlite db.
15:07justin_smiththeres also (keys record-instance)
15:07justin_smithbut zipmap is more flexible, because then if a csv has the columns in a different order, it still works if the right columns exist at least
16:13csd_I'm working with java's ServerSocket. After I create a Socket, I create a hashmap of {:rdr (io/reader Socket) :wtr (io/writer Socket)}.. what would be the correct way to handle cleanup after a client disconnects? Do I need to do anything manually, or will the JVM take care of this for me?
16:19mercwithamouthpeep
16:21amalloywhen the client disconnects, those probably both get closed, i would think, so as long as you let them go out of scope the GC should take care of the rest
16:30the-kennyThis is the same attitude that leads to broken software. Better be safe than sorry.
16:33TMAsockets were not necessarily closed on 1.5 JVMs during garbage collection
16:34amalloyTMA: no, certainly not
16:34amalloyi was saying that i think the sockets are already closed, so all that's left is to let them be GCed
16:35TMAclosed sockets can be easily gc'ed
16:36xemdetialeaving sockets unattended makes maintenenance people sad
16:36TEttingerI'm curious what the usage of ClojureCLR is like
16:37TMAI would rather not lose a reference to an open socket. Even if I might be reasonably convinced that it would be closed soon from the other side.
16:37zerokarmaleftTEttinger: check the state of clojure 2014 results
16:39TEttingerinteresting, under 2%
16:43puredangerI'm actually talking with some of the MS OSS people about getting some more visibility for it
16:44tbaldridgesadly the popularity of a CLR language seems to be pretty tied to how good the VisualStudio support is
16:44clojurebotTitim gan éirí ort.
16:44puredangertbaldridge: yup
16:45puredangerit's hard for anything not-from-ms to take hold
16:47kaplanpuredanger, my guess is that is because of how hard is it to install ClojureCLR on Linux/OSX
16:47TEttingeris there a NuGet package at least?
16:47puredangerthat doesn't seem like the target market?
16:47kaplanthere is
16:47tbaldridgeWhy use ClojureCLR on Linux when Clojure exists?
16:48justin_smithtbaldridge: better native integration via the clr hooks in gnome maybe?
16:48TMAI do have a clojure success story [sort of] to share. Few months ago we were developing a Spring/MVC based service. I have made a quick mockup of that service in clojure (about two days coding, my first real clojure program, though not my first lisp program). For several weeks it was more featureful than the full service in java. However it had to be abandoned. Hence the "sort of" success.
16:48justin_smithfor desktop app stuff at least
16:48TEttingerI haven't looked into it much, I mostly use Clojure for scripty stuff when brevity is important, and C# for larger, imperative-friendly projects that benefit from a dash of FP rather than a heaping helping
16:50TEttingerthe C# for larger is mostly because Visual Studio makes large projects much more manageable than, say, Light Table
16:51TEttingerI'm not super fond of the frequent breaking updates that IntelliJ hands out to IDEA either
16:55VfeI tinkered with Clojure-CLR a lot to interface with Unity3D, that was about it. When Unreal4 came out that use case went away for me.
16:55EremoxWhat is a good book on dealing with leagacy code? I wish to know so that i may efficiently come to grasp with open source software, and contribute easly and efficiently to the clojure community.
16:57VfeAny of the books on code architecture I guess? Legacy code isn’t really descriptive since every legacy is its own story, and knowing one codebase doesn’t neccessarily prepare you for the next XD
16:57TEttingerVfe, can you use Clojure(Script?) with Unreal4?
16:59VfeTettinger, There’s plugins for scripting via JS and I was able to use CLJS no problem via that. Also depends on what you want to do, GUI plugins like coherent UI basically put a transparent browser window over your play window
16:59VfeSo you can use CLJS directly for GUI and logic via that
16:59tbaldridgeTEttinger: the devs behind mono are developing a unreal 4/mono build: http://tirania.org/blog/archive/2014/Oct-23.html
17:00tbaldridgedepending on what they cut and how compatible it is, it could be possible to run Clojure on that.
17:00TEttingerI saw, tbaldridge, it looked difficult to use
17:00VfeUE4 has really easy hooks for scripting languages, it’s trivial compared to Unity to interface with any language, it’s more of a long haul in writing a wrapper for an API with 1,000 functions
17:01TEttingerlast I checked, it required purchasing the source to get a specific version of Unreal, a license to Xamarin's commercial stuff, and then building their software to see if it even works
17:01tbaldridgebut from what I understand the Unity/Mono story may get a bit more complicated in the future as well. so who knows how that's going to impact that side of things: http://blogs.unity3d.com/2014/05/20/the-future-of-scripting-in-unity/
17:02VfeLike I had a simple UE4 <-> Clojure/jvm setup going in no time, but I’d have to actually spend a lot of time to make the whole engine usable via Clojure as opposed to one or two quick implementations
17:02VfeSimilar to what Oakes does with Play-CLJ really
17:06Vfetbaldrige yeah, unity is a great user tool, but on the back-end there’s just a ton of bad legacy decisions that haunt them it seems. The program blew up before it was really ready and now they’re stuck with a lot of bad choices for moving forward.
17:07TEttingerplay-clj is nice, it really is a thick layer over libgdx to make it clojure-y
17:09aaelony(amazonica.aws.elasticmapreduce/run-job-flow :name "my-job-flow" :log-uri "s3n://emr-logs/logs" ) but suppose I'd like to create a map like (def m {:name "my-job-flow" :log-uri "s3n://emr-logs/logs"}) and pass it to amazonica.aws.elasticmapreduce/run-job-flow as an argument... is there an easy way to do this?
17:09VfeYeah, I really like it. I wish their 3D support would of went somewhere, it seems effectively abandoned
17:10Vfelibgdx’s support that is, not play-clj
17:15TEttinger,(def m {:name "my-job-flow" :log-uri "s3n://emr-logs/logs"})
17:16clojurebot#'sandbox/m
17:16TEttinger,(apply str m)
17:16clojurebot"[:name \"my-job-flow\"][:log-uri \"s3n://emr-logs/logs\"]"
17:16TEttingerapply will treat the map as a sequence of key-value pairs
17:17TEttinger,(apply (fn [[k v]] (str k v)) m)
17:17clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (2) passed to: sandbox/eval71/fn--73>
17:20TEttingerah!
17:20TEttingeraaelony: ##(let [m {:name "my-job-flow" :log-uri "s3n://emr-logs/logs"}] (apply str (apply concat m)))
17:20lazybot⇒ ":namemy-job-flow:log-uris3n://emr-logs/logs"
17:20TEttingerjust apply amazonica.aws.elasticmapreduce/run-job-flow in place of str
17:21amalloy~mapply
17:21clojurebotYou could (defn mapply [f & args] (apply f (apply concat (butlast args) (last args))))
17:21TEttingerthat too
17:21aaelonyTEttinger: thanks I will try that. Makes it much more convenient to pass the entire map as an arg rather than piecemeal. I'm also glad that writing a macro isn't the answer.
17:21TEttingerI wasn't sure if mapply was a bad idea
17:21Glenjamin~idea
17:21clojurebotExcuse me?
17:22Glenjaminmeh, i was hoping for something glib about ideas
17:22aaelonyamalloy: that's awesome
17:22TEttingerIntelliJ IDEA
17:23amalloyaaelony: i dunno, it's cool if you have a function that makes you need mapply, but really unrolled keyword args are gross and it would be better if you didn't have to do it
17:23TimMcI should delete that factoid. There's a better version.
17:23TimMcclojurebot: forget mapply |is| <reply>You could (defn mapply [f & args] (apply f (apply concat (butlast args) (last args))))
17:23clojurebotI forgot that mapply is <reply>You could (defn mapply [f & args] (apply f (apply concat (butlast args) (last args))))
17:24TimMcThat didn't do it. :-( Stupid bot.
17:24TimMc~mapply
17:24clojurebotYou could (defn mapply [f & args] (apply f (apply concat (butlast args) (last args))))
17:24TimMc~mapply
17:24aaelonyI didn't write it, but am glad it's there. https://github.com/mcohen01/amazonica under EMR
17:24TimMcAnd now it is ignoring me.
17:24amalloyTimMc: why are you trying to do that?
17:25aaelonysorry, under "ElasticMapReduce"
17:25TimMcamalloy: Hit it with ~mapply a couple times, you'll see the better version.
17:25aaelony~mapply
17:25clojurebotYou have to do something like (defn mapply [f & args] (apply f (apply concat (butlast args) (last args)))), which just goes to show why unrolled keyword args are a bad idea
17:25amalloyha, i forgot about that one
17:26amalloysounds like something gfredericks would say
17:26amalloyi can never figure out how to un-learn <reply> factoids
17:26TimMcThat's just because 99% of all factoids are from gfredericks. :-P
17:27TimMchmm
17:27TimMcclojurebot: 99% of all factoids |are| from gfredericks
17:27clojurebotIk begrijp
17:27TimMcOooh! I should test something.
17:28amalloyclojurebot: statistics is <reply> 95% of statistics with a 9 in them anywhere are totally made up
17:28clojurebotRoger.
17:29TimMcYou can use |arbitrary| words as the verb, and when <reply> is in effect, that word is not displayed, right?
17:29TimMcThat might mean that you can make factoids that only the creater or someone with access to the DB can remove.
17:30TimMcclojurebot: locked factoids |require| <reply>special knowledge for removal
17:30clojurebotIn Ordnung
17:30TimMc~locked factoids
17:30clojurebotspecial knowledge for removal
17:30aaelonyclojurebot speaks German?
17:30justin_smithand irish and dutch iirc
17:31mmitchellanyone know of a good clojure.test extension lib? Looking for a way to make testing things like maps (their shape) and strings (using regexps) simpler
17:31aaelonyclojurebot: bespricht mir deutlich etwas schoenes?
17:31clojurebotCool story bro.
17:31mmitchelllike the some of the midje checkers (but not midje)
17:31justin_smithmmitchell: have you looked at expectations?
17:32mmitchellah that's the one! i couldn't quite remember, thanks :)
17:32mmitchelllooks active too, nice
17:49blake_Where did the source code for routines go? I thought clojure docs had a "show code" button!
17:57justin_smithblake_: well, there's also clojure.repl/source
17:58justin_smithand if you mean clojuredocs.org, I see source buttons
17:58blake_justin_smith: Yeah, that's what I ended up using. But...so weird.
17:59blake_justin_smith: I see a link at the top now. But I recall using some site that had a button at the end that showed the source inline.
17:59justin_smithconj.io?
17:59justin_smithI think you are thinking of conj.io
17:59justin_smith$grim clojure.core/inc'
17:59lazybothttp://grimoire.arrdem.com/1.6.0/clojure.core/inc'
18:00blake_justin_smith: Well, that's not what I'm thinking of looked like. The button was on the right and had a little UPC-ish looking icon. But that'll do. Thanks!
18:00blake_So, I'm looking at remove. I've got a routine that uses remove, but I really need the complement of that. I see that remove is the complement of filter.
18:01blake_I switch them...and it doesn't work out. And I think it's because I'm returning "true" and "nil" in the routine.
18:01blake_(The filtering routine.)
18:02blake_But shouldn't complement always be the complement?
18:12qux(greet)
18:12ibash(greet)
18:14quxi am trying to "shadow" the data.xml 0.0.8 with the bendlas/data.xml bits in leiningen and seem to have forgotten something
18:14quxmkdir checkouts
18:14quxln -s /path/to/bendlas checkouts/b-data.xml
18:14justin_smithblake_: filter
18:15justin_smithblake_: keep if you only want to remove nils
18:15quxbut then i encounter an error at 'lein repl' -- CompilerException java.lang.ClassCastException: clojure.data.xml.impl.xmlns.XmlNamespaceImpl cannot be cast to clojure.data.xml.impl.xmlns.XmlNamespaceImpl
18:15quxwhat did i forgot ?
18:16justin_smithqux: that sounds like something that lein clean would fix
18:16justin_smithtwo different classes that have the same name
18:16quxjustin_smith: thank you very much
18:16qux++justin_smith
18:17justin_smithahh, good old post-incrument
18:17justin_smith*increment
18:33blake_(inc justin_smith)
18:33lazybot⇒ 197
18:34hyPiRion(swap! justin_smith inc)
18:34blake_So confused. I use remove and I get back my data maps. I switch it to keep and I get back booleans.
18:35justin_smithblake_: oh, keep is wrong, I'm so sorry
18:35justin_smithmy bad
18:35justin_smithkeep is like map that removes nils
18:35justin_smithI deserve a dec for that one
18:35blake_justin_smith: Oh, okay. 'cause I started with that and it didn't work but I figured I was just confused.
18:36blake_(I mean I =am= confused, but the problem with being confused is locating the thing you're confused about.)
18:38blake_OK, I just used not. =P
21:33dmannhelp :-) http://pastebin.com/MAMsaviX
21:34dmannnable to resolve symbol: pp in this context
21:34dmanner ^unable
21:35dmannoops, just saw the other channel
23:10uris77I'm having issues with friend-oauth2. I'm getting a Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.ssl.SSLContexts exception. Anyone ran into this before?
23:27GuthurHi, I would like a high percision timer, any suggestions
23:43TEttingerGuthur: OpenJDK has something for this...
23:46quxi am working with an unpublished branch of data.xml in my lein project (mkdir checkouts; ln -s ...)
23:46quxand everything is fine in 'lein repl', ie new-code is eval'd etc
23:46quxbut when i lein build
23:46quxs/build/uberjar/
23:47quxit seems that i have the older (and published) version of data.xml (sans namespaces)
23:48amalloycheckouts are just for local playing-around. it doesn't affect published jars
23:48quxwell playing around works ;)
23:48quxis there some way i can uberjar that playground ? (i actually want to bin it, but one step at a time)
23:49quxi thought i could short-circuit things by setting up a local repository
23:49quxbut it seems hard to avoid central ;)
23:49amalloyno. take your modified version of whatever library, publish it somewhere, and then build with that. you can publish it locally or to clojars or whatever
23:49amalloybut if you publish it locally nobody else will ever be able to reproduce your build so it's frowned on
23:50quxi'm just using one of the proposed namespace forks of data.xml (github) that the author did not publish
23:51quxat the moment, it is not really mine to publish
23:51quxwhich is good, since i am new to xml
23:51qux;)
23:51amalloyyou can publish anything, under your own groupid
23:52amalloyobviously you won't be able to publish it on top of the official data.xml
23:52amalloybut you can publish org.clojars.quz/data.xml or whatever
23:53quxamalloy, thx
23:53amalloyyou're welcome. good luck