#clojure logs

2014-05-02

00:40fowlslegsAnyone know a good way to convert 64 bit binary strings into Ints?
00:45Jaood,(assoc nil 1 2)
00:45clojurebot{1 2}
02:11storme,(+ 1 2)
02:11clojurebot3
02:11storme,'(+ 1 2)
02:11clojurebot(+ 1 2)
02:11storme,(- 4 (+ 1 2))
02:11clojurebot1
02:11storme,'(- 4 (+ 1 2))
02:11clojurebot(- 4 (+ 1 2))
02:11storme,(- 4 '(+ 1 2))
02:11clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to java.lang.Number>
03:12TravisDis there any attempt to get clojure operating with the ipython notebook? I just installed the new version and it is gorgeous
05:28m1dnightguys, is the order of evaluation of a let sequential, or undefined?
05:28pyrtsaSequential.
05:28ssiderism1dnight: sequential
05:28m1dnightgreat :) thanks guys
05:28m1dnightthe docs are not really clear on it
05:29ssiderism1dnight: also, previous bindings are available to later bindings
05:29ssideris,(let [a 5, b (* 2 a)] b)
05:29clojurebot10
05:30ebaxt,(let [a 5, b (* 2 a), a 2] a)
05:30clojurebot2
05:30ssiderisand sometimes people do this but I have mixed feelings about it:
05:31ssideris,(let [a 5, a (* 2 a), a (* 2 a)] a)
05:31clojurebot20
05:32m1dnightssideris: yeah, that's what I figured as well
05:32m1dnightbut with the laziness there could be some voodoo going on or so :p
05:32m1dnightso I just wanted to make sure
05:32m1dnightI have something like (let [before (System/nanoTime) <do some heavy work> after (System/nanoTime)] <code>)
05:33m1dnightI checked out the criterium library yesterday. Too bad that when a function takes too long to run it only runs it once.
05:33m1dnightgreat library otherwise
05:33m1dnightperhaps I can fiddle a bit with the source code
05:41Glenjaminhi guys, i'm getting what looks to be a reflection warning from leiningen: call to static method invokeStaticMethod on clojure.lang.Reflector can't be resolved
05:41Glenjaminwhich appears to be from: (clojure.lang.Reflector/invokeStaticMethod class__9795__auto__ "main"
05:41ssiderisdo you get that from: lein run
05:42Glenjaminyes
05:42Glenjaminis that a problem i should raise an issue for, or is it expected?
05:43ssiderisdo you have a class that is configured in project.clj, is compiled ahead of time, and has a main method/
05:43ssideris?
05:44Glenjaminclass as in gen-class ?
05:44Glenjamini've just got the -main that was generated from lein new project
05:44ssiderissee gen-class here: http://clojure.org/compilation
05:44ssiderisoh
05:45ssiderishm, yeah that should have worked
05:46Glenjamincould it be related to ":main ^:skip-aot myproject.main"
05:46Glenjaminin the project.clj
05:46ssiderisvery likely
05:46ssideristhe namespace containing the -main class should be AOT'ed
05:47ssideris(AOT = ahead of time)
05:47Glenjaminyeah, i hadn't changed anything from the generated template, so i was just confused as to whether or not its a real error or even a problem
05:48ssiderisso removing ^:skip-aot fixed it?
05:49Glenjaminhrm, nope
05:50Glenjaminah, i think this maybe be a minor lein bug
05:50Glenjaminhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Reflector.java#L198
05:51Glenjaminlooking at the generated bootstrap code, i think something should have ^Class typehint on it
05:52Glenjamini'll write it up on github and see what people think
05:57ssiderisgood idea
05:58ssiderisso is there a workaround?
06:00TEttingeris it called main or -main in your code, Glenjamin?
06:02ssiderisTEttinger: Glenjamin mentioned that he's just using the code generated by lein new
06:02TEttingeroh!
06:08ssiderisGlenjamin: I just tried with Leiningen 2.3.4 and it works fine for me
06:08ssideriscould you paste your project.clj in a pastebin please?
06:11tickingI was wondering if theres a a special form to limit lexical/reset scope.
06:22turbopapeso keyword can contain space ?
06:23rukorhi does anyone know if any tools currently exist for automatically generating API documentation from liberator resources
06:24rukoror from compojure route specifcations
06:24ssideristurbopape: yes ,(keyword "this is valid")
06:25ssideris,(keyword "this is valid")
06:25clojurebot:this is valid
06:25andrewchambersits valid in code, but the reader cant do it?
06:25turbopapeok, cool ssideris, I just wanted to know if it was not undefined behaviour....
06:26turbopapeandrewchambers, I think you must go with a (keyword ....) call
06:32GlenjaminTEttinger / ssideris - reduced to testcase https://github.com/glenjamin/lein-new-reflection
06:32Bronsaturbopape: ssideris andrewchambers keywords can't contain spaces.
06:33Bronsathe `keyword` function doesn't do any validation on its input, it's garbage-in garbage-out
06:34turbopapeok BRonsa, is it invalid or merely not verfied and random ?
06:34andrewchambers((keyword ":foo bar") {(keyword ":foo bar") 1337 })
06:34andrewchambersthat works fine
06:35andrewchamberswhoops ignore the colon
06:35andrewchambers,((keyword "foo bar") {(keyword "foo bar") 1337 })
06:35clojurebot1337
06:36Glenjamin,(type (keyword "a space"))
06:36clojurebotclojure.lang.Keyword
06:36andrewchambersworks fine
06:36Bronsaandrewchambers: I didn't say that it doesn't work, but you should consider it undefined behaviour
06:36ssiderislengthy discussion on the topic of spaces in keywords here: https://groups.google.com/forum/#!topic/clojure/WvXYkvLoQhI/discussion
06:36Bronsathe fact that it works is just because the implementation doesn't do any validation on its input for performance reasons
06:37turbopapeok Bronsa, well explained !
06:37ssideris,(pr-str (keyword "will this print"))
06:37clojurebot":will this print"
06:37ssideristhis is broken for example ^
06:38ssideris,(read-string (pr-str (keyword "will this print")))
06:38clojurebot:will
06:39andrewchambersI dunno, i think it has legitimate uses
06:39andrewchamberssince keywords and strings dont have the same performance characteristics
06:40andrewchambersjust because the reader cant handle it doesnt mean its undefined
06:40andrewchambersif there is a standard that says that i would beleive it :P
06:41andrewchambersclojurebot is pretty cool
06:45s0xhey guys, im not sure if the following is a speclj or clojure namespace issue. Maybe im just to dumb to see the reason: I try to setup a projectusing speclj for testing and tools.cli for cl-parsing. If i require the clojure.toosl.cli namespace and try to use the function parse-opts somewhere in the source file speclj stops to work complaining about no such var parse-opts. When i call the source by hand, everything works fine :-/ Im acctually struggling with that for
06:45s0xI'd be very happy if anyone could give me a bit of support or a hand what the issue might be about
06:49ssideriss0x: can you paste the code somewhere?
06:49ssiderisor at least the (ns) and the actual call to parse-opts
06:50s0xssideris: sure ... give me a sec
06:52s0xhttp://pastebin.com/xLGMiY9e
06:52s0xboth, the test and the tested file are in there
06:53ssiderisclojure.tools.cli/parse-opts args cli-options is not even in parentheses, it should be: (clojure.tools.cli/parse-opts args cli-options)
06:54s0xoh you're right ... just a c&p mistake ... doesnt change anything though
06:54s0xjava.lang.RuntimeException: No such var: clojure.tools.cli/parse-opts, compiling:(chnum/core.clj:26:3)
06:54s0xthats the error message i get
06:55ssiderisweird
06:55llasrams0x: Which version of tools.cli do you have in your dependencies?
06:55s0x0.3.1
06:56s0xspeclj 2.9.1, clojure 1.6.0
06:56llasramAre you using Leiningen? If so, I'd do `lein deps :tree` to verify
06:56ssiderisyeah, an earlier version could be pulled in by another dependency
06:56llasramWell, not usually
06:57llasramBut best to verify :-)
06:57s0xllasram: yes using lein, there are just the version present, i've mentioned
06:57ssideristry changing the require to: (:require [clojure.tools.cli :refer [parse-opts]])
06:57llasramOk. I'm now going to guess that you have a stale AOT of a pre-0.3.0 version somewhere, either in your project or in a badly-packaged dependency
06:57clojurebotCool story bro.
06:58ssiderisyeah that too, try a lein clean
06:59s0xum ... since im strugling with this issue for months i've tried even creating new projects and on different machines with the same effect
06:59llasramOk. I just re-ran your original question
06:59llasramEr
06:59llasram"went back and read" ha
06:59llasramHow are you running your speclj tests?
06:59s0xlein clean does not change anything either
06:59llasram(which causes the error)
06:59s0xlein spec
07:00llasramversion of the speclj plugin?
07:00s0x2.9.1
07:00gunssox: Others have reported that earlier versions of of tools.cli get pulled in by reply
07:01s0xwell, lein deps :tree gives no evidence of older versions installed
07:01gunsI haven't seen this myself, but the snapshot version of reply has at least upgraded to 0.3.1
07:01llasramI think this was a problem specific with the speclj plugin
07:01llasramJust a sec... almost have it tracked down
07:01clojurebotIt's greek to me.
07:02llasramMan, clojurebot is on a roll this morning
07:03llasramThere we go! Ok, for not-very-good reasons, the `lein spec` task used to run specs *in the Leiningen process*
07:03llasramLooks like got fixed for the speclj plugin version 3.0.2
07:03llasrams0x: If you're on 2.9.1, try adding `:speclj-eval-in :subprocess` to the top-level of your project map
07:03llasram(or upgrade your speclj plugin)
07:06s0xllasram: wow ... both ways the tests run successfully :D ... thank you so much
07:06llasramnp!
07:07s0xwell the last time i was working on that 3.0.2 was not available yet :)
07:17andrewchambers,'()
07:17clojurebot()
07:18sm0keso in a compojure route how do i get both requestmap and uri param
07:18sm0keso for something like. (GET "/foo/:id" [id] (foo id])
07:18sm0kehow do i pass req to foo with id
07:27pyrtsasm0ke: (GET "/foo/:id" [id :as req] (foo req id)) is probably the best option, though there are other ways too.
07:29sm0kehurm
07:29sm0kepyrtsa: id :as req looks really misleading
07:30sm0kedoes that even work?
07:30sm0ke!
07:30noidiI think so too, that's why I always put :as first
07:30sm0kewhat kind of destrucuring is that?
07:30pyrtsasm0ke: It does. It's similar to (defn foo [a b c :as args] ...)
07:30noidihttps://github.com/weavejester/compojure/wiki/Destructuring-Syntax
07:30noidiCompojure has its own desctructuring syntax for requests
07:31pyrtsaYou could do something like this too: (GET "/foo/:id" {:as req {:keys [id]} :params} ...)
07:31noidiI think [:as req, id] might work as well
07:32pyrtsaReally? That'd read nicer.
07:32noidiat least that works with Clojure's require :)
07:34pyrtsaI think a bigger downside in Compojure is that you can't enumerate the routes at runtime (i.e. the routes aren't bidirectional). And when the list of routes starts to grow, there's nothing to check that you didn't already handle that route somewhere higher up already.
07:34noidiyeah, we've hit that bump as well
07:35pyrtsaI know there are other attempts to fixing that outside Compojure.
07:35pyrtsahttps://github.com/juxt/bidi for example.
07:35noidiI can see why Prismatic chose to describe schemas as data instead of composition of validation functions
07:39sm0keso i dont really understand this
07:39sm0keif i say (GET "/foo" foo) foo gets called with request?
07:40sm0keif i say (GET "/foo:id" [id] foo) ?
07:40pyrtsanoidi, sm0ke: Just tested that [:as req arg1 arg2 arg3] works too.
07:40sm0kewhat happend then?
07:41sm0kewhere arg1 arg2 arg3 are url patterns?
07:42m1dnighthey guys, I'm having a weird thing with agents. I've many threads (about 100) write to a file couple of 100 times each. (these params should be bigger normally). I wrapped the filepath in an agent and just send-off a function to the agent to update a file.
07:42pyrtsasm0ke: I think Compojure went a bit over board with all the ways the handlers can be written. Mistakes you make often end up being valid code, possibly failing silently. IMO, it's best to always follow the structure (METHOD "<pattern>" [captures...] (a-function-call ...))
07:42m1dnightwhen I use this, my program takes more than minutes to excute, while disabling sending to the agent it executes in a fraction of as econd.
07:42m1dnightany tips..?
07:42pyrtsaE.g. (GET "/foo/:foo-id/bar/:bar-id" [:as req foo-id bar-id] (foo/handle-foo-bar req foo-id bar-id))
07:42m1dnighteven when the sendoff doesn't do any writing, it still takes a huge amount of time.
07:43sm0kepyrtsa: thanks
07:43sm0ke(inc pyrtsa)
07:43lazybot⇒ 4
07:43noidism0ke, the thing after the path is the name for the request parameter. In (GET "/foo" foo ...) the request parameter is made available under the name "foo"
07:44pyrtsasm0ke: PROTIP, to test Compojure routes on the REPL, pass in a map with at least the :uri and :request-method fields, e.g. ((compojure.core/GET "/foo/:id" [:as req id] {:body (str "foo-" id)}) {:uri "/foo/123" :request-method :get})
07:44sm0kenoidi: sorry but i think that was a typo
07:44sm0kethat is not valid iirc
07:45sm0ke(GET "foo" [] foo) is ok though
07:45pyrtsanoidi: (GET "/foo" foo ...) would bind the whole request object itself to the name `foo`.
07:46noidisorry, that's what I was trying to say
07:46sm0keugh ugly stuff
07:46noidithe request is passed as a parameter to the handler :D
07:46sm0ke(GET "foo" [] foo) makes no sense to me
07:49noidism0ke, https://www.refheap.com/84861
07:49noididoes that make any more sense?
07:55sm0keugh thanks noidi
07:55sm0kestill need to grok it i guess
07:55sm0kebookmarked
08:06noidism0ke, if you're unfamiliar with destructuring, this might help http://blog.jayfields.com/2010/07/clojure-destructuring.html
08:09phillordI'm just reading Wiliiam Byrd's thesis on mini-kanran. In one place he defines "alwayso" and "nevero". When he uses "alwayso" he writes it like (run1(x) (== #t x) alwayso (==#f x)) while when he uses never, he writes (nevero) -- i.e. one looks like a function call, and one looks like a value. Am I confused over scheme syntax or is this right?
08:18m1dnightif anybody has a moment, could they help me out with my clojure question? : http://stackoverflow.com/questions/23427457/clojure-using-agents-slows-down-execution-too-much
08:18m1dnightI'm stumped as to what's going on..
08:20m1dnightit just seems to be the case that code doesn't immediatly return
08:20m1dnightthe method exits fine (well, it prints the last statement I've just added)
08:21Anderkentm1dnight: send-off spawns a new thread executor every time you call it
08:21Anderkentwait no i'm reading it wrong
08:21ucbagents use the global threadpool IIRC
08:21Anderkentpretty sure agents have their own threadpool
08:21m1dnightyeah, the file is written to. and each thread does it work properly and on time. when I'm done running the (barrier/run-with-barrier) I print "done", which gets printed instantly
08:22ucbhow are you spawning new thread m1dnight? if using (future...) then your agent thread is probably competing with the producer threads
08:22m1dnightbut then it keeps waiting a long time to finish..
08:22Anderkentm1dnight: oh
08:22m1dnightthreads (repeatedly number (fn [] (Thread. work)))]
08:22m1dnightlike this
08:22Anderkentyou need to call (shudtown-agents)
08:22m1dnightoh
08:22Anderkentwhen you're done sending stuff
08:22m1dnightI might try that
08:22m1dnightlet me try, thanks man :)
08:22ucbthat too
08:22m1dnightthat did the trick!!! :)
08:22m1dnightthanks guys!
08:23m1dnightstrange the programing clojure book didn't mention it
08:23m1dnightif anybody has a SO account i'll be glad to accept it as the anser
08:25foodoo3
08:40Anderkentucb: go ahead
08:41ucbI don't think I have an SO account anyway :)
09:19mi6x3mclojure
09:19mi6x3mis set! the same as binding but without the explicit scope?
09:20CookedGr1phondoes anybody know how I might go about configuring cljx for :cljs and :clj (:android or :jvm) using features?
09:20CookedGr1phonI can't seem to find any documentation, it's just mentioned in a couple of places
09:20llasrammi6x3m: `set!` is a special form which can do multiple things. Applied to a dynamic var w/ an existing thread-local binding, it will change the var's value in that current binding frame
09:21mi6x3mllasram: so it saves me another binding frame?
09:21llasramNo
09:21llasramIt mutates the value in the current binding frame
09:22llasramWell, or "yes" -- I'm not sure which sense of "save" you mean there
09:22mi6x3mok, I see, so if I use it inside a loop recur for instance it will take effect for the things before set! also
09:22mi6x3mwhere another binding frame will not
09:23llasramWhat are you trying to do?
09:26mi6x3mllasram: nothing, just asking questions to get a clear picture :)
09:27llasramok
09:41_trevException in thread "main" java.lang.ExceptionInInitializerError
09:41_trev at clojure.main.<clinit>(main.java:20)
09:41_trevCaused by: java.lang.NoClassDefFoundError: clojure/core/cache/CacheProtocol, compiling:(user.clj:1:1)
09:41_trevMorning everyone. I'm trying to uberjar my app on a ubuntu box, but I keep getting this error "
09:41_trevAny thoughts?
09:41_trevI'm using the cmd "lein ring uberjar"
09:44clgv_trev: sound like an AOT problem, possibly old class files lying around. try "lein clean"
09:45_trevSame deal clgv :(
09:46clgvdoes "lein repl" work?
09:46_trevno
09:46_trevI get that same error
09:47clgvwhat is the content of user.clj?
09:47clgvrefheap.com please
09:49_trevhttps://www.refheap.com/84869 clgv
09:49clgv_trev: check "lein deps :tree" whether you accidently pull in 2 different versions of core.cache
09:50_trevonly 1 core.cache
09:50_trev [org.clojure/core.cache "0.6.3"]
09:52clgvcan you post the full stacktrace on reheap.com?
09:52clgv*refheap
09:52_trevyeah 1 sec
09:54_trevhttps://www.refheap.com/84871 clgv
09:56clgv_trev: hmm your problem seems to be somewhere in that namespace www.models.ghub
09:56_trevhmm. It works on my osx box though
09:57_trevmy ubuntu server is unable to create the uberjar :(
09:57_trevclgv:
09:59_trev[clojure.core.cache :refer [->TTLCache ttl-cache-factory]] pretty standard
10:11clgv_trev: that project is not hosted on github or somewhere similar?
10:12_trevclojure.core.cache?
10:20_trevThanks for the help clgv I'll have to work on fixing the problem later
10:21clgvno I meant yours ;)
10:33AssCancerhiya
10:33SparkySparkyBoomim trying to use this library
10:33SparkySparkyBoomhttps://github.com/cgrand/regex
10:34SparkySparkyBoomwhen i tried this command in the repl, it gave me a FileNotFoundException
10:34SparkySparkyBoom(require '[net.cgrand/regex :as regex])
10:35SparkySparkyBoomi dont understand what's wrong
10:35SparkySparkyBoomthis is the relevant file
10:35SparkySparkyBoomhttps://github.com/cgrand/regex/blob/master/src/net/cgrand/regex.clj
10:35`szxSparkySparkyBoom: do you have the library as a dependency in your project.clj?
10:35SparkySparkyBoomyes
10:35SparkySparkyBoom[net.cgrand/regex "1.1.0"]
10:36whodidth1snet.grand.regex :as regex
10:37SparkySparkyBoomAH
10:37SparkySparkyBoomi forgot the '
10:37SparkySparkyBoomsymbol literals
10:37SparkySparkyBoomXD
10:37SparkySparkyBoomsorry about that
10:46SparkySparkyBoomdoes anyone know of any more examples of that library
10:46SparkySparkyBoomother than the readme
10:47eraserhdWhat is the thinking about not having single-component namespaces?
10:49cbpYou cant use them in java
10:49llasrameraserhd: Because of the way Clojure generates classes, it results in package-less classes, which can cause some issues from the Java side
10:50llasramIn practice access from Clojure is completely fine
10:51cbpyou get classes in the default package which cant be referenced from other packages in java
11:18jcromartieWhat are y'allses thoughts on RequireJS vs some sort of middleware to bundle up script includes into a minified package?
11:19jcromartieI could probably use the Closure compiler to do it from Clojure
11:19bbloomjcromartie: in the context of clojurescript? or generally?
11:19jcromartiejust to make things confusing for everybody
11:19jcromartiein the context of a Clojure web app that serves up regular old JS for regular old webpages
11:19jcromartiesorry, nothing fancy
11:19jcromartie(why aren't we using cljs?)
11:20bbloomif you've got regular ol' web pages, don't get fancy with module loaders
11:20bbloomrequirejs, browserify, etc are exceptionally complex
11:20jcromartieyou think?
11:20jcromartierequirejs doesn't seem too complex to me
11:21bbloombrowserify makes sense for larger codebases and for playing nice with node.js components
11:21bbloomrequirejs makes sense for really rich apps that need asynchronous code loading and such
11:21jcromartiewe just have a few bits of client side code
11:21bbloombut otherwise, simple concatenation gets the job done for your everyday static page w/ a little js on it
11:21jcromartiereally not much at all
11:22jcromartieit could be in a single file really
11:22bbloomyeah, don't worry about "large" packages
11:22jcromartiebut I like to be organized
11:22bbloommake files are your friend here
11:22bbloomall you want is a single rule like this:
11:22bbloommysite.js: js/foo.js js/bar.js js/baz.js
11:23bbloom cat $* > $@
11:23bbloomand you're done
11:23bbloomadd a mysite.min.js: mysite.js rule as well to run your favorite compressor
11:23bbloommaybe add a mysite.min.js.gz rule too if you want to send pre-compressed files to your CDN
11:24bbloomdon't get fancier than this unless you need to
11:24jcromartieand integrating that into lein?
11:24bbloomdon't
11:24jcromartiethat seems like a rather ugly way to go for development time, though
11:24jcromartieI would have to run make every time I update af ile
11:25bbloomnah, just create a ./dev.sh file and run that while you work
11:25bbloomyou can put your sass/compass/less/whatever watch in there too
11:25jcromartieyeah
11:25bbloomyou can have dev.sh run your lein server if you want
11:26sm0kehow do you send a pretty print json to browser?
11:26sm0kei am using cheshire and {:pretty true} doesnt really work
11:26sm0keneither does (with-out-str (pprint json))
11:27jcromartiebbloom: that also adds another step to the final build process
11:27bbloomjcromartie: what's your final build process?
11:27jcromartiewell it's already a rake script :)
11:27jcromartiethat calls lein among other things
11:27bbloomjcromartie: ugh rake.
11:27jcromartieyeah
11:27jcromartiefor our purposes it's a little overkill
11:27bbloomjcromartie: anyway, make can call rake and vice versa
11:27bbloomrake isn't overkill, it's bad.
11:28llasrambbloom: Why so?
11:28bbloomit's got some make-like features that most ppl don't know exists, then it does some stupid "task" level stuff
11:28jcromartiewhat make-like features that most people don't know exists?
11:28bbloomit's slow, impossible to debug, and encourages you to do stupid things
11:28bbloomjcromartie: http://rake.rubyforge.org/doc/rakefile_rdoc.html#label-Rules
11:29jcromartiedamn
11:29bbloomfor some weird reason, people want ONE COMMAND LINE TOOL TO RULE THEM ALL and insist on everything being `rake foo` or `lein bar`
11:29jcromartieyeah I have used file tasks before, but not rules
11:29bbloommeanwhile, a ./script directory is 100X more dev friendly
11:29jcromartieit certainly can be
11:30jcromartie./script/deploy
11:30jcromartie./script/dev
11:30jcromartiesure
11:30bbloombest feature:
11:30bbloomls ./script
11:30lazybotetc home lib mnt proc sbin src srv
11:30jcromartiewho doesn't love a shell script :)
11:30bbloomi'll take bash over rake any day of the week
11:31bbloom:-P
11:31bbloomand i know rake better than most people ever will :-P
11:31llasramThe only reason I'd argue is because pretty much every damn time I think "this is tiny, so I'll just do it in bash" it grows beyond "tiny" and I experience regret
11:31bbloomllasram: so don't do it in bash, do it in python or ruby or whatever you like
11:31jcromartiewell it doesn't have to be bash for every script
11:31bbloom#!/bin/whatever
11:32jcromartieyeah
11:32jcromartie#!/bin/lein
11:32jcromartie:P
11:32jcromartiedon't
11:32llasramhah
11:32jcromartienot that that would even work
11:32llasrambbloom: Sure. I was just disagreeing with taking bash over rake :-p
11:33jcromartieI'm a little sick of typing "bundle exec" to do anything in my clojure app
11:33jcromartiesomeone else designed the deployment script
11:33jcromartie:|
11:33bbloomjcromartie: solution:
11:33jcromartieI'm taking it over though
11:34jcromartieI'm the primary one running this project now
11:34bbloomecho "#!/bin/bash\nbundle exec\nrake" > ./script/build
11:34lazybot"#!/bin/bash\nbundle exec\nrake" > ./script/build
11:34bbloomlazybot: your sh parser sucks :-P
11:34jcromartie:)
11:58SparkySparkyBoomi tried looking through the source of this library
11:58SparkySparkyBoomhttps://github.com/cgrand/regex
11:58SparkySparkyBoombut i couldnt figure out a way to match a word
12:00SparkySparkyBoomdoes anyone know how to use the lib?
12:01gtrakSparkySparkyBoom: did you try the built in stuff first?
12:01SparkySparkyBoomyes
12:02SparkySparkyBoomive composed regexes with it
12:02gtrakah, ok. just making sure :-)
12:02cbpWhat was the name of that routing library that used data instead of macros?
12:02cbpthere's probably more than one
12:02gtrakpedestal, bidi..
12:03SparkySparkyBoomit's weird because the exec function's args are all characters
12:03gtrakI think prismatic has one
12:03SparkySparkyBoomer character equivalents
12:03gtrakfnhouse
12:03SparkySparkyBoom*regexes and character literals
12:04nullptr`cbp: https://github.com/caribou/polaris explicitly defines itself as you describe
12:04cbpAh yes that one
12:04cbpthanks!
12:07eflynnis it possible to integrate PHP with clojure
12:08cbpI mean you can marshal data between them. Maybe you can even do something nutty with that java bridge thing
12:09eflynncbp: yeah but i’m clueless when it comes to java web tech
12:09SparkySparkyBoomfigured it out
12:09SparkySparkyBoom:D
12:10SparkySparkyBoomi was right about the character thing
12:10eflynnchp: how would you marshal data between
12:10cbpwith json or something of the sort
12:25manutteror possibly this: https://github.com/igorw/edn/blob/master/src/parser.php
12:25manutter(just had to google that, don't know if it's any good or not)
12:30coventryhttps://github.com/rodnaph/clj-php (not saying it's a good idea. :-)
12:41justin_smithwow
12:43manutterjust ran across that one myself
12:44manutterI'd be more interested in writing a php interpreter in clojure
12:44manutteror a hack interpreter
12:46expezgfredericks: nice!
12:49m1dnighthmm, clojure just ignored my post and pre? :p
12:49m1dnightis there a setting I have to force? (im using lein)
12:50justin_smithm1dnight: what do they look like?
12:50pyrtsam1dnight: Where did you use those? They aren't supported in all places.
12:50m1dnightcall: (load-store-only 30 5 20 500) and constraint:
12:50m1dnight(defn load-store-only [thread-count cache-size store-size store-latency]
12:50m1dnight "Test requesting from the store"
12:50m1dnight {
12:50m1dnight :pre [(> store-size thread-count)]
12:50m1dnight :post []
12:50justin_smithit is easy to use :pre and :post wrong, there is no error message, they just don't fire
12:50m1dnight }
12:50pyrtsam1dnight: Your docstring is in wrong place.
12:51m1dnightsnap
12:51pyrtsaFYI, :pre and :post also won't work if *assert* is set to false, but who does that. :)
12:51m1dnightoh, it seems to be so, yes
12:51gfredericksI just went on a rant in the internal chatroom about arglists going on the first line
12:51m1dnighthad not noticed it before!
12:51gfredericksdue to exactly this possibility
12:51m1dnightso it's <name> <docstring> <params>
12:51pyrtsaYes.
12:52gfredericks,(doc defn)
12:52clojurebot"([name doc-string? attr-map? [params*] prepost-map? ...] [name doc-string? attr-map? ([params*] prepost-map? body) + ...]); Same as (def name (fn [params* ] exprs*)) or (def name (fn ([params* ] exprs*)+)) with any doc-string or attrs added to the var metadata. prepost-map defines a map with optional keys :pre and :post that contain collections of pre or post conditions."
12:52m1dnightdamn, sorry I missed that guys
12:52m1dnightfigured I'd get a compiler error
12:52m1dnightthanks again :p
12:52cbpHappens to everyone
12:52gfredericksmaybe eastwood would catch that as an unused literal
12:52justin_smithm1dnight: yeah, because pre / post are just a regular data structure, they don't throw an error when malformed / in the wrong place
12:53justin_smiththey just don't do what you expect, is all
12:53pyrtsaI just wish :pre and :post would allow a custom error message like assert does. The errors from :pre and :post are often so unhelpful when they happen.
12:53gfrederickswell the post should throw
12:53cbpI have actually very old code with docstrings in the wrong place haha
12:53gfredericks,(fn [a] "Putting my post in the wrong place" {:post [(even? %)]} a)
12:53clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: % in this context, compiling:(NO_SOURCE_PATH:0:0)>
12:53pyrtsaHeh, so postconditions are safer actually. :)
12:54gfrederickspyrtsa: I sent an email to clojure-dev about the error message thing with a couple proposals for how to support it
12:54gfredericksnobody responded
12:54pyrtsagfredericks: Link?
12:54gfredericksI'll check
12:54justin_smith,(fn [a] "Putting my post in the wrong place" {:post [(even? a)]} a)
12:54justin_smith,((fn [a] "Putting my post in the wrong place" {:post [(even? a)]} a) 1)
12:54clojurebot#<sandbox$eval71$fn__72 sandbox$eval71$fn__72@1ed8be3>
12:54clojurebot1
12:54gfredericksjustin_smith: what's the point of a post without using %?
12:55m1dnighthah :) nice
12:55justin_smithgfredericks: ahh, got it
12:55m1dnighthe meant pre, I think
12:55justin_smithm1dnight: no, I just didn't understand what he was demonstrating
12:55gfrederickspyrtsa: just kidding I did get one response: https://groups.google.com/forum/#!searchin/clojure-dev/preconditions/clojure-dev/eNK9UZ5HklI/BDa6CDHenWkJ
12:58pyrtsagfredericks: Ha, that's actually a very nice way to achieve it.
12:59SparkySparkyBoomis there a function to add one map to another where only the same keys are modified
12:59pyrtsaThanks!
12:59SparkySparkyBoomlike a set union
12:59m1dnighthey, they work now \o/
12:59m1dnightthanks a bunch guys
12:59justin_smithSparkySparkyBoom: merge / merge-with
12:59m1dnightfree internets for everyone!
12:59technomancy(map inc @#clojure)
13:00hyPiRiontechnomancy: that one is just too lazy
13:00SparkySparkyBoom(add {:a "a" :b "c"} {:a "aa" :b "bb" :c "cc"})
13:00technomancyhyPiRion: mapv then?
13:00SparkySparkyBoomwhere the result is {:a "aa" :b "bb"}
13:00hyPiRiontechnomancy: yeah, or dorun
13:00SparkySparkyBoomjustin_smith: will it do that?
13:00justin_smithSparkySparkyBoom: so you don't want union, you want intersection :P
13:00technomancyI get a guilty pleasure from using mapv for side-effects
13:01SparkySparkyBoomah
13:01SparkySparkyBoomsorry
13:01SparkySparkyBoomyes
13:01justin_smithsomething like (merge (select-keys a (keys b)) (select-keys b (keys a)))
13:01gfredericksmerge-intersectingly!
13:01pyrtsaMaybe just (select-keys b (keys a))
13:02gfredericksthen b has to have the keys
13:02pyrtsaRight.
13:02pyrtsa(merge a (select-keys b (keys a))
13:02gfredericksI guess that's what intersection does
13:03justin_smith,(let [a {:a 0 :b 1 :c 2} b {:b 3 :c :4 :d 5 :e 6}] (merge (select-keys a (keys b)) (select-keys b (keys a)))) SparkySparkyBoom
13:03clojurebot{:b 3, :c :4}
13:04johnjelinekhihi all, how's it goin'?
13:04justin_smithpyrtsa: well that's not an intersection, it has all keys of a
13:04pyrtsajustin_smith: The original example didn't require it to be an intersection actually.
13:04justin_smithpyrtsa: I could have misunderstood the intention
13:04johnjelinekgot a question: I have a higher-order function defined in a let so I can use it, but it is executing in the let and also when my functions use it
13:05johnjelinekhow can I declare it without using it in the let?
13:05gfredericksjohnjelinek: that shouldn't be happening; can you share your code?
13:05manutterDo you h ave the fn name after the (fn part?
13:05johnjelineklemme clean it up and I'll refheap it :)
13:05justin_smithjohnjelinek: things don't execute unless you call them
13:06SparkySparkyBoomjustin_smith: thank you
13:06manutterit should look like (let [my-fn (fn [arg] (body))])
13:07justin_smithSparkySparkyBoom: actually, taking a second look at that, since we are doing a merge we only get the values from b
13:08justin_smith,(let [a {:a 0 :b 1 :c 2} b {:b 3 :c :4 :d 5 :e 6}] (select-keys b (keys a))) this is equivalent
13:08clojurebot{:b 3, :c :4}
13:09justin_smiththe other one had a redundant selection of elements of a that would all get replaced (though as I mentioned above merge-with could do something useful)
13:10rasmusto(reductions (fn [v f] (mapcat f v)) [{:seed blah}] (cycle [fn1 fn2 fn3])))
13:10rasmustois this ^ a thing?
13:10johnjelinekhttps://www.refheap.com/85025
13:11johnjelinekI believe the part in the let is being executed because I get "401" printed out, which is a (.statusCode resp)
13:12johnjelinekand it happens on start (and also when the channel gets that event message)
13:12justin_smithjohnjelinek: I see no let in that code...
13:12johnjelinekhttps://www.refheap.com/85025#L-11
13:12johnjelinekline 11
13:12justin_smithoh never mind
13:12justin_smithyeah, I missed it, see it now
13:13justin_smithso you are thinking the token-handler is being called prematurely?
13:14m1dnightwell, I just figured out you can't use function names that reside in the core namesapce
13:14m1dnightderp :p
13:14johnjelinekI think so, the println is being called when the process starts
13:14justin_smithm1dnight: you can, it's just not a good idea usually - but you can still call clojure.core/shadowed explicitly
13:15justin_smithjohnjelinek: if the let is on the top level, I would expect to see the go-loop be executed immediately
13:15justin_smithwhich could lead to token-handler being called, I would assume
13:16johnjelinekbut the channel doesn't have anything in the buffer on start
13:16johnjelinekso, the go-loop shouldn't grab anything
13:16johnjelinekbrb, lunch
13:16justin_smithjohnjelinek: in general anything with side effects should be in a function (maybe an 'init') so that it can be explicitly run / re-run instead of running at namespace load time
13:21cbpm1dnight: use (:refer-clojure :exclude [..]) It's fine as long as they are not special forms
13:34m1dnightcbp: yeah, I went with that one instead of renaming all my functions
13:34m1dnightfunny quirck though :)
13:34m1dnightwell, kinda logical, actually
13:53dudnikhey
13:54teslanickNek is now known as Guest82402... Guest82402 is now known as nikdudnik... nikdudnik is now known as dudnik
13:54teslanickWHO ARE YOU REALLY!?
14:00m1dnightSANTA
14:37dbaschis there an emacs mode for edn files?
14:37amalloygfredericks: #(fn (inc %) {:post [(even? %)]})
14:37jonasendbasch: clojure-mode?
14:38amalloynow, that code is illegal because i got the args to fn wrong :P
14:38amalloybut, okay, imagine the syntax is right - will % throw in that context?
14:38dbaschjonasen: I guess that works, thanks
14:38amalloyi think probably not, but it will refer to the wrong %: the function's argument, not its return value
14:39gfredericksamalloy: easy to find out
14:40gfredericks,#(fn (inc %) {:post [(even? %)]})
14:40clojurebot#<CompilerException java.lang.IllegalArgumentException: Parameter declaration inc should be a vector, compiling:(NO_SOURCE_PATH:0:0)>
14:40gfredericks,#(fn [a] "docstring" {:post [(even? %)]} a)
14:40clojurebot#<sandbox$eval51$fn__52 sandbox$eval51$fn__52@39f4d3>
14:40gfredericksI don't think I've ever used #(fn ...) before
14:41gfredericks(inc amalloy)
14:41lazybot⇒ 104
14:41gfredericksamalloy: wtg with the weird edge case, as always
14:41gtraktechnomancy: I tried to get syme going on a m3.medium, you mentioned it would give me the option if I picked a custom AMI, firstly the AMI didn't load, secondly, I didn't get the option. Here's why I think it's hard-coded: https://github.com/technomancy/syme/blob/master/src/syme/instance.clj#L97 . Guess I'm SOL until I decide to fork and deploy it myself? :-)
14:42amalloygfredericks: i'm sure i've used #(fn ...) somewhere. probably #(fn [x] (fn [y] ...)) even, in jiraph i think
14:44gfredericksamalloy: did it make you miss haskell?
14:45bbloommmm currying thunks
14:45amalloygfredericks: ah, https://github.com/ninjudd/jiraph/blob/develop/src/flatland/jiraph/wrapped_layer.clj#L9 is what i was thinking of
14:46gfredericksamalloy: did you use an IO monad?
14:47amalloygfredericks: i tried
14:48amalloyit went kinda okay
14:48technomancygtrak: well aw crap
14:49technomancygtrak: if you have a heroku account I can add you as a collaborator
14:49technomancyso you don't have to get your own copy going
14:49amalloythe main problem was that i only had a good implementation of >>, not >>=. but it was still kinda useful, because it meant we had a first-class model of IO actions to perform, which helped if like...the machine had crashed mid-transaction, allowing us to pretend-to-perform the actions that had already been done
14:49gtraktechnomancy: ah, yea I do, just not sure I can get to it today. Maybe I can take a look in a couple hours, though?
14:50technomancysure, just let me know your account
14:50gtrakgary dot trakhman at gmail dot com
14:51gfredericksclojurebot: gary is a cool guy
14:51clojurebotYou don't have to tell me twice.
14:51technomancygtrak: you got it
14:51gtrakcool!
14:52gfredericksamalloy: "had already been done" meaning "hadn't already been done"?
14:52jcromartiejustin_smith: yeah? looking for full-time?
14:53justin_smithyeah
14:53justin_smithcaribou got defunded
14:53justin_smithit's been a good run, parting ways in good spirits
14:54amalloygfredericks: no, i had it right. suppose you had some IO action that adds 1 to a person's age, then reads their age
14:54llasramjustin_smith: Will it be dismantled and sold as scrap abstractions?
14:54amalloywe need to *not* actually write any change to disk if that part of the transaction was already done; but your read needs to return the old result before you "attempt" to write, and then the new result after your wriet
14:55justin_smithllasram: buried in a secret spot in the desert
14:55llasramha!
14:55amalloywe were able to do that because we had a revisioned database, where the past is immutable. so we'd detect you'd already done that write, and look in the past for the first read, drop your write, then look in the present for a second read
14:55llasramjustin_smith: Not enough clients willing to go the Clojure route?
14:56dbaschjustin_smith: any interest in cryptocurrencies?
14:56justin_smithllasram: the company is getting bigger, more companies that have their own stack already / are in the position to dictate a specific tech stack
14:56justin_smith*more clients
14:56technomancyjustin_smith: were you doing OSS work full time up to now?
14:56justin_smithdbasch: I'll get back to you on that :)
14:57justin_smithtechnomancy: divided between OSS work on the framework and client work using that framework
14:57technomancycool
14:57justin_smithtechnomancy: company decided they were spending too much money on work that was not bringing in revenue (almost all the work has been OSS recently)
14:58technomancyyeah, it happens
14:58jcromartiePS we are hiring for work w/ some Clojure here. http://www.element84.com/jobs
14:58technomancyI got hired to do primarily leiningen originally.
14:58jcromartieyou need to be able to be in the DC area once in a while
14:58jcromartiebut we are more and more remote
14:58justin_smithjcromartie: thanks man - people can also hit me up via pm or in #clojure-social since this is a little OT for #clojure
14:59jcromartieyou are right
14:59jcromartieyes, anybody who wants to use Clojure at work should come to #clojure-social :)
15:06lemonodorelement #84 is a pretty nasty one!
15:06jcromartieyeah, it's a pun on the owner's name
15:07jcromartieI need an Enlive selector that selects only the topmost div,
15:07jcromartienot any child ones
15:08jcromartie[:div] selects the child divs as well as the topmost one
15:08jcromartie[[:div first-of-type]] does too
15:12m1dnight(sorry i'm asking another question guys) I have an atom to stop threads from looping. I tried setting that atom to see if my threads would stop and they do. When i return it from my function to reset it to false in an other scope it doesn't work anymore.
15:12m1dnightany clue as to why?
15:13m1dnighthttp://pastebin.com/LHQx4P55 this is the code..
15:13m1dnightI've shown the part where it stops working
15:13m1dnightagain something I don't get :p
15:14m1dnighthmm maybe I should declare the stop atom in my original scope
15:15m1dnightill try that first
15:15jcromartieyeah, those atoms are all out of scope of the fn returned by thread-factory-looping
15:15jcromartieyou could use thread-local bindings with dynamic vars for all of them
15:15gtraktechnomancy: quick glance at the diff? http://sprunge.us/dEXX
15:16jcromartiethis would actually be one of those places where it makes sense :)
15:16jcromartiewait, no they are passed as args
15:16jcromartienever mind
15:17technomancygtrak: lgtm
15:17m1dnightoh
15:17gtraksweet, I'll deploy it and try it out.
15:17technomancygtrak: are there restrictions about what AMIs can be used with what instance sizes?
15:17gtrakI have no idea.
15:17technomancymaybe I'm getting confused with having them tied to specific regions only
15:17technomancythat seems more sensible
15:17m1dnighthrm, strange it's the same behaviour when I pass my stopping atom TO the thread-factory-looping
15:18gtraktechnomancy: a couple-hours hackathon could really polish this up. I'll pitch it to my meetup.
15:19technomancygtrak: if you could open issues for things you run into it would be great too
15:19technomancyI've hardly touched it since my original coding frenzy
15:19gtrakvalidation, error-checking, logging would be my first concern.
15:20technomancythe errors you get launching an instance are pretty annoying
15:20gtrakfrom ec2 api, or from syme?
15:20technomancyfrom ec2
15:20technomancywell
15:20technomancyI mean, we pass the annoyance on to the user
15:21gtrakah, gotcha.
15:22gtrakhere goes nothin'
15:23gtraktechnomancy: 3.5GB of memory, success.. almost something that can run lein, now :P
15:27m1dnighthmm can't seem to fix it with those atoms
15:27m1dnightis it expected behavior?
15:27gtrakwhat's weird is how uncomfortable 15 cents makes me feel disproportionate to the utility.
15:27gtrakcompared to $5 for a coffee
15:33technomancygtrak: I thought about using digital ocean instead since it's so much cheaper
15:33technomancybut the fact that everyone already has an AWS account counts for a lot
15:33gtraknot me!
15:33gtrakhad to get one.
15:34technomancywhaaaaaat
15:34gtrakwe don't all work at heroku, man
15:34amalloytechnomancy lives in some weird AWS-centric world
15:34amalloyi certainly don't have an AWS account
15:34technomancybut you have an amazon account
15:34gtrakwell, yea
15:34gtrakbut oddly the credit cards don't sync up
15:35gtrakoh wow, DO is way better.
15:36gtrakwhat happened to pair.io anyway, did they fall off the map?
15:36gtrakI tried to use their form (I don't have an invite) and got a nasty stacktrace :-)
15:38m1dnightallright, got the error :) don't join threads before you stop them..
15:38yeoj___if i have a program printing to stdout, is that any slower than writting to a file? I'm trying to build a command line program i can use with named pipes and other unix programs.
15:39ToxicFrogyeoj___: it depends?
15:39ToxicFrogI mean, first of all, stdout might be connected to a file itself, or a named pipe, or another program's stdin, rather than a tty
15:40ToxicFrogIf it is connected to a tty, well, which is more expensive, writing to disk (what disk? What filesystem? What caching policy?) or redrawing the tty emulator's window?
15:41llasramI noticed at some point that writing to Java's stdout was *insaaaenly* slow
15:41llasramI didn't drill too far into it, but id definitely didn't seem to matter if I was using Clojure's `*out*` or hitting `System/out`
15:42llasramMaybe `PrintWriter`?
15:42PigDudehow does a function pass `h', bound {:as h} to another function?
15:42ToxicFrogAnd yeah, if we're involving java it also depends on what kind of horrifying clusterfuck of writers/buffers/etc is wrapped around stdout
15:42PigDudeis there a way to do this without apply?
15:42PigDudeso one function expects (f :a 1 :b 2), now i want to pass those params directly to g which expects the same
15:43PigDudealso, generally how to provide a hash to a function like this? **kwargs in python
15:43gtrak~google clojure apply-kw
15:43clojurebotFirst, out of 578 results is:
15:43clojurebotClojureDocs - clojure.core/apply
15:43clojurebothttp://clojuredocs.org/clojure_core/1.2.0/clojure.core/apply
15:43gtrakwell, here it is anyway: https://groups.google.com/forum/#!topic/clojure-dev/9ctJC-LXNps/discussion
15:44PigDudethis is a roundabout way of syaing it's not in the language?
15:44PigDude(yet)
15:44cbp~mapply
15:44clojurebotYou could (defn mapply [f & args] (apply f (apply concat (butlast args) (last args))))
15:44gtrakthere's a JIRA ticket, but it's been there for years
15:45gtrakabout 1.5 yearas
15:45PigDudei have some functions that accept a common config hash, this is also used as a dispatch in a multimethod
15:45cbpuse an explicit map. Trying it to do the python way is a PITA
15:45llasram(inc cbp)
15:45lazybot⇒ 5
15:45PigDudeso for the multimethod it has to be the first arg, but i think usually an arg like this is the last arg
15:46llasramPigDude: Nope -- optional argument map first arg now
15:46llasramThere's still some documentation suggesting to do it the "keyword argument" style way, but check out edn/read
15:46PigDudellasram: sorry?
15:46PigDudeah, i see
15:46PigDudeok, so i can do it 'right way' and be consistent w/ multimethod
15:47llasramI'm not quite sure what you're talking about wrt multimethods.... You can make the dispatch for a multimethod be based on anything about the arguments
15:48PigDudemy multimethods have different arities, i guess i could have it just pull the last item off, but like yous aid this is not the way to make such an API now
15:50PigDudethanks everyone :)
15:56RaynesNow refheap's paste inflation bug should be fixed.
15:57RaynesLet's all pretend refheap has 85k legitimate pastes and move on with our lives.
15:57bbloomRaynes: i can't move on. this is an important issue. you've been lying to us about pastes & therefore you're a bad man who must be flogged publicly
15:58bbloom....time passes...
15:58bbloomok, i'm over it
15:58bbloomcarry on
15:59cbpboy clojure sure is popular
15:59jimjamsQuick dumb question: How can you get the basis keys from a variable containing a record type?
16:00jimjamsI can get the keys if I have the actual type in my hand using the static Type/getBasis method
16:00jimjamsbut if I pass in the type to a macro, I'm totall lost.
16:00jimjams*totally
16:00amalloyjimjams: i think if you don't already know what those keys are, you probably don't want to be using a record?
16:00bbloom,(deftype Point [x y])
16:00clojurebotsandbox.Point
16:00bbloom,(.getBasis (-> (Point. 5 10) class))
16:00clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No matching field found: getBasis for class java.lang.Class>
16:01bbloomhmm that makes sense
16:01bbloom,(.getBasis (Point. 5 10))
16:01clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No matching field found: getBasis for class sandbox.Point>
16:01amalloybbloom: you have to use the reflector
16:01jimjamsamalloy: I want to write a macro that pulls the basis keys out automatically
16:01bbloomamalloy: yeah, i figured
16:01amalloyjimjams: why?
16:02jimjamsamalloy: I've got some conversion methods on our internal datatypes that operate on all of their fields in a uniform way.
16:03jimjamsamalloy: so far I've copied the vector of fields by hand, but having a general (and less prone to inconsistancies) way to access all of the fields names will make everything easier to work with
16:04bbloomplease forgive the following spam:
16:04bbloom,(import '[clojure.lang Reflector])
16:04clojurebotclojure.lang.Reflector
16:04bbloom,(defn static-invoke [class member & args] (if (zero? (count args)) (try (Reflector/getStaticField class member) (catch Exception e (Reflector/invokeStaticMethod class member clojure.lang.RT/EMPTY_ARRAY))) (Reflector/invokeStaticMethod class member (object-array args))))
16:04clojurebotbbloom: Excuse me?
16:04bbloom,(defn staticfn [class member] (fn [& args] (apply static-invoke class member args)))
16:04clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: static-invoke in this context, compiling:(NO_SOURCE_PATH:0:0)>
16:04bbloom,(deftype Point [x y])
16:04clojurebotsandbox.Point
16:04bbloom,(let [p (Point. 5 10)] ((staticfn (class p) "getBasis")))
16:04clojurebot#<IllegalStateException java.lang.IllegalStateException: Attempting to call unbound fn: #'sandbox/staticfn>
16:04bbloomaw, executed in the wrong order
16:05llasram,(try "exceptions?" (catch Exception _ "nope."))
16:05clojurebotllasram: It's greek to me.
16:06llasramYou're the best, clojurebot
16:06jimjamsbbloom: I see where you're going with that though! Thanks
16:07bbloomRaynes: there does not appear to be a button any more to save my paste...
16:07jimjamsIt's crazy that you've gotta jump through so many hoops to talk to static functions, but I guess that's the price you pay for such clean interop elsewhere.
16:07bbloomjimjams: https://gist.github.com/brandonbloom/1636c60c176f992cb60c
16:07amalloybbloom: that's how he's going to cut down on paste inflation
16:08amalloyjimjams: well, static functions are easy
16:08amalloystatic functions when you don't even know what class you want to call them on? that's not as easy
16:08amalloyyou have to do the same thing in java
16:08bbloomjimjams: it's not a price of clean interop, it's a price of interop that yields efficient & predictable bytecode
16:08jimjamsGood points.
16:08bbloomjimjams: java doesn't have a non-reflection based mechanism for dynamically dispatching static methods
16:10jimjamsI feel like it'd help a bunch to sit and digest how interop really happens between java and clojure at some point.
16:11jimjamsThanks for the pointers and gist though! <3 <3 <3
16:12bbloomjimjams: i recommend the src to tools.analyzer and tools.emitter.jvm for precisely how clojure translates to jvm intrinsics
16:14jimjamsThese look wicked. Bookmarked!
16:16bizniz98Using archiva with clojure project...so have ~/.lein/profiles.clj for archiva creds. How would this translate to Jenkins?
16:17technomancygtrak: pair.io used the v2 github API
16:17technomancybut it was also way more complicated
16:18technomancysince it had to do the oauth dance to get access to your repos
16:18gtrakah
16:18gtrakI already figured out the oauth bit in a test-project, it wasn't that bad.
16:18technomancygtrak: about 10x more code
16:19gtrakbut syme doesn't really need it. Not sure I'd want it to be more git-project-centric than it already is?
16:19technomancygtrak: right now it's OSS-only
16:19technomancywhich is sort of by design, sort of because I'm lazy
16:19gtrakah, it won't work on private repos? that kinda sucks.
16:19technomancyhaven't decided which yet =)
16:19technomancygtrak: you can use it for private repos; you just have to clone by hand
16:20gtrakah, right.
16:20technomancybecause I don't want to get in the business of storing anything sensitive
16:20gtrakyea, that's fine.
16:20technomancywhich given how much attention I've paid to the project has absolutely turned out to be the right choice =)
16:20gtrakjust bringing up the ec2 instance and some helpful hints on tmux was enough for me to feel it's useful :-)
16:21technomancyyeah, and setting up the pubkeys by magic
16:21gtrakand the .symerc bit, that's nice.
16:21gtrakyea
16:21technomancyit's useful for seajure
16:41PigDudeis there an idiom for applying a function to the first argument, as in a common multimethod dispatch function?
16:42PigDudenow i have a higher-order fyunction 'apply-first-arg' that returns a function doing this
16:43gtrakpartial?
16:43PigDudei don't see how partials are used for this
16:43gtrak,((partial + (inc 1)) 2)
16:43clojurebot4
16:43PigDuderight
16:43bbloomPigDude: do you want double type-based dispatch?
16:44PigDudebbloom: well i hvae a bunch of methods that dispatch based on the first arg
16:44bbloomPigDude: use defmulti unless you know for sure you want defprotocol
16:44PigDudebbloom: but they have different arities in different method implementations even, so a flexible dispatch function would accept any number of arguments and dispatch from the first one
16:44PigDudebbloom: yea,i'm using multimethods now
16:45bbloomPigDude: multimethods can trivially be made variadic
16:45PigDudehere's my code:
16:45bbloom(defmulti foo (fn [x & args] (:some-key x)))
16:47PigDudebbloom: http://www.bpaste.net/show/fJdS6ymXQMJurEyfgmUD/
16:47PigDudebbloom: does this look reasonable? i felt like maybe my higher-order function is reinventing some wheel, or there is a different idiom for common dispatch function to variadic MMs
16:48PigDudebbloom: maybe the idiom is #(f %1) ...
16:48PigDuderather %)
16:48bbloomPigDude: yeah, the idiom is to just create an inline anon fn
16:48PigDudeok thanks
16:49PigDudei forgot about # :)
16:49bbloomalso, this may be a case where you actually do want a protocol
16:50PigDudebbloom: it probably is one, but i was advised to start w/ a MM for now
16:50PigDudebbloom: (this is my first clojure project at a new position)
16:50PigDudebbloom: so i think it will probably become a protocol
16:50bbloomPigDude: the reason for that advice is b/c multimethods are more flexible and easier to work with
16:51bbloomPigDude: but that doesn't mean OOP ideas are 100% bad, so if you're doing something mutable like representing an interface to an external service, then it makes sense to do somewhat traditional OOP things
16:51bbloomlike defining an interface aka (sorta) a protocol
16:51PigDudemakes sense
17:05michaelr525hello
17:06gopatHello michaelr525
17:07gopatHehe.
17:07gopatDon't try this at home
17:07michaelr525what's so funny tonight?
17:07gopatjust evaulated (range) in a repl
17:07michaelr525on which laptop?
17:08gopatrMBP13"
17:08gopatjava kernel panic
17:08michaelr525oh
17:08gopatnever turbo boosted to 450% before :D
17:09michaelr525i'm looking to buy a good laptop for work..
17:10michaelr525everything i see on the market today is disappointing
17:10gopatnew macbook airs just out
17:10amalloygopat: (pmap inc (range)) or bust
17:10michaelr525i'm not familiar with macbooks
17:10michaelr525why would anyone buy a macbook?
17:11amalloymichaelr525: as a linux user, i bought a thinkpad somewhat recently. i'd recommend you instead get a macbook and install linux on it; the hardware is so much better
17:11michaelr525amalloy: are you serious?
17:11michaelr525amalloy: the new thinkpads are really disappointing, that's w2hat I'm talking about
17:12turbofaillinux on a macbook often has driver issues though
17:12cbpMaybe one of those new dell precision laptops?
17:12cbpthey look pretty good
17:12cbpno idea if you can run linux on them though
17:12dbaschturbofail: linux on a macbook? *barf*
17:12michaelr525cbp: i don't like that they don't have page up/down home/end buttons
17:12technomancyglossy screens =(
17:13technomancysuch a tragedy
17:13michaelr525yeah, that's a problem I live in a sunny country :)
17:13turbofailalso the battery life will typically be dramatically worse
17:13cbppft who uses the laptop's keyboard anyway :-P
17:14michaelr525technomancy: what laptop are you working one?
17:14michaelr525one
17:14michaelr525on
17:14michaelr525dammit
17:15stompyjbitemyerrors twitter profile pic is a clojure stacktrace? haha, he truly is on a mission
17:15yeoj___is there anyway for my leiningen/clojure program to tell if i'm running via script or not? I have error conditions that call System/exit and it's annoynig to have to restart my repl constantly.
17:15technomancymichaelr525: I'm currently on a thinkpad x200s; hoping to upgrade to a novena soon
17:16michaelr525novena.. let me gooogle that
17:17justin_smithif you have a macbook budget, consider a system76 computer with ubuntu preinstalled, I like mine
17:17technomancyhttp://www.crowdsupply.com/kosagi/novena-open-laptop
17:18justin_smithyeoj___: you could have a function that decides whether to exit or to print a stack trace, and delegate to that
17:18justin_smithyeoj___: it could just be a question of checking if the :development profile is active
17:18yeoj___justin_smith: ahh, ok thats what i was missing. thanks.
17:21justin_smithyeoj___: consider using System/setProperty and System/getProperty to check for which behavior should be used
17:21yeoj___justin_smith: ok thank you i'll look into it.
17:21michaelr525technomancy: weird stuff
17:21justin_smithor something more elaborate like environ
17:22technomancyweird is good
17:22technomancymost of the time
17:23nullptr`(note that technomancy also built his own keyboard)
17:23nullptr`<-- lazier than that
17:23justin_smithtechnomancy: so you don't use anything that relies on x86 support? I actually kind of like the idea of an ARM desktop
17:23technomancyjustin_smith: I play minecraft with my kids
17:23technomancybut I'm not getting rid of my thinkpad
17:24justin_smithahh, that makes sense
17:24justin_smithI'll assume there is a good JVM / JDK for ARM
17:25technomancyit's kinda crap actually
17:25justin_smithI was reading recently that there is a tradeoff where more power is required for CISC while RISC can't use cache as efficiently
17:25technomancybut the novena is still nearly a year away from shipping
17:25technomancyand the code to improve the JIT has been written, it just hasn't landed in openjdk yet
17:26justin_smithoh, that's too bad
17:26justin_smithmaybe by then openjdk for ARM will get better, heh
17:26technomancycurrently on arm racket smokes openjdk
17:28justin_smithwell that's cool, let's just switch to racket then
17:29michaelr525hmm
17:29FrozenlockHow about a clojure implementation on racket?
17:30technomancyhttps://github.com/greghendershott/rackjure <- pretty cool apart from the name
17:30Frozenlockimplement clojure on all the things!
17:30FrozenlockInteresting
17:30technomancyit's not clojure exactly so much as "all the things that someone who likes clojure is likely to miss when using racket"
17:31technomancywhich isn't as much as you'd expect
17:31FrozenlockI'd really like a Clojure where you don't have to know the underlying platform
17:31Frozenlocktechnomancy: you like Racket?
17:31technomancyFrozenlock: tons
17:31technomancywell
17:32technomancyI haven't used it tons, but I mostly like it, except for a few problems that rackjure fixes.
17:32FrozenlockI tried it a few years ago. Can't even remember what I thought of it :-/
17:32technomancythe literature and usability are both excellent, possibly unrivaled
17:33FrozenlockAre you able to do 'real' things?
17:33technomancysure
17:33FrozenlockI remember drRacket being kind of neat
17:33amalloyas a being of pure energy, technomancy can *only* do real things through a programming language
17:34justin_smithLOL
17:44justin_smiththat "pure energy" thing certainly explians his copious projects and oss contributions
17:44FrozenlockYeah, it rivals with my theory of "there's two of them.."
17:45zerokarmalefthow do you get a non-namespaced symbol for a var?
17:46zerokarmaleftor do I just need to resort to string-munging?
17:46amalloy&(doc name)?
17:46lazybot⇒ "([x]); Returns the name String of a string, symbol or keyword."
17:47justin_smith,(name #'clojure.core/+) zerokarmaleft:
17:47clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.Var cannot be cast to clojure.lang.Named>
17:47justin_smithrace condition!
17:47justin_smitherr
17:47justin_smith,(name 'clojure.core/+) zerokarmaleft:
17:47clojurebot"+"
17:47amalloywell, i wasn't gonna do it wrong, justin_smith :)
17:47amalloyso it's not quite a race
17:47cbpo snap
17:47justin_smithlol
17:47justin_smithI have an excuse, post employment drinking
17:47Frozenlock,(symbol (name 'clojure.core/+))
17:47clojurebot+
17:47cbp=(
17:48amalloy,(symbol (name (:name (meta #'+))))
17:48clojurebot+
17:48zerokarmaleftah, thanks
17:48nullptr`post employment as in "unemployed", or post employment as in "after work"? those involve different levels of drinking...
17:48justin_smithnullptr`: laid off
17:49nullptr`i guess that can be a good thing or a bad thing depending on the circumstances -- hopefully the former in yours!
17:50justin_smithnullptr`: I'll figure it out when I'm sober, probably next month
17:50justin_smith:)
18:02greghendershotttechnomancy: The name resulted from about 40 milliseconds of careful consideration. I'm open to suggestions. :)
18:03amalloygreghendershott: just call it lein-ironic-rackjure
18:05justin_smithgreghendershott: is the lack of [] because racket already has good associative immutable sequence support?
18:07technomancygreghendershott: well on the bright side it does what it says on the tin.
18:07technomancypeople in racket-lang probably aren't as tired of *jure pins as we are here
18:07greghendershottjustin_smith: The lack of any X is simply due to no one, so far, missing X enough to submit a pull request.
18:07amalloyi would gladly add a *jure pin to my pin collection
18:08greghendershotttechnomancy: Ah I see. Sorry. Didn't mean for it to be annoying.
18:08greghendershottMaybe I should rename it Clacket.
18:08technomancygreghendershott: heh, no it's more of an inside joke at this point
18:10technomancywhat is up with hash-tables not being functions in regular racket though
18:10technomancyit is just baffling
18:10technomancythese literally have more in common with mathematical functions than procedures do.
18:10technomancydomain -> range. boom.
18:17justin_smith(inc clacket)
18:17lazybot⇒ 1
18:17justin_smithgreghendershott: after looking a little deeper, it seems a hash in racket can be an associative vector? maybe that addresses my concern
18:19technomancyiirc racket vectors only support efficient lookup, not changes
18:20scape_racket has immutable and mutable vectors i think, possibly different implementations
18:21greghendershottjustin_smith: Maybe I'm understanding you backwards, but, there's a `dictionary` generic of which hashes, lists, and vectors are examples: http://docs.racket-lang.org/reference/dicts.html
18:28scape_how could I get the index of the results from something like: (filter even? (range 20))
18:28justin_smithgreghendershott: yeah, I'd have to get my hands dirty and see how it really compares, but looks cool
18:29amalloy&(doc keep-indexed)
18:29lazybot⇒ "([f coll]); Returns a lazy sequence of the non-nil results of (f index item). Note, this means false return values will be included. f must be free of side-effects."
18:29scape_or do I need to then iterate the list and compare?
18:29scape_ah ok let me read up thanks
18:32scape_great, thx amalloy
18:56akhudekI’m profiling a clojurescript app and I’m finding that 80% of the time is in garbage collection. Has anyone encountered this or have an idea what can cause it?
18:57coventryThe warning that the function passed to keep-indexed must be free of side-effects seems a little strange. Why warn there but not for map or every-pred?
18:58amalloycoventry: that warning appears in all sorts of weird and inconsistent places
18:59scape_working with a java array, I noticed using arraycopy is significantly faster than running aset over the array. why is this?
19:00TravisDDoes anyone know if there is a project to get a clojure language kernel for ipython?
19:01dbaschscape_: with aset, you’re looking up an entry in the array every time
19:02amalloyscape_: System/arraycopy is implemented in native code, inside the jvm
19:02dbaschscape_: arraycopy obviously keeps a pointer to the current position
19:02coventryTravisD: I know of someone who's working on one, but it appears it's not public yet.
19:02TravisDcoventry: Sounds cool. Encourage them to make it public :)
19:03coventryTravisD: Are you aware of kovasb's Session?
19:03amalloybut also you might be doing outrageously slow things, like using reflection to discover the type of the array
19:03scape_well i have an array that I want to reset basically, but not necessarily the entire array nor is it contiguous
19:03TravisDcoventry: looks like I've visited the github page
19:04scape_maybe i'll check for contiguous sections that I can use arraycopy on
19:13amalloyhuh. i just found this in my code: (-> {:x 1 :y 2} (assoc :z 3))
19:28akhudekamalloy: looks like a tutorial
19:32hyPiRionamalloy: must be a bad day or long ago
19:34pdkis clojure able to fold that at compile time
19:34dbaschamalloy: aset has to do a pointer lookup every time, it could never compete with a properly implemented memory copy of an array
19:34amalloyhyPiRion: you forgot the most common reason absurd-looking code gets written: the simplest possible transformation when something changes. like i think i had (-> {:x ... :y ...} (update-in [:x] assoc :z 3)), and then realized i needed z at the top level rather than under x
19:35amalloydbasch: well, i already said that
19:35amalloybut i also pointed out he could be making it a thousand times slower by doing other things wrong
19:37scape_amalloy: it's an object array of promises: this is the slower way I was resetting it-- (doseq [n rqi] (aset q n (promise))), which i where I narrowed down the slowdown
19:38amalloyright, and does clojure know it's an object array? or are you making it do reflection every time you call aset?
19:39scape_I don't know, which I assume means probably it's figuring it out each time
19:39scape_should I type hint this?
19:39scape_I do have reflection warn on, let me rerun this from the top
19:40scape_yes, reflection warnings
19:40amalloy(aset ^objects q n (promise))
19:41eflynnis it possible to fetch a dependency in the repl?
19:41scape_thanks, i'll give that a go
19:42scape_considerably faster, almost as fast as arraycopy now
19:42scape_thanks amalloy
19:42dbaschscape_: btw, isn’t that just aclone?
19:43amalloydbasch: errrrr, not at all like aclone?
19:43dbaschamalloy: I don’t understand what it has to do with arraycopy then
19:44amalloyhe doesn't really want to do arraycopy. he just wants to change array values and didn't understand how arraycopy could be so much faster than using aset
19:44dbaschamalloy: ah, ok
19:44scape_well I assumed why, the System part clued me in :)
19:51Si_anyone here ever play around with caribou? https://github.com/caribou/caribou
19:51coventryjustin_smith has used it extensively, probably wrote parts of it.
19:52justin_smithcoventry: I'm the #2 contributer
19:52justin_smithSi_: any specific question?
19:52dbaschamalloy, scape_ : no matter what you do, arraycopy would be orders of magnitude faster than using aset
19:54ivanhas anyone made AOT'ed Clojure code work on RoboVM? RoboVM appears very unhappy with clojure.lang.DynamicClassLoader.defineClass
19:54ivanany suggestions on stripping out Clojure's custom classloader?
19:55eflynnhow do you parse xml with clojure
19:55Si_justin_smith: not in particular, i'm new to clojure and looking for a web framework that would be comparable to flask. would you suggest caribou or something like luminus?
19:56scape_try http-kit and enlive or similar
19:57ivanRaynes: the submit button on refheap appears to be missing
19:58dbascheflynn: http://clojuredocs.org/clojure_core/clojure.xml/parse
20:03amalloyivan: he's trying to cut down on paste inflation by not allowing anyone to paste anything ever
20:04amalloyseriously though, obviously that's broken, but ctrl-enter works to submit while you wait for Raynes to figure it out
20:05ivanthanks
20:05justin_smithSi_: do you want maps of clojure data following a specific schema persisted in a db? if so caribou integrates this nicely and has a web based admin for the data, if not using http-kit / ring directly is likely easier
20:06justin_smithSi_: also caribou uses the db to define pages, which may or may not be useful to you (other approaches typically use code)
20:07justin_smithSi_: these features are present because we developed caribou for usage in a situation where the frontend developers did not use clojure, and we wanted them to be able to define new pages / data models as they needed
20:07ivanso I think my (ns ... :gen-class [namespace] is the only thing calling defineClass which is the thing I can't call on RoboVM, but I need this :gen-class to generate the class that I'm running
20:08ivanis there some way to get the class but not run genclass stuff at runtime?
20:08dbaschivan: also, if you’re using emacs you can submit directly with this https://github.com/Raynes/refheap.el
20:18Si_justin_smith: thanks, it looks pretty cool. good to know its being actively developed.
20:28amalloyso dbasch, i thought it would be interesting to benchmark System/arraycopy vs copying with aget/aset
20:29dbaschamalloy: how did it turn out?
20:29amalloyhttps://www.refheap.com/85060 suggests it's around twice as fast, certainly not "orders of magnitude"
20:29amalloythe jit is, after all, pretty good
20:39dbaschamalloy: indeed, that is surprisingly good
20:39amalloydbasch: another point of view is that doing it in the vm is surprisingly bad, of course
20:39amalloysince it can't just do a plain memory copy - there's a lot of extra work to do in java compared to c
20:40amalloymaking sure the garbage collector knows about all your moved objects, and so on
21:02TravisDI guess a factor of 2 is an order of magnitude, without any other information :P
21:02TravisD</pedantry>
21:04dbaschamalloy_: try it with bytes instead of objects
21:04dbaschTravisD: my guess would have been 10x at least, so I concede amalloy was right on that
21:05TravisDHehe, yeah, I was just pointing out the silly fact that it depends on how you're counting your orders
21:14dbaschTravisD: with an array of objects I get the same results as amalloy, but with a random byte array I get a 40x difference
21:14TravisDdbasch: I wasn't really following the conversation :) The problem is to clear an array of some length?
21:16dbaschno, it’s to copy arrays using either System/arracopy or aset in a loop
21:16TravisDah
21:16dbaschI had guessed that arraycopy would be orders of magnitude faster in general, it turns out that it’s only 2x as fast for objects
21:17dbaschI’m trying the special case of bytes and see a difference of 40x though
21:17amalloyi can believe it for bytes, i suppose. you're hinting as ^bytes, i presume?
21:17dbaschI assume that in that case it’s just a memcpy
21:17dbaschamalloy: of course
21:17TravisDThis slowdown comes entirely from running on the JVM?
21:18dbaschTravisD: I assume it’s the different optimizations the JIT can do with what it knows
21:18TravisDah, yeah
21:22amalloydbasch: a fair bit of spelunking through the jdk source tells me that for byte[] it is indeed just a memmove
21:25amalloyfor int[] it looks like a reimplementation of memmove to preseve java's stronger atomicity guarantees which might be violated if memmove were used instead
21:25dbaschamalloy: and for generic object without any further knowledge you’d have to dereference pointers
21:26amalloyi'm not sure i follow
21:26dbaschamalloy: you don’t know that they are all the same type, so you cannot compute the size for one and assume they are all the same
21:27dbaschalthough you’re copying pointers, never mind
21:27amalloyright
21:32Jaoodamalloy_: do you go down to java much for performance reasons?
21:57gfredericksthis tools.nrepl middleware-sorting code is impenetrable
21:57gfrederickshttps://github.com/clojure/tools.nrepl/blob/master/src/main/clojure/clojure/tools/nrepl/middleware.clj#L73-129
21:58gfredericksat the moment I'm in the middle of conj-sorted trying to figure out what on earth
22:02gfredericks(is this not what the rest of you do on a friday night??)
22:05technomancygfredericks: nope too busy debugging my keyboard
22:06gfredericksnerd.
22:15amalloyJaood: never
22:16amalloyi write java if the project is already written in java, or if i need to declare an interface or something so that java users can consume objects i build from clojure more easily
22:39gfredericksI think I literally have ghosts in my machine.
22:39gfredericksI have found a reproducible case where changing the whitespace in my code changes the result.
22:39hiredmannorton ghosts?
22:39TravisDmmh, I need to watch Ghost in the Shell.
22:41gfredericksmaybe it is haunted by cemerick
22:41gfredericksoh nevermind it stopped reproducing.
22:42gfredericksI suppose it could be a cider bug
22:45amalloygfredericks: probably a failure that's random, and your pattern-hungry human mind associated it with whitespace changes
22:46gfredericksI went back and forth three or four times
22:47gfredericksI've been seeing spook the whole time I've been debugging this damn code, that was just the height of it
23:13gfredericksturns out the thing is jvm-level nondeterministic
23:13gfrederickshttp://dev.clojure.org/jira/browse/NREPL-53
23:16amalloywhy is it right for foo to be last?
23:20gfrederickslast means being first in line to handle messages
23:20gfrederickswell actually
23:20gfredericksfoo just has to be after session
23:20gfredericksoh snap good point I should check that it does come before in the false cases
23:21gfredericksI had that behavior at the repl, I just neglected to output that much information
23:21gfredericks(in the code I actually posted)
23:21gfrederickswell actually
23:22gfrederickssince bar requires session
23:22gfredericksI think [bar session foo] is the only sensible ordering
23:22gfredericksbut pr-values might make its way in there too so I should still check
23:23amalloyi don't understand the difference between requires/expects. those words are practically synonyms
23:23gfredericksI know!
23:23gfredericksso confusing
23:24gfredericksrequires means "I expect this middleware/operation has already touched the message by the time I get to it"
23:24gfredericksexpects means the opposite
23:24gfredericks(I expect this will get handled in the future)
23:24gfrederickse.g., if you want to write a middleware to transform eval messages before they get evaled
23:24gfredericksyou would :expects #{"eval"}
23:25gfredericksthe more correct code is also nondeterministic
23:25gfredericksI'll update the ticket shortly
23:31gfredericksamalloy: updated ticket
23:31gfrederickswould be interested in somebody else corroborating the nondeterminism
23:32amalloygfredericks: is it possible that nrepl is just choosing an ordering at random because it can't satisfy all requirements? like, "eval" is required but not present
23:33gfredericksI don't think it's explicitly random
23:33gfredericksI didn't see any shuffling in the code
23:33gfredericksit might be implicit due to var hash orderings
23:34amalloyright
23:34gfredericksthe absence of eval is an interesting theory though
23:34amalloys/at random/arbitrarily
23:35gfrederickswithout eval it's all true
23:37gfredericksBUT
23:37gfredericksif I add back eval _and_ a middleware that handles eval
23:37gfredericksit's all false.
23:37amalloyclojurebot: it's |all| false
23:37clojurebotAck. Ack.
23:38gfredericksclojurebot: all is not |a| verb
23:38clojurebotAck. Ack.
23:40gfredericksokay I added that as a comment and now I must to bed
23:56TravisDWould it be possible to add metadata to some set of non-pure functions, and then to propagate that impurity metadata to all functions calling the non-pure ones, and so on?
23:58amalloyTravisD: is map pure?
23:58TravisDah, right, high order functions
23:58TravisDI guess it depends on its arguments :(