#clojure logs

2015-12-29

01:28felixn_https://gist.github.com/munro/88c578c7eb0551daacf9 <-- hey any feedback for this function that conditionally zips against a second sequence? I'm thinking I could make it a transducer by passing in a 3rd argument as the reduced amount. only problem is the entire operation should fail if it's not complete
01:29felixn_actually, that last condition can just be checked at the end, and not have anything to do with this function
01:32felixn_http://ignaciothayer.com/post/Transducers-Are-Fundamental/ <-- also, I was reading this article about transducer. when would the signature "[result input & inputs]" for a map transducer ever apply?
04:03TrioxinI would love to see an example of convoluted artificial neural networks in clojure
04:04Trioxinconvolutional*
04:05Trioxinsomething that isn't ages old
04:05Trioxinbecause state of the art changes there every so often
04:05Trioxinthere's synaptic modified 8 months ago. not so bad I suppose
04:06Trioxinlooks like the last thing they fixed was convolution
04:16TrioxinI'm surprised because I've brought things like this up here before and it seems like a lot more clojure devs would be working in machine learning.
04:17Trioxingiven the nature of the language
04:17Trioxinwhy should c++ have all the fun?
04:18Trioxinoh sweet. I see there's a matlab interface for clojure
04:50underplankHi all. Any idea why when running tests using ring-mock the :body of the PUT request is an InputStream whereas when running the service using jetty its just a string?
06:55engblomDoes clojure have anything ready allowing you to have a circular double linked list?
06:57engblomI have ([1,0,0,1], [1,0,0,0], [1,1,0,0], [0,1,0,0], [0,1,1,0], [0,0,1,0], [0,0,1,1], [0,0,0,1]) where the last element should connect with the first, so that when I am at the last element and take 'next' I get the first, in the same way when I am at the first element and asks for 'previous' I get the last from the list
07:04justin_smithengblom: cycle
07:04justin_smithengblom: and there is no "previous" in clojure really
07:04engblomjustin_smith: I already used cycle for forward... but the backward was the thing I was more wondering about
07:05justin_smithengblom: you need mutable data for the whole next/previous based on a single element thing
07:05justin_smiththough I guess there are zippers...
07:16justin_smithengblom: actually, there is a way to do it with promises I think... one moment
07:22engblomjustin_smith: I realized I could quite easily do it by using 'mod'. Then I need to just pass around the last position and going forward or backward is just a modulo to get the position in the initial vector
07:22justin_smithoh, there is that
07:23justin_smithengblom: I made something actually circularly linked - it works but printing it is a very bad idea :)
07:23justin_smith,(defn make-node [v] {:prev (promise) :v v :next (promise)})
07:23clojurebot#'sandbox/make-node
07:23justin_smith,(defn link-nodes [& nodes] (deliver (:next (last nodes)) (first nodes)) (deliver (:prev (first nodes)) (last nodes)) (reduce (fn [a b] (deliver (:next a) b) (deliver (:prev b) a) b) nodes) nil)
07:23clojurebot#'sandbox/link-nodes
07:24justin_smith,(def foo (let [f (make-node :foo) b (make-node :bar) q (make-node :quux)] (link-nodes f b q) f))
07:24clojurebot#'sandbox/foo
07:24justin_smith,(-> foo :v)
07:24clojurebot:foo
07:24justin_smith,(-> foo :next deref :v)
07:24clojurebot:bar
07:24justin_smith,(-> foo :next deref :next deref :v)
07:24clojurebot:quux
07:24justin_smith,(-> foo :next deref :next deref :next deref :v)
07:24clojurebot:foo
07:24justin_smith,(-> foo :next deref :next deref :next deref :next deref :v)
07:24clojurebot:bar
07:25justin_smith,(-> foo :next deref :next deref :next deref :next deref :next :deref :v)
07:25clojurebotnil
07:25justin_smith,(-> foo :next deref :next deref :next deref :next deref :next deref :v)
07:25clojurebot:quux
07:25justin_smith,(-> foo :next deref :next deref :next deref :next deref :next deref :prev deref :v)
07:25clojurebot:bar
07:25justin_smith,(-> foo :next deref :next deref :next deref :next deref :next deref :prev deref :prev deref :v)
07:25clojurebot:foo
07:25justin_smithetc.
07:25engblomThanks!
07:26justin_smithengblom: that "works" but is very clumsy, and can't be edited - you pretty much have to make a whole new set of nodes from scratch and re-link
07:28engblomjustin_smith: In my case, a simple 'if' or 'mod' will be easier. The sequence I gave first was for driving a stepper motor. If that one would be circular, it would be easy to take one step forward or one step backward.
07:29justin_smithengblom: yeah, that is definitely simpler
07:29lokienHey, is there a way of preventing my stupidness? Like declaring a function with too much params - (defn wrong [x y] (identity x y))
07:30justin_smithlokien: the eastwood plugin for lein will catch that
07:30lokienI mean, this function happily doesn't throw an error, I'd like it to throw one
07:30lokienjustin_smith: sweet name
07:30justin_smithlokien: because it's a linter
07:30justin_smithlint eastwood, lol
07:31lokienwhy people are so funny in functional programming, I don't know
07:31lokienimperative dudes are all like "we're engineers"
07:31lokienbut our entire environment is puns and jokes
07:32justin_smithand fp guys are like "hell yeah, thomas the tank engine, *toot* *toot*"
07:32justin_smithlokien: it's true
07:32lokienthat's why I love you
08:10TimMcjustin_smith: I'm using that. :-P
08:23jink167Anybody know why grimoire at conj.io has been down for days?
08:25justin_smithjink167: at first arrdem wasn't aware it was down - but supposedly he's watching it now so... dunno
08:26jink167thx
08:48ksauaHi. Is there a function which given a seq [1 2 3 4] returns [[1 2] [2 3] [3 4]] ?
08:48j-pbpartition
08:49ksauaty
08:50BRODUS,(partition 2 (butfirst (butlast (interleave [1 2 3 4] [1 2 3 4]))))
08:51clojurebot#error {\n :cause "Unable to resolve symbol: butfirst in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: butfirst in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6704]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve symbol: butfirs...
08:51BRODUS,(partition 2 (rest (butlast (interleave [1 2 3 4] [1 2 3 4]))))
08:51clojurebot((1 2) (2 3) (3 4))
08:52j-pbBRODUS: works but is ugly
08:52j-pb,(partition 2 1 [1 2 3 4])
08:52clojurebot((1 2) (2 3) (3 4))
08:52BRODUSaaa i didn't know partition could do that
09:08TimMc(def rest butfirst) :-P
09:10BRODUSTimMc: i need to go to bed :)
09:12TimMcBRODUS: partition has even more tricks than that
09:13TimMc,(partition 5 3 "hi" (range 8))
09:13clojurebot((0 1 2 3 4) (3 4 5 6 7) (6 7 \h \i))
09:23justin_smithnew thing added to my list of evil - ansi escape sequences inside files so that git diff breaks in the terminal
09:24justin_smithbreaks / shows misleading output
10:08anti-freezeHi everyone, so I'm using clojurescript with boot and everything was working just dandy until about 2 hours ago, then figwheel shat itself. Has anyone seen this error before? https://www.refheap.com/113206
10:12TimMcjustin_smith: font-lock-fontify-buffer doesn't do it. :-/
11:26justin_smithTimMc: odd...
11:26justin_smithanti-freeze left, but when that happens you need to clean your cljs and rebuild
11:34justin_smith,(partition 5 4 (cycle "hi") (range 9))
11:34clojurebot((0 1 2 3 4) (4 5 6 7 8) (8 \h \i \h \i))
11:34justin_smithfancy
11:46justin_smith,(partition 4 3 (cycle "lo") [4 2 0 6 6 6 69])
11:46clojurebot((4 2 0 6) (6 6 6 69) (69 \l \o \l))
11:58devthsadness = the inconsistency between def* forms and whether they allow docstrings
11:59justin_smithdevth: would the fact that defonce rhymes with beyonce cheer you up?
11:59devthnice try!
12:00devthi want to hear someone say it like that IRL
12:00justin_smithI nominate gfredericks
12:01devthjustin_smith: btw, i switched from bindings to passing state around explicitly. only took about 15 min per ns and my sanity is restored! good call.
12:01justin_smithglad to hear it
12:08gfredericksdevth: justin_smith: http://tmp.gfredericks.com/defonce.m4a
12:09devthhttp://www.reactiongifs.us/wp-content/uploads/2013/08/picard_clapping.gif
12:09justin_smithgfredericks: you're the best
12:10justin_smithgfredericks: mind if I tweet that link? I guess it has tmp in it so it isn't meant to be a long term thing
12:11gfredericksSEMANTIC SUBDOMAINS!
12:12gfredericksum here I'll put it elsewheres
12:12gfrederickshttp://upload.gfredericks.com/defonce.m4a
12:12justin_smithOK, tweeting that now
12:14TimMcleenucks
12:15justin_smithyeah, it would be cool to get "this is Rich Hickey and I pronounce defonce as defonce" - with the gfredericks approved pronunciation of course
12:15justin_smithTimMc: actually hearing that recording, after fighting with kernel configs and drivers and such, was a moment of pure bliss in an otherwise bleak existence.
12:17TimMc:-)
12:18TimMc$findfn nil ()
12:19TimMcOh right, no lazybot. :-(
12:23TimMc,(doseq [v (remove (comp :macro meta) (vals (ns-publics 'clojure.core)))] (try (when (= (v nil) ()) (println v)) (catch Throwable t nil)))
12:23clojurebotTimMc: Gabh mo leithscéal?
12:23justin_smithTimMc: concat
12:23devthwhat happened to lazybot?
12:23TimMcrest, reverse, sort, interleave, cycle, seque, vec, concat, drop-last, distinct, flatten, sequence
12:23justin_smithentropy
12:23justin_smithTimMc: oh yeah, those would do it too
12:24justin_smithI'd venture that (distinct nil) is the classiest way to get an empty list from nil
12:28TimMcWhat if I don't want to modify the list when it's not empty?
12:28justin_smithconcat
12:28justin_smiththat's the only one that will act like identity if a single list is arg I think
12:28justin_smith?
12:28justin_smithoh, or sequence
12:29TimMcor vec
12:29justin_smithright
12:29TimMcwtf is sequence
12:29TimMcflatten ;-)
12:29justin_smithTimMc: a transducer that doesn't reverse the input like (into () ...) does
12:29justin_smithvery useful
12:29TimMcooh, that's actually maybe what I want
12:30TimMc,(-> sequence var meta :added)
12:30clojurebot"1.0"
12:30TimMcFascinating.
12:30justin_smithoh!
12:30justin_smithwell, it became more useful when it became a transducer, to be sure
12:30TimMcNo, concat is right, but this is useful to know I guess.
12:31TimMcI have a fn that yields a sequence of stuff, and it is currently implemented entirely by another fn that yields either a vector or nil, and I don't want the test to distinguish between nil and [].
12:32TimMcI could also just wrap the "actual" side of the test in a seq
12:32TimMcOh right this is a midje (provided ...) block so I need the actual arg.
12:32justin_smithif it's a vector or nil, what about vec?
12:33justin_smith,(vec nil)
12:33clojurebot[]
12:33TimMcconcat it is, since that conveys that there could, in the future, be more data sources.
12:34TimMc,(->> 'clojure.core ns-publics vals (filter #(and (not (:macro (meta %))) (try (= (% nil) ()) (catch Throwable t nil)))) (map #(.sym %)))
12:34clojurebotTimMc: No entiendo
12:34TimMcI wonder what its beef is.
12:34justin_smithcatch
12:35TimMcfine
12:35justin_smithor more specifically I think it is try that is forbidden
12:40TimMc,(eval '(+ 1 2))
12:40clojurebot3
12:42TimMc,(->> 'clojure.core ns-publics (filter #(and (not (:macro (meta (val %)))) (eval `(~(symbol (str "t" "ry")) (= ((identity ~(key %)) nil) ()) (~(symbol (str "cat" "ch")) Throwable ~'t nil))))))
12:42clojurebot([eduction #'clojure.core/eduction] nil[dedupe #'clojure.core/dedupe] [rest #'clojure.core/rest] [reverse #'clojure.core/reverse] [sort #'clojure.core/sort] ...)
12:42justin_smithTimMc: SNEAKY
12:42TimMcWAS THAT SO HARD?
12:42TimMcthat bot, seriously
12:48TimMc,(->> 'clojure.core ns-publics (filter #(and (not (:macro (meta (val %)))) (eval `(try (= ((identity ~(key %)) nil) ()) (~(symbol (str "cat" "ch")) Throwable ~'t nil))))) keys)
12:48clojurebot(eduction nildedupe rest reverse sort ...)
12:48TimMcbah
12:48TimMc,(+ 1 2)
12:48clojurebot3
12:48TimMcInteresting, my REPL bombs out after I run that.
12:50TimMc"SocketException The transport's socket appears to have lost its connection to the nREPL server"
12:55justin_smithTimMc: yeah, weird...
12:58TimMcUsing binary search to find it...
12:59TimMcset-agent-send-off-executor!
12:59TimMcWell, that would do it.
12:59justin_smithoh, hahaha
13:00justin_smithyeah, I was just gonna say, it breaks a java -jar repl too
13:01justin_smithyeah, I think it would be safe for findfn to simply blacklist that
13:01justin_smithactually, it could blacklist anything where #(= (last (str %)) \!) safely
13:01Bronsajustin_smith: it doesn't for me
13:02justin_smithBronsa: oh, weird - did you try running it a second time?
13:02justin_smithit looks OK after the first time
13:02Bronsanope let's try
13:02justin_smithbut it's secretly broken (here at least)
13:02justin_smithrunning it the second time exposes that brokenness
13:02Bronsaoh wow
13:02BronsaI can't even understand what that code does
13:03justin_smithtries to run every funciton with nil as an arg and returns the ones that returned ()
13:03TimMcRunning *anything* after it exposes the breakage. Just try entering 7.
13:03Bronsaah I see
13:03BronsaI guess it's hitting some non terminating function
13:03TimMcIt's hitting set-agent-send-off-executor!
13:03Bronsaor filling up a threadpool or something
13:03Bronsaah
13:03Bronsanice
13:04justin_smithBronsa: well, if it called (set-agent-send-off-executor! nil) - after that things get dicey right?
13:04Bronsayeah
13:04TimMc,(set-agent-send-off-executor! nil)
13:04Bronsa:(
13:04TimMc,7
13:04clojurebotnil
13:04clojurebot7
13:04TimMc^ I wonder why clojurebot is immune.
13:04justin_smithI think the sandboxing will help you there, yeah
13:05BronsaTimMc: that works on my repl
13:06Bronsa(a java -jar repl)
13:08BronsaTIL there's a private filter-key function in clojure.core
13:08TimMcThere's also the private fn >1? -- what else is THE MAN keeping secret?
13:09justin_smithTimMc: I smell some prs for the 71 lib
13:09justin_smith>71? =71? <71? etc.
13:10TimMcooh
13:10Bronsa71->str
13:10TimMcbut they should be private too, to stay idiomatic
13:10justin_smithI mean, given that precedent they should be private of course
13:10justin_smithyes
13:10justin_smithmap->71
13:11justin_smithBronsa: sadly I don't think the reader will accept that one
13:11Bronsayeah you're right :(
13:11ridcully_set-agent-send-off-executor-to-71
13:11Bronsaridcully_: missing the bang!
13:11ridcully_dang
13:11TimMc,(->> clojure.core quote ns-interns (filter (comp :private meta val)) (map key))
13:11clojurebot(prependss is-runtime-annotation? imap-cons add-annotation load-data-reader-file ...)
13:11TimMc,(->> clojure.core quote ns-interns (filter (comp :private meta val)) count)
13:11clojurebot104
13:12TimMc(>71? *1) => true
13:12justin_smithoh, and let's not forget compare-to-71
13:13TimMcwin 12
13:13TimMcugh
13:13justin_smithTimMc: ITYM win 71
13:13TimMcI do
13:13TimMc,(>71? 104)
13:13clojurebottrue
13:13TimMcmuch better
14:32felixn_is there a way I can use a clojurescript repl? I'm using cursive ide, so any integration with that would also be nice
14:34justin_smithfelixn_: yes, there is austin, and also figwheel which wraps up the repl with live code reload etc.
14:35justin_smithfelixn_: https://github.com/cemerick/austin https://github.com/bhauman/lein-figwheel
14:37domgetterfelixn_: It's definitely worth watching that 45 minutes talk on Figwheel https://www.youtube.com/watch?v=j-kj2qwJa_E
14:37domgetteror at least the first 15 minutes
14:45felixn_justin_smith domgetter: awesome, thanks! dinking around with austin. I think it's not working because not all my code works with clojurescript, is there a way I can just play around with it and ignore my project files?
14:45mustereselHi, about java interop: If I have a (defrecord Foo [bar baz]), how can I access the members of a Foo from java? In general: Are there comprehensive examples for interfacing clojure code from java code?
14:47felixn_ahh, I'll just keep dinking with it until it works!
14:58domgettermusteresel: is it not yournamespace.core.Foo ?
15:05lokienis there a way of configuring vim to align my code as I hit tab? I'm becoming bored manually deleting these unnecessary spaces
15:06ridcully_`=-` with the cljfmt plugin, `==` with regular bindings
15:07lokienridcully_: after all this time
15:07lokiennow I can happily sudo apt-get purge intellij*
15:08mustereseldomgetter: Is this working? Assuming type hints then namespace.core.Foo foo = some_source(); Double d = foo.bar; should work? I currently cannot test this, thus I'm asking ;)
15:09ridcully_cljfmt also formats on write (with a repl connection iirc), if that's your thing
15:09ridcully_otherwise look into the options vim itself has. e.g. all the `=` stuff
15:09domgettermusteresel: I don't know. The docs on it might be of some help? http://clojure.org/datatypes
15:11lokienridcully_: do you use vim-cljfmt? I don't know if it's necessary as == just works
15:12ridcully_i use it, as it's a tad more nicer. it also fixes linebreaks etc
15:13lokienridcully_ thanks, I'll use it too
15:13ridcully_if you don't like the "auto-format" aspect, i bet it's just a config var away to be turned off and `=-` can still be used (fmt me the current form)
15:14lokienany more useful vim plugins? besides fireplace and sexp?
15:14ridcully_cljfmt plugin and paredit are the "i insert stuff for you" of the bizarro universe, if you are used to intellij and openoffice "helping"
15:14devth_lokien: guns/vim-clojure-highlight
15:14devth_moderately useful
15:14lokienI had used vim for a long time, now, in anger installed intellij
15:15ridcully_the sexp-for-regular-ppl or something like that. that puts some of the sexp shortcuts on "vimy" places
15:15lokienI'm purging it right now
15:15lokiendevth_: I have it already
15:15ridcully_and paredit of course
15:15lokiensexp + paredit?
15:16lokienisn't it sexp or paredit?
15:16ridcully_yes, i have disabled some part of sexp
15:16ridcully_maybe the bit for the paredit ;)
15:16lokiencan I have your dotfiles, please?
15:17ridcully_i have this set: let g:sexp_enable_insert_mode_mappings = 0
15:18ridcully_well that's the bit, that supposedly makes it happy with paredit
15:19ridcully_then i only have three other lines. one to map :Figwheel to do some piggiebacking, and map c-c,c-c to eval, since that is what i use also in tslime (i hear some *ugh* from the emacs ranks)
15:21lokienI've installed it, and it hadn't crashed, so I think it's okay
15:21lokienwhat features of paredit do you use? and what things from sexp are better?
15:22ridcully_i have used paredit before i used sexp and i stayed with them
15:22lokienwhich*, damn
15:22lokieno-kay, will skim through manuals
15:22ridcully_paredit just ballances everything automagically. i just do my leader-i, leader-w most of the time
15:24ridcully_i never tried sexp alone and i _guess_ that i have some interference. leader-i is iirc from sexp. maybe paredit is no longer used at all. idk,idc
15:26lokienI love you ridcully_
15:28ridcully_all the "wrap me this" magic is leader-w-<with what> or leader-i for just ()
15:29sdegutisHello.
15:29sdegutisWho is having a great time today?
15:29ridcully_depending on your keyboard layout (and even then) mapping the leader to e.g. space makes your life easier
15:29sdegutisI bet it's TimMc and TEttinger2.
15:30lokiensdegutis: I am!
15:30sdegutisAlright! High five lokien!
15:31lokienridcully_: I was going through vim primer from daniel messer, I think I should finally add his bindings (he recommends space as leader too)
15:32lokienhigh five, sdegutis! what's up with TimMc and TEttinger2?
15:33justin_smithfelixn_: usually you have .cljc files for things that work in clojurescript or clojure, cljs for clojurescript files, and clj for clojure files
15:36sdegutislokien: I dunno I just thought maybe they're having a nice day, they're usually so polite and kind in here so they usually seem to be having good days.
15:37lokiensdegutis: what about justin_smith?
15:42justin_smithI'm always having a terrible day.
15:42felixn_justin_smith: played with cljc a bit, it's works really well! I don't need UI for the clojurescript repl, so I ended up finding just piggieback with rhino works. from looking at the austin example, it look like I also had to setup a webserver to script the file, so not sure that's what I wanted for just a cljs repl
15:42lokienjustin_smith: oh, why? :(
15:43justin_smithlokien: just being silly, I should remember that doesn't always translate to IRC
15:44J_Arcaneso how long until we have cljs running on node so we can write front and back in clojurescript and avoid enormous jvms entirely? ;)
15:44felixn_https://github.com/clojure/core.logic/blob/1c4020f63a5b792f08a90434ab6e8be6aa467a82/src/main/clojure/cljs/core/logic.cljs#L210 <-- is there a way I can extract the name from this type? (:name (LVar. "hey" nil)) doesn't work like it does in clojure. also the clojurescript API is slightly different, so I will submit a PR!
15:44lokienjustin_smith: knew that! you're our wizard here, your days are meant to be awesome
15:45mgaaream I wrong in thinking that this should work? (case (class 42) java.lang.Long "yep!" "nope :(")
15:46sdegutislokien: he's always having the best day it would seem
15:46sdegutislokien: on account of how he's always the most helpful even when I'm the most idiotic or rude (sorry about those days justin_smith and everyone else!)
15:47sdegutislokien: and I do believe you're correct, I think justin_smith may have some wizard-blood running through his veins
15:47amalloymgaare: yes, sorry
15:47sdegutisOther wise how elsewise would thus he have been able so well and often to contrive such immaculate solutions in pure Clojure for us?
15:47amalloycase doesn't evaluate its test clauses, and java.lang.Long is a symbol which *evaluates to* a class, not a class
15:47mgaareamalloy: ok, is there a "right" way to do that?
15:48sdegutisamalloy: they have to be constants right?
15:48sdegutismgaare: just use cond when you can't use case
15:48mgaarerighto
15:48amalloyor look (class x) up in a map
15:48sdegutismgaare: or possibly condp when the time is right
15:48sdegutisbut I've never found a time when condp actually makes my code cleaner than like amalloy said just using a map
15:48sdegutisNot sure when I'm sposta use condp
15:48justin_smithor nested if clauses if you hate people
15:49sdegutisI find that lately my route-handling code has a lot of (cond) in it.
15:49justin_smithsdegutis: condp is for when your input and the condition are actually two args to a function
15:49lokiensdegutis: this clojure family is so great, I was on #haskell for some time and it's nothing like that
15:49sdegutisI'm not sure how I like it so far, but it's cleaner than it used to be, so there's that.
15:49sdegutislokien: Oh yeah this channel is great people. Some of the best I've ever met. Not even sarcasm!
15:49felixn_ooo, is there a reason (.-name value) works in clojure & clojurescript, but (:name value) only works in clojurescript?
15:49justin_smith,(condp :x = :x "OK" :y "huh?") ; sdegutis - simpler than calling = in every clause
15:50clojurebot"OK"
15:50felixn_s/only works in clojurescript/only works in clojure/
15:50sdegutislokien: Although you have to mind amalloy he is extremely helpful and knowledgeable but has NO time for putting up with crap, you've gotta be completely serious with him 24/7 but he makes up for it by being excessively helpful and knowledgeable
15:50sdegutisjustin_smith: but I've rarely had a time when I'm calling = and not just using case
15:50sdegutisjustin_smith: possibly never actually
15:51justin_smithsdegutis: we just discussed a reason to do that just now
15:51ridcully_felixn_: (:name somemap) also works ins clojurescript
15:51mgaareamalloy: thanks
15:51lokiensdegutis: thanks, I'll remember that! can we officially become friends now?
15:51justin_smithsdegutis: and sometimes it's not =, what about > for example
15:53justin_smith,(condp > 10 1 "sad" 10 "ho-hum" 100 "just fine") ; sdegutis
15:53clojurebot"just fine"
15:53amalloythe main person i am not interested in putting up with is sdegutis
15:53TEttingerthat's sweet
15:53amalloywhich i would not really bring up except he has just cast me as an unfriendly sort
15:53justin_smithTEttinger: useful for scoring and gamey stuff I think
15:54sdegutislokien: sure, in Clojure that's super easy: (swap! *friends* conj 'username)
15:54felixn_,(do (deftype Meow [name]) (let [v (Meow. "foo")] [(:name v) (.-name v)])) ; ridcully_: so weird, this returns ["foo" "foo"] in clojure
15:54clojurebot[nil "foo"]
15:54TEttingerI do think you don't put up with crap amalloy. that is different from being unfriendly
15:54amalloywell, that's fair
15:54justin_smithfelixn_: deftype does not define keyword access, but defrecord does
15:55TEttingerI think I put up with crap too much sometimes. I have a hard time telling people they should learn it themselves
15:55sdegutisamalloy: you're certainly *friendly*, no doubt about that! just, got no time for games or jokes.
15:55justin_smithfelixn_: do you mean "foo" "foo" in cljs?
15:55felixn_justin_smith: oohhh, nvm, that doesn't work in clojure. I bet if I check clojure.core.logic it's defrecord XD
15:55ridcully_deftype ain't mapish
15:55sdegutisamalloy: and that's respectable; anyone who has no time for games or jokes certainly knows the value of his own time
15:55ridcully_defrecord is
15:55lokiensdegutis: :D
15:56sdegutisamalloy: I admire that and it inspires me to waste less time
15:56amalloyhaha
15:56sdegutisSo with that.. I'm off to continue working on my /very first legit programming language ever/!
15:56ridcully_oO
15:56sdegutis:D:D:D
15:56ridcully_i said something wrong
15:57felixn_justin_smith & ridcully_: disregard, clojure.core.logic sets up a clojure.lang.ILookup for :name on the type, I was just getting really confused
15:59sdegutisI was trying to use core.match to help make my route handling functions a little cleaner, but I'm not sure it really helped. What's the intended use-case or best use-case for this lib?
16:00justin_smithfelixn_: yeah, that's an interface
16:05felixn_with the new reader conditionals, will we see more core libs use that instead of duplicating code for clj & cljs?
16:05justin_smithone would hope
16:06dnolenfelixn_: sure if people submit the non-trivial patches needed to push that forward
16:11lokienwhere to add :repl-options in my profiles.clj? I can't find an example
16:11justin_smithlokien: either at the top level or inside a specific profile where you want them applied
16:12TimMcamalloy is srs bsns
16:13lokienjustin_smith: http://lpaste.net/148059
16:13amalloyTimMc banned for ten hours for poking fun at amalloy
16:13TimMc/nick TimMac
16:13lokienMcTim would be better
16:13TimMcMC Tim
16:14sdegutis:D
16:14amalloyten more hours for ban evasion. u in real trouble now, mister
16:14justin_smithlokien: looks good https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L335
16:14sdegutiswow amalloy apparently I had you pegged wrong all along!
16:14lokienput him in a monad, amalloy, it always works
16:15amalloylokien: is that why it's called bind?
16:15TimMcbonding over bans
16:15felixn_https://github.com/clojure/core.logic/blob/master/src/test/cljs/cljs/core/logic/tests.cljs#L7 <-- does a definition starting with a hyphen mean anything? experimental? wondering why the clojurescript version has hyphens in front of some definitions
16:15lokienjustin_smith: doesn't work though. "vim-cljfmt: Could not locate cljfmt/core__init.class or cljfmt/core.clj on classpath."
16:16lokienamalloy: I suppose
16:16justin_smithlokien: umm - how would you get that error unless your code ran?
16:16lokienamalloy: I don't know if it's a serious-enough-topic for you though
16:16BRODUSfelixn_: i just think thats signalling that they're private
16:16lokien:D
16:17lokienjustin_smith: I just do :Cljfmt and this pops out, it was supposed to work
16:17justin_smithlokien: a classpath error doesn't mean you have to call require, it means that your deps are wrong
16:17clojurebotexcusez-moi
16:17justin_smithlokien: a require will raise that error if you don't have the right deps for the thing you are requiring
16:18justin_smith,(require 'this-does-not.exist)
16:18lokienjustin_smith: so, my deps are wrong?
16:18clojurebot#error {\n :cause "Could not locate this_does_not/exist__init.class or this_does_not/exist.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name."\n :via\n [{:type java.io.FileNotFoundException\n :message "Could not locate this_does_not/exist__init.class or this_does_not/exist.clj on classpath. Please check that namespaces with dashes use underscores...
16:18justin_smithlokien: yeah, what project would provide the cljfmt.core namespace?
16:19lokienjustin_smith: my project! /silently adds deps to his project.clj
16:19justin_smithlokien: I'm sure it's something easy to find, and it needs to be in your deps or plugins somewhere
16:19justin_smith:)
16:20lokienI forgot to add it, sorry for making a trivial problem
16:20ridcully_lokien: you just need to add cljfmt to the dependencies in your ~/.lein/profiles.clj
16:21ridcully_this and the addon should be enough to make it work with a nrepl connection
16:21lokienridcully_: yeah, I wanted to do that, but I switched tabs and you were talking about funny stuff and I forgot :(
16:21ridcully_i certainly was not talking funny stuff ;P
16:22lokien"you" was plural here
16:23lokienridcully_: by the way, when I type :Console, my fireplace should connect to this repl straight away, yeah?
16:23ridcully_if you have salve installed
16:24lokienI have it, but it doesn't make a connection
16:24ridcully_otherwise either start with a running nrepl in that directory (.nrepl-port file existing) or do a :Connect <theurl>
16:24lokienaand I can't remap leader to space, vim is so great
16:25lokienvim-salve installed, doesn't work. :(
16:25domgetterlokien: http://stackoverflow.com/questions/446269/can-i-use-space-as-mapleader-in-vim
16:25domgetter?
16:26lokiendomgetter: doesn't work
16:26lokien<\Space> doesn't work too
16:26domgetterlokien: "As spacemanaki comments in the question above nnoremap <SPACE> <Nop> was needed to get this working. "
16:26domgetterEven after that?
16:28ridcully_lokien: this is what i have: https://www.refheap.com/205b710b37a6b703cd3d18efb
16:28lokieneven after that
16:28ridcully_lokien: the url there seems rather unrelated - ignore it
16:28ridcully_this is on linux + xterm. ymmv
16:29ridcully_if \ is _not_ the default leader in vim, then i used that before and kept that around
16:29lokienridcully_: it works! you wonderful santa incarnate
16:31ridcully_satan incarnate? thanks!
16:33lokienridcully_ still no live REPL connection, so, yeah, I guess
16:35ridcully_:Console needs some setup - things like. iirc i setup tmux to be used. otherwise it starts a new xterm. there should be some "result" from :Console
16:35ridcully_s/like/& where to start/
16:35lokien:Console fires up another terminal and a repl in it. it's ran from a weird place though, it doesn't even see my namespace
16:36ridcully_first step: start your `lein repl` by hand, get the url there and do :Connect <url>
16:36lokien(use 'something.core) doesn't work
16:36lokienworks
16:36lokienI mean, :Connect works
16:37ridcully_are starting your vim from the directory the project.clj is in?
16:37lokienyeah
16:37justin_smithyou can double check with (System/getenv "PWD")
16:37lokienvim src/something/core.clj
16:38lokien"/home/lokien/cl/something"
16:40ridcully_tried that. works for me. even if there is no tmux a new xterm is opened then. :Console opens a lein repl; then a `cpp` in that opens file works
16:40lokienit works, justin_smith is a wizard, confirmed
16:40ridcully_s/opens/opened/
16:40lokienI don't know, I just typed the same commands, and it wonderfully worked
16:40lokienthank you all
16:41lokiennow it doesn't work!
16:42lokienI type :Console, new terminal is opened with a repl in it. in that repl, I can't use my project's namespace
16:42pilnehrm, apply is kinda like fold (but is it foldr, or foldl?)
16:42ridcully_it is just a helper to fire up lein repl. there should be no "on-off-behaviour"
16:43justin_smithlokien: did you try requiring that namespace?
16:43lokienjustin_smith: where?
16:43justin_smithin the repl
16:43justin_smith(require 'my.ns :reload) - you should either be able to access your ns, or get an error message
16:43ridcully_and are you typing in the repl or are you sending commands over from vim?
16:43lokienFileNotFoundException Could not locate
16:44justin_smith:reload is in case there was a prior error loading it that was hidden
16:44lokien(System/getenv "PWD") gives me my home directory, strangely
16:44lokien"/home/lokien"
16:44justin_smiththat would be your problem right there
16:45justin_smithit got launched from the wrong place
16:45lokienfrom dir where I have my project.clj
16:45justin_smithit should depend on either what dir you were in when you started vim, or what file you are editing?
16:45justin_smithwhat file were you visiting when you started the repl?
16:45ridcully_cd into the dir, where your project.clj is, then just `vim` and :Console
16:46ridcully_:Console does not even autocomplete, outside of a project
16:46lokienvim src/something/core.clj, yeah?
16:46ridcully_try just `vim` first
16:47ridcully_i tried with a relative file, and it worked for me
16:47lokienNot an editor command: Console
16:47lokien:(
16:47kopasetikIs there an evalbot on this channel?
16:48justin_smith,'yes
16:48lokien,(println "here i am")
16:48clojurebotyes
16:48clojurebothere i am\n
16:48ridcully_are you doing a :cd in vim?
16:48lokienridcully: no
16:48lokienridcully_ *
16:49LauJensenGents, datomic question. I have some :days/* which stores stats on a given day, and each day references 24 :day/hours where information specific to each hour. The ID for each day is :day/date (instant). How do I best extract every :hour/whatever value for dates in a given range?
16:51lokienridcully_: vim project.clj and :Console from there doesn't work also. I'll reinstall salve
16:52ridcully_lokien: i am out of ideas then. i installed salve for the other commands and console is just a tad convinience for me. starting the repl first and then just starting vim in that dir should work relyable. i also usually have it running in tmux - don't know, if there are differences with the newly spawned xterm
16:52justin_smith,,,,,',,,,,',,,,,',,,,',,,,',,,,'""
16:52clojurebot(quote (quote (quote (quote (quote "")))))
16:52lokienridcully_: it had worked for me, but now it's broken, dunno why. thanks for help :)
16:53ridcully_lokien: this is the git commitid of salve i run, if it helps: a0dc869
16:55lokienridcully_: I.. I think it's fish
16:56ridcully_the protocol or the sea creature?
16:56lokienit's not fish, fake info. friendly interactive shell
16:58lokiengoing to sleep now, I'll look at that tomorrow. thanks again ridcully_
16:58ridcully_yw
17:01kopasetikjustin_smith and lokien: thanks!
17:10devthmistakenly assumed mapcat == (comp flatten map) but flatten goes crazy and flattens everything
17:11devthfound when trying to switch to pmap
17:11justin_smith~flatten
17:11devthsince pmapcat doesn't exist
17:11clojurebotflatten is rarely the right answer. Suppose you need to use a list as your "base type", for example. Usually you only want to flatten a single level, and in that case you're better off with concat. Or, better still, use mapcat to produce a sequence that's shaped right to begin with.
17:11justin_smithdevth: flatten is kind of wacky
17:11devthoh right
17:11devththe cat is for concat
17:11sdegutisYeah I never use flatten.
17:11justin_smith,(flatten {:a 0 :b 1 :c [1 2 3]}) ; user error, but really...
17:12clojurebot()
17:12sdegutisI always just do mapcat or for with two pairs.
17:12sdegutisThat's great enough.
17:12devthso: mapcat == (comp concat map) right?
17:12justin_smith(source mapcat)
17:12justin_smith,(source mapcat)
17:12clojurebotSource not found\n
17:13devthyep
17:13devthran it in my repl
17:13sdegutis(src mapcat)
17:13sdegutis,(src mapcat)
17:13clojurebot#error {\n :cause "Unable to resolve symbol: src in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: src in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6704]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve symbol: src in this conte...
17:13sdegutisclojurebot: come on man why you gotta be that way
17:13clojurebotIt's greek to me.
17:13justin_smithsdegutis: src is not a thing
17:14devth(apply concat (apply map f colls))
17:14ptrxhello, i am new to clojure and just discovered libGDX. From what i understand i have ideally one clojure codebase and can target libGDX over the RoboVM with it and deploy my app to all kind a platforms. Is this correct? I am interested in gui apps, which arent games. Would i still want to use this combination or are there other tools? Thanks in advance! =)
17:16justin_smithptrx: cljs with one of the react libs (om, reagent, etc.) is good for webapps if that's an option. Otherwise there is seesaw (swing bindings) or javafx - I think there's some clojure binding to javafx out there
17:16justin_smithpilne: I'm gonna make a tutorial that assumes one is using ed
17:16pilnebwahahahahahaha
17:17pilneline-only-editing ftw
17:17justin_smithI mean it's the most universally installed editor in existence, right?
17:17ptrxjustin_smith, thank you =)
17:17sdegutisWhat is? vi?
17:17sdegutisOh wait no ed.
17:17sdegutisIs sed just like a super ed?
17:18pilnei mean.... don't get me wrong.... i have zero hate for emacs... but... when i'm looking for a decent sized project tutorial to grok clojure a bit better... (i learn better that way), i don't want to *have* to use it
17:18sdegutisLike, ed++?
17:18pilnesed and ed are... really different in use
17:18justin_smithptrx: of all the options I think seesaw is probably easiest to jump into in a clojure way, react webapp is likely the most powerful option right now, and javafx will look and act more like a regular desktop app compared to the other options
17:18sdegutispilne: sure that's fine, no loss.. I can't really use anything except emacs when s-expressions are involved on account of paredit
17:18WorldsEndlessI tried to index a collection of page objects using zipmap with range, and the order came back shuffled. Should I be using a different function, or should I sort?
17:18justin_smithsdegutis: sam is super ed
17:19sdegutisjustin_smith: I'm still waiting a few years for the react/etc ecosystem to settle down and finally land on something sane before I jump into that + Electron
17:19pilneeh, atom, light table, and vim all support paredit from what i've found (and i prefer all three of those (in vim mode for 2 of them) to emacs just for muscle memory.... something tells me i chose the wrong pil years ago
17:19WorldsEndlessThat is, they are assigned the right number, but they come back "1, 7, 13, 3" or some such order
17:19sdegutisjustin_smith: cuz as it is right now its quite a bit ridiculous to get started with or even use, although reagent looks cool for simple things
17:19justin_smithWorldsEndless: hash-maps are not ordered, if you want an ordered map user sorted-map
17:20sdegutisjustin_smith: wow you're just full of useful Clojure tips/tricks/did-you-know-about
17:20ridcully_they appear ordered for some smaller amount of elements. 32?
17:21pilnei guess i could just hack and chop my way through some things on rosetta code instead, project euler is fun, but it is all number crunching >.<
17:21WorldsEndlessridcully_: I have fewer than 32 and it's bonkers...
17:21sdegutismy goal in #clojure is to be helpful often, increasing the chance that someone will compliment me on being helpful, at which point i can reply "Shut up baby I know it B)"
17:21justin_smithridcully_: I think it's 8
17:21justin_smith,(zipmap (range 7) (range))
17:21clojurebot{0 0, 1 1, 2 2, 3 3, 4 4, ...}
17:21justin_smith,(zipmap (range 8) (range))
17:21clojurebot{0 0, 1 1, 2 2, 3 3, 4 4, ...}
17:21justin_smith,(zipmap (range 12) (range))
17:21clojurebot{0 0, 7 7, 1 1, 4 4, 6 6, ...}
17:22WorldsEndlessYup, that's my problem....
17:22WorldsEndlessSo, (sorted-map (zipmap...))
17:22terom,(map-indexed vector (range 10))
17:22clojurebot([0 0] [1 1] [2 2] [3 3] [4 4] ...)
17:22pilnehrm... since haskell, lisp, scheme, and clojure all play extraordinarily well with emacs, maybe i should just take the plunge
17:22justin_smith,(into (sorted-map) (map vector (range 8) (range)))
17:22clojurebot{0 0, 1 1, 2 2, 3 3, 4 4, ...}
17:22pilne(my *favorite* languages)
17:22justin_smith,(into (sorted-map) (zipmap (range 8) (range)))
17:22clojurebot{0 0, 1 1, 2 2, 3 3, 4 4, ...}
17:23ridcully_yeah it's 8
17:23WorldsEndlessAh, into sorted-map did the trick.
17:23WorldsEndlessThanks!
17:24pilnenow to find the best "default clojure" setup for emacs....
17:26sdegutispilne: just install clojure-mode and paredit
17:26sdegutispilne: also cider
17:26sdegutisthen bam you're done
17:40LauJensenGents, datomic question. I have some :days/* which stores stats on a given day, and each day references 24 :day/hours where information specific to each hour. The ID for each day is :day/date (instant). How do I best extract every :hour/whatever value for dates in a given range?
17:44pilneAAARRGGHHHHHHH!!!! unity's default bindings make using the meta key in frickin emacs impossibru >.<
17:45justin_smithoption a: delete emacs, option b: change the default binding key?
17:45pilnesadly it isn't just one binding....
17:45justin_smithpilne: you can change the meta key it uses
17:45pilne(onyxia style)
17:45pilneor i can take this as my hint to gtfo from unity
17:46justin_smithpilne: in either emacs or unity, there are configs that change which key means "meta", one of them can have the windows/apple key
17:46justin_smiththat works too
17:46pilnedoes gnome 3 do stupid stuff with the meta key by default that anyone knows of?
17:53justin_smithis there a browser plugin that makes js code run slower?
17:53justin_smithlike - intentionally, I want to run this like at 1/1000 speed
17:55pilnehrm... maybe i'll just go with mate... i don't remember having these issues with rogue meta key shennanigans back in the gnome2 days >.<
17:55amalloyjustin_smith: would the js stepping debugger do?
17:55ridcully_justin_smith: use IE *ducks and runs*
17:56Glenjaminyou could use a transpiler to add a while loop between every statement
17:56justin_smithamalloy: the problem is that my bug causes the script to redirect before I can intervene - I want to see the steps before that happens
17:57justin_smithamalloy: I can't even get at the UI to enable a breakpoint - maybe if I turn js off, enable the breakpoint, then turn it on?
17:57Glenjaminat that point i rely on console logging with console persistence-on-page-change
17:57justin_smithpilne: http://askubuntu.com/questions/122209/how-do-i-modify-or-disable-the-huds-use-of-the-alt-key
17:58justin_smithGlenjamin: how does persistence-on-page-change happen?
17:58Glenjaminerm, there's usually a toggle in the browser
17:59justin_smithoh... that's what "preserve log" means... I thought it would be like a save-as prompt or something
17:59Glenjaminyou in chrome?
17:59Glenjaminah, yeah - that
17:59justin_smithGlenjamin: that will do it, thanks so much
18:00pilneok, before i do anything drastic, emacs default "meta" is alt and not the "super" key yes?
18:01justin_smithpilne: yes - but you can pick
18:01justin_smithit can use either one
18:01justin_smithor both!
18:04pilneok, i can live with this
18:04pilnejustin_smith, saving raging sleep-deprived clojurians one google at a time
18:06justin_smithpilne: it's something I've handled myself, back when I tried unity
18:07pilnesometimes i hate how much i like it in general....
18:07pilnei feel like i'm betryaing the FOSS mentality a bit by sticking with ubuntu/unity, but... life does not allow for me to jump ship and get comfy somewhere else right now (too many pressing deadlines overall)
18:07justin_smithit's not bad, except the terrible amazon tyin stuff
18:08pilnewhich i nuked
18:08justin_smithright, problem solved
18:08pilnewell, at least disabled, because nuking it makes a lot of stuff... quirky
18:08pilnealthough i do use amazon a lot, i'd like to "choose" what they know about me >.<
18:08pilneotherwise the prime account i share with the gf might have a lot of programming books as reccomendations, instead of things she would actually be interested in lol
18:09pilne.... which might save some money now that i think of it lol
18:11Glenjaminyou can have separate accounts and share prime
18:12pilnemeh, that's true, i have an old account that i rarely use these days that i could tie to unity, but... nah
18:12ben_vulpesshould i be surprised that function calls in a let don't throw exceptions?
18:13justin_smithben_vulpes: depends, are they lazy?
18:13pilnei'm honestly still trying to transition myself to gnome3 or mate, and possibly fedora down the line, but... since the long-term goal is game dev... and steam seems a "decent" way to go... i feel a bit tied to ubuntu/steam (in hopes of minimizing headaches when i get to that point)
18:13ben_vulpesjustin_smith: might be. the one in question is a my own function call wrapped around a datomic insertion.
18:14justin_smithben_vulpes: datomic stuff is often lazy in my fuzzy recollection
18:14ben_vulpesyup.
18:14ben_vulpeslooks like datomic transactions return a future
18:17ben_vulpessoooo i should probably deref all datomic-produced futures, neh?
18:17justin_smithben_vulpes: well, if you wanna know how they did, sure
19:19pilneneed moar monitors >.<
19:29pilneand about them electric fences... ren and stimpy taught me that it is a bad idea to piss on them
19:53Shayanjmgrats on the new gig arrdem :)
20:05pilnehmmm, so by this definition "or returns either the first truthy value or the last value. and returns the first falsey value or, if no values are falsey, the last truthy value." 'and' and 'or' do *not* "short circut"?
20:11pilnenevermind... i confused myself
20:49justin_smith,(and :pilne false (/ 1 0))
20:49clojurebotfalse
20:51pilneyeah... took a bit of re-reading and futzing with the REPL but i got it (:
20:51pilneand... other than getting used to the keybinds... emacs is rocking my socks
20:52pilneyears ago i went with vim because vi is on every single unix box by default, logically i should have learned enough to just do what i needed to do.. and then learned emacs too
20:52pilnehindsight is 20/20
21:05TimMcpilne: Have you used vim extensively before?
21:08princesohow do we avoid in a function getting the args in double parenthesis ((...)) when invoquing like (a-func (cons a b))
21:08TimMcI know that plenty of people use vim for Clojure quite happily.
21:08justin_smithprinceso: this is what the -> and ->> macros are for
21:09justin_smithprinceso: though usually we use those when there are more than 3 or 4 nestings
21:09TimMcIs it? I was having trouble understanding the question.
21:09justin_smith(-> (cons a b) a-func)
21:09justin_smithTimMc: I figured princeso was talking about argument nesting in parens
21:09princesoakey man. let me try :)
21:13pilnei've used vim, but the solutions it gives for "pseudo buffers" always didn't feel "right" for some reason
21:13pilnei'm *probably* going to give spacemacs a shot here after a little while tbh
21:16TimMcheh
21:23princesojustin_smith it is a macro. A macro that call itself this is the part `(a-macro ~(cons case- (next (next body)))) . Works good exept it get the args in doubles ((args))
21:24justin_smithprinceso: maybe you want arg splicing?
21:24justin_smith`(a ~@[b c d])
21:24justin_smith,`(a ~@[b c d])
21:24clojurebot#error {\n :cause "Unable to resolve symbol: b in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: b in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6704]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve symbol: b in this context"\n ...
21:24justin_smith,`(a ~@'[b c d])
21:24clojurebot(sandbox/a b c d)
21:25princesojustin_smith thank a lot, let me try
21:38devthtfw lein clean takes more than 10 minutes
21:38devthi don't get it. isn't it just rm'ing some stuff?
21:39justin_smiththat's all it should be doing, yeah
21:39justin_smithhanging prep task?
21:40devthnot sure. i don't have any custom tasks on this project
21:40justin_smithdevth: you can run jstack to see what all the threads in a jvm are doing, if you share a paste link we can probably figure out why it is stuck
21:40justin_smithjstack comes with the jdk, it's a command line program 'jstack PID'
21:40devthk let me figure out my lein pid
21:40devthi have quite a few ...
21:42devthhey that kinda looks like a kill -3 on a java process
21:42devthhttps://gist.github.com/devth/13b0731fd7fa2b75d36b
21:42devthnot totally sure that's the right one
21:43devthhm a killall java didn't kill lein
21:44justin_smithdevth: that was a dump of drip - drip is a tool that keeps jvms ready to deploy to speed up startup
21:44devthk
21:44devthkilling off all my various repls..
21:44devthso i can hone in on the correct one
21:45TimMcWhere's that site that tells you relative usage of different clojure libraries?
21:45justin_smithdevth: if you use ps ax you can see the command line args
21:45justin_smiththe one running clean should be distinctive
21:45devththat's what i'm using
21:45devththey're all huge
21:45devthand some are on related projects
21:45justin_smithTimMc: crossclj.info
21:46justin_smithdevth: but they shouldn't all have "clean" as part of their command line
21:46devthjustin_smith: after i killed off all my repls `lein clean` ran in ~2s
21:46devthoh i should have looked for that before i killed it
21:46devthok next time...
21:46devthfor some reason having a bunch of other `lein repl`s caused lein clean to hang
21:47TimMcjustin_smith: I'm trying to figure out if there's a more or less canonical fork of clj-aws-s3 that is up to date.
21:47justin_smithdevth: if you plan to run multiple repls in one project, here's a neat trick: 'lein cp > classpath'; rlwrap java -cp $(cat classpath) clojure.main
21:47TimMcThere are a bunch of forks.
21:48justin_smithdevth: after the first time you run cp, you don't need to run it again until you change project.clj
21:48devthjustin_smith: i usually run 1 per project but that's a cool trick to know
21:48devthim gonna put it in my zshrc :D
21:49justin_smithTimMc: oh yeah - looks like crossclj.info only tracks one of them
21:49justin_smithdevth: well it's two parts - you only need to run the lein cp once, then you can run the java -cp part multiple times - starts much faster than lein repl
21:49devthnice
21:50devthi've been restarting my repl a ton due to poor reloadability
21:50devthjustin_smith: do you use component or whatever?
21:50justin_smithwhy aren't you coding reloadably?
21:50justin_smithdevth: yeah, I use stuartsierra's component lib
21:50devthlegacy code
21:50devthon the todo list :)
21:52devththat was just due to a huge refactoring though. normally i just reload namespaces.
21:54devthtime to `lein release` 🎉
21:56princesojustin_smith thak you man. yuo are a life saver :) Yes it worked with splicing ~@(cons ....
22:32princesojustin_smith This was the macro, if yuo have a break. http://pastebin.com/yD9PPXA6
22:40ben_vulpesaaaa datomic pull api is teh dopeness
23:06ben_vulpesdoes anyone have a hot tip for enforcing that *.cljs files get cider-load-file'd into the CLJS repl and that *.clj files get idem'd into the clojure-proper repl?