#clojure log - Feb 29 2012

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

0:01 Raynes: devn: Are you using vimclojure from the bitbucket repository?

0:01 devn: *nod*

0:01 should i use daveray's?

0:01 Raynes: devn: nooooo

0:01 devn: Did you get the Haskell nrepl stuff working?

0:01 devn: i tried \el and ,el

0:01 Raynes: I'm asking not because I know how to, but because I don't know how to and am hoping someone will eventually give me instructions.

0:02 devn: Raynes: i think you're thinking of the wrong guy

0:02 Raynes: i can take a crack at it

0:02 Raynes: [22:57:53] <devn> how do i eval a line in vimclojure?

0:02 Implies that you've gotten it running.

0:02 Unless he left the nailgun stuff in?

0:02 cemerick: Raynes: I think the Haskell impl is still hush? :-P

0:02 devn: im confused

0:02 Raynes: cemerick: Yes, damn it, but I want to use it.

0:02 cemerick: hah

0:02 Raynes: I realllllly want to use it.

0:02 devn: haskell nrepl in vimclojure?

0:03 cemerick: He and Martin will have to duel over it.

0:03 devn: please explain

0:03 cemerick: Hrm? Who said anything about a haskell nrepl client?

0:03 devn: cemerick: don't make me bust a cap

0:04 Raynes: devn: We have no idea what you're talking about.

0:04 You need help.

0:04 Let us help you.

0:05 cemerick: devn: Look, WI boy. :-D

0:05 devn: http://lolriot.com/wp-content/uploads/2011/06/Drop-It-Like-Its-Hot.jpg

0:05 ...you're welcome...

0:05 cemerick: bwahah

0:06 jodaro: haha

0:06 devn: also, "WI boy", man... I'm shocked. We're humble people.

0:06 amalloy: i guess that's...a reference to something? where is the pop-culture summary for the old folks here

0:07 devn: We're too busy recalling our asshat governor to know All The Things(tm) about nrepl + haskell.

0:07 amalloy: http://en.wikipedia.org/wiki/Drop_It_Like_It's_Hot

0:07 ...you're welcome...

0:07 cemerick: devn: was my best reaction to the bust-a-cap thang.

0:08 * devn dies at a faster rate after posting that link

0:08 devn: cemerick: yeah, im not sure what's gotten into me. "bust a cap"

0:08 * devn boggles

0:09 cemerick: devn: it happens. Been humming a jay-z song all day.

0:09 devn: man, the cognitive load of using emacs for org-mode, vim for clojure, and conkeror as my browser...

0:09 im losing it.

0:10 cemerick: haha, ive actually been listening to some jay-z lately. i kind of like that watch the throne album. avishai cohen for life, though.

0:11 cemerick: devn: I've no idea what you just said. :-P

0:13 devn: so, uh...nrepl...haskell...

0:13 amalloy: cemerick: he's busting a cap right now. you just don't understand his slang

0:14 muhoo: i still predict that what rhickey will announce in a few weeks is a haskell for the jvm

0:14 since it seems like haskell is one of the hottest topics amongst clojure folk :-)

0:14 devn: i dont think that's true?

0:14 jodaro: wait

0:15 is everyone switching to haskell?

0:15 devn: quickly, one at a time, one at a time...

0:15 amalloy: only the cool kids, jodaro

0:15 jodaro: oh ok, phew

0:15 devn: we're all switching to haskell. effective immediately.

0:15 single file lines, thank you.

0:15 mefesto: guess it's time to buy learn you a haskell for great good

0:15 jodaro: i've been dicking around with erlang lately

0:16 devn: jodaro: i dont know how to just "dick around" with erlang

0:16 jodaro: well

0:16 reading, i suppose

0:16 muhoo: you don't. erlang dicks around with you.

0:16 jodaro: is what i meant by "dicking around"

0:16 and a little writing

0:16 you know, dicking around

0:16 and yeah

0:16 * ungamedplayer chuckles

0:16 jodaro: it has done its share of dicking back

0:16 ungamedplayer: erlang can surely do that

0:17 devn: oh no, i know the colloquialism

0:17 muhoo: arseing around, in UK-ish

0:17 devn: but i dont find erlang to be very approachable in the "hm, id like to just toy around with this idea for a bit"

0:17 it's this whole elaborate "thing"

0:17 amalloy: i'd love it if people saw rich's attempt to build up hype without actually saying anything, and responded by not speculating

0:17 ungamedplayer: ah

0:17 jodaro: yeah, definitely true

0:18 maybe dicking around is too light

0:18 devn: i think it's stronger

0:18 ungamedplayer: i do quite a bit of erlang.

0:18 devn: ungamedplayer: do you enjoy it?

0:18 ungamedplayer: i dont know enough to have a good opinion.

0:18 ive read some of the erlang OTP book from manning

0:18 ungamedplayer: devn, Peoples expectations of it are often wrong..

0:18 jodaro: devn: thats what i'm reading now

0:19 muhoo: amalloy: actually, speculation is what builds up hype

0:19 ungamedplayer: devn, i do enjoy it.. especially once you get comfortable with it.

0:19 devn: jodaro: it's my "intro" to OTP. someone told me: "this is not a beginner's book"

0:19 i took that as a challenge

0:19 jodaro: and playing around with some of the tools from basho

0:19 devn: but i think im paying for it a bit

0:19 amalloy: muhoo: yes, that's why i would love people to not do it

0:19 ungamedplayer: for anyone looking into it

0:19 rebar == lein

0:19 or close enough

0:19 muhoo: amalloy: oh i see. to thwart the hype, not to assist it. hmm, good point.

0:19 jodaro: yeah thats what i'm getting

0:19 ungamedplayer: the hot code upgrades are very, very cool.

0:20 devn: amalloy: what's wrong with a little hype?

0:20 ungamedplayer: the syntax can be a little off-putting for people who are new at it

0:20 and it can't easily be copy-paste refactored.

0:20 those are my only real issues i have with it.

0:20 devn: ungamedplayer: meh, syntax... fuck it. I kind of like toying around with APL, so let's not make syntax a "thing"

0:21 * ungamedplayer nods

0:21 amalloy: there's no substance. he has said nothing. and he's trying to act *coy*, by issuing single-non-word tweets and getting the cool kids to retweet it

0:21 muhoo: speakking of hip hop: http://www.youtube.com/watch?v=9vQaVIoEjOM&ob=av3n

0:21 showing my age there

0:21 jodaro: devn: i've been getting through the book ok with very little experience

0:21 ungamedplayer: devn, its not a big deal once you know what to expect.

0:21 jodaro: i spent a little time on erlang.org and learnyousomeerlang

0:21 devn: amalloy: i think you're a little too attached or something. i havent seen a single tweet and i follow a ton of clojure folks.

0:21 jodaro: so that i wasn't completely blind going in

0:21 ungamedplayer: you'll really only get caught by it once.. then.. you'll not make that mistake again.

0:22 devn: amalloy: also, it's just text. how do you distinguish coy from humble in text?

0:24 muhoo: word.

0:25 jodaro: actually i fell into erlang land a little bit by accident. we were evaluating cassandra, which led me to riak, which led me to erlang

0:25 devn: that seems like a nice dip into the pool

1:15 durre: I was wondering how well clojure is suited for web development? is there a full stack web framework for clojure like play! framework for java/scala?

1:16 brehaut: durre: full stack: no, theres webnoir.org which is the biggest library available

1:16 durre: clojure web programmers prefer to assemble small collections of libraries that all work on top of the ring abstraction

1:16 durre: http://news.ycombinator.com/item?id=3640760

1:18 durre: you might find http://brehaut.net/blog/2011/ring_introduction useful too

1:18 cemerick: durre: True what brehaut said. There are some common patterns, though.

1:19 brehaut: yes, good point

1:20 cemerick: e.g. compojure is quasi-standard at this point, I think. I don't see moustache around much.

1:21 durre: But, there's no reason why you couldn't use it for routing if you preferred it over compojure/clout. That's the sort of thing that "full stack frameworks" don't generally allow.

1:21 brehaut: how's things? :-)

1:21 brehaut: cemerick: things are not bah thanks, you?

1:21 cemerick: about the same

1:22 lots of things in the air

1:22 brehaut: yeah?

1:22 durre: thanks guys! there are some ppl here at work raving about clojure and I wanna see what the fuzz was about :)

1:22 cemerick: yeah, need to get some projects parked and off the table, etc.

1:23 brehaut: sure. ive just managed to get all the loose ends from the end of last year tidied up myself.

1:25 re: moustache and compojure i think you are quite right. compojure's easier learning curve definately has helped it maintain its lead

1:28 ibdknox: durre: if you're new, you might want to check out http://webnoir.org

1:28 devn: durre: check out korma as well

1:28 brehaut: ibdknox: ahem. sniped

1:28 ;)

1:28 ibdknox: oh

1:28 :p

1:28 haha

1:29 brehaut: well done

1:29 devn: alexyk: hey

1:29 alexyk: devn: heyhey!

1:29 cemerick: brehaut: yeah, the vocabulary is hard to beat

1:29 devn: alexyk: long time! no clojure conj this past year? i was disappointed!

1:29 Bahman: Hi all!

1:29 devn: Bahman: hey!

1:29 brehaut: cemerick: i agree, i have been wondering if i need to reevaluate my use of moustache on my own stuff.

1:29 hhutch: I have a seesaw app, you fill out some fields and hit the "go" button and (stuff) happens .. (stuff) is using log4j and outputs to both a log file and org.apache.log4j.ConsoleAppender. I would like to see that log4j output in a text box in the seesaw app, what is the best way to go about that?

1:30 alexyk: devn: I moved to SF, had my third baby, and started Scala for Startups meetup… But did some Clojure too :)

1:30 devn: alexyk: congratulations

1:30 brehaut: cemerick: i do like moustache's route spec syntax over the default of the railish magic strings clout prefers

1:30 devn: alexyk: mind me asking which startup?

1:30 tomoj: "railish" is exactly my beef :)

1:30 alexyk: devn: Klout

1:30 cemerick: yeah, that's the biggest downside, hurts a lot if there's "nonstandard" methods being used

1:31 devn: alexyk: cool. i have a friend who uses klout quite a bit.

1:31 alexyk: Big Data is fun

1:31 cemerick: e.g. COPY

1:31 devn: alexyk: i thought you might be doing stuff with prizmatic

1:31 cemerick: or, PATCH :-P

1:31 alexyk: I am eyeing that...

1:31 brehaut: lol :)

1:31 devn: alexyk: have you used it at all?

1:31 alexyk: we'll do lots of NLP soon

1:31 devn: a bit

1:31 cemerick: 'course, you can trivially define new HTTP verb macros. *shrug*

1:32 devn: alexyk: im really loving it. it's pretty crazy how good it is at finding stuff im genuinely interested in via my twitter network.

1:32 alexyk: sorry to ask again, but i lost a hard drive and wanted to show your paper to a friend of mine recently

1:32 the one about bieber

1:32 brehaut: cemerick: i meant to ask, have you done any full text search with couchdb?

1:32 devn: alexyk: do you have a url handy?

1:32 brehaut: cemerick: eg couchdb-lucene i guess?

1:33 cemerick: brehaut: yeah, but cloudant handles all the muck for me

1:33 brehaut: ah of course :)

1:33 alexyk: I'll look

1:34 cemerick: I'm pretty much muck-free these days. The service platforms are way too advanced to not use unless you have a damn good reason.

1:34 brehaut: cemerick: my reason is cost; im not bringing any money in from my clojure or couch projects atm so its hard to justify

1:34 devn: alexyk: sorry to make you bother, i just remember hearing you talk about it at the first conj with liebke and wanted to reminisce. :)

1:34 brehaut: cemerick: otherwise id lve to be muck free

1:35 alexyk: devn: http://dl.dropbox.com/u/9300701/khrabrov-spie2010-twitter-communities.pdf

1:35 devn: nice. thanks.

1:35 alexyk: np :)

1:35 cemerick: brehaut: heroku and cloudant both have free plans that are perfectly usable

1:36 devn: alexyk: going to clojure/west?

1:36 cemerick: depends on your load, but if the things you're doing are hobby-level…

1:36 alexyk: devn: possible!

1:36 brehaut: yeah only at a hobby level.

1:36 alexyk: devn: how about you?

1:36 brehaut: heroku wasnt an option when i started out my muck though ;)

1:36 cemerick: brehaut: e.g. clojurebook.com runs on heroku + cloudant

1:36 devn: alexyk: unfortunately (or fortunately depending on how you view it) i'm taking a couple weeks of vacation to go sit on a beach

1:36 cemerick: ah, well

1:37 no time like the present :-)

1:37 brehaut: heh :)

1:37 devn: i'd like to make it to clojure/west, but it's looking like it's not going to happen

1:37 i might try to make it to euroclojure, but havent made a decision yet

1:37 brehaut: cemerick: yeah, i think i would probably gain the most benefit moving my couch muck to cloudant

1:37 cemerick: devn: where's the beach?

1:37 devn: cemerick: playa del carmen

1:38 tomoj: devn: prizmatic is the thing good at finding stuff?

1:38 devn: tomoj: *nod*

1:38 tomoj: can you give me an extra google keyword or two to disambiguate?

1:38 alexyk: it's prismatic too :)

1:38 devn: yeah i fail :)

1:38 alexyk: tomoj: Bradford Cross :)

1:38 getprismatic.com

1:38 devn: http://getprismatic.com/

1:38 cemerick: devn: nice; I'll be on St. John soon. 'tis the season, eh?

1:39 tomoj: cool

1:39 brehaut: cemerick: is it cloudant that have their own variant of couch?

1:39 tomoj: too bad I don't interact on social networks.. hmm

1:39 cemerick: brehaut: they're the main sponsor of bigcouch, yeah.

1:39 which is being merged into couch proper

1:39 devn: cemerick: love st john, would like to go back to anguila and vanish from the grid for a bit...

1:40 that or ranguana caye in belize

1:40 brehaut: 250 meg of data seems like bucket loads

1:41 cemerick: devn: yeah; I'd like to get to tortola at some point

1:41 order of magnitude more expensive tho AFAICT

1:41 or, 2x, whatever

1:42 devn: cemerick: airfare or cost once you get there? is tortola french?

1:42 cemerick: the only reason i ask is because st martin has a dutch and a french side

1:43 the french side is 2x more expensive

1:43 (but good wine is cheap...so there's that...and you can drink veuve cliquot like it's water)

1:44 cemerick: devn: oh, yeah, it's st. martin I'm thinking of

1:44 devn: if you stay away from the sprawling beaches and get a rental car it's a lot easier to justify the cost of spending time there

1:45 orient bay is beautiful with nice french restaurants, but it's definitely expensive

1:46 cemerick: Sounds like you've been in the vicinity on a semi-regular basis

1:46 devn: a few times, yeah

1:46 wish it was more than a few :)

1:47 i guess if you count belize and renting a boat and wandering around BVI you can add a couple and say 5-6 times, but it's like night and day to be in the inlands of belize and then go to the cayes

1:48 ive never been to cuba, would like to go there

1:48 cemerick: travel there is normalized at this point?

1:48 devn: whether it is or isnt i know you can take a puddle jumper as long as its not direct from the US

1:49 cemerick: ah

1:49 devn: just dont use traveler's checks (lol)

1:49 cemerick: heh

1:49 devn: but yeah, i did hear something about it being okay to travel there ~a year ago

1:49 cemerick: cash goes far there presumably

1:50 devn: id assume so, but getting there is not cheap given you need to fly from the US to say, belize city, and then fly to cuba

1:50 cemerick: true

1:50 devn: and probably need a rubber banded wad of cash while you're in country

1:51 cemerick: :-)

1:51 devn: unless their currency is worse than the dollar

1:51 hard to believe lately lol

1:51 cemerick: ok, I'm crashed; later guys

1:51 devn: cemerick: good talking. come to playa and hack with us! im taking some friends down, a friend or two from work with clojurian tendencies

1:52 'night

2:25 _ulises: morning all

2:31 TakeV: Is there a "this" pointer or reference for proxies?

2:37 raek: TakeV: yes, the identifier "this" is implicitly available in the body of a proxy method

2:41 TakeV: raek: Excellent, thank you.

2:44 gf3: hey guys, your thoughts? http://cljbin.herokuapp.com/paste/4f4da1a6e4b06bdb1b33f987

2:44 I would love any kind of feedback

2:45 _ulises: gf3: are you trying to split a seq at a given predicate?

2:45 gf3: _ulises: I meant the app

2:45 _ulises: gack

2:45 gf3: that's just an example paste

2:45 _ulises: :D

2:46 I like the aesthetics :)

2:47 ooh, I like the fact that it evals the code too

2:47 gf3: thank you

2:47 _ulises: not sure about the position of the Paste/Fork "buttons"

2:47 initially I thought the "Fork" button meant "Fork [on github]"

2:47 tomoj: if I close my right eye, it's great

2:47 _ulises: the visuals also don't imply they're clickable

2:48 tomoi

2:48 tomoj: is your right eye the pickiest of both eyes?

2:48 gf3: _ulises: do you think a better hover state would fix that?

2:49 tomoj: _ulises: no, but the code is scrunched all the way on the left (now that I think about it, it is a bit weird to me that the content bit is so wide), so I don't really see the pink when my right eye is closed and I read the code

2:49 _ulises: I think "Fork paste" would make it clearer what the action will be

2:49 tomoj: aha! I thought you were talking about the aesthetics here :)

2:49 gf3: tomoj: I'll add some media queries to try and deal with that

2:50 _ulises: gf3: if they looked a bit more like buttons that'd help too

2:50 tomoj: 'media queries' means something like detecting screen size?

2:50 if there were other code on the right side that was right indented, it would look sweet :)

2:51 gf3: tomoj: yes, I can add more padding on wider screens

2:51 tomoj: giving only my negative feedback, looks pretty great overall

2:52 gf3: tomoj: all feedback is good feedback, thank you :)

2:52 tomoj: agreed re position of paste button, especially in my screen size

2:54 _ulises: gf3: perhaps swapping the positions of the Paste/Fork button with the legend "Pasted N days ago"?

2:54 gf3: I'll give it a shot

2:56 tomoj: I just realized you're actually executing the code

2:56 gf3: :D

2:56 tomoj: maybe allow a line to start with ">" to indicate that its result should be printed?

2:57 or just strip out the return from def somehow

3:59 tsdh: Is there something to disable one test namespace temporarily from lein test?

4:02 raek: tsdh: yes, test-selectors

4:03 check out the leiningen tutorial

4:04 lein help tutorial | less

4:04 /selectors

4:07 tsdh: raek: What's the v argument given to the selector fns?

4:08 raek: tsdh: the metadata of the test var, I think

4:09 tsdh: raek: But that wouldn't include the namespace, right? Well, I could do string matching on :file...

4:09 Raynes: Wow. The things one forgets when one doesn't do them for a while.

4:09 Suddenly can't remember how to create a gzipped tar file.

4:09 czf, I think.

4:10 gf3: Raynes: yessir

4:10 Raynes: Yay

4:10 gf3: Raynes: cjf for bunzip2

5:03 Scorchin: Is it possible for a map to reference itself, e.g. {:somelist [] :func (fn [x] (self :somelist)}

5:06 Raynes: BEGONE, EVVVVIL ONE!

5:06 Scorchin: :'(

5:06 raek: Scorchin: only with some kind of indirection

5:06 Raynes: I apologize. You can't expect me to be helpful at 4AM.

5:06 raek: (def foo {:somelist [] :func (fn [x] (#'foo :somelist)})

5:07 dsantiago: Does the def take effect in its own body?

5:07 ejackson: LOL. Good morning RAYNES !

5:07 raek: compiling an expression that contains (def foo ...) will cause the foo var to be interned (at compile time)

5:07 Raynes: Good morning Mr. Edmond sir.

5:08 ejackson: i enjoyed the vigorous enthusiasm of that outburst, truly after my own heart :)

5:09 raek: Scorchin: you can try evaling (when false (def foo 123)) in the repl. after that 'foo' should exist but be unbound

5:09 even though the def expression was never evaluated

5:10 Scorchin: raek: what I'm trying to do is something along the lines of the following: {:connections [] :onconnect (fn [x] (|add x to :connections|)) :onmessage (fn [x] (println x))}

5:10 but I think that may be wrong

5:10 and perhaps I'm better off using refs

5:10 or looking at the concurrency stuff

5:11 I want to build out a function which takes a map of functions (like the above) but expose the various connection pools to it

5:11 I'm all ears if I'm doing this the wrong way :-)

5:11 raek: well, clojure data structures are immutable. you can't really change them in palce

5:12 Scorchin: unless I use atom

5:12 which I want to try and not do

5:12 raek: Scorchin: if you are making "objects" (e.g. maps of functions) you can keep the state in refs/atoms in locals

5:12 Scorchin: raek: I don't quite understand what you mean

5:13 raek: (defn make-connection-thingy [] (let [connections (atom [])] {:onconnect (fn [x] (swap! connections conj x)), :onmessage (fn [x] (println x))}))

5:14 in this approach I didn't store the data as entries in the map

5:14 and a "connection-thingy" is an "object" which you can communicate with by calling the functions in the map

5:14 Scorchin: and how would I consume the map keys?

5:15 ah, yes, I see

5:15 raek: (def thingy (make-connection-thingy)) ((:onmessage) "hello world")

5:16 Scorchin: have you looked at "Structure and Interpretation of Computer Programs"?

5:16 Scorchin: raek: no

5:16 raek: http://mitpress.mit.edu/sicp/

5:17 it is a well known (free!) book that among other things discusses how you can make objects with just functions and data

5:17 Scorchin: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-20.html#%_sec_3.1

5:18 one big difference with Scheme and Clojure, though, is that in Clojure you are not allowed to assign locals (names introduced with let and function parameters)

5:18 so in Clojure you add a step of indirection -- a ref or an atom usually -- that can change

5:19 Scorchin: raek: thanks, that's really useful!

5:20 raek: Scorchin: this article by Stuart Halloway also discusses this: http://thinkrelevance.com/blog/2009/08/12/rifle-oriented-programming-with-clojure-2

5:20 Scorchin: this is kinda like a closure in JS, right?

5:20 raek: yes

5:20 you are using closures in my example too

5:20 the (fn [x] (swap! connections conj x)) function closes over the "connections" local

5:22 you have similar choices in JavaScript: you can put "private members" both in the object fields and in a closure (local variables in the constructor)

5:25 Scorchin: raek: so in your example, how would I add a function :print which just prints connections to stdout?

5:25 AFAICT you'd need to quote it

5:26 to prevent the evaluation when doing (def thingy ...)

5:26 raek: Scorchin: do you want to redisgn make-connection-thingy or be able to add this function to the object later?

5:26 Scorchin: raek: redesign it ideally

5:27 raek: quoting is not usually used to delay the execution of an expression

5:27 (but yes, it has that effect)

5:27 I'd suggest making a function for it

5:28 (defn make-connection-thingy [] (let [connections (atom [])] {:onconnect (fn [x] (swap! connections conj x)), :onmessage (fn [x] (println x)), :current-connections (fn [] (deref connections))}))

5:29 (defn print-connections [thingy] (prn ((:current-connections thingy))))

5:29 note that the atom is never exposed to "ousiders"

5:30 Scorchin: ah, that's clever

5:30 raek: so it's impossible for other code to change the state except through the functions you provide in make-connection-thingy

5:31 Scorchin: would it be possible to have another step of indirection and wrap the atom logic?

5:31 e.g. using functions to hide it

5:31 so all the I would need to do is have functions like (add-to-connections x) and (get-connections)

5:31 raek: in SICP, they also write functions like (defn onconnect [thingy x] ((:onconnect thingy) x))

5:32 presumable to make the calling more pretty

5:33 Scorchin: well, I guess it depends on what the object is supposed to do

5:33 Scorchin: raek: I'm going to wrap some Java which is why I need the state

5:33 raek: for the "get" and "change" functions you could as well use the built in 'deref' and 'swap!'

5:33 Scorchin: it's state that a single thread needs acces to

5:35 raek: you can keep the java object in the closure

5:35 that way you can control exactly how it is used from clojure

5:35 you can use the 'locking' macro for mutual exclusion, but watch out for deadlocks

5:37 Scorchin: raek: technically, I wouldn't need to worry about it being consistent all the time, as long as it's eventually accurate

5:38 what I do need to be accurate is the adding of connections to the list

5:38 the removal isn't such a big deal

5:38 Raynes: Whoa, $20/month for hostname-based SSL on Heroku? That's nuts.

5:38 Scorchin: (it would just throw an exception)

5:39 clgv: Scorchin: the usage of the map with functions at the beginning of what I saw looked like you want a defrecord.

5:39 raek: defrecord provides polymorphism, but not encapsulation

5:40 Scorchin: clgv: looking up the docs now

5:40 clgv: raeK: ah thats a requirement in this case as well?

5:40 Scorchin: clgv: yes, it is sadly :/

5:40 raek: dunno :) I assumed Scorchin needed to keep track of stuff that changes over time

5:41 in Clojure you usually don't encapsulate immutable data

5:42 Scorchin: how would you deal with it instead? I like the :onmessage :connect map as something to pass in. I just need to expose a list of 'connections' which can be added to and iterated over

5:42 clgv: Scorchin: maybe you should write the encapsulation in java and use the "better" interface in clojure then.

5:43 raek: Scorchin: one simple approach is to not use encapsulation at all: (defn make-connection-thingy (atom {:connections []}))

5:43 (defn onconnect [thingy x] (swap! thingy update-in [:connections] conj x))

5:44 (defn current-connections [thingy] (:connections @thingy))

5:45 Scorchin: raek: that's an option

5:45 actually, that's rather nice

5:45 raek: this might be a simpler starting point if there isn't a very strict way you have to change the state in

5:47 Scorchin: raek: then technically, I could still have a map, but take the atom as the first argument

5:47 genius!

5:47 that's very cool

5:47 *take the atom as the first argument for each of the functions like :onmessage

5:48 raek: if you only have one implementation of the methods, you could keep them as global functions instead of keeping them in a map

5:49 it depends on whether you need polymorphism or not, I guess

5:49 Scorchin: raek: but what if I want to pass it to a function to consume the functions?

5:49 clgv: raek: yeah that function in map thingy looks like doing OOP in C ;)

5:49 Scorchin: raek: I don't _think_ I need polymorphism

5:49 raek: Scorchin: sure

5:50 anyway, gotta go for lunch.

5:50 Scorchin: good luck!

5:50 Scorchin: raek: thank you for all of your help! much appreciated!

5:50 clgv: likewise

6:21 Kototama: hi, i'm using ring / compojure to combine two apps with the context macro. Both apps have (route/resources "/"). But somehow the files of the first are also served on the second context, which lead to a clash in my JS files. Any ideas?

6:27 jaley: is there a find-first equivalent in the standard libraries? several people at work have asked me and I can only suggest (first (filter pred coll)), which isn't bad, just seems like a common requirement.

6:29 lucian: jaley: (def (comp first filter)) :)

6:29 uh, (def find-first

6:30 jaley: lucian: fair enough :-)

6:32 Kototama: i find it lacking too

6:33 jaley: what happened to seq-utils? the contrib migration guide has some holes in it :/

6:46 ljos: Does clojure have a print-function that also returns the object it was supposed to print instead of just nil?

6:49 like CL's print.

7:03 dan_b: fleet vs enlive: has one a significant advantage over teh other or is it just a matter of opinion? if the latter, anyone got any strong opinions?

7:04 ejackson: never heard of fleet, love enlive.

7:06 dan_b: how was the dojo ?

7:06 dan_b: really good

7:06 ejackson: glad to hear that

7:07 dan_b: show & tell at the end of the session: watching people explain their code means you get much better exposure to a variety of styles than self-teaching

7:08 yes ok, I could just read code on the net, but having the author there in person is faster :-)

7:08 ejackson: quite right

7:09 its always fun to see somebody completely own a problem

7:09 stimulating

7:10 Scorchin: are you guys referring the London Clojure Dojo?

7:10 dan_b: yep

7:11 Scorchin: I'm one of the co-organisers, just wondering if you had any feedback on things you think we could improve upon?

7:12 dan_b: can't think of much. maybe next time announce you'll wear a silly hat or be somehow easily distinguishable at the start so first-timers know who to go and talk to when they arrive

7:13 but that's a really minor point

7:13 Scorchin: I was greeting people as they arrived to make sure we had near 100% coverage of name tags

7:13 and shepherding folks towards the food/drink

7:14 dan_b: ah. that would actually be my own fault for arriving late then

7:16 no complaints at all, in that case :-)

7:17 Scorchin: dan_b: we'll try to make that clearer next time, usually it's pretty obvious that one of us (Bruce) is leading the core of the event

7:17 we're always happy to meet folks, but it's more about the attendees meeting each other too :)

7:21 sw1nn: Scorchin: what was the theme at ldn clj dojo last night? I saw some code for boggle on the mailing list, did everyone try that?

7:21 Scorchin: sw1nn: yup, boggle was the challenge

7:22 sw1nn: great. Unfortunately these dojo's always seem to clash for me :-(

7:22 Scorchin: sw1nn: what events do they clash with? from what we understand, it's usually XTC that we're up against

7:22 sw1nn: LOL - they clash with my wife's diary - means I have to babysit

7:23 Scorchin: nothing I can do about that I'm afraid :/

7:23 dan_b: hehe. that can be pretty non-negotoiable yes

7:24 damn. Must Stop Putting Useful Stuff In *scratch*

7:25 sw1nn: i have got a pass to talk about clojurescript next week tho!

7:25 dan_b: or at least, must remember to save it somewhere when I restart

7:35 ejackson: any workaround for specifying a message with :pre and :post conditions ?

7:44 meh, time to fire up some logging

7:45 xkb: hi

7:45 I want to define the leaves of my Parsatron parser as regexes. How do I do that?

7:45 I tried token

7:46 but that fails, and I dont want to write out the regex in terms of char/digit and the like

7:46 any tips?

7:47 ejackson: (def my-reges "#.*")

7:47 should be on object of type regex ?

7:48 xkb: move out the # to make it a regex

7:48 #".*"

7:49 ejackson: yeah, typo, sorry

7:49 but that is a thingy of type regex that you can put an the leaves of a tree

7:50 xkb: ahh like so

8:03 I now use something like so: (defparser property [] (either literal placeholder))

8:04 where literal is a regex defined as (defn literal [] (token #(re-matches #.....)))

8:04 but that gives me wrong nr of args on literal

8:05 even if I wrap it in defparser

8:07 token expects a function right?

9:34 broquaint: Is it possible to have noir (or its underlying layers) reload when a source file changes?

9:50 amro: broquaint: it should already reload any files you change

9:59 sw1nn: Hi, I'm looking at clojurescript one. Pretty cool.

9:59 Are there a standard set of emacs key bindings for interacting with inferior-lisp for cljs-repl

10:00 I have it all working, but I need to M-x lisp-eval-last-sexp

10:00 to send forms to cljs repl

10:00 I suspect others have been through this?

10:01 I vaguely recall seeing a suggested set of bindings to work with slime and inferior-lisp in the same emacs?

10:05 jaley: is data.xml the "right" way to process huge xml files?

10:08 osa1: I'm trying to use clojure in an eclipse plugin, is there a way to run clojure repl inside a java app? I also need to pass some java objects to clojure

10:09 ejackson: sw1nn: have you tried C-x e ?

10:09 jaley: I believe so, for creating them enlive can be useful

10:09 jamii: does anyone know how to persuade emacs to indent core.match nicely?

10:10 sw1nn: ejackson: yeah, that sends to slime repl

10:10 I'd like to have bindings to send to either 'clj/slime' repl or 'cljs/inferior-lisp' repl

10:11 ejackson: oh sorry, I'm out of date here, I did have this working to the browser at some point

10:11 browser-repl or somesuch

10:11 sw1nn: https://github.com/brentonashworth/one/wiki/Emacs is on the right path

10:11 but is out of date I think.

10:11 ejackson: ala: http://vimeo.com/29535884 but i think things have moved on

10:11 since I last played with cljs

10:12 sw1nn: ok, thanks, I'll watch the video

10:15 ejackson: sw1nn: i'd also have a look around in clojurescipt one, i'm sure there'll be something useful in there

10:24 clgv: osa1: you can have a look at the counterclockwise project, they use clojure to develop the clojure plugin for eclipse ;)

10:31 raek: hrm, osa1 left

11:04 Userinos: Hello! I suppose it is a stupid question, but I'll ask :). Should be in the folder, where I expanded clojure.zip (1.3) from clojure.org, clojure.main, as it is written on http://clojure.org/getting_started ?

11:06 nickmbailey: you should be in the folder that was created when you unpacked the zip file

11:07 the folder that has the clojure jar in it

11:09 broquaint: Aha, thanks, amro :)

11:15 Userinos: So, there should not be clojure.main, I simply should be in this folder? Ok, but sadly there is an error: http://pastebin.com/yN0xesXb (first two lines:) C:\Clojure>java -cp clojure.jar clojure.main (newline) Exception in thread "main" java.lang.NoClassDefFoundError: clojure/main

11:23 TimMc: Userinos: If you just want to get a quick REPL: java -jar clojure.jar

11:23 But I recommend using Leiningen, really.

11:31 Userinos: Thank you! Will try to get to know Leiningen

11:32 lucian: it's really simple. much like virtualenv+pip in python or rvm+gem in ruby

12:20 alexbaranosky: what do you all think is a good approach for making sure users can't bind a dynamic var to a value that is outside of what you deem to be its legal range?

12:21 my first thought was to use add-watch for this, but rebinding doesn't trigger the watch as per the docs

12:24 TimMc: alexbaranosky: validators?

12:24 I think vars have those...

12:26 alexbaranosky: TimMc, nice, I forgot all about those

12:34 TimMc, hmmm, it doesn't exactly give the most helpful error message though

12:34 TimMc: Hah, I bet.

12:35 What does it do?

12:35 alexbaranosky: it seems to ignore he exception I throw and instead just says: java.lang.IllegalStateException: Invalid reference state (NO_SOURCE_FILE:0)

12:35 TimMc: Ouch.

12:35 alexbaranosky: so if I try to bind the var to an invalid sate it jsut gives me that message -- there might be a way to configure the messaeg, though...

12:59 TimMc: alexbaranosky: I don't know, man... if it doesn't take the exception message, I don't know what it would take.

12:59 File a Jira ticket?

12:59 alexbaranosky: TimMc, there might be a way around it at least

13:03 TimMc: alexbaranosky: Try throwing a RuntimeException instead.

13:03 https://github.com/clojure/clojure/blob/1.3.x/src/jvm/clojure/lang/ARef.java#L29

13:04 alexbaranosky: TimMC, nice that did it

13:07 TimMc: Sweet. Commented to that effect on ClojureDocs

13:08 alexbaranosky: TimMc, great idea putting it on ClojureDocs. I've never contributed to ClojureDocs but will now that I recall that I can

13:08 It's a little funky that only RuntimeExceptions work that way

13:08 maybe there's a some good reasoning behind it though

13:15 semperos: using leiningen 1.7.0, installed lein-newnew plugin, but it looks like Leiningen's core `new` task continues to shadow the `new` task provided by lein-newnew

13:15 any generic leiningen wisdom I'm missing?

13:15 the new tasks that lein-newnew provides are available (e.g., `lein templates`)

13:15 *the unique tasks

13:16 technomancy: semperos: yeah... that's a known bug; needs a new release of lein-newnew to fix it

13:17 semperos: technomancy: thanks

13:19 weird that lein-newnew's master branch's project.clj shows version as 0.2.1, but latest Clojars release is 0.2.2...

13:19 choffstein: Hey all. I am getting some behavior I am having trouble solving. In compiling, I am getting a "ClassNotFound" exception on a record type I have created. I import the record into the file I want to use it in, but still get the ClassNotFoundException. Any quick "you forgot to do X, you idiot" ideas?

13:19 semperos: choffstein: what does your import form look like?

13:20 (just paste up your whole ns somewhere)

13:20 choffstein: https://gist.github.com/1943274

13:21 And I get: ClassNotFoundException: com.newfoundresearch.ttm09.state.volatility-state.VolatilityState, where the VolatilityState defrecord is in com.newfoundresearch.ttm09.state.volatility-state

13:25 raek: choffstein: you need to have _ instead of - in the import clauses since you acces the classes through java interop

13:26 choffstein: raek: Ohhh, yeah. Jaysus. Thanks.

13:29 xkb: hi

13:29 any Parsatron users here?

13:31 hiredman: cemerick_: are you using 1.3 or 1.4 in production?

13:34 cemerick_: 1.3

13:34 hiredman: how are you dealing with the runtime exception wrapping?

13:35 or do you not do a lot of interop, so it's not an issue?

13:35 cemerick_: I'm not impacted by 855, really, though I can see its importance.

13:35 I think I commented on that ML thread.

13:36 I think I'm going to feel the pain in ccw and pomegranate before I see it in my "real work".

13:36 viz. Laurent's recent msg.

13:37 eh, I'm also contemplating writing some ring middleware for spring-security, so it'll definitely come up tehre

13:37 there*

13:48 cemerick: Speaking of, what are people using for authentication these days?

13:49 Maybe sandbar for form-based, wire up clj-oauth for oauth, etc?

13:50 hiredman: I wonder why rich is being completely silent about 855

13:50 Raynes: I wish people stop using oauth.

13:51 cemerick: along with twitter and FB, I guess?

13:51 Raynes: cemerick: The cool kids use BrowserID for website authentication. They use anything in the world except oauth for that kind of authentication.

13:52 ;)

13:53 cemerick: I think refheap is the only thing I've seen that uses BrowserID. You are, indeed, cool. ;-)

13:53 I never read much about it. I retain the impression that it's essentially OpenID.

13:53 Raynes: cemerick: Well, I kinda hopped on that bus about a month in.

13:53 mdeboard: Yeah I really like refheap Raynes

13:53 hiredman: (openid is dumb and I hate it)

13:54 Raynes: There's a reasonable fellow.

13:54 Lajla: I worship His Divine Shadow.

13:54 Raynes: cemerick: http://identity.mozilla.com/post/7669886219/how-browserid-differs-from-openid

13:55 cemerick: *anyway*, I think I can put together a reasonable middleware that would allow you to use all of the providers from spring-security without mucking with servlet filters, spring itself, XML, etc.

13:55 Raynes: My only problem with oauth is just how bizarre and difficult it makes it to authenticate with any given service. I don't care what security benefits it gets it, it isn't worth it for me.

13:56 cemerick: Raynes: those distinctions seem largely irrelevant. *shrug*

13:57 Raynes: Also, a nice thing about BrowserID is that it takes about as long to sign up as a new user as it does to log in, so it doesn't matter how many people actually use it already, the time it takes to sign up is probably lesser than it'd take to sign up for your own build-your-own form-based registration page.

13:57 I guess irrelevant if you don't like simplicity and your users. *shrug*

13:58 mdeboard: Why, thank you kind sir.

13:59 cemerick: Raynes: I mean, the distinctions aren't user-significant. e.g. the fact that the auth ID is a URL instead of an email address is irrelevant when there's a "login with Google" button.

13:59 callen: I don't think I've spoken with anyone sane that likes oauth.

13:59 Raynes: No, they are definitely user-significant. The first bullet point is all about users.

14:00 * cemerick is utterly convinced :-P

14:00 mdeboard: callen: Twitter loves it!

14:00 callen: mdeboard: because they're the height of practicality and grounded-ness.

14:00 mdeboard: profits-what?

14:01 mdeboard: :D

14:01 Raynes: And even if it weren't significantly more streamlined for users (and if you've used both a bit, I think it's hard to argue that), the actual development process to integrate BrowserID with your site is certainly quicker and easier, so at the very least it makes you happier.

14:01 tmciver: As someone new to web dev, is old-fashioned http authentication dead? Where the browser prompts you for credentials with it's own dialog?

14:01 callen: tmciver: no

14:02 Raynes: tmciver: No, but I wish it were.

14:02 tmciver: Is there a RESTful way to implement that (i.e. no cookies)?

14:02 cemerick: tmciver: HTTP basic over SSL is very popular for API authentication

14:02 tmciver: cemerick: how about a browser-only web app?

14:02 cemerick: Raynes: The login-with-Google openid flow is identical to the BrowserId flow.

14:02 Raynes: cemerick: Anyways, I'm not trying to sell it to you. I just wish you wouldn't use oauth is all, but BrowserID doesn't solve that problem. The rest is all secondary.

14:02 callen: tmciver: nothing wrong with stashing the session in a cookie.

14:03 mdeboard: tmciver: nginx's basic http auth is pretty straightforward

14:03 it is near to my understanding

14:03 tmciver: callen: correct me if I'm wrong, but I believe I've read somewhere that cookies are inherently unRESTful.

14:03 cemerick: Raynes: Sure, just making sure I wasn't missing anything.

14:03 Gotta go where the users are, anyway.

14:03 callen: tmciver: I'm saying it doesn't matter. 80/20, win the battles that matter.

14:03 tmciver: like making certain a GET doesn't modify data.

14:04 tmciver: just getting people to stop generating HTML/CSS that's only valid for IE6 would be pretty sweet.

14:04 tmciver: callen: agreed.

14:04 cemerick: tmciver: yes, Basic for webapp stuff is dead. I only run into it when attempting to access e.g. naively-secured svn repos.

14:04 tmciver: callen: in such a scenario does one create a 'login' resource that tells the browser to store sessionID in a cookie?

14:04 Raynes: In my experience, BrowserID is just significantly more streamlined and simplistic for users and developers both. I considered both OpenID and BrowserID for RefHeap but BrowserID really just blew it out of the water with user experience and the ease of setting it up.

14:04 callen: nota bene: people *are* still using those page editors/generators that only work for IE6.

14:04 Raynes: That's my $0.2 cents.

14:04 callen: just a reminder to you all that the hoi polloi still exist

14:05 mdeboard: (clojure.set/difference #{1 2 3 4 5} #{4 5 6 7})

14:05 callen: and still need dragged kicking and screaming into this century.

14:05 mdeboard: &(clojure.set/difference #{1 2 3 4 5} #{4 5 6 7})

14:05 lazybot: ⇒ #{1 2 3}

14:05 tmciver: Raynes: 20 cents! Thanks!

14:05 Raynes: tmciver: I was wondering if anyone would catch that. ;)

14:06 * tmciver is glad he didn't miss the day they taught math.

14:06 callen: unless you're verizon and misunderstand the concept of units.

14:06 that is, cents and dollars equaling the same amount of money.

14:06 tmciver: callen: I'm guessing the error was in their favor.

14:07 callen: oh indeed.

14:07 100x in their favor.

14:07 * Raynes just quickly restarted the RefHeap server to deploy a small update. Sorry for any interruptions.

14:07 callen: the fucking fools said coefficient CENTS and decided to bill coefficient DOLLARS

14:07 Raynes: YOU RUINED MY GLORIOUS ONE-LINER!

14:07 Raynes: ;_;

14:07 Raynes: doh

14:07 callen: Raynes: I keed I keed. I make my one-liners in slime.

14:08 glorious wonderland slime.

14:08 Raynes: I make mine on paper.

14:08 callen: math nerd.

14:08 Raynes: cemerick doesn't make one liners without logging in with Google first.

14:08 and TimMc does his over SSL.

14:08 * Raynes leaves before his stereotyping becomes viral.

14:08 technomancy: if browsers had made HTTP auth stylable (and supported logout) it would have solved so many problems =\

14:09 tmciver: technomancy: is there any hope of that happening do you think?

14:09 technomancy: tmciver: not in a way that works for muggles

14:09 tmciver: my naive web-developer mind would love that solution.

14:10 callen: I once ran into an ad network that had programmers that literally didn't know how to form an HTTP request that would pass basic auth.

14:10 so we had to let them generate session tokens and pass them in the get args.

14:10 pretty special.

14:11 tmciver: I thought I read somewhere that some browsers support that kind of logout feature with a 'logout@mydomain.com' URL.

14:11 or something like that.

14:12 RickInGA: I love tweets that end "and they are hiring clojure devs". Or I will love them once I learn Clojure

14:17 tmciver: Method 2 at http://www.ssi-developer.net/htaccess/htaccess_logout.shtml is an interesting way to implement logout in a browser using HTTP auth.

14:24 RickInGA: the logic programming videos from the conj 2011 use a type checker as a sample program. What is a type checker?

14:27 kitia: Is there a limit on how large the output can be when using clojure.java.shell/sh?

14:29 dnolen: RickInGA: a program that verifies that the types expressed by a particular program make sense

14:32 RickInGA: dnolen: is that something that you would use to optimize code you have written?

14:32 dnolen: RickInGA: types can be used to generate optimized code, but the main idea is verifying that a program is correct

14:34 RickInGA: dnolen: is that something that only makes sense in a dynamicly typed language?

14:34 dnolen: RickInGA: type checking and optimization from knowledge about the types are pretty orthogonal - case in point, Clojure doesn't do verification at all but it does do optimization (via type hints)

14:35 RickInGA: dnolen: I meant can you only look at whether a type makes sense to verify correctness if you use a dynamically typed language

14:36 though I suppose with type inferencing in scala or f# it could be informative too

14:36 dnolen: RickInGA: type inferencing is mostly about usability - you don't have to clutter your program w/ redundant information

14:37 RickInGA: dnolen: if I read the reasoned schemer, would I have a better understanding of this?

14:39 dnolen: RickInGA: yes, The Reasoned Schemer is a goldmine for understanding how type checkers / inferencers work w/ hardly any code.

14:40 RickInGA: dnolen: cool, thanks for the guidance

14:43 fmw: Enlive seems to mangle my utf-8, e.g. € becomes ?. This seems similar to https://github.com/cgrand/enlive/issues/26 but nobody posted a solution yet. Anyone else had character encoding issues with enlive/compojure?

14:43 I've got my code online, if it helps.

14:44 and I'm using both a content-type HTTP header and meta tag set to UTF-8 and the file encoding of the template is set to UTF-8

14:45 jimduey: a type checker similar in quality to core.logic would be a huge addition to clojure. IMHO

14:47 bhenry: i am looking for help on how to use webnoir session information from within middleware. i.e. want to check if a user is authenticated on every request and redirect to the login page if not.

14:47 jkkramer: fmw: when I ran into that I ended up using a library like clj-http to fetch a page with the right encoding, then had enlive just parse a string

14:48 dnolen: jimduey: agree, though a Clojure type checker worth using would probably have to understand the type system of the particular host - JVM, CLR, JS.

14:48 extensible type checker anyone? :)

14:48 fmw: jkkramer: how do you mean?

14:48 jkkramer: i.e. how does throwing in clj-http solve the character encoding issue??

14:48 lazybot: fmw: Uh, no. Why would you even ask?

14:49 fmw: oops, double question marks :)

14:50 gf3: Hey guys, can I get your thoughts/feedback on my app? http://cljbin.herokuapp.com/paste/4f4da1a6e4b06bdb1b33f987

14:52 jkkramer: fmw: libs like clj-http can better handle http requests and decoding response bodies using the right charset

14:53 fmw: jkkramer: I'm using Enlive as a templating solution for my own web app here, not for scraping. You're talking from a scraping context?

14:54 jkkramer: fmw: going by what the issue you linked to is using -- (enlive-html/html-resource (java.net.URL. url))

14:54 fmw: jkkramer: ah, my bad. I'm parsing from my local file system, not from URI's

14:54 should have made that clear from the start

14:55 jkkramer: ok. don't have much experience there

14:55 fmw: jkkramer: thanks for your input, though!

14:56 jkkramer: fmw: you sure your web server is outputting the right content-type header? jetty tacks on charset=iso-8859-1 if you don't supply one yourself

14:56 fmw: jkkramer: yes, I checked in firebug

14:56 jkkramer: k

14:56 that's all i got

14:57 fmw: jkkramer: ok, thanks!

14:59 Apage43: gf3: I got slightly confused by the UI for a bit

14:59 gf3: Apage43: uh oh, what happened?

15:00 Apage43: After I clicked fork I was poking at the part of the screen I coudn't edit it

15:01 then I figured it out.. but then poked around a bit looking for the button to run my changed version

15:03 RickInGA: arg... I should have known that emacs would foil me.... for years I have had dvorak keyboard on desktop, and qwerty on laptop.... don't think I can handle learning key bindings on both

15:04 gf3: Apage43: cool, thanks

15:07 RickInGA: gf3: your app = cljbin or the code that is pasted there?

15:07 gf3: RickInGA: cljbin

15:07 RickInGA: oh cool

15:07 I am still trying to make sure I understand how break-on works :)

15:08 gf3: :)

15:14 * dnolen wants to implement some Okasaki in ClojureScript

15:14 clj_newb: Hi, in order to keep a persistent connection (subscription) over http, and process every event is it better aleph+lamina or clj-http+clojure agent?

15:16 RickInGA: dnolen: Okasaki = Purely functional Data Strutures?

15:16 dnolen: RickInGA: yes

15:16 fmw: jkkramer: it turns out I forgot to capitalize my Content-Type header!

15:17 * brehaut wonders if a dev middleware that checks header validity would be useful

15:17 RickInGA: some days I am excited by and otherdays I am overwhelmed by how much I have to learn

15:19 TimMc: brehaut: "Hi! It looks like you're tring to send an HTTP response." - Clippy

15:19 brehaut: TimMc: haha

15:19 mdeboard: lol

15:19 hiredman: brehaut: https://bitbucket.org/justin/webmachine/wiki/BigHTTPGraph

15:20 brehaut: hiredman: wow thats fantastic

15:21 hiredman: it is kind of pretty

15:21 tmciver: brehaut: and Clothesline (https://github.com/banjiewen/Clothesline) is a Clojure implementation.

15:21 tcrawley: cemerick: I have a patch to nrepl to support binding to a particular interface instead of all of them. What's the preferred way to get that to you? a pull request?

15:21 brehaut: tmciver: yeah i think ive looked at clothesline before, but i dont recall ever seeing this graph

15:21 tcrawley: the diff is: https://gist.github.com/1944096

15:23 cemerick: tcrawley: you mean, 0.0.0.0 vs. some particular IP?

15:24 tcrawley: cemerick: correct - by default ServerSocket will bind to all interfaces

15:24 cemerick: tcrawley: it's a contrib project, so an issue here please: http://dev.clojure.org/jira/browse/NREPL

15:24 bhenry: how can i get the requested url with noir?

15:24 tcrawley: cemerick: sure thing

15:26 brehaut: bhenry: :uri in the request map (https://github.com/mmcgrana/ring/blob/master/SPEC)

15:26 bhenry: brehaut: it's too abstracted for me. i don't see where the request map is. example code to come...

15:27 brehaut: you kids and your new fangles abstractions

15:28 xkb: How can I rewrite this: (between (placeholderOpen) (char \}) (many1 (valid-name-char))) <= so it returns the whole match insted of the many1 match only? (Parsatron)

15:28 brehaut: bhenry: i believe you call noir.request/ring-request

15:29 bhenry: https://gist.github.com/eeb13a3b34ade3739428

15:30 oh. so ring-request will work inside of there?

15:30 brehaut: bhenry: according to the docs yeah, and ibdknox is pretty good about his docs so i trust them

15:30 bhenry: cooooooool. thanks.

15:31 ibdknox: brehaut: my docs are actually all lies. Well crafted lies, but lies nonetheless ;)

15:31 brehaut: ibdknox: its the clojure.org way

15:31 ibdknox: indeed

15:32 amalloy: the clojure.org way is truths, but about versions that don't matter

15:32 brehaut: sniped by amalloy

15:32 mdeboard: So I'm using clojure.data.xml and am trying to perform the following: https://gist.github.com/8ade2081f472e164064a Iterate through items in a coll then generate elements from them. However, I get the error "No implementation of method: :emit-element of protocol: #'clojure.data.xml/Emit found for class: clojure.lang.LazySeq" when I try.

15:33 I'm apparently using the wrong special form?

15:33 brehaut: bhenry: if theres any context going on in your app (ring handlers nested in other handlers) you may need to use use :path-info instead of :uri from memory

15:34 although i dont know if the ring spec has been updated to reflect that yet

15:35 bhenry: this used to be easy. i need to get up to speed with all ibdknox's new ways. derp.

15:35 ibdknox: if the new ways aren't as easy, that's a bad thing

15:35 replaca: Q: anyone here know how to et in touch with Arthur Ulfeldt? I want to coordinate with him about tomorrow's SF clojure meeting

15:36 mdeboard: (println)'ing the same as I pasted above works just fine, but emitting it as xml doesn't work.

15:36 bhenry: ibdknox: i think it's just that they are so different. i used to use moustache.

15:36 ibdknox: oh

15:36 bhenry: yeah, that is a fairly different context

15:38 amalloy: replaca: he's pretty active on stackoverflow last time i checked; i'd look there to see what he has listed as contact info

15:39 Luke: Hey guys. how do I handle a dictionary key with a space in it? I'm trying to use incanter and it's imported some keys with spaces in it

15:39 gtrak`: moustache is too unreadable for me right now, I have to use it by trial and error

15:39 Luke: so i'd like to do (scatter-plot :x-data :y-data) where the dashes are spaces

15:40 scottj: Luke: try strings? "x data"

15:40 brehaut: poor moustache, it gets no love

15:40 kotarak: Raynes: the nrepl stuff is not yet ready in vimclojure. I got the client working, but this is highly in flux. The backend will need some serious revamping for nrepl.

15:40 Luke: scottj: "unable to resolve strings?"

15:41 ejackson: Luke: i'd preprocess the data to get rid of the spaces.

15:41 Luke: ejackson: they aren't actually spaces. they're dashes in the csv file

15:41 replaca: amalloy: thanks. Found it!

15:41 Luke: incantor is reading it in as spaces though =/

15:41 ejackson: in the column names ?

15:41 kotarak: Raynes: I will give it priority. I promise.

15:41 Luke: ejackson: yes

15:41 ejackson: freaky... 1

15:42 ibdknox: kotarak: I'm really excited about it :) I think it'll make working with the CLJS repl much easier to implement

15:42 though I had an idea earlier that would potentially make that a moot point

15:43 ejackson: Luke: I'm runnig 1.3.0 and don't observe that behaviour... upgrade ?

15:43 Luke: ejackson: actually it looks like it's actually in my csv that way

15:43 is there a reason it shouldn't handle spaces in column names?

15:43 it seems realistic to have that

15:43 kotarak: ibdknox: If you have any ideas about CLJS integration feel free to drop me an email or post on the vimclojure google group. If have no clue about CLJS and it's unlikely that I have the time to learn it. Any support here is highly welcome!

15:44 ejackson: Luke: patches welcome :)

15:44 hiredman: ejackson: that's not true, clojure.data.csv is part of contrib, so your patches are welcome to sit in jira

15:44 amalloy: Luke: so far you haven't said anything that's actually wrong. "doesn't handle" doesn't mean anything, and ejackson can't fix it. what does it do that you wish it didn't, or vice versa?

15:45 Raynes: kotarak: Eh?

15:45 hiredman: I imagine the library tries to turn column headers into keywords

15:45 Raynes: kotarak: Oh, you must have heard me bitching about lack of hs nrepl client docs.

15:45 kotarak: Rest assured, it's only because I'm excited. ;)

15:45 ibdknox: kotarak: yeah, don't pay any attention to him. He gets antsy :p

15:45 kotarak: ;)

15:45 * ibdknox whistles innocently

15:45 Luke: amalloy: incantor tries to use keywords for column names (ex: :x :y) so if there are spaces in columns, I don't know how to reference the column

15:46 Raynes: It's true, I get antsy.

15:46 amalloy: &(keyword "this is a string")

15:46 lazybot: ⇒ :this is a string

15:46 kotarak: Raynes: well, the current state was the minimum example of a non-complaining compiler run. It certainly needs polishing.

15:46 Luke: nice - thanks

15:46 ejackson: Luke: if you want to slice a dataset by colnames with space you can use ($ (keyword "col with spaces") dataset)...

15:46 Luke: ejackson: yeah amalloy just mentoined that =) thanks

15:47 i'm new to clojure btw

15:47 ejackson: Luke: no sweat dude, keep at it.

15:48 Luke: thanks a lot

15:48 gtrak`: how do you get the class object of a class?

15:49 TimMc: gtrak`: Beyond ##(class 5) ?

15:49 lazybot: ⇒ java.lang.Long

15:49 amalloy: ,String

15:49 clojurebot: java.lang.String

15:49 amalloy: clojurebot: ping?

15:49 clojurebot: PONG!

15:49 hiredman: you'd think after the first time someome generate keywords with spaces in them for map keys and noticed it was a pain people would stop doing it

15:50 amalloy: yeah, generating keywords from arbitrary strings is sad

15:50 hiredman: it is

15:50 gtrak`: I'm trying to do do X.class.getCanonicalName()

15:50 TimMc: amalloy: How about for a constrained set, like table names in a DB?

15:50 samaaron: is anyone else seeing weird behaviour with clojars?

15:50 TimMc: gtrak`: (.getCanonicalName (class X))

15:50 samaaron: it's telling me all my poms are invalid

15:51 hiredman: you know what? this is an abitrary string, so the map is going to have a string for a key, if you want something different it is on your head

15:51 gtrak`: (.getCanonicalName (class Integer))

15:51 ,(.getCanonicalName (class Integer))

15:51 clojurebot: "java.lang.Class"

15:51 TimMc: gtrak`: oh, (.getCanonicalName X) if X is the class

15:51 gtrak`: TimMc: of course I tried that :-)

15:52 kotarak: Is there some magic which tells me about boxing, similar to *warn-on-reflection*?

15:52 TimMc: gtrak`: Are you sure you want canonical name, and not name?

15:52 * kotarak is slightly disconnected re numeric changes.

15:52 ejackson: hiredman: seems like the stuff should pass through something like inflections first

15:52 gtrak`: TimMc, either, but if I should be able to get both?

15:52 amalloy: kotarak: that would be nice, wouldn't it. i hadn't thought of that

15:52 hiredman: inflections?

15:53 ejackson: its a lib that does renaming on keyword/strings Rails style

15:53 TimMc: &(.getCanonicalName (class (int-array 0))) ; gtrak`

15:53 lazybot: ⇒ "int[]"

15:53 TimMc: &(.getName (class (int-array 0))) ; gtrak`

15:53 lazybot: ⇒ "[I"

15:53 gtrak`: amalloy, ah, is (class Integer) returning a generic-erased class-Object?

15:53 TimMc: gtrak`: Nothing to do with generics.

15:53 amalloy: errr

15:54 hiredman: ejackson: ugh

15:54 TimMc: gtrak`: Integer returns the Integer class

15:54 amalloy: it's returning the class of the Integer class. which is Class

15:54 ejackson: :)

15:54 hiredman: no, it's an abitrary string, please return it as such, and if I have domain specific knowledge that it should be keywords I can do it

15:55 gtrak`: TimMc: obviously I can do (class of an object of that class

15:55 TimMc: gtrak`: ##(take 5 (iterate class 42))

15:55 lazybot: ⇒ (42 java.lang.Long java.lang.Class java.lang.Class java.lang.Class)

15:55 gtrak`: but is there a way to get it statically?

15:56 TimMc: gtrak`: .........

15:56 gtrak`: what am I missing, sorry?

15:56 TimMc: &Integer

15:56 lazybot: ⇒ java.lang.Integer

15:57 TimMc: ^ that is an instance of java.lang.Class

15:57 gtrak`: ,(.getName Integer)

15:57 clojurebot: "java.lang.Integer"

15:57 gtrak`: oh

15:58 godammit :-)

16:03 svs`: hello, total noob here. how do I install the lein-git-deps plugin? saying "lein plugin install lein-git-deps" merely shows me a usage message. thanks

16:04 hiredman: svs`: you need to tell it what version to install

16:04 and git deps are horrible, please don't use them

16:06 svs`: hiredman: thanks. so what would one use to install directly from a git repo? do it manually?

16:06 hiredman: don't

16:07 the majority of clojure projects use leinigen and should be available as a jar from clojars or some other maven repo

16:07 TimMc: svs`: You really want to depend on built artifacts.

16:07 ~repeatability

16:07 clojurebot: repeatability is crucial for builds, see https://github.com/technomancy/leiningen/wiki/Repeatability

16:07 technomancy: svs`: you can read about "checkout dependencies" in the readme, but they are supplementary to real dependencies

16:07 hiredman: if not you can us lein to install it into you local ~/.m2

16:07 technomancy: I got to compare notes with the rubygems developers yesterday and they basically wish they made it more explicit that git dependencies are meant for development convenience only

16:08 svs`: i'm coming from rubyland myself and I love that convenience, but I can see what the tradeoffs are.

16:09 thanks. I'm looking at some code that isn't on clojars yet, so perhaps I push it out there first and then depend on that. cheers

16:10 TimMc: svs`: You can also use the s3 private wagon thingy.

16:10 svs`: won't git commit SHAs solve the repeatability problem as predictably as version numbers?

16:11 ibdknox: `fogus: that pretty-lisp thing is incredibly difficult for me to parse. Do you actually like it?

16:11 TimMc: svs`: Only if you use specific commit IDs and not HEAD.

16:11 I've never played with that plugin, so I assume both are options.

16:12 technomancy: svs`: yes, but transitivity is going to be a mess

16:12 svs`: technomancy: i.e. the dependencies of dependencies?

16:12 technomancy: yeah

16:13 that's why checkout deps are supplementary

16:13 hiredman: ibdknox: it might be better if it kept the parens

16:14 te: Raynes: is there a reasonable ido-find-file for vim?

16:14 ibdknox: hiredman: maybe, I still think that level of space and lines causes a lot of visual distraction/confusion

16:15 hiredman: we've been trying to do structural editors for a really long time. This one doesn't seem to improve on any of those

16:15 Raynes: te: It's kind of complicated.

16:15 te: Nothing exactly like it, but wildmenu does something similar.

16:15 ibdknox: hiredman: I tried pitching some ideas around this kind of stuff in VS heh, the responses were interesting

16:15 Raynes: te: Also, ctrlp is an excellent plugin that is even better than ido mode for opening files in a project directory, but not on the whole file system.

16:16 svs`: technomancy: http://stackoverflow.com/questions/9051516/clojure-and-leiningen-using-a-git-repository-as-dependency has you saying it would be "pretty easy to write a plugin" that solves this problem. Or am I undertanding you wrong?

16:16 ibdknox: Raynes: te: command-t works fairly well too

16:17 technomancy: svs`: it would be easy to automate the creation of checkout dependencies, yeah

16:17 Raynes: ibdknox: ctrlp is better than command-t

16:17 hiredman: ibdknox: I would generally agree with that, I jsut think it would be easier to read if it had the parens

16:17 ibdknox: hiredman: yeah, it probably would

16:17 Raynes: oh? how so?

16:18 TimMc: ibdknox: What is pretty-lisp?

16:18 A quick web search didn't help.

16:18 tcrawley: technomancy: a swank-clojure question for you: is there currently a way to shutdown an embedded swank-server w/o exiting the jvm?

16:18 brehaut: TimMc: http://news.ycombinator.com/item?id=3649518

16:18 technomancy: tcrawley: probably; not sure

16:19 TimMc: Yikes, what a waste of space.

16:19 aperiodic: i found that really, really hard to read

16:20 there were all those meaningless horizontal lines in the way

16:20 TimMc: and vertical lines that I can't track

16:20 aperiodic: and baselines changing all over the place

16:20 te: Raynes: the whole file system thing is what is annoying me about CtrlP

16:20 svs`: technomancy: so in general is this a problem that is under discussion in the community or is it not generally seen as a problem? I'm assuming the latter given the responses above.

16:20 ibdknox: I had some much more interesting mockups for VS that integrated parts of structural editing, but didn't actually create a structured editor

16:20 te: I'm using CtrlP -- it seems nice, but it's driving me insane to not be able to type ~/foo

16:21 TimMc: technomancy: Hey, wasn't what's-his-face gonna make a checkout-deps-creator plugin?

16:21 dnolen: whoa sneaky throw landed in master

16:21 amalloy: wow

16:21 tcrawley: technomancy: eval-loop and control-loop both just spin using the util/continuously macro, with no option for exit. the only way I can see it working currently is if there is a message you can drop in mbox that has it cleanly exit

16:22 technomancy: svs`: "let's use git instead of maven dependencies" is not a viable solution, but "let's use git as a development-time convenience on top of real dependencies" has worked for ages

16:22 tcrawley: sorry, I don't know anything about the internals of swank =\

16:22 TimMc: that's right; gtrak`` said he might take a swing at it

16:22 tcrawley: technomancy: okie doke, thanks. I'll dig deeper

16:23 ibdknox: gosh technomancy what *do* you know? ;)

16:23 technomancy: ibdknox: apparently not when to keep my mouth shut?

16:23 ibdknox: haha

16:24 I hear we're going to try to video conference with you seajure folk on thursday

16:24 technomancy: svs`: if you've got a library that's brand new and aren't ready to share it with your team, there's nothing wrong with a manual "lein install" on the new lib to get started with

16:24 just be sure it's published before you ask others to rely on it

16:24 ibdknox: yeah, should be fun

16:26 svs`: technomancy: cool, thanks. fyi, the clojure-mode.el on ELPA is outdated and doesn't have the clojure-jack-in command. Not sure if this is your territory or not so just fyi.

16:26 technomancy: svs`: yeah, unfortunately I've tried to get a deprecation warning up on elpa, but the maintainer is unresponsive

16:26 but al the official docs should be updated to point to marmalade hopefully

16:26 kotarak: ,Long/MAX_VALUE

16:26 clojurebot: 9223372036854775807

16:26 gtrak`: technomancy: are you guys happening to meet the week after clojure/west perchance?

16:27 technomancy: gtrak`: no, just the first thursday of each month

16:28 gtrak`: oh ok, I was hoping, since I'll be visiting seattle that week

16:28 svs`: technomancy: the README on clojure-mode is misleading. I'll send you a pull request with a fix.

16:29 technomancy: ok

16:30 gtrak`: technomancy: are there any fun programming-related things going on that week?

16:30 technomancy: gtrak`: check out seattle beer&&code; I think they meet every week

16:30 or maybe every other?

16:30 gtrak`: awesome, thanks

16:31 ibdknox: you know, if instead of clojurescript we had done clj -> llvm we could've just used emscripten to get cljs

16:32 gtrak`: is clj -> llvm ever going to happen?

16:32 ibdknox: if someone cared enough, sure

16:32 there's no reason it *can't* happen

16:32 it's just work

16:32 gtrak`: I've targetted lua to llvm for a class :-) (ducks)

16:33 ibdknox: lol

16:33 it would be awesome... I really don't want to write objective-c to build iPad things :(

16:33 hiredman: there is a blog post somewhere about generating c++ from clojure

16:33 gtrak`: actually, I was just talking to a guy about clojure-like stuff on embedded devices, it might have a use-case there, or in more deterministic systems

16:34 I can't imagine llvm would be faster than the jvm for most things

16:34 ibdknox: maybe not, but it *would* mean absolute portability

16:34 hiredman: I generated java code for my reflection inline caching

16:34 emezeske: gtrak`: might be faster for startup times

16:34 gtrak`: true

16:35 hiredman: the clojure code for generating https://github.com/hiredman/clojure/blob/reflection-method-caching/src/jvm/clojure/lang/RIC.java is in a comment at the bottom

16:35 ibdknox: jvm + llvm would cover basically every base

16:35 hiredman: haha nice

16:35 * emezeske doesn't understand how the JVM startup times are so bad.

16:35 hiredman: llvm is not a highlevel target like the jvm is, there is a lot more work to do in the compiler

16:35 gtrak`: emezeske: it's basically an OS

16:35 technomancy: emezeske: IIUC the tl;dr is that sun/oracle has put no effort into improving it

16:36 because they only care about servers

16:36 TimMc: Gave up on applets? :-)

16:36 emezeske: It doesn't have to initialize hardware like an OS, which is part of the time-consuming startup of an OS

16:36 technomancy: TimMc: more or less

16:36 hiredman: emezeske: loads byte code for everything and verifies it all

16:37 gtrak`: it has to do quite a bit

16:37 emezeske: s/has to do/does

16:37 technomancy: yeah, dropping bytecode verification makes a big difference on startup

16:38 hiredman: there are improvements in the pipe that should help

16:38 _ulises: evening

16:38 technomancy: emezeske: there's no way to do AOT with hotspot's JIT

16:38 emezeske: I've read that a lot of the JVM startup time is just I/O, seeking in huge jar files

16:38 hiredman: the module system should make it possible to cut down the amount of code to load and verify

16:38 technomancy: basically you have to wait for it to identify problem points before it even bothers to do any JIT to machine code

16:38 emezeske: technomancy: Oh?

16:38 gtrak`: I wonder if clojure to llvm is easier than clojure to C++

16:39 rather, clojure in C++

16:39 ibdknox: I would think so

16:39 hiredman: the last few tweets from openjdk are JEPs that should help improve startup time

16:39 https://twitter.com/#!/openjdk

16:39 emezeske: nice

16:39 hiredman: also the module system may help

16:41 emezeske: I guess it just seems to me like the JVM *could* cache a lot of JIT'ed code on a particular machine, the first time it's run

16:41 hiredman: sure, it could, but it doesn't at all

16:41 emezeske: Yeah

16:41 That's what seems insane to me.

16:42 hiredman: well, it makes for a much simpler system

16:42 lucian: emezeske: most of JVM's startup time is io, yes. it's most of the reason dalvik has a different format

16:42 technomancy: emezeske: servers sell, so that's where snoracle spends their time

16:42 hiredman: anytime you add caching you make things complicated

16:42 lucian: jit warmup isn't the problem, there are just too many, too big classes that can't be mmaped into memory

16:42 also, clojure is a GC pig during bootstrap

16:43 emezeske: Yeah, caching is complicated. It's also responsible for like 99% of performance wins, ever

16:43 lucian: dalvik mmaps files into memory, and it has much more compact and less redundant class files

16:43 * emezeske doesn't exaggerate, ever.

16:44 lucian: but dalvik also has a slow-ish gc, which is why clojure isn't usable on android

16:44 mdeboard: How would I dynamically generate nested XML elements using clojure.data.xml? e.g. `(element :foo {:bar "baz"} (for [j coll] (element :qum {} nil)))` ? That doesn't actually work

16:45 lucian: might need a ~ in there somewhere

16:45 mdeboard: e.g. https://gist.github.com/ff80a5509a5241065a98

16:45 svs`: any reccommendation for a PEG library like treetop or parslet in clojure?

16:46 lnostdal: hi, i sometimes get "Evaluation aborted" (slime) when working in the Slime REPL lately .. it's obvious that something in my code went wrong, but it doesn't pop up any sldb or generate any other output .. anyone seen this?

16:46 dnolen: ibdknox: clj -> llvm would be very sweet - the biggest obstacle would be GC.

16:47 jodaro: awww yeah! OPJ: other peoples java.

16:47 mdeboard: I guess I'm seeking the equivalent of python's foo(*args) here

16:47 Bronsa: lnostdal: i've seen this too

16:47 no ide why this is happening though

16:47 mdeboard: which I know in the signature is just [x & xs] but

16:48 ibdknox: dnolen: yeah, it'd definitely be work

16:48 lnostdal: Bronsa, yeah, i usually guess what the problem is though, but not this time .. and there's no output in the terminal, either

16:49 dnolen: ibdknox: but I also don't know you couldn't just plug in a simple GC to start off with

16:49 don't know why I mean.

16:49 gtrak`: could we create a more fundamental version of JS on llvm and start from there? Maybe analagous to RPython?

16:49 mdeboard: lucian: Were you talking to me?

16:49 son of a

16:50 ibdknox: dnolen: presumably ruby llvm and such have a solution that could be stolen

16:50 dnolen: ibdknox: I wouldn't be surprised if cljs compiler -> llvm turned out to simple if you just used the existing pluggable JIT & GC

16:50 amalloy: mdeboard: you could use the hiccup-emulation features, which IMO are way easier to work with than the element-record-based api

16:51 mdeboard: amalloy: Are those documented?

16:51 amalloy: (sexp-as-element [:foo {:bar "baz"} (for [j coll] [:qum])])

16:51 probably? a little? i'd look at sexp-as-element. i know i wrote a docstring but dunno how good it is

16:51 mdeboard: No clue what hiccup is btw

16:51 ibdknox: mdeboard: http://github.com/weavejester/hiccup

16:52 mdeboard: it's what noir uses for templating by default

16:52 mdeboard: amalloy: Ah found the fn

16:54 emezeske: After reading this article, I became really curious about clojure on RPython: http://tratt.net/laurie/tech_articles/articles/fast_enough_vms_in_fast_enough_time

16:55 mdeboard: amalloy: Lovely.

16:56 God, amazing. You're the best.

16:57 Raynes: mdeboard: He's dreamy.

16:57 mdeboard: I get to live near him soon!

16:57 I shall woo him from a short distance.

16:59 mdeboard: help I just wrote an rdbms indexer for solr

17:01 tmciver: mdeboard: and...you can't get up?

17:01 ibdknox: hah

17:02 and look what pops up: http://news.ycombinator.com/item?id=3649883

17:02 callen: ibdknox: I wonder how that would perform under pypy.

17:03 jimduey: interesting. Clojure everywhere!

17:03 ibdknox: wow

17:03 there's a lot of work here

17:03 dnolen: ibdknox: neat, though I'm skeptical of claims outperforming Clojure on JVM

17:04 ibdknox: dnolen: yeah, I am too

17:04 jodaro: wow

17:04 hiredman: very

17:04 jodaro: now we need to implement haskell on top of clojure running on python

17:04 ibdknox: it also doesn't really solve any problem I can think of

17:04 pjstadig: yeah

17:05 emezeske: Is that really written in Python instead of RPython?

17:05 ibdknox: it doesn't help me wrote iOS apps

17:05 pjstadig: since the JVM isn't really that burdensome

17:05 ibdknox: write*

17:05 pjstadig: especially with invoke dynamic

17:05 dnolen: ibdknox: I agree ... Clojure on LLVM would really be the next logical target in my opinion.

17:05 replaca: how does it deal with concurrency, I wonder? does it get hung up on the global lock?

17:06 aperiodic: is that link something to do with clojure on pypy? (noprocrast is active)

17:06 ibdknox: ^

17:06 ibdknox: it's clojure built in python

17:06 seems to be a pretty faithful port from Java to straight python

17:07 pjstadig: https://groups.google.com/d/topic/clojure-py-dev/SziaZe2HKAE/discussion

17:07 0.1 release doesn't include concurrency constructs

17:08 aperiodic: yeah, i agree that llvm is a much more exciting target

17:11 ibdknox: lol: clojure-py -> CPython -> llvm -> emscriptne -> JS

17:11 ;)

17:12 callen: This has gone too far.

17:12 JS -> cljs

17:13 pjstadig: concurrency in my Python? hahahahaha

17:13 pjstadig: yeah. well. maybe someday.

17:13 ibdknox: dnolen: is the biggest potential win for CLJS right now the arguments stuff?

17:13 dnolen: ibdknox: yes that would be huge

17:14 ibdknox: other big thing is getting faster data structures - but that would require some research as to what works best in JS

17:14 mdeboard: Saw an amazing implementation of partition-all in python today

17:14 ibdknox: dnolen: I started down that path a little trading memory for speed

17:15 dnolen: ibdknox: any code path with several multiple arity fns is punished right now (like get)

17:15 ibdknox: ?

17:15 ibdknox: dnolen: better datastructures that kept arrays of their keys and whatnot so that when you iterated over them it would be native speed

17:16 dnolen: after ClojureWest I might look into the arguments thing. I want CLJS to be fast enough for games :)

17:16 rlb: Is anyone working on clojure/jvm startup time ATM? Just a bit more, and it'll be "fast enough" as far as I'm concerned...

17:17 technomancy: rlb: I think it's blocked on the design of dynamicity knobs

17:17 uvtc: Is clojars.org pretty much the central location for 3rd-party Clojure libs (that is, the "CPAN for Clojure")?

17:17 technomancy: uvtc: yup

17:17 aperiodic: ibdknox: keep me posted! i've actually just started working on a game in cljs

17:17 dnolen: ibdknox: I'm less concerned with iteration speed and more concerned with how slow it is to update data structures, but perhaps you haven't found that to be a problem.

17:18 uvtc: Seems odd that clojars.org doesn't have a way to view the readme of a given lib...

17:18 technomancy: uvtc: well-behaved libraries include a URL to their home page which usually displays a readme

17:19 ibdknox: dnolen: not in this current context, but I'm sure I would eventually :( Those kinds of problems have never been particularly interesting to me though, so it's probably better if someone who really likes datastructures took a crack at it

17:19 rlb: technomancy: fwiw, on my main machine "-e ''" is about 0.85s now (with 1.3 and jvm 7) -- I'd like to see it under 0.1s, but I'd live with say 0.25s.

17:19 uvtc: technomancy, ah, that makes sense. (looking for one that does this ...)

17:19 technomancy: rlb: I would be shocked if it ever gets under 0.5s without oracle getting involved

17:20 rlb: technomancy: jvm changes you mean? (That'd be fine ;>)

17:20 technomancy: right

17:20 it just means it's out of our hands

17:21 uvtc: technomancy, Ah, ok. This one, for example, http://clojars.org/lein-immutant does that.

17:23 dnolen: ibdknox: in general I'm not too concerned w/ the future of CLJS perf, there's just a lot of little things to be done.

17:25 ibdknox: dnolen: I'll be happy when running canvas doesn't make my laptop blast off ;) hehe

17:26 dnolen: ibdknox: haha

17:27 uvtc: technomancy, Thanks. Just curious, does leiningen actively encourage users to include a `:url` in their project.clj? I see that when creating a new project, it's not put in with a dummy value by default.

17:27 rlb: so far most of the webgl demos I've tried have seemed unrealistic -- of course, I'm using firefox + intel HDN000...

17:27 (not clojure-specific -- just random webgl demos)

17:28 technomancy: uvtc: version 2 does

17:28 rlb: (too slow/stuttery)

17:28 ibdknox: the webgl version of quake3 works surprisingly well on chrome

17:29 uvtc: technomancy, Oh, that sounds great. :) Thanks.

17:31 aperiodic: webgl demos are smooth as butter on my core i7 MBP w/chrome dev

17:31 hiredman: time to upgrade

17:31 man I want an i7, but I just put a plane express sticker on my c2d

17:31 rlb: right -- I've heard chrome is much faster, but that's a single browser

17:31 hiredman: planet

17:32 jsabeaudry: Anyone has looked at openjdk6 vs 7 for clojure performance?

17:37 LauJensen: Are there any interesting uses of ClojureScript out and about yet?

17:37 ibdknox: LauJensen: http://www.chris-granger.com

17:37 Raynes: I once used it to rename a bunch of video files.

17:37 Does that count?

17:38 I found about 6 bugs in that 20 line script.

17:38 LauJensen: Raynes: That sounds outstanding Raynes :)

17:38 Thanks ibdknox, I'll take a look

17:39 dnolen: LauJensen: I think lots of folks are starting to dig in, I think the tooling story (read good Lein story) needs to improve before it'll really take off - fortunately people are actively working on that.

17:39 Raynes: dnolen: Did that nodejs arg count bug ever get fixed?

17:39 ibdknox: it's basically there now

17:40 LauJensen: dnolen: How is Lein lacking wrt Clojurescript ?

17:40 ibdknox: lein-cljsbuild does everything we need it to

17:40 dnolen: Raynes: I haven't looked into it, patch welcome :)

17:40 ibdknox: sweet!

17:40 Raynes: Meh.

17:40 I need to send in a new CA and have my account name changed and stuff.

17:40 dnolen: ibdknox: I haven't tried it myself, so I didn't know

17:40 Raynes: I don't care nearly enough.

17:40 dnolen: ibdknox: can it grab CLJS libs packed up in JARs as well?

17:41 ibdknox: dnolen: all my libs are included that way :)

17:41 dnolen: ibdknox: rad

17:41 * dnolen is always behind the times

17:41 ibdknox: even referencing externs like that works

17:42 dnolen: Raynes: well, that's why it isn't fixed yet then :)

17:42 Raynes: *shrug*

17:43 It's fair since I don't think cljs has seen an official stable release yet. I'm going to be pretty disappointed if it isn't fixed by the time that happens. Cljs is claiming nodejs support, isn't it?

17:43 Or is that just a fun little addon that nobody actually cares about? I'm not sure how important it is to people.

17:43 dnolen: Raynes: it's important but nobody's owned it

17:44 Raynes: currently I think Node.js stuff is a bit broken - very likely simple fixes but I haven't looked too closely.

17:45 Raynes: that said, it seems like most of the CLJS interest is heavily browser oriented.

17:45 Raynes: Yeah, I haven't had a chance to use it on the web.

17:45 ibdknox: jark seems like a better scripting solution

17:45 dnolen: Raynes: I do have a working Node.js REPL which is really fun, but it still needs lots of work

17:45 ibdknox: and the JVM is better for server stuff

17:45 Raynes: I've got RefHeap which has some js and will have more in the future, but jquery + javascript seems to be doing really well for me.

17:45 ibdknox: so node doesn't seem very useful

17:46 Raynes: ibdknox: Jark is just another persistent JVM solution.

17:46 ibdknox: yep it is

17:46 technomancy: ibdknox: it's really solely about startup time

17:46 Raynes: ibdknox: Keeping a JVM running constantly just for startup time is pretty pathetic.

17:46 It's kind of a waving the white flag.

17:46 ibdknox: Sure, but if it works, I'm happy

17:47 this is one case where the pragmatism outweighs the impurity of it for me

17:47 technomancy: it works for you because you care enough about Clojure to not mind having this thing hanging around

17:47 ibdknox: yep

17:47 I would love not to have to write bash every again :p

17:47 technomancy: once we get to the point where people who don't care about Clojure are running programs written in Clojure, it's going to be a deal killer

17:47 Raynes: It isn't really 'impurity' as much as a big fat JVM eating up resources so that you don't have to write shell scripts.

17:47 But not having to write shell scripts pretty much outweighs that issue.

17:47 dnolen: Raynes: jquery + javascript is a fine combo IMO for anything less then 500 LOC, I'm starting to get mad when I see more JS then that.

17:48 Raynes: dnolen: Right, I don't have any large Javascript sites.

17:48 dnolen: I'm sure cljs would make more sense for those.

17:48 dnolen: Right now, the extra compile step and the harder barrier to entry to contribute to refheap outweighs the benefits I'd get from using cljs.

17:49 dnolen: Raynes: makes sense

17:49 Raynes: On one hand I'm disappointed that I haven't had the opportunity to do more with it, but on the other I'm happy I haven't needed that much javascript. ;)

17:49 ibdknox: I think I can basically make the compile step irrelevant

17:49 Raynes: I think our js file is like 30 lines or less. :P

17:50 That'll probably grow significantly as we add more features to RefHeap.

17:50 dnolen: Raynes: I'm looking forward to hearing what the JS experts think about CLJS at JSConf - lots of hurdles to CLJS adoption - but for me semantics win

17:51 Raynes: kotarak: ping

17:51 kotarak: Raynes: yes?

17:52 Raynes: kotarak: Is it on purpose that (-> foo\nbar) indents differently from other macros/functions? It indents like defn when it should indent like anything else. The arguments should line up.

17:52 In VimClojure of course.

17:53 ibdknox: Raynes: I just removed it from lispwords in indent/clojure.vim

17:53 Raynes: It causes pretty nasty inconsistencies when both Emacs and Vim users edit the same codebase, so I have to manually indent all of that to be consistent with my Emacs-using coworkers.

17:54 Yeaaaah, but I don't like doing that. :p

17:54 kotarak: Raynes: Hmmm.. I considered -> to take like a body. You can follow ibdknox advice. Put it in after/ftplugin/clojure.vim

17:54 Raynes: I guess I'll have to.

17:55 kotarak: I personally like the indenting of -> and ->> that way better. Matter of taste I guess.

17:55 And up to now, no one complained..

17:56 ibdknox: the actual indentation doesn't bother me, just the inconsistency between vim and emacs since most folks here use the latter

17:56 Raynes: I don't really care about how it's indented myself, but the people whose projects I work on do. My coworkers in particular. But it's not like it's hard to change myself. It's just bothersome doing it every time I update. Not your problem though.

17:56 :)

17:56 * Raynes will be back later. Shopping.

17:57 AimHere: There is at least one indentation bug on emacs clojure-mode as well, so emacs might well be wrong

17:59 kotarak: Raynes: Put it in after/ftplugin/clojure.vim. Will survive every update. Change it once now. Be happy thereafter. No need to edit around in VimClojure itself.

18:01 ibdknox: I'm annoyed about the missing newline at EOF. Which happens to happen quite often. :/

18:03 amalloy: kotarak: in emacs? so set it up to automatically add those

18:03 (setq require-final-newline t)

18:03 kotarak: amalloy: tell the others. Not me. I use vim.

18:04 amalloy: personally i don't mind missing a trailing newline; it's a style/preference thing that varies by team. if your team is supposed to have trailing newlines, make then do it; if they're not, then don't object when they don't

18:04 technomancy: amalloy: if you leave the trailing newline out of a crontab, it will pretend the last line doesn't exist

18:04 Fun Fact!

18:05 hiredman: man, I better go check all the crontabs I have checked in

18:05 amalloy: yes, i know. lots of unix tools are dumb; not really breaking news

18:05 technomancy: just saying, it's not just a style thing

18:05 brehaut: technomancy: feautres like that is why half of all programmers have tried to write their own cron replacement

18:06 kotarak: And most of them failed.

18:06 * kotarak ducks

18:06 technomancy: brehaut: worse is better =(

18:06 amalloy: in a clojure file it clearly is

18:06 brehaut: in the case of cron, i think worse is still worse

18:06 vijaykiran: Hi .. what is the simplest way to filter a vector of maps based on keys ?

18:07 technomancy: amalloy: yeah, but it's not worth setting it as buffer-local in all the modes you know you don't need it for

18:07 brehaut: ,(filter :foo [{:foo 1} {:bar 2} {:foo 2}])

18:07 clojurebot: ({:foo 1} {:foo 2})

18:08 vijaykiran: thx! I got something similar - so must be on the right track :)

18:08 brehaut: ,(filter (comp odd? :foo) [{:foo 1} {:bar 2} {:foo 2}])

18:08 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Argument must be an integer: >

18:09 brehaut: fail

18:09 hiredman: fnil!

18:09 brehaut: ,(filter (comp odd? (fnil :foo 0)) [{:foo 1} {:bar 2} {:foo 2}])

18:09 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Argument must be an integer: >

18:09 brehaut: oh. duh. wrong bit

18:09 hiredman: :)

18:10 brehaut: ,(filter (comp (fnil odd? 0) :foo) [{:foo 1} {:bar 2} {:foo 2}])

18:10 clojurebot: ({:foo 1})

18:10 brehaut: sorry for the muppeting

18:58 replaca: is there a way to get the output from "other" threads clojure/slime these days? I'm running a little bit older version I think, but my *out* and *err* seem to be completely disappearing. They used to appear in the *swank* window

18:59 technomancy: replaca: there's some fanciness to try to get them to rebind to the slime-repl buffer, but it may be too clever

18:59 replaca: technomancy: ahh, hmm. I'm running swank-clojure 1.4. Is that a good thing or a bad thing?

19:01 It looks like I haven't dome the marmalade thing on this machine either. Think I'll bring everything up to date and try again

19:01 technomancy: replaca: no, don't bother

19:01 1.4 is right, and the elisp hasn't changed in forever

19:01 replaca: ahh, ok

19:02 technomancy: if you set :repl-out-root false you can go back to the old behaviour

19:02 replaca: so my output is just disappearing then, eh? ok lein repl here I come :)

19:02 technomancy: oh, where do I do that?

19:02 in project.clj

19:02 ?

19:02 technomancy: yes

19:02 excellent question

19:02 it looks like ... on the command line? what the heck.

19:03 replaca: who's command line? does that mean an edit to clojure-jack-in?

19:03 technomancy: replaca: I mean it's not exposed in a reasonable way at all =\

19:04 well this foils my plan of answering one of your questions in exchange for getting one of my questions answered

19:04 replaca: technomancy: happy to do it on credit :)

19:04 technomancy: it's not even something that works via jack-in at all; it only accepts it when you do lein swank

19:05 replaca: ahh

19:05 but then I could do slime-connect, yes?

19:05 technomancy: yeah

19:05 I mean if you just want to debug it you could do it; it's just not convenient

19:05 replaca: is there a cmd-line I can use?

19:06 yeah, gotchya

19:06 I'm just trying to get some debugging output from a ring thread

19:06 technomancy: I think: lein swank 4005 localhost :repl-out-root false

19:07 replaca: so I have this: https://github.com/technomancy/lein-precate

19:07 I guess we've talked about this

19:07 how hard it would be to get defproject prettyprinted a bit more nicely

19:07 replaca: shouldn't be too hard

19:08 technomancy: the readme is full of lies as it makes it look like it already prints nicely

19:08 replaca: what do you want that it's not doing

19:08 ?

19:08 oh, it needs to print like a map

19:08 after the version

19:08 sw1nn: anyone know cljs-repl in emacs inferior-mode?

19:08 technomancy: yeah, and the artifact and version should always be on the first line

19:08 it's kind of a weird thing to want

19:09 replaca: yeah, that's easy

19:09 Should I just fork that and send you a pull?

19:09 sw1nn: I find that if I make a mistake in emacs inferior-mode, the repl hangs and i have to kill with C-c C-c. Surely there's a better way?

19:09 technomancy: replaca: I don't know; that sounds too easy =D

19:09 hiredman: VERBOTEN!

19:10 clojurebot: pull request?

19:10 clojurebot: Anyone can hack! http://images.wikia.com/pixar/images/0/0d/Http_alliedow-files-wordpress-com_2011-01_anyone-can-cook-445x355.png

19:10 replaca: technomancy: ok, I'll just define a new dispatch for you

19:10 technomancy: replaca: excellent, much appreciated

19:10 replaca: gimme a couple days

19:10 hiredman: clojurebot: pull request is <repl>VERBOTEN!

19:10 clojurebot: You don't have to tell me twice.

19:10 technomancy: replaca: are you going to the meetup tomorrow?

19:11 replaca: technomancy: yeah, are we going to do a long-distance joint meeting?

19:11 technomancy: replaca: yeah, they've got some fancy AV telepresence setup there

19:11 choffstein: Does anyone know a good service for managing virtual team dialogues around software architecture? We host on github and ideally would like a service that allows developers to subscribe to dialogue feeds and discussions about different topics for each project.

19:11 replaca: hiredman: when technomancy and I are working together pulls are ENCOURAGED :)

19:12 technomancy: that will be fun

19:12 technomancy: choffstein: pull requests are fantastic

19:12 you can do pull requests on documentation files if you're still in the brainstorming stage

19:12 choffstein: technomancy: Oh, that is interesting.

19:13 technomancy: it's the best

19:14 choffstein: that is something I definitely hadn't thought of. My only potential hole is projects that don't necessarily have code.

19:14 Seems like a waste of a github repo to just manage docs... though, maybe not?

19:14 technomancy: pull requests on org mode files =D

19:15 if you're cheap you can use a headless branch on an existing repo

19:16 choffstein: Not cheap ... just thrifty. I haven't really found something I have liked. I guess basecamp is supposed to solve this issue, right?

19:17 technomancy: we have a single "engineering docs" repo at heroku

19:20 choffstein: That might solve a lot, actually.

19:27 arohner: is there an idempotent version of lein self-install?

19:27 i.e. one that doesn't complain if the jar already exists

19:27 technomancy: arohner: no, but I'd take a patch

19:28 arohner: technomancy: any preferences on how you'd like it to work?

19:28 env var?

19:29 technomancy: arohner: actually

19:29 you shouldn't ever need to run self-install

19:29 it's smart enough to figure out when it needs to do so already

19:30 so what's your motivation here?

19:31 arohner: oh, I wasn't aware it figured things out. Just writing my pallet deploy scripts, and wanting to re-deploy while debugging

19:31 hiredman: :(

19:32 arohner: hiredman: ?

19:32 hiredman: build tools are for building things, not deploying them

19:32 arohner: hiredman: how do you suggest I run my app then?

19:33 hiredman: in my mind lein belongs on the ci server for generating artifacts (tars or jars)

19:33 arohner: java -jar some-uber.jar works or https://github.com/technomancy/lein-tar

19:34 arohner: hiredman: that seems like extra work with no benefit

19:35 hiredman: ~repeatability

19:35 clojurebot: repeatability is crucial for builds, see https://github.com/technomancy/leiningen/wiki/Repeatability

19:35 arohner: and I dislike having production be a different environment than development

19:35 hiredman: how is it different?

19:35 arohner: because I don't run java -jar some-uber.jar in development

19:35 hiredman: the point is, you build a release once, and you don't build a release everytime you deploy

19:36 technomancy: yeah, it's important to build a deployment artifact that's stored somewhere for repeatable deployment

19:36 going straight from your checkout to the remote machine means undeclared and unpushed changes can make it out into the live environment

19:37 hiredman: arohner: it depends on the app, but given the way lein generates jars you can get the same effect by doing (-main) in the right namespace

19:37 technomancy: you can still use lein to run stuff in production, but resolving dependencies during production is skating on thin ice

19:37 arohner: I'm not going straight from my local env to production

19:38 hiredman: lein-tar is what we use at sonian

19:43 replaca: technomancy: remind me the best way to install a lein plugin I'm working on? (Like one called "precate" :))

19:44 technomancy: replaca: best to symlink lein-precate/src/ to ~/.lein/plugins/lein-precate

19:45 replaca: technomancy: great. thanks!

19:56 ibdknox: I love it when people tell me I missed the point of something :p

19:57 callen: nothing like generating 10k LOC diffs with untabify first thing in the morning.

19:57 mdeboard: ibdknox: If you love it, then you missed the point

19:57 callen: eventually the heathens will learn.

19:57 amalloy: ibdknox: you're probably missing the point of that criticism

19:57 ibdknox: :D

19:57 callen: (recur (criticize (miss :point)))

19:57 mdeboard: I win the witticism race, or the racism as I call it

19:57 emezeske_: callen: hey, that's what -w is for :)

19:58 callen: emezeske_: I'm going to keep doing it until people stop using tabs.

19:58 emezeske_: callen: Hey, that's one point that we definitely agree on!

19:59 callen: I should null out the tabify function in my .emacs just to be an arse.

19:59 yeah...I think I'm going to do that.

20:06 qbg: I wonder why Clojure went with the sneaky generics throw instead of Thread.currentThread().stop(Throwable t)

20:08 hiredman: all the .stop methods are marked as deprecated

20:08 callen: not in my day it wasn't!

20:08 why in my day, we'd return error codes and handle error conditions according to faulty error code documentation.

20:09 gtrak`: write the errors to a database

20:09 callen: gtrak`: hi django_sentry

20:10 gtrak`: a self-parody?

20:10 callen: that's what it does.

20:10 gtrak`: oh, I guess it's ok if you do it deliberately, just not as a default

20:11 callen: django_sentry catches everything...

20:11 which is part of what makes it so damned useful.

20:11 gtrak`: oh nice, rich hickey applied sneaky_throws and it's done

20:11 mdeboard: was it super effective?

20:11 pandeiro: anyone used/looked at the static site generator in clojure at github.com/nakkaya/static?

20:12 callen: pandeiro: pretty old IIRC, but it probably works fine.

20:13 devn: clojure in python, wha?

20:13 cool.

20:13 pandeiro: i would love something like jekyll but not in ruby

20:14 devn: pandeiro: Utterson is a static site generator. I'm sure there are a few at this point.

20:15 pandeiro: i dont see why i wouldn't try out nakkaya's though

20:15 tylergillies: i would like something like (for [gem rubygems] (not-in-ruby gem))

20:15 devn: tylergillies: what is the desired output?

20:16 tylergillies: devn: anything and everything that makes sense ;)

20:16 devn: if rubygems is [1, 2, 3], what does (not-in-ruby gem) do?

20:16 technomancy: why not just use gems like java libraries?

20:16 pandeiro: devn: thanks for the tip on utterson; i think i will have a dig at the nakkaya one

20:17 devn: pandeiro: im sure there are more, the bestinclass blog (LauJensen's blog) is also available to look at

20:17 tylergillies: devn: its a multi-method that returns puppies when given an integer

20:18 thats the magic of ala cart polymorphism, puppies.

20:19 devn: tylergillies: im not sure i follow

20:20 tylergillies: that makes 2 of us

20:20 devn: if you have a specific question let us know

20:42 this clojure-py thing is pretty neat

20:42 im enjoying re-reading the classics ;)

20:43 mdeboard: I really don't see the point beyond interesting exercise in learning more python

20:44 devn: mdeboard: it's a slightly different perspective

20:45 mdeboard: devn: No doubt, good learning exercise but they apparently are aiming for widescale adoption

20:45 ibdknox: the problem is that the ecosystems for these different platforms basically have to start over

20:45 and that is hard

20:45 really, really hard

20:46 technomancy: clojurebot: learning a new runtime is much harder than learning a new language.

20:46 clojurebot: c'est bon!

20:46 ibdknox: tup

20:46 yup*

20:46 and that's why something like this is fighting an incredible uphill battle

20:46 it would have to be *clearly* better

20:47 and I don't see that being the case

20:47 * devn shrugs

20:47 devn: if i can write clojure everywhere, that'll be nice.

20:47 ibdknox: how does this help make that true?

20:48 because I completely agree

20:48 mdeboard: IME the roadblock to writing clojure everywhere isn't my environment, it's the other devs

20:48 technomancy: ibdknox: it could serve as an alternate quick-startup

20:48 it's going to take ages before node gets more than a tiny fraction of python's penetration

20:48 devn: ibdknox: adoption starts when other people start to notice

20:49 maybe this will make more of the python community take notice

20:49 ibdknox: technomancy: sharing scripts doesn't seem as important

20:49 but true

20:50 devn: i feel like if this happened two years ago people would have been much more "this is cool." about it

20:50 ibdknox: now it's duplicated effort

20:50 then it wouldn't have been

20:50 mdeboard: Honestly I don't know any good devs (personally, not casting aspersions here) who don't roll their eyes at "I re-wrote X in PURE PYTHON!"

20:51 ibdknox: haha

20:51 devn: then im not a good dev -- who cares? it took work and it's a love note to your favorite language.

20:51 enjoy being the pretty girl once in awhile.

20:51 mdeboard: devn: That's why I said "personally" :)

20:51 emezeske: mdeboard: I don't roll my eyes, depending on how it was written before.

20:51 technomancy: more implementations means more people whittling down the part of clojure that needs to be reimplemneted, which theoretically gets us closer to CinC?

20:52 devn: technomancy: that's sort of where im at. people are talking about llvm, clojure-py, clojurescript, and on and on. it's all in the name of progress.

20:52 mdeboard: Certain segments of the python community seem to love rewriting languages in python

20:52 devn: you say that like it's a bad thing

20:52 technomancy: right now clojurescript is the primary CinC driver, and it doesn't have eval

20:52 r4vi: i'm parts of the python community

20:52 ibdknox: technomancy: if that's true, great, but the little bit I looked into it seemed like it was just trading java craziness with python craziness

20:52 r4vi: i can relate

20:52 technomancy: so these guys are still going to have to move the ball down the field a bit

20:53 which is going to be helpful for other alternate implementations that want to have eval too

20:53 mdeboard: I think it's a great thing as a learning tool but I'm not sure what use it has in real-world use

20:53 r4vi: its mostly because python people really hate java

20:53 mdeboard: rrrrright but... what does java hate have to do with this

20:54 devn: people who wouldnt have ever read the clojure compiler might read the python clojure compiler?

20:54 mdeboard: yeah, you're right

20:54 devn: (first '(time for everything))

20:54 scriptor: hmm, I wonder if they'll try one in pypy

20:55 mdeboard: Yes they said that's their ai

20:55 aim

20:55 r4vi: mdeboard: it's all about decoupling clojure from java. the less it's related to java the better

20:55 devn: scriptor: seems to already be under consideration

20:55 mdeboard: r4vi: Sisyphean.

20:55 r4vi: CinC is the holy grail

20:56 ibdknox: eh

20:56 * devn quickly memes up monty python and CinC images

20:56 ibdknox: self-hosting is mostly just a test

20:56 devn: ibdknox: it's a sign of a certain kind of maturity though

20:56 brehaut: ibdknox: it makes developing the core more appealing too

20:57 ibdknox: brehaut: sure, but there's already too much in the core ;)

20:57 mdeboard: I'm all for writing whatever in whatever as long as you don't lose performance, expressiveness, power or flexibility for ephemeral gains

20:57 technomancy: brehaut: well

20:57 brehaut: java is hardly the primary roadblock there

20:57 scriptor: also, it'd mean no longer having to read rich's java code :)

20:57 hiredman: *shrug*

20:57 it reads just fine

20:57 technomancy: I just want other people to pave the way so when I finally get around to writing my clojure->elisp compiler it's easy.

20:57 the truth comes out

20:57 ibdknox: technomancy: :D

20:57 brehaut: lol

20:58 devn: technomancy: what's the timeline on that? 2014?

20:58 brehaut: technomancy: wouldnt it be smarter to make an elisp to clojure computer and just port the whole thing to clojure?

20:58 devn: heh

20:58 technomancy: devn: after I learn nix, factor, and datalog I guess

20:58 r4vi: if you think java isn't a problem you're underestimating the distaste people have for java. look how much mindshare clojure has gained since clojurescipt has been around

20:58 mdeboard: Step 1: Build Turing machine

20:59 technomancy: r4vi: has it really

20:59 ?

20:59 r4vi: i really think so

20:59 rlb: r4vi: to be fair, it's not just python people -- I find java to be an uphill battle in many places.

20:59 brehaut: mdeboard: step one: learn how to blow a vacuum tube

20:59 hiredman: technomancy: the easy part is done, the difficult part is just mapping clojure concepts to elisp concepts

20:59 mdeboard: r4vi: cognitive bias?

20:59 r4vi: going from my unscientificy observation of hackernews

20:59 rlb: (and it was for me too before the license change)

20:59 mdeboard: Exactly r4vi

20:59 technomancy: I see a lot more "I'm confused about clojurescript" than "see this cool thing I did in clojurescript"

20:59 devn: mdeboard: have you ever seen the video of the guy who makes vacuum tubes?

20:59 hiredman: you should just be able to plug ambroses's analyzer in to an elisp generator

20:59 * rlb wasn't interested

20:59 ibdknox: technomancy: but I do cool things!

20:59 heh

20:59 rlb: s/java/jvm/

21:00 r4vi: jvm is great btw

21:00 technomancy: ibdknox: that's basically why I avoided saying I haven't seen any =)

21:00 r4vi: that's not the problem

21:00 devn: mdeboard: http://www.youtube.com/watch?v=gl-QMuUQhVM

21:00 ibdknox: technomancy: unfortunately true :(

21:00 technomancy: hiredman: yeah... I don't know if it's possible to make it work at all with mutable strings

21:00 that may just be a bridge too far

21:01 hiredman: no, that would work fine

21:01 r4vi: it's like this. o look clojure a lisp that is awesome. o lets dig into it's interals. o fuck. ugly shitty language. close file. get eye bleach. forget you ever saw it.

21:01 mdeboard: I don't see how it's possible that "You can write Clojure for the DOM now!" is more significant than the fact it compiles down to jvm bytecode

21:02 technomancy: r4vi: if that were how it works nobody would use emacs

21:02 brehaut: lol

21:02 technomancy: hiredman: you mean just trust people not to do anything stupid?

21:02 hiredman: r4vi: if you can stand the sight of sausage being made maybe you should consider employment outside of the kitchen

21:02 brehaut: technomancy: they are already using emacs, how much trust could you place in them :P

21:03 hiredman: technomancy: well you already have to do that with elisp, so it's a net 0

21:03 r4vi: technomancy: elisp is weird but nowhere near as ugly as java

21:03 mdeboard: lol

21:03 devn: r4vi: debatable

21:03 brehaut: wow

21:03 technomancy: r4vi: elisp is implemented in crazytown C

21:03 mdeboard: subjective chat

21:03 technomancy: just like clojure is implemented in crazytown java

21:03 devn: seriously, this is a downward spiral in motion

21:03 r4vi: technomancy: i've never found c to be either ugly or weird

21:03 brehaut: devn: hi there, i see you are new to the internet

21:04 hiredman: I compiled emacs with clang the other day, holy crap that was a lot of warnings

21:04 emezeske: r4vi: Technically, if you dig into any language's internals deeply enough, you'll find something like x86_64 assemly, which is significantly uglier than Java

21:04 devn: brehaut: heh

21:05 gtrak`: r4vi, java's really not that bad, especially if you've seen C++

21:05 r4vi: gtrak`: i was just about to say that

21:05 no it isn't

21:05 java was a great language in 1999

21:05 hiredman: I wanted to make a change to the clojure runtime the other day to cache Method objects used for reflection, so I wrote some clojure code to generate java source for the caching mechanism and changed about 10 lines in the compiler and 50 in the reflector to use it

21:05 devn: java has less flexibility than C++

21:06 rlb: mdeboard: wrt significance, perhaps your brain isn't sufficiently buzzword compliant.

21:06 hiredman: the generate java source is meh, but I didn't have to write it

21:06 generated

21:06 r4vi: devn: it's lambdas all the way down.

21:06 mdeboard: rlb: Sorry, I'll rewrite my buzzword rule engine in pure python

21:06 gtrak`: devn, that's a good thing

21:06 devn: depending on who you ask

21:07 rlb: mdeboard: better use a nosql rest enging.

21:07 s/enging/engine/

21:07 mdeboard: rlb: Only if I can administer it over HTTP

21:07 ivan__: only problem with C/C++ is make files are even worse than mvn :(

21:08 well not the only problem

21:08 ;)

21:08 gtrak`: as much as I like clojure, I see the need for a blub language, and java fits the bill, I find it tolerable and I can write it tightly enough with my code-style. Joe six-pack coder will still be able to understand my code.

21:08 cgray: does clojurescript one work with lein swank? I'm getting an exception: Unable to resolve symbol: pst-elem-str

21:08 devn: gtrak`: "joe six-pack coder"

21:08 i just had an aneurism

21:08 mdeboard: Yeah, coders don't have six-packs

21:08 gtrak`: haha

21:08 * mdeboard pats his stomach

21:08 technomancy: cgray: I don't know about clojurescript, but that means you are somehow pulling in an old clj-stacktrace

21:09 cgray: technomancy: ok thanks, I'll look around for that

21:09 gtrak`: devn, maybe it's relevant how you perceive C# vs Java

21:10 I learned C# first, and I see a lot of the additions as superficial sugar

21:11 devn: so if you learn clojure first you should dislike scheme?

21:11 gtrak`: nope, clojure is less flexible with regards to mutability, therefore better :-)

21:11 * devn rolls his eyes

21:11 gtrak`: C# and java are basically the same thing

21:11 devn: this is going off the rails, man

21:12 muhoo: rails? that's ruby.

21:12 * emezeske goes off to implement Clojure in INTERCAL.

21:15 gtrak`: devn, well, I think a lisp, and C++, require more discipline than java, which depending on your coworkers might not be a worthy tradeoff, and in C++ there's really no gain in having control over memory allocation most of the time

21:16 r4vi: gtrak`: C# is far superior to Java, they used to be the same thing but then microsoft made c# sane. while sun kept java insane

21:16 they even tried adding STM to c#

21:16 gtrak`: i mean, properties are nice, and so is linq i suppose? but really, it's not so different

21:17 r4vi: have you seen the async stuff in c# 5?

21:18 gtrak`: ibdknox has

21:18 r4vi: it's really well thought out

21:20 gtrak`: i've heard about it, it seemed really complicated :-)

21:23 devn: most things i dont understand seem complicated

21:23 and then i realize they're the solution to my problem

21:24 gtrak`: looking at it now though, it doesn't seem that special

21:24 devn: gtrak`: Hearing about something does not make for understanding. I've never seen the godfather. I've heard about it. Would you say it's fair to say I know all there is to know about it?

21:25 "in this moment, where i have glanced at a brief description of said technology, i would like to put my 'dont care' stamp on it"

21:25 that's what i hear

21:25 gtrak`: devn, I understand that I might not know things, but I think I'm actually pretty careful about writing stuff off

21:26 I haven't used it in anger, if that's what it takes

21:26 devn: i mean, you're here, so you're not that much of an ass, but im just saying, it seems reductive, the way you're brushing it off

21:27 gtrak`: I'm reading through this right now: http://blogs.msdn.com/b/ericlippert/archive/2010/10/29/asynchronous-programming-in-c-5-0-part-two-whence-await.aspx

21:27 so far it just looks like sugar for a scheduler and a couple of objects

21:29 muhoo: i remember the horror when gnome went to mono. too many people could not accept the possibility that anything from msft could not suck.

21:29 devn: yeah muhoo -- it's like reactive extensions

21:29 it's great. people are so quick to judge when they hear MS.

21:30 that was me. i still have an immediate bias due to growing up on slashdot.org

21:30 what a ridiculous site that was...

21:31 gtrak`: I'm still not sure what the point of it is

21:32 maybe the example is too small

21:33 r4vi: everything is syntactic sugar on lambda calculus..... :)

21:44 mdeboard: god I have grown to love (->)

21:47 MenTaLguY: hmm, so I'm making some kind of elementary mistake with macros

21:48 I'm trying to define a macro that defines a record type

21:48 the macro seems to expand correctly and so forth

21:54 seancorfield: anyone here use MS SQL Server via JDBC? what do you do for a JDBC driver? i can't find anything appropriate on maven central but i may be looking for the wrong thing...?

21:55 xeqi: seancorfield: http://msdn.microsoft.com/en-us/sqlserver/aa937724

21:55 RickInGA: I know there is such a thing as a jdbc odbc bridge, which I have had to use for other databases

21:55 xeqi: I used that for testing JDBC-26

21:55 seancorfield: xeqi: yeah, i downloaded that... but i really need this to work via maven

21:56 so i was hoping to find it in maven central... or somewhere similar...

21:56 xeqi: ah, I never found anything for that

21:56 seancorfield: i'm trying to ensure clojure.java.jdbc supports SQL Server properly

21:57 xeqi: just search result that said to use <scope>provided</scope> w/ that

21:57 muhoo: "everything is syntactic sugar on lambda calculus" that's a great compaction of greenspun's law

21:57 seancorfield: i have it working locally but had to install that driver into my local m2 repo

21:58 i'm guessing folks are using jTDS instead... that's in maven

22:01 lnostdal: do you guys use maven 2 or maven 3 when working with clojure stuff?

22:09 seancorfield: i'm using maven 3 - but only for clojure contrib stuff - i use leiningen normally

22:10 alexbaranosky: lnostdal, that's a loaded question :) I've never used Maven

22:12 Raynes: alexbaranosky: We work with awesome. Not maven.

22:12 alexbaranosky: You should write some midje tests for refheap.

22:12 If you get bored. :D

22:12 lnostdal: yeah, i prefer lein really, but sometimes it seems there is no option than maven

22:12 besides maven*

22:13 Raynes: lnostdal: mvn dependency:tree is the only reason I have maven installed other than for the libraries required to run lein.

22:13 But, IIRC, cemerick is working on a dependency:tree alternative for lein.

22:14 mdeboard: So, I'm sure this is a total stupid question but ifI'm executing something from inside slime in emacs will it perform differently than if I were to compile a jar and execute that

22:15 Raynes: I don't think so.

22:15 SLIME shouldn't add overhead. Other than network transfer.

22:16 ibdknox: gtrak: c# is very different then JAva

22:16 Java*

22:16 in the same way that ruby is very different than Java

22:28 darevay: idbknox: in my limited C# experience (2 little projects), I agree. At first I thought "this is just java with some sugar", but the more I used it, it felt much closer to a less insane version of C++.

22:31 Raynes: darevay: Hm...

22:31 darevay: You, sir, are Dave Ray.

22:33 ibdknox: darevay: I used to be the PM for it :)

22:33 for IDE side at least

22:33 there was another guy very similar to myself who owned the compiler

22:37 darevay: Raynes: you caught me

22:37 idbknox: so I've heard. I'm glad you've come over to clojureland :)

22:38 ibdknox: me too :)

22:38 darevay: Raynes: This'll be my 30 minutes of IRC for 2012.

22:38 Raynes: We miss you

22:40 darevay: i appreciate that.

22:45 seancorfield: sometimes i hate jdbc...

22:45 TimMc: Just sometimes?

22:46 Raynes: TimMc: He likes long walks on the beach and thousands of lines of XML.

22:46 qbg: jdbc isn't so bad in Java land if you use Spring

22:51 seancorfield: qbg: it's not so bad in Clojure land if you use clojure.java.jdbc - but my problem is that i have to maintain clojure.java.jdbc :)

22:54 ok, i think i have enough tests in place to start folding in sqlite support in c.j.jdbc!

22:54 qbg: Since spring-jdbc is so functional, it would probably be easy to build on top of it. (for better and worse)

22:55 xeqi: seancorfield: hurray!

22:56 darevay: it's been real. see y'all in 2013.

22:59 technomancy: seancorfield: is that pure java or does it need native bits?

23:01 seancorfield: i'm using the org.xerial/sqlite-jdbc 3.7.2 driver...

23:01 based on a patch from nelson morris

23:02 technomancy: huh. clojars uses sqlite and requires some native shenanigans

23:02 but hopefully we'll be off it soon

23:02 xeqi: technomancy: I'm using the patch atm to build a clojars test suite

23:02 technomancy: oh, cool

23:03 xeqi: I've got a branch that works on postgres without search

23:03 xeqi: see my tests branch

23:03 but I've decided to redo my testing api

23:03 pull out a ring-test based on rack-test

23:03 I saw a few branches, picked your cleanup one to start on for now

23:04 technomancy: cool

23:04 seancorfield: ok, dinner calls... back to sqlite support later!

23:09 xeqi: technomancy: is there dev work going on for clojars? mailing-list seems kinda dead

23:09 technomancy: xeqi: I've got half a proposal written up

23:09 but it probably won't happen till after clojure/west

23:09 need to sketch out a plan for a fairly serious revamp

23:17 TimMc: technomancy: My app just uses the xerial thing + the clojure jdbc.

23:28 devn: http://img338.imageshack.us/img338/9710/rhrlj.png

23:28 ^-really important. you should probably spend a few hours studying that image.

23:30 sgarrett: Hello #clojure. I've been using clojure for a month or so now and I really like it and feel I have at least a beginners grasp of the language. I'm looking to get involved in open source. Does anyone know of any projects that would have small tasks for a beginner to help out with?

23:30 Also this would be my first experience/involvement in open source.

23:32 technomancy: devn: is that john rhys-davies?

23:32 ibdknox: my mind is blown.

23:33 humbleZ: sgarrett: ditto

23:43 amalloy: sgarrett: i think the usual advice is to find a project you use personally, and make a change you personally want. going in with just "i want to do some open source" you wind up on projects you don't really care about and don't get that great an experience

23:43 alexbaranosky: I think that's solid advice from amalloy

23:43 sgarrett: amalloy: Thanks for the tip. :)

23:44 * technomancy wonders if lein profiles would be useful for developing clojure.java.jdbc against multiple databases

23:44 alexbaranosky: github is full of projects -- find one you are into and add feature and submit a pull request

23:44 echo-area: I'm not familiar with Haskell, is side effect in Haskell similar as in Clojure?

23:47 amalloy: i don't think that question means anything, echo-area

23:47 "similar" is just too vague to be answerable

23:49 echo-area: amalloy: Ah, I'm reading /Beautiful Code/, in which I find introduction to Haskell. The side effect code there looks a bit like Ref in Clojure. So comes the question.

23:50 gf3: hola amalloy, do you think I could solicit some feedback from you? Re: pastebin + eval app: http://cljbin.herokuapp.com/paste/4f4da1a6e4b06bdb1b33f987

23:52 brehaut: echo-area: the idea of a side effect is universal

23:52 echo-area: haskell segments code into stuff that can have side effects and stuff that cant. clojure is less militant about things

23:53 muhoo: "without side-effects, all your programs would do is heat up your computer."

23:53 echo-area: brehaut: By "less militant", do you mean the existence of set!?

23:54 brehaut: echo-area: sort of

23:54 echo-area: I see

23:54 brehaut: echo-area: in clojure you avoid side effects by choice, in haskell you avoid side effects because the type checker requires you to

23:55 echo-area: you should probably be avoiding set! in clojure too ;)

23:56 echo-area: brehaut: Right, possibility means nothing that should do :)

23:56 amalloy: i don't really have anything to say. it's cute to combine pasting and evaluating, though i don't see that it's likely to be relevant very often. it looks like you're sandboxing reasonably well, and i like the minimalist UI

23:57 gf3: amalloy: cool, thank you

23:58 amalloy: and thanks for your help a while back, you gave me a better reader

Logging service provided by n01se.net