#clojure logs

2013-08-19

00:06cjfriszWhat's the story for repeatable random number generation in ClojureScript, i.e. using a seed?
00:07cjfriszI know about data.generators, but at first glance it doesn't seem like a drop-in solution for cljs
00:08cjfrisz(and by "know about," I mean that I googled it a few minutes ago, which itself was a few minutes after I first decided I would like repeatable randomness in my cljs program)
00:09bbloomcjfrisz: clojure.core (and cljs.core) don't have seedable random number generators :-( you need to use platform interop
00:10bbloomso javascript interop or whatever you can find in goog
00:10clojurebotExcuse me?
00:10bbloomamalloy: brehaut: i just stuck with clojure.test b/c it's such a small difference it's not worth bothering for only a handful of tests
00:25callenshouldn't there be a macro for this? https://groups.google.com/forum/#!topic/clojure/GHLL_OgIN9E
00:27cjfriszbbloom: that was the answer I found googling, but all the answers were 8+ months old
00:27cjfriszI'm just naive enough to have hoped I would find the state of things improved in that time ;-)
00:27bbloomcjfrisz: as somebody who has written *deterministic* games before, i just assume all language's have a shitty stdlib for randomness :-)
00:30cjfriszbbloom: Careful, that kind of "you want it done right, you write it yourself" attitude will turn us into Scheme in no time flat
00:30cjfriszI can count the number of external libraries I've used in Scheme on my hands; maybe even just one of them
00:31bbloomheh
00:31bbloomi'm not saying that there can't be a lib, i'm saying that rand-int doesn't really do the trick :-)
00:34callenhrm. does anybody here know Ritz?
00:37cjfriszbbloom: thanks for the help. I'm off for now
02:19`cbp`callen: hi, I didnt do more work on it today after this morning but i'll keep working over the week hopefully have a first version by next weekend huh :-) https://github.com/cesarbp/pomegranate/blob/sync/src/main/clojure/sync/sync.clj
02:23callen`cbp: fun. I'm excited. :)
02:46muhoough, how again does one cast a string to a java Reader?
02:46muhoo(i got a thing that wants a Reader, all i gots is a string)
02:48TEttingerhttp://clojuredocs.org/clojure_core/clojure.java.io/reader
02:48TEttingerit can resolve a string that's a filename or URI
02:49muhoowell no, i have a string with content, it's not a file.
02:49TEttingerI think there's a java stringreader thing
02:49muhooi.e. i have "foo\nbar\nbaz", i am passing that to a java method that requires a Reader, doesn't take a String
02:49TEttingerhttp://docs.oracle.com/javase/6/docs/api/java/io/StringReader.html
02:50muhooi'll look around in java then. was kind of hoping someone had already wrapped in something clojure
02:50sevviemuhoo: it'lll take a string. It will try to see if it's a file or URI first, but failing that it'll just coerce the string.
02:51TEttingersevvie, that should be in the docs, it doesn't say there's an else case
02:51TEttingerthanks
02:55sevvieYou know, I'm mistaken. I coulda sworn it coerced bare strings, but it'll throw a FileNotFoundException. Sorry.
02:56muhoosimple enough, thanks. java.io.StringReader works
02:59dbeHow do I create this vector? [(0 0) (0 1) (0 2) ... (0 n) (1 0) (1 1) ... (n n)]?
02:59fredyrdbe: for comprehension should do it
03:01nopromptdbe: (for [x (range n) y (range m)] [x y])
03:01dbefredyr, noprompt , Ah, yes, thank you.
03:02nopromptfor some reason this grindcore i'm listening to is drawing me to use the -> macro.
03:02nopromptthe skewer first macor.
03:03fredyr:)
03:03nopromptthat's what i'm calling it from now on. skewer first.
03:04sevvienoprompt: so ->> is "skewer last"?
03:04noprompthaha. no. that's the impale macro.
03:05sevvieSkewer and impale. I like it.
03:05noprompt:)
03:09noprompt(def decapitate rest)
03:15nopromptwhat would be a good way to "diff" two maps?
03:17ryankaskwhy wouldn't lein install put the created jar and other artifacts in ~/.m2/repository?
03:18fredyrnoprompt: otoh, pluck keys into a set and use diff?
03:19nopromptfredyr: yeah maybe something like that.
03:19fredyrnoprompt: oh you can use diff on maps directly it seems
03:19fredyrhttp://clojuredocs.org/clojure_core/clojure.data/diff
03:20nopromptfredyr: well, i'll be. lemme check that out.
03:26nopromptthat's pretty neat. i'll have to remember that. not exactly what i was thinking about, but still neat.
03:45muhoo(vlad->>
03:49nopromptmuhoo: :)
03:55nopromptthat feeling when you're no longer sure if your "new and improved" solution is better.
03:56xsynso just "new"
03:57nopromptxsyn: haha, yeah.
03:58nopromptit's actually definitely better. i'm unsure if i've arrived at the simplest solution.
03:58nopromptthe problem is i have no idea what the hell i'm doing. which is normally the case.
04:01nopromptsome of the code i wrote last night probably should have had some comments.
04:04sevvieThat feeling when you look at code you should have commented.
04:10cmdrdatsThat feeling when you have no idea how this bug is happening, until you realize you're looking at the wrong code.
04:28kristian-so, what is the preferred validation lib in Clojure?
04:32nopromptkristian-: a map with keys to validate and function values. :)
04:32nopromptj/k
04:33nopromptkristian-: which ones are you looking at?
04:34kristian-bouncer, metis, validateur
04:42muhoovalip
04:44nopromptkristian-: hmm. i dunno. at first blush they all seem like the could do the job well. i guess it depends on what you're looking for.
04:44nopromptkristian-: maybe try them out independently. :/
04:45ro_stkristian-: depends what you want to validate, as well
04:48nopromptjuxt is a damn handy function.
04:49Raynesnoprompt: As friends with a man who is confirmed as nuts for juxt, I can confirm this.
04:51nopromptRaynes: nuts for juxt.
04:51Raynesnoprompt: I famously said this at my Clojure Conj talk. Apparently it was the greatest thing ever said in a southern accent in the history of mankind.
04:53nopromptRaynes: seriously. it's like apple: always finding new ways to "delight" me.
04:54nopromptRaynes: last week i found it useful for simplifying the rendering of this query dsl i've been working on.
04:55noprompttoday i found it super helpful in conjunction with group-by.
04:55nopromptjuxt is an all around good guy.
04:55noprompti'm "nuts for juxt"
04:55RaynesBuy him a beer next time he's in town.
04:55noprompti'll buy him some nuts to enjoy with his beer.
04:55nopromptbeer nuts.
04:55nopromptbeer nuts for juxt.
04:56RaynesYou've taken it too far.
04:56noprompti know. i've been hacking on frak all day.
04:56RaynesOh yeah? Well I'm writing unit tests for Elixir.
04:57nopromptRaynes: yeah? i noticed you were apart of the "crew".
04:57ucbRaynes: elixir? neat!
04:58Raynesnoprompt: José and I are like this.
04:58RaynesUnfortunately I can't make gestures over the internet.
05:00nopromptRaynes: frak now delights even more (frak/pattern ["bone" "bones" "boner"]) => #"bone[sr]?"
05:01RaynesWhat is frak?
05:01RaynesOh.
05:01RaynesIt generates regex?
05:01nopromptThis is a neat addition (frak/pattern ["skill" "skull"]) => #"sk[iu]ll"
05:01ucbnoprompt: have you considered generating xpath/css selectors with frak?
05:02nopromptucb: no but that's an interesting idea. can you elaborate?
05:02nopromptucb: i just spent all day working on a new trie structure and renderer.
05:02ucbnoprompt: well, have you ever toyed with open.dapper.net?
05:02nopromptucb: negative. please make my life easier.
05:02ucbnoprompt: the use case is simple: point and click at things on webpages and build an automatic extractor that you can run periodically
05:03ucbnoprompt: well, just that, automated content extraction from the web or whatever
05:03ucbnoprompt: it's an active area of research too :)
05:03ucbnoprompt: many years ago dapper was a great stepping stone in one of my projects, and I wish I could've replaced it with a lib and not a service
05:03ucbnoprompt: consider writing a price comparison search engine, and how you'd extract prices and item details from amazon, say
05:04ucb(without partnering with them, etc.)
05:05supersymsay guys, I want to use a profile I defined in ~/.lein with a project.. documentation is vague, mostly showing how to run higher order tasks with other profiles
05:05nopromptucb: sounds pretty neat. working on frak has made me far more interested in the text space.
05:05ucbnoprompt: it's a really interesting space to work in :)
05:06supersymso I tried adding :profiles {:overkill {}} and :profiles {:default [:base :system :user :provided :dev :overkill]}
05:06nopromptucb: someone sent me a link last week to something called a finite state reducer. seemed really interesting but i couldn't read the paper. :(
05:06ucbin any case, frak looks /really/ nice and I'm actively looking for an excuse to use it beyond the "let's try this new cool thing"
05:06ucbnoprompt: oh :/
05:06nopromptucb: well that's the thing that surprised me about the interest it recieved.
05:07nopromptucb: like, i honestly can't think of many places where it'd be somethind i'd even reach for.
05:07ucbnoprompt: nobody likes writing regexps
05:07nopromptucb: yeah, but it's not like frak will help much with that. you *have* to know the inputs for frak to be useful.
05:08ucbwell, you can have other people providing the inputs
05:08nopromptucb: plus you won't get a huge benefit from it unless you're working with huge patterns.
05:08ucbi.e. build a service to extract things from things :)
05:08nopromptucb: now that is a good point.
05:08ucband html seems to be the data format from which people really want to extract things
05:08nopromptucb: i guess it could also be useful for something like a keyword regex.
05:08ucbhence my suggestion to generate xpath/css selectors
05:09ucbwell, you could use frak to add fuzzy matching to a search engine
05:09noprompti never understood what was so offputting about regex to programmers.
05:09nopromptregex is so cool.
05:09ucbnot just fuzzy matching mind you
05:09ucbthey're cumbersome
05:10ucband the language itself is, well, cryptic at best
05:10ucb"perl"
05:11noprompti guess i can see that.
05:12ro_stregex makes programming much easier, that's for sure. i mean working with code text
05:12ucbindeed, but crafting regexes is an acquired skill
05:12nopromptbut you can definitely shoot yourself in the foot with them.
05:13ucbwhich many people don't care to invest in
05:13ro_stit's one of the things that makes sublimetext so good. the search fast-feedback + regex
05:13ucbyou mean emacs, right? </troll>
05:13supersymthe last thing I mastered before starting clojure was regex... extremely useful skill to add to my set :)
05:13ro_sti reckon you're golden once you get to understanding negative lookaheads
05:13hyPiRionyeah, I was about to point out that emacs got that as well.
05:13supersymro_st: the documentation on it is rather poor though
05:13nopromptro_st: yeah s/sublim\(e\)text/\1macs/
05:14supersymonce you figure out its perl/boost...
05:14ro_stucb: probably. i haven't yet spent the requisite time configuring emacs. the last time i did some emacs config, i woke up in a pool of my own drool with a 3 day beard
05:15ucbro_st: you were to close to enlightenment! :)
05:15ro_stemacs uses a different regex dialect than what i'm used to, as well
05:15noprompti try to avoid most of the look around stuff if at all possible. the performance can be really nasty.
05:15ro_sti'm used to the one JS/C#/Java uses
05:15nopromptbut sometimes it's just what you need.
05:15ro_stnot sure what emacs uses, but it doesn't know all the things i'm used to
05:16ro_stnoprompt: yup :-)
05:16ucbheh
05:16ro_sti use regex mostly for code editing, not really in actual production runtime execution
05:16ro_stso perf isn't an issue
05:17nopromptfun fact: j.regex.Pattern char sets (ie [abc]) are backed by bit fields which perform much better than (a|b|c).
05:17ro_stthat's handy!
05:18ro_stthe nice thing about regex in a text editor is how easily you can blow a non-developer's mind with it
05:18supersymclient-side form validation... just that would be JS, would this (frak) be useful or
05:18nopromptro_st: yeah, huh? the guy that maintains vim-clojure-static showed me all kinds of neat tricks and new things about j.regex.Pattern.
05:18supersymro_st: subl2 multiline select is also really sweet to show people ;)
05:19ro_stwe've been teaching a couple writers to use html/css and i showed them a couple basics of regex to make their lives easier. amazing how quickly you become accustomed to how cool this stuff is
05:19nopromptemacs + evil-mode ftw
05:20Anderkentnoprompt: I was thinking of switching to that (from vim), how hard is it? Or were you evil from the start :P
05:20nopromptgot erc in one split + nrepl and clojure code in some others.
05:20Anderkentelisp is just so much nicer than vimscript
05:20nopromptAnderkent: it took me a second because i also had to learn how to use some parts of the editor, but it kicks ass once you get used to it.
05:21ucbAnderkent: you actually like elisp? :)
05:21nopromptAnderkent: evil-mode is pretty faithful to the vim style.
05:21nopromptAnderkent: it's definitely nicer than viml. :P
05:21nopromptAnderkent: you can get a lot of mileage out of evil-mode if you pair it with something like key-chord-mode
05:22Anderkentucb: it's more that I hate vimscript
05:22Anderkent:P
05:22ucbheh
05:22ucbfair enough
05:22nopromptAnderkent: i still use vim if i'm shelled in to a server or something.
05:23Anderkentok, I'll put another +1 on my 'people who told me to use emacs' list
05:23nopromptAnderkent: if you're a vim user and you're curious, i'd say it's worth the time investment.
05:24nopromptit took me about a month or so to get it set up to a point where i was pretty happy.
05:25Anderkentcool, thanks
05:27nopromptucb: the thing about regex i think that scares people is the terseness of the syntax. some people get freaked out when they see a cluster of crazy line noise.
05:27ro_stAnderkent: https://gist.github.com/robert-stuttaford/6255383
05:27ucbnoprompt: I have to agree there. But there's no way around that either I'd say.
05:28ucbnoprompt: well, other than "learn the regexp language"
05:28nopromptucb: it's funny cause the same people are not intimidated by 120+ character lines of code.
05:29ucbheh
05:29ucbinterestingly enough, the people least intimidated by regexes (in my experience) is perl programmers
05:29noprompti get a little "uneasy" when i see a huge line of ruby or python.
05:30ro_stucb: isn't perl regexes with variables?
05:30ucbro_st: hehehe
05:30nopromptnice!
05:30ucbnoprompt: I get uneasy with Ruby, full stop. Python I've learnt to tolerate it.
05:30nopromptucb: some guy on HN went up to bat for me regarding frak. apparently the perl community have been using similar techniques to optimize their expressions.
05:31ucbnoprompt: well, the perl community, I'd say, relies heavily on regexes, right?
05:32ucbnoprompt: it's no surprise they'd have a huge arsenal of techniques to deal with these
05:32nopromptto my knowledge this is what i've heard.
05:32Anderkentro_st: thanks. Starred, will come back to it when I try to switch - probably somewhere in Sep :P
05:33nopromptmaybe i'm a perl programmer. roflmao lol jk.
05:33ro_stAnderkent: +1. print and use a pen to scratch them out as you internalise them: http://www.emacswiki.org/emacs/PareditCheatsheet
05:34Anderkentoh, I use paredit in vim already - though of course the bindings I'd have to learn again
05:34nopromptAnderkent: you could steal my bindings which i ripped off from the vim ones.
05:35nopromptAnderkent: https://github.com/noprompt/matilde/blob/master/emacs.d/init.el#L155-L169
05:35Anderkenthm I see that vim ones are slightly different - the same binding is used to move both opening and closing brace in a given direction, depending on what your cursor is on
05:45ryankaskDoes anyone know why "lein install" would only create the jar and write the pom.xml but *not* put it in ~/.m2/repository?
05:47Anderkentryankask: I guess if aether fails to install... File permissions, maybe? But I think it unlikely - are you sure it's not there? :P
05:47Anderkentor maybe if the pom is invalid
05:47Anderkentdid you get any error output?
05:48Anderkentryankask: ah, also you might have :local-repo set, in which case that's where the jar will be put
05:49ryankaskAnderkent: It's quite strange. I am working with java.jdbc and last night on my laptop lein install worked. today at work it isn't
05:50ryankaskgit clone ...repo...; lein install . i don't see :local-repo anywhere
05:51AnderkentDon't think the . after install is necessary :P
05:51Anderkentbut other than that, sorry, no idea
05:55ryankask(meant as a period). anyway, it's there now. not sure what happened but thanks for your help.
06:45tgoossensI was kinda using the idea of functions but then in java (actually xtend). I have a class with a lot of static final vars (my functions). Then the class that uses these functions gets all of them via its constructor. But its getting a bit unmanageable. So I guess I should just make them instance methods of the class...
06:45tgoossens(note: the class that uses the functions is different from the class that contains them)
06:49Anderkenttgoossens: if they're static final your other class can just access them statically, they don't have to be passed to its constructor. Or am I misunderstanding something?
06:56tgoossensanderkent: yes ofc. But then the class is coupled with a certain implementation. I want to be able pass on "test functions"
06:56Anderkentright. sounds kind of like a protocol?
06:57Anderkentthough that would require making the methods nonstatic, as you said.
06:59tgoossensmaybe the problem is the fact I just want to pass every function to that one class
06:59tgoossensinstead of smaller components
07:00tgoossensso that the function dependencies of the smaller components become manageable
07:01Anderkentthat's one solution. The other is to have a simple wrapper around that java class that can be mocked for tests.
07:01Anderkentsorry, kinda grasping at straws here because I don't have a clear picture of what you're trying to do :P
07:20noncom|2how do i concat two strings?
07:21hyPiRionstr
07:21hyPiRion,(str "foo" "bar")
07:21clojurebot"foobar"
07:21hyPiRionor eventually
07:21noncom|2omg
07:21hyPiRion,(.concat "foo" "bar")
07:21clojurebot"foobar"
07:21noncom|2how could i ask that
07:21noncom|2:)
07:23hyPiRionwe all ask stupid questions now and then
07:52nkozothere is function to switch to another ns but raise an exception if it doesn't exists?
07:54Anderkentnkozo: I don't think so. You can just (when-not (find-ns 'my-ns) (throw ...)), I guess.
07:56nkozoAnderkent: ok, thanks
07:56noncom|2how could that be that i have a reference to JDK everywhere in my path, however, lein says it cannot compile java sources because i apparently have only jre and "java --version" shows jre too?
07:58Anderkentnoncom|2: what does `which java` give you? Perhaps you have both jre and jdk in path, and jre takes precedence?
07:59noncom|2maybe 'which' is something linux, idk, im on windows.. however, i have checked all the path settings, and jre is even not mentioned anywhere..
07:59noncom|2maybe it is because i have 32 and 64-bit versions installed...
08:00Anderkentah, sorry. I kinda assume linux unless told differently :P
08:01noncom|2:)
08:01Anderkentit sounds like you might have a jre and jdk installed and it's using the jre java. Try moving the jdk path entry to beginning / end and see if that helps?
08:02noncom|2alright.. but what strikes me the most is that in none of my PATH settings is any reference to jre..
08:02noncom|2i try what you say and in the worst case, just reinstall java
08:02Anderkentnoncom|2: https://github.com/technomancy/leiningen/issues/774 sounds a bit like your issue?
08:02AnderkentI believe jres java goes to c:\windows\system32
08:03Anderkentwhich is why it's there even without special path entries
08:03Anderkent(well at least that ticket claims it does. I'm not a winwizz)
08:03noncom|2oh that is so very possible
08:03noncom|2i gonna check it out
08:06noncom|2Anderkent: there were java exes in system32, and i renamed them but that did not solve the issue
08:07noncom|2now i see in Java Control Panel there is the explicit preference of that particular jre set up
08:07noncom|2gonna try changing it now
08:07Anderkentnoncom|2: apparently windows version of which is where
08:07Anderkenti.e. where java
08:09noncom|2control panel is liek OS control center .. but java goes there tooo. .strangely that that thing is used as the global setting and not the PATH one. looks like this is totally how java works on windows. this is not for windows itself..
08:10noncom|2oh that java control panel is so crappy
08:11Anderkentnoncom|2: I think you can tell lein which java to use with an env variable. JAVA_CMD I think... So try just JAVA_CMD=C:\\ProgramFiles\blabhab\jdk7\java lein javac
08:11Anderkentuh or however you specify environment vars in cmd :P
08:11noncom|2hehe
08:11noncom|2gonna try
08:21wei_what do people use for clojurescript data binding these days? fluentsoftware/cljs-binding? any other alternatives?
08:29noncom|2Anderkent: finally i specified JAVA_CMD in the PATH settings and it seems to work
08:34Anderkentnoncom|2: cool. I'm afraid windows is very much a second class citizen in the oss world :P
08:35AnderkentIs sqlkorma dead? 57 issues 16 pull requests ;S
08:35noncom|2yeah, probably.. sometimes it sucks.. but generally it is not so bad.. at least in java, where i like the feeling of being solated from OS particularities
08:35noncom|2Anderkent: the craetor of korma abandoned it
08:35noncom|2he said that if someone needs it, feel free to give it a second chance
08:35Anderkentyeah, but it moved to its own org (korma/korma instead of ibdknox/korma now)... so I was wondering if anyone's picked it up
08:36noncom|2oh that twist of the story im unaware of
08:38noncom|2i'm trying to test my plugin for lein, when i run it, it says "Warning: profile :my-plugin not found." Where do i specify it and how? an't find the doc on leins site..
08:43Anderkentnoncom|2: hm, what does your plugin do? It seems like it's trying to merge a profile that isn't declared into the project decl
08:46noncom|2yes, i am excercing in writingplugins and i want a profile for my plugin. the only thing that idk is how to declare it in project decl? looks like i found it - it's :profiles map in the project.clj?
08:46Anderkentyes
08:47noncom|2missed it when looked at sample-project.clj before
09:19H4nshow does leiningen know what files to load? do i need to specify the files in the project.clj, or is there some magic involved?
09:21H4nsah, so i need to depend on whatever package and they will be found by file name. thanks! :)
09:56noncom|2in leiningen there is are project parameters like :resource-paths that take [] of strings representing filesystem locations. what is interesting for me - it can be written like "lib\*" for a file location, performing the wildcard match. how do i utilize the same kind of search for my lein plugin? in other words i have to find all files in such a directory
09:58Anderkentnoncom|2: you can use bultitude to find files on classpath that match a particular expression
09:59Anderkentfor raw filesystem interactions there's probably some other lib
10:01noncom|2i see... sure i could make a plain javaish routine but i thought if there is something already available.. so i'll try bultitude first. atleast, lein uses it, so it must be somewhere near the requirement
10:34noncom|2has anyone seen weavejester recently?
10:37vijaykiran$seen weavejester
10:37lazybotweavejester was last seen quitting 11 hours and 14 minutes ago.
10:39jtoywhy is this true?
10:39jtoy(contains? [1 2 13 1231 231 ] 4)
10:39jtoy&(contains? [1 2 13 1231 231 ] 4)
10:39lazybot⇒ true
10:39hyPiRion(doc contains?)
10:39clojurebot"([coll key]); Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or logarithmic time; it will not perform a linear search for a value. See also 'some'."
10:40hyPiRionit's poorly worded, we know
10:40jtoythat seems like a terrible use too
10:41jtoythe key is in the range if key <= length - 1
10:42hyPiRionyeah, if (<= 0 i (- (count coll) 1))
10:42hyPiRionwell actually
10:42hyPiRion,(contains? [1 2 3 4 5] 3.4)
10:42clojurebotfalse
10:42hyPiRionso not exactly, but almost.
10:42jtoy&(contains? [1 2 3 4 5 3.4] 3.4)
10:42lazybot⇒ false
10:43jtoy.....
10:43hyPiRion3.4 is not a key (index) in the vector, and can't be.
10:43noncom|2,(contains? [1 2 3] -1)
10:43clojurebotfalse
10:43jtoycontains is a horrible name
10:43hyPiRion,(get [1 2 3 4 5 3.4] 3.4 :not-found)
10:43clojurebot:not-found
10:43noncom|2vijaykiran: thanks!
10:43hyPiRionyeah, it should've been called contains-key?
10:44hyPiRionbut too late for that now.
10:44jtoyone motto i do love about ruby is "principle of least surprise"
10:44jtoyclojure mostly fits it also
10:45AimHereWell Ruby did end up in the 'Wat' talk so it doesn't ALWAYS hit the least surprise thing
10:45stuartsierra"Principle of least surprise": https://twitter.com/fogus/status/358261588236578816
10:45hyPiRionAimHere: well, I can get Clojure into a wat talk as well
10:45iwohey, does anyone know why i would get a ClassNotFoundException from clojure.lang.Compiler when trying to use the fully qualified name of a function?
10:46AimHerehyPiRion, no doubt.
10:46iwoi'm trying to refer to function like: clj-http.client/parse-url
10:46iwobut i get Exception in thread "main" java.lang.ClassNotFoundException: clj-http.client
10:47iwoeven though the function 'parse-url' DOES exist in the namespace clj-http.client
10:47jtoystuartsierra: nice, for me it means statitistically, as in go ask a 100 programmers what contains? does
10:47llasramiwo: Have `require`d the namespace anywhere? Once a namespace is loaded, you can refer to it by fully-qualified name even if a given namespace hasn't explicitly required it, but *something* needs to have loaded it first
10:47dakroneiwo: have you required clj-http.client
10:48iwollasram, dakrone: actually, this was my first thought so i tried this:
10:48iwo(:require [clj-http.client])
10:48stuartsierrajtoy: Yes, see also http://stuartsierra.com/2013/02/04/affordance-concision
10:48iwobut require doesn't seem to like that namespace on its own
10:49iwoah, i guess i should get rid of the vector
10:49llasramiwo: Are you adding that to an `ns` form, or just e.g. entering it directly into a REPL?
10:49iwo(of course (:require [clj-http.client]) is inside my ns macro)
10:50llasramah, ok
10:50llasramThat should work, actually. In a vector/list is correct
10:51iwollasram: sorry, i guess i'm wasting your time, i think i might have got nrepl into a bad state
10:51iwolooks like it's working
10:51iwothanks anyway!!
10:51llasramglad you got it working :-)
11:26yogthosdoes anybody know why the exception is not caught here? (try (for [i [[]]] (nth i 1)) (catch Exception ex)) ?
11:26yogthosthis works as expected (for [i [[]]] (try (nth i 1) (catch Exception ex)))
11:26llasramyogthos: Laziness
11:26yogthosahhh
11:26Anderkentgah, I got excited for midje junit output and it turns out it doesn't work that well :((
11:26yogthosobviously :)
11:27llasramyogthos: q: What causes this unexpected Clojure behavior involving lexical scope? a: Laziness. :-)
11:27yogthosllasram: yeah pretty much every time
11:29yogthosthat's definitely easy to miss
11:29upwardindexIs there a library to do simple DSP that works well with incanter?
11:30upwardindex(digital signal processing)
11:30justin_smithupwardindex: you can build DSP out of matrix and linear algebra, so it is in there already, right? :P
11:31justin_smithmore seriously: I hope!
11:31xicubedlein ring to bring them all and in their darkness bind them?
11:31arrdem(inc xicubed)
11:31lazybot⇒ 1
11:33upwardindexjustin_smith: I've been looking a bit and there does not seem to be anything
11:34ker2xfriendly greetings !
11:34justin_smithupwardindex: that is too bad - one day someone should throw it together, because really if you have matrix ops and linear algebra, DSP should be easy enough to build up from that
11:34Anderkentupwardindex: perhaps look into how overtone does stuff?
11:34Anderkentthey must be doing some dsp
11:35justin_smithAnderkent: overtone just calls supercollider
11:35Anderkentah.
11:37ker2xi have trouble using lein with clojurescript and nodejs. anyone willing to help ? i'm not sure what wrong, the compilation is ok but i have an error executing the js code
11:38dnolenker2x: what's the error you are seeing?
11:38ker2xi'll pastebin it
11:38ker2xhttp://pastebin.com/nCmZbqKX
11:39ker2xthe code is a simple hello world
11:40ker2xhttp://pastebin.com/dr4U5pwA the project definition
11:41dnolenker2x: what's your source file look like
11:42ker2xhttp://pastebin.com/GKQJfRbh
11:45ker2xcan you see something wrong ?
11:49dnolenker2x: I don't see that you've specified an output file anywhere
11:49ker2xyes, i've read that there is default output to target
11:50ker2xand indeed, it created a target directory with a js file
11:50ker2x ls target/
11:50ker2xcljsbuild-compiler-0 cljsbuild-main.js
11:51ker2xi can create one if it can help
11:54ker2xi'm going to try what sevvie said on #clojurescript sevvie ker2x: When I was running into that error, I cleaned out my ~/.m2 and added [org.clojure/clojurescript "0.0-1853"] to my project dependencies; that seemed to handle it.
12:01AnderkentIs there a better way of having midje work lein test than wrapping everything in deftest?
12:02babu`I am using clj-http.client.I don't know if it supports proxy authorization. Doc mentions :proxy-host and :proxy-port. Does any know if this is supported or if there is any other library that does?
12:02dakronebabu`: clj-http doesn't support proxy auth, I don't know of any that do
12:02dakronebabu`: please feel free to add an issue to clj-http asking for it to be added though
12:03noncom|2dnolen: i'm currently reading through the posts on ui made with core.async that you have presented yesterday.. very enlightning.. however, a question pops up in my head: what auditory you target in these posts?
12:03dnolennoncom|2: auditory?
12:04`cbpaudience i'm guessing :)
12:04ker2xsame problem :(
12:04ker2xmm no wait
12:04ker2xdifferent error
12:04noncom|2dnolen: yes, who are the readers? i assume the following variants are possible: 1) full-blown clojurians 2) lispers who go javascript side for some reason 3) pure javascripters who never seen anything but javascript ?
12:05noncom|2sorry, english is not my native language, so possible are miswordings
12:05ker2xhttp://pastebin.com/KmW2za34
12:06Kototamahi, why is this expression (= 'true true) true?
12:06babu`dakrone, ok, I will file a ticket.
12:06gfredericksKototama: because ##(type 'true)
12:06lazybot⇒ java.lang.Boolean
12:06dnolennoncom|2: that post is really targeted at anyone - I've done UIs in a lot of different programming languages - so I tried to write that post for a general audience who has done some UI programming before
12:06gfredericksKototama: there is no syntax for ##(symbol "true")
12:06lazybot⇒ true
12:06TimMcKototama: Because 'true doesn't produce a symbol, in Clojure.
12:06TimMcKototama: Same with false and nil.
12:07dnolennoncom|2: but of course I also wrote it to document a bunch of non-obvious core.async techniques I encountered along the way, hopefully people will come with even better ones
12:07ker2xhttp://dev.clojure.org/jira/browse/CLJS-101 i try that
12:07Kototamaah ok, thank you :)
12:07TimMcIt bugs me, and I wish Rich had done (def true #t) like in PLT Scheme, but oh well.
12:08arrdemman that's weird...
12:08dnolenker2x: specify an output file
12:09TimMcThat would be a good question for a set of dark-corners koans: "For what values of x is (= (symbol x) x) true?"
12:10AnderkentTimMc: rather obviously for any symbol
12:10AnderkentI don't think anyone would look farther than that :P
12:10TimMc,(symbol 'foo) ;; wait really?
12:10clojurebotfoo
12:11TimMc:-(
12:11AnderkentPerhaps if symbols were excluded from x: "For what values of x is (and (not (symbol? x)) (= (symbol x) x)) true?"
12:11Anderkentthat's more koan like :)
12:11Anderkent(also ugly)
12:13noncom|2dnolen: i see, as someone who is relatively new to lisps and clojure, i find the code samples a little difficult to follow. for example - the autocompleter's code here https://tinyurl.com/mfe2946, line 41.. i read like..
12:13TimMc&(map (juxt (comp name str) (comp str name)) ["foo" 'foo :foo])
12:13lazybot⇒ (["foo" "foo"] ["foo" "foo"] [":foo" "foo"])
12:13dnolenKototama: TimMc: Clojure's behavior as far as 'true doesn't seem like a departure from Scheme, some quoted forms self-evaluate
12:13dnolenin Scheme (eq? '#t #t) -> #t
12:14dnolen(eq? ''#t #t) -> #f
12:14dnolenprobably true for Common Lisp as well
12:14TimMcdnolen: In that case, quoting the truth value does nothing, but quoting the truth symbol is different from that.
12:14TimMc#t is a reader macro producing the true bool, not 'true
12:15noncom|2"(r/map second)... so there was second? what was the first? nvm, we care for second from the vector.. yes, with (r/filter vector?) we selected vectors from something that holds vectors-and-non-vectors which we got from (resp/selector (resp/highlighter select menu ctrl) menu data) and what was that..?" then i foloow back and back.. and i lose notion of core.async, drawing in code
12:15TimMcThis may be unique to PLT Scheme (Racket).
12:15dnolenTimMc: yeah I wouldn't use Racket as reference for Scheme, I use Petite for that
12:16noncom|2i mean, i find it hard to follow learning core.async concepts and how they are intertwined with clojure syntax, like positional args or mapping over a collection of arbitrary type that came from some channels, that i do not fullyu grasp yet..
12:16ker2xdnolen: remplacing the :whitespace optimisation with :simple optimisation worked as said on http://dev.clojure.org/jira/browse/CLJS-101
12:16ker2xthank you for your help
12:16dnolenker2x: glad to hear it
12:17babu`dakrone, I have filed issue for proxy auth: https://github.com/dakrone/clj-http/issues/153
12:17noncom|2i myself can handle that, but i also would like to make use of the articles to show some not very lisp-inclined people
12:17noncom|2to win javascripters for clojurescript
12:17ker2xi'll specifiy an output anyway, whould i just specify a directory or an direcoty/output-file ?
12:17dakronebabu`: thanks!
12:18noncom|2that is why i asked about the audience
12:19ker2x:output-to "war/javascripts/main.js"
12:19ker2x ; default: target/cljsbuild-main.js
12:19noncom|2if i am to show the article to my javascript friends, i will have to first edit it. because maybe they cannot see lisp benifits at once, but they can undertand the win of CSP that stands behind core.async. and that could win them to js->cljs
12:20dnolennoncom|2: yeah I wish the post were less Lisp-y, but I'm really not sure what can be done about that.
12:20dnolennoncom|2: this is why I compared to actual JS which is no easier to understand :D
12:21dnolennoncom|2: there's definitely going to be room for expanded chapters on ClojureScript/core.async in the Clojure books
12:22noncom|2dnolen: ahahah :D true about js. i just thing that there are two tracks: lisp and csp. maybe it is possible to write hints on lisp-related part, leaving to manually follow only csp part, that could be nice sure. i see two ways: 1) presenting a very verbose variant of lisp code along with the neat code that you originally have 2) more comments...
12:23ker2xsee you later. have fun :)
12:24noncom|2just thoughts, maybe you find it of encouragement :) actually i would like to see more js->cljs choices and conversion of ppl
12:25noncom|2and i wanted to thank you for the great articles. that makes a huge change for my coding experience. and personally i do not mind the lispy riddle stuff
12:26babu`dakrone, I see code ./clj_http/core.clj:12: (org.apache.http.auth UsernamePasswordCredentials AuthScope)
12:26babu`and code ./clj_http/core.clj:234: (UsernamePasswordCredentials. user pass)))
12:27babu`looks like you have implemented some of this.
12:27dakronebabu`: that's for basic auth for regular requests, unfortunately not hooked into proxy auth yet
12:27babu`dakrone, ok
12:30dnolennoncom|2: thanks for the feedback, I'll likely be doing smaller more manageable posts in the future
12:30dnolennoncom|2: the autocompleter was really an advanced example that "proves" CSP can be used to build very nice UI components
12:31xeqidnolen: another thanks for writing the csp posts. I've been looking forward to the autocompleter one
12:33noncom|2dnolen: xeqi: yeah, it is really great. i like it as it is, it is a whole piece, can't take anything away from it. actually, in terms of advancedness, it is not hard. to me, it much resembles actors, but from a parralel world..
12:33noncom|2and practical it is, what's important
12:33arrdemhum... is there a parser combinator lib that can work with binary format grammars?
12:40jtoyis there a single function that does frequencies and then return the max value?
12:40noncom|2arrdem: istaparse no?
12:40noncom|2s/istaparse/instaparse
12:40jtoy (max (frequencies [ 1 2 2 44444 5 6 2 2]))
12:41jtoy&(max (frequencies [ 1 2 2 44444 5 6 2 2]))
12:41lazybot⇒ {1 1, 2 4, 44444 1, 5 1, 6 1}
12:41noncom|2wow
12:42arrdemnoncom|2: instaparse is amazing but it's ascii grammars only
12:43gfredericksjtoy: ##(apply max (vals (frequencies [1 2 2 44444 5 6 2 2])))
12:43lazybot⇒ 4
12:43bbloomtbaldridge: i added reusable handlers & effect instances with handler stacks to https://github.com/brandonbloom/cleff -- i found something odd in the generated state machines that i wanted to ask you about:
12:44Anderkentjtoy: ##(first (sort-by (comp - second) (frequencies [1 2 2 44444 5 6 2 2])))
12:44lazybot⇒ [2 4]
12:44jtoygfredericks: i explained it wrong, i mean it should return 2 because there are 4 instances
12:44bbloomtbaldridge: I've seen a few cases where there is (let [auto_1 auot_2] (my.return/fn-here x y))
12:44tbaldridgebbloom: yeah
12:44bbloomor rather: (let [[auto_1 auot_2]] (my.return/fn-here x y))
12:44Anderkentjtoy: ^. Just take the first part of the vec.
12:44bbloomtbaldridge: the destructuring occurs, but the results are totally ignored
12:44bbloomtbaldridge: is that expected?
12:45bbloomtbaldridge: also, i ran in to an issue with destructuring lets at the top level of a state machine:
12:45bbloomhttps://github.com/brandonbloom/cleff/blob/master/src/cleff/trampoline.clj#L74-L75
12:46bbloomadding that do fixes it
12:46bbloomseems related, some kinda issue in the code generation for the state transitions
12:46tbaldridgebbloom: yeah, it's a side effect of the transformation, the system doesn't always remove unneeded assignments.
12:46tbaldridgebbloom: yeah, something that's not totally clear is that state-machine requires a seq of sexprs, not a single sexpr
12:46noncom|2arrdem: oh so you mean binary is like 1010100111?
12:47bbloomtbaldridge: ooo that makes more sense… so instead of do, i should write (list `(let …)) ?
12:47arrdemnoncom|2: yeah I'm working on an assembler toolkit and realized that I should probably be able to round trip data
12:47tbaldridgebbloom: yeah
12:47bbloomtbaldridge: k thanks, let me try that
12:47llasramjtoy: ##(->> [1 2 2 44444 5 6 2 2] frequencies (apply max-key second) first)
12:47lazybot⇒ 2
12:48bbloomtbaldridge: perfect. works. thanks
12:50noncom|2wouldn't it be cool if along with #(% %2 %3) we could have like ##(%% %%1 #(% %2 %3)) ans o on?
12:50lazybotjava.lang.RuntimeException: Unable to resolve symbol: % in this context
12:50noncom|2lazybot?
12:50clojurebotlazybot is forget lazybot
12:50noncom|2clojurebot?
12:50clojurebotclojurebot is a multimap
12:50noncom|2multimap?
12:52noncom|2like we could say ###(%%% ##(%% %%2 %%%2 #(% %2 %%%3)) ##(%% %%% %%%1) %%%4)?
12:52lazybotjava.lang.RuntimeException: Unable to resolve symbol: % in this context
12:52noncom|2stop it lazybot
12:52Anderkentnoncom|2: no. just write a function.
12:52Anderkent:P
12:52noncom|2ahahah
12:52noncom|2:D
12:52llasramnoncom|2: Well, your proposal might make it easier to write in swearjure
12:52llasramnoncom|2: I'm unconvinced as to other benefits :-)
12:53noncom|2i could not hold laughter when it came to my mind so that was the benifit :D
12:53jtoyllasram: i like yours beter, thanks
12:54Anderkent:(
12:55jtoyAnderkent: I like yours too, thank you :) i just dont cant undertand it at a quiick glance
12:55Anderkenteh, it's pretty much the same thing except his is better
12:55Anderkent:P
12:55arrdem!seen nathell
12:56llasramI do think that standard lib could benefit from a `max-compare` (and `max-compare-by`). Current {max,min}{,-key} only work for numbers. Which I assume could allow them to be efficient, but is annoying sometimes
12:56hyPiRion$seen arrdem
12:56lazybotarrdem was last seen talking on #clojure 27 seconds and 952 milliseconds ago.
12:56arrdemcheers hyPiRion
12:56arrdem$seen nathell
12:56lazybotnathell was last seen quitting 5 days and 16 hours ago.
12:56arrdemdang
12:57jtoywhat function will tell me the index of each item in a vector ( somefunc [:yes :no :yes:] ) => 0 1 2
12:58llasramjtoy: More than just e.g. (comp range count) ?
12:58Anderkentjtoy: I'd guess you want map-indexed, if you want both the index and value
12:58Anderkentotherwise it's just (comp range count) as llasram said
12:58jtoyllasram: ok, i didnt think of it like that
13:00noncom|2$seen somebody
13:00lazybotI have never seen somebody.
13:01noncom|2#seen clojurebot
13:01noncom|2$seen clojurebot
13:01lazybotclojurebot was last seen talking on #clojure 31 weeks and 4 days ago.
13:01noncom|2hmmm
13:01noncom|2and who pretended to be clojurebot?
13:01noncom|2$seen lazybot
13:01lazybotlazybot was last seen joining on elixir-lang 4 days and 7 hours ago.
13:03TimMc!
13:03noncom|2wow, it kicked me!
13:03bbloom$seen anybody
13:03lazybotI have never seen anybody.
13:03bbloomheh.
13:03noncom|2:D
13:03noncom|2try yourself?
13:04noncom|2seen bbloom i mean
13:04technomancy$seen a bot command so easy to abuse before
13:04lazybota was last seen joining on clojure 58 weeks and 1 day ago.
13:04arrdemaw.....
13:04technomancyfoiled!
13:04TimMc$seen ,(map,println,[1,2,3,4])
13:04lazybotI have never seen ,(map,println,[1,2,3,4]).
13:05TimMcOh right.
13:05Anderkent$seen "a b"
13:05lazybotI have never seen "a.
13:05Anderkentoh well.
13:05noncom|2hmmm
13:05noncom|2somebody try to ask about yourself please
13:05hyPiRionTimMc: heh, interesting.
13:05Anderkent$seen a b
13:05lazybota was last seen joining on clojure 58 weeks and 1 day ago.
13:05Anderkentgeh
13:05hyPiRion$seen ,a
13:05lazybotI have never seen ,a.
13:06noncom|2$seen -
13:06lazybotI have never seen -.
13:06TimMc$seen TimMc ;; OK, I'll try it.
13:06lazybotTimMc was last seen talking on #clojure 58 milliseconds ago.
13:06noncom|2$seen noncom|2
13:06lazybotnoncom|2 was last seen talking on #clojure 40 milliseconds ago.
13:06noncom|2oh! last time it did not answer and connection was lost
13:08Anderkentok last try
13:08Anderkent$seen a b
13:08lazybotI have never seen a b.
13:08Anderkentaha
13:09noncom|2what?
13:09Anderkent$seen a command so easy to abuse.
13:09lazybotI have never seen a command so easy to abuse..
13:09clojurebotwhat is seq
13:09noncom|2kick?
13:09arrdemwoah what?
13:09Anderkent#unicode#mindblown
13:09arrdemtechnomancy: ^-3
13:09arrdem(inc Anderkent) ;; for abusing utf8
13:09lazybot⇒ 3
13:09technomancyarrdem: sweeeet
13:10technomancynon-breaking space?
13:10noncom|2$seen êòî ãäå
13:10lazybotI have never seen ���.
13:10Anderkentawww it's so cute
13:10arrdemhum... are tabs breaking?
13:10technomancyprotip: the reader treats non-breaking spaces as symbol constituents
13:10arrdem$seen tabs are osum
13:10lazybotI have never seen tabs are osum.
13:10arrdemlewl
13:10technomancyah; I see
13:11Anderkenttechnomancy: yeah, I had clojure fail on me with *very* cryptic messages when i copy pasted code from github
13:11Anderkentthe spaces on github were non-brekaing, of course, so clojure was choking on it... While printing what seemed to be perfectly valid code
13:11Anderkenthad to dig out hexdump to see what's wrong with the file
13:11noncom|2Anderkent: that's for java too. i remember having nice time with a library full of comments in japaneese...
13:11Anderkent^^
13:12technomancyAnderkent: mine was much sillier--I was working around broken escaping in a (I think) cygwin shell and trying to get a string that the shell would treat as a single token but clojure would treat as multiple forms
13:12arrdem,(doc condp)
13:12clojurebot"([pred expr & clauses]); Takes a binary predicate, an expression, and a set of clauses. Each clause can take the form of either: test-expr result-expr test-expr :>> result-fn Note :>> is an ordinary keyword. For each clause, (pred test-expr expr) is evaluated. If it returns logical true, the clause is a match. If a binary clause matches, the result-expr is returned, if a ternary clause matches, i...
13:13muhooRaynes: wow, google scrapes refheap like instantaneously. i pasted something, googled the error like 30 seconds later, and second hit was the refheap paste i just made
13:13Anderkentmuhoo: nah, google scrapes your history instantly :)
13:14Anderkentactually I don't know, but it would seem possible
13:14technomancyI'd link to the jira issue, but I forgot how terrible jira search is
13:14Anderkent419
13:14Anderkentthere was a bot command to link to jira wasnt there
13:14muhooAnderkent: huh, that doesn't make sense
13:15Anderkentmuhoo: eh, was just kidding really. Though I wouldn't be surprised if chrome put results from your history on top of google searches :P
13:15muhoohow would google know what i, personally, pasted to refheap? unless they're tapping into the NSA's listening posts at transit points, and scraping stuff before it even hits the destination server
13:16Anderkentmuhoo: what browser? I guess the joke falls flat if you're not on chrome
13:16muhooalso, fwiw, i was on firefox
13:16Anderkentoops
13:16muhoobut... i do have that "safe browsing" nonsense enabled, IIRC
13:17muhoobut that's silly. more likely is that if there's a rss feed on refheap, google is subscribing to it
13:17muhooseems like it'd be a good idea for them to subscribe to feeds on paste sites, but who knows if they go that far
13:18callentechnomancy: rumor has it progress is coming along on a pomegranate/sync! function. :)
13:19technomancycallen: thumbs up
13:31callenSegFaultAX: https://github.com/clojure/core.typed/wiki/User-Guide
13:48callena depression portion of this Python code is just destructuring.
13:48callendepressing*
14:20arrdem,(format "0x%X" 2r1001)
14:21clojurebot"0x9"
14:27dnolenstuartsierra: can we do another CLJS release to address the tools.reader bump?
14:30Raynesmuhoo: It thinks your tractor's sexy.
14:34aaelonythose that use Incanter, does anyone know of a set of functions that convert a many column "wide" dataset to a many row "long" dataset like R's melt function in the reshape package? http://www.statmethods.net/management/reshape.html ?
14:37mmarczykdnolen: ping
14:37dnolenmmarczyk: pong
14:40mmarczykdnolen: hopefully I just messaged you off channel, though ERC is telling me something weird atm, so maybe not...
14:40justin_smithhow do I prevent emacs nrepl from deleting the repl buffer when the remote disconnects?
14:40dnolenmmarczyk: hrm, did seem to work
14:40mmarczykok
14:52callentechnomancy: http://blog.nullspace.io/adding-haskells-where-to-ocaml.html
14:53technomancycallen: IDGI
14:53technomancyit's supposed to be more readable?
14:54bbloomadding a suffix-ed where like that seems like a terrible plan in a strict language
14:57callentechnomancy: it's a hacker school student, I just found the subject of modifying ocaml nifty.
14:58callenbbloom: what's problematic about it?
14:58bbloomcallen: it reverses the order of evaluation (and hence side effects)
14:59callenI'm not sure you'd supposed to be using the 'where' where order matters.
15:00bbloomit's not just order, it's also conditional evaluation
15:00bbloomif you have let x = foo in let y = bar ...
15:00bbloomyou expect those to execute in order
15:00bbloomif you have f z where z = foo and w = bar
15:00bbloomyou wouldn't expect bar to execute, but it will
15:00bbloomwhat order should they go in? it's just not clear that there is any benefit & strictness means there is potential confusion
15:01callenI am facepalming so hard about people going ga-ga over tools.trace
15:01callenbbloom: I see your point, but I don't think the intent is to care that much.
15:02hyPiRionbbloom: huh? You expect them to evaluate in order because you've read how `where` works
15:03hyPiRionThat's like saying "oh, let in Clojure is so confusing, I thought the bindings happened in parallel just like in CL"
15:03callenI'd tend to agree. and I got caught by that.
15:04callen(let vs. let*)
15:04ToxicFrogcallen: tools.trace?
15:04callenToxicFrog: yeah people on twitter are freaking out about something Lisp has had for decades. I don't really know why.
15:05callenI'm kind of embarrassed because I know a lot of Common Lispers and now they're going to see Clojure users freaking out about indoor plumbing.
15:05noncomcallen: that's a common occasion in the world
15:05bbloomhyPiRion: i just think it's a bad idea to have two ways to represent *exactly the same thing* where one of them follows the order of execution & the other one… doesn't
15:05callennoncom: I know, but still :|
15:05bbloomwith laziness in haskell, it makes some sense
15:06ystaelcallen: would the typical CLer notice yet another proof of their obvious and manifest intrinsic superiority? or just yawn?
15:06callenystael: I'm not really sure, I'll report when I have data.
15:07ToxicFrogcallen: debugging is one of clojure's greatest weak points, IMO, and anything that helps with that is a good idea; tools.trace is noteworthy because it's another step towards debugging clj not completely sucking.
15:08technomancytools.trace is just sugar over alter-var-root+println
15:08technomancyor prn maybe
15:08ToxicFrogAlso, it looks extremely easy to use, which may be the case for CL's implementation but is not the case in pretty much any language I've used with a tracing capability.
15:08ToxicFrogtechnomancy: this is still a huge improvement over PRN! PRN EVERYWHERE!
15:08bbloomToxicFrog: i'll agree that debugging clojure can be ugly/messy/hacky/black-magic, but i'd say that it's MUCH EASIER to debug than many languages: Thanks Immutability & prn !
15:09callenToxicFrog: I know it's a weak point, I'm almost perpetually pissed that debugging is nicer in Python than Clojure right now.
15:09technomancyToxicFrog: it's still pretty lame in that you have to touch the source to enable it
15:09technomancywhich is something nrepl-discover solves
15:09callenbbloom: that's not debugging.
15:09callenthat's just deriving benefit from clearer/simpler semantics.
15:10callenthat doesn't mean debugging doesn't still suck.
15:10bbloomcallen: as one who has contributed to visual studio's xbox debugger, i think i'm qualified to say that clear/simple semantics are twice as important to debugging than debuggers :-)
15:10callenI pray for the day when you no longer lean on Microsoft for credibility.
15:10bbloombut yes, a real debugger would be nice
15:10callenand just make your point.
15:13seangrovebbloom: Didn't know you worked on that, glad you mentioned it
15:14bbloomseangrove: i don't know why i bother talking to callen….
15:14seangroveGotta take the good with the bad
15:15seangroveI wonder how you can incentivize really great tools for the clojure ecosystem though
15:15bbloomthe first time i encountered him in here, a year ago, he privately messaged me to tell me to go fuck myself with a rake…. *sigh* i guess i should figure out how to get my irc client to not forget my ignore list every time i close it
15:15callenseangrove: unifying on nRepl helps.
15:15callenbbloom: do you have a log of that?
15:15technomancyseangrove: nrepl-discoooooooover https://github.com/technomancy/nrepl-discover
15:15callenPolite converstion commends addressing the conversation at face value with your conversation partner, not appealing to authority or assigning homework.
15:16seangroveThe immune-system reaction to proprietary tools means it's really difficult to sustainably and continually build and refine tools
15:16bbloomcallen: you've never had a polite conversation ever. you have no idea what a polite conversation is
15:16callenThere is nothing more obnoxious or unappealing than talking to somebody who won't actually talk to you, but instead treat each point as an opportunity to mention something they worked on.
15:16seangrovetechnomancy: Looking through this...
15:16technomancy~gentlemen
15:16clojurebotYou can't fight in here. This is the war room.
15:16dnolenseangrove: building really good debuggers is a thankless task. Something everyone wants but no one wants to maintain.
15:16llasrambbloom: Ignoring people permanently can make channels odd at times though. Watching people converse with ghosts
15:17seangroveBut just thinking about how far along visual studio/xcode are - they're backed by corps with financial interest in their polish
15:17callenllasram: you can ignore replies if you're using a civilized client.
15:17llasramOh, interesting
15:17bbloomllasram: if that's happening, i can just check raynes' logs
15:17seangrovednolen: I'm not sure. I think there are people that would love to have that job if it were their full-time thing to work on infrastructure and tooling
15:17technomancyseangrove: slime does fine from community contributions
15:17callenllasram: you ignore the person, then replies to that person with a flag usually.
15:17dnolenseangrove: oh yes if there's money involved sure
15:17technomancya lot better than xcode from what I've read
15:17bbloomseangrove: no, it's quite thankless even then :-P
15:18seangroveLight-table, etc.
15:18callenthere was something I was debugging this weekend that Light Table probably could've helped with.
15:18Raynesbbloom: Ignoring people is the silliest thing ever. You don't need your IRC clients help -- you can very easily choose to ignore what people say despite having seen it.
15:18dnolenseangrove: but then I remember from 2004-2008 the only browser with decent debugging was FireFox
15:18dnolenJS debugging
15:18callenI bumped into (nil ...) :(
15:18seangrovebbloom: I was talking with some twitter people who work on their jvm implementation/tweaking - it's pretty low level, not very sexy, and they love it
15:18nopromptRaynes: well said.
15:19technomancyRaynes: you're understating how difficult it is. it requires great mental discipline.
15:19bbloomseangrove: i didn't say it wasn't enjoyable. just thankless :-)
15:19Raynestechnomancy: I've done it for years now.
15:19technomancyRaynes: and you're an inspiration to us all
15:19seangrovebbloom: Ah, fair enough, hadn't made that distinction :)
15:19shiranaihitowow.. eclipse is a mess
15:19Raynestechnomancy: FYI, I never /ignore'd lajla and the dude exists to come tell me that he worships my shadow.
15:19RaynesUnless someone is spamming, I'm pretty much going to be able to ignore them if necessary
15:19ToxicFrogseangrove: re working full time on infrastructure and tooling: that is my job. I'd love it a lot more if the tools were lua/clojure rather than python/C++, though~
15:19FoxboronWait, we can't worship your shadow?
15:19RaynesYou can, just don't tell me about it.
15:19Raynes:p
15:19callenFoxboron: I think it's a Lexx reference.
15:19nopromptRaynes, my love.
15:20callenNot a worshipful of Raynes thing.
15:20nopromptRaynes, I worship your shadow.
15:20Raynesnoprompt: I bet you do.
15:20nopromptrofl
15:20RaynesNo wonder you want me to hang out at your house.
15:21noprompthaha. well that and the bacon tournament.
15:21callennoprompt: I did a taste-testing vodka tournament not too long ago.
15:21seangroveToxicFrog: But then a company has to hire you full time at a salary that's ridiculously high (here in SF) to do something that is only somewhat related to their goals
15:21ystaelbacon ... tournament?
15:22ystaeli'm imagining boar-mounted jousts with sausage forks
15:22jtoyis there an operator for less than or equal to ?
15:22jtoyoh, >=
15:22nopromptcallen: i've managed to avoid alcohol for the past 2.5 months. the thought of a vodka tournament makes my stomach churn.
15:22seangroveI feel like it could be done sustainably, but I'm not sure how yet. I like what kodowa is doing though.
15:22callenucb: hi
15:22amalloyjtoy: <=, mate
15:22Bronsathat's the opposite jtoy
15:22jtoyi meant that, thx
15:23callenjtoy: do you use a repl?
15:23ucbhey callen, how do?
15:23jtoycallen i do, but for some reason i was expecting >= to not exist in clojure
15:23nopromptoh i did that yesterday. i had a > where there should have been a < and couldn't figure out why my code wasn't working for like 15mins.
15:24ucbnoprompt: nice
15:24nopromptucb: it was a bloodbath.
15:24seangrovednolen: Well, that situation has certainly changed. Firefox's js debugging is barely tolerable last time I tried to polish Zenbox on it
15:26callenucb: pretty good. got a bunch of hacking done last weekend, looking forward to what's coming up this week/weekend. `cbp is awesome and working on something for pomegranate.
15:26dnolenseangrove: FF has improved a lot recently. But my point is that good debuggers usually involve lots of time and likely lots of money.
15:27ToxicFrogseangrove: most companies above a certain size have a tooling team, I'd expect
15:27seangroveToxicFrog: Maybe the problem is that Clojure(script) doesn't have enough penetration at companies large enough to have dev teams that can open-source their work
15:28ToxicFrogseangrove: yeah, you'll note that I'm talking in general, not regarding clojure specifically
15:28bbloomdnolen: it also generally involves changes to the compiler / evaluator
15:28ucbcallen: smashing
15:28bbloomdnolen: which is particularly slow to happen for jvm clojure
15:29callenucb: have you used pomegranate? It's really cool.
15:29jtoyi cant wait for clojure on llvm, finally fast startups
15:29bbloomthings like locals clearing really fucks up debuggability
15:29ucbcallen: I've heard it in passing. Is that JVM reloading things thing?
15:29callenyep!
15:29ucbyeah, read about it but never really used it
15:29callenucb: lets you update dependencies, adding them to your classpath. `cbp is adding the ability to just directly call "sync!" and then it just reads your project.clj to update your dependencies and classpath.
15:30ucbnice!
15:30callenucb: so that you don't have to specify dependencies/maven repos manually or potentially let your repl get out of "sync" with your project.clj
15:30ucbI used to use drip, but not any more
15:30callenwell drip is orthogonal to this.
15:30callenpomegranate is just a library that lets you manage deps/classpath at runtime and interact with maven repos.
15:30ucbsure, but I was just mentioning my leinhancements
15:30callenahhh
15:30dnolenbbloom: yep that too
15:30callenyeah I might need to push my .lein/profiles.clj
15:31ucbcallen: that'd be nice
15:31ucbI also need to do more clj hacking; haven't done any in a good while
15:31ucbwith the exception of the simple silly-searchy thing of the other day
15:31bbloompersonally, i dislike debuggers that are integrated directly in to the evaluation strategy
15:32callenucb: well, `cbp asked me for something to do and I tossed him that pomegranate thing from my to-do list. Are you volunteering?
15:32bbloomi much prefer tracing + repeatable execution
15:32bbloomi only want single stepping on a fully deoptimized source-level evaluation
15:32ucbcallen: I'd normally volunteer but I'd also have to find some free time to comply with my commitment; what did you have in mind?
15:33callenucb: well I haven't publicized it, but I have a todo list with items of varying value and difficulty. Let me see what remains from last weekend.
15:33ucbkk
15:34callendiffmerge for Clojure, nrepl-ritz automatic locals clearing, ClojureWiki, proxy+ with annotation support, rewrite Selmer with Instaparse, Mail server -> database, IRC bot/logger -> database, quickcheck for Clojure
15:34callenDatomic in the browser.
15:34callenucb: them be the highlights.
15:35ucball very worthy
15:36callenI'm serious about Datomic in browser. I don't mean a REST API passthrough.
15:37callenI'm not serious in the sense that I would think it'd be anything other than a fun hack.
15:37ucboh, I know what you mean
15:37ucbcouchdb has puchdb for a reason
15:37callenwell somebody did a REST API passthrough, posted it to HN and Reddit, and called it "Datomic in the browser"
15:37ucbpouchdb*
15:37callenI was pissed.
15:38ucbheh
15:39ucbsurely you wouldn't do a full-blown datomic in the browser implementation?
15:39ucb(just thinking about it now)
15:40callenucb: it might be a little potemkin, but it would in fact store the history of data in quads.
15:40callenif it could flush the data to LocalStorage, all the better.
15:40ucbright
15:40callenit'd make for an eventually consistent bootstrapped web client.
15:41callenyou'd open the client, see the old data and get the incremental refresh live.
15:41callenmaybe use a bridge to back AngularJS models with the datomic "facts"
15:42callencould be fun.
15:42astevethink less, that's what I always say
15:43ucbheh
15:43ucbfogzbugz is eating my soul as we speak
15:44callenucb: my most frequent job title lately has been JIRA-naut, so I sympathize.
15:44ucbpartners in misery
15:45glosoliwhat hook do I need to use on Emacs so I could make REPL buffer load auto-complete-mode by default ?
15:45Raynesucb: It's eating your… joel.
15:45ucbheh
15:45arrdemRaynes: -_-
15:45callenglosoli: everywhere or just one mode?
15:45nopromptRaynes: that's terrifying.
15:45RaynesOh yeah? OH YEAH? Well I've been upgrading to ruby 2.
15:45justin_smithhow do I make nrepl not destroy the repl buffer when the other end disconnects?
15:45callenRaynes: lol refinements.
15:46justin_smith(in emacs, that is)
15:46glosolicallen: Well I have it in all prog-modes, though doesn't seem to work in REPL buffer
15:46callenjustin_smith: modify...nrepl.el?
15:46nopromptcallen: refinments? isn't that a ruby 2.0 hack?
15:46callenglosoli: https://www.google.com/search?client=safari&amp;rls=en&amp;q=nrepl+mode+hook&amp;ie=UTF-8&amp;oe=UTF-8 looks plausible.
15:46callennoprompt: I was riffing off what Raynes said, yes.
15:46justin_smithcallen: I was hoping there was a config I had not found, but I guess I could fork nrepl
15:46callenjustin_smith: ...no don't fork.
15:47nopromptjustin_smith: why wouldn't you want it to disconnect?
15:47callenjustin_smith: just hack in a boolean flag and submit a PR please.
15:47callenjustin_smith: if you don't want to, send me the code!
15:47justin_smithnoprompt: I want the buffer to exist, it has printouts I want to refer to
15:47sarkishey guys been thinkng about using clojure for a little project i have in mind that involves a lot of web scraping
15:47justin_smitheven if the other end disconnected
15:47sarkisdoes clojure excel at something recursive like scrabing?
15:47callensarkis: it's pretty good at stuff like this, yes.
15:47sarkisscraping**
15:47nopromptjustin_smith: oh yah, that would be useful.
15:48sarkisok great, good excuse to play with clojure, thanks :)
15:48callensarkis: data processing, analysis, ML, scraping, web. All good areas for clojure.
15:48callensarkis: have fun :)
15:49nopromptsarkis: i brought clojure in to work by way of database migration projects.
15:49ucbsarkis: noprompt is working on a thing that'll make your life easier
15:49ucbnoprompt: right?
15:50nopromptucb: no. that's the opposite of my mission. i desire to bring pain and suffering to mortal men.
15:50ucbor that.
15:50noprompt:)
15:50ToxicFrognoprompt: I live in hope that I'll be able to get my team into Clojure. There's some people using it elsewhere in the company, but no-one nearby.
15:51nopromptToxicFrog: (un)fortunately, i'm a one man show where i work so i pretty much call the shots with regard to technology.
15:52glosolicallen: Hm thanks seems like it worked this time, must been doing something wrong, though it felt as If I used the same hook before
15:52ucbnoprompt: nice (?)
15:53nopromptToxicFrog: ruby required way too much mental overhead and reading blogs about design patterns makes me wanna die. clojure has brought sanity and clarity to my daily workflow.
15:53nopromptucb: it has it's tradeoffs.
15:53ucbnoprompt: I've been in your position as well. With the addition that I was forced to do both PHP and iphone games.
15:53nopromptucb: there are lots of times i wish i was working with someone who had more expertise and experience.
15:54ucbnoprompt: for that you have things like #clojure, right?
15:54nopromptucb: oh there's some php to maintain.
15:54ToxicFrogucb: I'm so sorry.
15:54nopromptucb: yes. and books. it also pays to be self motivated.
15:54ucbnoprompt: there's always some cobol^Wphp to maintain
15:54ucbToxicFrog: not there any more since 2009 so don't be :)
15:54ucbnoprompt: *nod*
15:54ToxicFrognoprompt: we're ostensibly a Python team but also work on a bunch of things with tentacles extending into stuff written in C++ :(
15:56ucbeep
15:56nopromptucb: one of the projects i'm working on right now is a rewrite of an old php application in clojure.
15:56ucbah, well, that's rather nice then
15:56nopromptucb: it was mind boggling digging through that code lemme tell ya.
15:56ucbI'm sure it was
15:57callenToxicFrog: ouch. We managed to stay mostly Python despite having a lot of matrix math stuff.
15:57callencompiling old fortran libraries sucks though.
15:58ToxicFrogcallen: most of our tools are Python, but we're also responsible for certain features in production servers which are all C++.
15:58ToxicFrogAlso, occasionally someone on the team will go insane and write a stand-alone tool in C++ before anyone can stop them. :(
16:00Apage43is that like in dwarf fortress when one of your dwarves occasionally goes mad and turns another dwarf into an overcoat
16:00callenToxicFrog: kill them next time.
16:01callenApage43: <3
16:01callenApage43: that game produces unparalleled hilarity and horror.
16:01arrdem(inc Apage43)
16:01lazybot⇒ 2
16:05ystaelthe hilarity happens when i read other people's Let's Plays, and the horror happens when I try to remember the keybindings
16:06justin_smithnoprompt: ucb: here it is php -> ruby -> clojure here. The design has slowly mutated through all of it but bares more than a trace of is origins.
16:06ToxicFrogApage43: yes, pretty much~
16:07nopromptjustin_smith: that was my path too. although i did check out haskell and some other langs along the way.
16:08justin_smithnoprompt: I didn't work on the other stages, they brough me in for clojure, but that is the tool's path
16:08callenC -> Common Lisp bastard -> Python -> Clojure
16:08callensmatterings of other languages.
16:08callenohhhh, you mean company.
16:08justin_smithyeah, sorry
16:08callenmy mistake.
16:08callenjustin_smith: how does Clojure code with that heritage look?
16:09justin_smithcsound -> tcl -> scheme -> common lisp -> c -> ocaml -> scheme -> clojure
16:09callensolid.
16:09hyPiRiondang you guys
16:09hyPiRioncommon lisp, java -> clojure. The fact that it was on the JVM was incidental.
16:09callenjustin_smith: I did some Haskell and other things as well, but my list is just core languages.
16:09justin_smithcallen: lots of stateful orm concepts wrapped up in functional data transformations
16:09callenhyPiRion: I started young.
16:10callenjustin_smith: oh, I've done stuff like that in Python. better than the alternative but it can be a little o_O sometimes.
16:10justin_smithyeah, orm maps pretty well to most webapp stuff it seems
16:10justin_smiththough I sometimes wonder if we could totally break out of the mode into something more functional in basic design
16:11OkasuhyPiRion: Now go to workshop and make us some artifact.
16:11callenhrm. people actually push "0.1.0-SNAPSHOT" jars to clojars? grungy.
16:12justin_smithcallen: those were my core languages, I got fiddly and constantly wanted to try things new ways, throw in c++, forth, x86 assembly, shell, php, ruby, supercollider, puredata for everything I have made *some* kind of result with
16:12OkasuhyPiRion has begun a mysterious construction!
16:12hyPiRionah dang, forgot that one
16:12justin_smithoh, forgot elisp
16:13brighidjustin_smith: Hooray elisp :3
16:13callenI technically did elisp all along that timeline, and I experimented a lot while I was using Python.
16:13callenjustin_smith: yeah, I did Ruby, Haskell, C++, and others during the Python time period.
16:14justin_smithI dreamed at one point of a language with first-class emacs highlighting as a syntactic element (you would change faces to change what role the code had) - it was fun to play with but for obvious reasons it fizzled
16:14callenMostly because Python felt neutered.
16:15Okasuls ~/coding => ada clojure cpp java lisp(it's scheme/CL) prolog ruby c coq erlang haskell J javascript R
16:15lazybotdata dev etc home lib lost+found media selinux srv sys tmp usr
16:15hyPiRionWell, I've done a lot of other PLs, but I don't consider them my favourite go-to PL.
16:16ToxicFrogI never really got into Python. I mean, I use it, but it doesn't really click for me.
16:16ToxicFrogBy the time I started using Python (which was quite late; university) I already knew Lua and preferred that.
16:17arrdemlua is awesome, but I'm used to reaching for python first...
16:18Okasuarrdem: Heh, i guess i'm not the only one seeing pun in "lua is awesome", but awesome is sucks.
16:18Okasutime du -mhs ~/codingtime du -mhs ~/coding
16:18Okasu3.0G/home/george/coding
16:18justin_smithI've only used lua to configure window managers - is it highly string oriented or is that a misapprehension?
16:18arrdemOkasu: awesome is really unfortunately bad
16:18Okasudu -mhs ~/coding 0.27s user 1.43s system 4% cpu 40.560 totaldu -mhs ~/coding 0.27s user 1.43s system 4% cpu 40.560 total
16:19ToxicFrogarrdem: for me the main thing is that for small stuff I reach for lua, and for big stuff (i.e. stuff where I want a big, easily managed library ecosystem) I bypass python entirely and reach straight for clojure or scala, depending on how statically typed I'm feeling.
16:19ToxicFrogjustin_smith: I'm going to say "a misapprehension" with the proviso that I'm not entirely sure I know what you mean by "highly string oriented".
16:20justin_smithToxicFrog: the way clojure is heavily hashmap oriented - using strings as a go to datastructure and intermediate representation in algorithms etc.
16:21arrdemToxicFrog: yeah sounds about right. I hammered out cortex (http://github.com/arrdem/cortex) in the last week in python, but TBH that's because I don't feel comfortable with Clojure's semantics writing cli apps.
16:21ToxicFrogjustin_smith: oh. Yeah, in that case the answer is "lua is heavily hashmap oriented, but unlike clojure it presumes mutability"
16:21callenarrdem: really?
16:21callenarrdem: what about it don't you like?
16:21ToxicFrogIf you find yourself stuffing things into a string rather than using tables you've gone horribly wrong somewhere.
16:22ToxicFrog(similarly, if you publish an API that requires users to pass functions to you by name rather than by value, I will break your kneecaps)
16:22ToxicFrog(I'm looking at you, xchat lua plugin API(
16:22Okasuarrdem: I really liked clojure.contrib.command-line.
16:22arrdemOkasu: I'm younger than contrib :P but I'll take a look at it
16:23justin_smithdoesn't the warm up time make clojure kind of tedious for most idiomatic command line usage?
16:23arrdemjustin_smith: yeah that's one problem
16:23Okasuarrdem: Younger?
16:23arrdemOkasu: I came to clojure after Contrib bit the dust is what I mean
16:23ToxicFrogjustin_smith: that said, lua is reasonably alright at string processing, and the strings are 8-bit clean so they get used for arbitrary data buffers, not just text - but the only time you'd pack things into/out of a string rather than using an actual data structure is when interfacing with something else that only talks strings.
16:23ToxicFrogLoading/saving config data from disk, for example.
16:23mdrogalisarrdem: Contrib "predates" you :)
16:24arrdem^ THAT
16:24hyPiRionarrdem: Yay for younglings!
16:24arrdemI think that Raynes is the only one here younger than me...
16:24callenarrdem: it could be resurrected :)
16:24Raynesarrdem: There was a fellow here with Foxboron that was < 16.
16:24RaynesNot sure if he is still around.
16:25arrdemdamn...
16:25ToxicFrogjustin_smith: so I guess what I'm saying here is that if awesomewm is using a "heavily string oriented" lua API, they're probably doing something wrong~
16:25callenLOL
16:25arrdemmy todo list is where ideas go to die :P
16:26arrdemcallen: we should do a refheap clone that's "project ideas I'll never get to, someone build this"
16:27callenarrdem: I do a pretty good job of draining my list. There are things like you describe out there.
16:27arrdemcallen: good on you. I'm really bad about never getting to or finishing things.
16:27hyPiRionarrdem: That's a good idea, unfortunately you just said that your todo list is where ideas go to die.
16:27callenarrdem: make me aware of them.
16:27callenarrdem: even if I don't do things, I make people aware of what the community's needs are.
16:28callendo things specifically myself, that is.
16:29arrdemhyPiRion: thank you for catching the unhandled recursive case :D
16:31lynaghkAre there any libraries that extend clojure.set with outer joins? I saw this SO post http://stackoverflow.com/questions/13009939/outer-join-in-clojure?lq=1 but would prefer to pull in a lib from maven rather than copy/paste.
16:32callenlynaghk: https://github.com/francoisdevlin/devlinsf-clojure-utils/blob/master/src/lib/sfd/table_utils.clj#L39-L49 ?
16:33lynaghkcallen: right, I just wanted to ask if there was something like that on clojars already that works with clojure 1.5
16:34nopromptlynaghk: yeah i was hoping for something like that the other day myself.
16:41noprompthas anyone ever tried to target both nodejs and "standard" cli
16:41nopromptthat was a question. :|
16:41arrdemI'm trying to target raw asm.. does that count?
16:41callennoprompt: wat
16:41nopromptcallen: not wat
16:42callen"target"? Like, with a rifle?
16:42noprompti'm being totally cereal here.
16:42callenbecause I'm down with hunting the least dangerous game - Node.js users.
16:42callen(I'm serious in that I don't understand what you're asking)
16:43nopromptbasically i'd like to compile to js targeting node and a jar with a -main fn. i'm trying to share as much code between the two as possible.
16:43arrdemcallen: he's asking if anyone here is writing clojure apps that run both as clojure apps and as cljs apps
16:43callenoh.
16:43callennoprompt: lots of cljx?
16:44nopromptcallen: well, i was just using the crossovers option in :cljsbuild
16:46nopromptshould i use cljx?
16:46noprompti guess i should
16:46lynaghknoprompt: it's kind of a hack, but so is everything I've seen that tries to solve this problem
16:49nopromptlynaghk: that's pretty neat. for some reason i'm having a bit of trouble getting everything to work out with crossovers.
16:50lynaghknoprompt: yes, crossovers is much more of a hack
16:50lynaghknoprompt: I haven't been using cljx lately, but I know cemerick has been using it a ton with success.
16:51nopromptlynaghk: do you use crossovers?
16:52dnolenok this, http://gist.github.com/swannodette/6273757 + core.match could be really, really, really sick
16:53lynaghknoprompt: no, I use cljx.
16:53dnolenyou can pass the result of dispatch into tap, dispatch itself can use core.match to determine the key
16:53dnolenanybody downstream can tap their own dispatch/lookup
16:54dnolenclose to predicate dispatch at the event level :D
16:55bbloomdnolen: why are you using vectors instead of sets?
16:55dnolenbbloom: could use sets, but I guess I thought preserving listen order might be important - maybe not?
16:55bbloomdnolen: that's what i was wondering about :-)
16:56bbloomdnolen: seems like i'd rather break listening order, since it's almost always a nightmare to depend on that
16:56bbloomespecially if you had mutliple threads & wanted to have concurrency in -invoke
16:56dnolenbbloom: true enough
16:56bbloomneat though
16:58bbloomi still want an -reachable? method & then have subscribe/unsubscribe methods maintain a global set of all subscriptions, then occasionally walk that set & unsubscribe to anything that's not "reachable?"
16:58bbloomfor DOM, reachable? would == attached?
16:59bbloomi'm gonna convince somebody someday that garbage collection is more widely applicable than language VMs :-)
17:06dnolenbbloom: sounds like a pretty straightforward thing to do for MVC type things, not sure you can anything about the DOM though
17:06bbloomdnolen: do you ever care about events from detached nodes?
17:08cemericknoprompt, lynaghk: I actually added a reference to another nontrivial project using cljx, some clojure/cljs validation lib
17:08cemerickadded to the cljx README, that is
17:08dnolenbbloom: I'm more worried about the leaks because of not cleaning up
17:08bbloomdnolen: but i'm advocating for automatic clean up...
17:08lynaghkcemerick: cool, thanks.
17:09dnolenbbloom: well you're talking about automatic unsubscribe
17:10bbloomdnolen: yeah, i'm saying if you stop listening to a channel, you shouldn't have to manually unsubscribe the source
17:10bbloomdnolen: i might read one message and then i shouldn't have the burdon of associating a channel w/ the subject & then communicating to the subject that i'm done
17:11nopromptcemerick: thanks. i'll take a look. i'm trying to have frak be usable from clj, cljs, and the command line both for nodejs and with lein run etc.
17:11bbloomjquery enables auto-unsubscribe by forcibly overriding dom remove operations, but then must also provide detatch & attach methods to handle the case of not paying the unsub/resub cost
17:11dnolenbbloom: what do mean stop listening on a channel? you don't explicitly listen on one anyway, you just read values off it, when you're done, you're done
17:11callennoprompt: that's pretty cool :)
17:11noprompti guess that's probably pretty rediculous but i think cljx is probably what i'll need to use.
17:12dnolenbbloom: this problem only occurs w subscribe/unsubscribe, not core.async
17:12dnolenplain core.async
17:12cemericknoprompt: frak is jkk's thing?
17:12ucbcallen: http://www.youtube.com/watch?v=5l3wkOeBLuY
17:12callenI'm not sure I believe in channels and events.
17:12bbloomdnolen: i know, that's why i'm saying that there needs to be a solution for dealing w/ "subjects" to use the Rx terminology
17:12nopromptcemerick: frak is my thing. :)
17:12bbloomdnolen: Rx.net utilizes explicit Dispose calls
17:12bbloomdnolen: i think that sucks
17:12callenI'm pretty sure message passing over a channel is a poorly implemented ephemeral database of facts.
17:12cemericknoprompt: oh, oh, *frak*, right :-P
17:13dnolenbbloom: you mean users need to call that
17:13bbloomdnolen: yeah, but only if your Observables have an underlying Subject
17:13nopromptcemerick: it seems people want it for all four targets. :/
17:13cemericknoprompt: cool thing, that
17:13bbloombut then you wind up with all kinds of ownership problems
17:13bbloomit blows
17:13callenucb: http://www.youtube.com/watch?v=xIVIEqrfszg
17:13ucbcallen: <3 the cover art
17:14dnolenbbloom: huh well I'm working on another MVC like thing called app-state, it could probaby talk to dispatchers and remove them as long as the keys correspond
17:14nopromptcemerick: thanks. as of last night it's a bit better. still a wip, bit of a pita.
17:14bbloomdnolen: jquery has remove and detatch, the former unsubscribes handlers & the later holds on to them. if you don't re-attach a detatched thing, you leak. if you do re-attach a removed thing, you have to manually resubscribe & pay that cost
17:14nopromptcemerick: btw that youtube clip on the austin readme, i lolled.
17:14callenucb: this is some good Summoning.
17:14bbloomdnolen: i'd like to be able to remove/re-add/whatever & then have some system patch up the channels/subscriptions to make sense
17:14cemericknoprompt: oh, why?
17:14cemerickoh, the clip
17:14nopromptcemerick: yeah, good stuff.
17:14bbloomdnolen: so i pay an amortized cost & don't have both removal primitives
17:15cemerickI thought you meant my walkthrough. Which, I can see people laughing at, too. :-P
17:15dnolenbbloom: interesting idea, probably makes sense to build the basic components and see how they wire together
17:15bbloomdnolen: yup, that's what i was proposing we think about some more. react.js does this, but the subsystems are tied together (relatively loosely, but concretely)
17:15nopromptcemerick: oh. yeah, i didn't laugh at that. it's awesome you did that. it's inspiring.
17:16nopromptcemerick: what application do you use to make those videos?
17:16cemerickWell, I wanted to make it clear what's going on.
17:16cemericknoprompt: that was screenflow
17:17cemerickhopefully there's a non-shite linux equivalent
17:17callenucb: we had a duel of the music and you won. I like that Black Moth song but Summoning is lovely.
17:18dnolenbbloom: right now I'm thinking about event dispatch perf mostly, it boggles the mind that Backbone and Ember are so slow
17:18ucbcallen: I wouldn't call it a duel; I'd call it an amicable exchange. And that Black Moth tune is smashing. I'd never listened to their stuff before and now I'm queuing songs left and right.
17:18nopromptcemerick: i think might have to try doing something like that for garden when i push out the 1.0.0 this month.
17:19callenucb: I figured it'd be up your alley :)
17:19bbloomdnolen: i dunno anything about ember, but how slow can backbone possibly be? i mean it just maintains a list of subscribers & bubbles them in a straightforward linear way
17:19nopromptneed to get that working with cljs...
17:19ucbcallen: much appreciated :)
17:19bbloomdnolen: the typical usage of backbone leaks memory like crazy, but that's a different story
17:19dnolenbbloom: http://jsfiddle.net/jashkenas/CGSd5/
17:19noncomlein uberjar does not compile java-sources.. why so?
17:20noncomi have the path set
17:20bbloomdnolen: ember is slow, but backbone seems fine in that particular benchmark
17:20dnolenbbloom: that's only 100 elements, it gets really slow as you increase the number
17:20nopromptthere was a cool fiddle comparing backbone, ember, and angular. ember was super slow.
17:21dnolenbbloom: this very likely something you can address via buffering, but nobody exposes that
17:21bbloomdnolen: this isn't doing any dispatch at all
17:22bbloomdnolen: the general slowness w/ backbone is coming from rerendering from scratch via the template every frame
17:22bbloomit's also using jquery's html method, which does like 78390589353 platform compat things
17:22patchworkWhen using % lein ring server from the command line, how do I prevent it from reloading?
17:22patchworkIt seems ring-reload is built into ring server
17:22srrubyAnyone remember the keyboard shortcut to run the current file in the lein repl? This is in gvim. I'm using vim-clojure-static and vim-fireplace .
17:23noprompthere's the angularjs version of that http://jsfiddle.net/mhevery/vYknU/23/
17:23dnolenbbloom: yes that's a problem to, but Backbone doesn't batch events, every attribute set will cause event dispatching as far as I understand it.
17:24bbloomdnolen: sure, that sucks, but nobody is listening to those events, so it's just 100 no-ops
17:27dnolenbbloom: not a noop, it doesn't trigger set html calls
17:27srrubyI found the answer: c-p-r
17:27dnolenbbloom: but you are right the benchmark is flawed for Backbone, it doesn't measure event perf
17:27bbloomdnolen: yeah, that was my main point :-)
17:27dnolenbbloom: and Ember (whatever version this is) is catastrophically slow
17:27bbloomdnolen: anyway, please please please look at react :-)
17:28bbloomdnolen: i'll keep mentioning it to you until you come back to me & tell me how awesome it is
17:28dnolenbbloom: haha
17:28bbloomit demos poorly, but it's implementation is brilliant & will clearly scale to larger apps better than anything else i've seen, including my previous favorite: angular
17:29bbloomit demos poorly b/c it looks familiar enough to feel like it's not different at all & is slightly more verbose b/c it actually covers the essential nature of UI modularity
17:29bbloomyou have to study the implementation to really understand why it's so awesome
17:31ucbcallen: http://www.youtube.com/watch?v=w2PwS8FCfxo
17:32callenucb: yeah I'd seen that.
17:32ucbcallen: first time for me o_O
17:32callenI don't like the music that play in the background in the intro
17:32callenthe nursery rhyme stuff
17:33srrubybbloom: what is the URL for react ? I'm not familiar with it
17:33dnolenbbloom: never could get excited about Angular, is there any way for me to understand React without wading through the source code?
17:33bbloomsrruby: http://facebook.github.io/react/
17:33srrubybbloom: Thank you.
17:33bbloomdnolen: the new docs are much better than they were a few months ago: http://facebook.github.io/react/docs/getting-started.html
17:33bbloomread down the left column, shouldn't take you more than an hour
17:34bbloomcan probably skim it in 10 minutes, but the key ideas need some baking time :-)
17:34callenucb: the funny part is it's sorta vanilla black metal, which is totally unexpected.
17:34ucbcallen: well, she's 6, right?
17:35bbloomdnolen: my excitement about angular was for smaller apps, it gets messy fast for larger stuff w/ lots of directives. not so w/ react
17:36srrubybbloom: This is a clojure chat room. Are you using clojurescript on the front end?
17:36callenucb: I mean that in a show of admiration. black metallers are all about "trve kvlt"
17:36bbloomsrruby: i'm a contributor to the cljs compiler, but i don't use it for any client work or anything like that b/c there isn't a mature enough library that i like for typical UI work.
17:37ucbcallen: heh
17:37bbloomsrruby: i think that react is relevant b/c it's a largely functional design that would map cleanly to cljs
17:37srrubyThanks.
17:38bbloomi'm also not so subtly attempting to get dnolen to implement it for me :-)
17:38bbloomor at least collaborate with me to implement it
17:38callenbbloom: Tom Sawyer
17:38dnolenbbloom: I still don't see what I'm supposed to like about react, you wade through a lot of stuff in these docs
17:39bbloomdnolen: that's what i was saying, it doesn't demo well. it looks like everything else you're used to on the surface
17:40bbloomdnolen: but your render code is a pure function that returns a DESCRIPTION of the subtree, not an actual subtree.
17:40callenmost web sites, applications, or much of anything will never need anything like what facebook writes libraries for.
17:40bbloomdnolen: state is stored in a global state map & it's lifetime is automatically managed by component ID corellation
17:40callenJavelin comes to mind WRT React.js
17:41bbloomdnolen: pervasive memozation of rendering results powers fast DOM updates
17:41bbloomdnolen: it's functional, w/ a little dash of objects for stateful components. it's a really nice balance. really, don't ignore it or write it off
17:42callen"functional", with global mutable state?
17:42bbloomcallen: in a pure functional setting, global mutable state is the ONLY kind of state
17:42bbloomhttp://awelonblue.wordpress.com/2012/10/21/local-state-is-poison/
17:42dnolenbbloom: this all stuff that I like, but I mostly get bored looking at this code - classes, mixins, snore
17:43bbloomdnolen: don't think of it like classes and mixins
17:43callenReligion $A is bad, lets all go to the other side of the boat! Boat is tipping over, lets all go to the other side of the boat!
17:43bbloomdnolen: think of stateless components as templates & stateful components as go-routines
17:44bbloomdnolen: you could trivially replace their class model w/ a go-routine. all of the "object lifetime" methods correlate to (do 1 (loop [] 2 (when 3 (recur))) 4)
17:44callenI'm sympathetic to what you said, but I'm having a hard time seeing why there's a coherent "improvement" involved to using React.js over AngularJS.
17:44bbloomdnolen: plus some extra states for mount/unmount to/from the dom
17:44dnolenbbloom: yes, yes I get all that. I'm more excited about your succinct description then Reacts docs or codebase
17:44bbloomdnolen: i'm not saying you should use react, i wouldn't want to give up cljs, i'm saying you should study it
17:45dnolenbbloom: but the parts worth studying can be described in like a paragraph
17:45dnoleninstead of me reading all this boilerplate code
17:45bbloomdnolen: it can only be described in a paragraph if you have been paying attention to rich hickey for years :-)
17:46bbloomdnolen: hence they don't assume such a background in their docs
17:46bbloomdnolen: i've studied like 3978589353 UI toolkits & this is the first one for html/dom that ever made me go FINALLY.
17:47bbloomjust replace each class name with a keyword, & it's basically a functional program :-P
17:47callenI should write an FRP library for CLJS just so bbloom begrudgingly uses something I made.
17:48bbloomcallen: i don't believe in signals/behaviors style FRP
17:48bbloomand i've read the literature.
17:48callenwhatever, the point is, I'm going to subvert your fetishes and make you mine.
17:48bbloomcallen: dude, go away.
17:49noncomif in lein plugin i want to concat to a list that holds symbols, like :aot, how do i go about it?
17:50callennoncom: you mean you want to preprocess the project.clj?
17:50noncomno-no, i am ok with this. just how i properly append the symbol-type values?
17:50djanatynI came up with a panel wrapper thingy for quil :)
17:50djanatynhttp://sprunge.us/JPJU?clj
17:51djanatynnow I can just throw up a quil window and do what I would like to it
17:51djanatynI should have some atom painter dude that I can throw functions to and then he'll do it on the canvas
17:51technomancynoncom: update-in+concat you mean?
17:51noncomi do like (update-in project [:aot] concat ['my-project.core 'my-project.something])
17:51djanatynbut I'm kind of wondering why quil doesn't support this thing already!
17:51bbloomdnolen: the mixins bit is the one part of react that is just kinda wrong
17:51technomancynoncom: sure
17:51noncomyeah, is the quote-syntax correct here?
17:51technomancyyeah
17:51bbloomdnolen: it's just a bad primitive unit of reusable state / behavior
17:51bbloomdnolen: but it plays nice w/ javascript, so it's not the end of the world
17:51noncomwell, it does not aot them...
17:52noncomi spit the modified project.clj to a file just before calling uberjar and it says :aot (lein-natives-test.core jcl.ep)
17:53noncomthose are the correct nss to aot
17:53technomancynoncom: in some cases a profile-merge down the line could lose your changes; if you express it in terms of merging your own profile it can be preserved
17:53nopromptlynaghk, cemerick: so, this cljx doohickey is pretty sweet.
17:53technomancynoncom: this is a really yucky downside to the way lein implements profile unmerging
17:53noncomumm...
17:54technomancyhopefully all that can go away in 3.0
17:54noncomdjantyn: what is panel wrapper in your code?
17:54noncomtechnomancy: what can i do for now?
17:55dnolenbbloom: there very few things I like less these days than OOP JS
17:56noncommake user explicitly designate aot targets?
17:56nopromptdnolen: i'm teaching an introductory javascript course starting next week, trust me i'm going to more than impart that same sentiment.
17:56dnolenbbloom: I also don't know if I'm totally sold on this DOM rep model
17:56bbloomdnolen: i agree 100%, hence why I actually like react. it's functional programming in disguise
17:57bbloomdnolen: you mean the tree of components?
17:57dnolenbbloom: it seems hard to represent subtle transitions
17:57dnolenbbloom: a la OS X Layer stuff
17:57technomancynoncom: probably best to make the user specify targets, but if you want to change project.clj in a way that's compatible with profiles check out noncom: https://github.com/technomancy/leiningen/blob/stable/doc/PLUGINS.md and grep for "merge-profiles"
17:57bbloomdnolen: yeah, it's definitely not an ideal UI representation, but it's very close to the DOM model
17:58dnolenbbloom: but this is why I'm not excited about it, baked in assumptions about the underlying rep
17:58bbloomdnolen: generally, flatter is better. games are usually *completely* flat databases of world space objects
17:58bbloomdnolen: UIs could be that way too, but that's a more dramatic change & doesn't play nice w/ lots of other stuff
17:59bbloomdnolen: i'm with you on that too. i've been thinking about how to raise the abstraction bar on UI, but i think any design would take aspects of react's design for granted: partitioning of parameters & state, explicit IDs, pervasive memoization, diff-based rendering, etc
17:59bbloomdnolen: forcing a hierarchical structure is bad, but the DOM already does that too you
17:59bbloomdnolen: transitions that traverse the UI hierarchy are hard no matter what you do
17:59noncomtechnomancy: that doc i've been reading for the past couple-o-days :) in my plugin i create aot targets programmtically, but i will try making them a part of the plugin profile that user has to specify.. although that would be a mystery for the user, what are these aots
17:59dnolenbbloom: we should definitely look at some possible designs when we meet up
18:00bbloomdnolen: generally, the trick is to hoist the transitioning component either to a totally detatched layer, or to just send it to the lowest common anscestor
18:00bbloomdnolen: you can do the same trick in react, but it's very explicit
18:00technomancynoncom: oh, if they're generated namespaces then yeah; better to use merge-profiles
18:01dnolenbbloom: another reason I'm interested in this is I'm pretty psyched about using CLJS for OS X where the rep is not DOM
18:01dnolenbbloom: and iOS
18:01dnolenbbloom: so anything to DOM centric needs to be ditched
18:01dnolens/to/too
18:01bbloomdnolen: i think you should be interested in it from the perspective that you can steal 80% of the design and have an absurd head start on the problem
18:01noonianwhat are peoples preffered ways for managing database migrations? I've used lobos a bit, and am looking at ragtime now but it seems like there are a lot of libs out there
18:04technomancy~clojars migrations
18:04clojurebotHuh?
18:04technomancy=\
18:04technomancy~migrations
18:04clojurebotPardon?
18:04bbloom$clojars migrations
18:04technomancydang it clojurebot
18:04bbloombooo
18:05technomancyclojurebot: clojars migrations |are| done with a few trivial defns: https://github.com/ato/clojars-web/blob/master/src/clojars/db/migrate.clj they don't support down-migrations or db-agnosticism, and this is a good thing
18:05clojurebotRoger.
18:05technomancynoonian: ^ I recommend this approach
18:05bbloom(inc technomancy) ; for lack of down-migrations & db-agnosticism
18:05lazybot⇒ 68
18:07nooniantechnomancy: thanks, could you explain why not having down-migrations and db-agnosticism is a good thing? I can see why down could be bad outside of a development context. is the idea just that db-agnosticism impedes transparency?
18:11technomancynoonian: neither down-migrations or db-agnosticism actually work on nontrivial real-world codebases
18:11noprompt,l
18:11clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: l in this context, compiling:(NO_SOURCE_PATH:0:0)>
18:11noprompt:(
18:11technomancydown-migrations get added but never tested, giving you a false sense of security
18:11dnolensweet I just ran CLJS on my iPad Mini via Ejecta
18:12technomancy"if something goes wrong it's OK; I'll just reverse the migrations" <- no you won't; they don't actually work that way
18:12nooniantechnomancy: thanks
18:13technomancydb-agnosticism is similar, it's incredibly difficult to avoid reliance upon implementation details in DDL since it's not remotely standardized the way regular SQL is
18:13arohnertechnomancy: though I'd dispute that even regular SQL is standardized
18:13arohnerand the semantics certainly aren't
18:13technomancyif anything you want to over-specify your DB and ensure that everyone on your team is running the exact same point release of postgres or whatever
18:14technomancyarohner: heh; oh yeah that's its own can of worms for sure. but at least there's a token effort; with DDL there isn't even that.
18:15callen50 Shades of Grey Standards
18:17bbloom"if anything you want to over-specify your DB" <- yes. you should have to opt-in to generic behavior & you should only do so cautiously. vendor everything!
18:18hyPiRionif anything, we know that standards may be interpreted in many ways. Look at html, css and friends, for instance.
18:19shriphanihi I have a question about clj-webdriver. I have perused the API but I can't find a way to scroll. Can anyone tell me if this is supported or should I use something else ?
18:23callenshriphani: the same way you scroll in any other webdriver library. Execute scroll(0,pixels); in the JavaScript context.
18:26callenshriphani: you should rarely, if ever be scrolling manually. You should be targeting elements/content and making them visible, it'll automatically handle scrolling as necessary.
18:26callenshriphani: have you read the Selenium documentation?
18:27shriphanicallen, I want to go through an item only available through infinite scroll.
18:28shdwprinceping
18:29callenshdwprince: you didn't ping anyone.
18:29callenshriphani: your first mistake was using infinite scroll.
18:29shdwprincebad
18:29callenshriphani: your second mistake was not adding the ability to jump by primary key in the paginator.
18:29callenshriphani: your third mistake was trying to test infinite scroll.
18:29shriphaniI'm scraping a 3rd party site...
18:29callenshriphani: good news, you can fix it.
18:30callenshriphani: oh you're boned then. JS executor context hack away then.
18:30callengodspeed.
18:30shriphanisaid third party's site breaks if visited without js enabled.
18:30callenshriphani: my advice? an infinite scroll usually means AJAX.
18:30shriphaniyeah.
18:30callenshriphani: AJAX means there's an API
18:30callenbrotip: APIs are easier to scrape than infinite-scrolling HTML pages.
18:30callenjus' sayin'
18:31shriphaniwell the official API broke support for what I wanted.
18:31callenshriphani: why not watch the requests the browser is making and emulate those?
18:31shdwprinceuse insider api, be bag guy
18:32callen(づ。◕‿‿◕。)づ shriphani - it's going to be okay.
18:32Apage43chrome inspector, network tab
18:32ucbJAKE!
18:33Apage43esp. "Copy as cURL"
18:33Apage43which copies a curl command that duplicates that request exactly onto your clipboard
18:33callenApage43: that's sexy. didn't notice that.
18:34RaynesI've used that before.
18:34callenI need to pay more attention.
18:34RaynesI can confirm best thing ever.
18:34brehautApage43: does that grab the cookie ajar too?
18:34brehauts/ajar/jar/
18:34Apage43yes
18:34brehautmagic
18:35Apage43I mean, it copies it as -H 'Cookie: whatever=yeah;'
18:35Apage43but the cookie is captured
18:35callenApage43: you're my new favorite person.
18:35callenRaynes: you're fired.
18:35Raynesnoprompt: You're a monster for not going to that concert with me tomorrow.
18:35RaynesIt's going to be glorious.
18:35callenRaynes: why did you not tell me this? (ಥ﹏ಥ)
18:35RaynesBecause I'm very rarely a web developer.
18:35RaynesAnd you never ask me web dev questions.
18:36nopromptRaynes: :S
18:36noprompti'd be down to go see some good live surf music.
18:37Apage43there's also "copy as HAR", which is a JSON format that describes http requests.
18:37Apage43if you want to consume it programatically
18:37Raynesnoprompt: There's still time. There are $50 tickets on stubhub. It's only like a 3 hour drive from you. :P
18:38RaynesMake that 4 hour drive.
18:38nopromptRaynes: :P did i mention i'm moving? lol.
18:38RaynesBut the concert is at 9PM. You've got plenty of time.
18:38RaynesYour house can wait, this is important damn it.
18:38ucbRaynes: what band is this?
18:38Raynesucb: Panic! At The Disco.
18:40amalloyApage43: i never noticed the copy as curl option. i've wasted years of my life slavishly replicating requests from there to be curl-friendly
18:40Apage43I don't think its always been there
18:40ucbRaynes: never heard of them
18:40Apage43yeah
18:40Apage43it was added in Chrome 26
18:41Apage43so, march of this year
18:41amalloywell, that explains it, i guess. until recently i was on like chrome 12
18:41Raynesucb: http://www.youtube.com/watch?v=LUc_jXBD9DU and http://www.youtube.com/watch?v=TFSIm3Zeecg
18:41amalloyor some other decrepit version, because i hate upgrading
18:42ucbRaynes: you've shown me this before! :-o
18:43callenamalloy: I thought Chrome automatically upgraded. Did you neuter it?
18:43technomancyamalloy: upgrading is the worst
18:43amalloycallen: i think my distro did
18:43technomancythey should be legally required to call it sidegrading
18:43callenamalloy: that'd be chromium, no?
18:43amalloymy linux distro
18:44callen...
18:44callenthe browser would be chromium
18:44callennot google chrome.
18:44Raynescallen: Google Chrome has a PPA for chrome, bro.
18:44callenRaynes: that's not distro.
18:44callenthat's a PPA.
18:44callendistros cannot/do not distribute Google Chrome.
18:44callenthey distribute Chromium.
18:44amalloy*shrug*
18:44Raynescallen: And the PPA pipes upgrades which happen when you do apt-get upgrade...
18:44technomancydoesn't it depend on the distro?
18:45callentechnomancy: I'm pretty sure no Linux distro wants to be the asshole that distributes a binary stamped by Google.
18:45technomancythere are a bunch of too-cool-for-dfsg derivatives that will do pretty much anything
18:47callenwell. save for those.
18:47RaynesAnyways, he very clearly meant that his distro's normal upgrade process upgraded google chrome. He wasn't declaring that his distro went and got google chrome, installed it, and then started upgrading it.
18:47RaynesHe installed a PPA I expect, and that's what a PPA is for -- third party software integrated with Ubuntu's normal software management processes.
18:47callenmakes sense.
18:48callenexcept for the part where he never ran sudo apt-get upgrade
18:48RaynesHow do you know?
18:48amalloyi don't think i very clearly meant anything
18:48amalloyi was like like 'for some reason i don't care about, chrome was still old'
18:48amalloy"like like". god. "just like", please
18:56akurilinMVC + clojure question: what's pattern you'd recommend for validating model maps before persisting them? Would you call a validator from the controller before the save, or would you make validation part of save?
18:56noprompt:(
18:56callenakurilin: I don't believe in auto-validate->save
18:56noprompt;_;
18:57callenakurilin: I prefer to let the controller decide when to flush, since that's specific to business logic sometimes.
18:57calleneverything else about interacting with and transforming the data, or fetching new data will usually be in the "models"
18:57callen(and (validate-okay? instance spec) (save instance))
18:58akurilincallen, perfect, I was leaning towards that as well, but was wondering if that'd be a MVC faux pas
18:58akurilincallen, thank you.
18:58callenakurilin: people that are MVC fascists typically never actually used Smalltalk and for that matter, we're in FP land now. The rules are different.
18:59callenMVC, in the original form, involved prolifically stateful objects with no real specification and message passing.
18:59callenderive the value of the original purpose (separation of concerns) instead of slavishly obeying the forms. :)
18:59akurilincallen, I'd kill for a guide for MVC-with-LISP, since quite a few Railsism are no longer relevant.
19:00noprompti'm a just write the fucking program fascist.
19:00callenakurilin: goin' on the to-do list.
19:00callenakurilin: thanks.
19:00nopromptakurilin: why would you want that?
19:00glosolihttp://imgur.com/WPHQQ0z desperately trying to find face for that using that cyan color which is barely visible, any ideas ?
19:01akurilinnoprompt, what specifically?
19:01callenakurilin: another common pattern for me is (save-if-okay instance spec) => {:id 1 :error nil}
19:01glosoliit should be some sort part of nrepl, can't find though
19:01nopromptakurilin: i guess i'm asking why is MVC so important to you?
19:01akurilinnoprompt, it's not, it's just that I don't know any better.
19:01nopromptakurilin: for the record i'm not being a prick.
19:02callennoprompt: MVC is a pretty good "default" way to separate concerns in a lot of applications for which the concepts are relevant.
19:02akurilinnoprompt, I'd be very happy to use a different approach as long as I can learn more about it from somewhere.
19:02callenpresentation, logic, and persistence all to their own little happy boxes isn't a bad way to go at all.
19:02callenthere are other ways, but anything can work as long as a design principle is involved.
19:02nopromptakurilin: i kind of wanted the same thing when i came to clojure from ruby.
19:03akurilins/different/better for clojure/
19:03nopromptbetter is a matter of perspective.
19:03callenI've seen some weird patterns in my Clojure Ring apps sometimes for what could fairly be called CRUD
19:03callenspecifically higher order functions wrapping things fronting the view-specific parts. Not dissimilar from decorators in python.
19:04callenI call it weird not because HOF are weird, but because it *looks* weird for a web dev perspective.
19:04noprompti guess i don't necessarily look for ways to fit my problems to patterns.
19:04akurilinnoprompt, do you have any alternatives to MVC in mind I could read up on?
19:04callennoprompt: that's not necessarily what's going on here.
19:04callennoprompt: people are just looking for vases for their flowers.
19:05callennoprompt: I'd relax, were I you and not me own self. :)
19:05nopromptakurilin: no. i don't think that's the "right" way to go about solving problems or building applications.
19:05akurilinnoprompt, I feel like we're just looking for a wee bit of structure, but the goal is maximum minimalism and minimum boilerplate.
19:05nopromptakurilin: you should let your problem domain determine your architecture.
19:05callenakurilin: it's not a super clean or principled example, but you could always look at Neubite.
19:05akurilinnoprompt, that's fair, can't argue with that.
19:06callennoprompt: nobody's saying it shouldn't. it's just that when you're starting empty before you know the problem, some good ways to separate fns can be nice.
19:06nopromptakurilin: if you decide on a "pattern" or architecture up front you're doing too much work.
19:06sevvie"looking for vases for their flowers" sounds like a really polite way to say "bikeshedding."
19:06callenakurilin: http://github.com/bitemyapp/neubite/
19:06callensevvie: vases live in homes and you have to look at them daily, the same is not true for bikesheds.
19:06callensevvie: are you familiar with flower arrangement?
19:07nopromptakurilin: the best advice i can give you is be generic.
19:07akurilincallen, is that a take on a ring app? Along the lines of Luminus?
19:07callenakurilin: it's not a "take", it's just a hybrid Luminus/Ring app.
19:07nopromptakurilin: for example don't start with the concept of a "model", rather start with the concept of "data".
19:07akurilincallen, ok.
19:07callenakurilin: it's a minimalist CMS with the ability to make little internal web apps.
19:07callenakurilin: it runs http://bitemyapp.com/
19:08nopromptam i making sense here? sometimes i feel like i'm just talking out of my ass.
19:08akurilinnoprompt, that's fair. Does "model" immediately imply that you have a wrapper object for it with its own functionality rather than just a blob of data?
19:09callennoprompt: look at neubite.
19:09callenit's just functions that do things or return data.
19:09callenthere's no frippery or architecture astronomy here.
19:10akurilincallen, yeah thanks for that link, I've been meaning to cherrypick Luminus or another web app for a long time, for ideas.
19:10callennoprompt: it's just a vase. let him get started on his flowers.
19:10callenakurilin: it's my test bed for Ring libraries I work on as well. You should probably eyeball my github if you do web.
19:11akurilinsounds good, who are you on github?
19:11sevviecallen: I occasionally dabble in arranging flowers.
19:11sevvieOne of those things one does to relax.
19:11akurilinI love this channel, things get very zen very fast. Always puts a smile on my face :)
19:12callenakurilin: bitemyapp
19:12callenakurilin: github.com/bitemyapp/
19:13callensevvie: very good. Then you get the feel of what I mean. No malice, no judgment, just a vase. :)
19:13callenbikeshedding implies derision where I mean none.
19:14akurilincallen, awesome, following you. Is your avatar from Gon?
19:15nopromptakurilin: OOP always made me feel unhappy. i had a lot of bad experiences with agressive OO folks and the literature generally felt like it was full of shit.
19:16callenakurilin: I'm not sure, I originally edited it out of a wallpaper from wallbase.cc. My "avatar" in personal life and otherwise has always been a bear of some kind and it seemed perfect. There's a non-sunglasses version out there.
19:16callennoprompt: relax. bad code is bad, good code is good. No label singularly and conclusively decides which is the case.
19:16nopromptcallen: this is also valid.
19:16nopromptcallen: like it said i just had a bad experience with the whole thing.
19:17rhg135hello, quick ?, any idea why '(take 5 (shuffle (lazy-seq (concat (repeat true) (repeat false)))))' times out on lazybot?
19:17rhg135it appears somethings not lazy
19:17callennoprompt: don't project. You're among friends. It's okay.
19:18bbloomrhg135: shuffle is eager
19:18bbloom,(shuffle (range 5))
19:18clojurebot[2 3 0 1 4]
19:18rhg135oh
19:18bbloomquite clearly returns a vector & not a seq
19:19rhg135ok
19:19rhg135forgot lol
19:19nopromptcallen: yes. everything i say is delivered in a relaxed tone.
19:19TEttinger,(shuffle (take 5 (lazy-seq (concat (repeat true) (repeat false)))))
19:19TEttingernope, is concat eager too?
19:19clojurebot[true true true true true]
19:19rhg135yup
19:20bbloomconcat is lazy
19:20rhg135well sorta
19:20callennoprompt: my point was more to stop hijacking akurilin :)
19:20rhg135it evals the first 3 args i think
19:20TEttingeroh, right. darnit
19:20TEttingertake 5 will just get...
19:20bbloomrhg135: more generally, shuffling a collection of unknown size doesn't make sense at all really
19:21rhg135yup
19:21bbloomrhg135: see http://en.wikipedia.org/wiki/Reservoir_sampling
19:21hyPiRionTEttinger: probably more like ##(repeatedly #(rand-nth [true false]))
19:21lazybotjava.lang.OutOfMemoryError: Java heap space
19:21rhg135ik now
19:21hyPiRionops.
19:21hyPiRion,(repeatedly 5 #(rand-nth [true false]))
19:21clojurebot(true true false false true)
19:21IamDrowsyconcating 2 infinite seqs doesn't make any sense either
19:21TEttingeryeah was just going to rewrite it with repeatedly
19:21nopromptakurilin: you're doing a good thing by bringing up these topics here though.
19:22callenmaybe. I'd like to spend less time hating some acronyms and loving others.
19:22callenand instead talk about code.
19:22rhg135thx
19:22TEttingerI want to code a puppy
19:22callenTEttinger: capital idea.
19:22rhg135ill try it on my bot
19:23nopromptcallen: right.
19:23justin_smithto get a random element you can take probabilities that start with 1/n, then 1/(n-1) ... until the last element has 1/1 chance of being chosen if you get that far; but with an infinite list that math makes no sense
19:23nopromptcallen: but we should heckle people, no?
19:24TEttingerPartial Uniform Prototypical Programming Y-combinator
19:24sevvieThis is a really great channel to watch.
19:24noprompthas anyone done cowsay in clojure? i want to do cowsay in clojure.
19:24nopromptloller.
19:24hyPiRion`lein shell cowsay moo`
19:25rhg135i used '(shuffle (concat (take 40 (repeat true)) (take 20 (repeat false))))'
19:25hyPiRionnot cowsay in Clojure, but gets the job done
19:25rhg135any better way?
19:25noprompt:P
19:25TEttingerrhg135, yeah
19:25TEttingerwait
19:25hyPiRionrhg135: (shuffle (concat (repeat 40 true) (repeat 20 false)))
19:25TEttingerdo you always want 40 true, 20 false?
19:25akurilinnoprompt, thanks, appreciate it. With clj I often feel like I'm doing way more work than I should be, and you guys are always gracious enough to show a few options I have.
19:26rhg135nope
19:26noprompt(take 40 (repeatedly #(rand-nth [true false])))
19:26TEttinger(take 40 (repeatedly #(rand-nth [true true false]))) ;; to weight true more heavily
19:26justin_smith(repeatedly #(rand-nth [true true false])) to preserve the probabilities
19:26rhg135well i want a fixed ratio
19:26justin_smithjynx
19:27rhg135its for rusian roulette
19:27rhg135for my bot
19:27nopromptwith real guns?
19:27TEttingerbots with guns
19:27rhg135i hope not
19:27TEttingernever gonna happen, not in a million splat
19:27nopromptoh hey, guns is here. :)
19:28gunslocked and loaded
19:28Rayneshttp://www.agorabooth.com/assets/product_images/product_lib/38000-38999/38022.jpg flutterbot.
19:28hyPiRionwell, if you only want to use a ratio, then I'd suggest the following
19:28rhg135yup
19:29TEttingerrhg135, so really, you want randomized order, not random individual placement chance of bullet or not/
19:29nopromptguns: i've finally made those improvements to frak. i'm just sorting out the command line nonsense on the same branch. bit of a mistake that was.
19:29rhg135yup TEttinger
19:30hyPiRion(defn ratio-true [p] (< (rand) p)), then do (repeatedly 40 #(ratio-true the-probability))
19:30nopromptguns: should be epic though. :)
19:30gunsnoprompt: That's awesome. I'm in no hurry. I saw you were trying to create a CLJS CLI wrapper; I've always wondered about that. How do you find it?
19:32rhg135its lines 2-4 of this https://raw.github.com/rhg/flutterbot/f5c9164d4ec28df428811d1c5acdc17cc2bc427c/src/lazybot/plugins/roulette.clj
19:32TEttingerrhg135, ohhhh
19:32TEttingerthat does what it should do
19:33TEttingerthe alternatives will not preserve a sane number of bullets every time
19:33rhg135ok
19:33rhg135i thought so
19:33rhg135just checking :D
19:34TEttingerI think we thought you were just using fixed numbers for placeholders, so you didn't have to define size and such in each message to eval with the bot
19:35TEttingeror to generate ratios
19:35rhg135no, the func takes args
19:35nopromptguns: this article http://mmcgrana.github.io/2011/09/clojurescript-nodejs.html
19:35amalloyincidentally, rhg135, you can give links like https://github.com/rhg/flutterbot/blob/f5c9164d4ec28df428811d1c5acdc17cc2bc427c/src/lazybot/plugins/roulette.clj#L4-L6 and not have to specify the line numbers "out of band"
19:35nopromptguns: i actually wanted to use your option parser though.
19:35rhg135now someone wants a pull loop
19:36rhg135thx amalloy
19:36gunsnoprompt: doesn't work in CLJS?
19:36gunsI should fix that then!
19:36rhg135coding time
19:36nopromptguns: yes! it'd be a strong selling point.
19:37TEttingerrhg135, if you want, I can give you some other, non-useful plugins I wrote for my lazybot
19:37TEttingerlike quote db stuf
19:37technomancywow, I forgot cljs existed in 2011
19:37callentechnomancy: what?
19:37gunsnoprompt: It only uses a couple of functions from clojure.string; I'll ping you when I look into it
19:38technomancycallen: I think of it as a recent development; 2011 feels like a long time ago
19:38rhg135ya, TEttinger
19:38nopromptguns: right. i noticed that. i think the only thing cljs was complaing about was the AssertionErrors.
19:38callentechnomancy: I parsed it differently. woops. Yeah I suppose it does.
19:38gunsnoprompt: ooohh, that's right.
19:40nopromptguns: i'm watching the repo now. :)
19:41gunsnoprompt: lol, okay. I'll push a change tonight
19:41nopromptguns: sweet. i'll look out for it!
19:44callenguns: who are you on github?
19:45gunscallen: github.com/guns
19:46callenoh good, a new goal.
19:46TEttinger3rhg135: https://gist.github.com/anonymous/6275383#file-last-clj-L166 change the highlighted line to match command prefixes, it also needs a special version of clucy for full-text search if you want that
19:47TEttinger3...clucy needs lucene, and you might not want the hassle
19:47callenTEttinger3: hassle how?
19:48TEttinger3I seem to recall the java side needed config
19:48callenTEttinger3: would a lightweight zero-config in-memory lucene index suffice?
19:48TEttinger3might be wrong
19:48TEttinger3I think so?
19:48callenk, adding to the to-do list.
19:48TEttinger3no don't worry about it
19:48clojurebotNo entiendo
19:49TEttinger3it works fine now that it's setup
19:49callenTEttinger3: it's not about you :)
19:49TEttinger3it never is ;.;
19:49callenTEttinger3: hahaha. aww. :) no it's just about being able to say, "ya, we got that" to coworkers.
19:49TEttinger3haha nice
19:50callen(Python has Whoosh, if you know what I mean)
19:50TEttinger3callen, it blows?
19:51pmonks:-D
19:51clojurebotI don't understand.
19:51callenTEttinger3: LOL
19:51callenjesus lol.
19:57callenTEttinger3: point being though, Whoosh is fairly lightweight and easy to use for Python users even if it isn't a very good idea.
19:57rhg135TEttinger, why?
19:57callenMaking doing the "right thing" easy is better.
19:58TEttingerrhg135, just making a pun on "has whoosh"
19:58rhg135i meant the link
19:58TEttingeroh
19:59TEttingerrhg135, so you can do stuff like `last-with users
19:59TEttingerand quotegrab uses some of that
19:59rhg135i dont understand
20:00TEttingerso, those are plugins for lazybot. one lets you fetch the last thing said matching some parameter, one lets you grab that line and save it for getting quotes or random quotes
20:00TEttingerlike
20:01TEttinger`grab TEttinger
20:01TEttingerdoesn't have that bot here
20:01TEttingerthen `quote TEttinger would be "<TEttinger> like"
20:02rhg135ohhhhhhhhhhhh
20:02TEttingerit's a common function of supybot based IRC bots, lazybot doesn't have it by default
20:02rhg135hmm
20:02rhg135i'll add it
20:04rhg135TEttinger, prefix or command-prefix
20:04TEttingerwhatever the bot gets commands from, like &load-pistol
20:04TEttingernot the eval prefix
20:04TEttingerthere should be only one dependency change, but I have no idea if lucene needs additional setup. if it does, remove all the -with functions and commands from last.clj , and remove grabwith, and you can take out the lucene dep.
20:04rhg135so @
20:05TEttingeryeah, probably
20:06TEttingerI've never had anyone else try to run this code, so no guarantees. I've been maintaining this set of plugins for about a year though
20:07rhg135set?
20:09TEttingeryeah, I actually have a few totally useless plugins I customized or made. none work very well except for quote, which is used the most anyway
20:10rhg135so leucene right?
20:10TEttingershould be picked up by lein deps
20:10TEttingerno idea if it will be
20:10TEttingerlucene also
20:11rhg135what's the data, never used it
20:11rhg135im newish to clj
20:11TEttingerthe data will be added with every message
20:12rhg135i meant the dep info
20:12patchworkUsing lein templates, how do I force lein to use the latest version of my template?
20:12patchworkI have released a new template jar on clojars, but lein still pulls in the previous version
20:12TEttingerit should be at the bottom in project.clj , same gist
20:12patchworkOr rather, lein keeps using the old version and doesn't search for the new version on clojars
20:12rhg135ah
20:12rhg135thx
20:13TEttingerthere should be 2 files that go in plugins
20:13TEttingerand a line to put in project.clj's dependencies section
20:13TEttingerdon't add :dependencies twice, yeah
20:13hyPiRionpatchwork: hm, can you run `lein -U new my-template library-name`?
20:13rhg135ok
20:15hyPiRionI'd either guess you're working with a snapshot or that you've forgotten to promote the template
20:17patchworkhyPiRion: lein -U new my-template library-name gives the same results
20:17patchworkIt is still using the template from the previous version
20:17patchworkno snapshot
20:17patchworkThe previous version is 0.1.1
20:17patchworkI have released 0.1.2
20:17hyPiRionpatchwork: hm, have you promoted it on clojars?
20:18patchworkit is still generating the 0.1.1 template
20:18patchworkhyPiRion: promoted? Hmm… not sure
20:18patchworkIs this a new clojars feature?
20:18patchworkI'll look it up
20:19patchworkhyPiRion: Ah, whoa
20:19patchworkYou mean signing with GPG?
20:20technomancypromotion shouldn't matter
20:20technomancyclients are probably caching the old release. weird that -U doesn't force it to re-check though
20:23patchworktechnomancy: Any leads? The only thing I can do to get it to work is to remove those jars from my local .m2 repo
20:24technomancypatchwork: what if you put :offline? true in the user profile? just for debugging's sake
20:27patchworktechnomancy: Same deal
20:28rhg135in quote.clj i get i have no quotes ... and last causes the compiler to bitch about repeat being redifined
20:29jtoyhow do I go about calling a function that has been passed to me in an arg?
20:29technomancypatchwork: oops; not :offline? true; I meant :update :always
20:30hyPiRiontechnomancy: I thought -U merged in a profile with that option, no?
20:30technomancyhyPiRion: I thought so too, but it's not working
20:30hyPiRionhm
20:33patchworktechnomancy: Still not working!
20:33patchworklein version says 2.3.1
20:34technomancypatchwork: ok; in that case it must be a bug in aether
20:34jtoywhy doesnt this print 5 for every line? https://www.refheap.com/17775
20:34jtoyalso is it possible to pass in a function that can access the values inside of doseq? like how can I pass something like (testf (println u)) ?
20:35callenjtoy: where's your book?
20:35RaynesBecause arguments get evaluated before being passed to functions.
20:35RaynesYou're getting the value of (println 5), not the code.
20:36jtoyso can I modify this to do it then?
20:36rhg135#()
20:36RaynesI have no idea what you're trying to accomplish.
20:37RaynesYou can do #(println 5) and then in testf do (f), I guess.
20:37patchworktechnomancy: Ah! okay, I will tell people to remove their .m2 in the meantime
20:38hyPiRionyay, aether. The magic box where you usually get what you want back.
20:38oneness_jtoy: do 1. #(println 5) 2. enclose f within ().
20:38patchworkI looked at the aether code, but I'm not sure where to start : /
20:38jtoycool, that does work
20:39technomancypatchwork: you and me both =\
20:39jtoyis it possible to access values in the clojure though? as in #(println u)
20:39jtoyclosure i mean
20:39hyPiRionwe're three, there's a reason I call it a magic box
20:40rhg135TEttinger, one q about quote, how do you remove a quote?
20:42TEttingerrhg135: you don't! that's the one semi-intentionally missing feature
20:42rhg135oh darn
20:43jtoyi guess you cant
20:43rhg135i added one to test
20:43TEttingeryou can add the feature by using congomongo's remove stuff
20:43rhg135ok
20:44rhg135ive never used it tho
20:44TEttingerthe trick will be finding the right quote to delete
20:44bjaspecljs is a lot better at finding my .cljs tests than my .clj tests....
20:45bjafml
20:46TEttingerlike, what would you tell it, @delete-quote-from TEttinger 1? that could work, except it doesn't give an index yet (it probably could)
20:46rhg135ok implemting
20:48TEttingeralso, you may want to just use the dump function (@superbarf , it does more than spit, it barfs) to see all the quotes and figure out if it deleted them
21:18rhg135TEttinger, i added (defn erase-quote [server i] (destroy! :quote {:_id i} :where {:server server})) but nope
21:19TEttingerI don't know if it gives them _id
21:19rhg135it does
21:20rhg135superbarf is modded to show em
21:22callenwhy...are you dereferencing an fn?
22:07seancorfieldcallen: I updated FW/1 to support Selmer - very nice... I may deprecate Enlive support at some point
23:36matthaveneranyone familiar with the pedestal tutorial? i'm following it, and i don't understand why there are two nested (let) exprs in the second code block: https://github.com/pedestal/app-tutorial/wiki/Connecting-to-the-Service
23:42ambrosebsmatthavener: probably for emphasis or a typo.
23:45[Neurotic]newb Clojurescript question: Trying to work out how to do feature detection - specifically work out what version of webRTC getUserMedia is supported. A variation on https://github.com/webRTC/webrtc.io-client/blob/master/lib/webrtc.io.js#L7 ... I've no idea how to do this in clojurescript - if someone could point me in the right direction, that would be
23:45[Neurotic]awesome
23:45matthavenerambrosebs: makes sense, thanks! i wasn't sure if there was some special behavior between (let [a b c d] ...) and (let [a b] (let [c d] ...))
23:46ambrosebsmatthavener: zero.
23:52TEttinger[Neurotic], never heard of webRTC over here.
23:53qzwhen i run "lein repl" i get "Exception in thread "main" java.lang.IllegalStateException: Var null/null is unbound. (form-init6874200733089555789.clj:1)". but "lein run" works just fine.. what could it be?
23:55TEttingerqz: sounds like you're calling a static method on something that only exists after -main is called?
23:55[Neurotic]TEttinger: for all intents and purposes of the question - I'm just looking for the function
23:55TEttingerfair enough.
23:56qzTEttinger: hrm.. there are no vars, so how can something exist only after -main is called?
23:57TEttingerqs, def and defn create vars
23:57TEttingerqz*
23:57TEttingerwhat's really weird is it's line 1
23:58dnolen[Neurotic]: you can check for top level things with exists?. (or (.-bar foo) (.-baz foo) ...) otherwise works too
23:59dnolen[Neurotic]: Google Closure sometimes will mangle, in those cases you can use (get js/foo "bar")
23:59dnolener (aget js/foo "bar")
23:59[Neurotic]dnolen: aaah. I was trying aget with a symbol. Lemme try that then