#clojure log - Aug 19 2013

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

0:06 cjfrisz: What's the story for repeatable random number generation in ClojureScript, i.e. using a seed?

0:07 I know about data.generators, but at first glance it doesn't seem like a drop-in solution for cljs

0:08 (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)

0:09 bbloom: cjfrisz: clojure.core (and cljs.core) don't have seedable random number generators :-( you need to use platform interop

0:10 so javascript interop or whatever you can find in goog

0:10 clojurebot: Excuse me?

0:10 bbloom: amalloy: 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

0:25 callen: shouldn't there be a macro for this? https://groups.google.com/forum/#!topic/clojure/GHLL_OgIN9E

0:27 cjfrisz: bbloom: that was the answer I found googling, but all the answers were 8+ months old

0:27 I'm just naive enough to have hoped I would find the state of things improved in that time ;-)

0:27 bbloom: cjfrisz: as somebody who has written *deterministic* games before, i just assume all language's have a shitty stdlib for randomness :-)

0:30 cjfrisz: bbloom: Careful, that kind of "you want it done right, you write it yourself" attitude will turn us into Scheme in no time flat

0:30 I can count the number of external libraries I've used in Scheme on my hands; maybe even just one of them

0:31 bbloom: heh

0:31 i'm not saying that there can't be a lib, i'm saying that rand-int doesn't really do the trick :-)

0:34 callen: hrm. does anybody here know Ritz?

0:37 cjfrisz: bbloom: thanks for the help. I'm off for now

2: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

2:23 callen: `cbp: fun. I'm excited. :)

2:46 muhoo: ugh, how again does one cast a string to a java Reader?

2:46 (i got a thing that wants a Reader, all i gots is a string)

2:48 TEttinger: http://clojuredocs.org/clojure_core/clojure.java.io/reader

2:48 it can resolve a string that's a filename or URI

2:49 muhoo: well no, i have a string with content, it's not a file.

2:49 TEttinger: I think there's a java stringreader thing

2:49 muhoo: i.e. i have "foo\nbar\nbaz", i am passing that to a java method that requires a Reader, doesn't take a String

2:49 TEttinger: http://docs.oracle.com/javase/6/docs/api/java/io/StringReader.html

2:50 muhoo: i'll look around in java then. was kind of hoping someone had already wrapped in something clojure

2:50 sevvie: muhoo: 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.

2:51 TEttinger: sevvie, that should be in the docs, it doesn't say there's an else case

2:51 thanks

2:55 sevvie: You know, I'm mistaken. I coulda sworn it coerced bare strings, but it'll throw a FileNotFoundException. Sorry.

2:56 muhoo: simple enough, thanks. java.io.StringReader works

2:59 dbe: How do I create this vector? [(0 0) (0 1) (0 2) ... (0 n) (1 0) (1 1) ... (n n)]?

2:59 fredyr: dbe: for comprehension should do it

3:01 noprompt: dbe: (for [x (range n) y (range m)] [x y])

3:01 dbe: fredyr, noprompt , Ah, yes, thank you.

3:02 noprompt: for some reason this grindcore i'm listening to is drawing me to use the -> macro.

3:02 the skewer first macor.

3:03 fredyr: :)

3:03 noprompt: that's what i'm calling it from now on. skewer first.

3:04 sevvie: noprompt: so ->> is "skewer last"?

3:04 noprompt: haha. no. that's the impale macro.

3:05 sevvie: Skewer and impale. I like it.

3:05 noprompt: :)

3:09 (def decapitate rest)

3:15 what would be a good way to "diff" two maps?

3:17 ryankask: why wouldn't lein install put the created jar and other artifacts in ~/.m2/repository?

3:18 fredyr: noprompt: otoh, pluck keys into a set and use diff?

3:19 noprompt: fredyr: yeah maybe something like that.

3:19 fredyr: noprompt: oh you can use diff on maps directly it seems

3:19 http://clojuredocs.org/clojure_core/clojure.data/diff

3:20 noprompt: fredyr: well, i'll be. lemme check that out.

3:26 that's pretty neat. i'll have to remember that. not exactly what i was thinking about, but still neat.

3:45 muhoo: (vlad->>

3:49 noprompt: muhoo: :)

3:55 that feeling when you're no longer sure if your "new and improved" solution is better.

3:56 xsyn: so just "new"

3:57 noprompt: xsyn: haha, yeah.

3:58 it's actually definitely better. i'm unsure if i've arrived at the simplest solution.

3:58 the problem is i have no idea what the hell i'm doing. which is normally the case.

4:01 some of the code i wrote last night probably should have had some comments.

4:04 sevvie: That feeling when you look at code you should have commented.

4:10 cmdrdats: That feeling when you have no idea how this bug is happening, until you realize you're looking at the wrong code.

4:28 kristian-: so, what is the preferred validation lib in Clojure?

4:32 noprompt: kristian-: a map with keys to validate and function values. :)

4:32 j/k

4:33 kristian-: which ones are you looking at?

4:34 kristian-: bouncer, metis, validateur

4:42 muhoo: valip

4:44 noprompt: kristian-: 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.

4:44 kristian-: maybe try them out independently. :/

4:45 ro_st: kristian-: depends what you want to validate, as well

4:48 noprompt: juxt is a damn handy function.

4:49 Raynes: noprompt: As friends with a man who is confirmed as nuts for juxt, I can confirm this.

4:51 noprompt: Raynes: nuts for juxt.

4:51 Raynes: noprompt: 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.

4:53 noprompt: Raynes: seriously. it's like apple: always finding new ways to "delight" me.

4:54 Raynes: last week i found it useful for simplifying the rendering of this query dsl i've been working on.

4:55 today i found it super helpful in conjunction with group-by.

4:55 juxt is an all around good guy.

4:55 i'm "nuts for juxt"

4:55 Raynes: Buy him a beer next time he's in town.

4:55 noprompt: i'll buy him some nuts to enjoy with his beer.

4:55 beer nuts.

4:55 beer nuts for juxt.

4:56 Raynes: You've taken it too far.

4:56 noprompt: i know. i've been hacking on frak all day.

4:56 Raynes: Oh yeah? Well I'm writing unit tests for Elixir.

4:57 noprompt: Raynes: yeah? i noticed you were apart of the "crew".

4:57 ucb: Raynes: elixir? neat!

4:58 Raynes: noprompt: José and I are like this.

4:58 Unfortunately I can't make gestures over the internet.

5:00 noprompt: Raynes: frak now delights even more (frak/pattern ["bone" "bones" "boner"]) => #"bone[sr]?"

5:01 Raynes: What is frak?

5:01 Oh.

5:01 It generates regex?

5:01 * Raynes wipes his left eye to stop the twitching.

5:01 noprompt: This is a neat addition (frak/pattern ["skill" "skull"]) => #"sk[iu]ll"

5:01 ucb: noprompt: have you considered generating xpath/css selectors with frak?

5:02 noprompt: ucb: no but that's an interesting idea. can you elaborate?

5:02 ucb: i just spent all day working on a new trie structure and renderer.

5:02 ucb: noprompt: well, have you ever toyed with open.dapper.net?

5:02 noprompt: ucb: negative. please make my life easier.

5:02 ucb: noprompt: the use case is simple: point and click at things on webpages and build an automatic extractor that you can run periodically

5:03 noprompt: well, just that, automated content extraction from the web or whatever

5:03 noprompt: it's an active area of research too :)

5:03 noprompt: 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

5:03 noprompt: consider writing a price comparison search engine, and how you'd extract prices and item details from amazon, say

5:04 (without partnering with them, etc.)

5:05 supersym: say 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

5:05 noprompt: ucb: sounds pretty neat. working on frak has made me far more interested in the text space.

5:05 ucb: noprompt: it's a really interesting space to work in :)

5:05 * ucb has done so for a good number of years

5:06 supersym: so I tried adding :profiles {:overkill {}} and :profiles {:default [:base :system :user :provided :dev :overkill]}

5:06 noprompt: ucb: someone sent me a link last week to something called a finite state reducer. seemed really interesting but i couldn't read the paper. :(

5:06 ucb: in 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"

5:06 noprompt: oh :/

5:06 noprompt: ucb: well that's the thing that surprised me about the interest it recieved.

5:07 ucb: like, i honestly can't think of many places where it'd be somethind i'd even reach for.

5:07 ucb: noprompt: nobody likes writing regexps

5:07 noprompt: ucb: yeah, but it's not like frak will help much with that. you *have* to know the inputs for frak to be useful.

5:08 ucb: well, you can have other people providing the inputs

5:08 noprompt: ucb: plus you won't get a huge benefit from it unless you're working with huge patterns.

5:08 ucb: i.e. build a service to extract things from things :)

5:08 noprompt: ucb: now that is a good point.

5:08 ucb: and html seems to be the data format from which people really want to extract things

5:08 noprompt: ucb: i guess it could also be useful for something like a keyword regex.

5:08 ucb: hence my suggestion to generate xpath/css selectors

5:09 well, you could use frak to add fuzzy matching to a search engine

5:09 noprompt: i never understood what was so offputting about regex to programmers.

5:09 regex is so cool.

5:09 ucb: not just fuzzy matching mind you

5:09 they're cumbersome

5:10 and the language itself is, well, cryptic at best

5:10 "perl"

5:11 noprompt: i guess i can see that.

5:12 ro_st: regex makes programming much easier, that's for sure. i mean working with code text

5:12 ucb: indeed, but crafting regexes is an acquired skill

5:12 noprompt: but you can definitely shoot yourself in the foot with them.

5:13 ucb: which many people don't care to invest in

5:13 ro_st: it's one of the things that makes sublimetext so good. the search fast-feedback + regex

5:13 ucb: you mean emacs, right? </troll>

5:13 supersym: the last thing I mastered before starting clojure was regex... extremely useful skill to add to my set :)

5:13 ro_st: i reckon you're golden once you get to understanding negative lookaheads

5:13 hyPiRion: yeah, I was about to point out that emacs got that as well.

5:13 supersym: ro_st: the documentation on it is rather poor though

5:13 noprompt: ro_st: yeah s/sublim\(e\)text/\1macs/

5:14 supersym: once you figure out its perl/boost...

5:14 ro_st: ucb: 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

5:15 ucb: ro_st: you were to close to enlightenment! :)

5:15 ro_st: emacs uses a different regex dialect than what i'm used to, as well

5:15 noprompt: i try to avoid most of the look around stuff if at all possible. the performance can be really nasty.

5:15 ro_st: i'm used to the one JS/C#/Java uses

5:15 noprompt: but sometimes it's just what you need.

5:15 ro_st: not sure what emacs uses, but it doesn't know all the things i'm used to

5:15 * ucb realises that regexes is another can-of-worms topic

5:16 * noprompt likes a good can of worms

5:16 ro_st: noprompt: yup :-)

5:16 ucb: heh

5:16 ro_st: i use regex mostly for code editing, not really in actual production runtime execution

5:16 so perf isn't an issue

5:17 noprompt: fun fact: j.regex.Pattern char sets (ie [abc]) are backed by bit fields which perform much better than (a|b|c).

5:17 ro_st: that's handy!

5:18 the nice thing about regex in a text editor is how easily you can blow a non-developer's mind with it

5:18 supersym: client-side form validation... just that would be JS, would this (frak) be useful or

5:18 noprompt: ro_st: yeah, huh? the guy that maintains vim-clojure-static showed me all kinds of neat tricks and new things about j.regex.Pattern.

5:18 supersym: ro_st: subl2 multiline select is also really sweet to show people ;)

5:19 ro_st: we'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

5:19 noprompt: emacs + evil-mode ftw

5:20 Anderkent: noprompt: I was thinking of switching to that (from vim), how hard is it? Or were you evil from the start :P

5:20 noprompt: got erc in one split + nrepl and clojure code in some others.

5:20 Anderkent: elisp is just so much nicer than vimscript

5:20 noprompt: Anderkent: 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.

5:21 ucb: Anderkent: you actually like elisp? :)

5:21 noprompt: Anderkent: evil-mode is pretty faithful to the vim style.

5:21 Anderkent: it's definitely nicer than viml. :P

5:21 Anderkent: you can get a lot of mileage out of evil-mode if you pair it with something like key-chord-mode

5:22 Anderkent: ucb: it's more that I hate vimscript

5:22 :P

5:22 ucb: heh

5:22 fair enough

5:22 noprompt: Anderkent: i still use vim if i'm shelled in to a server or something.

5:23 Anderkent: ok, I'll put another +1 on my 'people who told me to use emacs' list

5:23 noprompt: Anderkent: if you're a vim user and you're curious, i'd say it's worth the time investment.

5:24 it took me about a month or so to get it set up to a point where i was pretty happy.

5:25 Anderkent: cool, thanks

5:27 noprompt: ucb: 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.

5:27 ro_st: Anderkent: https://gist.github.com/robert-stuttaford/6255383

5:27 ucb: noprompt: I have to agree there. But there's no way around that either I'd say.

5:28 noprompt: well, other than "learn the regexp language"

5:28 noprompt: ucb: it's funny cause the same people are not intimidated by 120+ character lines of code.

5:29 ucb: heh

5:29 interestingly enough, the people least intimidated by regexes (in my experience) is perl programmers

5:29 noprompt: i get a little "uneasy" when i see a huge line of ruby or python.

5:30 ro_st: ucb: isn't perl regexes with variables?

5:30 ucb: ro_st: hehehe

5:30 noprompt: nice!

5:30 ucb: noprompt: I get uneasy with Ruby, full stop. Python I've learnt to tolerate it.

5:30 noprompt: ucb: 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.

5:31 ucb: noprompt: well, the perl community, I'd say, relies heavily on regexes, right?

5:32 noprompt: it's no surprise they'd have a huge arsenal of techniques to deal with these

5:32 noprompt: to my knowledge this is what i've heard.

5:32 Anderkent: ro_st: thanks. Starred, will come back to it when I try to switch - probably somewhere in Sep :P

5:33 noprompt: maybe i'm a perl programmer. roflmao lol jk.

5:33 ro_st: Anderkent: +1. print and use a pen to scratch them out as you internalise them: http://www.emacswiki.org/emacs/PareditCheatsheet

5:34 Anderkent: oh, I use paredit in vim already - though of course the bindings I'd have to learn again

5:34 * noprompt needs to make the % operator work with "

5:34 noprompt: Anderkent: you could steal my bindings which i ripped off from the vim ones.

5:35 Anderkent: https://github.com/noprompt/matilde/blob/master/emacs.d/init.el#L155-L169

5:35 Anderkent: hm 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

5:45 ryankask: Does anyone know why "lein install" would only create the jar and write the pom.xml but *not* put it in ~/.m2/repository?

5:47 Anderkent: ryankask: I guess if aether fails to install... File permissions, maybe? But I think it unlikely - are you sure it's not there? :P

5:47 or maybe if the pom is invalid

5:47 did you get any error output?

5:48 ryankask: ah, also you might have :local-repo set, in which case that's where the jar will be put

5:49 ryankask: Anderkent: 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

5:50 git clone ...repo...; lein install . i don't see :local-repo anywhere

5:51 Anderkent: Don't think the . after install is necessary :P

5:51 but other than that, sorry, no idea

5:55 ryankask: (meant as a period). anyway, it's there now. not sure what happened but thanks for your help.

6:45 tgoossens: I 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...

6:45 (note: the class that uses the functions is different from the class that contains them)

6:49 Anderkent: tgoossens: 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?

6:56 tgoossens: anderkent: yes ofc. But then the class is coupled with a certain implementation. I want to be able pass on "test functions"

6:56 Anderkent: right. sounds kind of like a protocol?

6:57 though that would require making the methods nonstatic, as you said.

6:59 tgoossens: maybe the problem is the fact I just want to pass every function to that one class

6:59 instead of smaller components

7:00 so that the function dependencies of the smaller components become manageable

7:01 Anderkent: that's one solution. The other is to have a simple wrapper around that java class that can be mocked for tests.

7:01 sorry, kinda grasping at straws here because I don't have a clear picture of what you're trying to do :P

7:20 noncom|2: how do i concat two strings?

7:21 hyPiRion: str

7:21 ,(str "foo" "bar")

7:21 clojurebot: "foobar"

7:21 hyPiRion: or eventually

7:21 noncom|2: omg

7:21 hyPiRion: ,(.concat "foo" "bar")

7:21 clojurebot: "foobar"

7:21 noncom|2: how could i ask that

7:21 :)

7:23 hyPiRion: we all ask stupid questions now and then

7:52 nkozo: there is function to switch to another ns but raise an exception if it doesn't exists?

7:54 Anderkent: nkozo: I don't think so. You can just (when-not (find-ns 'my-ns) (throw ...)), I guess.

7:56 nkozo: Anderkent: ok, thanks

7:56 noncom|2: how 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?

7:58 Anderkent: noncom|2: what does `which java` give you? Perhaps you have both jre and jdk in path, and jre takes precedence?

7:59 noncom|2: maybe 'which' is something linux, idk, im on windows.. however, i have checked all the path settings, and jre is even not mentioned anywhere..

7:59 maybe it is because i have 32 and 64-bit versions installed...

8:00 Anderkent: ah, sorry. I kinda assume linux unless told differently :P

8:01 noncom|2: :)

8:01 Anderkent: it 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?

8:02 noncom|2: alright.. but what strikes me the most is that in none of my PATH settings is any reference to jre..

8:02 i try what you say and in the worst case, just reinstall java

8:02 Anderkent: noncom|2: https://github.com/technomancy/leiningen/issues/774 sounds a bit like your issue?

8:02 I believe jres java goes to c:\windows\system32

8:03 which is why it's there even without special path entries

8:03 (well at least that ticket claims it does. I'm not a winwizz)

8:03 noncom|2: oh that is so very possible

8:03 i gonna check it out

8:06 Anderkent: there were java exes in system32, and i renamed them but that did not solve the issue

8:07 now i see in Java Control Panel there is the explicit preference of that particular jre set up

8:07 gonna try changing it now

8:07 Anderkent: noncom|2: apparently windows version of which is where

8:07 i.e. where java

8:09 noncom|2: control 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..

8:10 oh that java control panel is so crappy

8:11 Anderkent: noncom|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

8:11 uh or however you specify environment vars in cmd :P

8:11 noncom|2: hehe

8:11 gonna try

8:21 wei_: what do people use for clojurescript data binding these days? fluentsoftware/cljs-binding? any other alternatives?

8:29 noncom|2: Anderkent: finally i specified JAVA_CMD in the PATH settings and it seems to work

8:34 Anderkent: noncom|2: cool. I'm afraid windows is very much a second class citizen in the oss world :P

8:35 Is sqlkorma dead? 57 issues 16 pull requests ;S

8:35 noncom|2: yeah, 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

8:35 Anderkent: the craetor of korma abandoned it

8:35 he said that if someone needs it, feel free to give it a second chance

8:35 Anderkent: yeah, but it moved to its own org (korma/korma instead of ibdknox/korma now)... so I was wondering if anyone's picked it up

8:36 noncom|2: oh that twist of the story im unaware of

8:38 i'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..

8:43 Anderkent: noncom|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

8:46 noncom|2: yes, 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?

8:46 Anderkent: yes

8:47 noncom|2: missed it when looked at sample-project.clj before

9:19 H4ns: how does leiningen know what files to load? do i need to specify the files in the project.clj, or is there some magic involved?

9:21 ah, so i need to depend on whatever package and they will be found by file name. thanks! :)

9:56 noncom|2: in 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

9:58 Anderkent: noncom|2: you can use bultitude to find files on classpath that match a particular expression

9:59 for raw filesystem interactions there's probably some other lib

10:01 noncom|2: i 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:34 has anyone seen weavejester recently?

10:37 vijaykiran: $seen weavejester

10:37 lazybot: weavejester was last seen quitting 11 hours and 14 minutes ago.

10:39 jtoy: why is this true?

10:39 (contains? [1 2 13 1231 231 ] 4)

10:39 &(contains? [1 2 13 1231 231 ] 4)

10:39 lazybot: ⇒ true

10:39 hyPiRion: (doc contains?)

10:39 clojurebot: "([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:40 hyPiRion: it's poorly worded, we know

10:40 jtoy: that seems like a terrible use too

10:41 the key is in the range if key <= length - 1

10:42 hyPiRion: yeah, if (<= 0 i (- (count coll) 1))

10:42 well actually

10:42 ,(contains? [1 2 3 4 5] 3.4)

10:42 clojurebot: false

10:42 hyPiRion: so not exactly, but almost.

10:42 jtoy: &(contains? [1 2 3 4 5 3.4] 3.4)

10:42 lazybot: ⇒ false

10:43 jtoy: .....

10:43 hyPiRion: 3.4 is not a key (index) in the vector, and can't be.

10:43 noncom|2: ,(contains? [1 2 3] -1)

10:43 clojurebot: false

10:43 jtoy: contains is a horrible name

10:43 hyPiRion: ,(get [1 2 3 4 5 3.4] 3.4 :not-found)

10:43 clojurebot: :not-found

10:43 noncom|2: vijaykiran: thanks!

10:43 hyPiRion: yeah, it should've been called contains-key?

10:44 but too late for that now.

10:44 jtoy: one motto i do love about ruby is "principle of least surprise"

10:44 clojure mostly fits it also

10:45 * nDuff considers Ruby's facilitation of spooky action at a distance incompatible with minimizing surprise

10:45 AimHere: Well Ruby did end up in the 'Wat' talk so it doesn't ALWAYS hit the least surprise thing

10:45 stuartsierra: "Principle of least surprise": https://twitter.com/fogus/status/358261588236578816

10:45 hyPiRion: AimHere: well, I can get Clojure into a wat talk as well

10:45 iwo: hey, 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:46 AimHere: hyPiRion, no doubt.

10:46 iwo: i'm trying to refer to function like: clj-http.client/parse-url

10:46 but i get Exception in thread "main" java.lang.ClassNotFoundException: clj-http.client

10:47 even though the function 'parse-url' DOES exist in the namespace clj-http.client

10:47 jtoy: stuartsierra: nice, for me it means statitistically, as in go ask a 100 programmers what contains? does

10:47 llasram: iwo: 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:47 dakrone: iwo: have you required clj-http.client

10:48 iwo: llasram, dakrone: actually, this was my first thought so i tried this:

10:48 (:require [clj-http.client])

10:48 stuartsierra: jtoy: Yes, see also http://stuartsierra.com/2013/02/04/affordance-concision

10:48 iwo: but require doesn't seem to like that namespace on its own

10:49 ah, i guess i should get rid of the vector

10:49 llasram: iwo: Are you adding that to an `ns` form, or just e.g. entering it directly into a REPL?

10:49 iwo: (of course (:require [clj-http.client]) is inside my ns macro)

10:50 llasram: ah, ok

10:50 That should work, actually. In a vector/list is correct

10:51 iwo: llasram: sorry, i guess i'm wasting your time, i think i might have got nrepl into a bad state

10:51 looks like it's working

10:51 thanks anyway!!

10:51 llasram: glad you got it working :-)

11:26 yogthos: does anybody know why the exception is not caught here? (try (for [i [[]]] (nth i 1)) (catch Exception ex)) ?

11:26 this works as expected (for [i [[]]] (try (nth i 1) (catch Exception ex)))

11:26 llasram: yogthos: Laziness

11:26 yogthos: ahhh

11:26 Anderkent: gah, I got excited for midje junit output and it turns out it doesn't work that well :((

11:26 yogthos: obviously :)

11:27 llasram: yogthos: q: What causes this unexpected Clojure behavior involving lexical scope? a: Laziness. :-)

11:27 yogthos: llasram: yeah pretty much every time

11:28 * arrdem mutters darkly about bindings and lazieness

11:29 yogthos: that's definitely easy to miss

11:29 upwardindex: Is there a library to do simple DSP that works well with incanter?

11:30 (digital signal processing)

11:30 justin_smith: upwardindex: you can build DSP out of matrix and linear algebra, so it is in there already, right? :P

11:31 more seriously: I hope!

11:31 xicubed: lein ring to bring them all and in their darkness bind them?

11:31 arrdem: (inc xicubed)

11:31 lazybot: ⇒ 1

11:33 upwardindex: justin_smith: I've been looking a bit and there does not seem to be anything

11:34 ker2x: friendly greetings !

11:34 justin_smith: upwardindex: 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:34 Anderkent: upwardindex: perhaps look into how overtone does stuff?

11:34 they must be doing some dsp

11:35 justin_smith: Anderkent: overtone just calls supercollider

11:35 Anderkent: ah.

11:37 ker2x: i 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:38 dnolen: ker2x: what's the error you are seeing?

11:38 ker2x: i'll pastebin it

11:38 http://pastebin.com/nCmZbqKX

11:39 the code is a simple hello world

11:40 http://pastebin.com/dr4U5pwA the project definition

11:41 dnolen: ker2x: what's your source file look like

11:42 ker2x: http://pastebin.com/GKQJfRbh

11:45 can you see something wrong ?

11:49 dnolen: ker2x: I don't see that you've specified an output file anywhere

11:49 ker2x: yes, i've read that there is default output to target

11:50 and indeed, it created a target directory with a js file

11:50 ls target/

11:50 cljsbuild-compiler-0 cljsbuild-main.js

11:51 i can create one if it can help

11:54 i'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:01 Anderkent: Is there a better way of having midje work lein test than wrapping everything in deftest?

12:02 babu`: 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:02 dakrone: babu`: clj-http doesn't support proxy auth, I don't know of any that do

12:02 babu`: please feel free to add an issue to clj-http asking for it to be added though

12:03 noncom|2: dnolen: 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:03 dnolen: noncom|2: auditory?

12:04 `cbp: audience i'm guessing :)

12:04 ker2x: same problem :(

12:04 mm no wait

12:04 different error

12:04 noncom|2: dnolen: 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:05 sorry, english is not my native language, so possible are miswordings

12:05 ker2x: http://pastebin.com/KmW2za34

12:06 Kototama: hi, why is this expression (= 'true true) true?

12:06 babu`: dakrone, ok, I will file a ticket.

12:06 gfredericks: Kototama: because ##(type 'true)

12:06 lazybot: ⇒ java.lang.Boolean

12:06 dnolen: noncom|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:06 gfredericks: Kototama: there is no syntax for ##(symbol "true")

12:06 lazybot: ⇒ true

12:06 TimMc: Kototama: Because 'true doesn't produce a symbol, in Clojure.

12:06 Kototama: Same with false and nil.

12:07 dnolen: noncom|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:07 ker2x: http://dev.clojure.org/jira/browse/CLJS-101 i try that

12:07 Kototama: ah ok, thank you :)

12:07 TimMc: It bugs me, and I wish Rich had done (def true #t) like in PLT Scheme, but oh well.

12:08 arrdem: man that's weird...

12:08 dnolen: ker2x: specify an output file

12:09 TimMc: That would be a good question for a set of dark-corners koans: "For what values of x is (= (symbol x) x) true?"

12:10 Anderkent: TimMc: rather obviously for any symbol

12:10 I don't think anyone would look farther than that :P

12:10 TimMc: ,(symbol 'foo) ;; wait really?

12:10 clojurebot: foo

12:11 TimMc: :-(

12:11 Anderkent: Perhaps if symbols were excluded from x: "For what values of x is (and (not (symbol? x)) (= (symbol x) x)) true?"

12:11 that's more koan like :)

12:11 (also ugly)

12:13 noncom|2: dnolen: 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:13 TimMc: &(map (juxt (comp name str) (comp str name)) ["foo" 'foo :foo])

12:13 lazybot: ⇒ (["foo" "foo"] ["foo" "foo"] [":foo" "foo"])

12:13 dnolen: Kototama: TimMc: Clojure's behavior as far as 'true doesn't seem like a departure from Scheme, some quoted forms self-evaluate

12:13 in Scheme (eq? '#t #t) -> #t

12:14 (eq? ''#t #t) -> #f

12:14 probably true for Common Lisp as well

12:14 TimMc: dnolen: In that case, quoting the truth value does nothing, but quoting the truth symbol is different from that.

12:14 #t is a reader macro producing the true bool, not 'true

12:15 noncom|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:15 TimMc: This may be unique to PLT Scheme (Racket).

12:15 dnolen: TimMc: yeah I wouldn't use Racket as reference for Scheme, I use Petite for that

12:16 noncom|2: i 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:16 ker2x: dnolen: remplacing the :whitespace optimisation with :simple optimisation worked as said on http://dev.clojure.org/jira/browse/CLJS-101

12:16 thank you for your help

12:16 dnolen: ker2x: glad to hear it

12:17 babu`: dakrone, I have filed issue for proxy auth: https://github.com/dakrone/clj-http/issues/153

12:17 noncom|2: i myself can handle that, but i also would like to make use of the articles to show some not very lisp-inclined people

12:17 to win javascripters for clojurescript

12:17 ker2x: i'll specifiy an output anyway, whould i just specify a directory or an direcoty/output-file ?

12:17 dakrone: babu`: thanks!

12:18 noncom|2: that is why i asked about the audience

12:19 ker2x: :output-to "war/javascripts/main.js"

12:19 ; default: target/cljsbuild-main.js

12:19 noncom|2: if 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:20 dnolen: noncom|2: yeah I wish the post were less Lisp-y, but I'm really not sure what can be done about that.

12:20 noncom|2: this is why I compared to actual JS which is no easier to understand :D

12:21 noncom|2: there's definitely going to be room for expanded chapters on ClojureScript/core.async in the Clojure books

12:22 noncom|2: dnolen: 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:23 ker2x: see you later. have fun :)

12:24 noncom|2: just thoughts, maybe you find it of encouragement :) actually i would like to see more js->cljs choices and conversion of ppl

12:25 and 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:26 babu`: dakrone, I see code ./clj_http/core.clj:12: (org.apache.http.auth UsernamePasswordCredentials AuthScope)

12:26 and code ./clj_http/core.clj:234: (UsernamePasswordCredentials. user pass)))

12:27 looks like you have implemented some of this.

12:27 dakrone: babu`: that's for basic auth for regular requests, unfortunately not hooked into proxy auth yet

12:27 babu`: dakrone, ok

12:30 dnolen: noncom|2: thanks for the feedback, I'll likely be doing smaller more manageable posts in the future

12:30 noncom|2: the autocompleter was really an advanced example that "proves" CSP can be used to build very nice UI components

12:31 xeqi: dnolen: another thanks for writing the csp posts. I've been looking forward to the autocompleter one

12:33 noncom|2: dnolen: 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:33 and practical it is, what's important

12:33 arrdem: hum... is there a parser combinator lib that can work with binary format grammars?

12:40 jtoy: is there a single function that does frequencies and then return the max value?

12:40 noncom|2: arrdem: istaparse no?

12:40 s/istaparse/instaparse

12:40 jtoy: (max (frequencies [ 1 2 2 44444 5 6 2 2]))

12:41 &(max (frequencies [ 1 2 2 44444 5 6 2 2]))

12:41 lazybot: ⇒ {1 1, 2 4, 44444 1, 5 1, 6 1}

12:41 noncom|2: wow

12:42 arrdem: noncom|2: instaparse is amazing but it's ascii grammars only

12:43 gfredericks: jtoy: ##(apply max (vals (frequencies [1 2 2 44444 5 6 2 2])))

12:43 lazybot: ⇒ 4

12:43 bbloom: tbaldridge: 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:44 Anderkent: jtoy: ##(first (sort-by (comp - second) (frequencies [1 2 2 44444 5 6 2 2])))

12:44 lazybot: ⇒ [2 4]

12:44 jtoy: gfredericks: i explained it wrong, i mean it should return 2 because there are 4 instances

12:44 bbloom: tbaldridge: I've seen a few cases where there is (let [auto_1 auot_2] (my.return/fn-here x y))

12:44 tbaldridge: bbloom: yeah

12:44 bbloom: or rather: (let [[auto_1 auot_2]] (my.return/fn-here x y))

12:44 Anderkent: jtoy: ^. Just take the first part of the vec.

12:44 bbloom: tbaldridge: the destructuring occurs, but the results are totally ignored

12:44 tbaldridge: is that expected?

12:45 tbaldridge: also, i ran in to an issue with destructuring lets at the top level of a state machine:

12:45 https://github.com/brandonbloom/cleff/blob/master/src/cleff/trampoline.clj#L74-L75

12:46 adding that do fixes it

12:46 seems related, some kinda issue in the code generation for the state transitions

12:46 tbaldridge: bbloom: yeah, it's a side effect of the transformation, the system doesn't always remove unneeded assignments.

12:46 bbloom: yeah, something that's not totally clear is that state-machine requires a seq of sexprs, not a single sexpr

12:46 noncom|2: arrdem: oh so you mean binary is like 1010100111?

12:47 bbloom: tbaldridge: ooo that makes more sense… so instead of do, i should write (list `(let …)) ?

12:47 arrdem: noncom|2: yeah I'm working on an assembler toolkit and realized that I should probably be able to round trip data

12:47 tbaldridge: bbloom: yeah

12:47 bbloom: tbaldridge: k thanks, let me try that

12:47 llasram: jtoy: ##(->> [1 2 2 44444 5 6 2 2] frequencies (apply max-key second) first)

12:47 lazybot: ⇒ 2

12:48 bbloom: tbaldridge: perfect. works. thanks

12:50 noncom|2: wouldn't it be cool if along with #(% %2 %3) we could have like ##(%% %%1 #(% %2 %3)) ans o on?

12:50 lazybot: java.lang.RuntimeException: Unable to resolve symbol: % in this context

12:50 noncom|2: lazybot?

12:50 clojurebot: lazybot is forget lazybot

12:50 noncom|2: clojurebot?

12:50 clojurebot: clojurebot is a multimap

12:50 noncom|2: multimap?

12:52 like we could say ###(%%% ##(%% %%2 %%%2 #(% %2 %%%3)) ##(%% %%% %%%1) %%%4)?

12:52 lazybot: java.lang.RuntimeException: Unable to resolve symbol: % in this context

12:52 noncom|2: stop it lazybot

12:52 Anderkent: noncom|2: no. just write a function.

12:52 :P

12:52 noncom|2: ahahah

12:52 :D

12:52 llasram: noncom|2: Well, your proposal might make it easier to write in swearjure

12:52 noncom|2: I'm unconvinced as to other benefits :-)

12:53 noncom|2: i could not hold laughter when it came to my mind so that was the benifit :D

12:53 jtoy: llasram: i like yours beter, thanks

12:54 Anderkent: :(

12:55 jtoy: Anderkent: I like yours too, thank you :) i just dont cant undertand it at a quiick glance

12:55 Anderkent: eh, it's pretty much the same thing except his is better

12:55 :P

12:55 arrdem: !seen nathell

12:56 llasram: I 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:56 hyPiRion: $seen arrdem

12:56 lazybot: arrdem was last seen talking on #clojure 27 seconds and 952 milliseconds ago.

12:56 arrdem: cheers hyPiRion

12:56 $seen nathell

12:56 lazybot: nathell was last seen quitting 5 days and 16 hours ago.

12:56 arrdem: dang

12:57 jtoy: what function will tell me the index of each item in a vector ( somefunc [:yes :no :yes:] ) => 0 1 2

12:58 llasram: jtoy: More than just e.g. (comp range count) ?

12:58 Anderkent: jtoy: I'd guess you want map-indexed, if you want both the index and value

12:58 otherwise it's just (comp range count) as llasram said

12:58 jtoy: llasram: ok, i didnt think of it like that

13:00 noncom|2: $seen somebody

13:00 lazybot: I have never seen somebody.

13:01 noncom|2: #seen clojurebot

13:01 $seen clojurebot

13:01 lazybot: clojurebot was last seen talking on #clojure 31 weeks and 4 days ago.

13:01 noncom|2: hmmm

13:01 and who pretended to be clojurebot?

13:01 $seen lazybot

13:01 lazybot: lazybot was last seen joining on elixir-lang 4 days and 7 hours ago.

13:03 TimMc: !

13:03 noncom|2: wow, it kicked me!

13:03 bbloom: $seen anybody

13:03 lazybot: I have never seen anybody.

13:03 bbloom: heh.

13:03 noncom|2: :D

13:03 try yourself?

13:04 seen bbloom i mean

13:04 technomancy: $seen a bot command so easy to abuse before

13:04 lazybot: a was last seen joining on clojure 58 weeks and 1 day ago.

13:04 arrdem: aw.....

13:04 technomancy: foiled!

13:04 TimMc: $seen ,(map,println,[1,2,3,4])

13:04 lazybot: I have never seen ,(map,println,[1,2,3,4]).

13:05 TimMc: Oh right.

13:05 Anderkent: $seen "a b"

13:05 lazybot: I have never seen "a.

13:05 Anderkent: oh well.

13:05 noncom|2: hmmm

13:05 somebody try to ask about yourself please

13:05 hyPiRion: TimMc: heh, interesting.

13:05 Anderkent: $seen a b

13:05 lazybot: a was last seen joining on clojure 58 weeks and 1 day ago.

13:05 Anderkent: geh

13:05 hyPiRion: $seen ,a

13:05 lazybot: I have never seen ,a.

13:06 noncom|2: $seen -

13:06 lazybot: I have never seen -.

13:06 TimMc: $seen TimMc ;; OK, I'll try it.

13:06 lazybot: TimMc was last seen talking on #clojure 58 milliseconds ago.

13:06 noncom|2: $seen noncom|2

13:06 lazybot: noncom|2 was last seen talking on #clojure 40 milliseconds ago.

13:06 noncom|2: oh! last time it did not answer and connection was lost

13:07 * arrdem throws out toothpick and starts hacking on lithium

13:08 Anderkent: ok last try

13:08 $seen a b

13:08 lazybot: I have never seen a b.

13:08 Anderkent: aha

13:09 noncom|2: what?

13:09 Anderkent: $seen a command so easy to abuse.

13:09 lazybot: I have never seen a command so easy to abuse..

13:09 clojurebot: what is seq

13:09 noncom|2: kick?

13:09 arrdem: woah what?

13:09 Anderkent: #unicode#mindblown

13:09 arrdem: technomancy: ^-3

13:09 (inc Anderkent) ;; for abusing utf8

13:09 lazybot: ⇒ 3

13:09 technomancy: arrdem: sweeeet

13:10 non-breaking space?

13:10 noncom|2: $seen êòî ãäå

13:10 lazybot: I have never seen ���.

13:10 Anderkent: awww it's so cute

13:10 arrdem: hum... are tabs breaking?

13:10 technomancy: protip: the reader treats non-breaking spaces as symbol constituents

13:10 arrdem: $seen tabs are osum

13:10 lazybot: I have never seen tabs are osum.

13:10 arrdem: lewl

13:10 technomancy: ah; I see

13:11 Anderkent: technomancy: yeah, I had clojure fail on me with *very* cryptic messages when i copy pasted code from github

13:11 the spaces on github were non-brekaing, of course, so clojure was choking on it... While printing what seemed to be perfectly valid code

13:11 had to dig out hexdump to see what's wrong with the file

13:11 noncom|2: Anderkent: that's for java too. i remember having nice time with a library full of comments in japaneese...

13:11 Anderkent: ^^

13:12 technomancy: Anderkent: 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:12 arrdem: ,(doc condp)

13:12 clojurebot: "([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:13 muhoo: Raynes: 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:13 Anderkent: muhoo: nah, google scrapes your history instantly :)

13:14 actually I don't know, but it would seem possible

13:14 technomancy: I'd link to the jira issue, but I forgot how terrible jira search is

13:14 Anderkent: 419

13:14 there was a bot command to link to jira wasnt there

13:14 muhoo: Anderkent: huh, that doesn't make sense

13:15 Anderkent: muhoo: 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:15 muhoo: how 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:16 Anderkent: muhoo: what browser? I guess the joke falls flat if you're not on chrome

13:16 muhoo: also, fwiw, i was on firefox

13:16 Anderkent: oops

13:16 muhoo: but... i do have that "safe browsing" nonsense enabled, IIRC

13:17 but that's silly. more likely is that if there's a rss feed on refheap, google is subscribing to it

13:17 seems 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:18 callen: technomancy: rumor has it progress is coming along on a pomegranate/sync! function. :)

13:19 technomancy: callen: thumbs up

13:31 callen: SegFaultAX: https://github.com/clojure/core.typed/wiki/User-Guide

13:48 a depression portion of this Python code is just destructuring.

13:48 depressing*

14:20 arrdem: ,(format "0x%X" 2r1001)

14:21 clojurebot: "0x9"

14:27 dnolen: stuartsierra: can we do another CLJS release to address the tools.reader bump?

14:30 Raynes: muhoo: It thinks your tractor's sexy.

14:34 aaelony: those 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:37 mmarczyk: dnolen: ping

14:37 dnolen: mmarczyk: pong

14:40 mmarczyk: dnolen: hopefully I just messaged you off channel, though ERC is telling me something weird atm, so maybe not...

14:40 justin_smith: how do I prevent emacs nrepl from deleting the repl buffer when the remote disconnects?

14:40 dnolen: mmarczyk: hrm, did seem to work

14:40 mmarczyk: ok

14:52 callen: technomancy: http://blog.nullspace.io/adding-haskells-where-to-ocaml.html

14:53 technomancy: callen: IDGI

14:53 it's supposed to be more readable?

14:54 bbloom: adding a suffix-ed where like that seems like a terrible plan in a strict language

14:57 callen: technomancy: it's a hacker school student, I just found the subject of modifying ocaml nifty.

14:58 bbloom: what's problematic about it?

14:58 bbloom: callen: it reverses the order of evaluation (and hence side effects)

14:59 callen: I'm not sure you'd supposed to be using the 'where' where order matters.

15:00 bbloom: it's not just order, it's also conditional evaluation

15:00 if you have let x = foo in let y = bar ...

15:00 you expect those to execute in order

15:00 if you have f z where z = foo and w = bar

15:00 you wouldn't expect bar to execute, but it will

15:00 what order should they go in? it's just not clear that there is any benefit & strictness means there is potential confusion

15:01 callen: I am facepalming so hard about people going ga-ga over tools.trace

15:01 bbloom: I see your point, but I don't think the intent is to care that much.

15:02 hyPiRion: bbloom: huh? You expect them to evaluate in order because you've read how `where` works

15:03 That's like saying "oh, let in Clojure is so confusing, I thought the bindings happened in parallel just like in CL"

15:03 callen: I'd tend to agree. and I got caught by that.

15:04 (let vs. let*)

15:04 ToxicFrog: callen: tools.trace?

15:04 callen: ToxicFrog: yeah people on twitter are freaking out about something Lisp has had for decades. I don't really know why.

15:05 I'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:05 noncom: callen: that's a common occasion in the world

15:05 bbloom: hyPiRion: 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:05 callen: noncom: I know, but still :|

15:05 bbloom: with laziness in haskell, it makes some sense

15:06 ystael: callen: would the typical CLer notice yet another proof of their obvious and manifest intrinsic superiority? or just yawn?

15:06 callen: ystael: I'm not really sure, I'll report when I have data.

15:07 ToxicFrog: callen: 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:08 technomancy: tools.trace is just sugar over alter-var-root+println

15:08 or prn maybe

15:08 ToxicFrog: Also, 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:08 technomancy: this is still a huge improvement over PRN! PRN EVERYWHERE!

15:08 bbloom: ToxicFrog: 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:09 callen: ToxicFrog: I know it's a weak point, I'm almost perpetually pissed that debugging is nicer in Python than Clojure right now.

15:09 technomancy: ToxicFrog: it's still pretty lame in that you have to touch the source to enable it

15:09 which is something nrepl-discover solves

15:09 callen: bbloom: that's not debugging.

15:09 that's just deriving benefit from clearer/simpler semantics.

15:10 that doesn't mean debugging doesn't still suck.

15:10 bbloom: callen: 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:10 callen: I pray for the day when you no longer lean on Microsoft for credibility.

15:10 bbloom: but yes, a real debugger would be nice

15:10 callen: and just make your point.

15:13 seangrove: bbloom: Didn't know you worked on that, glad you mentioned it

15:14 bbloom: seangrove: i don't know why i bother talking to callen….

15:14 seangrove: Gotta take the good with the bad

15:15 I wonder how you can incentivize really great tools for the clojure ecosystem though

15:15 bbloom: the 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:15 callen: seangrove: unifying on nRepl helps.

15:15 bbloom: do you have a log of that?

15:15 technomancy: seangrove: nrepl-discoooooooover https://github.com/technomancy/nrepl-discover

15:15 callen: Polite converstion commends addressing the conversation at face value with your conversation partner, not appealing to authority or assigning homework.

15:16 seangrove: The immune-system reaction to proprietary tools means it's really difficult to sustainably and continually build and refine tools

15:16 bbloom: callen: you've never had a polite conversation ever. you have no idea what a polite conversation is

15:16 callen: There 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:16 seangrove: technomancy: Looking through this...

15:16 technomancy: ~gentlemen

15:16 clojurebot: You can't fight in here. This is the war room.

15:16 dnolen: seangrove: building really good debuggers is a thankless task. Something everyone wants but no one wants to maintain.

15:16 llasram: bbloom: Ignoring people permanently can make channels odd at times though. Watching people converse with ghosts

15:17 seangrove: But just thinking about how far along visual studio/xcode are - they're backed by corps with financial interest in their polish

15:17 callen: llasram: you can ignore replies if you're using a civilized client.

15:17 llasram: Oh, interesting

15:17 bbloom: llasram: if that's happening, i can just check raynes' logs

15:17 seangrove: dnolen: 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:17 technomancy: seangrove: slime does fine from community contributions

15:17 callen: llasram: you ignore the person, then replies to that person with a flag usually.

15:17 dnolen: seangrove: oh yes if there's money involved sure

15:17 technomancy: a lot better than xcode from what I've read

15:17 bbloom: seangrove: no, it's quite thankless even then :-P

15:18 seangrove: Light-table, etc.

15:18 callen: there was something I was debugging this weekend that Light Table probably could've helped with.

15:18 Raynes: bbloom: 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:18 dnolen: seangrove: but then I remember from 2004-2008 the only browser with decent debugging was FireFox

15:18 JS debugging

15:18 callen: I bumped into (nil ...) :(

15:18 seangrove: bbloom: 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:18 noprompt: Raynes: well said.

15:19 technomancy: Raynes: you're understating how difficult it is. it requires great mental discipline.

15:19 bbloom: seangrove: i didn't say it wasn't enjoyable. just thankless :-)

15:19 Raynes: technomancy: I've done it for years now.

15:19 technomancy: Raynes: and you're an inspiration to us all

15:19 seangrove: bbloom: Ah, fair enough, hadn't made that distinction :)

15:19 shiranaihito: wow.. eclipse is a mess

15:19 Raynes: technomancy: FYI, I never /ignore'd lajla and the dude exists to come tell me that he worships my shadow.

15:19 Unless someone is spamming, I'm pretty much going to be able to ignore them if necessary

15:19 ToxicFrog: seangrove: 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:19 Foxboron: Wait, we can't worship your shadow?

15:19 Raynes: You can, just don't tell me about it.

15:19 :p

15:19 callen: Foxboron: I think it's a Lexx reference.

15:19 noprompt: Raynes, my love.

15:20 callen: Not a worshipful of Raynes thing.

15:20 noprompt: Raynes, I worship your shadow.

15:20 Raynes: noprompt: I bet you do.

15:20 noprompt: rofl

15:20 * Foxboron starts stalking Raynes' shadow

15:20 Raynes: No wonder you want me to hang out at your house.

15:21 noprompt: haha. well that and the bacon tournament.

15:21 callen: noprompt: I did a taste-testing vodka tournament not too long ago.

15:21 seangrove: ToxicFrog: 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:21 ystael: bacon ... tournament?

15:22 i'm imagining boar-mounted jousts with sausage forks

15:22 jtoy: is there an operator for less than or equal to ?

15:22 oh, >=

15:22 noprompt: callen: i've managed to avoid alcohol for the past 2.5 months. the thought of a vodka tournament makes my stomach churn.

15:22 seangrove: I feel like it could be done sustainably, but I'm not sure how yet. I like what kodowa is doing though.

15:22 * ucb waves

15:22 callen: ucb: hi

15:22 amalloy: jtoy: <=, mate

15:22 Bronsa: that's the opposite jtoy

15:22 jtoy: i meant that, thx

15:23 callen: jtoy: do you use a repl?

15:23 ucb: hey callen, how do?

15:23 jtoy: callen i do, but for some reason i was expecting >= to not exist in clojure

15:23 noprompt: oh 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:24 ucb: noprompt: nice

15:24 noprompt: ucb: it was a bloodbath.

15:24 seangrove: dnolen: Well, that situation has certainly changed. Firefox's js debugging is barely tolerable last time I tried to polish Zenbox on it

15:26 callen: ucb: 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:26 dnolen: seangrove: FF has improved a lot recently. But my point is that good debuggers usually involve lots of time and likely lots of money.

15:27 ToxicFrog: seangrove: most companies above a certain size have a tooling team, I'd expect

15:27 seangrove: ToxicFrog: 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:28 ToxicFrog: seangrove: yeah, you'll note that I'm talking in general, not regarding clojure specifically

15:28 bbloom: dnolen: it also generally involves changes to the compiler / evaluator

15:28 ucb: callen: smashing

15:28 bbloom: dnolen: which is particularly slow to happen for jvm clojure

15:29 callen: ucb: have you used pomegranate? It's really cool.

15:29 jtoy: i cant wait for clojure on llvm, finally fast startups

15:29 bbloom: things like locals clearing really fucks up debuggability

15:29 ucb: callen: I've heard it in passing. Is that JVM reloading things thing?

15:29 callen: yep!

15:29 ucb: yeah, read about it but never really used it

15:29 callen: ucb: 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:30 ucb: nice!

15:30 callen: ucb: 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:30 ucb: I used to use drip, but not any more

15:30 callen: well drip is orthogonal to this.

15:30 pomegranate is just a library that lets you manage deps/classpath at runtime and interact with maven repos.

15:30 ucb: sure, but I was just mentioning my leinhancements

15:30 callen: ahhh

15:30 dnolen: bbloom: yep that too

15:30 callen: yeah I might need to push my .lein/profiles.clj

15:31 ucb: callen: that'd be nice

15:31 I also need to do more clj hacking; haven't done any in a good while

15:31 with the exception of the simple silly-searchy thing of the other day

15:31 bbloom: personally, i dislike debuggers that are integrated directly in to the evaluation strategy

15:32 callen: ucb: well, `cbp asked me for something to do and I tossed him that pomegranate thing from my to-do list. Are you volunteering?

15:32 bbloom: i much prefer tracing + repeatable execution

15:32 i only want single stepping on a fully deoptimized source-level evaluation

15:32 ucb: callen: 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:33 callen: ucb: 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:33 ucb: kk

15:34 callen: diffmerge 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:34 Datomic in the browser.

15:34 ucb: them be the highlights.

15:35 ucb: all very worthy

15:35 * ucb ponders

15:36 callen: I'm serious about Datomic in browser. I don't mean a REST API passthrough.

15:37 I'm not serious in the sense that I would think it'd be anything other than a fun hack.

15:37 ucb: oh, I know what you mean

15:37 couchdb has puchdb for a reason

15:37 callen: well somebody did a REST API passthrough, posted it to HN and Reddit, and called it "Datomic in the browser"

15:37 ucb: pouchdb*

15:37 callen: I was pissed.

15:38 ucb: heh

15:39 surely you wouldn't do a full-blown datomic in the browser implementation?

15:39 (just thinking about it now)

15:40 callen: ucb: it might be a little potemkin, but it would in fact store the history of data in quads.

15:40 if it could flush the data to LocalStorage, all the better.

15:40 ucb: right

15:40 callen: it'd make for an eventually consistent bootstrapped web client.

15:41 you'd open the client, see the old data and get the incremental refresh live.

15:41 maybe use a bridge to back AngularJS models with the datomic "facts"

15:42 could be fun.

15:42 * ucb thinks some more

15:42 asteve: think less, that's what I always say

15:43 ucb: heh

15:43 fogzbugz is eating my soul as we speak

15:44 callen: ucb: my most frequent job title lately has been JIRA-naut, so I sympathize.

15:44 ucb: partners in misery

15:45 glosoli: what hook do I need to use on Emacs so I could make REPL buffer load auto-complete-mode by default ?

15:45 Raynes: ucb: It's eating your… joel.

15:45 ucb: heh

15:45 arrdem: Raynes: -_-

15:45 callen: glosoli: everywhere or just one mode?

15:45 noprompt: Raynes: that's terrifying.

15:45 Raynes: Oh yeah? OH YEAH? Well I've been upgrading to ruby 2.

15:45 justin_smith: how do I make nrepl not destroy the repl buffer when the other end disconnects?

15:45 callen: Raynes: lol refinements.

15:46 justin_smith: (in emacs, that is)

15:46 glosoli: callen: Well I have it in all prog-modes, though doesn't seem to work in REPL buffer

15:46 callen: justin_smith: modify...nrepl.el?

15:46 noprompt: callen: refinments? isn't that a ruby 2.0 hack?

15:46 callen: glosoli: https://www.google.com/search?client=safari&rls=en&q=nrepl+mode+hook&ie=UTF-8&oe=UTF-8 looks plausible.

15:46 noprompt: I was riffing off what Raynes said, yes.

15:46 justin_smith: callen: I was hoping there was a config I had not found, but I guess I could fork nrepl

15:46 callen: justin_smith: ...no don't fork.

15:47 noprompt: justin_smith: why wouldn't you want it to disconnect?

15:47 callen: justin_smith: just hack in a boolean flag and submit a PR please.

15:47 justin_smith: if you don't want to, send me the code!

15:47 justin_smith: noprompt: I want the buffer to exist, it has printouts I want to refer to

15:47 sarkis: hey guys been thinkng about using clojure for a little project i have in mind that involves a lot of web scraping

15:47 justin_smith: even if the other end disconnected

15:47 sarkis: does clojure excel at something recursive like scrabing?

15:47 callen: sarkis: it's pretty good at stuff like this, yes.

15:47 sarkis: scraping**

15:47 noprompt: justin_smith: oh yah, that would be useful.

15:48 sarkis: ok great, good excuse to play with clojure, thanks :)

15:48 callen: sarkis: data processing, analysis, ML, scraping, web. All good areas for clojure.

15:48 sarkis: have fun :)

15:49 noprompt: sarkis: i brought clojure in to work by way of database migration projects.

15:49 ucb: sarkis: noprompt is working on a thing that'll make your life easier

15:49 noprompt: right?

15:50 noprompt: ucb: no. that's the opposite of my mission. i desire to bring pain and suffering to mortal men.

15:50 ucb: or that.

15:50 noprompt: :)

15:50 ToxicFrog: noprompt: 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:51 noprompt: ToxicFrog: (un)fortunately, i'm a one man show where i work so i pretty much call the shots with regard to technology.

15:52 glosoli: callen: 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:52 ucb: noprompt: nice (?)

15:53 noprompt: ToxicFrog: 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:53 ucb: it has it's tradeoffs.

15:53 ucb: noprompt: I've been in your position as well. With the addition that I was forced to do both PHP and iphone games.

15:53 noprompt: ucb: there are lots of times i wish i was working with someone who had more expertise and experience.

15:54 ucb: noprompt: for that you have things like #clojure, right?

15:54 noprompt: ucb: oh there's some php to maintain.

15:54 ToxicFrog: ucb: I'm so sorry.

15:54 noprompt: ucb: yes. and books. it also pays to be self motivated.

15:54 ucb: noprompt: there's always some cobol^Wphp to maintain

15:54 ToxicFrog: not there any more since 2009 so don't be :)

15:54 noprompt: *nod*

15:54 ToxicFrog: noprompt: we're ostensibly a Python team but also work on a bunch of things with tentacles extending into stuff written in C++ :(

15:56 ucb: eep

15:56 noprompt: ucb: one of the projects i'm working on right now is a rewrite of an old php application in clojure.

15:56 ucb: ah, well, that's rather nice then

15:56 noprompt: ucb: it was mind boggling digging through that code lemme tell ya.

15:56 ucb: I'm sure it was

15:57 callen: ToxicFrog: ouch. We managed to stay mostly Python despite having a lot of matrix math stuff.

15:57 compiling old fortran libraries sucks though.

15:58 ToxicFrog: callen: most of our tools are Python, but we're also responsible for certain features in production servers which are all C++.

15:58 Also, occasionally someone on the team will go insane and write a stand-alone tool in C++ before anyone can stop them. :(

16:00 Apage43: is that like in dwarf fortress when one of your dwarves occasionally goes mad and turns another dwarf into an overcoat

16:00 callen: ToxicFrog: kill them next time.

16:01 Apage43: <3

16:01 Apage43: that game produces unparalleled hilarity and horror.

16:01 arrdem: (inc Apage43)

16:01 lazybot: ⇒ 2

16:05 * hyPiRion is taken by a fey mood!

16:05 ystael: the hilarity happens when i read other people's Let's Plays, and the horror happens when I try to remember the keybindings

16:06 justin_smith: noprompt: 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:06 ToxicFrog: Apage43: yes, pretty much~

16:07 noprompt: justin_smith: that was my path too. although i did check out haskell and some other langs along the way.

16:08 justin_smith: noprompt: I didn't work on the other stages, they brough me in for clojure, but that is the tool's path

16:08 callen: C -> Common Lisp bastard -> Python -> Clojure

16:08 smatterings of other languages.

16:08 ohhhh, you mean company.

16:08 justin_smith: yeah, sorry

16:08 callen: my mistake.

16:08 justin_smith: how does Clojure code with that heritage look?

16:09 justin_smith: csound -> tcl -> scheme -> common lisp -> c -> ocaml -> scheme -> clojure

16:09 callen: solid.

16:09 hyPiRion: dang you guys

16:09 common lisp, java -> clojure. The fact that it was on the JVM was incidental.

16:09 callen: justin_smith: I did some Haskell and other things as well, but my list is just core languages.

16:09 justin_smith: callen: lots of stateful orm concepts wrapped up in functional data transformations

16:09 callen: hyPiRion: I started young.

16:10 justin_smith: oh, I've done stuff like that in Python. better than the alternative but it can be a little o_O sometimes.

16:10 justin_smith: yeah, orm maps pretty well to most webapp stuff it seems

16:10 though I sometimes wonder if we could totally break out of the mode into something more functional in basic design

16:11 Okasu: hyPiRion: Now go to workshop and make us some artifact.

16:11 callen: hrm. people actually push "0.1.0-SNAPSHOT" jars to clojars? grungy.

16:12 * hyPiRion works furiously!

16:12 * ucb has pushed the occasional -SNAPSHOT jar out there

16:12 justin_smith: callen: 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:12 Okasu: hyPiRion has begun a mysterious construction!

16:12 hyPiRion: ah dang, forgot that one

16:12 justin_smith: oh, forgot elisp

16:13 brighid: justin_smith: Hooray elisp :3

16:13 callen: I technically did elisp all along that timeline, and I experimented a lot while I was using Python.

16:13 justin_smith: yeah, I did Ruby, Haskell, C++, and others during the Python time period.

16:14 justin_smith: I 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:14 callen: Mostly because Python felt neutered.

16:15 Okasu: ls ~/coding => ada clojure cpp java lisp(it's scheme/CL) prolog ruby c coq erlang haskell J javascript R

16:15 lazybot: data dev etc home lib lost+found media selinux srv sys tmp usr

16:15 hyPiRion: Well, I've done a lot of other PLs, but I don't consider them my favourite go-to PL.

16:16 ToxicFrog: I never really got into Python. I mean, I use it, but it doesn't really click for me.

16:16 By the time I started using Python (which was quite late; university) I already knew Lua and preferred that.

16:17 arrdem: lua is awesome, but I'm used to reaching for python first...

16:18 Okasu: arrdem: Heh, i guess i'm not the only one seeing pun in "lua is awesome", but awesome is sucks.

16:18 time du -mhs ~/codingtime du -mhs ~/coding

16:18 3.0G/home/george/coding

16:18 justin_smith: I've only used lua to configure window managers - is it highly string oriented or is that a misapprehension?

16:18 arrdem: Okasu: awesome is really unfortunately bad

16:18 Okasu: du -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:19 ToxicFrog: arrdem: 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:19 justin_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:20 justin_smith: ToxicFrog: the way clojure is heavily hashmap oriented - using strings as a go to datastructure and intermediate representation in algorithms etc.

16:21 arrdem: ToxicFrog: 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:21 ToxicFrog: justin_smith: oh. Yeah, in that case the answer is "lua is heavily hashmap oriented, but unlike clojure it presumes mutability"

16:21 callen: arrdem: really?

16:21 arrdem: what about it don't you like?

16:21 ToxicFrog: If you find yourself stuffing things into a string rather than using tables you've gone horribly wrong somewhere.

16:22 (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:22 (I'm looking at you, xchat lua plugin API(

16:22 Okasu: arrdem: I really liked clojure.contrib.command-line.

16:22 arrdem: Okasu: I'm younger than contrib :P but I'll take a look at it

16:23 justin_smith: doesn't the warm up time make clojure kind of tedious for most idiomatic command line usage?

16:23 arrdem: justin_smith: yeah that's one problem

16:23 Okasu: arrdem: Younger?

16:23 arrdem: Okasu: I came to clojure after Contrib bit the dust is what I mean

16:23 ToxicFrog: justin_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:23 Loading/saving config data from disk, for example.

16:23 mdrogalis: arrdem: Contrib "predates" you :)

16:24 arrdem: ^ THAT

16:24 hyPiRion: arrdem: Yay for younglings!

16:24 arrdem: I think that Raynes is the only one here younger than me...

16:24 callen: arrdem: it could be resurrected :)

16:24 * callen adds a command-line library to his to-do list

16:24 Raynes: arrdem: There was a fellow here with Foxboron that was < 16.

16:24 Not sure if he is still around.

16:25 arrdem: damn...

16:25 ToxicFrog: justin_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:25 * callen 's to-do list is like the warehouse from Raiders of the Lost Ark

16:25 * arrdem 's project list has its own mummy guardians

16:25 callen: LOL

16:25 arrdem: my todo list is where ideas go to die :P

16:26 callen: we should do a refheap clone that's "project ideas I'll never get to, someone build this"

16:27 callen: arrdem: I do a pretty good job of draining my list. There are things like you describe out there.

16:27 arrdem: callen: good on you. I'm really bad about never getting to or finishing things.

16:27 hyPiRion: arrdem: That's a good idea, unfortunately you just said that your todo list is where ideas go to die.

16:27 callen: arrdem: make me aware of them.

16:27 arrdem: even if I don't do things, I make people aware of what the community's needs are.

16:28 do things specifically myself, that is.

16:29 arrdem: hyPiRion: thank you for catching the unhandled recursive case :D

16:31 lynaghk: Are 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:32 callen: lynaghk: https://github.com/francoisdevlin/devlinsf-clojure-utils/blob/master/src/lib/sfd/table_utils.clj#L39-L49 ?

16:33 lynaghk: callen: right, I just wanted to ask if there was something like that on clojars already that works with clojure 1.5

16:34 * callen adds to the to-do list

16:34 noprompt: lynaghk: yeah i was hoping for something like that the other day myself.

16:41 has anyone ever tried to target both nodejs and "standard" cli

16:41 that was a question. :|

16:41 arrdem: I'm trying to target raw asm.. does that count?

16:41 callen: noprompt: wat

16:41 noprompt: callen: not wat

16:42 callen: "target"? Like, with a rifle?

16:42 noprompt: i'm being totally cereal here.

16:42 callen: because I'm down with hunting the least dangerous game - Node.js users.

16:42 (I'm serious in that I don't understand what you're asking)

16:43 noprompt: basically 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:43 arrdem: callen: he's asking if anyone here is writing clojure apps that run both as clojure apps and as cljs apps

16:43 callen: oh.

16:43 noprompt: lots of cljx?

16:44 noprompt: callen: well, i was just using the crossovers option in :cljsbuild

16:46 should i use cljx?

16:46 i guess i should

16:46 lynaghk: noprompt: it's kind of a hack, but so is everything I've seen that tries to solve this problem

16:49 noprompt: lynaghk: that's pretty neat. for some reason i'm having a bit of trouble getting everything to work out with crossovers.

16:50 lynaghk: noprompt: yes, crossovers is much more of a hack

16:50 noprompt: I haven't been using cljx lately, but I know cemerick has been using it a ton with success.

16:51 noprompt: lynaghk: do you use crossovers?

16:52 dnolen: ok this, http://gist.github.com/swannodette/6273757 + core.match could be really, really, really sick

16:53 lynaghk: noprompt: no, I use cljx.

16:53 dnolen: you can pass the result of dispatch into tap, dispatch itself can use core.match to determine the key

16:53 anybody downstream can tap their own dispatch/lookup

16:54 close to predicate dispatch at the event level :D

16:55 bbloom: dnolen: why are you using vectors instead of sets?

16:55 dnolen: bbloom: could use sets, but I guess I thought preserving listen order might be important - maybe not?

16:55 bbloom: dnolen: that's what i was wondering about :-)

16:56 dnolen: seems like i'd rather break listening order, since it's almost always a nightmare to depend on that

16:56 especially if you had mutliple threads & wanted to have concurrency in -invoke

16:56 dnolen: bbloom: true enough

16:56 bbloom: neat though

16:58 i 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:58 for DOM, reachable? would == attached?

16:59 i'm gonna convince somebody someday that garbage collection is more widely applicable than language VMs :-)

17:06 dnolen: bbloom: sounds like a pretty straightforward thing to do for MVC type things, not sure you can anything about the DOM though

17:06 bbloom: dnolen: do you ever care about events from detached nodes?

17:08 cemerick: noprompt, lynaghk: I actually added a reference to another nontrivial project using cljx, some clojure/cljs validation lib

17:08 added to the cljx README, that is

17:08 dnolen: bbloom: I'm more worried about the leaks because of not cleaning up

17:08 bbloom: dnolen: but i'm advocating for automatic clean up...

17:08 lynaghk: cemerick: cool, thanks.

17:09 dnolen: bbloom: well you're talking about automatic unsubscribe

17:10 bbloom: dnolen: yeah, i'm saying if you stop listening to a channel, you shouldn't have to manually unsubscribe the source

17:10 dnolen: 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:11 noprompt: cemerick: 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:11 bbloom: jquery 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:11 dnolen: bbloom: 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:11 callen: noprompt: that's pretty cool :)

17:11 noprompt: i guess that's probably pretty rediculous but i think cljx is probably what i'll need to use.

17:12 dnolen: bbloom: this problem only occurs w subscribe/unsubscribe, not core.async

17:12 plain core.async

17:12 cemerick: noprompt: frak is jkk's thing?

17:12 ucb: callen: http://www.youtube.com/watch?v=5l3wkOeBLuY

17:12 callen: I'm not sure I believe in channels and events.

17:12 bbloom: dnolen: 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:12 noprompt: cemerick: frak is my thing. :)

17:12 bbloom: dnolen: Rx.net utilizes explicit Dispose calls

17:12 dnolen: i think that sucks

17:12 callen: I'm pretty sure message passing over a channel is a poorly implemented ephemeral database of facts.

17:12 cemerick: noprompt: oh, oh, *frak*, right :-P

17:13 dnolen: bbloom: you mean users need to call that

17:13 bbloom: dnolen: yeah, but only if your Observables have an underlying Subject

17:13 noprompt: cemerick: it seems people want it for all four targets. :/

17:13 cemerick: noprompt: cool thing, that

17:13 bbloom: but then you wind up with all kinds of ownership problems

17:13 it blows

17:13 callen: ucb: http://www.youtube.com/watch?v=xIVIEqrfszg

17:13 ucb: callen: <3 the cover art

17:14 dnolen: bbloom: 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:14 noprompt: cemerick: thanks. as of last night it's a bit better. still a wip, bit of a pita.

17:14 bbloom: dnolen: 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:14 noprompt: cemerick: btw that youtube clip on the austin readme, i lolled.

17:14 callen: ucb: this is some good Summoning.

17:14 bbloom: dnolen: i'd like to be able to remove/re-add/whatever & then have some system patch up the channels/subscriptions to make sense

17:14 cemerick: noprompt: oh, why?

17:14 oh, the clip

17:14 noprompt: cemerick: yeah, good stuff.

17:14 bbloom: dnolen: so i pay an amortized cost & don't have both removal primitives

17:15 cemerick: I thought you meant my walkthrough. Which, I can see people laughing at, too. :-P

17:15 dnolen: bbloom: interesting idea, probably makes sense to build the basic components and see how they wire together

17:15 bbloom: dnolen: 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:15 noprompt: cemerick: oh. yeah, i didn't laugh at that. it's awesome you did that. it's inspiring.

17:16 cemerick: what application do you use to make those videos?

17:16 cemerick: Well, I wanted to make it clear what's going on.

17:16 noprompt: that was screenflow

17:17 hopefully there's a non-shite linux equivalent

17:17 callen: ucb: we had a duel of the music and you won. I like that Black Moth song but Summoning is lovely.

17:18 dnolen: bbloom: right now I'm thinking about event dispatch perf mostly, it boggles the mind that Backbone and Ember are so slow

17:18 ucb: callen: 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:18 noprompt: cemerick: i think might have to try doing something like that for garden when i push out the 1.0.0 this month.

17:19 callen: ucb: I figured it'd be up your alley :)

17:19 bbloom: dnolen: 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:19 noprompt: need to get that working with cljs...

17:19 ucb: callen: much appreciated :)

17:19 bbloom: dnolen: the typical usage of backbone leaks memory like crazy, but that's a different story

17:19 dnolen: bbloom: http://jsfiddle.net/jashkenas/CGSd5/

17:19 noncom: lein uberjar does not compile java-sources.. why so?

17:20 i have the path set

17:20 bbloom: dnolen: ember is slow, but backbone seems fine in that particular benchmark

17:20 dnolen: bbloom: that's only 100 elements, it gets really slow as you increase the number

17:20 noprompt: there was a cool fiddle comparing backbone, ember, and angular. ember was super slow.

17:21 dnolen: bbloom: this very likely something you can address via buffering, but nobody exposes that

17:21 bbloom: dnolen: this isn't doing any dispatch at all

17:22 dnolen: the general slowness w/ backbone is coming from rerendering from scratch via the template every frame

17:22 it's also using jquery's html method, which does like 78390589353 platform compat things

17:22 patchwork: When using % lein ring server from the command line, how do I prevent it from reloading?

17:22 It seems ring-reload is built into ring server

17:22 srruby: Anyone 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:23 noprompt: here's the angularjs version of that http://jsfiddle.net/mhevery/vYknU/23/

17:23 dnolen: bbloom: 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:24 bbloom: dnolen: sure, that sucks, but nobody is listening to those events, so it's just 100 no-ops

17:27 dnolen: bbloom: not a noop, it doesn't trigger set html calls

17:27 srruby: I found the answer: c-p-r

17:27 dnolen: bbloom: but you are right the benchmark is flawed for Backbone, it doesn't measure event perf

17:27 bbloom: dnolen: yeah, that was my main point :-)

17:27 dnolen: bbloom: and Ember (whatever version this is) is catastrophically slow

17:27 bbloom: dnolen: anyway, please please please look at react :-)

17:28 dnolen: i'll keep mentioning it to you until you come back to me & tell me how awesome it is

17:28 dnolen: bbloom: haha

17:28 bbloom: it 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:29 it 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:29 you have to study the implementation to really understand why it's so awesome

17:31 ucb: callen: http://www.youtube.com/watch?v=w2PwS8FCfxo

17:32 callen: ucb: yeah I'd seen that.

17:32 ucb: callen: first time for me o_O

17:32 callen: I don't like the music that play in the background in the intro

17:32 the nursery rhyme stuff

17:32 * ucb back to stoned jesus

17:33 srruby: bbloom: what is the URL for react ? I'm not familiar with it

17:33 dnolen: bbloom: never could get excited about Angular, is there any way for me to understand React without wading through the source code?

17:33 bbloom: srruby: http://facebook.github.io/react/

17:33 srruby: bbloom: Thank you.

17:33 bbloom: dnolen: the new docs are much better than they were a few months ago: http://facebook.github.io/react/docs/getting-started.html

17:33 read down the left column, shouldn't take you more than an hour

17:34 can probably skim it in 10 minutes, but the key ideas need some baking time :-)

17:34 callen: ucb: the funny part is it's sorta vanilla black metal, which is totally unexpected.

17:34 ucb: callen: well, she's 6, right?

17:35 bbloom: dnolen: my excitement about angular was for smaller apps, it gets messy fast for larger stuff w/ lots of directives. not so w/ react

17:36 srruby: bbloom: This is a clojure chat room. Are you using clojurescript on the front end?

17:36 callen: ucb: I mean that in a show of admiration. black metallers are all about "trve kvlt"

17:36 bbloom: srruby: 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:37 ucb: callen: heh

17:37 bbloom: srruby: i think that react is relevant b/c it's a largely functional design that would map cleanly to cljs

17:37 srruby: Thanks.

17:38 bbloom: i'm also not so subtly attempting to get dnolen to implement it for me :-)

17:38 or at least collaborate with me to implement it

17:38 callen: bbloom: Tom Sawyer

17:38 dnolen: bbloom: I still don't see what I'm supposed to like about react, you wade through a lot of stuff in these docs

17:39 bbloom: dnolen: that's what i was saying, it doesn't demo well. it looks like everything else you're used to on the surface

17:40 dnolen: but your render code is a pure function that returns a DESCRIPTION of the subtree, not an actual subtree.

17:40 callen: most web sites, applications, or much of anything will never need anything like what facebook writes libraries for.

17:40 bbloom: dnolen: state is stored in a global state map & it's lifetime is automatically managed by component ID corellation

17:40 callen: Javelin comes to mind WRT React.js

17:41 bbloom: dnolen: pervasive memozation of rendering results powers fast DOM updates

17:41 dnolen: 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:42 callen: "functional", with global mutable state?

17:42 bbloom: callen: in a pure functional setting, global mutable state is the ONLY kind of state

17:42 http://awelonblue.wordpress.com/2012/10/21/local-state-is-poison/

17:42 dnolen: bbloom: this all stuff that I like, but I mostly get bored looking at this code - classes, mixins, snore

17:43 bbloom: dnolen: don't think of it like classes and mixins

17:43 callen: Religion $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:43 bbloom: dnolen: think of stateless components as templates & stateful components as go-routines

17:44 dnolen: 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:44 callen: I'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:44 bbloom: dnolen: plus some extra states for mount/unmount to/from the dom

17:44 dnolen: bbloom: yes, yes I get all that. I'm more excited about your succinct description then Reacts docs or codebase

17:44 bbloom: dnolen: i'm not saying you should use react, i wouldn't want to give up cljs, i'm saying you should study it

17:45 dnolen: bbloom: but the parts worth studying can be described in like a paragraph

17:45 instead of me reading all this boilerplate code

17:45 bbloom: dnolen: it can only be described in a paragraph if you have been paying attention to rich hickey for years :-)

17:46 dnolen: hence they don't assume such a background in their docs

17:46 dnolen: i've studied like 3978589353 UI toolkits & this is the first one for html/dom that ever made me go FINALLY.

17:47 just replace each class name with a keyword, & it's basically a functional program :-P

17:47 callen: I should write an FRP library for CLJS just so bbloom begrudgingly uses something I made.

17:48 bbloom: callen: i don't believe in signals/behaviors style FRP

17:48 and i've read the literature.

17:48 callen: whatever, the point is, I'm going to subvert your fetishes and make you mine.

17:48 bbloom: callen: dude, go away.

17:49 noncom: if in lein plugin i want to concat to a list that holds symbols, like :aot, how do i go about it?

17:50 callen: noncom: you mean you want to preprocess the project.clj?

17:50 noncom: no-no, i am ok with this. just how i properly append the symbol-type values?

17:50 djanatyn: I came up with a panel wrapper thingy for quil :)

17:50 http://sprunge.us/JPJU?clj

17:51 now I can just throw up a quil window and do what I would like to it

17:51 I should have some atom painter dude that I can throw functions to and then he'll do it on the canvas

17:51 technomancy: noncom: update-in+concat you mean?

17:51 noncom: i do like (update-in project [:aot] concat ['my-project.core 'my-project.something])

17:51 djanatyn: but I'm kind of wondering why quil doesn't support this thing already!

17:51 bbloom: dnolen: the mixins bit is the one part of react that is just kinda wrong

17:51 technomancy: noncom: sure

17:51 noncom: yeah, is the quote-syntax correct here?

17:51 technomancy: yeah

17:51 bbloom: dnolen: it's just a bad primitive unit of reusable state / behavior

17:51 dnolen: but it plays nice w/ javascript, so it's not the end of the world

17:51 noncom: well, it does not aot them...

17:52 i spit the modified project.clj to a file just before calling uberjar and it says :aot (lein-natives-test.core jcl.ep)

17:53 those are the correct nss to aot

17:53 technomancy: noncom: 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:53 noprompt: lynaghk, cemerick: so, this cljx doohickey is pretty sweet.

17:53 technomancy: noncom: this is a really yucky downside to the way lein implements profile unmerging

17:53 noncom: umm...

17:54 technomancy: hopefully all that can go away in 3.0

17:54 noncom: djantyn: what is panel wrapper in your code?

17:54 technomancy: what can i do for now?

17:55 dnolen: bbloom: there very few things I like less these days than OOP JS

17:56 noncom: make user explicitly designate aot targets?

17:56 noprompt: dnolen: i'm teaching an introductory javascript course starting next week, trust me i'm going to more than impart that same sentiment.

17:56 dnolen: bbloom: I also don't know if I'm totally sold on this DOM rep model

17:56 bbloom: dnolen: i agree 100%, hence why I actually like react. it's functional programming in disguise

17:57 dnolen: you mean the tree of components?

17:57 dnolen: bbloom: it seems hard to represent subtle transitions

17:57 bbloom: a la OS X Layer stuff

17:57 technomancy: noncom: 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:57 bbloom: dnolen: yeah, it's definitely not an ideal UI representation, but it's very close to the DOM model

17:58 dnolen: bbloom: but this is why I'm not excited about it, baked in assumptions about the underlying rep

17:58 bbloom: dnolen: generally, flatter is better. games are usually *completely* flat databases of world space objects

17:58 dnolen: UIs could be that way too, but that's a more dramatic change & doesn't play nice w/ lots of other stuff

17:59 dnolen: 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:59 dnolen: forcing a hierarchical structure is bad, but the DOM already does that too you

17:59 dnolen: transitions that traverse the UI hierarchy are hard no matter what you do

17:59 noncom: technomancy: 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:59 dnolen: bbloom: we should definitely look at some possible designs when we meet up

18:00 bbloom: dnolen: 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:00 dnolen: you can do the same trick in react, but it's very explicit

18:00 technomancy: noncom: oh, if they're generated namespaces then yeah; better to use merge-profiles

18:01 dnolen: bbloom: 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:01 bbloom: and iOS

18:01 bbloom: so anything to DOM centric needs to be ditched

18:01 s/to/too

18:01 bbloom: dnolen: 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:01 noonian: what 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:04 technomancy: ~clojars migrations

18:04 clojurebot: Huh?

18:04 technomancy: =\

18:04 ~migrations

18:04 clojurebot: Pardon?

18:04 bbloom: $clojars migrations

18:04 technomancy: dang it clojurebot

18:04 bbloom: booo

18:05 technomancy: clojurebot: 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:05 clojurebot: Roger.

18:05 technomancy: noonian: ^ I recommend this approach

18:05 bbloom: (inc technomancy) ; for lack of down-migrations & db-agnosticism

18:05 lazybot: ⇒ 68

18:07 noonian: technomancy: 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:11 technomancy: noonian: neither down-migrations or db-agnosticism actually work on nontrivial real-world codebases

18:11 noprompt: ,l

18:11 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: l in this context, compiling:(NO_SOURCE_PATH:0:0)>

18:11 noprompt: :(

18:11 technomancy: down-migrations get added but never tested, giving you a false sense of security

18:11 dnolen: sweet I just ran CLJS on my iPad Mini via Ejecta

18:12 technomancy: "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:12 noonian: technomancy: thanks

18:13 technomancy: db-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:13 arohner: technomancy: though I'd dispute that even regular SQL is standardized

18:13 and the semantics certainly aren't

18:13 technomancy: if 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:14 arohner: 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:15 callen: 50 Shades of Grey Standards

18:17 bbloom: "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:18 hyPiRion: if anything, we know that standards may be interpreted in many ways. Look at html, css and friends, for instance.

18:19 shriphani: hi 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:23 callen: shriphani: the same way you scroll in any other webdriver library. Execute scroll(0,pixels); in the JavaScript context.

18:26 shriphani: 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:26 shriphani: have you read the Selenium documentation?

18:27 shriphani: callen, I want to go through an item only available through infinite scroll.

18:28 shdwprince: ping

18:29 callen: shdwprince: you didn't ping anyone.

18:29 shriphani: your first mistake was using infinite scroll.

18:29 shdwprince: bad

18:29 callen: shriphani: your second mistake was not adding the ability to jump by primary key in the paginator.

18:29 shriphani: your third mistake was trying to test infinite scroll.

18:29 shriphani: I'm scraping a 3rd party site...

18:29 callen: shriphani: good news, you can fix it.

18:30 shriphani: oh you're boned then. JS executor context hack away then.

18:30 godspeed.

18:30 shriphani: said third party's site breaks if visited without js enabled.

18:30 callen: shriphani: my advice? an infinite scroll usually means AJAX.

18:30 shriphani: yeah.

18:30 callen: shriphani: AJAX means there's an API

18:30 brotip: APIs are easier to scrape than infinite-scrolling HTML pages.

18:30 jus' sayin'

18:31 shriphani: well the official API broke support for what I wanted.

18:31 callen: shriphani: why not watch the requests the browser is making and emulate those?

18:31 shdwprince: use insider api, be bag guy

18:32 callen: (づ。◕‿‿◕。)づ shriphani - it's going to be okay.

18:32 Apage43: chrome inspector, network tab

18:32 ucb: JAKE!

18:33 * ucb crawls under that rock over there

18:33 Apage43: esp. "Copy as cURL"

18:33 which copies a curl command that duplicates that request exactly onto your clipboard

18:33 callen: Apage43: that's sexy. didn't notice that.

18:34 Raynes: I've used that before.

18:34 callen: I need to pay more attention.

18:34 Raynes: I can confirm best thing ever.

18:34 brehaut: Apage43: does that grab the cookie ajar too?

18:34 s/ajar/jar/

18:34 Apage43: yes

18:34 brehaut: magic

18:35 Apage43: I mean, it copies it as -H 'Cookie: whatever=yeah;'

18:35 but the cookie is captured

18:35 callen: Apage43: you're my new favorite person.

18:35 Raynes: you're fired.

18:35 Raynes: noprompt: You're a monster for not going to that concert with me tomorrow.

18:35 It's going to be glorious.

18:35 callen: Raynes: why did you not tell me this? (ಥ﹏ಥ)

18:35 Raynes: Because I'm very rarely a web developer.

18:35 And you never ask me web dev questions.

18:36 noprompt: Raynes: :S

18:36 i'd be down to go see some good live surf music.

18:37 Apage43: there's also "copy as HAR", which is a JSON format that describes http requests.

18:37 if you want to consume it programatically

18:37 Raynes: noprompt: There's still time. There are $50 tickets on stubhub. It's only like a 3 hour drive from you. :P

18:38 Make that 4 hour drive.

18:38 noprompt: Raynes: :P did i mention i'm moving? lol.

18:38 Raynes: But the concert is at 9PM. You've got plenty of time.

18:38 Your house can wait, this is important damn it.

18:38 ucb: Raynes: what band is this?

18:38 Raynes: ucb: Panic! At The Disco.

18:40 amalloy: Apage43: 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:40 Apage43: I don't think its always been there

18:40 ucb: Raynes: never heard of them

18:40 Apage43: yeah

18:40 it was added in Chrome 26

18:40 * ucb . o O ( at least it wasn't One Direction )

18:41 Apage43: so, march of this year

18:41 amalloy: well, that explains it, i guess. until recently i was on like chrome 12

18:41 Raynes: ucb: http://www.youtube.com/watch?v=LUc_jXBD9DU and http://www.youtube.com/watch?v=TFSIm3Zeecg

18:41 amalloy: or some other decrepit version, because i hate upgrading

18:42 ucb: Raynes: you've shown me this before! :-o

18:43 callen: amalloy: I thought Chrome automatically upgraded. Did you neuter it?

18:43 technomancy: amalloy: upgrading is the worst

18:43 amalloy: callen: i think my distro did

18:43 technomancy: they should be legally required to call it sidegrading

18:43 * callen stares hard at technomancy

18:43 callen: amalloy: that'd be chromium, no?

18:43 amalloy: my linux distro

18:44 callen: ...

18:44 the browser would be chromium

18:44 not google chrome.

18:44 Raynes: callen: Google Chrome has a PPA for chrome, bro.

18:44 callen: Raynes: that's not distro.

18:44 that's a PPA.

18:44 distros cannot/do not distribute Google Chrome.

18:44 they distribute Chromium.

18:44 amalloy: *shrug*

18:44 Raynes: callen: And the PPA pipes upgrades which happen when you do apt-get upgrade...

18:44 technomancy: doesn't it depend on the distro?

18:45 callen: technomancy: I'm pretty sure no Linux distro wants to be the asshole that distributes a binary stamped by Google.

18:45 technomancy: there are a bunch of too-cool-for-dfsg derivatives that will do pretty much anything

18:47 callen: well. save for those.

18:47 Raynes: Anyways, 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:47 He 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:47 callen: makes sense.

18:48 except for the part where he never ran sudo apt-get upgrade

18:48 Raynes: How do you know?

18:48 amalloy: i don't think i very clearly meant anything

18:48 i was like like 'for some reason i don't care about, chrome was still old'

18:48 "like like". god. "just like", please

18:56 akurilin: MVC + 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:56 noprompt: :(

18:56 callen: akurilin: I don't believe in auto-validate->save

18:56 noprompt: ;_;

18:57 callen: akurilin: I prefer to let the controller decide when to flush, since that's specific to business logic sometimes.

18:57 everything else about interacting with and transforming the data, or fetching new data will usually be in the "models"

18:57 (and (validate-okay? instance spec) (save instance))

18:58 akurilin: callen, perfect, I was leaning towards that as well, but was wondering if that'd be a MVC faux pas

18:58 callen, thank you.

18:58 callen: akurilin: 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:59 MVC, in the original form, involved prolifically stateful objects with no real specification and message passing.

18:59 derive the value of the original purpose (separation of concerns) instead of slavishly obeying the forms. :)

18:59 akurilin: callen, I'd kill for a guide for MVC-with-LISP, since quite a few Railsism are no longer relevant.

19:00 noprompt: i'm a just write the fucking program fascist.

19:00 callen: akurilin: goin' on the to-do list.

19:00 akurilin: thanks.

19:00 noprompt: akurilin: why would you want that?

19:00 glosoli: http://imgur.com/WPHQQ0z desperately trying to find face for that using that cyan color which is barely visible, any ideas ?

19:01 akurilin: noprompt, what specifically?

19:01 callen: akurilin: another common pattern for me is (save-if-okay instance spec) => {:id 1 :error nil}

19:01 glosoli: it should be some sort part of nrepl, can't find though

19:01 noprompt: akurilin: i guess i'm asking why is MVC so important to you?

19:01 akurilin: noprompt, it's not, it's just that I don't know any better.

19:01 noprompt: akurilin: for the record i'm not being a prick.

19:02 callen: noprompt: MVC is a pretty good "default" way to separate concerns in a lot of applications for which the concepts are relevant.

19:02 akurilin: noprompt, I'd be very happy to use a different approach as long as I can learn more about it from somewhere.

19:02 callen: presentation, logic, and persistence all to their own little happy boxes isn't a bad way to go at all.

19:02 there are other ways, but anything can work as long as a design principle is involved.

19:02 noprompt: akurilin: i kind of wanted the same thing when i came to clojure from ruby.

19:03 akurilin: s/different/better for clojure/

19:03 noprompt: better is a matter of perspective.

19:03 callen: I've seen some weird patterns in my Clojure Ring apps sometimes for what could fairly be called CRUD

19:03 specifically higher order functions wrapping things fronting the view-specific parts. Not dissimilar from decorators in python.

19:04 I call it weird not because HOF are weird, but because it *looks* weird for a web dev perspective.

19:04 noprompt: i guess i don't necessarily look for ways to fit my problems to patterns.

19:04 akurilin: noprompt, do you have any alternatives to MVC in mind I could read up on?

19:04 callen: noprompt: that's not necessarily what's going on here.

19:04 noprompt: people are just looking for vases for their flowers.

19:05 noprompt: I'd relax, were I you and not me own self. :)

19:05 noprompt: akurilin: no. i don't think that's the "right" way to go about solving problems or building applications.

19:05 akurilin: noprompt, I feel like we're just looking for a wee bit of structure, but the goal is maximum minimalism and minimum boilerplate.

19:05 noprompt: akurilin: you should let your problem domain determine your architecture.

19:05 callen: akurilin: it's not a super clean or principled example, but you could always look at Neubite.

19:05 akurilin: noprompt, that's fair, can't argue with that.

19:06 callen: noprompt: 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:06 noprompt: akurilin: if you decide on a "pattern" or architecture up front you're doing too much work.

19:06 sevvie: "looking for vases for their flowers" sounds like a really polite way to say "bikeshedding."

19:06 callen: akurilin: http://github.com/bitemyapp/neubite/

19:06 sevvie: vases live in homes and you have to look at them daily, the same is not true for bikesheds.

19:06 sevvie: are you familiar with flower arrangement?

19:07 noprompt: akurilin: the best advice i can give you is be generic.

19:07 akurilin: callen, is that a take on a ring app? Along the lines of Luminus?

19:07 callen: akurilin: it's not a "take", it's just a hybrid Luminus/Ring app.

19:07 noprompt: akurilin: for example don't start with the concept of a "model", rather start with the concept of "data".

19:07 akurilin: callen, ok.

19:07 callen: akurilin: it's a minimalist CMS with the ability to make little internal web apps.

19:07 akurilin: it runs http://bitemyapp.com/

19:08 noprompt: am i making sense here? sometimes i feel like i'm just talking out of my ass.

19:08 akurilin: noprompt, 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:09 callen: noprompt: look at neubite.

19:09 it's just functions that do things or return data.

19:09 there's no frippery or architecture astronomy here.

19:10 akurilin: callen, yeah thanks for that link, I've been meaning to cherrypick Luminus or another web app for a long time, for ideas.

19:10 callen: noprompt: it's just a vase. let him get started on his flowers.

19:10 akurilin: it's my test bed for Ring libraries I work on as well. You should probably eyeball my github if you do web.

19:11 akurilin: sounds good, who are you on github?

19:11 sevvie: callen: I occasionally dabble in arranging flowers.

19:11 One of those things one does to relax.

19:11 akurilin: I love this channel, things get very zen very fast. Always puts a smile on my face :)

19:12 callen: akurilin: bitemyapp

19:12 akurilin: github.com/bitemyapp/

19:13 sevvie: very good. Then you get the feel of what I mean. No malice, no judgment, just a vase. :)

19:13 bikeshedding implies derision where I mean none.

19:14 akurilin: callen, awesome, following you. Is your avatar from Gon?

19:15 noprompt: akurilin: 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:16 callen: akurilin: 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:16 noprompt: relax. bad code is bad, good code is good. No label singularly and conclusively decides which is the case.

19:16 noprompt: callen: this is also valid.

19:16 callen: like it said i just had a bad experience with the whole thing.

19:17 rhg135: hello, quick ?, any idea why '(take 5 (shuffle (lazy-seq (concat (repeat true) (repeat false)))))' times out on lazybot?

19:17 it appears somethings not lazy

19:17 callen: noprompt: don't project. You're among friends. It's okay.

19:18 bbloom: rhg135: shuffle is eager

19:18 ,(shuffle (range 5))

19:18 clojurebot: [2 3 0 1 4]

19:18 rhg135: oh

19:18 bbloom: quite clearly returns a vector & not a seq

19:19 rhg135: ok

19:19 forgot lol

19:19 noprompt: callen: yes. everything i say is delivered in a relaxed tone.

19:19 TEttinger: ,(shuffle (take 5 (lazy-seq (concat (repeat true) (repeat false)))))

19:19 nope, is concat eager too?

19:19 clojurebot: [true true true true true]

19:19 rhg135: yup

19:20 bbloom: concat is lazy

19:20 rhg135: well sorta

19:20 callen: noprompt: my point was more to stop hijacking akurilin :)

19:20 rhg135: it evals the first 3 args i think

19:20 TEttinger: oh, right. darnit

19:20 take 5 will just get...

19:20 bbloom: rhg135: more generally, shuffling a collection of unknown size doesn't make sense at all really

19:21 rhg135: yup

19:21 bbloom: rhg135: see http://en.wikipedia.org/wiki/Reservoir_sampling

19:21 hyPiRion: TEttinger: probably more like ##(repeatedly #(rand-nth [true false]))

19:21 lazybot: java.lang.OutOfMemoryError: Java heap space

19:21 rhg135: ik now

19:21 hyPiRion: ops.

19:21 ,(repeatedly 5 #(rand-nth [true false]))

19:21 clojurebot: (true true false false true)

19:21 IamDrowsy: concating 2 infinite seqs doesn't make any sense either

19:21 TEttinger: yeah was just going to rewrite it with repeatedly

19:21 noprompt: akurilin: you're doing a good thing by bringing up these topics here though.

19:22 callen: maybe. I'd like to spend less time hating some acronyms and loving others.

19:22 and instead talk about code.

19:22 rhg135: thx

19:22 TEttinger: I want to code a puppy

19:22 callen: TEttinger: capital idea.

19:22 rhg135: ill try it on my bot

19:23 noprompt: callen: right.

19:23 justin_smith: to 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:23 noprompt: callen: but we should heckle people, no?

19:24 TEttinger: Partial Uniform Prototypical Programming Y-combinator

19:24 sevvie: This is a really great channel to watch.

19:24 noprompt: has anyone done cowsay in clojure? i want to do cowsay in clojure.

19:24 loller.

19:24 hyPiRion: `lein shell cowsay moo`

19:25 rhg135: i used '(shuffle (concat (take 40 (repeat true)) (take 20 (repeat false))))'

19:25 hyPiRion: not cowsay in Clojure, but gets the job done

19:25 rhg135: any better way?

19:25 noprompt: :P

19:25 TEttinger: rhg135, yeah

19:25 wait

19:25 hyPiRion: rhg135: (shuffle (concat (repeat 40 true) (repeat 20 false)))

19:25 TEttinger: do you always want 40 true, 20 false?

19:25 akurilin: noprompt, 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:26 rhg135: nope

19:26 noprompt: (take 40 (repeatedly #(rand-nth [true false])))

19:26 TEttinger: (take 40 (repeatedly #(rand-nth [true true false]))) ;; to weight true more heavily

19:26 justin_smith: (repeatedly #(rand-nth [true true false])) to preserve the probabilities

19:26 rhg135: well i want a fixed ratio

19:26 justin_smith: jynx

19:27 rhg135: its for rusian roulette

19:27 for my bot

19:27 noprompt: with real guns?

19:27 TEttinger: bots with guns

19:27 rhg135: i hope not

19:27 TEttinger: never gonna happen, not in a million splat

19:27 noprompt: oh hey, guns is here. :)

19:28 guns: locked and loaded

19:28 Raynes: http://www.agorabooth.com/assets/product_images/product_lib/38000-38999/38022.jpg flutterbot.

19:28 hyPiRion: well, if you only want to use a ratio, then I'd suggest the following

19:28 rhg135: yup

19:29 TEttinger: rhg135, so really, you want randomized order, not random individual placement chance of bullet or not/

19:29 noprompt: guns: 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:29 rhg135: yup TEttinger

19:30 hyPiRion: (defn ratio-true [p] (< (rand) p)), then do (repeatedly 40 #(ratio-true the-probability))

19:30 noprompt: guns: should be epic though. :)

19:30 guns: noprompt: 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:32 rhg135: its lines 2-4 of this https://raw.github.com/rhg/flutterbot/f5c9164d4ec28df428811d1c5acdc17cc2bc427c/src/lazybot/plugins/roulette.clj

19:32 TEttinger: rhg135, ohhhh

19:32 that does what it should do

19:33 the alternatives will not preserve a sane number of bullets every time

19:33 rhg135: ok

19:33 i thought so

19:33 just checking :D

19:34 TEttinger: I 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:35 or to generate ratios

19:35 rhg135: no, the func takes args

19:35 noprompt: guns: this article http://mmcgrana.github.io/2011/09/clojurescript-nodejs.html

19:35 amalloy: incidentally, 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:35 noprompt: guns: i actually wanted to use your option parser though.

19:35 rhg135: now someone wants a pull loop

19:36 thx amalloy

19:36 guns: noprompt: doesn't work in CLJS?

19:36 I should fix that then!

19:36 rhg135: coding time

19:36 noprompt: guns: yes! it'd be a strong selling point.

19:37 TEttinger: rhg135, if you want, I can give you some other, non-useful plugins I wrote for my lazybot

19:37 like quote db stuf

19:37 technomancy: wow, I forgot cljs existed in 2011

19:37 callen: technomancy: what?

19:37 guns: noprompt: It only uses a couple of functions from clojure.string; I'll ping you when I look into it

19:38 technomancy: callen: I think of it as a recent development; 2011 feels like a long time ago

19:38 rhg135: ya, TEttinger

19:38 noprompt: guns: right. i noticed that. i think the only thing cljs was complaing about was the AssertionErrors.

19:38 callen: technomancy: I parsed it differently. woops. Yeah I suppose it does.

19:38 guns: noprompt: ooohh, that's right.

19:40 noprompt: guns: i'm watching the repo now. :)

19:41 guns: noprompt: lol, okay. I'll push a change tonight

19:41 noprompt: guns: sweet. i'll look out for it!

19:44 callen: guns: who are you on github?

19:45 guns: callen: github.com/guns

19:46 callen: oh good, a new goal.

19:46 TEttinger3: rhg135: 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:47 ...clucy needs lucene, and you might not want the hassle

19:47 callen: TEttinger3: hassle how?

19:48 TEttinger3: I seem to recall the java side needed config

19:48 callen: TEttinger3: would a lightweight zero-config in-memory lucene index suffice?

19:48 TEttinger3: might be wrong

19:48 I think so?

19:48 callen: k, adding to the to-do list.

19:48 TEttinger3: no don't worry about it

19:48 clojurebot: No entiendo

19:49 TEttinger3: it works fine now that it's setup

19:49 callen: TEttinger3: it's not about you :)

19:49 TEttinger3: it never is ;.;

19:49 callen: TEttinger3: hahaha. aww. :) no it's just about being able to say, "ya, we got that" to coworkers.

19:49 TEttinger3: haha nice

19:50 callen: (Python has Whoosh, if you know what I mean)

19:50 TEttinger3: callen, it blows?

19:51 pmonks: :-D

19:51 clojurebot: I don't understand.

19:51 callen: TEttinger3: LOL

19:51 jesus lol.

19:57 TEttinger3: point being though, Whoosh is fairly lightweight and easy to use for Python users even if it isn't a very good idea.

19:57 rhg135: TEttinger, why?

19:57 callen: Making doing the "right thing" easy is better.

19:58 TEttinger: rhg135, just making a pun on "has whoosh"

19:58 rhg135: i meant the link

19:58 TEttinger: oh

19:59 rhg135, so you can do stuff like `last-with users

19:59 and quotegrab uses some of that

19:59 rhg135: i dont understand

20:00 TEttinger: so, 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:00 like

20:01 `grab TEttinger

20:01 doesn't have that bot here

20:01 then `quote TEttinger would be "<TEttinger> like"

20:02 rhg135: ohhhhhhhhhhhh

20:02 TEttinger: it's a common function of supybot based IRC bots, lazybot doesn't have it by default

20:02 rhg135: hmm

20:02 i'll add it

20:04 TEttinger, prefix or command-prefix

20:04 TEttinger: whatever the bot gets commands from, like &load-pistol

20:04 not the eval prefix

20:04 there 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:04 rhg135: so @

20:05 TEttinger: yeah, probably

20:06 I'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:07 rhg135: set?

20:09 TEttinger: yeah, 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:10 rhg135: so leucene right?

20:10 TEttinger: should be picked up by lein deps

20:10 no idea if it will be

20:10 lucene also

20:11 rhg135: what's the data, never used it

20:11 im newish to clj

20:11 TEttinger: the data will be added with every message

20:12 rhg135: i meant the dep info

20:12 patchwork: Using lein templates, how do I force lein to use the latest version of my template?

20:12 I have released a new template jar on clojars, but lein still pulls in the previous version

20:12 TEttinger: it should be at the bottom in project.clj , same gist

20:12 patchwork: Or rather, lein keeps using the old version and doesn't search for the new version on clojars

20:12 rhg135: ah

20:12 thx

20:13 TEttinger: there should be 2 files that go in plugins

20:13 and a line to put in project.clj's dependencies section

20:13 don't add :dependencies twice, yeah

20:13 hyPiRion: patchwork: hm, can you run `lein -U new my-template library-name`?

20:13 rhg135: ok

20:15 hyPiRion: I'd either guess you're working with a snapshot or that you've forgotten to promote the template

20:17 patchwork: hyPiRion: lein -U new my-template library-name gives the same results

20:17 It is still using the template from the previous version

20:17 no snapshot

20:17 The previous version is 0.1.1

20:17 I have released 0.1.2

20:17 hyPiRion: patchwork: hm, have you promoted it on clojars?

20:18 patchwork: it is still generating the 0.1.1 template

20:18 hyPiRion: promoted? Hmm… not sure

20:18 Is this a new clojars feature?

20:18 I'll look it up

20:19 hyPiRion: Ah, whoa

20:19 You mean signing with GPG?

20:20 technomancy: promotion shouldn't matter

20:20 clients are probably caching the old release. weird that -U doesn't force it to re-check though

20:23 patchwork: technomancy: Any leads? The only thing I can do to get it to work is to remove those jars from my local .m2 repo

20:24 technomancy: patchwork: what if you put :offline? true in the user profile? just for debugging's sake

20:27 patchwork: technomancy: Same deal

20:28 rhg135: in quote.clj i get i have no quotes ... and last causes the compiler to bitch about repeat being redifined

20:29 jtoy: how do I go about calling a function that has been passed to me in an arg?

20:29 technomancy: patchwork: oops; not :offline? true; I meant :update :always

20:30 hyPiRion: technomancy: I thought -U merged in a profile with that option, no?

20:30 technomancy: hyPiRion: I thought so too, but it's not working

20:30 hyPiRion: hm

20:33 patchwork: technomancy: Still not working!

20:33 lein version says 2.3.1

20:34 technomancy: patchwork: ok; in that case it must be a bug in aether

20:34 jtoy: why doesnt this print 5 for every line? https://www.refheap.com/17775

20:34 also 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:35 callen: jtoy: where's your book?

20:35 Raynes: Because arguments get evaluated before being passed to functions.

20:35 You're getting the value of (println 5), not the code.

20:36 jtoy: so can I modify this to do it then?

20:36 rhg135: #()

20:36 Raynes: I have no idea what you're trying to accomplish.

20:37 You can do #(println 5) and then in testf do (f), I guess.

20:37 patchwork: technomancy: Ah! okay, I will tell people to remove their .m2 in the meantime

20:38 hyPiRion: yay, aether. The magic box where you usually get what you want back.

20:38 oneness_: jtoy: do 1. #(println 5) 2. enclose f within ().

20:38 patchwork: I looked at the aether code, but I'm not sure where to start : /

20:38 jtoy: cool, that does work

20:39 technomancy: patchwork: you and me both =\

20:39 jtoy: is it possible to access values in the clojure though? as in #(println u)

20:39 closure i mean

20:39 hyPiRion: we're three, there's a reason I call it a magic box

20:40 rhg135: TEttinger, one q about quote, how do you remove a quote?

20:42 TEttinger: rhg135: you don't! that's the one semi-intentionally missing feature

20:42 rhg135: oh darn

20:43 jtoy: i guess you cant

20:43 rhg135: i added one to test

20:43 TEttinger: you can add the feature by using congomongo's remove stuff

20:43 rhg135: ok

20:44 ive never used it tho

20:44 TEttinger: the trick will be finding the right quote to delete

20:44 bja: specljs is a lot better at finding my .cljs tests than my .clj tests....

20:45 fml

20:46 TEttinger: like, 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:46 rhg135: ok implemting

20:48 TEttinger: also, 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:18 rhg135: TEttinger, i added (defn erase-quote [server i] (destroy! :quote {:_id i} :where {:server server})) but nope

21:19 TEttinger: I don't know if it gives them _id

21:19 rhg135: it does

21:20 superbarf is modded to show em

21:22 callen: why...are you dereferencing an fn?

22:07 seancorfield: callen: I updated FW/1 to support Selmer - very nice... I may deprecate Enlive support at some point

23:36 matthavener: anyone 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:42 ambrosebs: matthavener: 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 awesome

23:45 matthavener: ambrosebs: 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:46 ambrosebs: matthavener: zero.

23:52 TEttinger: [Neurotic], never heard of webRTC over here.

23:53 qz: when 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:55 TEttinger: qz: 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:55 TEttinger: fair enough.

23:56 qz: TEttinger: hrm.. there are no vars, so how can something exist only after -main is called?

23:57 TEttinger: qs, def and defn create vars

23:57 qz*

23:57 what's really weird is it's line 1

23:58 dnolen: [Neurotic]: you can check for top level things with exists?. (or (.-bar foo) (.-baz foo) ...) otherwise works too

23:59 [Neurotic]: Google Closure sometimes will mangle, in those cases you can use (get js/foo "bar")

23:59 er (aget js/foo "bar")

23:59 [Neurotic]: dnolen: aaah. I was trying aget with a symbol. Lemme try that then

Logging service provided by n01se.net