#clojure logs

2014-03-27

00:07sdegutisWhat I realized I'm not happy with is this ad-hoc "mock" service: https://github.com/sdegutis/Billow/blob/master/src/billow/service/fake.clj
00:31brehaut~seen dgrnbrg
00:31clojurebotPardon?
00:31brehaut&seem dgrnbrg
00:31lazybotjava.lang.RuntimeException: Unable to resolve symbol: seem in this context
00:31brehautbah. no idea what im doing
00:44amalloy$mail brehaut $seen dgrnbrg
00:44lazybotMessage saved.
00:44amalloy$seen dgrnbrg
00:44lazybotdgrnbrg was last seen quitting 5 weeks and 3 days ago.
00:45aaronj1335arrdem hey buddy
00:47arrdemaaronj1335: sup
00:47arrdemaaronj1335: just running one last round of tests before I call it
00:48aaronj1335cool. thnx again for all the help on this
00:48arrdemno problem. it's been a fun exercise in profiling Clojure apps..
00:48aaronj1335also... i think i may have been at a clojure meetup here in atx that u were at... do you go to any of those?
00:48arrdemI've gone to a couple... stopped going recently.
00:48aaronj1335yea i think those could b a lot better
00:49arrdemgoddamnit.
00:49aaronj1335at least based on the only one i went to
00:49arrdemyeah I would agree.
00:49arrdemso I managed to get five rounds of random-hmm down to 118s.
00:49arrdembest I can do.
00:50chareI've decided to use ruby on rails frontend and erlang backend until you guys mauke a clojure framework that works right out of the box
00:50aaronj1335is that w/o the doall here? https://github.com/aaronj1335/inclojure/blob/master/src/inclojure/core.clj#L11
00:50arrdemthat doall doesn't really impact random-hmm
00:51arrdempulling it gets file reading down to sub 1s :P
00:51aaronj1335that's cause it's not reading the files tho ...
00:51aaronj1335w/o that doall token-seq just returns an unrealized lazy-seq
00:51arrdemand that's a language feature
00:52aaronj1335but the point of it is to compare how fast clojure reads the files vs. python
00:52aaronj1335we could make the python really fast too by just instantiating a generator
00:52arrdempr sent for your entertainment
00:53arrdemhttps://www.refheap.com/66515
00:55arrdemaaronj1335: so I think what's happening here
00:55arrdemaaronj1335: is that I haven't cooked up a way to make the random-hmm lazy on the probs-for-tokens
00:56arrdemaaronj1335: the profiling I've done shows pretty conclusively to me that the issue is that random-props is always forced to evaluate. Computing the random numbers is dirt cheap, the issue is doing all the map insertions I think.
00:58aaronj1335yea the map insertions are necessary for the algo tho. and a map shouldn't b taking up 4 G of memory
00:58arrdemI'd have to go in with a more heavyweight profiler than timbre to really diagnose that
00:59aaronj1335yea
00:59aaronj1335i'll have a closer look at this PR tomorrow morn, signing off for now
01:02sdegutisWhen you use clojure-test-mode.el, do you often find yourself going into the src buffer and doing M-x cider-eval-buffer just to get the tests to see the new changes?
01:03arrdemI have it installed but don't use it :P
01:34felixfloresI'm trying to figure out what the `..` operator is but I get a 404 when I look for the documentation
01:34felixfloreshttp://clojuredocs.org/clojure_core/clojure.core/_dot_dot
01:34felixfloresgoogling .. is really hard
01:34felixfloresdoes anyone know what it does?
01:35felixflores(defn handle-change [e owner {:keys [text]}]
01:35felixflores (om/set-state! owner :text (.. e -target -value)))
01:35beamsohttp://clojure.org/java_interop#dot
01:35felixfloresTrying to figure out how this does it's thing
01:35beamsoi think (.. e -target -value) expands to e.getTarget().getValue()
01:36felixfloresah ok
01:36felixfloresmakes sense now
01:36felixfloresthanks :)
01:36felixflores(.. System (getProperties) (get "os.name"))
01:36felixfloresexpands to:
01:36felixflores(. (. System (getProperties)) (get "os.name"))
01:36felixfloresthis was also useful
01:36felixfloresawesome
01:37TravisDfelixflores: In the future, you could have used doc to learn about it
01:37TravisD,(doc ..)
01:37clojurebot"([x form] [x form & more]); form => fieldName-symbol or (instanceMethodName-symbol args*) Expands into a member access (.) of the first member on the first argument, followed by the next member on the result, etc. For instance: (.. System (getProperties) (get \"os.name\")) expands to: (. (. System (getProperties)) (get \"os.name\")) but is easier to write, read, and understand."
01:38felixfloresoh snap. Of course.
01:39turbofaili wish i could get docstrings for java junk
01:39turbofailinstead of having to wade through HTML
01:39turbofaili guess there is a way to do it but i haven't set it up
01:39beamsoi kinda like wading through java api html
01:40beamsobetter than wading through ruby api html
01:40felixfloresI just had a brain fart, and forgot I can do that in the repl, probably because I'm just reading a blog.
02:39jph-nice to see the crypto-password update
02:53sid_Hi, I've been working on a clojure project using luminus using selmer for UI design. Most of the functions that I've written reutrns an html page. Now, I've started with testing. Can anyone help me as to how can I test these functions(i.e those returning html pages with selmer tags)?
03:05sorenmacbethhey all
03:05sorenmacbethis there something less gross than this?
03:05sorenmacbeth(merge-with #(merge-with + %1 %2) {"a" {"b" 1}} {"a" {"b" 1}})
03:05sorenmacbeth{"a" {"b" 2}}
03:07arrdemI doubt it... that isn't too nasty IMO
03:08arrdemI mean you could write a custom recursive merge, but if all your data is only two levels deep why bother.
03:12sid_ Hi, I've been working on a clojure project using luminus using selmer for UI design. Most of the functions that I've written returns an html page. Now, I've started with testing. Can anyone help me as to how can I test these functions(i.e those returning html pages with selmer tags)?
03:16beamsosid_: refactor the functions to test the maps being passed to selmer rather than the html coming back from selmer?
03:21sid_beamso_ Hi, I'm pretty new to testing. I'll refactor the code accordingly. Thanks :)
03:22beamsonot a problem
03:46jph-are there any tricks for dealing with cyclic load dependency?
03:46jph-i have some functions from ns A that want functions from ns B and vice versa
03:47jph-is there a way to do that so an exception doesnt get thrown?
04:15whodidthismaybe better to refactor i'd imagine
04:23jph-whodidthis, thats what caused it in first place, moving a section of functions into a separate file
04:23jph-oh well
04:42whodidthisi dont think clojure reader thingie wants to bouncy bounce, symbols need to alredy be defined
04:57sm0keis it possible to proxy an interface with same name and arity defintion of a function with different type?
04:58sm0kei mean a function with different param types and same arity
07:10FrozenlockInteresting... react.js (om/quiescent/reagent) gives you tabs/tabsets for free.
07:13yotsovFrozenlock: that sounds interesting, can you elaborate a bit on why that is so? I am trying to learn quiescent now
07:14FrozenlockWell, your UI (html document) is basically generated from your atoms. There's nothing preventing you from re-using the same components again and again.
07:14FrozenlockGive me a sec, I'll try to upload an example
07:21Frozenlockyotsov: Here, my main react playground at http://hvac.io
07:21FrozenlockYou can remove a tabset by clicking the "x" in the upper right and add another one by clicking the "split screen" button at the bottom right.
07:22yotsovFrozenlock: thanks a lot! I think I see what you mean now
07:33Frozenlock"Note: :import is only for this use case, you never use it with ClojureScript libraries" o_O
07:33FrozenlockWhy?
07:33clojurebotFrozenlock: because you can't handle the truth!
07:34beamsois import only for java classes?
07:34FrozenlockAh sorry, that's for clojurescript
07:35FrozenlockI'm reading this http://swannodette.github.io/2013/11/07/clojurescript-101/
07:35beamsooh. for the google closure compiler too.
07:36FrozenlockDoes he mean that :import isn't usually required, or that we shouldn't use it?
07:38beamsoit looks like it's just to shorten the references to google closure constructors
07:38beamsoi.e. Jsonp. instead of goog.net/Jsonp.
07:39Frozenlockphew... I used :import quite a few times with goog closure stuff and was wondering if it was a mistake.
08:46whodidthishow do i check if a javascript environment has window to not try to evaluate js/window specific stuff in nashorn
08:53nbeloglazovwhodidthis: did you try (when js/window (do-window-specific-stuff)) ?
08:55whodidthissure, throws "window not defined"
08:56whodidthisi guess i could try catch that but hopefully theres something less rough to use
08:57whodidthisor keep om stuff and event handling stuff in separate projects so nashorn would use only the om part but thats somewhat rough too
09:11nbeloglazovWhat do you need nashorn for? Testing?
09:11whodidthisserver side rendering
09:12whodidthisalso meh, tried to set var window = false on nashorn but then nashorn cant eval react
09:13sdegutisWhen you use clojure-test-mode.el, do you often find yourself going into the src buffer and doing M-x cider-eval-buffer just to get the tests to see the new changes?
09:13sdegutisSeems like I'm missing something, but I checked the docs and don't see what I'm missing.
09:31sdegutisAh, there's lein-test-refresh, prism, and quickie, all for auto-re-running clojure.test suite when a file changes.
09:31sdegutisCan anyone recommend one?
09:43sdegutisMeh Prism works fine.
10:10sdegutisOkay, apparently you need to call (flush) before you call (read-line). Don't forget it.
10:40RickInAtlantaI want to experiment with websockets between clojure and clojurescript. It looks like aleph and http-kit are libraries I should look at. Any others, and any way to choose between them?
10:43luxbockthis is kind of a silly question but how do I check what version of nrepl I am running, and how can I upgrade it?
10:50jph-RickInAtlanta, i really liked this article when i was experimenting with websockets http://samrat.me/blog/2013/07/clojure-websockets-with-http-kit/
10:50RickInAtlantajph- awesome, thanks.
10:51jph-he has a second one after that as well
10:51jph-worth bookmarking
10:57jph-is there any good articles/libraries related to managing worker queues in clojure
10:57jph-i have a basic one, but i'd like to be able to look inside it, for instance to see how many jobs remain
10:57jph-i'm wondering if there's something that does that kind of thing already
10:57AnderkentGoddamnit, getting bug reports just after promoting a non-snapshot version makes me feel so bad... If only you made that report a week ago!
10:58jph-Anderkent, my plan is to never call a library production ready ;)
10:58jph-alpha forever
10:59hyPiRionAnderkent: bugfix release?
10:59hyPiRionit's just to add in a .1 at the end. I did that when I screwed up the deployment once :p
10:59jph-yeh i was about to announce 0.2.0 of something, realised i forgot to test something, quickly pushed 0.2.1
10:59jph-hehe
11:00Anderkentyeah, I mean it's totally irrational, the bug isnt even that big of a deal I think
11:00Anderkentit just offends my sensibilities to have published something that's not perfect, and it'll be there forever, bringing shame to everyone involved
11:00Anderkent:P
11:00winkhttp://en.wikipedia.org/wiki/Software_versioning#TeX ;)
11:01hyPiRionAnderkent: So you always write perfect bug-free code at first attempt? =)
11:01Anderkentjph-: a quick googling brings up simple-queue, but I'm not sure how it compares to your thing
11:01AnderkenthyPiRion: no, I never publish without being anxious and ashamed
11:01Anderkent:P
11:01hyPiRionhehe
11:02hyPiRionI think bug reports are nice, it means people at least use my libraries
11:02Anderkentsure, I love bug reports. I just hate publishing non-snapshot versions
11:02hyPiRionyeah
11:10AnderkentI wish 'no matching method found' would include the signature it was looing for in the error message... It's so useless right now
11:16shep-homeSo, tools.namespace.repl/refresh is pretty great
11:16jph-shep-home, yes
11:16shep-homebut can I add in an extra resource to the dependency tree?
11:17jph-shep-home, especially when you discover having a dev/user.clj profile for development
11:17fro_I'm trying to decide which version of "The Joy of Clojure" to buy. Second Edition is
11:17fro_EAP
11:17RickInAtlantafro_: get version 2
11:17RickInAtlantaer, second edition
11:17shep-homejph-: Yup, I'm starting to build up a global user.clj at the moment, Don't need per-project yet :-)
11:18fro_ok, thx
11:18shep-homeI have this file as a resource, and I load that into one of my namespaces
11:18jph-shep-home, i dont know how i lived without it, but you kinda need to see it in action for the penny to drop
11:18shep-homeand I'd like refresh to notice that and reload the namespace, even though that .clj file hasnt changed
11:19jph-when i refresh, my user.clj gets reloaded as well
11:19jph-so can't you put a trigger in there?
11:20shep-homejph-: not sure I follow. I have a resources/foo file, and then bar.clj loads that file as a def (more or less)
11:21shep-homeso, if I edit the resource, I'd like it to get reloaded in the bar ns
11:21jph-hrmm
11:21shep-homeI don't expect tools.namespace to figure that out
11:21jph-well
11:21jph-you can setup a filesystem watcher
11:21shep-homebut I would like to be able to go out of my way to tell it
11:21jph-that could do something when a change is detected
11:21shep-homehmm
11:21jph-with fs library
11:22jph-https://github.com/derekchiang/Clojure-Watch
11:24shep-homeWould you suggest basically touching the .clj file when the resource is updated?
11:26jph-not sure
11:26jph-im wondering how ring-devel does it's dynamic loading
11:26jph-if it has any filesystem watchers under the hood
11:29mpenet,(with-meta nil {})
11:29clojurebot#<NullPointerException java.lang.NullPointerException>
11:31trptcolinring-devel uses https://github.com/weavejester/ns-tracker
11:31mpenetkind of wanted this to work, but I understand the mess that implies...
11:32xeqiTimMc: the issue was nested params will create a vector from q[]=. then hiccup renders out the vector as a node
11:34xeqiTimMc: q= would escape properly when used, but since q= and q[]= both assign :q ....
11:36shep-hometrptcolin: Any idea if ring/ns-tracker has a way of manually adding to the dependency graph?
11:36shep-home(or if it can follow resources or other non-clj files)
11:37mpenetxeqi: I gave up on this, I just pass json in request bodies. It's hassle free at least
11:38Anderkenthow do I fix the criterium/lein warning? (tiered compilation). Do I have to build a jar?
11:38mpenetElasticSearch works like this too, it's not as ugly as it sounds
11:39trptcolinshep-home: adding source dirs is easy, but heavier stuff will require some grossness (re-def'ing, alter-var-root, etc)
11:41shep-hometrptcolin: so, the file in question isn't a clj file, so a source dir doesn't make sense (I think...)
11:42shep-homecan you shed some more light on the grossness you describe?
11:42TimMcxeqi: Oh! Lovely, yes. So people could basically specify a hiccup tree in the request?
11:46xeqiTimMc: basically yeah
11:48AeroNotixcan I put auth in the base project.clj file?
11:48AeroNotixit's for an internal work project.
11:48AeroNotixThere's no reason i
11:48AeroNotixit needs to use the ~/.lein/profiles.clj file
11:48trptcolinshep-home: you can always do things like alter-var-root or `(in-ns 'foo) (defn existing-fn [] new-implementation)`
11:48trptcolinbut that's typically a last resort
11:49mpenetAeroNotix: https://github.com/weavejester/environ
11:49AeroNotixmpenet: no
11:49AeroNotixmpenet: for LEIN
11:49AeroNotixnevermind, found it
11:50clgvyay auth data in a version control system yippie!
11:51AeroNotixclgv: it's an internal project for people who are too fucking lazy to create accounts on our archiva server. What do you want me to do?
11:51AeroNotixit's authentication for *building* the application, not anything else.
11:51AeroNotixTake it elsewhere, I know it's fucking dumb but I work with fucking dumn.
11:51AeroNotixso that's how it has to be
11:51clgvconfig file consisting of a simple clojure map ^^
11:51AeroNotixclgv: but still, it's outside of vcs. So people can't just clone and have it owrk
11:51AeroNotixwork
11:52clgvthey can copy it from a protected shared folder
11:52AeroNotixclgv: > lazy people
11:52AeroNotixhow can I make this clearer
11:52AeroNotixI'm introducing clojure at work -- anything which is a manual step makes them squirm
11:53clgvthey are developers as well?
11:53AeroNotixThey are
11:53AeroNotixclgv: please don't be so obtuse -- you know these kind of people exist.
11:54AnderkentAeroNotix: can you just disable auth on the server then? Same result :P
11:54clgvAeroNotix: do they have their maven credentials in the vcs as well? (I am guessing you use java)
11:54AeroNotixAnderkent: no, it's no the same result.
11:54AeroNotixclgv: we're Erlang otherwise
11:55AeroNotixAnderkent: definitely not the same result.
11:55Anderkenthm, how is it different?
11:55AeroNotixAnderkent: the repo is private
11:56Anderkenthm, so there's people who could access the build system but not the repository?
11:56AeroNotixAnderkent: they need to access project dependencies.
11:56AeroNotixproject dependencies are on our private archiva server, hence needing the auth
11:56AeroNotixthe project itself is on a private github repo
11:58Anderkenthm, I guess that's actually fair enough
11:58AeroNotixthanks
12:00jph-im rather confused about what "swagger" is meant for. Is it like liberator for publishing a rest api?
12:03Anderkentswagger's a spec for describing REST apis in a language-agnostic way, so that other things can for example automatically generate a wrapper for your api
12:03Anderkenti think
12:05cbpwhat a terrible name
12:15justin_smithclgv: I have a project in progress that puts a clojure map into an aes128 encrypted file, idea being that you would have an authentication file for developers of a given organization, that isn't in any repo, and the specific creds for a project can be encrypted and in the repo (ideally it would also be a private repo for good measure)
12:16justin_smithhttps://github.com/noisesmith/cryptlj
12:16clgvjustin_smith: AeroNotix could be interested ^^
12:16justin_smithahh, oops, yeah, AeroNotix you may find that lib useful
12:17AeroNotixThat readme is not entirely helpful
12:17AeroNotixWhat exactly do I have to do?
12:17justin_smithhttps://github.com/noisesmith/cryptlj/blob/master/test/cryptlj/disk_test.clj
12:17AeroNotixok so it encrypts files?
12:18AeroNotixHow does this tie into me wanting to use passwords in a project.clj
12:18justin_smithit has functions to encrypt / decrypt edn
12:18AeroNotixThe passwords are for *repositories*
12:18justin_smithso if you have native clojure data that shouldn't be plaintext in your repo, it simplifies keeping things secure without making deployment / running too convoluted
12:18AeroNotixnot for anything which is used at runtime
12:19AeroNotixbut this looks like it's for application code
12:19AeroNotixor use at runtime
12:19AeroNotixand stuff needs to be already on the person's box to decrypt
12:19justin_smithyou can call it from inside project.clj if you include it as a project plugin
12:19oinksoftthe page for -?> shows examples for -?>>: http://clojuredocs.org/clojure_contrib/clojure.contrib.core/-_q%3E
12:20justin_smithusing `unquoting
12:20AeroNotixI just needed a way to have archiva repos accessible the moment you clone a project
12:20oinksoftis -?> available in 1.3.0? how do i use it? i am not able to use clojure.contrib.core as shown in the examples for -?>>
12:20AeroNotixjustin_smith: it still needs the decrypt keys
12:20justin_smithyes, but those can be elsewhere
12:20Anderkentyou could in theory use that to encrypt the credentials in your project file then decrypt with password-encrypted key, so your dev only needs to know the project password. but feels unnecessary
12:20technomancyAeroNotix: have you tried putting the creds in the URL? https://user@pass:server.net/whatevs
12:21oinksoft(i understand how to use -?> and -?>>, but it's an undefined symbol)
12:21AeroNotixtechnomancy: what's the difference here?
12:21technomancyAeroNotix: it's just all in one place that way
12:21Anderkentoinksoft: 1.3 is pretty old. Also clojure.contrib is no more
12:21technomancyI am just curious if that would even work; I don't know
12:21AeroNotixtechnomancy: probably would
12:21justin_smithAnderkent: AeroNotix: use case: client wants to access source for the project you made for them, but you also need access to company (not client) specific keys
12:21justin_smith(in order to deploy for example)
12:22AeroNotixjustin_smith: so that doesn't help me here
12:22oinksoftAnderkent: ok, i was studying a book that contains a project.clj specifying 1.3.0
12:22justin_smithAeroNotix: OK
12:22cbpoinksoft: that macro is called some-> now
12:22oinksoftAnderkent: but the docs show -?> being available for 1.2.0 and i believe that if this can work, i should be able to get it to
12:23AeroNotixoh man, some->!
12:23AeroNotixNice
12:23justin_smithAeroNotix: in general it should be useful if not every user of the repo should have access to all credentials used in the repo, but if that isn't your situation then it probably wouldn't be useful for you
12:23oinksoftis there something like hoogle for clojure, because i can't find some->
12:24cbp(doc some->)
12:24clojurebot"([expr & forms]); When expr is not nil, threads it into the first form (via ->), and when that result is not nil, through the next etc"
12:24cbpoinksoft: http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/some-&gt;
12:24Anderkent,(meta #'some->)
12:24clojurebot{:macro true, :ns #<Namespace clojure.core>, :name some->, :arglists ([expr & forms]), :column 1, ...}
12:25cbpSadly no, docs are pretty terrible in clojure
12:25hiredmanoinksoft: -?> was never in clojure proper, they were in the contrib library
12:25Anderkenthm, doesn't print :added, but it's there! (1.5)
12:25oinksofthiredman: ok, keep in mind i am totally new to clojure so i see a page like the one i linked and think it is in clojure
12:25oinksofthiredman: (http://clojuredocs.org/clojure_contrib/clojure.contrib.core/-_q%3E)
12:25oinksoftcbp: thanks
12:26Anderkentyeah clojuredocs is kinda bad about this
12:26hiredmanoinksoft: contrib is sort of the tip off there
12:26hiredman(in the url)
12:26oinksoftok, so clojuredocs is not affiliated w/ clojure project
12:26oinksoftgood to know ;)
12:26Anderkenthiredman: only if you know about clojure.contrib being gone
12:26Anderkentoinksoft: yeah. but the search on clojure.org sucks. So there's that ;S
12:26oinksofthehe
12:26cbpughhhh
12:26hiredmanAnderkent: even when it wasn't "gone" it was a distinct library you had to use
12:27oinksoftok, thanks a bunch. i like these -> operators :)
12:27hiredmanAnderkent: the things in it weren't just available
12:27cbpSo what would be required to fix the online docs? ..without hurting anyone's sensibilities
12:27Anderkenthiredman: I know, but that's hardly obvious for someone who just searches for a symbol in clojuredocs
12:28Anderkentthough I guess clojuredocs covers many non-core libs?
12:28Anderkentdunno don't really use it
12:30oinksoftsorry, another documentation question. why do the clojure docs refer to 1.5 as the stable release, but the homepage refers to 1.6?
12:31cbpbecause like i said.. it's pretty terrible
12:31oinksoftok :)
12:31justin_smith"community-powered"
12:31technomancythe repl should be your ground truth
12:32technomancyusually you only fall back to the browser for things you can't find from your repl
12:32technomancy(this does not include docstrings)
12:32justin_smiththey still link to clojure-contrib
12:32TimMcWhen there is no spec, everything is within spec. :-)
12:33oinksofttechnomancy: but the repl's only going to show me what i already know about
12:33justin_smithoinksoft: clojure.repl/apropos helps there
12:33zenoliIs there a straightforward way to wrap a binary file into a Lamina channel? These conversions are giving me fits.
12:33oinksofttechnomancy: i am looking at the clojure source repository, is there a way to build some structured html docs, like with erlang and most langs?
12:33justin_smithoinksoft: also clojure.repl/source
12:33justin_smith(in the source code for functions you know, you will see calls to ones you don't)
12:33technomancyoinksoft: sure, but typically it doesn't make a lot of sense
12:34technomancyapropos, source, and doc are a lot more useful
12:34justin_smiththe cheat sheet is imperfect, but still helpful http://clojure.org/cheatsheet
12:34technomancyerlang needs html docs because its repl is terrible
12:34justin_smithexactly
12:34justin_smithyeah, the repl unlocks everything
12:35oinksofti suppose that is one way to solve a problem!
12:35oinksoftthanks again
12:35mpenetthe giant root namespace thing doesn't help either
12:35AeroNotixtechnomancy: s/needs html docs/a complete rewrite/g s/it's repl//
12:36oinksoftAeroNotix: are you kidding me, you were all up on erlang literally 12mos ago
12:36AeroNotixoinksoft: who are you
12:36oinksoftAeroNotix: PigDude
12:36AeroNotixyeah well
12:36AeroNotixI have a job in erlang now, and I realise that people are just lying to themselves.
12:36AeroNotixdaily.
12:36oinksofthahaha
12:36oinksoftthere's some truth to that
12:37technomancyAeroNotix: well if you're going to rewrite erlang things, the repl would be the place to start
12:37oinksoftAeroNotix: i'm learning clj for a job :p but i quite like it so far
12:37AeroNotixErlang solves very few problems it claims to, the tooling is totally dog shit, the language is completely hamstrung in arbitrary ways, Ericsson are the worse company to be in charge of a language. Shall I continue?
12:37AeroNotixDon't even get me started on projects like riak
12:38technomancyAeroNotix: at least OTP accepts pull requests =)
12:38oinksofttechnomancy: to be fair erlang shell will never lock you out because of its design. i've been able to lock up a clojure shell and have to kill it
12:38AeroNotixtechnomancy: sure, after they deem it could be valuable to Ericsson's internal projects
12:38AeroNotixif not, fuck you
12:38technomancyoinksoft: you can always connect from another client and kill off the misbehaving one
12:38AeroNotixthe language is just crap -- records? Maps? C'mon. It's 2014.
12:38technomancyassuming you're using nrepl
12:39oinksoftmy high level language is better than your high level language
12:39oinksoftor something
12:39technomancyAeroNotix: I got a patch to erlang.el applied pretty quickly; never would have happened with clojure.
12:39AeroNotixoinksoft: for reals
12:39oinksoftmostly the same but i see a few things i like in clojuree
12:39AeroNotixtechnomancy: that's the erlang.el stuff- there's like 2 people who are capable of properly looking after that code. So they just let anything in.
12:40AeroNotixoinksoft: I just did a project in Clojure amidst all our Erlang stuff. Literally. The. Best. Thing. Ever.
12:40AeroNotixno rebar, for 1
12:40oinksoftlein blows rebar out of the water i think
12:40AeroNotixdependency management that actually works. Good community, lively libraries, expressive language
12:40AeroNotixoinksoft: rebar is a cruel joke
12:40AeroNotixand people put up with it!
12:41AeroNotixIt's actually *worse* than when we just used Makefiles for everything
12:41AeroNotixseriously
12:41oinksoftAeroNotix: customer doesn't care what tool you use to build your code
12:41AeroNotixoinksoft: I don't see how that's relevant.
12:41AeroNotixIt's my sanity
12:41technomancyI wasted half an hour while interviewing a job applicant over a rebar bug
12:41technomancyit matters
12:41oinksofttechnomancy: how did that happen?
12:42AeroNotixtechnomancy: that's not the client, though.
12:42yotsovAeroNotix: I am curious if you would happen to have some "internal" opinion on Dialyzer
12:42technomancyoinksoft: we have three rebar.config files; one for prod, one for test, and one for dev
12:42AeroNotixProbably rebar half-downloading things and then telling you "OH YEAH DUDE THE DEPS ARE HERE"
12:42AeroNotixyotsov: not worth the time, misses trivial cases, slow, touted as the jesus device
12:42AeroNotixdoes not deliver
12:42yotsovAeroNotix: thanks!
12:42AeroNotixit's fine for tiny errors, but it's so slow you'd be better off just using unit testing
12:43yotsovI see... only ran it on very small projects
12:43oinksoftsome people are never satisfied :p dialyzer may not hit everything but it is a lot better than, say, pylint
12:43technomancyoinksoft: you have to manually specify which one you're going to use, but if you try to compile in the wrong order it'll just leave out your test-only deps entirely
12:43AeroNotixyotsov: we have a project with 30+ dependencies. It does not scale.
12:43oinksoftit has found plenty of bugs in my projects and saved me time, i like dialyzer
12:43AeroNotixoinksoft: then you're not testing properly.
12:43technomancyoinksoft: and then when you do ct_run, you don't get a stack trace to stdout, you have to go digging through like three levels of html files to find the actual problem
12:43oinksoftAeroNotix: OK!
12:43AeroNotixif you rely on dialyzer to find the kinds of bugs it *does* find, then I weep for your test suite
12:44oinksoftAeroNotix: i know i'm on irc, but you probably should think about how important "properly" is. not being aware of it, but making it the ultimate goal
12:44technomancydialyzer won't even run on our codebase; it sends it into an infinite loop
12:44oinksoftAeroNotix: as a recovering pedant it is a tough pill to swallow
12:44oinksoftAeroNotix: (me)
12:45AeroNotixoinksoft: pedantry is good for software
12:45AeroNotixtechnomancy: it is slow
12:45AeroNotixtechnomancy: perhaps it's just taking a while
12:45technomancyAeroNotix: over night =)
12:45AeroNotixtechnomancy: how big is your codebase?
12:45technomancyI'm a fan of static analysis though; supposedly the dializer bug is fixed in 17.0, so I'll be interested in seeing what it comes up with
12:46technomancyAeroNotix: 6kloc
12:46AeroNotixtechnomancy: the best part is, what you mostly end up doing is putting specs on things where dialyzer got confused.
12:46TravisDinfinity hours and 24 hours are pretty much the same
12:46AeroNotixSo you don't change your code -- you change your specs. Dialyzer is a waste of time.
12:46technomancyAeroNotix: it was confirmed as a bug by kostis
12:46AeroNotixtechnomancy: perhaps
12:47AeroNotixI'm just saying something else entirely, just drop dialyzer and use the time on making your test suites better / higher coverage
12:47AeroNotixThe only tool I think Erlang has which is better than in Clojure is the cover tool
12:47AeroNotixvery good, outputs in all manner of formats and you can *merge* reports together
12:47AeroNotixso different test suites can be put together
12:48technomancywell that and hot upgrades
12:48AeroNotixMeh
12:48AeroNotixno-one uses hotupgrades unless they're fapping
12:48technomancyuuuuh
12:48AeroNotixUse an LB and take nodes offline
12:48oinksoftAeroNotix: you might be wasting brain cycles comparing the merits of clojure and erlang and their tooling this way
12:48technomancyit matters a lot for our cluster
12:48AeroNotixtechnomancy: explain
12:48oinksoftAeroNotix: considering very few projects start with "do we choose clojure or erlang? hm?"
12:49AeroNotixoinksoft: but they easily could
12:49technomancyAeroNotix: a full cluster replacement takes like three hours, and a live upgrade takes three minutes
12:49oinksoftAeroNotix: they'd be wasting their time
12:49AeroNotixoinksoft: why?
12:49AeroNotixtechnomancy: what makes that so?
12:49oinksoftAeroNotix: it should be an obvious decision, one made by other forces, not pure technical merit as judged by one person
12:49oinksoftAeroNotix: it's a big bikeshed
12:49AeroNotixoinksoft: do you think software is like that?
12:49AeroNotixif so; can I come work for you?
12:49oinksoftAeroNotix: the biggest bikeshed, and the biggest secret in software development right now
12:50AeroNotixbecause that's definitely not software
12:50technomancyAeroNotix: nodes have to sync several GB of data at boot, so we have to space out their launches so they don't bring down the DB with a thundering herd.
12:50technomancy
12:50AeroNotixtechnomancy: load from caches? (Easy for me to say since I don't see your full architecture, but still)
12:51technomancynot really an option here, yeah
12:51oinksoftAeroNotix: you know up front if your project needs the high level features provided by clojure, or the safety provided by erlang. they're so freaking different, don't get caught up on the immutable thing
12:51oinksoftAeroNotix: if that doesn't decide for you, your talent and the talent in the local market does
12:51AeroNotixoinksoft: erlang "safety"
12:51AeroNotixSupervision trees. OK
12:51oinksoftAeroNotix: if not that, then your comfort supporting the JVM or doing erlang releases decides it for you
12:51oinksoftAeroNotix: erlang is slow because it's so safe ...
12:52AeroNotixI've rarely seen any technical decision made in such a way
12:52oinksofti bet you've seen a lot of money wasted!
12:52AeroNotixI'd love for it to be so
12:52oinksofti know i have
12:52yotsovI guess hotupgrade can be a nice feature... thinking of rabbitmq clusters for example
12:52AeroNotixFor req/resp type deals? Meh
12:54Anderkentuh, I doubt you can actually hot upgrade rabbitmq. Or at least I wouldn't try it
12:54Anderkent(and I worked for 3 years at the company that wrote it)
12:54oinksoftrelups are sort of a tarpit
12:54Anderkent(though I didn't work on it directly, so if you have just ignore me :P)
12:54yotsovAnderkent: last time we tried, 1 year ago or so, it didnt work
12:55yotsovAnderkent: but I believe it is a planned feature, maybe it is doable now
12:55Anderkentpossibly, I haven't kept in touch since we sold it to vmware
12:56AnderkentAeroNotix: regarding the coverage reports merging, I'd love to add this to cloverage, and it will eventually get there, but I don't have much time to work on it recently
12:56Anderkentugh, grammar
12:56AeroNotixAnderkent: for sure, it wasn't a dig at you
12:57AeroNotixWas just trying to emphasise how shitty the tools are in erlang that a lowly coverage tool seems to shine.
12:57AnderkentI really want to make cloverage run arbitrary lein tasks rather than clojure.test. And isolate the dependencies. etc. etc
12:58AeroNotixAnderkent: that'd be crazy good
12:58AeroNotixI want to start say `lein run` and then run my integration tests and then have it dump out a coverage report
12:58AeroNotixthis is what we do with Erlang at the moment
12:59AeroNotixwe start a release in coverage mode and then run some test suite against its API and then merge the report with the CT Test report.
12:59AeroNotixworks very well.
13:00technomancyhigher-order tasks; woot
13:01gfredericksI'm thinking test.check should not shrink characters
13:02gfredericksand that this might be a big deal for performance
13:03TimMc:-D
13:04TimMcgfredericks: It should shrink them by glyph area.
13:04TimMce.g. dotted i becomes dotless i
13:05gfrederickspatches welcome
13:05Anderkentygh github doesnt change your notification email when you change your primary email. Wat.
13:06AeroNotixAnderkent: eventual consistency
13:06AeroNotixit probably will. Eventually. Maybe.
13:07Anderkentnah, I did it like a year ago and wasn't getting notifications, and only now went to notification center and noticed htat my old email was still there
13:08AeroNotixlolz
13:08TimMcAnderkent: "ygh"?
13:08Anderkentits like ugh but misspoken!
13:09TimMcOh! I figured it was an abbreviation.
13:13AnderkentSo, if I only have the time to watch 2-3 more talks, which clojure/west are most interesting? Watched the instaparse, with-security and predictably fast so far, all pretty cool
13:14upwardindexWhat is the solution to “Possibly confusing dependencies found”? A ton of :exclusions ?
13:20Anderkentkinda depends on what kind of confusing dependency it is. Sometimes you can just ignore it
13:22upwardindexAnderkent: any rule of thumb on whether or not you can ignore it?
13:23Anderkentwell, if you use the dependency directly you definitely want to look into it, if there's version ranges involved you probably want to look into it, otherwise if things seem to work I wouldn't bother? I dunno I think that warning is kinda noisy
13:24upwardindexFor example midje 1.6.3 uses two different versions of joda-time, is that a problem?
13:25technomancyupwardindex: depends how divergent the versions are
13:42akais there a convention for putting a * (single earmuff) on the right side of a var name?
13:42akait's actually a function
13:42akacreate-handler*
13:42akashould that tell me something?
13:42michaniskin1aka: it's usually used when you're making a modified version of a function that already exsits
13:43michaniskin1aka: it's like x and x' in math
13:43akagood to know
13:43akathanks :)
13:44Anderkentmichaniskin1: aka: I usually see it when you have a macro and a function that implements the macro: (defmacro foobar [& body] (foobar* body))
13:47michaniskin1aka: for example: https://github.com/cemerick/pomegranate/blob/master/src/main/clojure/cemerick/pomegranate/aether.clj#L619 and https://github.com/cemerick/pomegranate/blob/master/src/main/clojure/cemerick/pomegranate/aether.clj#L723
13:47SegFaultAXYea. Usually the * version is some sort of base version, and the unstarred is a macro or helper function.
13:47akaahhh I see
13:48Anderkentyeah, think of the * as 'peeking under the hood'
13:48SegFaultAXOr https://github.com/korma/Korma/blob/master/src/korma/core.clj#L39 and https://github.com/korma/Korma/blob/master/src/korma/core.clj#L114
13:52technomancybasically means "I can't think of a better name for this function"
14:00jjl`that's one of the most common problems i have in clojure. it's inviting abstraction, but naming those abstractions can be hard
14:00akanot really
14:00SegFaultAXjjl`: thingy* other-thingy etc. are perfectly understandable.
14:00akayou just add a * at the end
14:00aka:D
14:01SegFaultAXAbstractThingyFactoryProviderBean
14:01gfredericksif you mix postfix ' and * you have an exponential naming space
14:02rasmustos/exponential/exceptional
14:02clgvSegFaultAX: MethodValueDecoratorListenerPublisherPrinter
14:02Anderkents/exceptional/ex'**''*'*
14:02akawe can be back to Java like madness in no time
14:03TravisDgfredericks: What do you mean by exponential naming space?
14:03TravisDexponential in the length of the names?
14:03gfredericksno, exponential options by length of name
14:03TravisDah, that's what I meant
14:04TravisDThe subset of names with a fixed length grows exponentially with the length
14:04martinklepschIs clutch the way to go for clj + couchdb?
14:04martinklepschhttps://github.com/clojure-clutch/clutch
14:04michaniskin1i like using the "prime" naming, personally
14:04gfredericks,(-> (rand-int 1000000) (Long/toString 2) (->> (replace {\0 \' \1 \*}) (apply str "thingy")) symbol)
14:04clojurebotthingy**''''''****'''''
14:05michaniskin1do-foo, do-foo', do-foo''
14:05malynI feel like this is a key problem in most (all?) programming languages; I want to create an abstraction and describe what it is, but I don't want to actually go so far as to give it a name.
14:05clgvmartinklepsch: if there is a clojurewerkz project for couchdb that's probably the better options in terms of documentation
14:05gfredericks,(defn function-name [] (-> (rand-int 1000000) (Long/toString 2) (->> (replace {\0 \' \1 \*}) (apply str "thingy")) symbol))
14:05clojurebot#'sandbox/function-name
14:05SegFaultAXgfredericks: No stupid, I told you the function was called thingy**''''''*''**''*
14:05gfredericks(function-name)
14:05malynThe -> thing is nice there, but then I can't describe what is happening without interspersing comments between each line. (which maybe is okay?)
14:05gfredericks,(function-name)
14:05clojurebotthingy**'**'**''''*'''**'
14:05martinklepschclgv, cant find any
14:05gfredericks,(function-name)
14:05clojurebotthingy**'*'''''''*'***'*''
14:05llasramdo-foo, do-foo', do-foo′, do-foo″, do-foo‴
14:05SegFaultAXllasram: Haha, nice.
14:05SegFaultAXIf only ` wasn't syntax quote
14:06michaniskin1llasram: that is actually pretty nice
14:06gfredericksmalyn: I think comments are fine
14:06clgvmartinklepsch: ah right they had one for mongodb not couchdb...
14:07malyngfredericks: Agreed. Although then I feel compelled to make each part of -> fit on a single line. And if it doesn't I then want to go and defn the thing, which creates the whole naming problem again...
14:07martinklepschclgv, nevermind then, thanks!
14:08gfredericks,(function-name)
14:08clojurebotthingy*''**''*'*''*''*''''
14:08gfredericksmalyn: ^solves your naming problem
14:08malyngfredericks: Yeah, thanks. :)
14:08gfredericksanytime
14:08gfredericksthere are at least a few more where that came from
14:09AnderkentI'm partial to using non-breaking whitespace as the suffix myself
14:09technomancyheh
14:09technomancyI actually filed a bug over that
14:09rasmusto,(let [foo' 'inc] (eval `(~foo' 1)))
14:09clojurebot2
14:09TravisDWhat's an example of a non-breaking white space?
14:09AnderkentI actually got bit by that because I copy-pasted stuff from github :P
14:10Anderkentand my editor wasn't showing the difference by default
14:10rasmustoi wish I knew what I was doing
14:10clgvrasmusto: incrementing 1, no`
14:10AnderkentTravisD: U+00A0
14:10gfredericksincrementers gonna increment
14:11TravisDAnderkent: Ah, I was hoping you'd just paste it :(
14:11rasmusto~inc
14:11clojurebotI don't understand.
14:11technomancyhttp://dev.clojure.org/jira/browse/CLJ-419
14:11TravisDHere it is: " "
14:12rasmusto(= , ~)?
14:13clgv,(long " ")
14:13clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number>
14:13clgv,(long (first " "))
14:13clojurebot32
14:13TravisD:P
14:13TravisDI LIED
14:13clgv:P
14:14Anderkent,(long (first " "))
14:15clojurebot160
14:15justin_smithAnderkent: I like how my emacs gives that a bright blue underline
14:15TravisD,(let [test 10, test 5] [test test])
14:15clojurebot[5 5]
14:16TravisDhmm
14:16justin_smith,' _-_ _-_ _-_ _-_ _-_ _-_ _-_ _-_ 
14:16clojurebot�_-_�_-_�_-_�_-_�_-_�_-_�_-_�_-_�
14:16clgvthat's hopefully not suprising to you ;)
14:16Anderkent,(let [foo 1 foo  2] [foo foo ])
14:16clojurebot[1 2]
14:16clgvah lol
14:16TravisDoh, I copied Anderkent's space character, but my IRC client must not like it
14:16Anderkentit's option-space if you're on a mac
14:16Anderkentmakes it easy!
14:17gfredericks non-breaking spaces for the busy coder
14:17TravisDAh, my client just does nothing when I type option-space :(
14:17TravisDif I'm ever at risk of losing a job I'll be sure to litter some of those in the code :)
14:17technomancythrow in some page break characters too
14:17technomancythose are great
14:18AnderkentI'd reverse the casualty there
14:18justin_smith&' _-'-_ _-'-_ _-'-_ _-'-_ _-'-_ _-'-_ _-'-_ _-'-_
14:18lazybot⇒  _-'-_ _-'-_ _-'-_ _-'-_ _-'-_ _-'-_ _-'-_ _-'-_
14:18sdegutisI've concluded that I actually want mocks right now. It's feeling very strange to test helper functions that should otherwise be private. I'd like to test the things they're used in, but they're only used to build up a call to another function with very specific args. Or perhaps I've just designed my whole program badly.
14:18TravisDAnderkent: heh, yeah, that's probably the more likely scenario
14:18technomancyI should open a bug report on github for the fact that they don't render page breaks
14:18technomancyit's pretty lame
14:19Anderkentsdegutis: you can test private functions though?
14:19sdegutisFor example, this function is tested weirdly: https://github.com/sdegutis/billow/blob/master/test/billow/service_test.clj#L13-L22
14:19justin_smith&'  _-'-_  _-'-_  _-'-_  _-'-_  _-'-_  _-'-_  _-'-_  _-'-_  _-'-_
14:19lazybot⇒  _-'-_
14:19justin_smithahh, it appears page break is whitespace
14:19sdegutisAnderkent: Yes but that's just covering the problem up. I shouldn't be touching that function. I should let it be free to evolve how it wishes.
14:19rasmustojustin_smith: is this L-systems again?
14:19justin_smithhah, it should be
14:19michaniskin1how do you guys deal with git conflicts and paredit mode?
14:19sdegutisI think I want to create a fake service that actually produces real side-effects that mimic the real service..
14:19michaniskin1^ in emacs btw
14:20rasmustomichaniskin1: evil-mode
14:20sdegutisWhich sounds terrifying, but like it's The Right Thing To Do™.
14:20justin_smithmichaniskin1: C-w always deletes
14:20rasmustomichaniskin1: yeah, x in evil-mode does something similar, use C-w
14:20Anderkentsdegutis: I don't think I follow, if you only care that it prepares the args to a different function right, why not just intercept the call to tht function and make sure the args are right?
14:21michaniskin1thanks, but i was wondering if there was something more structural, like somehow preserving the paredit stuff while resolving the conflicts
14:21Anderkentmidje makes it easy with (provided (function "excpected" "args) => :result), though I'm not sure about side effects, these are a bit messier to add
14:21sdegutisAnderkent: That's still testing private implementation details which doesn't give the implementation any room to evolve.
14:21justin_smithmichaniskin1: like some kind of magit / ediff / paredit hybrid?
14:22lemonodori’ve decided that the midje syntax tricks around => cause more trouble than they’re worth.
14:22sdegutisWe had a /lot/ of trouble with this in production code last year, took a while to change it so we only test side-effects.
14:22michaniskin1justin_smith: is that a thing?
14:22sdegutislemonodor: how so?
14:22justin_smithmichaniskin1: no, just thinking that this is what you are asking for
14:22technomancylemonodor: agreed
14:22justin_smiththough ediff-merge may give you an interactive resolution rather than leaving conflict marks in the file iirc
14:23justin_smithor magit-merge I mean, or something like that
14:23Anderkentwell yeah I kinda dislike fact and =>, but like the mocking mechanism. Is there something else that makes top-down testing easy?
14:23lemonodorsdegutis: harder to read, can screw up editor indentation. maybe responsible for the somewhat non-specific line numbers i see in stack traces?
14:23justin_smithmichaniskin1: https://coderwall.com/p/mcrwag
14:24sdegutislemonodor: ah makes sense
14:24lemonodorhttps://github.com/marick/Midje/issues/235 btw
14:24technomancylemonodor: many of us feel that way about most of midje fwiw =)
14:25justin_smith(inc technomancy)
14:25lazybot⇒ 102
14:25AnderkentI also dislike how you can't reuse facts
14:25sdegutisAh good old backwards-incompatibility, the bane of those who've coded while drunk.
14:25technomancy"This is clever and novel." <- not intended as a compliment
14:25justin_smithAnderkent: reminds me of that one Talking Heads song "facts never do what they're supposed to do"
14:26sdegutisCleverness and novelty have bit me so often and so hard that I refuse to hear them out anymore.
14:26sdegutisSometimes they manage to successfully sneak in, but that's another story.
14:28sdegutisTime to write some SFTP based code.
14:28michaniskin1justin_smith: awesome i think that's maybe what i'm looking for
14:28lemonodori seem to remember a remarkable amount of code in midje dedicated to making that clever parsing possible, too, which isn’t a good sign.
14:30Anderkentyeah I once tried to read through that code, but gave up very quickly
14:32jjttjjanyone ever play with opencv from clojure? I'm dieing trying to get this to work https://gist.github.com/nblumoe/5468625
14:33lemonodorjjttjj: i haven’t but there’s https://github.com/gigasquid/clj-drone#opencv-face-recognition
14:33jjttjjI have all the opencv stuff setup correctly and can make calls to it's libs but .detectMultiScale is just no returning anything
14:34jjttjjlemonodor: awesome thanks
14:34aaelonyjjttjj: This works pretty well: http://docs.opencv.org/2.4/doc/tutorials/introduction/clojure_dev_intro/clojure_dev_intro.html
14:34jared314does anyone know if test.check going to support clj pre-1.4 (1.2.1 or 1.3)?
14:35jjttjjaaelony: yeah i have that one working it's when i try to translate the face recognition tut from java wheen i run into problems
14:36clgvjared314: if you are on 1.3 where is the problem to use 1.4 or even 1.5? I thought only the 1.3 upgrade was often hard work
14:36aaelonyjjttjj: makes sense, be interested to learn what you discover.
14:37jared314clgv: writing tests for another project that is trying to support 1.2.1 to 1.6
14:37jared314clgv: so, not my choice to upgrade
14:38gfredericksjared314: do you know what exactly is incompatible with the older versions?
14:48amalloyjared314: after a quick scan, i don't see anything in the source that requires any clojure version newer than 1.2
14:48jared314gfredericks: it gave me an error about ex-info in the generative ns
14:49gfredericksah that'll do it
14:50gfredericksdoes somebody have a lib somewhere for monkey-patching ex-info stuff onto older clojures?
14:50gfredericksis that a terrible idea?
14:52llasramIs that a terrible idea??
14:52lazybotllasram: Uh, no. Why would you even ask?
14:52llasramgfredericks: See, it's fine. Just needed more question marks.
14:52technomancygfredericks: slingshot kind of gets you ex-info ish stuff in 1.2
14:53gfrederickstechnomancy: they don't put it in clojure.core though amirite?
14:54technomancyheavens no
14:54gfredericksso this doesn't help with tricking a lib into running on older clojure
14:54amalloygfredericks: it strikes me as a poorish idea: nothing bad will happen from adding those two extra functions, assuming you can do it, but trying to run code that expects clojure 1.4(?) on 1.2 instead will have more problems than just missing ex-info, and they might be hidden if you fix the obvious failures
14:55jared314amalloy: is there already something to handle running a test suite in one version and the lib in another?
14:56jared314amalloy: like lien does the inject thing
14:56amalloysure, you can change your org.clojure/clojure dependency in the :test profile, but...
14:56gfredericks"poorish is a clojure library for monkey-patching ex-info &c onto older clojures."
14:57amalloygfredericks: my consulting rate is $10 per excellent library name
14:58amalloypoorish is actually a fun little double-entendre there: you're trying to run on an impoverished runtime
14:59gfredericksheck you could add all sorts of addable features
14:59gfredericksand let the user pick which ones to patch
14:59justin_smitha-la-carte upgrade
14:59rasmusto~a-la-carte
14:59clojurebotexcusez-moi
15:00gfredericksrejected names: what-could-go-wrong
15:00jared314i-didn’t-say-it-was-a-good-idea
15:00amalloygfredericks: i'd like to see you support parsing symbols like foo' but only in files chosen by project.clj
15:02gfredericksI bumped the clojur on codeq yesterday so it would parse :/
15:02justin_smith,:/
15:02clojurebot:/
15:02justin_smith&:/
15:02lazybotjava.lang.RuntimeException: Invalid token: :/
15:02gfredericksamalloy: a double patch -- one on a clojure function for doing reading or something, and another selectively done in the first to change the regexes
15:02rasmusto,::/
15:02clojurebot#<RuntimeException java.lang.RuntimeException: Invalid token: ::/>
15:03gfredericks,'&:/
15:03clojurebot#<RuntimeException java.lang.RuntimeException: Invalid token: &:/>
15:03justin_smithgrumpy man refuses to wear a bow, but will wear a feather
15:03amalloy,*clojure-version*
15:03clojurebot{:interim true, :major 1, :minor 6, :incremental 0, :qualifier "master"}
15:03rasmusto,(prn ::/)
15:04clojurebot#<RuntimeException java.lang.RuntimeException: Invalid token: ::/>
15:04amalloyi wonder why :/ is valid now. i know they changed symbol parsing, but i didn't expect it to apply to keywords
15:04gfredericksdoesn't the keyword parser delegate to the symbol parser?
15:04gfredericksalthough that still doesn't explain it
15:04gfredericksif that were the case you'd expect :/ to have always been valid
15:05gfredericksI retract all my theories and retreat in shame
15:05rasmustoand whats up with the namespace-qualified one not working?
15:05rasmusto,:foo// ; ?
15:05clojurebot:foo//
15:05rasmusto,::/ ; ?
15:05clojurebot#<RuntimeException java.lang.RuntimeException: Invalid token: ::/>
15:06justin_smith,:sandbox//
15:06clojurebot:sandbox//
15:06justin_smithAHA
15:06justin_smithor not
15:06rasmusto*ns*
15:06rasmusto,*ns*
15:06clojurebot#<Namespace sandbox>
15:07gfredericksthey never sent an email on clojure-dev about 1.6.0 did they?
15:10cbpIs it safe to assume the user will always see the info map of an ex-info? or should I include the data in the exception string too?
15:10gfredericksdefinitely not safe to assume that
15:10gfrederickslots of tools just print .getMessage
15:10llasramcbp: I personally use the string for humans and the map for programs. Sometimes that means duplicating between them
15:11cbphmph
15:11cbpok thanks
15:11gfrederickswould be cool to use strint to be able to interpolate values from the map into the message
15:11gfrederickse.g. (ex-info*'''* "You passed me {thing}" {:thing x})
15:12amalloygfredericks: that'll be in clojure 1.9. why not include it in your backporting library?
15:12gfredericksincubating is just a generalization of backportation
15:12gfredericksor a special case of?
15:14tgoossensWhat is a clean way to get all values out of an indexable list at odd indices ?
15:15justin_smith,(map second (partition 2 (range 10))) ; tgoossens
15:15clojurebot(1 3 5 7 9)
15:15tgoossensjustin_smith, thanks
15:16justin_smithwith partition-all you would get a nil at the end if there were an odd number of items in the list
15:16tgoossenshmm
15:17justin_smithso it depends on your problem whether you want that behavior or the partition behavior
15:17tgoossensit will do :)
15:17tgoossens(your solution )
15:17justin_smith,(map second (partition-all 2 (range 9)))
15:17clojurebot(1 3 5 7 nil)
15:17justin_smith,(map second (partition 2 (range 9)))
15:17clojurebot(1 3 5 7)
15:18tgoossensi see
15:18tgoossensthanks for pointing that out :)
15:18justin_smithnp
15:18tgoossenswow it has been a long time I've been able to use such pleasant abstract functions
15:18tgoossenscurrently working with fortran :p
15:19tgoossensclojure is always a pleasure again
15:19amalloyjustin_smith: uh, don't you just want (range 1 10 2)?
15:20amalloy,(range 1 10 2)
15:20amalloy&(range 1 2 10)
15:20lazybot⇒ (1)
15:20amalloy&(range 1 10 2)
15:20lazybot⇒ (1 3 5 7 9)
15:20amalloyclojurebot: have i wronged you?
15:20clojurebot(1 3 5 7 9)
15:20clojurebotTitim gan éirí ort.
15:21Averelli would say i liked the partition performance more :)
15:23gfredericks,*clojure-version*
15:23clojurebot{:interim true, :major 1, :minor 6, :incremental 0, :qualifier "master"}
15:23justin_smithamalloy: he wanted to get odd items of an arbitrary list
15:23justin_smithrange was just the example
15:24justin_smith(though I would not be surprised to see a more elegant way to get the odd items of a list either)
15:24nopromptthe new version of clojurescript.test displays the "Ran N tests containing M assertions..." message twice, does anyone else notice that?
15:28justin_smith,:𝔤𝔯𝔞𝔳𝔦𝔱𝔞𝔰
15:28clojurebot:????????????????
15:28justin_smith&:𝔤𝔯𝔞𝔳𝔦𝔱𝔞𝔰
15:28lazybot⇒ :𝔤𝔯𝔞𝔳𝔦𝔱𝔞𝔰
15:29justin_smith(inc lazybot)
15:29lazybot⇒ 23
15:29clojurebotexcusez-moi
15:31Anderkent,:to the moon!
15:31clojurebot:to�the�moon!
15:31gfredericks,(defn odds [l] (lazy-seq (when-let [[x & xs] (seq (next l))] (cons x (odds xs)))))
15:31clojurebot#'sandbox/odds
15:32Anderkentoh I'm so using multi word keywords
15:32gfredericks,(odds [:a :b :c :d :e :f :g :h])
15:32clojurebot(:b :d :f :h)
15:33nzHi, what is the correct way to call a method inside an inner java class? In java it is like this: ModelControllerClient client = ModelControllerClient.Factory.create(123)
15:34Anderkentnz: ModelControllerClient$Factory/create, I'd expect
15:34Anderkent,Thread$UncaughtExceptionHandler
15:34clojurebotjava.lang.Thread$UncaughtExceptionHandler
15:38jared314is there a good lib for creating test fakes for an entire namespace? fake functions etc.
15:40nzAnderkent: thanks, it works, but you need to import inner class: (import 'org.jboss.as.controller.client.ModelControllerClient$Factory), seems that importing the main class is not enough
15:41Anderkentjared314: kinda sounds like midjes provided?
15:41gfredericksnz: yeah afaik inner classes aren't even a concept on the jvm; just classes with dollar signs in the name
15:42jared314Anderkent: google-ing…
15:42gfredericks,(defrecord Some$Class [])
15:42clojurebotsandbox.Some$Class
15:43gfredericks,(fn % [])
15:43clojurebot#<sandbox$eval62$_PERCENT___63 sandbox$eval62$_PERCENT___63@1a87c8>
15:43justin_smithgfredericks: https://www.refheap.com/66757 yeah that's a little faster
15:44Anderkent,sandbox.Some$Class
15:44clojurebotsandbox.Some$Class
15:44Anderkenthm. I guess inner classes are just syntax sugar in java
15:45jared314Anderkent: they are a compiler trick, like generics
15:50seangrove$seen petehunt
15:50lazybotpetehunt was last seen quitting 30 minutes and 32 seconds ago.
15:51jared314$seen jared314
15:51lazybotjared314 was last seen talking on #clojure 29 milliseconds ago.
15:58Anderkentooooh wait 1.6 fixes the hashing issue for collections of numbers?
15:58turbofailyarp
16:00Anderkent,*clojure-version*
16:00clojurebot{:interim true, :major 1, :minor 6, :incremental 0, :qualifier "master"}
16:00Anderkent&*clojure-version*
16:00lazybot⇒ {:major 1, :minor 4, :incremental 0, :qualifier nil}
16:02Anderkent&(= (hash #{[:N [2 0]] [:R [4 2]] [:K [0 0]] [:Q [1 3]] [:B [3 0]]}) (hash #{[:N [3 0]] [:K [0 0]] [:R [1 2]] [:Q [4 3]] [:B [2 0]]}))
16:02lazybot⇒ true
16:02Anderkent,(= (hash #{[:N [2 0]] [:R [4 2]] [:K [0 0]] [:Q [1 3]] [:B [3 0]]}) (hash #{[:N [3 0]] [:K [0 0]] [:R [1 2]] [:Q [4 3]] [:B [2 0]]}))
16:02clojurebottrue
16:03Anderkenthuh
16:03Anderkentcomes up false in a 1.6 repl for me
16:03hiredmanclojurebot was on an old snapshot of 1.6
16:03hiredmanthat is what the :interim true means
16:03Anderkentah.
16:04hiredman,*clojure-version*
16:04clojurebot{:major 1, :minor 6, :incremental 0, :qualifier nil}
16:04hiredmanon the release now
16:04Anderkent,(= (hash #{[:N [2 0]] [:R [4 2]] [:K [0 0]] [:Q [1 3]] [:B [3 0]]}) (hash #{[:N [3 0]] [:K [0 0]] [:R [1 2]] [:Q [4 3]] [:B [2 0]]}))
16:04clojurebotfalse
16:04Anderkentgood!
16:17s0xhey guys, i've got a function in a map like {:fn #(42)} is there a way to call that function in a chained way without additional brackets? e.g. something like (-> themap :fn callit println)
16:17s0xobviously the real method will do more than just returning a simple number :p
16:18s0xum sry ... function ^^
16:18gfredericksthere's one or two terrible ways to do it
16:18amalloy(inc gfredericks)
16:18lazybot⇒ 46
16:18gfredericksI bet amalloy knows all of them
16:18amalloys0x: avoidnig parens is not really a very important goal
16:19gfredericks,(let [the-map {:fn #(+)}] (-> the-map :fn deliver))
16:19clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: core/deliver>
16:19amalloythe language is chock full of em
16:19gfredericks,(let [the-map {:fn #(inc %)}] (-> the-map :fn (deliver 5)))
16:19clojurebot6
16:19llasramI've found it useful on some occasions to have `funcall` available
16:19asthasrLet's say I have a massive, sorted file I'm reading in via line-seq. I want to take-while on this line-seq, based on the first 'chunk' (key) of each line, producing a vector of lines to be passed into the function... and I want to iterate over this, so that I basically end up with [[["abc" 1 2] ["abc" 3 4]] [["def" 5 6] ["def" 7 8]]]... lazily
16:20asthasrwhat's the best way to do it?
16:20rasmustoasthasr: partition-by
16:20asthasris partition-by going to be lazy, though?
16:20rasmustoyeah
16:20llasramIt will fully realize each partition, but not the entire result
16:20rasmustoer, that
16:21asthasrahh, so if there is a little chunk of unsorted lines later in the file, it'll be a separate partition
16:21hiredman,(-> {:fn #(identity 42)} :fn (reduce nil))
16:21llasramYes
16:21clojurebot42
16:21s0xllasram: indeed ... we just wrote some method like that by ourself ... just wanna check if there is a nativ way of doing that
16:22s0x,(-> {:fn #(identitiy 42)} :fn (apply nil)
16:22clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
16:22s0x,(-> {:fn #(identitiy 42)} :fn (apply nil))
16:22clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: identitiy in this context, compiling:(NO_SOURCE_PATH:0:0)>
16:22s0x,(-> {:fn #(identity 42)} :fn (apply nil))
16:22clojurebot42
16:22rasmusto~thrush
16:22clojurebotPardon?
16:23s0xhere we go ... that works either .. like gfredericks said ... terrible ways :D
16:23hiredman,(-> {:fn #(identity 42)} :fn (.invoke))
16:23clojurebot42
16:24s0xhiredman: well i guess the nicest way so far
16:24gfredericksalso terrible
16:24s0xsure :p
16:25amalloys0x: just don't put everything in a giant -> form. the nonsense with calling a function is hurting readability more than threading is helping
16:26bars0Hi all. How to upgrade clojure used by leiningen. I am on Windows 7 32 bits?
16:26asthasrThanks rasmusto, llasram :)
16:26gfrederickshey that'd be a fun refactoring tool; somehow convert everything to threading macros
16:27amalloybars0: just change the clojure dependency in your project.clj. you don't need lein itself to change its clojure version
16:27hiredmangfredericks: there was an emacs clojure thing that would do the transform both ways
16:27amalloygfredericks: i believe that was like the main thing that clj-refactor did
16:27bars0amalloy: ok, thanks
16:27amalloyor whatever it was called. the emacs clojure thing
16:28gfredericksthe lib that says "send help" in the readme
16:28gfredericksbut I mean doing it to an extreme
16:29gfredericksmuch like that time I did a point-free factorial
16:29s0xamalloy: actually in our case it would have increased the readability, belief it or not.
16:29s0xthanks to everyone by providing suggestions
16:30s0xour own method "call" is still the best way to go :)
16:30s0xor at least the most readable
16:31gfrederickscall it $
16:33gfredericks,(defn $ [f & args] (apply f args))
16:33clojurebot#'sandbox/$
16:33rasmusto,($ + 1 2 3)
16:33clojurebot6
16:37gfredericksso if test.check wanted to be parameterizable during calls to `lein test`
16:37gfrederickse.g., for setting seeds or scaling the number of test runs
16:37gfrederickswhat would be the least terrible mechanism for that?
16:37gfredericks+5 points if it works with lein profiles
16:38s0xwhy calling it $ ?
16:38s0xis there a reason for that?
16:38amalloys0x: that's what it's called in haskell, is the joke
16:39amalloyf $ x = (f x)
16:44aaelony13:41 *** ustunozg_ QUIT Remote host closed the connection
16:44Pupniki found myself wishing they left the parens in when learning haskell
16:45s0xgfredericks, amalloy: fair enough ... i've mentioned that and we will use that one ... thanks alot
16:45tuftheh, let's make prefix haskell =)
16:47amalloygfredericks: a new task lein quickcheck, which takes args and binds some dynamic variables that you look up during your tests?
16:48amalloyseems kinda dumb but viable
16:48Pupnikeasier enough, as I recall only the special character functions are infix tuft, just need to give them all normal names
16:48amalloyPupnik: you don't even have to do that, just wrap em in parens
16:48amalloy($) f x = f $ x = f x
16:49amalloyaw. i'm sad that `($)` doesn't put it back to being infix
16:49technomancygfredericks: does test.check have a -main entry point, or do you have to use clojure.test/run-tests?
16:51Pupnikamalloy, you get an unfortunate paren explosion if you try nesting expressions like that though
16:51amalloyPupnik: well sure, the operators are infix for a reason. but you did just say you wished there were more parens: now you get lots!
16:52amalloytechnomancy: there's no -main
16:52bob2gfredericks, environ?
16:57mr-foobarwhat's the advantage of tag literals in edn over plain symbols ?
16:58gfrederickstechnomancy: it doesn't have a main; you can call tests from the repl, or use defspec which makes something like deftest
16:58gfredericksbob2: also it's a contrib library so we can't bring in random stuff
16:59gfredericksamalloy: ideally it should be compatible with running _all_ the clojure.test tests
17:04gvickersAnyone using the Om library? Where should I use om/transact!? Is it ok to use it in a callback on a button?
17:09justin_smithgvickers: I think that's appropriate, if you want to immediately render the change in question and don't need to consolidate it with other simultaneous changes
17:24sdegutisclojure.lang.LineNumberingPushbackReader (stdin) cannot be cast to java.io.InputStream
17:24sdegutishaaalp
17:26amalloyreaders read characters; input streams are for bytes
17:27sdegutisaw
17:27whodidthisfnhouse seems pretty cool, hopefully its released on clojars soon
17:28sdegutisI'm trying to get clj-ssh to load me right into a live ssh session of the server of my choice.
17:28sdegutisI'm trying to use (ssh-shell) to do it.
17:29justin_smithsdegutis: maybe this could be implemented more concisely? http://www.java2s.com/Code/Java/File-Input-Output/ConvertReadertoInputStream.htm
17:30sdegutisI'm hesitant to do stuff I don't understand when it comes to networks.
17:30Anderkentsdegutis: ReaderInputSTream ?
17:31Anderkentoh my bad
17:31amalloyi don't think that exists, sdegutis
17:31Anderkenti thought it's actually a thing in java
17:31amalloyer, Anderkent
17:31amalloyi wrote it once, many years ago, but it's a bad idea
17:31Anderkentit's in apache commons!
17:31Anderkentcan't be a bad idea.
17:32Anderkentthough browsing through the source, it doesnt handle stream preambles which sucks
17:32amalloysdegutis: maybe https://github.com/ztellman/byte-streams ?
17:32sdegutisIf Apache is known for writing a famous web server in C, why do they have so much Java stuff?
17:33Anderkentit's a software foundation
17:33tuftsdegutis: most of the stuff under their umbrella these days is java
17:34sdegutisamalloy: thanks looks great
17:35sdegutisztellman strikes again, with a silent yet graceful "boom got em"
17:37amalloyclojurebot: ztellman is, inexplicably, silent yet graceful
17:37clojurebotexcusez-moi
17:37amalloyclojurebot: ztellman |is|, inexplicably, silent yet graceful
17:37clojurebotc'est bon!
17:39hiredman~ztellman
17:39clojurebotztellman is , inexplicably, silent yet graceful
17:40sdegutisI guess I just don't understand what inexplicable means then
17:40sdegutisoh. ok yeah.
17:43hiredmanclojurebot's factoid stuff conflates data and presentation, ideally it would go in through something that extracted raw sort of relationship data, stuck that in a store, then queryied that story to find data, and then used some set of rules to generate an english sentence conveying that data
17:44sdegutishiredman: hey is clojurebot available to join, say, #clojure-social ?
17:46maxalwings/msg NickServ identify gakwaya
17:46amalloysdegutis: you can have lazybot if you want him?
17:46sdegutisi saw nothing
17:46sdegutisamalloy: he's there
17:46sdegutisthanks
17:47sdegutis~guards
17:47clojurebotSEIZE HIM!
17:47maxalwingsHellow!
17:48maxalwingsI am new to clojure I want to use range to generate numbers like 4 8 16 32 64
17:48maxalwingsNeed ur help
17:48joegallowhy range?
17:48brehautsounds like a job for iterate
17:49joegalloinc brehaut
17:49maxalwingsOh! inc would work. Thanks
17:50amalloy&(take 10 (iterate #(* 2 %) 4))
17:50lazybot⇒ (4 8 16 32 64 128 256 512 1024 2048)
17:50TimMc...
17:50maxalwingsThank you guyz
17:50TimMcmaxalwings: "inc brehaut" meant +1 to brehaut, not that brehaut should have said "inc" :-)
17:51amalloy&(for [power (range 10)] (Integer/parseInt (apply str "1" (repeat power "0")) 2))
17:51lazybot⇒ (1 2 4 8 16 32 64 128 256 512)
17:51joegallo:)
17:51amalloyin case you're looking for a bad solution as well as a good one
17:51joegallonice
17:51TimMcha!
17:51maxalwingsHa!
17:52maxalwingsNice
17:54maxalwingsFor those of you who uses garden to do css I have rewritten and published normalize.css
17:54maxalwingscheck it out on clojars.org
18:03sdegutismax[tab]: looks handy th--
18:14gozalaanyone can help me with clojurescript.test on node ?
18:15sdegutismaxalwings: looks handy thanks
18:19FrozenlockI would like to learn Component and try a little of Datomic. Is there, by any change, a tutorial using both? :-p
18:20maxalwingssdegutis glad you like it
18:25amalloy~anyone
18:25clojurebotJust a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."
18:39tmciverI want to ensure that a value is a seq even if I'm given a scaler. Is there a better way to do (if (seq? x) x (vec x))?
18:40Bronsa,(vec 1)
18:40clojurebot#<RuntimeException java.lang.RuntimeException: Unable to convert: class java.lang.Long to Object[]>
18:41noprompt$seen guns
18:41lazybotguns was last seen joining on leiningen 1 hour and 35 minutes ago.
18:41nopromptguns: you around?
18:41Frozenlocktmciver: I'm not sure I understand... but (or (seq x) (vec x)) is a tiny bit shorter :p
18:41gunsnoprompt: lo
18:42gunswatching clojure/west videos with some dinner
18:42cbptmciver: seq? will return false for vectors, also vec turns one seq into a vector, it doesn't turn a scalar into a vector
18:42Bronsatmciver: you want vector there, not vec
18:42michaniskin1noprompt: hey dude
18:42nopromptguns: i'm not sure if you've run in to this but sometimes i run in to an issue with using tools.cli
18:42tmciverFrozenlock: (seq x) throws if x is a scalar.
18:42nopromptmichaniskin1: yo, trying out boot right now :)
18:42gunsnoprompt: Great, I'd love to fix it for you
18:43cbptmciver: I believe you want `sequential?`
18:43tmciverBronsa: you're right.
18:43nopromptguns: i don't think it's an issue w/ tools.cli directly but oddly when i require the latest version in my project and attempt to use it i'll get the error "parse-opts does not exist"
18:43nopromptguns: i've tried lein deps :tree to no avail
18:44gunsnoprompt: that's strange; is this CLJS?
18:44gunsnoprompt: And would you mind sharing a paste/gist so I can check it out?
18:45nopromptguns: no. and i've tried nuking all tools.cli from ~/.m2, etc. it works for some projects but not for others.
18:45nopromptguns, michaniskin1: i'm trying this w/ boot fwiw
18:46michaniskin1noprompt: what does your build.boot look like?
18:47noprompthttps://gist.github.com/noprompt/9820733
18:47gunsOh, boot creates Clojure scripts? Nice
18:48nopromptguns: yeah, it's exactly what we want right now too. we have a build task that doesn't make sense as a lein-plugin.
18:48gunsI'm going to install boot now and give it a go
18:49nopromptguns: but this problem has happened before with regular lein projects. :-/
18:49gunsThat's very strange; the tools.cli artifact is very simple
18:49nopromptguns: the annoying part is lein deps :tree doesn't report that it's a dependency but when running lein XXX it get's picked up.
18:50nopromptguns: i even completely emptied my profiles too.
18:50gunsnoprompt: Maybe leiningen has a hidden dep on an old tools.cli?
18:50michaniskin1noprompt: i'm investigating too
18:50gunsthat doesn't show up in :deps that is
18:51technomancylein pulls in tools.cli 0.2.1 via reply
18:52_2_yara17hola
18:52cbpbonjour
18:52gunsSo maybe I should send a patch to reply? the new tools.cli is backwards compatible
18:53technomancysure
18:53noprompttechnomancy: ah, then that's probably the problem.
18:53gunshttps://github.com/trptcolin/reply/blob/master/project.clj
18:53guns[org.clojure/tools.cli "0.3.1"]
18:53technomancyguns: actually ideally we could just exclude it entirely
18:54technomancylein does its own option parsing
18:55technomancybut that might require rearranging things in a backwards-incompatible way
18:55technomancyyeah, the ns that requires tools.cli is the same ns lein needs
18:55technomancyeven though the defns inside it are completely unrelated =(
18:55technomancyhuge namespaces: not always very cool
18:55gunslol
18:55michaniskin1noprompt: i'm getting ready to release an update to boot (it's in the "dev" branch currently) that separates the whole pomegranate dependency into another classloader
18:56technomancyhm; it's not even actually big at all, only 100 loc
18:56sdegutisSome interesting conversations about vars: http://logs.lazybot.org/irc.freenode.net/%23clojure/2010-10-18.txt
18:57michaniskin1noprompt: actually i was mistaken, pomegranate doesn't pull in tools.cli, as far as i can see
18:57gunsnoprompt: Still, it's strange I've never seen this problem
18:58nopromptwere either of you able to replicate it?
18:58sdegutisAlso, very interesting discussion about how to compile Clojure files: http://clojure-log.n01se.net/date/2008-02-01.html
18:59michaniskin1noprompt: yes i can make it happen here too
19:01nopromptmichaniskin1: cool. i was hoping that i wasn't going to end up on my own personal island of despair over here. :-)
19:01nopromptmichaniskin1: we're still super stoked to bring this into our workflow.
19:02michaniskin1something is bringing in tools.cli 0.2.1
19:03michaniskin1noprompt: i'm tracking down what that could be, exactly
19:03nopromptright, i clone everything down to my machine and ran lein deps :tree everywhere to see if i could spot it. :-/
19:03michaniskin1noprompt: i just did this: https://gist.github.com/9821023
19:04michaniskin1noprompt: then did `boot doit`
19:04gunsgah finally figured out how to use boot
19:05michaniskin1noprompt: i'm going to test with the dev version of boot (the one with the segregated pomegranate), just to make sure
19:10michaniskin1noprompt: if you do git pull from dev branch of boot you can use this: https://gist.github.com/9821131
19:11michaniskin1noprompt: the problem was that tools.cli was somehow being pulled in via pomegranate, after all
19:11nopromptorly?
19:11michaniskin1noprompt: i'll be pushing a release of boot in the next day or two, but it's not quite ready yet
19:12nopromptmichaniskin1: that's fine. we're just spiking on this atm. personally, i'm sold.
19:12gunsnoprompt: regarding leiningen projects: I notice that a simple project repl without an explicit tools.cli dep will actually have tools.cli 0.2.1 on the classpath
19:13gunsSo maybe that's why you have seen this in the past?
19:13nopromptguns: so is the culprit pomegranate?
19:13michaniskin1noprompt: awesome!
19:14technomancyguns: I can't reproduce that
19:14technomancyguns: is it possible that's coming from your user profile
19:15noprompttechnomancy: i can attempt to verify that.
19:15gunstechnomancy: I removed all the deps from that to see; but I will try again
19:15noprompttechnomancy: we have a project where this was an issue, at the time i didn't think to check there.
19:15gunsI suspected it was reply 0.3.0; the upcoming 0.3.1 will include tools.cli 0.3.1
19:16gunsThe current reply has tools.cli 0.2.1
19:17noprompthttps://gist.github.com/noprompt/9821268
19:19gunstechnomancy: yes you are correct
19:20gozaladnolen_: is there way to preserve (def env js/process.env) when using advanced compilation ?
19:21gunsnoprompt: then perhaps you have something in your user profile that brings in the old tools.cli (many lein plugins have it), and didn't notice that you did not have an explicit tools.cli dep?
19:21gozaladnolen_: it seems to translate to rc=process.rc
19:22gunsnoprompt: and if this happens with an explicit dep then :exclusions must be used?
19:24nopromptguns: i mved my profiles.clj file out of ~/.lein and still get the problem
19:24cbpgozala: have you tried ^:export ?
19:24gunsnoprompt: in a straight leiningen project with an explicit tools.cli dep?
19:25nopromptguns: yeah, but let me try making a *brand new* project too and see if it's an issue.
19:26nopromptgozala: i think you need to use externs.
19:26gozalacbp: yeah but I don’t think it helps with props
19:26gozalanoprompt: any reference about externs ?
19:27cbpgozala: I think you need to do (def ^:export env (.-env js/process))
19:27nopromptgozala: there's this article http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html
19:27amalloyprobably (aget js/process "env")
19:27cbpIf I understand it process is an object and you're trying to get the env key?
19:27nopromptamalloy: yeah that works too
19:28nopromptamalloy: but it's a bit annoying.
19:28amalloyi mean, he can decorate his own def with ^:export, but that won't impact how js/process get munged
19:28amalloyand he probably doesn't even need his own exported
19:28nopromptamalloy: right..
19:29noprompts/\.$//
19:29gozalacbp: amalloy no prompt thanks for suggestions
19:29gozalaI think aget is probably best way to go about it for my use case
19:30amalloynoprompt: you know there used to be a lazybot plugin that would pounce on those s/this/that/ annotations and tell everyone what it substitutes to. people don't seem to like it
19:30nopromptgozala: externs are fairly easy. you just need to create a process_externs.js file and put something like "process.env = {}" and have an entry :externs ["process_externs.js"]
19:30nopromptamalloy: that's bummer. ;_;
19:32gozalanoprompt: won’t that override process.env though ?
19:32nopromptguns: it works fine with a brand new project.
19:32gozalanoprompt: I’ll take a look at the post
19:32gozalanoprompt: because amalloy your suggestion surprisingly did not work
19:33nopromptgozala: no. that's just for google closure. basically it's so that the identifiers will not get munged during advanced compilation and also to inform the compiler about what things are so it can make decisions when compiling.
19:33gozalanoprompt: amalloy actually never mind it did work I just had a separate usage somewhere
19:34gozalanoprompt: how is it better that aget though ?
19:35nopromptgozala: the reason that works is because you're effectively saying env = process["env"]. process also does not get munged because https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/nodejs_externs.js
19:35gunsnoprompt: now you've got yourself a bug :) If this pops up again, and you have an explicit dep, please open an issue on github while it's fresh on your mind
19:36nopromptguns: yeah, and i already spent an hour trying to figure it out for that project and simply don't feel like wasting more time on it. :-(
19:36nopromptguns: heh, but hey the boot problem looks like it's pretty much solved! ;-)
19:37nopromptgozala: personally i prefer (.-env js/process) and using externs to (aget js/process "env"). it's totally your call though.
19:38nopromptgozala: fwiw
19:38nopromptgozala: there's also https://github.com/dcodeIO/node.js-closure-compiler-externs
19:39nopromptmichaniskin1: i'll keep an eye on boot for the next release.
19:39gozalanoprompt: I did not realised every import will be mingled as well :(
19:41nopromptgozala: yeah, but it's really not that bad unless you're using every last inch of an API. even then it's really just a simple matter of adding a new entry to an externs file. takes like a second.
19:42nopromptgozala: for the nodejs builtins i'd probably look at using those externs i mentioned above since they cover 99% of what you need in pure node.
19:42gozalanoprompt: well I’m hooking into libuv bindings directly
19:42gozala:(
19:42gozalawhich is process.binding(“os”) for example
19:43nopromptgozala: but the motivation for using advanced compilation is also not as compelling as it is on the client.
19:44gozalanoprompt: is this how you specify what’s the result of function ?
19:44nopromptgozala: well unless you're planning to package it up and put it on npm or something. then you've got some work todo. ;-)
19:44gozalahttps://github.com/dcodeIO/node.js-closure-compiler-externs/blob/master/events.js#L25-L29
19:46gunstechnomancy: I love your idea about clicky switches for keys and linear ones for modifiers. So obvious once you hear it!
19:46technomancyguns: oh yeah, are you going to try it?
19:46arnaudsjHI, is there a good reference guide/page on the best way to create a clojure lib based on a java lib (basically a clojure wrapper)
19:47nopromptgozala: i'm not completely sure. try it out maybe? i haven't done much cljs targeting node.
19:47amalloyarnaudsj: i think for libraries where there's an obvious way to create a clojure wrapper, the java version is already usable enough that there's no need to wrap it
19:47gunstechnomancy: it's on the shopping list; I suppose no one sells them that way?
19:48gozalanoprompt: thanks
19:48technomancyguns: I don't think so, heh
19:49arnaudsjamalloy: ok, so how do you deal with automatically installing the jar file into your leinengen project?
19:49technomancyclosest I've heard of is the realforce boards that use different springs for the weaker fingers
19:49technomancyguns: going for an ergodox, or something else?
19:49amalloyyou refer to it via maven
19:49arnaudsjI mean as a dependency so that it is automatically installed in your local .m2?
19:49gunstechnomancy: you know, my gf was just pitching that we start a hardware company; it looks to me you're halfway thre
19:49arnaudsjamalloy: can you point me to an example?
19:49technomancyguns: it is tempting =)
19:49gunstechnomancy: I was just going to buy a WASD and swap out the parts
19:50technomancycool
19:50Averellwhy is that supposed to be good, having a mix of switches?
19:50nopromptarnaudsj: just add it as a dependency to you project.clj [the/dep "X.X.X
19:51technomancyAverell: for non-modifiers, you want tactile feedback for when they activate because you typically just tap them. but modifiers are different since you hold them down
19:51technomancyso you always bottom out anyway.
19:51nopromptarnaudsj: then (:import the.dep.TheClass)
19:51technomancyAverell: it helps you instantly notice if you've hit the wrong key
19:51technomancywell, the wrong type of key anyway
19:52arnaudsjnoprompt: where do I place the jar for that dependency though? (it wont' be able to find it in the maven public repos)
19:53amalloyarnaudsj: write a letter to your congressman. jars which aren't in maven should be illegal
19:53nopromptlol
19:53arnaudsjamalloy, noprompt: yes that's why I wanted to wrap it up into a nice clojure lib to deploy on Clojars.org :)
19:54amalloythat doesn't solve the problem
19:54hiredmanclojars is a maven repo
19:54technomancyguns: one of the guys at cloudant where they host seajure has a filco that's pretty great too http://www.amazon.com/Filco-Majestouch-2-Tenkeyless-FKBN87MC-EB2/dp/B004WOF7S0/ref=sr_1_3?ie=UTF8&amp;qid=1395964285
19:54amalloyyou'd be creating a clojure lib that depends on a java lib that nobody else can find. instead, publish the java lib to clojars yourself
19:54technomancyoh, he left
19:54hiredmanit is, in fact, language agnostic as are maven repos
19:55Averelli have that filco with wasd keycaps. i'll probably try this mixing.
19:55technomancyAverell: my boards have the modifiers on the thumbs, which is a bit different
19:56arnaudsjok, I see. So get that java lib to use maven instead to compile and publish it to clojars. I get it now. Sorry for the newbye question. Just getting starting on Clojure in the past month, and I can't get enough of it, but I don't know well yet the ecosystem.
19:56technomancyAverell: I was hitting the wrong keys more when I was getting used to them, and I feel like the different switches helped
19:56Averellis that custom built?
19:56technomancyAverell: yeah, http://technomancy.us/173 and http://technomancy.us/172
19:57amalloyarnaudsj: you can publish it to clojars without having to change how it builds. build the jar however it wants, then publish it. i don't recall the details for manually publishing, but you should be able to find it on google somewhere
19:58technomancyamalloy: scp pom.xml myjar.jar clojars@clojars.org:
19:59technomancyoh, you can use lein deploy too I guess
20:02rasmustotechnomancy: oo, mx blacks for ctrl/shift/alt/alt-gr etc?
20:02rasmusto(just glanced at the logs)
20:03technomancyrasmusto: yeah, for the mods that are under the thumbs. one of my boards has shift under the pinkies, so I used reds for that since they take less force
20:04rasmustothat's great, what about spacebar?
20:04technomancyrasmusto: on my new board I have greens for space and backspace
20:04technomancyboth under the thumbs
20:05technomancyhttps://github.com/technomancy/atreus#switches tl;dr
20:05rasmustotechnomancy: ah, I think I've seen your keyboard posted at one point, is it the split grid type thing?
20:06rasmustoah, thanks.
20:06Foxboronwhen i joined this chan one and a half year ago, there where 435 people. Now its 710. Thats awesome.
20:06Foxboronjust realized it.
20:07technomancythe mailing list growth seems to be easing off though
20:08technomancytook over 5 years to get from 900 to 9000
20:09arrdemwhich list?
20:09technomancyarrdem: just the main clojure one
20:11gfrederickstime to IPO before it's to late
20:11gfrederickstoo*
20:13rasmustoavrdude is such a weird acronym, great tool though
20:15gunstechnomancy: I've heard great things about the Filcos; what I am really interested in having is a Keyboard with a configurable CAPS->Control setting so I never have to loadkeys / keymap / udev-whatever again at a new installation
20:16technomancyguns: need an onboard microcontroller =D
20:16gunstechnomancy: and a Forth interpreter apparently!
20:16technomancywell *eventually* sure
20:36TimMcgfredericks: Except when you type "mwlpwqt /Mwlpwpt"
20:44stcredzeroWould I be able to get away with signalling a semaphore in a function sent to an Agent?
20:46amalloystcredzero: not enough context for a correct answer
20:46amalloyyou can definitely interact with semaphores in an agent action, but whether this leads to a correct program depends on the problem
20:47gunsIsn't the implicit question whether or not agent fns are retried?
20:47stcredzeroamalloy: granted, I could freeze everything up waiting on the thing afterwards, but as far as I can tell there is nothing in the whole agent thing that forbids it.
20:48amalloyguns: no? that's one thing that could go wrong, but hardly the only one
20:48stcredzeroamalloy: yes, but there's a way to get notification from the system once an agent action succeeds, yes?
20:48amalloyeg, perhaps the agent is blocking on some other lock, so that you build a deadlock while it waits for itself
20:49stcredzeroamalloy: I want to know when a specific set of agent actions has finished
20:49amalloystcredzero: i mean, there's ##(doc await)
20:49lazybot⇒ "([& agents]); Blocks the current thread (indefinitely!) until all actions dispatched thus far, from this thread or agent, to the agent(s) have occurred. Will block on failed agents. Will never return if a failed agent is restarted with :clear-actions true."
20:50amalloybut generally if you care when an agent action is done, you don't want to be using an agent - their asynchrony is supposed to be a feature, not a hurdle
20:50stcredzeroamalloy: ah ha! Good news. I don't have to build it.
20:50stcredzeroamalloy: well, what I want isn't quite like an Agent.
20:50hyPiRionGenerally you'd use await-for, because await is dangerous wrt. blocking
20:51amalloyhyPiRion: he strikes me as someone who lives dangerously
20:52stcredzeroamalloy: you have no evidence of this, I think. Rather, you are interpreting my willingness to use tools in unusual ways in experiments this way. (Probably a little condescenscion there.)
20:52amalloythat's a fair characterization
20:53stcredzeroamalloy: typical pattern. I ask about a small detail. A system that uses this mechanism is imagined by others, but has some tremendous flaw, but it's assumed that my system has that flaw. This is wrong over 50% of the time.
20:54michaniskinAeroNotix: ping
20:54AeroNotixmichaniskin: pizzong
20:55AeroNotixsup
20:55michaniskinAeroNotix: i added you with admin access to the tailrecursion/ring-proxy repo
20:55michaniskinyou should be able to add collaborators if you wish, or whatever you like
20:55AeroNotixmichaniskin: oh ok, thanks a lot! We're using it on something at work
20:55AeroNotix:)
20:56AeroNotixI hope you didn't take offense to my robocop thing
20:56hyPiRionstcredzero: that's a very common thing over here in general. Many people ask for advice on how to do X, but actually wants to do Y, in which Z is a better choice.
20:56gunsThis is a common thing in every channel
20:57AeroNotixmichaniskin: It's 2:00am here, though. So I must hit the hay
20:57AeroNotixwill catch up with you another time
20:57stcredzerohyPiRion: Yes, I am aware of how that works. What disturbs me is when people start throwing counterfactuals about what I'm doing, then jump on that as evidence I don't understand something like *threads*.
20:58gunsstcredzero: lots of people don't understand threads. no reason to be touchy
20:58gunsI've been misunderstood on plenty of channels; not a big deal
20:59michaniskinAeroNotix: see ya
20:59stcredzeroguns: I just don't like it when people tell me something is X when it's Y.
21:00gunsstcredzero: meh; it's not a big deal
21:26gfredericksTimMc: the dvorak stuff seems to be setup at a lower level. xmodmap is just for caps->ctrl
21:30TimMcAh, OK.
21:35cneirahow do I use a custom datatype from a java library ?
21:36brehautyou import it, and the construct it
21:36brehaut,(import java.util.Date)
21:36clojurebotjava.util.Date
21:36brehaut(Date. 2014 1 1)
21:36brehaut,(Date. 2014 1 1)
21:36clojurebot#inst "3914-02-01T00:00:00.000-00:00"
21:38hyPiRionit's from 1900
21:38hyPiRion,(Date. 114 27 03)
21:38clojurebot#inst "2016-04-03T00:00:00.000-00:00"
21:39hyPiRion,(Date. 114 3 27)
21:39clojurebot#inst "2014-04-27T00:00:00.000-00:00"
21:39brehautoh. lol
21:40tmciverThe year is from 1900, the month is from zero and the day is from 1. good grief.
21:40brehautforgot about that. not that its really relevant
21:40hyPiRionand months are apparently zero-indexed
21:40brehauti think someone was high when they wrote it
21:41amalloywell, that was in like the sixties, brehaut, so probably
21:41amalloy(ie, Date is derived from very old C functions)
21:42brehautif thats the case, its surprising we can accurate determine when it was written at all
21:45brehautin any case, its still quite insane to be writing a new, cross platform language/library and to just copy the madness from an earlier system that is clearly crazypants
21:50amalloywell, yes. i can only explain, not justify
21:53shep-homeIs there a nice way to destructure from the end of seq?
21:53amalloyshep-home: not really
21:54shep-homeI'm reversing it and taking the first few items for now
21:54amalloyand like, it can't be performant, so it's not unreasonable that the language discourages you from doing it. clojure often does that
21:55shep-homealright, it's not a big thing in this case
21:55shep-homethanks!
22:03TimMcHmm, It could be nice to destructure from the end of a vector.
22:04TimMcI suppose that's what rseq is for.
22:04brehautrseq!
22:04TimMcsniped!
22:04brehauti blame international lag
22:05amalloyhaha quick, someone tell rich we've found out that rseq is only for destructuring
22:08TimMcHuh, I didn't get a ping response from brehaut's client. Maybe I screwed up the command.
22:09brehautor my crappy client doesnt work properly?
22:09brehautTimMc: im getting ~1.0±0.1 to you
22:09brehautalso nan
22:10TimMc!
22:10brehaut2.0
22:12brehauti guess those are seconds
22:27TimMcThat's plenty of time for sniping.
22:40charewho here is addicted to diablo 3 reaper of souls
22:44arrdem(inc amalloy) ;; ring buffer is osum
22:44lazybot⇒ 92
23:20amalloyarrdem: glad you enjoy
23:20arrdemamalloy: you should totally patch it to use 1.6 now :P
23:20amalloyhey, maybe i could get into quickcheck by writing some test.check properties for ring-buffer
23:21amalloyarrdem: does it need to change in some way for 1.6? surely you can just use 1.6 and ring-buffer together
23:21arrdemamalloy: I don't think so, I'm just poking you
23:21arrdemamalloy: seriously tho, thanks. ring-buffer made logging bounded histories a breze.
23:22amalloycool. i don't think i ever actually used ring-buffer, i just made it for fun
23:22arrdemI just used it in a branch predictor implementation...
23:22arrdemblag post incomming
23:25MadFunkchare: is it that good?
23:25chareMadFunk you have never played diablo 3?
23:25MadFunkI have, that's why I'm asking=p
23:27arrdemMadFunk: FYI chare is the routinely visiting troll we still haven't banned for some reason
23:27arrdemMadFunk: chatting with him is... frowned on.
23:27charei'm not a troll
23:27MadFunklol, arrdem, noted.
23:27MadFunkchare: I sorta peaced after the first couple weeks. Like SimCity, it wasn't the "always online" issue that bothered me-- just felt the game wasn't as "complete" as I'd hoped based on the series. But yeah, I hear better things about RoS.
23:28MadFunktotally on-channel-topic here, I know.
23:33MadFunkI do actually have clojure related inquiry for anyone who might have some ideas. I'm trying to tackle this problem http://codegolf.stackexchange.com/questions/24891/solve-aristotles-number-problem in clojure and I'm not sure how. I've done my best to figure it out myself, but I do not have a good track record with math puzzles. I was wondering if anyone could help me identify an approach. I've given up on figuring it out on my own, now I
23:33MadFunkjust want to know how it could be solved.
23:38MadFunkI suppose I could translate the logic from one of the other submissions, but I feel like there must be a more distinctly-clojure approach. I appreciate that could be just a misconception on my part. Any input would be greatly appreciated.
23:50amalloyMadFunk: i'd say converting one of the other solutions to an immutable approach will be both a good learning experience and also the easiest way to go. coming up with a novel algorithm for a solved problem is not easy