#clojure logs

2012-02-29

00:01Raynesdevn: Are you using vimclojure from the bitbucket repository?
00:01devn*nod*
00:01devnshould i use daveray's?
00:01Raynesdevn: nooooo
00:01Raynesdevn: Did you get the Haskell nrepl stuff working?
00:01devni tried \el and ,el
00:01RaynesI'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.
00:02devnRaynes: i think you're thinking of the wrong guy
00:02devnRaynes: i can take a crack at it
00:02Raynes[22:57:53] <devn> how do i eval a line in vimclojure?
00:02RaynesImplies that you've gotten it running.
00:02RaynesUnless he left the nailgun stuff in?
00:02cemerickRaynes: I think the Haskell impl is still hush? :-P
00:02devnim confused
00:02Raynescemerick: Yes, damn it, but I want to use it.
00:02cemerickhah
00:02RaynesI realllllly want to use it.
00:02devnhaskell nrepl in vimclojure?
00:03cemerickHe and Martin will have to duel over it.
00:03devnplease explain
00:03cemerickHrm? Who said anything about a haskell nrepl client?
00:03devncemerick: don't make me bust a cap
00:04Raynesdevn: We have no idea what you're talking about.
00:04RaynesYou need help.
00:04RaynesLet us help you.
00:05cemerickdevn: Look, WI boy. :-D
00:05devnhttp://lolriot.com/wp-content/uploads/2011/06/Drop-It-Like-Its-Hot.jpg
00:05devn...you're welcome...
00:05cemerickbwahah
00:06jodarohaha
00:06devnalso, "WI boy", man... I'm shocked. We're humble people.
00:06amalloyi guess that's...a reference to something? where is the pop-culture summary for the old folks here
00:07devnWe're too busy recalling our asshat governor to know All The Things(tm) about nrepl + haskell.
00:07devnamalloy: http://en.wikipedia.org/wiki/Drop_It_Like_It's_Hot
00:07devn...you're welcome...
00:07cemerickdevn: was my best reaction to the bust-a-cap thang.
00:08devncemerick: yeah, im not sure what's gotten into me. "bust a cap"
00:09cemerickdevn: it happens. Been humming a jay-z song all day.
00:09devnman, the cognitive load of using emacs for org-mode, vim for clojure, and conkeror as my browser...
00:09devnim losing it.
00:10devncemerick: haha, ive actually been listening to some jay-z lately. i kind of like that watch the throne album. avishai cohen for life, though.
00:11cemerickdevn: I've no idea what you just said. :-P
00:13devnso, uh...nrepl...haskell...
00:13amalloycemerick: he's busting a cap right now. you just don't understand his slang
00:14muhooi still predict that what rhickey will announce in a few weeks is a haskell for the jvm
00:14muhoosince it seems like haskell is one of the hottest topics amongst clojure folk :-)
00:14devni dont think that's true?
00:14jodarowait
00:15jodarois everyone switching to haskell?
00:15devnquickly, one at a time, one at a time...
00:15amalloyonly the cool kids, jodaro
00:15jodarooh ok, phew
00:15devnwe're all switching to haskell. effective immediately.
00:15devnsingle file lines, thank you.
00:15mefestoguess it's time to buy learn you a haskell for great good
00:15jodaroi've been dicking around with erlang lately
00:16devnjodaro: i dont know how to just "dick around" with erlang
00:16jodarowell
00:16jodaroreading, i suppose
00:16muhooyou don't. erlang dicks around with you.
00:16jodarois what i meant by "dicking around"
00:16jodaroand a little writing
00:16jodaroyou know, dicking around
00:16jodaroand yeah
00:16jodaroit has done its share of dicking back
00:16ungamedplayererlang can surely do that
00:17devnoh no, i know the colloquialism
00:17muhooarseing around, in UK-ish
00:17devnbut i dont find erlang to be very approachable in the "hm, id like to just toy around with this idea for a bit"
00:17devnit's this whole elaborate "thing"
00:17amalloyi'd love it if people saw rich's attempt to build up hype without actually saying anything, and responded by not speculating
00:17ungamedplayerah
00:17jodaroyeah, definitely true
00:18jodaromaybe dicking around is too light
00:18devni think it's stronger
00:18ungamedplayeri do quite a bit of erlang.
00:18devnungamedplayer: do you enjoy it?
00:18devnungamedplayer: i dont know enough to have a good opinion.
00:18devnive read some of the erlang OTP book from manning
00:18ungamedplayerdevn, Peoples expectations of it are often wrong..
00:18jodarodevn: thats what i'm reading now
00:19muhooamalloy: actually, speculation is what builds up hype
00:19ungamedplayerdevn, i do enjoy it.. especially once you get comfortable with it.
00:19devnjodaro: it's my "intro" to OTP. someone told me: "this is not a beginner's book"
00:19devni took that as a challenge
00:19jodaroand playing around with some of the tools from basho
00:19devnbut i think im paying for it a bit
00:19amalloymuhoo: yes, that's why i would love people to not do it
00:19ungamedplayerfor anyone looking into it
00:19ungamedplayerrebar == lein
00:19ungamedplayeror close enough
00:19muhooamalloy: oh i see. to thwart the hype, not to assist it. hmm, good point.
00:19jodaroyeah thats what i'm getting
00:19ungamedplayerthe hot code upgrades are very, very cool.
00:20devnamalloy: what's wrong with a little hype?
00:20ungamedplayerthe syntax can be a little off-putting for people who are new at it
00:20ungamedplayerand it can't easily be copy-paste refactored.
00:20ungamedplayerthose are my only real issues i have with it.
00:20devnungamedplayer: meh, syntax... fuck it. I kind of like toying around with APL, so let's not make syntax a "thing"
00:21amalloythere'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
00:21muhoospeakking of hip hop: http://www.youtube.com/watch?v=9vQaVIoEjOM&amp;ob=av3n
00:21muhooshowing my age there
00:21jodarodevn: i've been getting through the book ok with very little experience
00:21ungamedplayerdevn, its not a big deal once you know what to expect.
00:21jodaroi spent a little time on erlang.org and learnyousomeerlang
00:21devnamalloy: i think you're a little too attached or something. i havent seen a single tweet and i follow a ton of clojure folks.
00:21jodaroso that i wasn't completely blind going in
00:21ungamedplayeryou'll really only get caught by it once.. then.. you'll not make that mistake again.
00:22devnamalloy: also, it's just text. how do you distinguish coy from humble in text?
00:24devnmuhoo: word.
00:25jodaroactually i fell into erlang land a little bit by accident. we were evaluating cassandra, which led me to riak, which led me to erlang
00:25devnthat seems like a nice dip into the pool
01:15durreI 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?
01:16brehautdurre: full stack: no, theres webnoir.org which is the biggest library available
01:16brehautdurre: clojure web programmers prefer to assemble small collections of libraries that all work on top of the ring abstraction
01:16brehautdurre: http://news.ycombinator.com/item?id=3640760
01:18brehautdurre: you might find http://brehaut.net/blog/2011/ring_introduction useful too
01:18cemerickdurre: True what brehaut said. There are some common patterns, though.
01:19brehautyes, good point
01:20cemericke.g. compojure is quasi-standard at this point, I think. I don't see moustache around much.
01:21cemerickdurre: 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.
01:21cemerickbrehaut: how's things? :-)
01:21brehautcemerick: things are not bah thanks, you?
01:21cemerickabout the same
01:22cemericklots of things in the air
01:22brehautyeah?
01:22durrethanks guys! there are some ppl here at work raving about clojure and I wanna see what the fuzz was about :)
01:22cemerickyeah, need to get some projects parked and off the table, etc.
01:23brehautsure. ive just managed to get all the loose ends from the end of last year tidied up myself.
01:25brehautre: moustache and compojure i think you are quite right. compojure's easier learning curve definately has helped it maintain its lead
01:28ibdknoxdurre: if you're new, you might want to check out http://webnoir.org
01:28devndurre: check out korma as well
01:28brehautibdknox: ahem. sniped
01:28brehaut;)
01:28ibdknoxoh
01:28ibdknox:p
01:28ibdknoxhaha
01:29ibdknoxbrehaut: well done
01:29devnalexyk: hey
01:29alexykdevn: heyhey!
01:29cemerickbrehaut: yeah, the vocabulary is hard to beat
01:29devnalexyk: long time! no clojure conj this past year? i was disappointed!
01:29BahmanHi all!
01:29devnBahman: hey!
01:29brehautcemerick: i agree, i have been wondering if i need to reevaluate my use of moustache on my own stuff.
01:29hhutchI 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?
01:30alexykdevn: I moved to SF, had my third baby, and started Scala for Startups meetup… But did some Clojure too :)
01:30devnalexyk: congratulations
01:30brehautcemerick: i do like moustache's route spec syntax over the default of the railish magic strings clout prefers
01:30devnalexyk: mind me asking which startup?
01:30tomoj"railish" is exactly my beef :)
01:30alexykdevn: Klout
01:30cemerickyeah, that's the biggest downside, hurts a lot if there's "nonstandard" methods being used
01:31devnalexyk: cool. i have a friend who uses klout quite a bit.
01:31alexykBig Data is fun
01:31cemericke.g. COPY
01:31devnalexyk: i thought you might be doing stuff with prizmatic
01:31cemerickor, PATCH :-P
01:31alexykI am eyeing that...
01:31brehautlol :)
01:31devnalexyk: have you used it at all?
01:31alexykwe'll do lots of NLP soon
01:31alexykdevn: a bit
01:31cemerick'course, you can trivially define new HTTP verb macros. *shrug*
01:32devnalexyk: im really loving it. it's pretty crazy how good it is at finding stuff im genuinely interested in via my twitter network.
01:32devnalexyk: sorry to ask again, but i lost a hard drive and wanted to show your paper to a friend of mine recently
01:32devnthe one about bieber
01:32brehautcemerick: i meant to ask, have you done any full text search with couchdb?
01:32devnalexyk: do you have a url handy?
01:32brehautcemerick: eg couchdb-lucene i guess?
01:33cemerickbrehaut: yeah, but cloudant handles all the muck for me
01:33brehautah of course :)
01:33alexykI'll look
01:34cemerickI'm pretty much muck-free these days. The service platforms are way too advanced to not use unless you have a damn good reason.
01:34brehautcemerick: my reason is cost; im not bringing any money in from my clojure or couch projects atm so its hard to justify
01:34devnalexyk: sorry to make you bother, i just remember hearing you talk about it at the first conj with liebke and wanted to reminisce. :)
01:34brehautcemerick: otherwise id lve to be muck free
01:35alexykdevn: http://dl.dropbox.com/u/9300701/khrabrov-spie2010-twitter-communities.pdf
01:35devnnice. thanks.
01:35alexyknp :)
01:35cemerickbrehaut: heroku and cloudant both have free plans that are perfectly usable
01:36devnalexyk: going to clojure/west?
01:36cemerickdepends on your load, but if the things you're doing are hobby-level…
01:36alexykdevn: possible!
01:36brehautyeah only at a hobby level.
01:36alexykdevn: how about you?
01:36brehautheroku wasnt an option when i started out my muck though ;)
01:36cemerickbrehaut: e.g. clojurebook.com runs on heroku + cloudant
01:36devnalexyk: unfortunately (or fortunately depending on how you view it) i'm taking a couple weeks of vacation to go sit on a beach
01:36cemerickah, well
01:37cemerickno time like the present :-)
01:37brehautheh :)
01:37devni'd like to make it to clojure/west, but it's looking like it's not going to happen
01:37devni might try to make it to euroclojure, but havent made a decision yet
01:37brehautcemerick: yeah, i think i would probably gain the most benefit moving my couch muck to cloudant
01:37cemerickdevn: where's the beach?
01:37devncemerick: playa del carmen
01:38tomojdevn: prizmatic is the thing good at finding stuff?
01:38devntomoj: *nod*
01:38tomojcan you give me an extra google keyword or two to disambiguate?
01:38alexykit's prismatic too :)
01:38devnyeah i fail :)
01:38alexyktomoj: Bradford Cross :)
01:38alexykgetprismatic.com
01:38devnhttp://getprismatic.com/
01:38cemerickdevn: nice; I'll be on St. John soon. 'tis the season, eh?
01:39tomojcool
01:39brehautcemerick: is it cloudant that have their own variant of couch?
01:39tomojtoo bad I don't interact on social networks.. hmm
01:39cemerickbrehaut: they're the main sponsor of bigcouch, yeah.
01:39cemerickwhich is being merged into couch proper
01:39devncemerick: love st john, would like to go back to anguila and vanish from the grid for a bit...
01:40devnthat or ranguana caye in belize
01:40brehaut250 meg of data seems like bucket loads
01:41cemerickdevn: yeah; I'd like to get to tortola at some point
01:41cemerickorder of magnitude more expensive tho AFAICT
01:41cemerickor, 2x, whatever
01:42devncemerick: airfare or cost once you get there? is tortola french?
01:42devncemerick: the only reason i ask is because st martin has a dutch and a french side
01:43devnthe french side is 2x more expensive
01:43devn(but good wine is cheap...so there's that...and you can drink veuve cliquot like it's water)
01:44cemerickdevn: oh, yeah, it's st. martin I'm thinking of
01:44devnif 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
01:45devnorient bay is beautiful with nice french restaurants, but it's definitely expensive
01:46cemerickSounds like you've been in the vicinity on a semi-regular basis
01:46devna few times, yeah
01:46devnwish it was more than a few :)
01:47devni 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
01:48devnive never been to cuba, would like to go there
01:48cemericktravel there is normalized at this point?
01:48devnwhether it is or isnt i know you can take a puddle jumper as long as its not direct from the US
01:49cemerickah
01:49devnjust dont use traveler's checks (lol)
01:49cemerickheh
01:49devnbut yeah, i did hear something about it being okay to travel there ~a year ago
01:49cemerickcash goes far there presumably
01:50devnid 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
01:50cemericktrue
01:50devnand probably need a rubber banded wad of cash while you're in country
01:51cemerick:-)
01:51devnunless their currency is worse than the dollar
01:51devnhard to believe lately lol
01:51cemerickok, I'm crashed; later guys
01:51devncemerick: good talking. come to playa and hack with us! im taking some friends down, a friend or two from work with clojurian tendencies
01:52devn'night
02:25_ulisesmorning all
02:31TakeVIs there a "this" pointer or reference for proxies?
02:37raekTakeV: yes, the identifier "this" is implicitly available in the body of a proxy method
02:41TakeVraek: Excellent, thank you.
02:44gf3hey guys, your thoughts? http://cljbin.herokuapp.com/paste/4f4da1a6e4b06bdb1b33f987
02:44gf3I would love any kind of feedback
02:45_ulisesgf3: are you trying to split a seq at a given predicate?
02:45gf3_ulises: I meant the app
02:45_ulisesgack
02:45gf3that's just an example paste
02:45_ulises:D
02:46_ulisesI like the aesthetics :)
02:47_ulisesooh, I like the fact that it evals the code too
02:47gf3thank you
02:47_ulisesnot sure about the position of the Paste/Fork "buttons"
02:47_ulisesinitially I thought the "Fork" button meant "Fork [on github]"
02:47tomojif I close my right eye, it's great
02:47_ulisesthe visuals also don't imply they're clickable
02:48_ulisestomoi
02:48_ulisestomoj: is your right eye the pickiest of both eyes?
02:48gf3_ulises: do you think a better hover state would fix that?
02:49tomoj_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
02:49_ulisesI think "Fork paste" would make it clearer what the action will be
02:49_ulisestomoj: aha! I thought you were talking about the aesthetics here :)
02:49gf3tomoj: I'll add some media queries to try and deal with that
02:50_ulisesgf3: if they looked a bit more like buttons that'd help too
02:50tomoj'media queries' means something like detecting screen size?
02:50tomojif there were other code on the right side that was right indented, it would look sweet :)
02:51gf3tomoj: yes, I can add more padding on wider screens
02:51tomojgiving only my negative feedback, looks pretty great overall
02:52gf3tomoj: all feedback is good feedback, thank you :)
02:52tomojagreed re position of paste button, especially in my screen size
02:54_ulisesgf3: perhaps swapping the positions of the Paste/Fork button with the legend "Pasted N days ago"?
02:54gf3I'll give it a shot
02:56tomojI just realized you're actually executing the code
02:56gf3:D
02:56tomojmaybe allow a line to start with ">" to indicate that its result should be printed?
02:57tomojor just strip out the return from def somehow
03:59tsdhIs there something to disable one test namespace temporarily from lein test?
04:02raektsdh: yes, test-selectors
04:03raekcheck out the leiningen tutorial
04:04raeklein help tutorial | less
04:04raek/selectors
04:07tsdhraek: What's the v argument given to the selector fns?
04:08raektsdh: the metadata of the test var, I think
04:09tsdhraek: But that wouldn't include the namespace, right? Well, I could do string matching on :file...
04:09RaynesWow. The things one forgets when one doesn't do them for a while.
04:09RaynesSuddenly can't remember how to create a gzipped tar file.
04:09Raynesczf, I think.
04:10gf3Raynes: yessir
04:10RaynesYay
04:10gf3Raynes: cjf for bunzip2
05:03ScorchinIs it possible for a map to reference itself, e.g. {:somelist [] :func (fn [x] (self :somelist)}
05:06RaynesBEGONE, EVVVVIL ONE!
05:06Scorchin:'(
05:06raekScorchin: only with some kind of indirection
05:06RaynesI apologize. You can't expect me to be helpful at 4AM.
05:06raek(def foo {:somelist [] :func (fn [x] (#'foo :somelist)})
05:07dsantiagoDoes the def take effect in its own body?
05:07ejacksonLOL. Good morning RAYNES !
05:07raekcompiling an expression that contains (def foo ...) will cause the foo var to be interned (at compile time)
05:07RaynesGood morning Mr. Edmond sir.
05:08ejacksoni enjoyed the vigorous enthusiasm of that outburst, truly after my own heart :)
05:09raekScorchin: you can try evaling (when false (def foo 123)) in the repl. after that 'foo' should exist but be unbound
05:09raekeven though the def expression was never evaluated
05:10Scorchinraek: 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))}
05:10Scorchinbut I think that may be wrong
05:10Scorchinand perhaps I'm better off using refs
05:10Scorchinor looking at the concurrency stuff
05:11ScorchinI want to build out a function which takes a map of functions (like the above) but expose the various connection pools to it
05:11ScorchinI'm all ears if I'm doing this the wrong way :-)
05:11raekwell, clojure data structures are immutable. you can't really change them in palce
05:12Scorchinunless I use atom
05:12Scorchinwhich I want to try and not do
05:12raekScorchin: if you are making "objects" (e.g. maps of functions) you can keep the state in refs/atoms in locals
05:12Scorchinraek: I don't quite understand what you mean
05:13raek(defn make-connection-thingy [] (let [connections (atom [])] {:onconnect (fn [x] (swap! connections conj x)), :onmessage (fn [x] (println x))}))
05:14raekin this approach I didn't store the data as entries in the map
05:14raekand a "connection-thingy" is an "object" which you can communicate with by calling the functions in the map
05:14Scorchinand how would I consume the map keys?
05:15Scorchinah, yes, I see
05:15raek(def thingy (make-connection-thingy)) ((:onmessage) "hello world")
05:16raekScorchin: have you looked at "Structure and Interpretation of Computer Programs"?
05:16Scorchinraek: no
05:16raekhttp://mitpress.mit.edu/sicp/
05:17raekit is a well known (free!) book that among other things discusses how you can make objects with just functions and data
05:17raekScorchin: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-20.html#%_sec_3.1
05:18raekone 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)
05:18raekso in Clojure you add a step of indirection -- a ref or an atom usually -- that can change
05:19Scorchinraek: thanks, that's really useful!
05:20raekScorchin: this article by Stuart Halloway also discusses this: http://thinkrelevance.com/blog/2009/08/12/rifle-oriented-programming-with-clojure-2
05:20Scorchinthis is kinda like a closure in JS, right?
05:20raekyes
05:20raekyou are using closures in my example too
05:20raekthe (fn [x] (swap! connections conj x)) function closes over the "connections" local
05:22raekyou have similar choices in JavaScript: you can put "private members" both in the object fields and in a closure (local variables in the constructor)
05:25Scorchinraek: so in your example, how would I add a function :print which just prints connections to stdout?
05:25ScorchinAFAICT you'd need to quote it
05:26Scorchinto prevent the evaluation when doing (def thingy ...)
05:26raekScorchin: do you want to redisgn make-connection-thingy or be able to add this function to the object later?
05:26Scorchinraek: redesign it ideally
05:27raekquoting is not usually used to delay the execution of an expression
05:27raek(but yes, it has that effect)
05:27raekI'd suggest making a function for it
05:28raek(defn make-connection-thingy [] (let [connections (atom [])] {:onconnect (fn [x] (swap! connections conj x)), :onmessage (fn [x] (println x)), :current-connections (fn [] (deref connections))}))
05:29raek(defn print-connections [thingy] (prn ((:current-connections thingy))))
05:29raeknote that the atom is never exposed to "ousiders"
05:30Scorchinah, that's clever
05:30raekso it's impossible for other code to change the state except through the functions you provide in make-connection-thingy
05:31Scorchinwould it be possible to have another step of indirection and wrap the atom logic?
05:31Scorchine.g. using functions to hide it
05:31Scorchinso all the I would need to do is have functions like (add-to-connections x) and (get-connections)
05:31raekin SICP, they also write functions like (defn onconnect [thingy x] ((:onconnect thingy) x))
05:32raekpresumable to make the calling more pretty
05:33raekScorchin: well, I guess it depends on what the object is supposed to do
05:33Scorchinraek: I'm going to wrap some Java which is why I need the state
05:33raekfor the "get" and "change" functions you could as well use the built in 'deref' and 'swap!'
05:33Scorchinit's state that a single thread needs acces to
05:35raekyou can keep the java object in the closure
05:35raekthat way you can control exactly how it is used from clojure
05:35raekyou can use the 'locking' macro for mutual exclusion, but watch out for deadlocks
05:37Scorchinraek: technically, I wouldn't need to worry about it being consistent all the time, as long as it's eventually accurate
05:38Scorchinwhat I do need to be accurate is the adding of connections to the list
05:38Scorchinthe removal isn't such a big deal
05:38RaynesWhoa, $20/month for hostname-based SSL on Heroku? That's nuts.
05:38Scorchin(it would just throw an exception)
05:39clgvScorchin: the usage of the map with functions at the beginning of what I saw looked like you want a defrecord.
05:39raekdefrecord provides polymorphism, but not encapsulation
05:40Scorchinclgv: looking up the docs now
05:40clgvraeK: ah thats a requirement in this case as well?
05:40Scorchinclgv: yes, it is sadly :/
05:40raekdunno :) I assumed Scorchin needed to keep track of stuff that changes over time
05:41raekin Clojure you usually don't encapsulate immutable data
05:42Scorchinhow 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
05:42clgvScorchin: maybe you should write the encapsulation in java and use the "better" interface in clojure then.
05:43raekScorchin: one simple approach is to not use encapsulation at all: (defn make-connection-thingy (atom {:connections []}))
05:43raek(defn onconnect [thingy x] (swap! thingy update-in [:connections] conj x))
05:44raek(defn current-connections [thingy] (:connections @thingy))
05:45Scorchinraek: that's an option
05:45Scorchinactually, that's rather nice
05:45raekthis might be a simpler starting point if there isn't a very strict way you have to change the state in
05:47Scorchinraek: then technically, I could still have a map, but take the atom as the first argument
05:47Scorchingenius!
05:47Scorchinthat's very cool
05:47Scorchin*take the atom as the first argument for each of the functions like :onmessage
05:48raekif you only have one implementation of the methods, you could keep them as global functions instead of keeping them in a map
05:49raekit depends on whether you need polymorphism or not, I guess
05:49Scorchinraek: but what if I want to pass it to a function to consume the functions?
05:49clgvraek: yeah that function in map thingy looks like doing OOP in C ;)
05:49Scorchinraek: I don't _think_ I need polymorphism
05:49raekScorchin: sure
05:50raekanyway, gotta go for lunch.
05:50raekScorchin: good luck!
05:50Scorchinraek: thank you for all of your help! much appreciated!
05:50Scorchinclgv: likewise
06:21Kototamahi, 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?
06:27jaleyis 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.
06:29lucianjaley: (def (comp first filter)) :)
06:29lucianuh, (def find-first
06:30jaleylucian: fair enough :-)
06:32Kototamai find it lacking too
06:33jaleywhat happened to seq-utils? the contrib migration guide has some holes in it :/
06:46ljosDoes clojure have a print-function that also returns the object it was supposed to print instead of just nil?
06:49ljoslike CL's print.
07:03dan_bfleet 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?
07:04ejacksonnever heard of fleet, love enlive.
07:06ejacksondan_b: how was the dojo ?
07:06dan_breally good
07:06ejacksonglad to hear that
07:07dan_bshow & 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
07:08dan_byes ok, I could just read code on the net, but having the author there in person is faster :-)
07:08ejacksonquite right
07:09ejacksonits always fun to see somebody completely own a problem
07:09ejacksonstimulating
07:10Scorchinare you guys referring the London Clojure Dojo?
07:10dan_byep
07:11ScorchinI'm one of the co-organisers, just wondering if you had any feedback on things you think we could improve upon?
07:12dan_bcan'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
07:13dan_bbut that's a really minor point
07:13ScorchinI was greeting people as they arrived to make sure we had near 100% coverage of name tags
07:13Scorchinand shepherding folks towards the food/drink
07:14dan_bah. that would actually be my own fault for arriving late then
07:16dan_bno complaints at all, in that case :-)
07:17Scorchindan_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
07:17Scorchinwe're always happy to meet folks, but it's more about the attendees meeting each other too :)
07:21sw1nnScorchin: what was the theme at ldn clj dojo last night? I saw some code for boggle on the mailing list, did everyone try that?
07:21Scorchinsw1nn: yup, boggle was the challenge
07:22sw1nngreat. Unfortunately these dojo's always seem to clash for me :-(
07:22Scorchinsw1nn: what events do they clash with? from what we understand, it's usually XTC that we're up against
07:22sw1nnLOL - they clash with my wife's diary - means I have to babysit
07:23Scorchinnothing I can do about that I'm afraid :/
07:23dan_bhehe. that can be pretty non-negotoiable yes
07:24dan_bdamn. Must Stop Putting Useful Stuff In *scratch*
07:25sw1nni have got a pass to talk about clojurescript next week tho!
07:25dan_bor at least, must remember to save it somewhere when I restart
07:35ejacksonany workaround for specifying a message with :pre and :post conditions ?
07:44ejacksonmeh, time to fire up some logging
07:45xkbhi
07:45xkbI want to define the leaves of my Parsatron parser as regexes. How do I do that?
07:45xkbI tried token
07:46xkbbut that fails, and I dont want to write out the regex in terms of char/digit and the like
07:46xkbany tips?
07:47ejackson(def my-reges "#.*")
07:47ejacksonshould be on object of type regex ?
07:48xkbmove out the # to make it a regex
07:48xkb#".*"
07:49ejacksonyeah, typo, sorry
07:49ejacksonbut that is a thingy of type regex that you can put an the leaves of a tree
07:50xkbahh like so
08:03xkbI now use something like so: (defparser property [] (either literal placeholder))
08:04xkbwhere literal is a regex defined as (defn literal [] (token #(re-matches #.....)))
08:04xkbbut that gives me wrong nr of args on literal
08:05xkbeven if I wrap it in defparser
08:07xkbtoken expects a function right?
09:34broquaintIs it possible to have noir (or its underlying layers) reload when a source file changes?
09:50amrobroquaint: it should already reload any files you change
09:59sw1nnHi, I'm looking at clojurescript one. Pretty cool.
09:59sw1nnAre there a standard set of emacs key bindings for interacting with inferior-lisp for cljs-repl
10:00sw1nnI have it all working, but I need to M-x lisp-eval-last-sexp
10:00sw1nnto send forms to cljs repl
10:00sw1nnI suspect others have been through this?
10:01sw1nnI vaguely recall seeing a suggested set of bindings to work with slime and inferior-lisp in the same emacs?
10:05jaleyis data.xml the "right" way to process huge xml files?
10:08osa1I'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:09ejacksonsw1nn: have you tried C-x e ?
10:09ejacksonjaley: I believe so, for creating them enlive can be useful
10:09jamiidoes anyone know how to persuade emacs to indent core.match nicely?
10:10sw1nnejackson: yeah, that sends to slime repl
10:10sw1nnI'd like to have bindings to send to either 'clj/slime' repl or 'cljs/inferior-lisp' repl
10:11ejacksonoh sorry, I'm out of date here, I did have this working to the browser at some point
10:11ejacksonbrowser-repl or somesuch
10:11sw1nnhttps://github.com/brentonashworth/one/wiki/Emacs is on the right path
10:11sw1nnbut is out of date I think.
10:11ejacksonala: http://vimeo.com/29535884 but i think things have moved on
10:11ejacksonsince I last played with cljs
10:12sw1nnok, thanks, I'll watch the video
10:15ejacksonsw1nn: i'd also have a look around in clojurescipt one, i'm sure there'll be something useful in there
10:24clgvosa1: you can have a look at the counterclockwise project, they use clojure to develop the clojure plugin for eclipse ;)
10:31raekhrm, osa1 left
11:04UserinosHello! 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:06nickmbaileyyou should be in the folder that was created when you unpacked the zip file
11:07nickmbaileythe folder that has the clojure jar in it
11:09broquaintAha, thanks, amro :)
11:15UserinosSo, 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:23TimMcUserinos: If you just want to get a quick REPL: java -jar clojure.jar
11:23TimMcBut I recommend using Leiningen, really.
11:31UserinosThank you! Will try to get to know Leiningen
11:32lucianit's really simple. much like virtualenv+pip in python or rvm+gem in ruby
12:20alexbaranoskywhat 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:21alexbaranoskymy first thought was to use add-watch for this, but rebinding doesn't trigger the watch as per the docs
12:24TimMcalexbaranosky: validators?
12:24TimMcI think vars have those...
12:26alexbaranoskyTimMc, nice, I forgot all about those
12:34alexbaranoskyTimMc, hmmm, it doesn't exactly give the most helpful error message though
12:34TimMcHah, I bet.
12:35TimMcWhat does it do?
12:35alexbaranoskyit seems to ignore he exception I throw and instead just says: java.lang.IllegalStateException: Invalid reference state (NO_SOURCE_FILE:0)
12:35TimMcOuch.
12:35alexbaranoskyso 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:59TimMcalexbaranosky: I don't know, man... if it doesn't take the exception message, I don't know what it would take.
12:59TimMcFile a Jira ticket?
12:59alexbaranoskyTimMc, there might be a way around it at least
13:03TimMcalexbaranosky: Try throwing a RuntimeException instead.
13:03TimMchttps://github.com/clojure/clojure/blob/1.3.x/src/jvm/clojure/lang/ARef.java#L29
13:04alexbaranoskyTimMC, nice that did it
13:07TimMcSweet. Commented to that effect on ClojureDocs
13:08alexbaranoskyTimMc, great idea putting it on ClojureDocs. I've never contributed to ClojureDocs but will now that I recall that I can
13:08alexbaranoskyIt's a little funky that only RuntimeExceptions work that way
13:08alexbaranoskymaybe there's a some good reasoning behind it though
13:15semperosusing 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:15semperosany generic leiningen wisdom I'm missing?
13:15semperosthe new tasks that lein-newnew provides are available (e.g., `lein templates`)
13:15semperos*the unique tasks
13:16technomancysemperos: yeah... that's a known bug; needs a new release of lein-newnew to fix it
13:17semperostechnomancy: thanks
13:19semperosweird that lein-newnew's master branch's project.clj shows version as 0.2.1, but latest Clojars release is 0.2.2...
13:19choffsteinHey 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:19semperoschoffstein: what does your import form look like?
13:20semperos(just paste up your whole ns somewhere)
13:20choffsteinhttps://gist.github.com/1943274
13:21choffsteinAnd I get: ClassNotFoundException: com.newfoundresearch.ttm09.state.volatility-state.VolatilityState, where the VolatilityState defrecord is in com.newfoundresearch.ttm09.state.volatility-state
13:25raekchoffstein: you need to have _ instead of - in the import clauses since you acces the classes through java interop
13:26choffsteinraek: Ohhh, yeah. Jaysus. Thanks.
13:29xkbhi
13:29xkbany Parsatron users here?
13:31hiredmancemerick_: are you using 1.3 or 1.4 in production?
13:34cemerick_1.3
13:34hiredmanhow are you dealing with the runtime exception wrapping?
13:35hiredmanor do you not do a lot of interop, so it's not an issue?
13:35cemerick_I'm not impacted by 855, really, though I can see its importance.
13:35cemerick_I think I commented on that ML thread.
13:36cemerick_I think I'm going to feel the pain in ccw and pomegranate before I see it in my "real work".
13:36cemerick_viz. Laurent's recent msg.
13:37cemerick_eh, I'm also contemplating writing some ring middleware for spring-security, so it'll definitely come up tehre
13:37cemerick_there*
13:48cemerickSpeaking of, what are people using for authentication these days?
13:49cemerickMaybe sandbar for form-based, wire up clj-oauth for oauth, etc?
13:50hiredmanI wonder why rich is being completely silent about 855
13:50RaynesI wish people stop using oauth.
13:51cemerickalong with twitter and FB, I guess?
13:51Raynescemerick: The cool kids use BrowserID for website authentication. They use anything in the world except oauth for that kind of authentication.
13:52Raynes;)
13:53cemerickI think refheap is the only thing I've seen that uses BrowserID. You are, indeed, cool. ;-)
13:53cemerickI never read much about it. I retain the impression that it's essentially OpenID.
13:53Raynescemerick: Well, I kinda hopped on that bus about a month in.
13:53mdeboardYeah I really like refheap Raynes
13:53hiredman(openid is dumb and I hate it)
13:54RaynesThere's a reasonable fellow.
13:54LajlaI worship His Divine Shadow.
13:54Raynescemerick: http://identity.mozilla.com/post/7669886219/how-browserid-differs-from-openid
13:55cemerick*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:55RaynesMy 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:56cemerickRaynes: those distinctions seem largely irrelevant. *shrug*
13:57RaynesAlso, 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:57RaynesI guess irrelevant if you don't like simplicity and your users. *shrug*
13:58Raynesmdeboard: Why, thank you kind sir.
13:59cemerickRaynes: 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:59callenI don't think I've spoken with anyone sane that likes oauth.
13:59RaynesNo, they are definitely user-significant. The first bullet point is all about users.
14:00mdeboardcallen: Twitter loves it!
14:00callenmdeboard: because they're the height of practicality and grounded-ness.
14:00callenmdeboard: profits-what?
14:01mdeboard:D
14:01RaynesAnd 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:01tmciverAs someone new to web dev, is old-fashioned http authentication dead? Where the browser prompts you for credentials with it's own dialog?
14:01callentmciver: no
14:02Raynestmciver: No, but I wish it were.
14:02tmciverIs there a RESTful way to implement that (i.e. no cookies)?
14:02cemericktmciver: HTTP basic over SSL is very popular for API authentication
14:02tmcivercemerick: how about a browser-only web app?
14:02cemerickRaynes: The login-with-Google openid flow is identical to the BrowserId flow.
14:02Raynescemerick: 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:02callentmciver: nothing wrong with stashing the session in a cookie.
14:03mdeboardtmciver: nginx's basic http auth is pretty straightforward
14:03mdeboardit is near to my understanding
14:03tmcivercallen: correct me if I'm wrong, but I believe I've read somewhere that cookies are inherently unRESTful.
14:03cemerickRaynes: Sure, just making sure I wasn't missing anything.
14:03cemerickGotta go where the users are, anyway.
14:03callentmciver: I'm saying it doesn't matter. 80/20, win the battles that matter.
14:03callentmciver: like making certain a GET doesn't modify data.
14:04callentmciver: just getting people to stop generating HTML/CSS that's only valid for IE6 would be pretty sweet.
14:04tmcivercallen: agreed.
14:04cemericktmciver: yes, Basic for webapp stuff is dead. I only run into it when attempting to access e.g. naively-secured svn repos.
14:04tmcivercallen: in such a scenario does one create a 'login' resource that tells the browser to store sessionID in a cookie?
14:04RaynesIn 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:04callennota bene: people *are* still using those page editors/generators that only work for IE6.
14:04RaynesThat's my $0.2 cents.
14:04callenjust a reminder to you all that the hoi polloi still exist
14:05mdeboard(clojure.set/difference #{1 2 3 4 5} #{4 5 6 7})
14:05callenand still need dragged kicking and screaming into this century.
14:05mdeboard&(clojure.set/difference #{1 2 3 4 5} #{4 5 6 7})
14:05lazybot⇒ #{1 2 3}
14:05tmciverRaynes: 20 cents! Thanks!
14:05Raynestmciver: I was wondering if anyone would catch that. ;)
14:06callenunless you're verizon and misunderstand the concept of units.
14:06callenthat is, cents and dollars equaling the same amount of money.
14:06tmcivercallen: I'm guessing the error was in their favor.
14:07callenoh indeed.
14:07callen100x in their favor.
14:07callenthe fucking fools said coefficient CENTS and decided to bill coefficient DOLLARS
14:07callenRaynes: YOU RUINED MY GLORIOUS ONE-LINER!
14:07callenRaynes: ;_;
14:07Raynesdoh
14:07callenRaynes: I keed I keed. I make my one-liners in slime.
14:08callenglorious wonderland slime.
14:08RaynesI make mine on paper.
14:08callenmath nerd.
14:08Raynescemerick doesn't make one liners without logging in with Google first.
14:08Raynesand TimMc does his over SSL.
14:08technomancyif browsers had made HTTP auth stylable (and supported logout) it would have solved so many problems =\
14:09tmcivertechnomancy: is there any hope of that happening do you think?
14:09technomancytmciver: not in a way that works for muggles
14:09tmcivermy naive web-developer mind would love that solution.
14:10callenI 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:10callenso we had to let them generate session tokens and pass them in the get args.
14:10callenpretty special.
14:11tmciverI thought I read somewhere that some browsers support that kind of logout feature with a 'logout@mydomain.com' URL.
14:11tmciveror something like that.
14:12RickInGAI love tweets that end "and they are hiring clojure devs". Or I will love them once I learn Clojure
14:17tmciverMethod 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:24RickInGAthe logic programming videos from the conj 2011 use a type checker as a sample program. What is a type checker?
14:27kitiaIs there a limit on how large the output can be when using clojure.java.shell/sh?
14:29dnolenRickInGA: a program that verifies that the types expressed by a particular program make sense
14:32RickInGAdnolen: is that something that you would use to optimize code you have written?
14:32dnolenRickInGA: types can be used to generate optimized code, but the main idea is verifying that a program is correct
14:34RickInGAdnolen: is that something that only makes sense in a dynamicly typed language?
14:34dnolenRickInGA: 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:35RickInGAdnolen: I meant can you only look at whether a type makes sense to verify correctness if you use a dynamically typed language
14:36RickInGAthough I suppose with type inferencing in scala or f# it could be informative too
14:36dnolenRickInGA: type inferencing is mostly about usability - you don't have to clutter your program w/ redundant information
14:37RickInGAdnolen: if I read the reasoned schemer, would I have a better understanding of this?
14:39dnolenRickInGA: yes, The Reasoned Schemer is a goldmine for understanding how type checkers / inferencers work w/ hardly any code.
14:40RickInGAdnolen: cool, thanks for the guidance
14:43fmwEnlive 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:43fmwI've got my code online, if it helps.
14:44fmwand 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:45jimdueya type checker similar in quality to core.logic would be a huge addition to clojure. IMHO
14:47bhenryi 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:47jkkramerfmw: 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:48dnolenjimduey: agree, though a Clojure type checker worth using would probably have to understand the type system of the particular host - JVM, CLR, JS.
14:48dnolenextensible type checker anyone? :)
14:48fmwjkkramer: how do you mean?
14:48fmwjkkramer: i.e. how does throwing in clj-http solve the character encoding issue??
14:48lazybotfmw: Uh, no. Why would you even ask?
14:49fmwoops, double question marks :)
14:50gf3Hey guys, can I get your thoughts/feedback on my app? http://cljbin.herokuapp.com/paste/4f4da1a6e4b06bdb1b33f987
14:52jkkramerfmw: libs like clj-http can better handle http requests and decoding response bodies using the right charset
14:53fmwjkkramer: 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:54jkkramerfmw: going by what the issue you linked to is using -- (enlive-html/html-resource (java.net.URL. url))
14:54fmwjkkramer: ah, my bad. I'm parsing from my local file system, not from URI's
14:54fmwshould have made that clear from the start
14:55jkkramerok. don't have much experience there
14:55fmwjkkramer: thanks for your input, though!
14:56jkkramerfmw: 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:56fmwjkkramer: yes, I checked in firebug
14:56jkkramerk
14:56jkkramerthat's all i got
14:57fmwjkkramer: ok, thanks!
14:59Apage43gf3: I got slightly confused by the UI for a bit
14:59gf3Apage43: uh oh, what happened?
15:00Apage43After I clicked fork I was poking at the part of the screen I coudn't edit it
15:01Apage43then I figured it out.. but then poked around a bit looking for the button to run my changed version
15:03RickInGAarg... 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:04gf3Apage43: cool, thanks
15:07RickInGAgf3: your app = cljbin or the code that is pasted there?
15:07gf3RickInGA: cljbin
15:07RickInGAoh cool
15:07RickInGAI am still trying to make sure I understand how break-on works :)
15:08gf3:)
15:14clj_newbHi, 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:16RickInGAdnolen: Okasaki = Purely functional Data Strutures?
15:16dnolenRickInGA: yes
15:16fmwjkkramer: it turns out I forgot to capitalize my Content-Type header!
15:17RickInGAsome days I am excited by and otherdays I am overwhelmed by how much I have to learn
15:19TimMcbrehaut: "Hi! It looks like you're tring to send an HTTP response." - Clippy
15:19brehautTimMc: haha
15:19mdeboardlol
15:19hiredmanbrehaut: https://bitbucket.org/justin/webmachine/wiki/BigHTTPGraph
15:20brehauthiredman: wow thats fantastic
15:21hiredmanit is kind of pretty
15:21tmciverbrehaut: and Clothesline (https://github.com/banjiewen/Clothesline) is a Clojure implementation.
15:21tcrawleycemerick: 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:21brehauttmciver: yeah i think ive looked at clothesline before, but i dont recall ever seeing this graph
15:21tcrawleythe diff is: https://gist.github.com/1944096
15:23cemericktcrawley: you mean, 0.0.0.0 vs. some particular IP?
15:24tcrawleycemerick: correct - by default ServerSocket will bind to all interfaces
15:24cemericktcrawley: it's a contrib project, so an issue here please: http://dev.clojure.org/jira/browse/NREPL
15:24bhenryhow can i get the requested url with noir?
15:24tcrawleycemerick: sure thing
15:26brehautbhenry: :uri in the request map (https://github.com/mmcgrana/ring/blob/master/SPEC)
15:26bhenrybrehaut: it's too abstracted for me. i don't see where the request map is. example code to come...
15:27brehautyou kids and your new fangles abstractions
15:28xkbHow 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:28brehautbhenry: i believe you call noir.request/ring-request
15:29bhenryhttps://gist.github.com/eeb13a3b34ade3739428
15:30bhenryoh. so ring-request will work inside of there?
15:30brehautbhenry: according to the docs yeah, and ibdknox is pretty good about his docs so i trust them
15:30bhenrycooooooool. thanks.
15:31ibdknoxbrehaut: my docs are actually all lies. Well crafted lies, but lies nonetheless ;)
15:31brehautibdknox: its the clojure.org way
15:31ibdknoxindeed
15:32amalloythe clojure.org way is truths, but about versions that don't matter
15:32brehautsniped by amalloy
15:32mdeboardSo 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:33mdeboardI'm apparently using the wrong special form?
15:33brehautbhenry: 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:34brehautalthough i dont know if the ring spec has been updated to reflect that yet
15:35bhenrythis used to be easy. i need to get up to speed with all ibdknox's new ways. derp.
15:35ibdknoxif the new ways aren't as easy, that's a bad thing
15:35replacaQ: anyone here know how to et in touch with Arthur Ulfeldt? I want to coordinate with him about tomorrow's SF clojure meeting
15:36mdeboard(println)'ing the same as I pasted above works just fine, but emitting it as xml doesn't work.
15:36bhenryibdknox: i think it's just that they are so different. i used to use moustache.
15:36ibdknoxoh
15:36ibdknoxbhenry: yeah, that is a fairly different context
15:38amalloyreplaca: he's pretty active on stackoverflow last time i checked; i'd look there to see what he has listed as contact info
15:39LukeHey 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:39gtrak`moustache is too unreadable for me right now, I have to use it by trial and error
15:39Lukeso i'd like to do (scatter-plot :x-data :y-data) where the dashes are spaces
15:40scottjLuke: try strings? "x data"
15:40brehautpoor moustache, it gets no love
15:40kotarakRaynes: 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:40Lukescottj: "unable to resolve strings?"
15:41ejacksonLuke: i'd preprocess the data to get rid of the spaces.
15:41Lukeejackson: they aren't actually spaces. they're dashes in the csv file
15:41replacaamalloy: thanks. Found it!
15:41Lukeincantor is reading it in as spaces though =/
15:41ejacksonin the column names ?
15:41kotarakRaynes: I will give it priority. I promise.
15:41Lukeejackson: yes
15:41ejacksonfreaky... 1
15:42ibdknoxkotarak: I'm really excited about it :) I think it'll make working with the CLJS repl much easier to implement
15:42ibdknoxthough I had an idea earlier that would potentially make that a moot point
15:43ejacksonLuke: I'm runnig 1.3.0 and don't observe that behaviour... upgrade ?
15:43Lukeejackson: actually it looks like it's actually in my csv that way
15:43Lukeis there a reason it shouldn't handle spaces in column names?
15:43Lukeit seems realistic to have that
15:43kotarakibdknox: 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:44ejacksonLuke: patches welcome :)
15:44hiredmanejackson: that's not true, clojure.data.csv is part of contrib, so your patches are welcome to sit in jira
15:44amalloyLuke: 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:45Rayneskotarak: Eh?
15:45hiredmanI imagine the library tries to turn column headers into keywords
15:45Rayneskotarak: Oh, you must have heard me bitching about lack of hs nrepl client docs.
15:45Rayneskotarak: Rest assured, it's only because I'm excited. ;)
15:45ibdknoxkotarak: yeah, don't pay any attention to him. He gets antsy :p
15:45kotarak;)
15:45Lukeamalloy: 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:46RaynesIt's true, I get antsy.
15:46amalloy&(keyword "this is a string")
15:46lazybot⇒ :this is a string
15:46kotarakRaynes: well, the current state was the minimum example of a non-complaining compiler run. It certainly needs polishing.
15:46Lukenice - thanks
15:46ejacksonLuke: if you want to slice a dataset by colnames with space you can use ($ (keyword "col with spaces") dataset)...
15:46Lukeejackson: yeah amalloy just mentoined that =) thanks
15:47Lukei'm new to clojure btw
15:47ejacksonLuke: no sweat dude, keep at it.
15:48Lukethanks a lot
15:48gtrak`how do you get the class object of a class?
15:49TimMcgtrak`: Beyond ##(class 5) ?
15:49lazybot⇒ java.lang.Long
15:49amalloy,String
15:49clojurebotjava.lang.String
15:49amalloyclojurebot: ping?
15:49clojurebotPONG!
15:49hiredmanyou'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:50amalloyyeah, generating keywords from arbitrary strings is sad
15:50hiredmanit is
15:50gtrak`I'm trying to do do X.class.getCanonicalName()
15:50TimMcamalloy: How about for a constrained set, like table names in a DB?
15:50samaaronis anyone else seeing weird behaviour with clojars?
15:50TimMcgtrak`: (.getCanonicalName (class X))
15:50samaaronit's telling me all my poms are invalid
15:51hiredmanyou 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:51gtrak`(.getCanonicalName (class Integer))
15:51gtrak`,(.getCanonicalName (class Integer))
15:51clojurebot"java.lang.Class"
15:51TimMcgtrak`: oh, (.getCanonicalName X) if X is the class
15:51gtrak`TimMc: of course I tried that :-)
15:52kotarakIs there some magic which tells me about boxing, similar to *warn-on-reflection*?
15:52TimMcgtrak`: Are you sure you want canonical name, and not name?
15:52ejacksonhiredman: seems like the stuff should pass through something like inflections first
15:52gtrak`TimMc, either, but if I should be able to get both?
15:52amalloykotarak: that would be nice, wouldn't it. i hadn't thought of that
15:52hiredmaninflections?
15:53ejacksonits a lib that does renaming on keyword/strings Rails style
15:53TimMc&(.getCanonicalName (class (int-array 0))) ; gtrak`
15:53lazybot⇒ "int[]"
15:53TimMc&(.getName (class (int-array 0))) ; gtrak`
15:53lazybot⇒ "[I"
15:53gtrak`amalloy, ah, is (class Integer) returning a generic-erased class-Object?
15:53TimMcgtrak`: Nothing to do with generics.
15:53amalloyerrr
15:54hiredmanejackson: ugh
15:54TimMcgtrak`: Integer returns the Integer class
15:54amalloyit's returning the class of the Integer class. which is Class
15:54ejackson:)
15:54hiredmanno, 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:55gtrak`TimMc: obviously I can do (class of an object of that class
15:55TimMcgtrak`: ##(take 5 (iterate class 42))
15:55lazybot⇒ (42 java.lang.Long java.lang.Class java.lang.Class java.lang.Class)
15:55gtrak`but is there a way to get it statically?
15:56TimMcgtrak`: .........
15:56gtrak`what am I missing, sorry?
15:56TimMc&Integer
15:56lazybot⇒ java.lang.Integer
15:57TimMc^ that is an instance of java.lang.Class
15:57gtrak`,(.getName Integer)
15:57clojurebot"java.lang.Integer"
15:57gtrak`oh
15:58gtrak`godammit :-)
16:03svs`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:04hiredmansvs`: you need to tell it what version to install
16:04hiredmanand git deps are horrible, please don't use them
16:06svs`hiredman: thanks. so what would one use to install directly from a git repo? do it manually?
16:06hiredmandon't
16:07hiredmanthe majority of clojure projects use leinigen and should be available as a jar from clojars or some other maven repo
16:07TimMcsvs`: You really want to depend on built artifacts.
16:07TimMc~repeatability
16:07clojurebotrepeatability is crucial for builds, see https://github.com/technomancy/leiningen/wiki/Repeatability
16:07technomancysvs`: you can read about "checkout dependencies" in the readme, but they are supplementary to real dependencies
16:07hiredmanif not you can us lein to install it into you local ~/.m2
16:07technomancyI 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:08svs`i'm coming from rubyland myself and I love that convenience, but I can see what the tradeoffs are.
16:09svs`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:10TimMcsvs`: You can also use the s3 private wagon thingy.
16:10svs`won't git commit SHAs solve the repeatability problem as predictably as version numbers?
16:11ibdknox`fogus: that pretty-lisp thing is incredibly difficult for me to parse. Do you actually like it?
16:11TimMcsvs`: Only if you use specific commit IDs and not HEAD.
16:11TimMcI've never played with that plugin, so I assume both are options.
16:12technomancysvs`: yes, but transitivity is going to be a mess
16:12svs`technomancy: i.e. the dependencies of dependencies?
16:12technomancyyeah
16:13technomancythat's why checkout deps are supplementary
16:13hiredmanibdknox: it might be better if it kept the parens
16:14teRaynes: is there a reasonable ido-find-file for vim?
16:14ibdknoxhiredman: maybe, I still think that level of space and lines causes a lot of visual distraction/confusion
16:15ibdknoxhiredman: 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:15Rayneste: It's kind of complicated.
16:15Rayneste: Nothing exactly like it, but wildmenu does something similar.
16:15ibdknoxhiredman: I tried pitching some ideas around this kind of stuff in VS heh, the responses were interesting
16:15Rayneste: 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:16svs`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:16ibdknoxRaynes: te: command-t works fairly well too
16:17technomancysvs`: it would be easy to automate the creation of checkout dependencies, yeah
16:17Raynesibdknox: ctrlp is better than command-t
16:17hiredmanibdknox: I would generally agree with that, I jsut think it would be easier to read if it had the parens
16:17ibdknoxhiredman: yeah, it probably would
16:17ibdknoxRaynes: oh? how so?
16:18TimMcibdknox: What is pretty-lisp?
16:18TimMcA quick web search didn't help.
16:18tcrawleytechnomancy: a swank-clojure question for you: is there currently a way to shutdown an embedded swank-server w/o exiting the jvm?
16:18brehautTimMc: http://news.ycombinator.com/item?id=3649518
16:18technomancytcrawley: probably; not sure
16:19TimMcYikes, what a waste of space.
16:19aperiodici found that really, really hard to read
16:20aperiodicthere were all those meaningless horizontal lines in the way
16:20TimMcand vertical lines that I can't track
16:20aperiodicand baselines changing all over the place
16:20teRaynes: the whole file system thing is what is annoying me about CtrlP
16:20svs`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:20ibdknoxI had some much more interesting mockups for VS that integrated parts of structural editing, but didn't actually create a structured editor
16:20teI'm using CtrlP -- it seems nice, but it's driving me insane to not be able to type ~/foo
16:21TimMctechnomancy: Hey, wasn't what's-his-face gonna make a checkout-deps-creator plugin?
16:21dnolenwhoa sneaky throw landed in master
16:21amalloywow
16:21tcrawleytechnomancy: 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:22technomancysvs`: "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:22technomancytcrawley: sorry, I don't know anything about the internals of swank =\
16:22technomancyTimMc: that's right; gtrak`` said he might take a swing at it
16:22tcrawleytechnomancy: okie doke, thanks. I'll dig deeper
16:23ibdknoxgosh technomancy what *do* you know? ;)
16:23technomancyibdknox: apparently not when to keep my mouth shut?
16:23ibdknoxhaha
16:24ibdknoxI hear we're going to try to video conference with you seajure folk on thursday
16:24technomancysvs`: 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:24technomancyjust be sure it's published before you ask others to rely on it
16:24technomancyibdknox: yeah, should be fun
16:26svs`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:26technomancysvs`: yeah, unfortunately I've tried to get a deprecation warning up on elpa, but the maintainer is unresponsive
16:26technomancybut al the official docs should be updated to point to marmalade hopefully
16:26kotarak,Long/MAX_VALUE
16:26clojurebot9223372036854775807
16:26gtrak`technomancy: are you guys happening to meet the week after clojure/west perchance?
16:27technomancygtrak`: no, just the first thursday of each month
16:28gtrak`oh ok, I was hoping, since I'll be visiting seattle that week
16:28svs`technomancy: the README on clojure-mode is misleading. I'll send you a pull request with a fix.
16:29technomancyok
16:30gtrak`technomancy: are there any fun programming-related things going on that week?
16:30technomancygtrak`: check out seattle beer&&code; I think they meet every week
16:30technomancyor maybe every other?
16:30gtrak`awesome, thanks
16:31ibdknoxyou know, if instead of clojurescript we had done clj -> llvm we could've just used emscripten to get cljs
16:32gtrak`is clj -> llvm ever going to happen?
16:32ibdknoxif someone cared enough, sure
16:32ibdknoxthere's no reason it *can't* happen
16:32ibdknoxit's just work
16:32gtrak`I've targetted lua to llvm for a class :-) (ducks)
16:33ibdknoxlol
16:33ibdknoxit would be awesome... I really don't want to write objective-c to build iPad things :(
16:33hiredmanthere is a blog post somewhere about generating c++ from clojure
16:33gtrak`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:34gtrak`I can't imagine llvm would be faster than the jvm for most things
16:34ibdknoxmaybe not, but it *would* mean absolute portability
16:34hiredmanI generated java code for my reflection inline caching
16:34emezeskegtrak`: might be faster for startup times
16:34gtrak`true
16:35hiredmanthe 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:35ibdknoxjvm + llvm would cover basically every base
16:35ibdknoxhiredman: haha nice
16:35hiredmanllvm is not a highlevel target like the jvm is, there is a lot more work to do in the compiler
16:35gtrak`emezeske: it's basically an OS
16:35technomancyemezeske: IIUC the tl;dr is that sun/oracle has put no effort into improving it
16:36technomancybecause they only care about servers
16:36TimMcGave up on applets? :-)
16:36emezeskeIt doesn't have to initialize hardware like an OS, which is part of the time-consuming startup of an OS
16:36technomancyTimMc: more or less
16:36hiredmanemezeske: loads byte code for everything and verifies it all
16:37gtrak`it has to do quite a bit
16:37emezeskes/has to do/does
16:37technomancyyeah, dropping bytecode verification makes a big difference on startup
16:38hiredmanthere are improvements in the pipe that should help
16:38_ulisesevening
16:38technomancyemezeske: there's no way to do AOT with hotspot's JIT
16:38emezeskeI've read that a lot of the JVM startup time is just I/O, seeking in huge jar files
16:38hiredmanthe module system should make it possible to cut down the amount of code to load and verify
16:38technomancybasically you have to wait for it to identify problem points before it even bothers to do any JIT to machine code
16:38emezesketechnomancy: Oh?
16:38gtrak`I wonder if clojure to llvm is easier than clojure to C++
16:39gtrak`rather, clojure in C++
16:39ibdknoxI would think so
16:39hiredmanthe last few tweets from openjdk are JEPs that should help improve startup time
16:39hiredmanhttps://twitter.com/#!/openjdk
16:39emezeskenice
16:39hiredmanalso the module system may help
16:41emezeskeI 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:41hiredmansure, it could, but it doesn't at all
16:41emezeskeYeah
16:41emezeskeThat's what seems insane to me.
16:42hiredmanwell, it makes for a much simpler system
16:42lucianemezeske: most of JVM's startup time is io, yes. it's most of the reason dalvik has a different format
16:42technomancyemezeske: servers sell, so that's where snoracle spends their time
16:42hiredmananytime you add caching you make things complicated
16:42lucianjit warmup isn't the problem, there are just too many, too big classes that can't be mmaped into memory
16:42lucianalso, clojure is a GC pig during bootstrap
16:43emezeskeYeah, caching is complicated. It's also responsible for like 99% of performance wins, ever
16:43luciandalvik mmaps files into memory, and it has much more compact and less redundant class files
16:44lucianbut dalvik also has a slow-ish gc, which is why clojure isn't usable on android
16:44mdeboardHow 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:45lucianmight need a ~ in there somewhere
16:45mdeboarde.g. https://gist.github.com/ff80a5509a5241065a98
16:45svs`any reccommendation for a PEG library like treetop or parslet in clojure?
16:46lnostdalhi, 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:46dnolenibdknox: clj -> llvm would be very sweet - the biggest obstacle would be GC.
16:47jodaroawww yeah! OPJ: other peoples java.
16:47mdeboardI guess I'm seeking the equivalent of python's foo(*args) here
16:47Bronsalnostdal: i've seen this too
16:47Bronsano ide why this is happening though
16:47mdeboardwhich I know in the signature is just [x & xs] but
16:48ibdknoxdnolen: yeah, it'd definitely be work
16:48lnostdalBronsa, yeah, i usually guess what the problem is though, but not this time .. and there's no output in the terminal, either
16:49dnolenibdknox: but I also don't know you couldn't just plug in a simple GC to start off with
16:49dnolendon't know why I mean.
16:49gtrak`could we create a more fundamental version of JS on llvm and start from there? Maybe analagous to RPython?
16:49mdeboardlucian: Were you talking to me?
16:49mdeboardson of a
16:50ibdknoxdnolen: presumably ruby llvm and such have a solution that could be stolen
16:50dnolenibdknox: I wouldn't be surprised if cljs compiler -> llvm turned out to simple if you just used the existing pluggable JIT & GC
16:50amalloymdeboard: you could use the hiccup-emulation features, which IMO are way easier to work with than the element-record-based api
16:51mdeboardamalloy: Are those documented?
16:51amalloy(sexp-as-element [:foo {:bar "baz"} (for [j coll] [:qum])])
16:51amalloyprobably? a little? i'd look at sexp-as-element. i know i wrote a docstring but dunno how good it is
16:51mdeboardNo clue what hiccup is btw
16:51ibdknoxmdeboard: http://github.com/weavejester/hiccup
16:52ibdknoxmdeboard: it's what noir uses for templating by default
16:52mdeboardamalloy: Ah found the fn
16:54emezeskeAfter 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:55mdeboardamalloy: Lovely.
16:56mdeboardGod, amazing. You're the best.
16:57Raynesmdeboard: He's dreamy.
16:57Raynesmdeboard: I get to live near him soon!
16:57RaynesI shall woo him from a short distance.
16:59mdeboardhelp I just wrote an rdbms indexer for solr
17:01tmcivermdeboard: and...you can't get up?
17:01ibdknoxhah
17:02ibdknoxand look what pops up: http://news.ycombinator.com/item?id=3649883
17:02callenibdknox: I wonder how that would perform under pypy.
17:03jimdueyinteresting. Clojure everywhere!
17:03ibdknoxwow
17:03ibdknoxthere's a lot of work here
17:03dnolenibdknox: neat, though I'm skeptical of claims outperforming Clojure on JVM
17:04ibdknoxdnolen: yeah, I am too
17:04jodarowow
17:04hiredmanvery
17:04jodaronow we need to implement haskell on top of clojure running on python
17:04ibdknoxit also doesn't really solve any problem I can think of
17:04pjstadigyeah
17:05emezeskeIs that really written in Python instead of RPython?
17:05ibdknoxit doesn't help me wrote iOS apps
17:05pjstadigsince the JVM isn't really that burdensome
17:05ibdknoxwrite*
17:05pjstadigespecially with invoke dynamic
17:05dnolenibdknox: I agree ... Clojure on LLVM would really be the next logical target in my opinion.
17:05replacahow does it deal with concurrency, I wonder? does it get hung up on the global lock?
17:06aperiodicis that link something to do with clojure on pypy? (noprocrast is active)
17:06aperiodicibdknox: ^
17:06ibdknoxit's clojure built in python
17:06ibdknoxseems to be a pretty faithful port from Java to straight python
17:07pjstadighttps://groups.google.com/d/topic/clojure-py-dev/SziaZe2HKAE/discussion
17:07pjstadig0.1 release doesn't include concurrency constructs
17:08aperiodicyeah, i agree that llvm is a much more exciting target
17:11ibdknoxlol: clojure-py -> CPython -> llvm -> emscriptne -> JS
17:11ibdknox;)
17:12callenThis has gone too far.
17:12callenJS -> cljs
17:13callenpjstadig: concurrency in my Python? hahahahaha
17:13callenpjstadig: yeah. well. maybe someday.
17:13ibdknoxdnolen: is the biggest potential win for CLJS right now the arguments stuff?
17:13dnolenibdknox: yes that would be huge
17:14dnolenibdknox: other big thing is getting faster data structures - but that would require some research as to what works best in JS
17:14mdeboardSaw an amazing implementation of partition-all in python today
17:14ibdknoxdnolen: I started down that path a little trading memory for speed
17:15dnolenibdknox: any code path with several multiple arity fns is punished right now (like get)
17:15dnolenibdknox: ?
17:15ibdknoxdnolen: better datastructures that kept arrays of their keys and whatnot so that when you iterated over them it would be native speed
17:16ibdknoxdnolen: after ClojureWest I might look into the arguments thing. I want CLJS to be fast enough for games :)
17:16rlbIs 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:17technomancyrlb: I think it's blocked on the design of dynamicity knobs
17:17uvtcIs clojars.org pretty much the central location for 3rd-party Clojure libs (that is, the "CPAN for Clojure")?
17:17technomancyuvtc: yup
17:17aperiodicibdknox: keep me posted! i've actually just started working on a game in cljs
17:17dnolenibdknox: 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:18uvtcSeems odd that clojars.org doesn't have a way to view the readme of a given lib...
17:18technomancyuvtc: well-behaved libraries include a URL to their home page which usually displays a readme
17:19ibdknoxdnolen: 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:19rlbtechnomancy: 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:19uvtctechnomancy, ah, that makes sense. (looking for one that does this ...)
17:19technomancyrlb: I would be shocked if it ever gets under 0.5s without oracle getting involved
17:20rlbtechnomancy: jvm changes you mean? (That'd be fine ;>)
17:20technomancyright
17:20technomancyit just means it's out of our hands
17:21uvtctechnomancy, Ah, ok. This one, for example, http://clojars.org/lein-immutant does that.
17:23dnolenibdknox: 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:25ibdknoxdnolen: I'll be happy when running canvas doesn't make my laptop blast off ;) hehe
17:26dnolenibdknox: haha
17:27uvtctechnomancy, 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:27rlbso far most of the webgl demos I've tried have seemed unrealistic -- of course, I'm using firefox + intel HDN000...
17:27rlb(not clojure-specific -- just random webgl demos)
17:28technomancyuvtc: version 2 does
17:28rlb(too slow/stuttery)
17:28ibdknoxthe webgl version of quake3 works surprisingly well on chrome
17:29uvtctechnomancy, Oh, that sounds great. :) Thanks.
17:31aperiodicwebgl demos are smooth as butter on my core i7 MBP w/chrome dev
17:31hiredmantime to upgrade
17:31hiredmanman I want an i7, but I just put a plane express sticker on my c2d
17:31rlbright -- I've heard chrome is much faster, but that's a single browser
17:31hiredmanplanet
17:32jsabeaudryAnyone has looked at openjdk6 vs 7 for clojure performance?
17:37LauJensenAre there any interesting uses of ClojureScript out and about yet?
17:37ibdknoxLauJensen: http://www.chris-granger.com
17:37RaynesI once used it to rename a bunch of video files.
17:37RaynesDoes that count?
17:38RaynesI found about 6 bugs in that 20 line script.
17:38LauJensenRaynes: That sounds outstanding Raynes :)
17:38LauJensenThanks ibdknox, I'll take a look
17:39dnolenLauJensen: 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:39Raynesdnolen: Did that nodejs arg count bug ever get fixed?
17:39ibdknoxit's basically there now
17:40LauJensendnolen: How is Lein lacking wrt Clojurescript ?
17:40ibdknoxlein-cljsbuild does everything we need it to
17:40dnolenRaynes: I haven't looked into it, patch welcome :)
17:40dnolenibdknox: sweet!
17:40RaynesMeh.
17:40RaynesI need to send in a new CA and have my account name changed and stuff.
17:40dnolenibdknox: I haven't tried it myself, so I didn't know
17:40RaynesI don't care nearly enough.
17:40dnolenibdknox: can it grab CLJS libs packed up in JARs as well?
17:41ibdknoxdnolen: all my libs are included that way :)
17:41dnolenibdknox: rad
17:41ibdknoxeven referencing externs like that works
17:42dnolenRaynes: well, that's why it isn't fixed yet then :)
17:42Raynes*shrug*
17:43RaynesIt'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:43RaynesOr is that just a fun little addon that nobody actually cares about? I'm not sure how important it is to people.
17:43dnolenRaynes: it's important but nobody's owned it
17:44dnolenRaynes: currently I think Node.js stuff is a bit broken - very likely simple fixes but I haven't looked too closely.
17:45dnolenRaynes: that said, it seems like most of the CLJS interest is heavily browser oriented.
17:45RaynesYeah, I haven't had a chance to use it on the web.
17:45ibdknoxjark seems like a better scripting solution
17:45dnolenRaynes: I do have a working Node.js REPL which is really fun, but it still needs lots of work
17:45ibdknoxand the JVM is better for server stuff
17:45RaynesI'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:45ibdknoxso node doesn't seem very useful
17:46Raynesibdknox: Jark is just another persistent JVM solution.
17:46ibdknoxyep it is
17:46technomancyibdknox: it's really solely about startup time
17:46Raynesibdknox: Keeping a JVM running constantly just for startup time is pretty pathetic.
17:46RaynesIt's kind of a waving the white flag.
17:46ibdknoxSure, but if it works, I'm happy
17:47ibdknoxthis is one case where the pragmatism outweighs the impurity of it for me
17:47technomancyit works for you because you care enough about Clojure to not mind having this thing hanging around
17:47ibdknoxyep
17:47ibdknoxI would love not to have to write bash every again :p
17:47technomancyonce 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:47RaynesIt 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:47RaynesBut not having to write shell scripts pretty much outweighs that issue.
17:47dnolenRaynes: 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:48Raynesdnolen: Right, I don't have any large Javascript sites.
17:48Raynesdnolen: I'm sure cljs would make more sense for those.
17:48Raynesdnolen: 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:49dnolenRaynes: makes sense
17:49RaynesOn 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:49ibdknoxI think I can basically make the compile step irrelevant
17:49RaynesI think our js file is like 30 lines or less. :P
17:50RaynesThat'll probably grow significantly as we add more features to RefHeap.
17:50dnolenRaynes: 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:51Rayneskotarak: ping
17:51kotarakRaynes: yes?
17:52Rayneskotarak: 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:52RaynesIn VimClojure of course.
17:53ibdknoxRaynes: I just removed it from lispwords in indent/clojure.vim
17:53RaynesIt 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:54RaynesYeaaaah, but I don't like doing that. :p
17:54kotarakRaynes: Hmmm.. I considered -> to take like a body. You can follow ibdknox advice. Put it in after/ftplugin/clojure.vim
17:54RaynesI guess I'll have to.
17:55kotarakI personally like the indenting of -> and ->> that way better. Matter of taste I guess.
17:55kotarakAnd up to now, no one complained..
17:56ibdknoxthe actual indentation doesn't bother me, just the inconsistency between vim and emacs since most folks here use the latter
17:56RaynesI 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:56Raynes:)
17:57AimHereThere is at least one indentation bug on emacs clojure-mode as well, so emacs might well be wrong
17:59kotarakRaynes: 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:01kotarakibdknox: I'm annoyed about the missing newline at EOF. Which happens to happen quite often. :/
18:03amalloykotarak: in emacs? so set it up to automatically add those
18:03amalloy(setq require-final-newline t)
18:03kotarakamalloy: tell the others. Not me. I use vim.
18:04amalloypersonally 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:04technomancyamalloy: if you leave the trailing newline out of a crontab, it will pretend the last line doesn't exist
18:04technomancyFun Fact!
18:05hiredmanman, I better go check all the crontabs I have checked in
18:05amalloyyes, i know. lots of unix tools are dumb; not really breaking news
18:05technomancyjust saying, it's not just a style thing
18:05brehauttechnomancy: feautres like that is why half of all programmers have tried to write their own cron replacement
18:06kotarakAnd most of them failed.
18:06technomancybrehaut: worse is better =(
18:06amalloyin a clojure file it clearly is
18:06brehautin the case of cron, i think worse is still worse
18:06vijaykiranHi .. what is the simplest way to filter a vector of maps based on keys ?
18:07technomancyamalloy: yeah, but it's not worth setting it as buffer-local in all the modes you know you don't need it for
18:07brehaut,(filter :foo [{:foo 1} {:bar 2} {:foo 2}])
18:07clojurebot({:foo 1} {:foo 2})
18:08vijaykiranthx! I got something similar - so must be on the right track :)
18:08brehaut,(filter (comp odd? :foo) [{:foo 1} {:bar 2} {:foo 2}])
18:08clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Argument must be an integer: >
18:09brehautfail
18:09hiredmanfnil!
18:09brehaut,(filter (comp odd? (fnil :foo 0)) [{:foo 1} {:bar 2} {:foo 2}])
18:09clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Argument must be an integer: >
18:09brehautoh. duh. wrong bit
18:09hiredman:)
18:10brehaut,(filter (comp (fnil odd? 0) :foo) [{:foo 1} {:bar 2} {:foo 2}])
18:10clojurebot({:foo 1})
18:10brehautsorry for the muppeting
18:58replacais 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:59technomancyreplaca: there's some fanciness to try to get them to rebind to the slime-repl buffer, but it may be too clever
18:59replacatechnomancy: ahh, hmm. I'm running swank-clojure 1.4. Is that a good thing or a bad thing?
19:01replacaIt 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:01technomancyreplaca: no, don't bother
19:01technomancy1.4 is right, and the elisp hasn't changed in forever
19:01replacaahh, ok
19:02technomancyif you set :repl-out-root false you can go back to the old behaviour
19:02replacaso my output is just disappearing then, eh? ok lein repl here I come :)
19:02replacatechnomancy: oh, where do I do that?
19:02replacain project.clj
19:02replaca?
19:02technomancyyes
19:02technomancyexcellent question
19:02technomancyit looks like ... on the command line? what the heck.
19:03replacawho's command line? does that mean an edit to clojure-jack-in?
19:03technomancyreplaca: I mean it's not exposed in a reasonable way at all =\
19:04technomancywell this foils my plan of answering one of your questions in exchange for getting one of my questions answered
19:04replacatechnomancy: happy to do it on credit :)
19:04technomancyit's not even something that works via jack-in at all; it only accepts it when you do lein swank
19:05replacaahh
19:05replacabut then I could do slime-connect, yes?
19:05technomancyyeah
19:05technomancyI mean if you just want to debug it you could do it; it's just not convenient
19:05replacais there a cmd-line I can use?
19:06replacayeah, gotchya
19:06replacaI'm just trying to get some debugging output from a ring thread
19:06technomancyI think: lein swank 4005 localhost :repl-out-root false
19:07technomancyreplaca: so I have this: https://github.com/technomancy/lein-precate
19:07technomancyI guess we've talked about this
19:07technomancyhow hard it would be to get defproject prettyprinted a bit more nicely
19:07replacashouldn't be too hard
19:08technomancythe readme is full of lies as it makes it look like it already prints nicely
19:08replacawhat do you want that it's not doing
19:08replaca?
19:08replacaoh, it needs to print like a map
19:08replacaafter the version
19:08sw1nnanyone know cljs-repl in emacs inferior-mode?
19:08technomancyyeah, and the artifact and version should always be on the first line
19:08technomancyit's kind of a weird thing to want
19:09replacayeah, that's easy
19:09replacaShould I just fork that and send you a pull?
19:09sw1nnI 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:09technomancyreplaca: I don't know; that sounds too easy =D
19:09hiredmanVERBOTEN!
19:10hiredmanclojurebot: pull request?
19:10clojurebotAnyone can hack! http://images.wikia.com/pixar/images/0/0d/Http_alliedow-files-wordpress-com_2011-01_anyone-can-cook-445x355.png
19:10replacatechnomancy: ok, I'll just define a new dispatch for you
19:10technomancyreplaca: excellent, much appreciated
19:10replacagimme a couple days
19:10hiredmanclojurebot: pull request is <repl>VERBOTEN!
19:10clojurebotYou don't have to tell me twice.
19:10technomancyreplaca: are you going to the meetup tomorrow?
19:11replacatechnomancy: yeah, are we going to do a long-distance joint meeting?
19:11technomancyreplaca: yeah, they've got some fancy AV telepresence setup there
19:11choffsteinDoes 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:11replacahiredman: when technomancy and I are working together pulls are ENCOURAGED :)
19:12replacatechnomancy: that will be fun
19:12technomancychoffstein: pull requests are fantastic
19:12technomancyyou can do pull requests on documentation files if you're still in the brainstorming stage
19:12choffsteintechnomancy: Oh, that is interesting.
19:13technomancyit's the best
19:14choffsteinthat is something I definitely hadn't thought of. My only potential hole is projects that don't necessarily have code.
19:14choffsteinSeems like a waste of a github repo to just manage docs... though, maybe not?
19:14technomancypull requests on org mode files =D
19:15technomancyif you're cheap you can use a headless branch on an existing repo
19:16choffsteinNot cheap ... just thrifty. I haven't really found something I have liked. I guess basecamp is supposed to solve this issue, right?
19:17technomancywe have a single "engineering docs" repo at heroku
19:20choffsteinThat might solve a lot, actually.
19:27arohneris there an idempotent version of lein self-install?
19:27arohneri.e. one that doesn't complain if the jar already exists
19:27technomancyarohner: no, but I'd take a patch
19:28arohnertechnomancy: any preferences on how you'd like it to work?
19:28arohnerenv var?
19:29technomancyarohner: actually
19:29technomancyyou shouldn't ever need to run self-install
19:29technomancyit's smart enough to figure out when it needs to do so already
19:30technomancyso what's your motivation here?
19:31arohneroh, I wasn't aware it figured things out. Just writing my pallet deploy scripts, and wanting to re-deploy while debugging
19:31hiredman:(
19:32arohnerhiredman: ?
19:32hiredmanbuild tools are for building things, not deploying them
19:32arohnerhiredman: how do you suggest I run my app then?
19:33hiredmanin my mind lein belongs on the ci server for generating artifacts (tars or jars)
19:33hiredmanarohner: java -jar some-uber.jar works or https://github.com/technomancy/lein-tar
19:34arohnerhiredman: that seems like extra work with no benefit
19:35hiredman~repeatability
19:35clojurebotrepeatability is crucial for builds, see https://github.com/technomancy/leiningen/wiki/Repeatability
19:35arohnerand I dislike having production be a different environment than development
19:35hiredmanhow is it different?
19:35arohnerbecause I don't run java -jar some-uber.jar in development
19:35hiredmanthe point is, you build a release once, and you don't build a release everytime you deploy
19:36technomancyyeah, it's important to build a deployment artifact that's stored somewhere for repeatable deployment
19:36technomancygoing straight from your checkout to the remote machine means undeclared and unpushed changes can make it out into the live environment
19:37hiredmanarohner: 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:37technomancyyou can still use lein to run stuff in production, but resolving dependencies during production is skating on thin ice
19:37arohnerI'm not going straight from my local env to production
19:38hiredmanlein-tar is what we use at sonian
19:43replacatechnomancy: remind me the best way to install a lein plugin I'm working on? (Like one called "precate" :))
19:44technomancyreplaca: best to symlink lein-precate/src/ to ~/.lein/plugins/lein-precate
19:45replacatechnomancy: great. thanks!
19:56ibdknoxI love it when people tell me I missed the point of something :p
19:57callennothing like generating 10k LOC diffs with untabify first thing in the morning.
19:57mdeboardibdknox: If you love it, then you missed the point
19:57calleneventually the heathens will learn.
19:57amalloyibdknox: you're probably missing the point of that criticism
19:57ibdknox:D
19:57callen(recur (criticize (miss :point)))
19:57mdeboardI win the witticism race, or the racism as I call it
19:57emezeske_callen: hey, that's what -w is for :)
19:58callenemezeske_: I'm going to keep doing it until people stop using tabs.
19:58emezeske_callen: Hey, that's one point that we definitely agree on!
19:59callenI should null out the tabify function in my .emacs just to be an arse.
19:59callenyeah...I think I'm going to do that.
20:06qbgI wonder why Clojure went with the sneaky generics throw instead of Thread.currentThread().stop(Throwable t)
20:08hiredmanall the .stop methods are marked as deprecated
20:08callennot in my day it wasn't!
20:08callenwhy in my day, we'd return error codes and handle error conditions according to faulty error code documentation.
20:09gtrak`write the errors to a database
20:09callengtrak`: hi django_sentry
20:10gtrak`a self-parody?
20:10callenthat's what it does.
20:10gtrak`oh, I guess it's ok if you do it deliberately, just not as a default
20:11callendjango_sentry catches everything...
20:11callenwhich is part of what makes it so damned useful.
20:11gtrak`oh nice, rich hickey applied sneaky_throws and it's done
20:11mdeboardwas it super effective?
20:11pandeiroanyone used/looked at the static site generator in clojure at github.com/nakkaya/static?
20:12callenpandeiro: pretty old IIRC, but it probably works fine.
20:13devnclojure in python, wha?
20:13devncool.
20:13pandeiroi would love something like jekyll but not in ruby
20:14devnpandeiro: Utterson is a static site generator. I'm sure there are a few at this point.
20:15devnpandeiro: i dont see why i wouldn't try out nakkaya's though
20:15tylergilliesi would like something like (for [gem rubygems] (not-in-ruby gem))
20:15devntylergillies: what is the desired output?
20:16tylergilliesdevn: anything and everything that makes sense ;)
20:16devnif rubygems is [1, 2, 3], what does (not-in-ruby gem) do?
20:16technomancywhy not just use gems like java libraries?
20:16pandeirodevn: thanks for the tip on utterson; i think i will have a dig at the nakkaya one
20:17devnpandeiro: im sure there are more, the bestinclass blog (LauJensen's blog) is also available to look at
20:17tylergilliesdevn: its a multi-method that returns puppies when given an integer
20:18tylergilliesthats the magic of ala cart polymorphism, puppies.
20:19devntylergillies: im not sure i follow
20:20tylergilliesthat makes 2 of us
20:20devnif you have a specific question let us know
20:42devnthis clojure-py thing is pretty neat
20:42devnim enjoying re-reading the classics ;)
20:43mdeboardI really don't see the point beyond interesting exercise in learning more python
20:44devnmdeboard: it's a slightly different perspective
20:45mdeboarddevn: No doubt, good learning exercise but they apparently are aiming for widescale adoption
20:45ibdknoxthe problem is that the ecosystems for these different platforms basically have to start over
20:45ibdknoxand that is hard
20:45ibdknoxreally, really hard
20:46technomancyclojurebot: learning a new runtime is much harder than learning a new language.
20:46clojurebotc'est bon!
20:46ibdknoxtup
20:46ibdknoxyup*
20:46ibdknoxand that's why something like this is fighting an incredible uphill battle
20:46ibdknoxit would have to be *clearly* better
20:47ibdknoxand I don't see that being the case
20:47devnif i can write clojure everywhere, that'll be nice.
20:47ibdknoxhow does this help make that true?
20:48ibdknoxbecause I completely agree
20:48mdeboardIME the roadblock to writing clojure everywhere isn't my environment, it's the other devs
20:48technomancyibdknox: it could serve as an alternate quick-startup
20:48technomancyit's going to take ages before node gets more than a tiny fraction of python's penetration
20:48devnibdknox: adoption starts when other people start to notice
20:49devnmaybe this will make more of the python community take notice
20:49ibdknoxtechnomancy: sharing scripts doesn't seem as important
20:49ibdknoxbut true
20:50devni feel like if this happened two years ago people would have been much more "this is cool." about it
20:50ibdknoxnow it's duplicated effort
20:50ibdknoxthen it wouldn't have been
20:50mdeboardHonestly 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:51ibdknoxhaha
20:51devnthen im not a good dev -- who cares? it took work and it's a love note to your favorite language.
20:51devnenjoy being the pretty girl once in awhile.
20:51mdeboarddevn: That's why I said "personally" :)
20:51emezeskemdeboard: I don't roll my eyes, depending on how it was written before.
20:51technomancymore implementations means more people whittling down the part of clojure that needs to be reimplemneted, which theoretically gets us closer to CinC?
20:52devntechnomancy: 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:52mdeboardCertain segments of the python community seem to love rewriting languages in python
20:52devnyou say that like it's a bad thing
20:52technomancyright now clojurescript is the primary CinC driver, and it doesn't have eval
20:52r4vii'm parts of the python community
20:52ibdknoxtechnomancy: 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:52r4vii can relate
20:52technomancyso these guys are still going to have to move the ball down the field a bit
20:53technomancywhich is going to be helpful for other alternate implementations that want to have eval too
20:53mdeboardI think it's a great thing as a learning tool but I'm not sure what use it has in real-world use
20:53r4viits mostly because python people really hate java
20:53mdeboardrrrrright but... what does java hate have to do with this
20:54devnpeople who wouldnt have ever read the clojure compiler might read the python clojure compiler?
20:54mdeboardyeah, you're right
20:54devn(first '(time for everything))
20:54scriptorhmm, I wonder if they'll try one in pypy
20:55mdeboardYes they said that's their ai
20:55mdeboardaim
20:55r4vimdeboard: it's all about decoupling clojure from java. the less it's related to java the better
20:55devnscriptor: seems to already be under consideration
20:55mdeboardr4vi: Sisyphean.
20:55r4viCinC is the holy grail
20:56ibdknoxeh
20:56ibdknoxself-hosting is mostly just a test
20:56devnibdknox: it's a sign of a certain kind of maturity though
20:56brehautibdknox: it makes developing the core more appealing too
20:57ibdknoxbrehaut: sure, but there's already too much in the core ;)
20:57mdeboardI'm all for writing whatever in whatever as long as you don't lose performance, expressiveness, power or flexibility for ephemeral gains
20:57technomancybrehaut: well
20:57technomancybrehaut: java is hardly the primary roadblock there
20:57scriptoralso, it'd mean no longer having to read rich's java code :)
20:57hiredman*shrug*
20:57hiredmanit reads just fine
20:57technomancyI just want other people to pave the way so when I finally get around to writing my clojure->elisp compiler it's easy.
20:57technomancythe truth comes out
20:57ibdknoxtechnomancy: :D
20:57brehautlol
20:58devntechnomancy: what's the timeline on that? 2014?
20:58brehauttechnomancy: wouldnt it be smarter to make an elisp to clojure computer and just port the whole thing to clojure?
20:58devnheh
20:58technomancydevn: after I learn nix, factor, and datalog I guess
20:58r4viif 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:58mdeboardStep 1: Build Turing machine
20:59technomancyr4vi: has it really
20:59technomancy?
20:59r4vii really think so
20:59rlbr4vi: to be fair, it's not just python people -- I find java to be an uphill battle in many places.
20:59brehautmdeboard: step one: learn how to blow a vacuum tube
20:59hiredmantechnomancy: the easy part is done, the difficult part is just mapping clojure concepts to elisp concepts
20:59mdeboardr4vi: cognitive bias?
20:59r4vigoing from my unscientificy observation of hackernews
20:59rlb(and it was for me too before the license change)
20:59mdeboardExactly r4vi
20:59technomancyI see a lot more "I'm confused about clojurescript" than "see this cool thing I did in clojurescript"
20:59devnmdeboard: have you ever seen the video of the guy who makes vacuum tubes?
20:59hiredmanyou should just be able to plug ambroses's analyzer in to an elisp generator
20:59ibdknoxtechnomancy: but I do cool things!
20:59ibdknoxheh
20:59rlbs/java/jvm/
21:00r4vijvm is great btw
21:00technomancyibdknox: that's basically why I avoided saying I haven't seen any =)
21:00r4vithat's not the problem
21:00devnmdeboard: http://www.youtube.com/watch?v=gl-QMuUQhVM
21:00ibdknoxtechnomancy: unfortunately true :(
21:00technomancyhiredman: yeah... I don't know if it's possible to make it work at all with mutable strings
21:00technomancythat may just be a bridge too far
21:01hiredmanno, that would work fine
21:01r4viit'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:01mdeboardI 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:02technomancyr4vi: if that were how it works nobody would use emacs
21:02brehautlol
21:02technomancyhiredman: you mean just trust people not to do anything stupid?
21:02hiredmanr4vi: if you can stand the sight of sausage being made maybe you should consider employment outside of the kitchen
21:02brehauttechnomancy: they are already using emacs, how much trust could you place in them :P
21:03hiredmantechnomancy: well you already have to do that with elisp, so it's a net 0
21:03r4vitechnomancy: elisp is weird but nowhere near as ugly as java
21:03mdeboardlol
21:03devnr4vi: debatable
21:03brehautwow
21:03technomancyr4vi: elisp is implemented in crazytown C
21:03mdeboardsubjective chat
21:03technomancyjust like clojure is implemented in crazytown java
21:03devnseriously, this is a downward spiral in motion
21:03r4vitechnomancy: i've never found c to be either ugly or weird
21:03brehautdevn: hi there, i see you are new to the internet
21:04hiredmanI compiled emacs with clang the other day, holy crap that was a lot of warnings
21:04emezesker4vi: 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:04devnbrehaut: heh
21:05gtrak`r4vi, java's really not that bad, especially if you've seen C++
21:05r4vigtrak`: i was just about to say that
21:05r4vino it isn't
21:05r4vijava was a great language in 1999
21:05hiredmanI 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:05devnjava has less flexibility than C++
21:06rlbmdeboard: wrt significance, perhaps your brain isn't sufficiently buzzword compliant.
21:06hiredmanthe generate java source is meh, but I didn't have to write it
21:06hiredmangenerated
21:06r4videvn: it's lambdas all the way down.
21:06mdeboardrlb: Sorry, I'll rewrite my buzzword rule engine in pure python
21:06gtrak`devn, that's a good thing
21:06devndepending on who you ask
21:07rlbmdeboard: better use a nosql rest enging.
21:07rlbs/enging/engine/
21:07mdeboardrlb: Only if I can administer it over HTTP
21:07ivan__only problem with C/C++ is make files are even worse than mvn :(
21:08ivan__well not the only problem
21:08ivan__;)
21:08gtrak`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:08cgraydoes clojurescript one work with lein swank? I'm getting an exception: Unable to resolve symbol: pst-elem-str
21:08devngtrak`: "joe six-pack coder"
21:08devni just had an aneurism
21:08mdeboardYeah, coders don't have six-packs
21:08gtrak`haha
21:08technomancycgray: I don't know about clojurescript, but that means you are somehow pulling in an old clj-stacktrace
21:09cgraytechnomancy: ok thanks, I'll look around for that
21:09gtrak`devn, maybe it's relevant how you perceive C# vs Java
21:10gtrak`I learned C# first, and I see a lot of the additions as superficial sugar
21:11devnso if you learn clojure first you should dislike scheme?
21:11gtrak`nope, clojure is less flexible with regards to mutability, therefore better :-)
21:11gtrak`C# and java are basically the same thing
21:11devnthis is going off the rails, man
21:12muhoorails? that's ruby.
21:15gtrak`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:16r4vigtrak`: 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:16r4vithey even tried adding STM to c#
21:16gtrak`i mean, properties are nice, and so is linq i suppose? but really, it's not so different
21:17r4vihave you seen the async stuff in c# 5?
21:18gtrak`ibdknox has
21:18r4viit's really well thought out
21:20gtrak`i've heard about it, it seemed really complicated :-)
21:23devnmost things i dont understand seem complicated
21:23devnand then i realize they're the solution to my problem
21:24gtrak`looking at it now though, it doesn't seem that special
21:24devngtrak`: 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:25devn"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:25devnthat's what i hear
21:25gtrak`devn, I understand that I might not know things, but I think I'm actually pretty careful about writing stuff off
21:26gtrak`I haven't used it in anger, if that's what it takes
21:26devni 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:27gtrak`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:27gtrak`so far it just looks like sugar for a scheduler and a couple of objects
21:29muhooi remember the horror when gnome went to mono. too many people could not accept the possibility that anything from msft could not suck.
21:29devnyeah muhoo -- it's like reactive extensions
21:29devnit's great. people are so quick to judge when they hear MS.
21:30devnthat was me. i still have an immediate bias due to growing up on slashdot.org
21:30devnwhat a ridiculous site that was...
21:31gtrak`I'm still not sure what the point of it is
21:32gtrak`maybe the example is too small
21:33r4vieverything is syntactic sugar on lambda calculus..... :)
21:44mdeboardgod I have grown to love (->)
21:47MenTaLguYhmm, so I'm making some kind of elementary mistake with macros
21:48MenTaLguYI'm trying to define a macro that defines a record type
21:48MenTaLguYthe macro seems to expand correctly and so forth
21:54seancorfieldanyone 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:55xeqiseancorfield: http://msdn.microsoft.com/en-us/sqlserver/aa937724
21:55RickInGAI know there is such a thing as a jdbc odbc bridge, which I have had to use for other databases
21:55xeqiI used that for testing JDBC-26
21:55seancorfieldxeqi: yeah, i downloaded that... but i really need this to work via maven
21:56seancorfieldso i was hoping to find it in maven central... or somewhere similar...
21:56xeqiah, I never found anything for that
21:56seancorfieldi'm trying to ensure clojure.java.jdbc supports SQL Server properly
21:57xeqijust search result that said to use <scope>provided</scope> w/ that
21:57muhoo"everything is syntactic sugar on lambda calculus" that's a great compaction of greenspun's law
21:57seancorfieldi have it working locally but had to install that driver into my local m2 repo
21:58seancorfieldi'm guessing folks are using jTDS instead... that's in maven
22:01lnostdaldo you guys use maven 2 or maven 3 when working with clojure stuff?
22:09seancorfieldi'm using maven 3 - but only for clojure contrib stuff - i use leiningen normally
22:10alexbaranoskylnostdal, that's a loaded question :) I've never used Maven
22:12Raynesalexbaranosky: We work with awesome. Not maven.
22:12Raynesalexbaranosky: You should write some midje tests for refheap.
22:12RaynesIf you get bored. :D
22:12lnostdalyeah, i prefer lein really, but sometimes it seems there is no option than maven
22:12lnostdalbesides maven*
22:13Rayneslnostdal: mvn dependency:tree is the only reason I have maven installed other than for the libraries required to run lein.
22:13RaynesBut, IIRC, cemerick is working on a dependency:tree alternative for lein.
22:14mdeboardSo, 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:15RaynesI don't think so.
22:15RaynesSLIME shouldn't add overhead. Other than network transfer.
22:16ibdknoxgtrak: c# is very different then JAva
22:16ibdknoxJava*
22:16ibdknoxin the same way that ruby is very different than Java
22:28darevayidbknox: 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:31Raynesdarevay: Hm...
22:31Raynesdarevay: You, sir, are Dave Ray.
22:33ibdknoxdarevay: I used to be the PM for it :)
22:33ibdknoxfor IDE side at least
22:33ibdknoxthere was another guy very similar to myself who owned the compiler
22:37darevayRaynes: you caught me
22:37darevayidbknox: so I've heard. I'm glad you've come over to clojureland :)
22:38ibdknoxme too :)
22:38darevayRaynes: This'll be my 30 minutes of IRC for 2012.
22:38RaynesWe miss you
22:40darevayi appreciate that.
22:45seancorfieldsometimes i hate jdbc...
22:45TimMcJust sometimes?
22:46RaynesTimMc: He likes long walks on the beach and thousands of lines of XML.
22:46qbgjdbc isn't so bad in Java land if you use Spring
22:51seancorfieldqbg: 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:54seancorfieldok, i think i have enough tests in place to start folding in sqlite support in c.j.jdbc!
22:54qbgSince spring-jdbc is so functional, it would probably be easy to build on top of it. (for better and worse)
22:55xeqiseancorfield: hurray!
22:56darevayit's been real. see y'all in 2013.
22:59technomancyseancorfield: is that pure java or does it need native bits?
23:01seancorfieldi'm using the org.xerial/sqlite-jdbc 3.7.2 driver...
23:01seancorfieldbased on a patch from nelson morris
23:02technomancyhuh. clojars uses sqlite and requires some native shenanigans
23:02technomancybut hopefully we'll be off it soon
23:02xeqitechnomancy: I'm using the patch atm to build a clojars test suite
23:02technomancyoh, cool
23:03technomancyxeqi: I've got a branch that works on postgres without search
23:03xeqisee my tests branch
23:03xeqibut I've decided to redo my testing api
23:03xeqipull out a ring-test based on rack-test
23:03xeqiI saw a few branches, picked your cleanup one to start on for now
23:04technomancycool
23:04seancorfieldok, dinner calls... back to sqlite support later!
23:09xeqitechnomancy: is there dev work going on for clojars? mailing-list seems kinda dead
23:09technomancyxeqi: I've got half a proposal written up
23:09technomancybut it probably won't happen till after clojure/west
23:09technomancyneed to sketch out a plan for a fairly serious revamp
23:17TimMctechnomancy: My app just uses the xerial thing + the clojure jdbc.
23:28devnhttp://img338.imageshack.us/img338/9710/rhrlj.png
23:28devn^-really important. you should probably spend a few hours studying that image.
23:30sgarrettHello #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:30sgarrettAlso this would be my first experience/involvement in open source.
23:32technomancydevn: is that john rhys-davies?
23:32ibdknoxmy mind is blown.
23:33humbleZsgarrett: ditto
23:43amalloysgarrett: 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:43alexbaranoskyI think that's solid advice from amalloy
23:43sgarrettamalloy: Thanks for the tip. :)
23:44alexbaranoskygithub is full of projects -- find one you are into and add feature and submit a pull request
23:44echo-areaI'm not familiar with Haskell, is side effect in Haskell similar as in Clojure?
23:47amalloyi don't think that question means anything, echo-area
23:47amalloy"similar" is just too vague to be answerable
23:49echo-areaamalloy: 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:50gf3hola amalloy, do you think I could solicit some feedback from you? Re: pastebin + eval app: http://cljbin.herokuapp.com/paste/4f4da1a6e4b06bdb1b33f987
23:52brehautecho-area: the idea of a side effect is universal
23:52brehautecho-area: haskell segments code into stuff that can have side effects and stuff that cant. clojure is less militant about things
23:53muhoo"without side-effects, all your programs would do is heat up your computer."
23:53echo-areabrehaut: By "less militant", do you mean the existence of set!?
23:54brehautecho-area: sort of
23:54echo-areaI see
23:54brehautecho-area: in clojure you avoid side effects by choice, in haskell you avoid side effects because the type checker requires you to
23:55brehautecho-area: you should probably be avoiding set! in clojure too ;)
23:56echo-areabrehaut: Right, possibility means nothing that should do :)
23:56amalloyi 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:57gf3amalloy: cool, thank you
23:58gf3amalloy: and thanks for your help a while back, you gave me a better reader