#clojure log - Mar 27 2014

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

0:07 sdegutis: What 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

0:31 brehaut: ~seen dgrnbrg

0:31 clojurebot: Pardon?

0:31 brehaut: &seem dgrnbrg

0:31 lazybot: java.lang.RuntimeException: Unable to resolve symbol: seem in this context

0:31 brehaut: bah. no idea what im doing

0:44 amalloy: $mail brehaut $seen dgrnbrg

0:44 lazybot: Message saved.

0:44 amalloy: $seen dgrnbrg

0:44 lazybot: dgrnbrg was last seen quitting 5 weeks and 3 days ago.

0:45 aaronj1335: arrdem hey buddy

0:47 arrdem: aaronj1335: sup

0:47 aaronj1335: just running one last round of tests before I call it

0:48 aaronj1335: cool. thnx again for all the help on this

0:48 arrdem: no problem. it's been a fun exercise in profiling Clojure apps..

0:48 aaronj1335: also... i think i may have been at a clojure meetup here in atx that u were at... do you go to any of those?

0:48 arrdem: I've gone to a couple... stopped going recently.

0:48 aaronj1335: yea i think those could b a lot better

0:49 arrdem: goddamnit.

0:49 aaronj1335: at least based on the only one i went to

0:49 arrdem: yeah I would agree.

0:49 so I managed to get five rounds of random-hmm down to 118s.

0:49 best I can do.

0:50 chare: I'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

0:50 aaronj1335: is that w/o the doall here? https://github.com/aaronj1335/inclojure/blob/master/src/inclojure/core.clj#L11

0:50 arrdem: that doall doesn't really impact random-hmm

0:51 pulling it gets file reading down to sub 1s :P

0:51 aaronj1335: that's cause it's not reading the files tho ...

0:51 w/o that doall token-seq just returns an unrealized lazy-seq

0:51 arrdem: and that's a language feature

0:52 aaronj1335: but the point of it is to compare how fast clojure reads the files vs. python

0:52 we could make the python really fast too by just instantiating a generator

0:52 arrdem: pr sent for your entertainment

0:53 https://www.refheap.com/66515

0:55 aaronj1335: so I think what's happening here

0:55 aaronj1335: is that I haven't cooked up a way to make the random-hmm lazy on the probs-for-tokens

0:56 aaronj1335: 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.

0:58 aaronj1335: yea the map insertions are necessary for the algo tho. and a map shouldn't b taking up 4 G of memory

0:58 arrdem: I'd have to go in with a more heavyweight profiler than timbre to really diagnose that

0:59 aaronj1335: yea

0:59 i'll have a closer look at this PR tomorrow morn, signing off for now

1:02 sdegutis: When 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?

1:03 arrdem: I have it installed but don't use it :P

1:04 * arrdem doesn't test his projects well enough

1:34 felixflores: I'm trying to figure out what the `..` operator is but I get a 404 when I look for the documentation

1:34 http://clojuredocs.org/clojure_core/clojure.core/_dot_dot

1:34 googling .. is really hard

1:34 does anyone know what it does?

1:35 (defn handle-change [e owner {:keys [text]}]

1:35 (om/set-state! owner :text (.. e -target -value)))

1:35 beamso: http://clojure.org/java_interop#dot

1:35 felixflores: Trying to figure out how this does it's thing

1:35 beamso: i think (.. e -target -value) expands to e.getTarget().getValue()

1:36 felixflores: ah ok

1:36 makes sense now

1:36 thanks :)

1:36 (.. System (getProperties) (get "os.name"))

1:36 expands to:

1:36 (. (. System (getProperties)) (get "os.name"))

1:36 this was also useful

1:36 awesome

1:37 TravisD: felixflores: In the future, you could have used doc to learn about it

1:37 ,(doc ..)

1:37 clojurebot: "([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."

1:38 felixflores: oh snap. Of course.

1:39 turbofail: i wish i could get docstrings for java junk

1:39 instead of having to wade through HTML

1:39 i guess there is a way to do it but i haven't set it up

1:39 beamso: i kinda like wading through java api html

1:40 better than wading through ruby api html

1:40 felixflores: I just had a brain fart, and forgot I can do that in the repl, probably because I'm just reading a blog.

2:39 jph-: nice to see the crypto-password update

2:53 sid_: 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)?

3:05 sorenmacbeth: hey all

3:05 is there something less gross than this?

3:05 (merge-with #(merge-with + %1 %2) {"a" {"b" 1}} {"a" {"b" 1}})

3:05 {"a" {"b" 2}}

3:07 arrdem: I doubt it... that isn't too nasty IMO

3:08 I mean you could write a custom recursive merge, but if all your data is only two levels deep why bother.

3:12 sid_: 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)?

3:16 beamso: sid_: refactor the functions to test the maps being passed to selmer rather than the html coming back from selmer?

3:21 sid_: beamso_ Hi, I'm pretty new to testing. I'll refactor the code accordingly. Thanks :)

3:22 beamso: not a problem

3:46 jph-: are there any tricks for dealing with cyclic load dependency?

3:46 i have some functions from ns A that want functions from ns B and vice versa

3:47 is there a way to do that so an exception doesnt get thrown?

4:15 whodidthis: maybe better to refactor i'd imagine

4:23 jph-: whodidthis, thats what caused it in first place, moving a section of functions into a separate file

4:23 oh well

4:42 whodidthis: i dont think clojure reader thingie wants to bouncy bounce, symbols need to alredy be defined

4:57 sm0ke: is it possible to proxy an interface with same name and arity defintion of a function with different type?

4:58 i mean a function with different param types and same arity

7:10 Frozenlock: Interesting... react.js (om/quiescent/reagent) gives you tabs/tabsets for free.

7:13 yotsov: Frozenlock: that sounds interesting, can you elaborate a bit on why that is so? I am trying to learn quiescent now

7:14 Frozenlock: Well, your UI (html document) is basically generated from your atoms. There's nothing preventing you from re-using the same components again and again.

7:14 Give me a sec, I'll try to upload an example

7:21 yotsov: Here, my main react playground at http://hvac.io

7:21 You 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.

7:22 yotsov: Frozenlock: thanks a lot! I think I see what you mean now

7:33 Frozenlock: "Note: :import is only for this use case, you never use it with ClojureScript libraries" o_O

7:33 Why?

7:33 clojurebot: Frozenlock: because you can't handle the truth!

7:34 beamso: is import only for java classes?

7:34 Frozenlock: Ah sorry, that's for clojurescript

7:35 I'm reading this http://swannodette.github.io/2013/11/07/clojurescript-101/

7:35 beamso: oh. for the google closure compiler too.

7:36 Frozenlock: Does he mean that :import isn't usually required, or that we shouldn't use it?

7:38 beamso: it looks like it's just to shorten the references to google closure constructors

7:38 i.e. Jsonp. instead of goog.net/Jsonp.

7:39 Frozenlock: phew... I used :import quite a few times with goog closure stuff and was wondering if it was a mistake.

8:46 whodidthis: how do i check if a javascript environment has window to not try to evaluate js/window specific stuff in nashorn

8:53 nbeloglazov: whodidthis: did you try (when js/window (do-window-specific-stuff)) ?

8:55 whodidthis: sure, throws "window not defined"

8:56 i guess i could try catch that but hopefully theres something less rough to use

8:57 or keep om stuff and event handling stuff in separate projects so nashorn would use only the om part but thats somewhat rough too

9:11 nbeloglazov: What do you need nashorn for? Testing?

9:11 whodidthis: server side rendering

9:12 also meh, tried to set var window = false on nashorn but then nashorn cant eval react

9:13 sdegutis: When 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?

9:13 Seems like I'm missing something, but I checked the docs and don't see what I'm missing.

9:31 Ah, there's lein-test-refresh, prism, and quickie, all for auto-re-running clojure.test suite when a file changes.

9:31 Can anyone recommend one?

9:43 Meh Prism works fine.

10:10 Okay, apparently you need to call (flush) before you call (read-line). Don't forget it.

10:40 RickInAtlanta: I 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:43 luxbock: this 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:50 jph-: RickInAtlanta, i really liked this article when i was experimenting with websockets http://samrat.me/blog/2013/07/clojure-websockets-with-http-kit/

10:50 RickInAtlanta: jph- awesome, thanks.

10:51 jph-: he has a second one after that as well

10:51 worth bookmarking

10:57 is there any good articles/libraries related to managing worker queues in clojure

10:57 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:57 i'm wondering if there's something that does that kind of thing already

10:57 Anderkent: Goddamnit, 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:58 jph-: Anderkent, my plan is to never call a library production ready ;)

10:58 alpha forever

10:59 hyPiRion: Anderkent: bugfix release?

10:59 it's just to add in a .1 at the end. I did that when I screwed up the deployment once :p

10:59 jph-: yeh i was about to announce 0.2.0 of something, realised i forgot to test something, quickly pushed 0.2.1

10:59 hehe

11:00 Anderkent: yeah, I mean it's totally irrational, the bug isnt even that big of a deal I think

11:00 it just offends my sensibilities to have published something that's not perfect, and it'll be there forever, bringing shame to everyone involved

11:00 :P

11:00 wink: http://en.wikipedia.org/wiki/Software_versioning#TeX ;)

11:01 hyPiRion: Anderkent: So you always write perfect bug-free code at first attempt? =)

11:01 Anderkent: jph-: a quick googling brings up simple-queue, but I'm not sure how it compares to your thing

11:01 hyPiRion: no, I never publish without being anxious and ashamed

11:01 :P

11:01 hyPiRion: hehe

11:02 I think bug reports are nice, it means people at least use my libraries

11:02 Anderkent: sure, I love bug reports. I just hate publishing non-snapshot versions

11:02 hyPiRion: yeah

11:10 Anderkent: I wish 'no matching method found' would include the signature it was looing for in the error message... It's so useless right now

11:16 shep-home: So, tools.namespace.repl/refresh is pretty great

11:16 jph-: shep-home, yes

11:16 shep-home: but can I add in an extra resource to the dependency tree?

11:17 jph-: shep-home, especially when you discover having a dev/user.clj profile for development

11:17 fro_: I'm trying to decide which version of "The Joy of Clojure" to buy. Second Edition is

11:17 EAP

11:17 RickInAtlanta: fro_: get version 2

11:17 er, second edition

11:17 shep-home: jph-: Yup, I'm starting to build up a global user.clj at the moment, Don't need per-project yet :-)

11:18 fro_: ok, thx

11:18 shep-home: I have this file as a resource, and I load that into one of my namespaces

11:18 jph-: 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:18 shep-home: and I'd like refresh to notice that and reload the namespace, even though that .clj file hasnt changed

11:19 jph-: when i refresh, my user.clj gets reloaded as well

11:19 so can't you put a trigger in there?

11:20 shep-home: jph-: not sure I follow. I have a resources/foo file, and then bar.clj loads that file as a def (more or less)

11:21 so, if I edit the resource, I'd like it to get reloaded in the bar ns

11:21 jph-: hrmm

11:21 shep-home: I don't expect tools.namespace to figure that out

11:21 jph-: well

11:21 you can setup a filesystem watcher

11:21 shep-home: but I would like to be able to go out of my way to tell it

11:21 jph-: that could do something when a change is detected

11:21 shep-home: hmm

11:21 jph-: with fs library

11:22 https://github.com/derekchiang/Clojure-Watch

11:24 shep-home: Would you suggest basically touching the .clj file when the resource is updated?

11:26 jph-: not sure

11:26 im wondering how ring-devel does it's dynamic loading

11:26 if it has any filesystem watchers under the hood

11:29 mpenet: ,(with-meta nil {})

11:29 clojurebot: #<NullPointerException java.lang.NullPointerException>

11:31 trptcolin: ring-devel uses https://github.com/weavejester/ns-tracker

11:31 mpenet: kind of wanted this to work, but I understand the mess that implies...

11:32 xeqi: TimMc: the issue was nested params will create a vector from q[]=. then hiccup renders out the vector as a node

11:34 TimMc: q= would escape properly when used, but since q= and q[]= both assign :q ....

11:36 shep-home: trptcolin: Any idea if ring/ns-tracker has a way of manually adding to the dependency graph?

11:36 (or if it can follow resources or other non-clj files)

11:37 mpenet: xeqi: I gave up on this, I just pass json in request bodies. It's hassle free at least

11:38 Anderkent: how do I fix the criterium/lein warning? (tiered compilation). Do I have to build a jar?

11:38 mpenet: ElasticSearch works like this too, it's not as ugly as it sounds

11:39 trptcolin: shep-home: adding source dirs is easy, but heavier stuff will require some grossness (re-def'ing, alter-var-root, etc)

11:41 shep-home: trptcolin: so, the file in question isn't a clj file, so a source dir doesn't make sense (I think...)

11:42 can you shed some more light on the grossness you describe?

11:42 TimMc: xeqi: Oh! Lovely, yes. So people could basically specify a hiccup tree in the request?

11:43 * TimMc never did trust that kind of param tomfoolery

11:46 xeqi: TimMc: basically yeah

11:48 AeroNotix: can I put auth in the base project.clj file?

11:48 it's for an internal work project.

11:48 There's no reason i

11:48 it needs to use the ~/.lein/profiles.clj file

11:48 trptcolin: shep-home: you can always do things like alter-var-root or `(in-ns 'foo) (defn existing-fn [] new-implementation)`

11:48 but that's typically a last resort

11:49 mpenet: AeroNotix: https://github.com/weavejester/environ

11:49 AeroNotix: mpenet: no

11:49 mpenet: for LEIN

11:49 nevermind, found it

11:50 clgv: yay auth data in a version control system yippie!

11:51 AeroNotix: clgv: 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:51 it's authentication for *building* the application, not anything else.

11:51 Take it elsewhere, I know it's fucking dumb but I work with fucking dumn.

11:51 so that's how it has to be

11:51 clgv: config file consisting of a simple clojure map ^^

11:51 AeroNotix: clgv: but still, it's outside of vcs. So people can't just clone and have it owrk

11:51 work

11:52 clgv: they can copy it from a protected shared folder

11:52 AeroNotix: clgv: > lazy people

11:52 how can I make this clearer

11:52 I'm introducing clojure at work -- anything which is a manual step makes them squirm

11:53 clgv: they are developers as well?

11:53 AeroNotix: They are

11:53 clgv: please don't be so obtuse -- you know these kind of people exist.

11:54 Anderkent: AeroNotix: can you just disable auth on the server then? Same result :P

11:54 clgv: AeroNotix: do they have their maven credentials in the vcs as well? (I am guessing you use java)

11:54 AeroNotix: Anderkent: no, it's no the same result.

11:54 clgv: we're Erlang otherwise

11:55 Anderkent: definitely not the same result.

11:55 Anderkent: hm, how is it different?

11:55 AeroNotix: Anderkent: the repo is private

11:56 Anderkent: hm, so there's people who could access the build system but not the repository?

11:56 AeroNotix: Anderkent: they need to access project dependencies.

11:56 project dependencies are on our private archiva server, hence needing the auth

11:56 the project itself is on a private github repo

11:58 Anderkent: hm, I guess that's actually fair enough

11:58 AeroNotix: thanks

12:00 jph-: im rather confused about what "swagger" is meant for. Is it like liberator for publishing a rest api?

12:03 Anderkent: swagger'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:03 i think

12:05 cbp: what a terrible name

12:15 justin_smith: clgv: 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:16 https://github.com/noisesmith/cryptlj

12:16 clgv: justin_smith: AeroNotix could be interested ^^

12:16 justin_smith: ahh, oops, yeah, AeroNotix you may find that lib useful

12:17 AeroNotix: That readme is not entirely helpful

12:17 What exactly do I have to do?

12:17 justin_smith: https://github.com/noisesmith/cryptlj/blob/master/test/cryptlj/disk_test.clj

12:17 AeroNotix: ok so it encrypts files?

12:18 How does this tie into me wanting to use passwords in a project.clj

12:18 justin_smith: it has functions to encrypt / decrypt edn

12:18 AeroNotix: The passwords are for *repositories*

12:18 justin_smith: so 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:18 AeroNotix: not for anything which is used at runtime

12:19 but this looks like it's for application code

12:19 or use at runtime

12:19 and stuff needs to be already on the person's box to decrypt

12:19 justin_smith: you can call it from inside project.clj if you include it as a project plugin

12:19 oinksoft: the page for -?> shows examples for -?>>: http://clojuredocs.org/clojure_contrib/clojure.contrib.core/-_q%3E

12:20 justin_smith: using `unquoting

12:20 AeroNotix: I just needed a way to have archiva repos accessible the moment you clone a project

12:20 oinksoft: is -?> 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:20 AeroNotix: justin_smith: it still needs the decrypt keys

12:20 justin_smith: yes, but those can be elsewhere

12:20 Anderkent: you 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:20 technomancy: AeroNotix: have you tried putting the creds in the URL? https://user@pass:server.net/whatevs

12:21 oinksoft: (i understand how to use -?> and -?>>, but it's an undefined symbol)

12:21 AeroNotix: technomancy: what's the difference here?

12:21 technomancy: AeroNotix: it's just all in one place that way

12:21 Anderkent: oinksoft: 1.3 is pretty old. Also clojure.contrib is no more

12:21 technomancy: I am just curious if that would even work; I don't know

12:21 AeroNotix: technomancy: probably would

12:21 justin_smith: Anderkent: 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:21 (in order to deploy for example)

12:22 AeroNotix: justin_smith: so that doesn't help me here

12:22 oinksoft: Anderkent: ok, i was studying a book that contains a project.clj specifying 1.3.0

12:22 justin_smith: AeroNotix: OK

12:22 cbp: oinksoft: that macro is called some-> now

12:22 oinksoft: Anderkent: 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:23 AeroNotix: oh man, some->!

12:23 Nice

12:23 justin_smith: AeroNotix: 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:23 oinksoft: is there something like hoogle for clojure, because i can't find some->

12:24 cbp: (doc some->)

12:24 clojurebot: "([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:24 cbp: oinksoft: http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/some->

12:24 Anderkent: ,(meta #'some->)

12:24 clojurebot: {:macro true, :ns #<Namespace clojure.core>, :name some->, :arglists ([expr & forms]), :column 1, ...}

12:25 cbp: Sadly no, docs are pretty terrible in clojure

12:25 hiredman: oinksoft: -?> was never in clojure proper, they were in the contrib library

12:25 Anderkent: hm, doesn't print :added, but it's there! (1.5)

12:25 oinksoft: hiredman: 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:25 hiredman: (http://clojuredocs.org/clojure_contrib/clojure.contrib.core/-_q%3E)

12:25 cbp: thanks

12:26 Anderkent: yeah clojuredocs is kinda bad about this

12:26 hiredman: oinksoft: contrib is sort of the tip off there

12:26 (in the url)

12:26 oinksoft: ok, so clojuredocs is not affiliated w/ clojure project

12:26 good to know ;)

12:26 Anderkent: hiredman: only if you know about clojure.contrib being gone

12:26 oinksoft: yeah. but the search on clojure.org sucks. So there's that ;S

12:26 oinksoft: hehe

12:26 cbp: ughhhh

12:26 hiredman: Anderkent: even when it wasn't "gone" it was a distinct library you had to use

12:27 oinksoft: ok, thanks a bunch. i like these -> operators :)

12:27 hiredman: Anderkent: the things in it weren't just available

12:27 cbp: So what would be required to fix the online docs? ..without hurting anyone's sensibilities

12:27 Anderkent: hiredman: I know, but that's hardly obvious for someone who just searches for a symbol in clojuredocs

12:28 though I guess clojuredocs covers many non-core libs?

12:28 dunno don't really use it

12:30 oinksoft: sorry, another documentation question. why do the clojure docs refer to 1.5 as the stable release, but the homepage refers to 1.6?

12:31 cbp: because like i said.. it's pretty terrible

12:31 oinksoft: ok :)

12:31 justin_smith: "community-powered"

12:31 technomancy: the repl should be your ground truth

12:32 usually you only fall back to the browser for things you can't find from your repl

12:32 (this does not include docstrings)

12:32 justin_smith: they still link to clojure-contrib

12:32 TimMc: When there is no spec, everything is within spec. :-)

12:33 oinksoft: technomancy: but the repl's only going to show me what i already know about

12:33 justin_smith: oinksoft: clojure.repl/apropos helps there

12:33 zenoli: Is there a straightforward way to wrap a binary file into a Lamina channel? These conversions are giving me fits.

12:33 oinksoft: technomancy: 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:33 justin_smith: oinksoft: also clojure.repl/source

12:33 (in the source code for functions you know, you will see calls to ones you don't)

12:33 technomancy: oinksoft: sure, but typically it doesn't make a lot of sense

12:34 apropos, source, and doc are a lot more useful

12:34 justin_smith: the cheat sheet is imperfect, but still helpful http://clojure.org/cheatsheet

12:34 technomancy: erlang needs html docs because its repl is terrible

12:34 justin_smith: exactly

12:34 yeah, the repl unlocks everything

12:35 oinksoft: i suppose that is one way to solve a problem!

12:35 thanks again

12:35 mpenet: the giant root namespace thing doesn't help either

12:35 AeroNotix: technomancy: s/needs html docs/a complete rewrite/g s/it's repl//

12:36 oinksoft: AeroNotix: are you kidding me, you were all up on erlang literally 12mos ago

12:36 AeroNotix: oinksoft: who are you

12:36 oinksoft: AeroNotix: PigDude

12:36 AeroNotix: yeah well

12:36 I have a job in erlang now, and I realise that people are just lying to themselves.

12:36 daily.

12:36 oinksoft: hahaha

12:36 there's some truth to that

12:37 technomancy: AeroNotix: well if you're going to rewrite erlang things, the repl would be the place to start

12:37 oinksoft: AeroNotix: i'm learning clj for a job :p but i quite like it so far

12:37 * technomancy shakes his fist at all interactive shell-like systems that don't honor control-d

12:37 AeroNotix: Erlang 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:37 Don't even get me started on projects like riak

12:38 technomancy: AeroNotix: at least OTP accepts pull requests =)

12:38 oinksoft: technomancy: 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:38 AeroNotix: technomancy: sure, after they deem it could be valuable to Ericsson's internal projects

12:38 if not, fuck you

12:38 technomancy: oinksoft: you can always connect from another client and kill off the misbehaving one

12:38 AeroNotix: the language is just crap -- records? Maps? C'mon. It's 2014.

12:38 technomancy: assuming you're using nrepl

12:39 oinksoft: my high level language is better than your high level language

12:39 or something

12:39 technomancy: AeroNotix: I got a patch to erlang.el applied pretty quickly; never would have happened with clojure.

12:39 AeroNotix: oinksoft: for reals

12:39 oinksoft: mostly the same but i see a few things i like in clojuree

12:39 AeroNotix: technomancy: 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:40 oinksoft: I just did a project in Clojure amidst all our Erlang stuff. Literally. The. Best. Thing. Ever.

12:40 no rebar, for 1

12:40 oinksoft: lein blows rebar out of the water i think

12:40 AeroNotix: dependency management that actually works. Good community, lively libraries, expressive language

12:40 oinksoft: rebar is a cruel joke

12:40 and people put up with it!

12:41 It's actually *worse* than when we just used Makefiles for everything

12:41 seriously

12:41 oinksoft: AeroNotix: customer doesn't care what tool you use to build your code

12:41 AeroNotix: oinksoft: I don't see how that's relevant.

12:41 It's my sanity

12:41 technomancy: I wasted half an hour while interviewing a job applicant over a rebar bug

12:41 it matters

12:41 oinksoft: technomancy: how did that happen?

12:42 AeroNotix: technomancy: that's not the client, though.

12:42 yotsov: AeroNotix: I am curious if you would happen to have some "internal" opinion on Dialyzer

12:42 technomancy: oinksoft: we have three rebar.config files; one for prod, one for test, and one for dev

12:42 AeroNotix: Probably rebar half-downloading things and then telling you "OH YEAH DUDE THE DEPS ARE HERE"

12:42 yotsov: not worth the time, misses trivial cases, slow, touted as the jesus device

12:42 does not deliver

12:42 yotsov: AeroNotix: thanks!

12:42 AeroNotix: it's fine for tiny errors, but it's so slow you'd be better off just using unit testing

12:43 yotsov: I see... only ran it on very small projects

12:43 oinksoft: some people are never satisfied :p dialyzer may not hit everything but it is a lot better than, say, pylint

12:43 technomancy: oinksoft: 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:43 AeroNotix: yotsov: we have a project with 30+ dependencies. It does not scale.

12:43 oinksoft: it has found plenty of bugs in my projects and saved me time, i like dialyzer

12:43 AeroNotix: oinksoft: then you're not testing properly.

12:43 technomancy: oinksoft: 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:43 oinksoft: AeroNotix: OK!

12:43 AeroNotix: if you rely on dialyzer to find the kinds of bugs it *does* find, then I weep for your test suite

12:44 oinksoft: AeroNotix: 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:44 technomancy: dialyzer won't even run on our codebase; it sends it into an infinite loop

12:44 oinksoft: AeroNotix: as a recovering pedant it is a tough pill to swallow

12:44 AeroNotix: (me)

12:45 AeroNotix: oinksoft: pedantry is good for software

12:45 technomancy: it is slow

12:45 technomancy: perhaps it's just taking a while

12:45 technomancy: AeroNotix: over night =)

12:45 AeroNotix: technomancy: how big is your codebase?

12:45 technomancy: I'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:46 AeroNotix: 6kloc

12:46 AeroNotix: technomancy: the best part is, what you mostly end up doing is putting specs on things where dialyzer got confused.

12:46 TravisD: infinity hours and 24 hours are pretty much the same

12:46 AeroNotix: So you don't change your code -- you change your specs. Dialyzer is a waste of time.

12:46 technomancy: AeroNotix: it was confirmed as a bug by kostis

12:46 AeroNotix: technomancy: perhaps

12:47 I'm just saying something else entirely, just drop dialyzer and use the time on making your test suites better / higher coverage

12:47 The only tool I think Erlang has which is better than in Clojure is the cover tool

12:47 very good, outputs in all manner of formats and you can *merge* reports together

12:47 so different test suites can be put together

12:48 technomancy: well that and hot upgrades

12:48 AeroNotix: Meh

12:48 no-one uses hotupgrades unless they're fapping

12:48 technomancy: uuuuh

12:48 AeroNotix: Use an LB and take nodes offline

12:48 oinksoft: AeroNotix: you might be wasting brain cycles comparing the merits of clojure and erlang and their tooling this way

12:48 technomancy: it matters a lot for our cluster

12:48 AeroNotix: technomancy: explain

12:48 oinksoft: AeroNotix: considering very few projects start with "do we choose clojure or erlang? hm?"

12:49 AeroNotix: oinksoft: but they easily could

12:49 technomancy: AeroNotix: a full cluster replacement takes like three hours, and a live upgrade takes three minutes

12:49 oinksoft: AeroNotix: they'd be wasting their time

12:49 AeroNotix: oinksoft: why?

12:49 technomancy: what makes that so?

12:49 oinksoft: AeroNotix: it should be an obvious decision, one made by other forces, not pure technical merit as judged by one person

12:49 AeroNotix: it's a big bikeshed

12:49 AeroNotix: oinksoft: do you think software is like that?

12:49 if so; can I come work for you?

12:49 oinksoft: AeroNotix: the biggest bikeshed, and the biggest secret in software development right now

12:50 AeroNotix: because that's definitely not software

12:50 technomancy: AeroNotix: 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:50 AeroNotix: technomancy: load from caches? (Easy for me to say since I don't see your full architecture, but still)

12:51 technomancy: not really an option here, yeah

12:51 oinksoft: AeroNotix: 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:51 AeroNotix: if that doesn't decide for you, your talent and the talent in the local market does

12:51 AeroNotix: oinksoft: erlang "safety"

12:51 Supervision trees. OK

12:51 oinksoft: AeroNotix: if not that, then your comfort supporting the JVM or doing erlang releases decides it for you

12:51 AeroNotix: erlang is slow because it's so safe ...

12:52 AeroNotix: I've rarely seen any technical decision made in such a way

12:52 oinksoft: i bet you've seen a lot of money wasted!

12:52 AeroNotix: I'd love for it to be so

12:52 oinksoft: i know i have

12:52 yotsov: I guess hotupgrade can be a nice feature... thinking of rabbitmq clusters for example

12:52 AeroNotix: For req/resp type deals? Meh

12:54 Anderkent: uh, I doubt you can actually hot upgrade rabbitmq. Or at least I wouldn't try it

12:54 (and I worked for 3 years at the company that wrote it)

12:54 oinksoft: relups are sort of a tarpit

12:54 Anderkent: (though I didn't work on it directly, so if you have just ignore me :P)

12:54 yotsov: Anderkent: last time we tried, 1 year ago or so, it didnt work

12:55 Anderkent: but I believe it is a planned feature, maybe it is doable now

12:55 Anderkent: possibly, I haven't kept in touch since we sold it to vmware

12:56 AeroNotix: 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:56 ugh, grammar

12:56 AeroNotix: Anderkent: for sure, it wasn't a dig at you

12:57 Was just trying to emphasise how shitty the tools are in erlang that a lowly coverage tool seems to shine.

12:57 Anderkent: I really want to make cloverage run arbitrary lein tasks rather than clojure.test. And isolate the dependencies. etc. etc

12:58 AeroNotix: Anderkent: that'd be crazy good

12:58 I want to start say `lein run` and then run my integration tests and then have it dump out a coverage report

12:58 this is what we do with Erlang at the moment

12:59 we 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:59 works very well.

13:00 technomancy: higher-order tasks; woot

13:01 gfredericks: I'm thinking test.check should not shrink characters

13:02 and that this might be a big deal for performance

13:03 TimMc: :-D

13:04 gfredericks: It should shrink them by glyph area.

13:04 e.g. dotted i becomes dotless i

13:05 gfredericks: patches welcome

13:05 Anderkent: ygh github doesnt change your notification email when you change your primary email. Wat.

13:06 AeroNotix: Anderkent: eventual consistency

13:06 it probably will. Eventually. Maybe.

13:07 Anderkent: nah, 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:08 AeroNotix: lolz

13:08 TimMc: Anderkent: "ygh"?

13:08 Anderkent: its like ugh but misspoken!

13:09 TimMc: Oh! I figured it was an abbreviation.

13:13 Anderkent: So, 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:14 upwardindex: What is the solution to “Possibly confusing dependencies found”? A ton of :exclusions ?

13:20 Anderkent: kinda depends on what kind of confusing dependency it is. Sometimes you can just ignore it

13:22 upwardindex: Anderkent: any rule of thumb on whether or not you can ignore it?

13:23 Anderkent: well, 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:24 upwardindex: For example midje 1.6.3 uses two different versions of joda-time, is that a problem?

13:25 technomancy: upwardindex: depends how divergent the versions are

13:42 aka: is there a convention for putting a * (single earmuff) on the right side of a var name?

13:42 it's actually a function

13:42 create-handler*

13:42 should that tell me something?

13:42 michaniskin1: aka: it's usually used when you're making a modified version of a function that already exsits

13:43 aka: it's like x and x' in math

13:43 aka: good to know

13:43 thanks :)

13:44 Anderkent: michaniskin1: aka: I usually see it when you have a macro and a function that implements the macro: (defmacro foobar [& body] (foobar* body))

13:47 michaniskin1: aka: 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:47 SegFaultAX: Yea. Usually the * version is some sort of base version, and the unstarred is a macro or helper function.

13:47 aka: ahhh I see

13:48 Anderkent: yeah, think of the * as 'peeking under the hood'

13:48 SegFaultAX: Or 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:52 technomancy: basically means "I can't think of a better name for this function"

14:00 jjl`: that's one of the most common problems i have in clojure. it's inviting abstraction, but naming those abstractions can be hard

14:00 aka: not really

14:00 SegFaultAX: jjl`: thingy* other-thingy etc. are perfectly understandable.

14:00 aka: you just add a * at the end

14:00 :D

14:01 SegFaultAX: AbstractThingyFactoryProviderBean

14:01 gfredericks: if you mix postfix ' and * you have an exponential naming space

14:02 rasmusto: s/exponential/exceptional

14:02 clgv: SegFaultAX: MethodValueDecoratorListenerPublisherPrinter

14:02 Anderkent: s/exceptional/ex'**''*'*

14:02 aka: we can be back to Java like madness in no time

14:03 TravisD: gfredericks: What do you mean by exponential naming space?

14:03 exponential in the length of the names?

14:03 gfredericks: no, exponential options by length of name

14:03 TravisD: ah, that's what I meant

14:04 The subset of names with a fixed length grows exponentially with the length

14:04 martinklepsch: Is clutch the way to go for clj + couchdb?

14:04 https://github.com/clojure-clutch/clutch

14:04 michaniskin1: i like using the "prime" naming, personally

14:04 gfredericks: ,(-> (rand-int 1000000) (Long/toString 2) (->> (replace {\0 \' \1 \*}) (apply str "thingy")) symbol)

14:04 clojurebot: thingy**''''''****'''''

14:05 michaniskin1: do-foo, do-foo', do-foo''

14:05 malyn: I 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:05 clgv: martinklepsch: if there is a clojurewerkz project for couchdb that's probably the better options in terms of documentation

14:05 gfredericks: ,(defn function-name [] (-> (rand-int 1000000) (Long/toString 2) (->> (replace {\0 \' \1 \*}) (apply str "thingy")) symbol))

14:05 clojurebot: #'sandbox/function-name

14:05 SegFaultAX: gfredericks: No stupid, I told you the function was called thingy**''''''*''**''*

14:05 gfredericks: (function-name)

14:05 malyn: The -> thing is nice there, but then I can't describe what is happening without interspersing comments between each line. (which maybe is okay?)

14:05 gfredericks: ,(function-name)

14:05 clojurebot: thingy**'**'**''''*'''**'

14:05 martinklepsch: clgv, cant find any

14:05 gfredericks: ,(function-name)

14:05 clojurebot: thingy**'*'''''''*'***'*''

14:05 llasram: do-foo, do-foo', do-foo′, do-foo″, do-foo‴

14:05 SegFaultAX: llasram: Haha, nice.

14:05 If only ` wasn't syntax quote

14:06 michaniskin1: llasram: that is actually pretty nice

14:06 gfredericks: malyn: I think comments are fine

14:06 clgv: martinklepsch: ah right they had one for mongodb not couchdb...

14:07 malyn: gfredericks: 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:07 martinklepsch: clgv, nevermind then, thanks!

14:08 gfredericks: ,(function-name)

14:08 clojurebot: thingy*''**''*'*''*''*''''

14:08 gfredericks: malyn: ^solves your naming problem

14:08 malyn: gfredericks: Yeah, thanks. :)

14:08 gfredericks: anytime

14:08 there are at least a few more where that came from

14:09 Anderkent: I'm partial to using non-breaking whitespace as the suffix myself

14:09 technomancy: heh

14:09 I actually filed a bug over that

14:09 rasmusto: ,(let [foo' 'inc] (eval `(~foo' 1)))

14:09 clojurebot: 2

14:09 TravisD: What's an example of a non-breaking white space?

14:09 Anderkent: I actually got bit by that because I copy-pasted stuff from github :P

14:10 and my editor wasn't showing the difference by default

14:10 rasmusto: i wish I knew what I was doing

14:10 clgv: rasmusto: incrementing 1, no`

14:10 Anderkent: TravisD: U+00A0

14:10 gfredericks: incrementers gonna increment

14:11 TravisD: Anderkent: Ah, I was hoping you'd just paste it :(

14:11 rasmusto: ~inc

14:11 clojurebot: I don't understand.

14:11 technomancy: http://dev.clojure.org/jira/browse/CLJ-419

14:11 TravisD: Here it is: " "

14:12 rasmusto: (= , ~)?

14:13 clgv: ,(long " ")

14:13 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number>

14:13 clgv: ,(long (first " "))

14:13 clojurebot: 32

14:13 TravisD: :P

14:13 I LIED

14:13 clgv: :P

14:14 Anderkent: ,(long (first " "))

14:15 clojurebot: 160

14:15 justin_smith: Anderkent: I like how my emacs gives that a bright blue underline

14:15 TravisD: ,(let [test 10, test 5] [test test])

14:15 clojurebot: [5 5]

14:16 TravisD: hmm

14:16 justin_smith: ,' _-_ _-_ _-_ _-_ _-_ _-_ _-_ _-_ 

14:16 clojurebot: �_-_�_-_�_-_�_-_�_-_�_-_�_-_�_-_�

14:16 clgv: that's hopefully not suprising to you ;)

14:16 Anderkent: ,(let [foo 1 foo  2] [foo foo ])

14:16 clojurebot: [1 2]

14:16 clgv: ah lol

14:16 TravisD: oh, I copied Anderkent's space character, but my IRC client must not like it

14:16 Anderkent: it's option-space if you're on a mac

14:16 makes it easy!

14:17 gfredericks: non-breaking spaces for the busy coder

14:17 TravisD: Ah, my client just does nothing when I type option-space :(

14:17 if I'm ever at risk of losing a job I'll be sure to litter some of those in the code :)

14:17 technomancy: throw in some page break characters too

14:17 those are great

14:18 Anderkent: I'd reverse the casualty there

14:18 justin_smith: &' _-'-_ _-'-_ _-'-_ _-'-_ _-'-_ _-'-_ _-'-_ _-'-_

14:18 lazybot: ⇒  _-'-_ _-'-_ _-'-_ _-'-_ _-'-_ _-'-_ _-'-_ _-'-_

14:18 sdegutis: I'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:18 TravisD: Anderkent: heh, yeah, that's probably the more likely scenario

14:18 technomancy: I should open a bug report on github for the fact that they don't render page breaks

14:18 it's pretty lame

14:19 Anderkent: sdegutis: you can test private functions though?

14:19 sdegutis: For example, this function is tested weirdly: https://github.com/sdegutis/billow/blob/master/test/billow/service_test.clj#L13-L22

14:19 justin_smith: &'  _-'-_  _-'-_  _-'-_  _-'-_  _-'-_  _-'-_  _-'-_  _-'-_  _-'-_

14:19 lazybot: ⇒  _-'-_

14:19 justin_smith: ahh, it appears page break is whitespace

14:19 sdegutis: Anderkent: 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:19 rasmusto: justin_smith: is this L-systems again?

14:19 justin_smith: hah, it should be

14:19 michaniskin1: how do you guys deal with git conflicts and paredit mode?

14:19 sdegutis: I think I want to create a fake service that actually produces real side-effects that mimic the real service..

14:19 michaniskin1: ^ in emacs btw

14:20 rasmusto: michaniskin1: evil-mode

14:20 sdegutis: Which sounds terrifying, but like it's The Right Thing To Do™.

14:20 justin_smith: michaniskin1: C-w always deletes

14:20 rasmusto: michaniskin1: yeah, x in evil-mode does something similar, use C-w

14:20 Anderkent: sdegutis: 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:21 michaniskin1: thanks, but i was wondering if there was something more structural, like somehow preserving the paredit stuff while resolving the conflicts

14:21 Anderkent: midje 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:21 sdegutis: Anderkent: That's still testing private implementation details which doesn't give the implementation any room to evolve.

14:21 justin_smith: michaniskin1: like some kind of magit / ediff / paredit hybrid?

14:22 lemonodor: i’ve decided that the midje syntax tricks around => cause more trouble than they’re worth.

14:22 sdegutis: We 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:22 michaniskin1: justin_smith: is that a thing?

14:22 sdegutis: lemonodor: how so?

14:22 justin_smith: michaniskin1: no, just thinking that this is what you are asking for

14:22 technomancy: lemonodor: agreed

14:22 justin_smith: though ediff-merge may give you an interactive resolution rather than leaving conflict marks in the file iirc

14:23 or magit-merge I mean, or something like that

14:23 Anderkent: well yeah I kinda dislike fact and =>, but like the mocking mechanism. Is there something else that makes top-down testing easy?

14:23 lemonodor: sdegutis: harder to read, can screw up editor indentation. maybe responsible for the somewhat non-specific line numbers i see in stack traces?

14:23 justin_smith: michaniskin1: https://coderwall.com/p/mcrwag

14:24 sdegutis: lemonodor: ah makes sense

14:24 lemonodor: https://github.com/marick/Midje/issues/235 btw

14:24 technomancy: lemonodor: many of us feel that way about most of midje fwiw =)

14:25 justin_smith: (inc technomancy)

14:25 lazybot: ⇒ 102

14:25 Anderkent: I also dislike how you can't reuse facts

14:25 sdegutis: Ah good old backwards-incompatibility, the bane of those who've coded while drunk.

14:25 technomancy: "This is clever and novel." <- not intended as a compliment

14:25 justin_smith: Anderkent: reminds me of that one Talking Heads song "facts never do what they're supposed to do"

14:26 sdegutis: Cleverness and novelty have bit me so often and so hard that I refuse to hear them out anymore.

14:26 Sometimes they manage to successfully sneak in, but that's another story.

14:28 Time to write some SFTP based code.

14:28 michaniskin1: justin_smith: awesome i think that's maybe what i'm looking for

14:28 lemonodor: i 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:30 Anderkent: yeah I once tried to read through that code, but gave up very quickly

14:32 jjttjj: anyone ever play with opencv from clojure? I'm dieing trying to get this to work https://gist.github.com/nblumoe/5468625

14:33 lemonodor: jjttjj: i haven’t but there’s https://github.com/gigasquid/clj-drone#opencv-face-recognition

14:33 jjttjj: I have all the opencv stuff setup correctly and can make calls to it's libs but .detectMultiScale is just no returning anything

14:34 lemonodor: awesome thanks

14:34 aaelony: jjttjj: This works pretty well: http://docs.opencv.org/2.4/doc/tutorials/introduction/clojure_dev_intro/clojure_dev_intro.html

14:34 jared314: does anyone know if test.check going to support clj pre-1.4 (1.2.1 or 1.3)?

14:35 jjttjj: aaelony: 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:36 clgv: jared314: 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:36 aaelony: jjttjj: makes sense, be interested to learn what you discover.

14:37 jared314: clgv: writing tests for another project that is trying to support 1.2.1 to 1.6

14:37 clgv: so, not my choice to upgrade

14:38 gfredericks: jared314: do you know what exactly is incompatible with the older versions?

14:48 amalloy: jared314: after a quick scan, i don't see anything in the source that requires any clojure version newer than 1.2

14:48 jared314: gfredericks: it gave me an error about ex-info in the generative ns

14:49 gfredericks: ah that'll do it

14:50 does somebody have a lib somewhere for monkey-patching ex-info stuff onto older clojures?

14:50 is that a terrible idea?

14:52 llasram: Is that a terrible idea??

14:52 lazybot: llasram: Uh, no. Why would you even ask?

14:52 llasram: gfredericks: See, it's fine. Just needed more question marks.

14:52 technomancy: gfredericks: slingshot kind of gets you ex-info ish stuff in 1.2

14:53 gfredericks: technomancy: they don't put it in clojure.core though amirite?

14:54 technomancy: heavens no

14:54 gfredericks: so this doesn't help with tricking a lib into running on older clojure

14:54 amalloy: gfredericks: 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:55 jared314: amalloy: is there already something to handle running a test suite in one version and the lib in another?

14:56 amalloy: like lien does the inject thing

14:56 amalloy: sure, you can change your org.clojure/clojure dependency in the :test profile, but...

14:56 gfredericks: "poorish is a clojure library for monkey-patching ex-info &c onto older clojures."

14:57 amalloy: gfredericks: my consulting rate is $10 per excellent library name

14:58 poorish is actually a fun little double-entendre there: you're trying to run on an impoverished runtime

14:59 gfredericks: heck you could add all sorts of addable features

14:59 and let the user pick which ones to patch

14:59 justin_smith: a-la-carte upgrade

14:59 rasmusto: ~a-la-carte

14:59 clojurebot: excusez-moi

15:00 gfredericks: rejected names: what-could-go-wrong

15:00 jared314: i-didn’t-say-it-was-a-good-idea

15:00 amalloy: gfredericks: i'd like to see you support parsing symbols like foo' but only in files chosen by project.clj

15:02 gfredericks: I bumped the clojur on codeq yesterday so it would parse :/

15:02 justin_smith: ,:/

15:02 clojurebot: :/

15:02 justin_smith: &:/

15:02 lazybot: java.lang.RuntimeException: Invalid token: :/

15:02 gfredericks: amalloy: 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:02 rasmusto: ,::/

15:02 clojurebot: #<RuntimeException java.lang.RuntimeException: Invalid token: ::/>

15:03 gfredericks: ,'&:/

15:03 clojurebot: #<RuntimeException java.lang.RuntimeException: Invalid token: &:/>

15:03 justin_smith: grumpy man refuses to wear a bow, but will wear a feather

15:03 amalloy: ,*clojure-version*

15:03 clojurebot: {:interim true, :major 1, :minor 6, :incremental 0, :qualifier "master"}

15:03 rasmusto: ,(prn ::/)

15:04 clojurebot: #<RuntimeException java.lang.RuntimeException: Invalid token: ::/>

15:04 amalloy: i wonder why :/ is valid now. i know they changed symbol parsing, but i didn't expect it to apply to keywords

15:04 gfredericks: doesn't the keyword parser delegate to the symbol parser?

15:04 although that still doesn't explain it

15:04 if that were the case you'd expect :/ to have always been valid

15:05 I retract all my theories and retreat in shame

15:05 rasmusto: and whats up with the namespace-qualified one not working?

15:05 ,:foo// ; ?

15:05 clojurebot: :foo//

15:05 rasmusto: ,::/ ; ?

15:05 clojurebot: #<RuntimeException java.lang.RuntimeException: Invalid token: ::/>

15:06 justin_smith: ,:sandbox//

15:06 clojurebot: :sandbox//

15:06 justin_smith: AHA

15:06 or not

15:06 rasmusto: *ns*

15:06 ,*ns*

15:06 clojurebot: #<Namespace sandbox>

15:07 gfredericks: they never sent an email on clojure-dev about 1.6.0 did they?

15:10 cbp: Is 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:10 gfredericks: definitely not safe to assume that

15:10 lots of tools just print .getMessage

15:10 llasram: cbp: I personally use the string for humans and the map for programs. Sometimes that means duplicating between them

15:11 cbp: hmph

15:11 ok thanks

15:11 gfredericks: would be cool to use strint to be able to interpolate values from the map into the message

15:11 e.g. (ex-info*'''* "You passed me {thing}" {:thing x})

15:12 amalloy: gfredericks: that'll be in clojure 1.9. why not include it in your backporting library?

15:12 gfredericks: incubating is just a generalization of backportation

15:12 or a special case of?

15:14 tgoossens: What is a clean way to get all values out of an indexable list at odd indices ?

15:15 justin_smith: ,(map second (partition 2 (range 10))) ; tgoossens

15:15 clojurebot: (1 3 5 7 9)

15:15 tgoossens: justin_smith, thanks

15:16 justin_smith: with partition-all you would get a nil at the end if there were an odd number of items in the list

15:16 tgoossens: hmm

15:17 justin_smith: so it depends on your problem whether you want that behavior or the partition behavior

15:17 tgoossens: it will do :)

15:17 (your solution )

15:17 justin_smith: ,(map second (partition-all 2 (range 9)))

15:17 clojurebot: (1 3 5 7 nil)

15:17 justin_smith: ,(map second (partition 2 (range 9)))

15:17 clojurebot: (1 3 5 7)

15:18 tgoossens: i see

15:18 thanks for pointing that out :)

15:18 justin_smith: np

15:18 tgoossens: wow it has been a long time I've been able to use such pleasant abstract functions

15:18 currently working with fortran :p

15:19 clojure is always a pleasure again

15:19 amalloy: justin_smith: uh, don't you just want (range 1 10 2)?

15:20 ,(range 1 10 2)

15:20 &(range 1 2 10)

15:20 lazybot: ⇒ (1)

15:20 amalloy: &(range 1 10 2)

15:20 lazybot: ⇒ (1 3 5 7 9)

15:20 amalloy: clojurebot: have i wronged you?

15:20 clojurebot: (1 3 5 7 9)

15:20 Titim gan éirí ort.

15:21 Averell: i would say i liked the partition performance more :)

15:23 gfredericks: ,*clojure-version*

15:23 clojurebot: {:interim true, :major 1, :minor 6, :incremental 0, :qualifier "master"}

15:23 justin_smith: amalloy: he wanted to get odd items of an arbitrary list

15:23 range was just the example

15:24 (though I would not be surprised to see a more elegant way to get the odd items of a list either)

15:24 noprompt: the new version of clojurescript.test displays the "Ran N tests containing M assertions..." message twice, does anyone else notice that?

15:28 justin_smith: ,:𝔤𝔯𝔞𝔳𝔦𝔱𝔞𝔰

15:28 clojurebot: :????????????????

15:28 justin_smith: &:𝔤𝔯𝔞𝔳𝔦𝔱𝔞𝔰

15:28 lazybot: ⇒ :𝔤𝔯𝔞𝔳𝔦𝔱𝔞𝔰

15:29 justin_smith: (inc lazybot)

15:29 lazybot: ⇒ 23

15:29 clojurebot: excusez-moi

15:31 Anderkent: ,:to the moon!

15:31 clojurebot: :to�the�moon!

15:31 gfredericks: ,(defn odds [l] (lazy-seq (when-let [[x & xs] (seq (next l))] (cons x (odds xs)))))

15:31 clojurebot: #'sandbox/odds

15:32 Anderkent: oh I'm so using multi word keywords

15:32 gfredericks: ,(odds [:a :b :c :d :e :f :g :h])

15:32 clojurebot: (:b :d :f :h)

15:33 nz: Hi, 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:34 Anderkent: nz: ModelControllerClient$Factory/create, I'd expect

15:34 ,Thread$UncaughtExceptionHandler

15:34 clojurebot: java.lang.Thread$UncaughtExceptionHandler

15:38 jared314: is there a good lib for creating test fakes for an entire namespace? fake functions etc.

15:40 nz: Anderkent: 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:41 Anderkent: jared314: kinda sounds like midjes provided?

15:41 gfredericks: nz: yeah afaik inner classes aren't even a concept on the jvm; just classes with dollar signs in the name

15:42 jared314: Anderkent: google-ing…

15:42 gfredericks: ,(defrecord Some$Class [])

15:42 clojurebot: sandbox.Some$Class

15:43 gfredericks: ,(fn % [])

15:43 clojurebot: #<sandbox$eval62$_PERCENT___63 sandbox$eval62$_PERCENT___63@1a87c8>

15:43 justin_smith: gfredericks: https://www.refheap.com/66757 yeah that's a little faster

15:44 Anderkent: ,sandbox.Some$Class

15:44 clojurebot: sandbox.Some$Class

15:44 Anderkent: hm. I guess inner classes are just syntax sugar in java

15:45 jared314: Anderkent: they are a compiler trick, like generics

15:50 seangrove: $seen petehunt

15:50 lazybot: petehunt was last seen quitting 30 minutes and 32 seconds ago.

15:51 jared314: $seen jared314

15:51 lazybot: jared314 was last seen talking on #clojure 29 milliseconds ago.

15:58 Anderkent: ooooh wait 1.6 fixes the hashing issue for collections of numbers?

15:58 turbofail: yarp

16:00 Anderkent: ,*clojure-version*

16:00 clojurebot: {:interim true, :major 1, :minor 6, :incremental 0, :qualifier "master"}

16:00 Anderkent: &*clojure-version*

16:00 lazybot: ⇒ {:major 1, :minor 4, :incremental 0, :qualifier nil}

16:02 Anderkent: &(= (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:02 lazybot: ⇒ true

16:02 Anderkent: ,(= (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:02 clojurebot: true

16:03 Anderkent: huh

16:03 comes up false in a 1.6 repl for me

16:03 hiredman: clojurebot was on an old snapshot of 1.6

16:03 that is what the :interim true means

16:03 Anderkent: ah.

16:04 hiredman: ,*clojure-version*

16:04 clojurebot: {:major 1, :minor 6, :incremental 0, :qualifier nil}

16:04 hiredman: on the release now

16:04 Anderkent: ,(= (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:04 clojurebot: false

16:04 Anderkent: good!

16:17 s0x: hey 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:17 obviously the real method will do more than just returning a simple number :p

16:18 um sry ... function ^^

16:18 gfredericks: there's one or two terrible ways to do it

16:18 amalloy: (inc gfredericks)

16:18 lazybot: ⇒ 46

16:18 gfredericks: I bet amalloy knows all of them

16:18 amalloy: s0x: avoidnig parens is not really a very important goal

16:19 gfredericks: ,(let [the-map {:fn #(+)}] (-> the-map :fn deliver))

16:19 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: core/deliver>

16:19 amalloy: the language is chock full of em

16:19 gfredericks: ,(let [the-map {:fn #(inc %)}] (-> the-map :fn (deliver 5)))

16:19 clojurebot: 6

16:19 llasram: I've found it useful on some occasions to have `funcall` available

16:19 asthasr: Let'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:20 what's the best way to do it?

16:20 rasmusto: asthasr: partition-by

16:20 asthasr: is partition-by going to be lazy, though?

16:20 rasmusto: yeah

16:20 llasram: It will fully realize each partition, but not the entire result

16:20 rasmusto: er, that

16:21 asthasr: ahh, so if there is a little chunk of unsorted lines later in the file, it'll be a separate partition

16:21 hiredman: ,(-> {:fn #(identity 42)} :fn (reduce nil))

16:21 llasram: Yes

16:21 clojurebot: 42

16:21 s0x: llasram: indeed ... we just wrote some method like that by ourself ... just wanna check if there is a nativ way of doing that

16:22 ,(-> {:fn #(identitiy 42)} :fn (apply nil)

16:22 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading>

16:22 s0x: ,(-> {:fn #(identitiy 42)} :fn (apply nil))

16:22 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: identitiy in this context, compiling:(NO_SOURCE_PATH:0:0)>

16:22 s0x: ,(-> {:fn #(identity 42)} :fn (apply nil))

16:22 clojurebot: 42

16:22 rasmusto: ~thrush

16:22 clojurebot: Pardon?

16:23 s0x: here we go ... that works either .. like gfredericks said ... terrible ways :D

16:23 hiredman: ,(-> {:fn #(identity 42)} :fn (.invoke))

16:23 clojurebot: 42

16:24 s0x: hiredman: well i guess the nicest way so far

16:24 gfredericks: also terrible

16:24 s0x: sure :p

16:25 amalloy: s0x: just don't put everything in a giant -> form. the nonsense with calling a function is hurting readability more than threading is helping

16:26 bars0: Hi all. How to upgrade clojure used by leiningen. I am on Windows 7 32 bits?

16:26 asthasr: Thanks rasmusto, llasram :)

16:26 gfredericks: hey that'd be a fun refactoring tool; somehow convert everything to threading macros

16:27 amalloy: bars0: just change the clojure dependency in your project.clj. you don't need lein itself to change its clojure version

16:27 hiredman: gfredericks: there was an emacs clojure thing that would do the transform both ways

16:27 amalloy: gfredericks: i believe that was like the main thing that clj-refactor did

16:27 bars0: amalloy: ok, thanks

16:27 amalloy: or whatever it was called. the emacs clojure thing

16:28 gfredericks: the lib that says "send help" in the readme

16:28 but I mean doing it to an extreme

16:29 much like that time I did a point-free factorial

16:29 s0x: amalloy: actually in our case it would have increased the readability, belief it or not.

16:29 thanks to everyone by providing suggestions

16:30 our own method "call" is still the best way to go :)

16:30 or at least the most readable

16:31 gfredericks: call it $

16:33 ,(defn $ [f & args] (apply f args))

16:33 clojurebot: #'sandbox/$

16:33 rasmusto: ,($ + 1 2 3)

16:33 clojurebot: 6

16:37 gfredericks: so if test.check wanted to be parameterizable during calls to `lein test`

16:37 e.g., for setting seeds or scaling the number of test runs

16:37 what would be the least terrible mechanism for that?

16:37 +5 points if it works with lein profiles

16:38 s0x: why calling it $ ?

16:38 is there a reason for that?

16:38 amalloy: s0x: that's what it's called in haskell, is the joke

16:39 f $ x = (f x)

16:44 aaelony: 13:41 *** ustunozg_ QUIT Remote host closed the connection

16:44 Pupnik: i found myself wishing they left the parens in when learning haskell

16:45 s0x: gfredericks, amalloy: fair enough ... i've mentioned that and we will use that one ... thanks alot

16:45 tuft: heh, let's make prefix haskell =)

16:47 amalloy: gfredericks: a new task lein quickcheck, which takes args and binds some dynamic variables that you look up during your tests?

16:48 seems kinda dumb but viable

16:48 Pupnik: easier enough, as I recall only the special character functions are infix tuft, just need to give them all normal names

16:48 amalloy: Pupnik: you don't even have to do that, just wrap em in parens

16:48 ($) f x = f $ x = f x

16:49 aw. i'm sad that `($)` doesn't put it back to being infix

16:49 technomancy: gfredericks: does test.check have a -main entry point, or do you have to use clojure.test/run-tests?

16:51 Pupnik: amalloy, you get an unfortunate paren explosion if you try nesting expressions like that though

16:51 amalloy: Pupnik: 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:52 technomancy: there's no -main

16:52 bob2: gfredericks, environ?

16:57 mr-foobar: what's the advantage of tag literals in edn over plain symbols ?

16:58 gfredericks: technomancy: it doesn't have a main; you can call tests from the repl, or use defspec which makes something like deftest

16:58 bob2: also it's a contrib library so we can't bring in random stuff

16:59 amalloy: ideally it should be compatible with running _all_ the clojure.test tests

17:04 gvickers: Anyone using the Om library? Where should I use om/transact!? Is it ok to use it in a callback on a button?

17:09 justin_smith: gvickers: 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:24 sdegutis: clojure.lang.LineNumberingPushbackReader (stdin) cannot be cast to java.io.InputStream

17:24 haaalp

17:26 amalloy: readers read characters; input streams are for bytes

17:27 sdegutis: aw

17:27 whodidthis: fnhouse seems pretty cool, hopefully its released on clojars soon

17:28 sdegutis: I'm trying to get clj-ssh to load me right into a live ssh session of the server of my choice.

17:28 I'm trying to use (ssh-shell) to do it.

17:29 justin_smith: sdegutis: maybe this could be implemented more concisely? http://www.java2s.com/Code/Java/File-Input-Output/ConvertReadertoInputStream.htm

17:30 sdegutis: I'm hesitant to do stuff I don't understand when it comes to networks.

17:30 Anderkent: sdegutis: ReaderInputSTream ?

17:31 oh my bad

17:31 amalloy: i don't think that exists, sdegutis

17:31 Anderkent: i thought it's actually a thing in java

17:31 amalloy: er, Anderkent

17:31 i wrote it once, many years ago, but it's a bad idea

17:31 Anderkent: it's in apache commons!

17:31 can't be a bad idea.

17:32 though browsing through the source, it doesnt handle stream preambles which sucks

17:32 amalloy: sdegutis: maybe https://github.com/ztellman/byte-streams ?

17:32 sdegutis: If Apache is known for writing a famous web server in C, why do they have so much Java stuff?

17:33 Anderkent: it's a software foundation

17:33 tuft: sdegutis: most of the stuff under their umbrella these days is java

17:34 sdegutis: amalloy: thanks looks great

17:35 ztellman strikes again, with a silent yet graceful "boom got em"

17:37 amalloy: clojurebot: ztellman is, inexplicably, silent yet graceful

17:37 clojurebot: excusez-moi

17:37 amalloy: clojurebot: ztellman |is|, inexplicably, silent yet graceful

17:37 clojurebot: c'est bon!

17:39 hiredman: ~ztellman

17:39 clojurebot: ztellman is , inexplicably, silent yet graceful

17:40 sdegutis: I guess I just don't understand what inexplicable means then

17:40 oh. ok yeah.

17:43 hiredman: clojurebot'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:44 sdegutis: hiredman: hey is clojurebot available to join, say, #clojure-social ?

17:46 maxalwings: /msg NickServ identify gakwaya

17:46 amalloy: sdegutis: you can have lazybot if you want him?

17:46 sdegutis: i saw nothing

17:46 amalloy: he's there

17:46 thanks

17:47 ~guards

17:47 clojurebot: SEIZE HIM!

17:47 maxalwings: Hellow!

17:48 I am new to clojure I want to use range to generate numbers like 4 8 16 32 64

17:48 Need ur help

17:48 joegallo: why range?

17:48 brehaut: sounds like a job for iterate

17:49 joegallo: inc brehaut

17:49 maxalwings: Oh! inc would work. Thanks

17:50 amalloy: &(take 10 (iterate #(* 2 %) 4))

17:50 lazybot: ⇒ (4 8 16 32 64 128 256 512 1024 2048)

17:50 TimMc: ...

17:50 maxalwings: Thank you guyz

17:50 TimMc: maxalwings: "inc brehaut" meant +1 to brehaut, not that brehaut should have said "inc" :-)

17:51 amalloy: &(for [power (range 10)] (Integer/parseInt (apply str "1" (repeat power "0")) 2))

17:51 lazybot: ⇒ (1 2 4 8 16 32 64 128 256 512)

17:51 joegallo: :)

17:51 amalloy: in case you're looking for a bad solution as well as a good one

17:51 joegallo: nice

17:51 TimMc: ha!

17:51 maxalwings: Ha!

17:52 Nice

17:54 For those of you who uses garden to do css I have rewritten and published normalize.css

17:54 check it out on clojars.org

18:03 sdegutis: max[tab]: looks handy th--

18:14 gozala: anyone can help me with clojurescript.test on node ?

18:15 sdegutis: maxalwings: looks handy thanks

18:19 Frozenlock: I would like to learn Component and try a little of Datomic. Is there, by any change, a tutorial using both? :-p

18:20 maxalwings: sdegutis glad you like it

18:25 amalloy: ~anyone

18:25 clojurebot: Just 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:39 tmciver: I 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:40 Bronsa: ,(vec 1)

18:40 clojurebot: #<RuntimeException java.lang.RuntimeException: Unable to convert: class java.lang.Long to Object[]>

18:41 noprompt: $seen guns

18:41 lazybot: guns was last seen joining on leiningen 1 hour and 35 minutes ago.

18:41 noprompt: guns: you around?

18:41 Frozenlock: tmciver: I'm not sure I understand... but (or (seq x) (vec x)) is a tiny bit shorter :p

18:41 guns: noprompt: lo

18:42 watching clojure/west videos with some dinner

18:42 cbp: tmciver: seq? will return false for vectors, also vec turns one seq into a vector, it doesn't turn a scalar into a vector

18:42 Bronsa: tmciver: you want vector there, not vec

18:42 michaniskin1: noprompt: hey dude

18:42 noprompt: guns: i'm not sure if you've run in to this but sometimes i run in to an issue with using tools.cli

18:42 tmciver: Frozenlock: (seq x) throws if x is a scalar.

18:42 noprompt: michaniskin1: yo, trying out boot right now :)

18:42 guns: noprompt: Great, I'd love to fix it for you

18:43 cbp: tmciver: I believe you want `sequential?`

18:43 tmciver: Bronsa: you're right.

18:43 noprompt: guns: 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:43 guns: i've tried lein deps :tree to no avail

18:44 guns: noprompt: that's strange; is this CLJS?

18:44 noprompt: And would you mind sharing a paste/gist so I can check it out?

18:45 noprompt: guns: no. and i've tried nuking all tools.cli from ~/.m2, etc. it works for some projects but not for others.

18:45 guns, michaniskin1: i'm trying this w/ boot fwiw

18:46 michaniskin1: noprompt: what does your build.boot look like?

18:47 noprompt: https://gist.github.com/noprompt/9820733

18:47 guns: Oh, boot creates Clojure scripts? Nice

18:48 noprompt: guns: 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:48 guns: I'm going to install boot now and give it a go

18:49 noprompt: guns: but this problem has happened before with regular lein projects. :-/

18:49 guns: That's very strange; the tools.cli artifact is very simple

18:49 noprompt: guns: 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:50 guns: i even completely emptied my profiles too.

18:50 guns: noprompt: Maybe leiningen has a hidden dep on an old tools.cli?

18:50 michaniskin1: noprompt: i'm investigating too

18:50 guns: that doesn't show up in :deps that is

18:51 technomancy: lein pulls in tools.cli 0.2.1 via reply

18:52 _2_yara17: hola

18:52 cbp: bonjour

18:52 guns: So maybe I should send a patch to reply? the new tools.cli is backwards compatible

18:53 technomancy: sure

18:53 noprompt: technomancy: ah, then that's probably the problem.

18:53 guns: https://github.com/trptcolin/reply/blob/master/project.clj

18:53 [org.clojure/tools.cli "0.3.1"]

18:53 technomancy: guns: actually ideally we could just exclude it entirely

18:54 lein does its own option parsing

18:55 but that might require rearranging things in a backwards-incompatible way

18:55 yeah, the ns that requires tools.cli is the same ns lein needs

18:55 even though the defns inside it are completely unrelated =(

18:55 huge namespaces: not always very cool

18:55 guns: lol

18:55 michaniskin1: noprompt: 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:56 technomancy: hm; it's not even actually big at all, only 100 loc

18:56 sdegutis: Some interesting conversations about vars: http://logs.lazybot.org/irc.freenode.net/%23clojure/2010-10-18.txt

18:57 michaniskin1: noprompt: actually i was mistaken, pomegranate doesn't pull in tools.cli, as far as i can see

18:57 guns: noprompt: Still, it's strange I've never seen this problem

18:58 noprompt: were either of you able to replicate it?

18:58 sdegutis: Also, very interesting discussion about how to compile Clojure files: http://clojure-log.n01se.net/date/2008-02-01.html

18:59 michaniskin1: noprompt: yes i can make it happen here too

19:01 noprompt: michaniskin1: cool. i was hoping that i wasn't going to end up on my own personal island of despair over here. :-)

19:01 michaniskin1: we're still super stoked to bring this into our workflow.

19:02 michaniskin1: something is bringing in tools.cli 0.2.1

19:03 noprompt: i'm tracking down what that could be, exactly

19:03 noprompt: right, i clone everything down to my machine and ran lein deps :tree everywhere to see if i could spot it. :-/

19:03 michaniskin1: noprompt: i just did this: https://gist.github.com/9821023

19:04 noprompt: then did `boot doit`

19:04 guns: gah finally figured out how to use boot

19:05 michaniskin1: noprompt: i'm going to test with the dev version of boot (the one with the segregated pomegranate), just to make sure

19:10 noprompt: if you do git pull from dev branch of boot you can use this: https://gist.github.com/9821131

19:11 noprompt: the problem was that tools.cli was somehow being pulled in via pomegranate, after all

19:11 noprompt: orly?

19:11 michaniskin1: noprompt: i'll be pushing a release of boot in the next day or two, but it's not quite ready yet

19:12 noprompt: michaniskin1: that's fine. we're just spiking on this atm. personally, i'm sold.

19:12 guns: noprompt: 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:13 So maybe that's why you have seen this in the past?

19:13 noprompt: guns: so is the culprit pomegranate?

19:13 michaniskin1: noprompt: awesome!

19:14 technomancy: guns: I can't reproduce that

19:14 guns: is it possible that's coming from your user profile

19:15 noprompt: technomancy: i can attempt to verify that.

19:15 guns: technomancy: I removed all the deps from that to see; but I will try again

19:15 noprompt: technomancy: we have a project where this was an issue, at the time i didn't think to check there.

19:15 guns: I suspected it was reply 0.3.0; the upcoming 0.3.1 will include tools.cli 0.3.1

19:16 The current reply has tools.cli 0.2.1

19:17 noprompt: https://gist.github.com/noprompt/9821268

19:19 guns: technomancy: yes you are correct

19:20 gozala: dnolen_: is there way to preserve (def env js/process.env) when using advanced compilation ?

19:21 guns: noprompt: 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:21 gozala: dnolen_: it seems to translate to rc=process.rc

19:22 guns: noprompt: and if this happens with an explicit dep then :exclusions must be used?

19:24 noprompt: guns: i mved my profiles.clj file out of ~/.lein and still get the problem

19:24 cbp: gozala: have you tried ^:export ?

19:24 guns: noprompt: in a straight leiningen project with an explicit tools.cli dep?

19:25 noprompt: guns: yeah, but let me try making a *brand new* project too and see if it's an issue.

19:26 gozala: i think you need to use externs.

19:26 gozala: cbp: yeah but I don’t think it helps with props

19:26 noprompt: any reference about externs ?

19:27 cbp: gozala: I think you need to do (def ^:export env (.-env js/process))

19:27 noprompt: gozala: there's this article http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html

19:27 amalloy: probably (aget js/process "env")

19:27 cbp: If I understand it process is an object and you're trying to get the env key?

19:27 noprompt: amalloy: yeah that works too

19:28 amalloy: but it's a bit annoying.

19:28 amalloy: i mean, he can decorate his own def with ^:export, but that won't impact how js/process get munged

19:28 and he probably doesn't even need his own exported

19:28 noprompt: amalloy: right..

19:29 s/\.$//

19:29 gozala: cbp: amalloy no prompt thanks for suggestions

19:29 I think aget is probably best way to go about it for my use case

19:30 amalloy: noprompt: 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:30 noprompt: gozala: 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:30 amalloy: that's bummer. ;_;

19:32 gozala: noprompt: won’t that override process.env though ?

19:32 noprompt: guns: it works fine with a brand new project.

19:32 gozala: noprompt: I’ll take a look at the post

19:32 noprompt: because amalloy your suggestion surprisingly did not work

19:33 noprompt: gozala: 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:33 gozala: noprompt: amalloy actually never mind it did work I just had a separate usage somewhere

19:34 noprompt: how is it better that aget though ?

19:35 noprompt: gozala: 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:35 guns: noprompt: 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:36 noprompt: guns: 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:36 guns: heh, but hey the boot problem looks like it's pretty much solved! ;-)

19:37 gozala: personally i prefer (.-env js/process) and using externs to (aget js/process "env"). it's totally your call though.

19:38 gozala: fwiw

19:38 gozala: there's also https://github.com/dcodeIO/node.js-closure-compiler-externs

19:39 michaniskin1: i'll keep an eye on boot for the next release.

19:39 gozala: noprompt: I did not realised every import will be mingled as well :(

19:41 noprompt: gozala: 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:42 gozala: 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:42 gozala: noprompt: well I’m hooking into libuv bindings directly

19:42 :(

19:42 which is process.binding(“os”) for example

19:43 noprompt: gozala: but the motivation for using advanced compilation is also not as compelling as it is on the client.

19:44 gozala: noprompt: is this how you specify what’s the result of function ?

19:44 noprompt: gozala: well unless you're planning to package it up and put it on npm or something. then you've got some work todo. ;-)

19:44 gozala: https://github.com/dcodeIO/node.js-closure-compiler-externs/blob/master/events.js#L25-L29

19:46 guns: technomancy: I love your idea about clicky switches for keys and linear ones for modifiers. So obvious once you hear it!

19:46 technomancy: guns: oh yeah, are you going to try it?

19:46 arnaudsj: HI, 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:47 noprompt: gozala: i'm not completely sure. try it out maybe? i haven't done much cljs targeting node.

19:47 amalloy: arnaudsj: 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:47 guns: technomancy: it's on the shopping list; I suppose no one sells them that way?

19:48 gozala: noprompt: thanks

19:48 technomancy: guns: I don't think so, heh

19:49 arnaudsj: amalloy: ok, so how do you deal with automatically installing the jar file into your leinengen project?

19:49 technomancy: closest I've heard of is the realforce boards that use different springs for the weaker fingers

19:49 guns: going for an ergodox, or something else?

19:49 amalloy: you refer to it via maven

19:49 arnaudsj: I mean as a dependency so that it is automatically installed in your local .m2?

19:49 guns: technomancy: you know, my gf was just pitching that we start a hardware company; it looks to me you're halfway thre

19:49 arnaudsj: amalloy: can you point me to an example?

19:49 technomancy: guns: it is tempting =)

19:49 guns: technomancy: I was just going to buy a WASD and swap out the parts

19:50 technomancy: cool

19:50 Averell: why is that supposed to be good, having a mix of switches?

19:50 noprompt: arnaudsj: just add it as a dependency to you project.clj [the/dep "X.X.X

19:51 technomancy: Averell: 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:51 so you always bottom out anyway.

19:51 noprompt: arnaudsj: then (:import the.dep.TheClass)

19:51 technomancy: Averell: it helps you instantly notice if you've hit the wrong key

19:51 well, the wrong type of key anyway

19:52 arnaudsj: noprompt: where do I place the jar for that dependency though? (it wont' be able to find it in the maven public repos)

19:53 amalloy: arnaudsj: write a letter to your congressman. jars which aren't in maven should be illegal

19:53 noprompt: lol

19:53 arnaudsj: amalloy, noprompt: yes that's why I wanted to wrap it up into a nice clojure lib to deploy on Clojars.org :)

19:54 amalloy: that doesn't solve the problem

19:54 hiredman: clojars is a maven repo

19:54 technomancy: guns: 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&qid=1395964285

19:54 amalloy: you'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:54 technomancy: oh, he left

19:54 hiredman: it is, in fact, language agnostic as are maven repos

19:55 Averell: i have that filco with wasd keycaps. i'll probably try this mixing.

19:55 technomancy: Averell: my boards have the modifiers on the thumbs, which is a bit different

19:56 arnaudsj: ok, 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:56 technomancy: Averell: I was hitting the wrong keys more when I was getting used to them, and I feel like the different switches helped

19:56 Averell: is that custom built?

19:56 technomancy: Averell: yeah, http://technomancy.us/173 and http://technomancy.us/172

19:57 amalloy: arnaudsj: 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:58 technomancy: amalloy: scp pom.xml myjar.jar clojars@clojars.org:

19:59 oh, you can use lein deploy too I guess

20:02 rasmusto: technomancy: oo, mx blacks for ctrl/shift/alt/alt-gr etc?

20:02 (just glanced at the logs)

20:03 technomancy: rasmusto: 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:04 rasmusto: that's great, what about spacebar?

20:04 technomancy: rasmusto: on my new board I have greens for space and backspace

20:04 both under the thumbs

20:05 https://github.com/technomancy/atreus#switches tl;dr

20:05 rasmusto: technomancy: ah, I think I've seen your keyboard posted at one point, is it the split grid type thing?

20:06 ah, thanks.

20:06 Foxboron: when i joined this chan one and a half year ago, there where 435 people. Now its 710. Thats awesome.

20:06 just realized it.

20:07 technomancy: the mailing list growth seems to be easing off though

20:08 took over 5 years to get from 900 to 9000

20:09 arrdem: which list?

20:09 technomancy: arrdem: just the main clojure one

20:11 gfredericks: time to IPO before it's to late

20:11 too*

20:13 rasmusto: avrdude is such a weird acronym, great tool though

20:15 guns: technomancy: 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:16 technomancy: guns: need an onboard microcontroller =D

20:16 guns: technomancy: and a Forth interpreter apparently!

20:16 * gfredericks types "xmodmap .Xmodmap" like ten times a week

20:16 technomancy: well *eventually* sure

20:36 TimMc: gfredericks: Except when you type "mwlpwqt /Mwlpwpt"

20:44 stcredzero: Would I be able to get away with signalling a semaphore in a function sent to an Agent?

20:46 amalloy: stcredzero: not enough context for a correct answer

20:46 you can definitely interact with semaphores in an agent action, but whether this leads to a correct program depends on the problem

20:47 guns: Isn't the implicit question whether or not agent fns are retried?

20:47 stcredzero: amalloy: 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:48 amalloy: guns: no? that's one thing that could go wrong, but hardly the only one

20:48 stcredzero: amalloy: yes, but there's a way to get notification from the system once an agent action succeeds, yes?

20:48 amalloy: eg, perhaps the agent is blocking on some other lock, so that you build a deadlock while it waits for itself

20:49 stcredzero: amalloy: I want to know when a specific set of agent actions has finished

20:49 amalloy: stcredzero: i mean, there's ##(doc await)

20:49 lazybot: ⇒ "([& 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:50 amalloy: but 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:50 stcredzero: amalloy: ah ha! Good news. I don't have to build it.

20:50 amalloy: well, what I want isn't quite like an Agent.

20:50 hyPiRion: Generally you'd use await-for, because await is dangerous wrt. blocking

20:51 amalloy: hyPiRion: he strikes me as someone who lives dangerously

20:52 stcredzero: amalloy: 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:52 amalloy: that's a fair characterization

20:53 stcredzero: amalloy: 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:54 michaniskin: AeroNotix: ping

20:54 AeroNotix: michaniskin: pizzong

20:55 sup

20:55 michaniskin: AeroNotix: i added you with admin access to the tailrecursion/ring-proxy repo

20:55 you should be able to add collaborators if you wish, or whatever you like

20:55 AeroNotix: michaniskin: oh ok, thanks a lot! We're using it on something at work

20:55 :)

20:56 I hope you didn't take offense to my robocop thing

20:56 hyPiRion: stcredzero: 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:56 guns: This is a common thing in every channel

20:57 AeroNotix: michaniskin: It's 2:00am here, though. So I must hit the hay

20:57 will catch up with you another time

20:57 stcredzero: hyPiRion: 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:58 guns: stcredzero: lots of people don't understand threads. no reason to be touchy

20:58 I've been misunderstood on plenty of channels; not a big deal

20:59 michaniskin: AeroNotix: see ya

20:59 stcredzero: guns: I just don't like it when people tell me something is X when it's Y.

21:00 guns: stcredzero: meh; it's not a big deal

21:26 gfredericks: TimMc: the dvorak stuff seems to be setup at a lower level. xmodmap is just for caps->ctrl

21:30 TimMc: Ah, OK.

21:35 cneira: how do I use a custom datatype from a java library ?

21:36 brehaut: you import it, and the construct it

21:36 ,(import java.util.Date)

21:36 clojurebot: java.util.Date

21:36 brehaut: (Date. 2014 1 1)

21:36 ,(Date. 2014 1 1)

21:36 clojurebot: #inst "3914-02-01T00:00:00.000-00:00"

21:38 hyPiRion: it's from 1900

21:38 ,(Date. 114 27 03)

21:38 clojurebot: #inst "2016-04-03T00:00:00.000-00:00"

21:39 hyPiRion: ,(Date. 114 3 27)

21:39 clojurebot: #inst "2014-04-27T00:00:00.000-00:00"

21:39 brehaut: oh. lol

21:40 tmciver: The year is from 1900, the month is from zero and the day is from 1. good grief.

21:40 brehaut: forgot about that. not that its really relevant

21:40 hyPiRion: and months are apparently zero-indexed

21:40 brehaut: i think someone was high when they wrote it

21:41 amalloy: well, that was in like the sixties, brehaut, so probably

21:41 (ie, Date is derived from very old C functions)

21:42 brehaut: if thats the case, its surprising we can accurate determine when it was written at all

21:45 in 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:50 amalloy: well, yes. i can only explain, not justify

21:53 shep-home: Is there a nice way to destructure from the end of seq?

21:53 amalloy: shep-home: not really

21:54 shep-home: I'm reversing it and taking the first few items for now

21:54 amalloy: and like, it can't be performant, so it's not unreasonable that the language discourages you from doing it. clojure often does that

21:55 shep-home: alright, it's not a big thing in this case

21:55 thanks!

22:03 TimMc: Hmm, It could be nice to destructure from the end of a vector.

22:04 I suppose that's what rseq is for.

22:04 brehaut: rseq!

22:04 TimMc: sniped!

22:04 brehaut: i blame international lag

22:05 amalloy: haha quick, someone tell rich we've found out that rseq is only for destructuring

22:08 TimMc: Huh, I didn't get a ping response from brehaut's client. Maybe I screwed up the command.

22:09 brehaut: or my crappy client doesnt work properly?

22:09 TimMc: im getting ~1.0±0.1 to you

22:09 also nan

22:10 TimMc: !

22:10 brehaut: 2.0

22:12 i guess those are seconds

22:27 TimMc: That's plenty of time for sniping.

22:40 chare: who here is addicted to diablo 3 reaper of souls

22:44 arrdem: (inc amalloy) ;; ring buffer is osum

22:44 lazybot: ⇒ 92

23:20 amalloy: arrdem: glad you enjoy

23:20 arrdem: amalloy: you should totally patch it to use 1.6 now :P

23:20 amalloy: hey, maybe i could get into quickcheck by writing some test.check properties for ring-buffer

23:21 arrdem: does it need to change in some way for 1.6? surely you can just use 1.6 and ring-buffer together

23:21 arrdem: amalloy: I don't think so, I'm just poking you

23:21 amalloy: seriously tho, thanks. ring-buffer made logging bounded histories a breze.

23:22 amalloy: cool. i don't think i ever actually used ring-buffer, i just made it for fun

23:22 arrdem: I just used it in a branch predictor implementation...

23:22 blag post incomming

23:25 MadFunk: chare: is it that good?

23:25 chare: MadFunk you have never played diablo 3?

23:25 MadFunk: I have, that's why I'm asking=p

23:27 arrdem: MadFunk: FYI chare is the routinely visiting troll we still haven't banned for some reason

23:27 MadFunk: chatting with him is... frowned on.

23:27 chare: i'm not a troll

23:27 MadFunk: lol, arrdem, noted.

23:27 chare: 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:28 totally on-channel-topic here, I know.

23:33 I 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:33 just want to know how it could be solved.

23:38 I 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:50 amalloy: MadFunk: 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

Logging service provided by n01se.net