#clojure log - Dec 27 2012

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

0:01 xeqi: juldre: I think you can pass ":mode :dev" in the options to noir.server/start to have it do code reloading

0:02 callen: juldre: words to the wise: might want to migrate away from Noir and just use vanilla Ring.

0:04 juldre: callen: Noir seems to include some templating stuff that's handy, any reason why you prefer Ring?

0:05 jkkramer: juldre: http://blog.raynes.me/blog/2012/12/13/moving-away-from-noir/

0:05 callen: juldre: it's not about preferring something, Ring underlies Noir.

0:05 jkkramer: I use ccw. All my web projects use compojure and embedded jetty during development; code reloading happens as part of the usual interactive repl development

0:06 callen: juldre: there exists luminus, which itself uses lib-noir, raw ring, and using lib-noir yourself.

0:07 jkkramer: compojure is generally preferable to raw ring, unless you feel like matching routes yourself

0:07 callen: juldre: I'd just get in the habit of doing all web apps with Compojure and Ring, sprinkling on other bits as you see fit.

0:09 juldre: callen: thank, just tingling around at this point

0:10 jkkramer: can you explain what you mean by "usual interactive repl development" ?

0:11 jkkramer: my current problem is that once I have a REPL started, idk how to get the IDE to reload my code changes

0:12 jkkramer: juldre: opt-cmd-L

0:12 juldre: jkkramer: what is that supposed to do?

0:12 doesn't do much for me

0:12 jkkramer: juldre: loads the current file in the repl

0:13 you can also select a function and press cmd-enter to eval it

0:13 juldre: jkkramer: that works, but then I get "BindException Address already in use" exceptions ?

0:13 jkkramer: juldre: are you running the server at the top level?

0:14 juldre: the idea is, you start the server once. then just hot recompile functions as you change them. the server doesn't need to restart

0:15 callen: jkkramer: stuff just kinda reloads automagically for me.

0:15 juldre: jkkramer: Not sure just running the example that came out of leiningens noir template

0:15 callen: OTOH, #'handler might have something to do with that.

0:16 juldre: for pedagogical purposes, I'd recommend starting from a default lein template and bootstrapping a quick little ring/compojure app just from that, just so you understand what all the bits do. Shouldn't take more than an hour or two.

0:16 bbloom: vars are useful for adding an extra level of indirection when you'd otherwise have issues hot reloading a composed function

0:16 jkkramer: juldre: noir does questionable stateful things, which is why most recommend moving away from it. I'm unfamiliar with developing with it

0:16 callen: jkkramer: I am unfamiliar with this dark magic. What does it need/use state for?

0:16 bbloom: consider (def fog (comp #'f g)), if you redefine f, then fog changes. if you redefine g, fog will not change

0:17 jkkramer: there's also the lein-ring plugin, which can run a server for you and do reloading. I prefer managing the server everything through the repl

0:17 callen: from what I understand it uses atoms to accumulate middleware and routing stuff

0:18 callen: jkkramer: odd.

0:18 juldre: Jkkramer, callen: is there a lein plugin you'd recommend to start fresh for a simple web project?

0:18 jkkramer: I think, I'm not really sure. the way it handles views also seems screwy. I just use compojure

0:18 callen: juldre: yes, the default/empty one I spoke of.

0:18 juldre: presumably compojure + ring ?

0:18 callen: juldre: just learn how to cobble an app together yourself, first time round.

0:18 juldre: it takes all of a handful lines of code to get a compojure/ring app going, seriously.

0:18 juldre: fair enough

0:18 callen: Noir is saving you at most 5-10 lines of code for the "demo" case.

0:19 juldre: Ring underpins all Clojure web dev, effectively, so you might as well know how it works.

0:19 juldre: once you've familiarized yourself, you can take a gander at Luminus to see what a relatively mature Ring/Compojure template looks like.

0:19 lib-luminus has a little bit of magic to rip out though.

0:19 you'd want to pester yogthos and Raynes about that one, though.

0:20 yogthos: heya

0:20 Raynes: wut

0:20 juldre: callen, jkkramer: thanks for the helpful advice

0:20 Raynes: yogthos: We're apparently the goto guys for web development now.

0:20 o/

0:20 yogthos: looks that way :P

0:21 Raynes: juldre: yogthos is working on a template for for a batteries included compojure + lib-noir app.

0:21 It should be great for everyone's sanity.

0:21 yogthos: yeah we're just in the process of rolling in the good stuff from lib-luminus into lib-noir

0:21 once that's done I'll update the template and docs

0:21 Raynes: Yup, and I expect that to be done by tomorrow.

0:21 Assuming yogthos has time to do some last minute changes by then.

0:22 yogthos: the plan right now is to put libraries and functionality in the lib and all the config stuff in the template

0:22 that way if you need to change stuff, rip stuff out it's easy, but you won't get stuck with old functions when stuff updates

0:22 yeah I'll be around :)

0:23 also I heard including bootstrap in the template would be useful, anybody have thoughts on that?

0:24 Raynes: I wouldn't like that.

0:24 I can't imagine lots of people wanting bootstrap.

0:25 yogthos: I could always make a separate even more batteries included template I guess :P

0:25 is there a way to cascade them with lein newnew?

0:25 bbloom: Nuclear Reactor Included

0:25 jkkramer: does lein templating support adding options to a template? lein new whatever +bootstrap +backbone or sometyhing

0:25 Raynes: yogthos: No.

0:25 jkkramer: You could do that!

0:25 yogthos: ^ genius

0:25 yogthos: that's a good idea! :)

0:26 jkkramer: then you can provide all sorts of common helper libs

0:26 yogthos: yup

0:26 because nothing's ever going to please everybody :)

0:27 and flexibility is what a lot of frameworks lack like rails or django for example, it's kind of all or nothing deal

0:27 Raynes: Ain't that the truth.

0:27 yogthos: if we could make something that's as easy as rails without any of the drawbacks that'd be killer :P

0:27 Raynes: yogthos: How has the experience building a template been so far?

0:27 yogthos: Raynes: pretty awesome actually

0:28 bbloom: that's the dream right? both simple AND easy!

0:28 Raynes: yogthos: Does lein-newnew suck? This guy has an open pull request that basically rewrites the whole thing, but I've been scared to look over it because of how broken everything would be if I pulled it in.

0:28 yogthos: If you could look over it some time and tell me what you think of his changes (since you've written a really complex template and I have not), that'd be great.

0:28 yogthos: honestly I haven't had any issues, it's intuitive and works as I'd expect so far

0:29 yeah I could take a look at that

0:30 I mean it's templating, I don't think it should be terribly complicated, newnew seems like a sweet spot to me

0:30 Raynes: Yeah, I really don't want to change it significantly if I don't have to.

0:30 I can't imagine breaking everyone's templates this late in the game.

0:30 Maybe in Leiningen 3.0 or something.

0:30 callen: my talent for rabble-rousing is peerless.

0:31 Raynes: I do not know what those words mean.

0:31 yogthos: haha

0:31 callen: Raynes: I know people like to rag on the South, but it can't be that bad can it?

0:32 Raynes: Y'all need to stop all that makin' fun of me.

0:32 yogthos: Raynes: you weren't kidding about him rewriting the whole thing :P

0:32 callen: I wonder how my erudition would look plotted on a graph where X axis is alcohol consumption per time unit and Y axis is vocabular diversity.

0:32 Raynes: I can't help it I ain't from them big cities.

0:32 yogthos: just looking at it on github

0:32 callen: the South has big cities.

0:32 you're just not in any of them :P

0:32 Raynes: This is true.

0:32 I'm from the middle of nowhere.

0:33 I don't have a particularly strong accent though. My family originates from Michigan.

0:33 callen: Raynes: I'm from the midwest, so people in New York and California have always regarded me as some sort of religious leper.

0:33 Raynes: oh me too, my family's from Ohio and Michigan.

0:33 Raynes: I was born in Alabama, but my mother and her siblings were not.

0:33 xeqi: I even hear it has a program to send things into something called "space"

0:33 juldre: what's the best way of finding what I need to include in :dependencies? I had read clojars but that site keeps timing out

0:34 if I need to find that for a specific library

0:34 callen: I'm just going to go ahead and say it

0:34 technomancy: clojars goes down because the embedded design is harming concurrency.

0:34 Raynes: Oh my.

0:34 Nobody is safe from the callen.

0:34 callen: Raynes: not my fault they used sqlite and raw lucene indices.

0:35 but did anybody listen to the callen? nooooo

0:35 * callen grump grump grump

0:35 juldre: so no clojars replacement ?

0:35 Raynes: Refheap uses mongodb and shells out to pygments. It never goes down unless Heroku breaks. I'm a winner.

0:35 callen: juldre: clojars is fine.

0:35 xeqi: hmm, I can't get clojars to time out for me

0:35 juldre: but is down often...

0:35 Raynes: Yeah, nor I.

0:35 I don't think it is.

0:35 callen: Raynes: Heroku does break independently of AWS btw.

0:35 yogthos: the repo or the site?

0:36 juldre: the site

0:36 i'm in canada fyi

0:36 callen: site search worked for me.

0:36 juldre: shouldn't matter

0:36 yogthos: yeah but that doesn't mean you can't use the repo

0:36 Raynes: callen: I imagine so.

0:36 yogthos: ditto here

0:36 mpan: juldre: personally I use google search and read projects' homepages and readmes, but I don't claim that's particular efficient

0:36 yogthos: and maven caches stuff locally anyways

0:36 callen: Raynes: I'm saying I have a repro for such a thing.

0:36 Raynes: 2/3 of my heroku accounts are permanently broken

0:36 yogthos: so even if it was down for some reason you still have local artifacts

0:36 callen: Raynes: and I can't seem to get them fixed.

0:36 Raynes: callen: I really don't like Heroku after that last downtime, so you don't have to convince me of anything on that particular front.

0:37 xeqi: juldre: in general I use google to search for clojure stuff. if I can remember the name and just want the recent version I'll look on the clojars site

0:37 clojars's search is not very good

0:37 juldre: and it works now

0:37 xeqi: to be fixed

0:37 jkkramer: juldre: there's http://www.clojuresphere.com/ but it's currently a bit out of date

0:37 yogthos: it's not great for searching no

0:37 callen: Raynes: I just have a hard time taking a web app/hosting service seriously that can't keep their login/admin panel working.

0:37 mpan: google has the added benefit/drawback of bringing up related blog posts and articles

0:37 juldre: thanks all

0:37 yogthos: this is probably the most active place http://clojure-doc.org/articles/content.html

0:37 callen: they must not have email notifications for novel HTTP 500s or something, who knows.

0:37 xeqi: I've got plans to replace the search, just need to do more cleanup to fix some other bugs first

0:38 Raynes: Our Linode has better uptime than Leonardo Da Vinci.

0:38 callen: juldre: going to concur with the mention of clojure-doc.org btw, that's a ClojureWerkz shindig.

0:38 yogthos: linode rocks :P

0:38 callen: juldre: ClojureWerkz are the people you want to go to for docs, libraries, etc.

0:38 Raynes: Truth.

0:38 yogthos: indeed

0:38 technomancy: callen: did you get migrations working with lein run?

0:38 callen: technomancy: no, but I got them working.

0:39 technomancy: I scienced up the bitch and figured out what was breaking the migrations library and fixed that.

0:39 technomancy: there seems to be a lot of confusion about writing lein plugins when you should just use run; bleh

0:39 callen: technomancy: I put up a pull request as well.

0:39 technomancy: I should write a blurgh post

0:39 callen: yogthos: cwz is why I pestered you about timbre.

0:39 Raynes: Yeah, no shit. If Michael Klishin isn't writing documentation he is whining about other people not writing documentation. His whole life is documentation.

0:39 technomancy: the idea of a plugin to run your migrations is kinda silly IMO

0:39 callen: technomancy: you should get your employer to make my heroku accounts stop 500'ing on login.

0:39 yogthos: callen: yeah that was a good catch :)

0:39 Raynes: Dude is like the documentation masta.

0:39 callen: lol @ klishin

0:39 technomancy: lobos embraced that ethos but didn't bother to demonstrate it.

0:39 Raynes: Everybody has to stop shitting rainbows!

0:40 Why haven't we made him a meme yet? The shitting rainbows bit was golden.

0:40 callen: technomancy: mostly because they seem to use the REPL for migrations (lolwut)

0:40 technomancy: callen: lobos is deeply misguided

0:40 callen: technomancy: oh do tell.

0:40 technomancy: callen: the idea that you can write database code targeting one DB and use it on another.

0:40 callen: aha, welcome to why I use migratus.

0:41 * callen tests his heroku account again

0:41 technomancy: it's a losing battle, but by the time you realize it you've already sunk hundreds of man hours into it

0:41 callen: sigh, I went to upload a screenshot of the Heroku HTTP 500 I'm getting

0:41 Raynes: callen: Speaking of breaking websites, I once permanently broke 3 different repositories that I created while testing the Github API in my tentacles library.

0:41 callen: went to imgur, got an HTTP 502

0:41 god dammit.

0:41 Raynes: callen: I could not even delete them.

0:42 technomancy: schema definitions are completely nonstandard and if you think you can abstract over the differences you haven't used enough databases

0:42 callen: Raynes: wait what. How'd you do that?

0:42 technomancy: callen: wait, a screenshot?

0:42 juldre: BTW what is the difference between http://clojuredocs.org/ and http://clojure-doc.org/ ??

0:42 Raynes: callen: I do not remember.

0:42 juldre: came as a bit of a confusion to me initially

0:42 yogthos: haha no relation :)

0:42 Raynes: They are completely different and unrelated websites.

0:42 yogthos: one's a really nice lib documentation site the other is general docs

0:42 Raynes: Complain to Michael Klishin (PLEASE) about not picking a good name.

0:42 yogthos: clojuredocs is really handy for reference

0:42 technomancy: juldre: the maintainer of clojuredocs.org is MIA and moving it to a clojure backend is a work in progress

0:43 callen: technomancy: http://i.imgur.com/NM0xc.png

0:43 juldre: don't use clojuredocs unless you have to.

0:43 Raynes: technomancy: I remember loling hard when I saw that clojuredocs was a Ruby site.

0:43 callen: Raynes: WOW, ouch.

0:43 yogthos: lol

0:43 technomancy: Raynes: I loled too, but then it actually took off =\

0:43 callen: I still resent the apps that are ruby front/clojure back.

0:43 yogthos: hey planet clojure runs on python :P

0:44 technomancy: callen: deployment mullet!

0:44 mpan: what particular issues are there with clojuredocs?

0:44 callen: technomancy: oh nice nomenclature.

0:44 technomancy: mpan: rails

0:44 Raynes: It is old outdated buggy unmaintained and rails.

0:44 yogthos: the content is fine :)

0:44 callen: mpan: abandonment.

0:44 Raynes: It even stole my commas.

0:44 jkkramer: is it open source now?

0:44 bbloom: Raynes: i nominate you to upgrade it. chop chop

0:44 mpan: what's the recommended alternative? just (doc)?

0:45 Raynes: callen: https://github.com/Raynes/edited-tentacles-test2

0:45 jkkramer: ah yup, looks like it is. for a while it wasn't

0:45 Raynes: callen: This repository exists. Figure that one out, bro.

0:45 callen: Raynes: it...404s...

0:45 Raynes: callen: https://github.com/Raynes You can see it on my repo list.

0:45 I even told Github about it but they never responded.

0:45 I hope they fixed whatever I did, because it's pretty nasty.

0:46 callen: Raynes: it just tried to clone...then asked for a login?

0:46 technomancy: Raynes: where is the lazy bot?

0:46 jkkramer: Raynes: you're the reason github was down over the weekend, aren't you?

0:46 callen: even though my github has been auth'd for awhile?

0:46 Raynes: technomancy: Dead.

0:46 jkkramer: Haha, this was ages ago.

0:46 technomancy: jkkramer: yeah, I couldn't believe he released it without the source; ugh

0:46 Raynes: technomancy: It was really the worst case scenario documentation site.

0:46 callen: Raynes: fatal: https://github.com/Raynes/edited-tentacles-test2/info/refs not found: did you run git update-server-info on the server? <--- the hell did you do to their service?

0:47 technomancy: Raynes: just good enough to keep someone else from doing a proper job of it?

0:47 * Raynes smiles smugly, satisfied with himself.

0:47 callen: Raynes: if I had to guess, you broke the layer between git and their persistence layer.

0:47 Raynes: but I don't know enough about GitHubs' black magic to say for sure what exactly.

0:48 Raynes: callen: My face is exactly the picture on the github page, sans the blue hair.

0:48 Man, I need blue hair again. I don't feel right without colorful hair.

0:48 technomancy: Raynes: fsbot over in #emacs has a ,revive command that's useful in scenarios like this

0:48 mpan: Raynes: do people treat you weird for it where you live? (if I may ask)

0:48 technomancy: sprinkling holy water, muttering enchantments, etc

0:49 Raynes: mpan: In Alabama? Only ever gotten compliments and cute remarks. You never see things like it here so I think people enjoy it as a novelty more than they hate me for my rebellion.

0:50 But the ones that inevitably do hate me for it remain quiet.

0:50 mpan: Raynes: that's really interesting to hear

0:50 I vaguely remember the south being very enforcing of conformism

0:50 Raynes: I imagine in LA people won't even notice. I'll be the normal one with blue or green hair.

0:50 yogthos: yeah it's like that here in Toronto

0:50 Raynes: At least where I live, it's mostly religion and homosexuality that people are very clearly set in their ways on.

0:50 yogthos: the normals are the ones who stand out :P

0:50 callen: mpan: I didn't have that experience. I don't think they mind as long as you're not promulgating something they don't like like homosexuality.

0:51 Raynes: I've definitely seen the religious hatred and homophobia.

0:51 callen: so if you don't have an aborted fetus or leather daddy on your shirt, you're probably okay.

0:51 mpan: eh, they treated me weirdly in school

0:51 callen: mpan: I'm sorry to hear that.

0:51 mpan: but to what extent that was my identity vs my personality vs my generally being different

0:51 I can't honestly say

0:52 er, I honestly can't say, rather

0:52 callen: mpan: hard tellin'. I'm a white dude in the USA, I'm not really in a position to be oppressed.

0:52 those that tried, in school, usually ended up coming to some sort of harm.

0:52 Raynes: I never went to any schools, but I cower in fear from thoughts of how I might have turned out if I had.

0:52 mpan: none at all?

0:52 callen: Raynes: you would've done a lot less programming.

0:53 Raynes: Indeed.

0:53 mpan: were you home schooled?

0:53 Raynes: Yes.

0:53 mpan: oh cool

0:53 Raynes: Not for religious reasons, thankfully.

0:53 technomancy: waste a lot less time that way

0:53 callen: Raynes: when I was in High School, it was a never-ending battle between school and time for programming. between myself, parents, faculty, etc.

0:53 I should've been homeschooled.

0:53 Raynes: I am a huge advocate of home schooling simply because you have no much free time that you can choose to do whatever you want with.

0:54 bbloom: could always have done what i did my senior year of high school:

0:54 callen: bbloom: well I spent the last third of my senior year in school suspension and used that as an excuse to mostly stop showing up and instead play hookie with my girlfriend.

0:54 bbloom: figure out which teachers were cool enough to let me skip class and re-arrange your schedule such that you can cut out 4 periods early and go to work

0:54 callen: bbloom: to my credit, I did get some coding done.

0:54 in school and out of it.

0:54 Raynes: The only downside of home schooling is that it can be hard to develop a social life, but what people don't seem to realize is that the kind of social life you get in some high schools can quite literally *make* you an idiot.

0:55 technomancy: IME a good portion of institutionalized schooling exists primarily to keep kids out of trouble rather than to actually instruct.

0:55 bbloom: i worked for a little software company where i started out doing data entry. my boss was always like "hey, it's 11am on a wednesday... aren't you supposed to be in school?"

0:55 callen: technomancy: the worst trouble I could've gotten into was drinking too much mountain dew while playing video games with my friends. Not much to fear there.

0:56 Raynes: Your kidneys might disagree.

0:56 technomancy: proper instruction simply doesn't scale to fit the staffing levels that are feasible in a typical school

0:56 callen: well it wasn't exactly designed with you in mind

0:56 callen: technomancy: that's why I figgered I shoulda been home-schooled.

0:56 technomancy: though using the term "designed" makes it sound less emergent than it is

0:56 bbloom: technomancy: i think that staffing is only a tiny part of the problem. i know a whole bunch of teachers at private schools with small class sizes... they'll tell you that the real issue is that they are glorified baby sitters b/c they always have some terribly disruptive students

0:57 smaller class sizes basically just reduce the probability of disruption, but don't eliminate it

0:57 callen: bbloom: could just do what the Germans do

0:57 bbloom: which is?

0:57 callen: bbloom: damn the disruptive young ones to a blue collar future so the serious students can get on with it.

0:58 UK does a similar thing, but that was really more about class warfare.

0:58 yogthos: that german efficiency :P

0:58 technomancy: bbloom: well, a society that's incapable of disciplining students gets what it deserves

0:58 yogthos: I think the main issue with schooling is that it tends to punish curiosity

0:58 Raynes: technomancy: IIRC, they still use paddles at a nearby school.

0:58 callen: Raynes: that's just precious.

0:58 Raynes: Indeed.

0:58 technomancy: just wait for the first lawsuit

0:58 Raynes: I had a friend with first hand experience.

0:59 technomancy: It has been going on for a long, long time. I don't think anybody cares.

0:59 bbloom: heh, i know some israels who speak highly of mandatory military service... maybe we should mandate military service for those with low GPAs.... or maybe mandatory military service for the PARENTS of kids with low GPAs :-P

0:59 i kid, i kid

0:59 yogthos: that was the soviet system incidentally :P

0:59 bbloom: Raynes: are either of your parents programmers? / what do they do?

0:59 mpan: bbloom: furthering encouraging GPA optimization? that sounds risky

1:00 yogthos: you either did well in science/math or army for you :)

1:00 bbloom: mpan: mostly kidding

1:00 callen: mpan: it works better when you have an authoritarian gov't like the Soviet Union where gaming the system is marginally harder.

1:00 mpan: perhaps

1:00 Raynes: bbloom: My mother is on disability because of Crohn's disease and back problems, my aunt is on disability for significant back problems and… stuff, and my father is an alcoholic, mostly.

1:00 I wouldn't know what he is up to these days.

1:01 mpan: like half my high school pretty much optimized for GPA over actual learning

1:01 Raynes: I think he used to do various labor jobs, like roofing and building.

1:01 I imagine he still does.

1:01 mpan: but they're "successful" and I'm not, so maybe I'm just sour grapes

1:01 bbloom: Raynes: so did one of them home school you? or are you entirely self taught?

1:01 yogthos: that doesn't change in university either unfortunately

1:01 Raynes: My aunt home schooled me, but mostly self taught.

1:01 yogthos: people just learn to cram for exams and tests

1:01 callen: I've done reasonably well for myself despite being a uni dropout.

1:01 mpan: yea university felt quite that way as well

1:01 bbloom: Raynes: that's quite a super hero origin story

1:01 yogthos: actually understanding stuff is not required

1:01 callen: It turned out that I found real work far more inspiring.

1:02 Raynes: bbloom: Despite not being home schooled for religious purposes, the only home school thing nearby was a Christian school. As such, the science books and such were utterly worthless. I didn't have much of a choice.

1:02 yogthos: I enjoyed it as exploration time, didn't get much out of most of my courses though :)

1:02 Raynes: How is babby formed? "GOD!"

1:02 yogthos: oh dears :)

1:02 technomancy: Let's bring back apprenticeships

1:03 we can make the apprentices fix the Windows bugs

1:03 jkkramer: yeah man. I want myself a lackey

1:03 bbloom: technomancy: i'm totally down with that. that's basically how i learned code: from a guy a few years older than me who learned from his father

1:03 yogthos: lol just burn windows, burn it with fire!

1:03 callen: I basically apprenticed too, but indirectly.

1:03 Raynes: callen: I'm moving to LA for a full time job in February with no college. Am I going to end up like you? Because I'll totally go to college if so.

1:03 mpan: I think I'd actually enjoy being an apprentice for a while, but I missed my chance with internships

1:03 callen: I'd be down with bringing apprenticeship back.

1:04 Although what we call apprenticeship currently exists as "sub-contracting"

1:04 mpan: and "internships"

1:04 callen: Raynes: how angry are you?

1:04 yogthos: can you guys imagine life like 30 years ago, pre internet

1:04 I was thinking about that a little while back

1:04 Raynes: callen: Well, I still enjoy talking to you.

1:04 callen: yogthos: yes, I call it the birthplace of Unix.

1:04 yogthos: you'd basically grow up only knowing people around your geo location

1:04 and then you'd get a job probably locally

1:04 and only talk to people there

1:05 Raynes: yogthos: We would have found each other anyways, baby. <3

1:05 callen: Raynes: well I was going to say that as long as you aren't perpetually angry you'll be alright. Also, make lots of friends. Like, make an active effort to that end. Meatspace ones.

1:05 yogthos: it's scary stuff :P

1:05 haha

1:05 mpan: I worry what I would have done for a living if I had lived 30-40 years earlier

1:05 Raynes: I would have been a meteorologist.

1:05 callen: mpan: I'd have ended up becoming a pirate electrician.

1:05 Raynes: Not hard for me to figure outt hat one.

1:05 technomancy: even in college, the amount of stuff I learned increased dramatically once I got a wifi card and could get online from the classroom =)

1:05 jkkramer: mud farmer

1:05 technomancy: well, outside humanities anyway

1:05 ibdknox: My co-founder and I were going to go to culinary school

1:05 mpan: Raynes: I hear that field has an absolutely absurd surplus of people vs jobs

1:05 Raynes: I know more about storms than everybody in this IRC channel combined.

1:06 yogthos: with internet you just need a few people around the globe to share an interest and bam you can hang out and do shit :)

1:06 Raynes: mpan: I didn't say I'd be employed. ;)

1:06 callen: technomancy: in my personal studies I found the humanities stuff really enriched my ability to leverage what I knew in other realms.

1:06 Raynes: are you just fascinated with storms?

1:06 mpan: I suppose I could have become a meche in another life, or something

1:07 Raynes: callen: Terrified of them. It's easier to protect yourself from things you understand.

1:07 callen: LOL

1:07 technomancy: callen: absolutely. I just meant it was one of the few places in which I learned more from actually going to class vs teaching myself.

1:07 callen: Raynes: I used to ride a 350cc enduro through thunderstorms in Ohio in the mud

1:07 technomancy: course that was classical education rather than lectureware

1:07 Raynes: It's mostly tornadoes that I worry about.

1:07 ibdknox: technomancy: ?

1:08 callen: technomancy: ditto, although ocw.mit.edu taught me a fair bit about CS.

1:08 technomancy: ibdknox: I guess what I'm trying to say is that I was in a really crappy CS program =)

1:08 mpan: hm, well, good night from the east coast, folks

1:08 gonna get some sleep and try to maintain half a sane sleep wake cycle

1:08 Raynes: mpan: Good night.

1:08 ibdknox: Hey.

1:08 ibdknox: You.

1:08 yogthos: g'night

1:09 callen: technomancy: I think part of the reason for that is that liberal arts benefits more from informed synthesis than CS and programming. CS and programming seem to work better with differentiated presentations of the same material until one "clicks" and then you move on.

1:09 Raynes: ibdknox: Did you talk to Alex Baranosky? Dude wants to take over Korma and is really excited about it.

1:09 callen: mpan: g'night.

1:09 Raynes: callen might also be interested in knowing that.

1:09 callen: I'm what

1:10 Raynes: That there is a maintainer for Korma stepping up.

1:10 ibdknox: He emailed me, earlier, need to respond

1:10 I'm really excited about it too

1:10 Raynes: ibdknox: Please do. He is the real deal. He does what he says he is going to do. See slamhound.

1:10 ibdknox: because he's done great work in other places

1:10 yeah

1:10 callen: so should I start pestering him?

1:10 ibdknox: callen: let him get up to speed first :p

1:10 Raynes: Well, I'd give it a few days. ;)

1:10 callen: ibdknox: no, no breathers!

1:10 STURM UND DRANG! SCHNELL!

1:11 oh Runa employee, right.

1:11 one of rathore's people.

1:12 juldre: One more question guys, in CCW how can I run commands like "lein ring server" in the embedded REPL ?

1:12 ibdknox: callen: rathore's not at Runa anymore

1:12 callen: Raynes: one of the problems with applying for a job in Lisp is that you're now competing with Lisp programmers for the job.

1:12 ibdknox: oh he'd just announced departure right?

1:12 Raynes: callen: Luckily I'm pretty damn good.

1:12 callen: like a week ago or so?

1:12 * Raynes files his nails.

1:12 juldre: I figure thats how the server is started but i can't seem to be able to run it in the embedded env, only in an external terminal

1:12 yogthos: juldre: you can't you'd need a main

1:13 technomancy: juldre: whatever you're running from the command line, you can run in the repl

1:13 just find the -main function and call it

1:13 juldre: yogthos: what should the main contain ?

1:13 ibdknox: I thought it was a good while ago. He talked about his new project at strange loop in september

1:13 yogthos: callen: my trick has been to slowly infect my workplace with clojure :P

1:14 juldre: make a new Leiningen project in eclipse and change template from default to compojure-app

1:14 juldre: it'll set it all up for you

1:14 callen: yogthos: I'm musing a similar approach. I'm a pseudo-CTO so I've got better leverage to that end.

1:14 yogthos: I end up writing most of it anyway, so they don't really have a choice.

1:14 * callen cackles evilly

1:14 yogthos: callen: it took me about 2 years, but now we have a team working mostly in clojure and actual production use :)

1:14 callen: same here :P

1:14 callen: yogthos: that's damned impressive, where at?

1:15 yogthos: callen: it started with this https://github.com/yogthos/clj-pdf

1:15 I work here http://www.uhn.ca/clinics_&_Services/services/SIMS/index.asp

1:15 being public sector has some advantages :)

1:15 callen: yogthos: very cool. I'm a little terrified of anything that involves PDF, I must confess.

1:16 yogthos: mainly open sourcing tends to be easy seeing how we're run by tax money to begin with :)

1:16 callen: we had to do report generation and if you've ever used iText it's not pretty :)

1:16 I also made it into a service :) http://yogthos.net/instant-pdf/

1:16 callen: yogthos: I tend to start with "All rights reserved" and then turn stuff into open source libraries on a case-by-case basis.

1:17 yogthos: I work mostly on startups / on contract though, so that'd be why.

1:17 technomancy: if you write it assuming it's going to be OSS in the end it makes a lot of things easier, even if it never ends up that way

1:17 yogthos: callen: for me it was easier to start the lib open source and then go oh yeah I'm using this lib here to make pdfs that I made :)

1:17 callen: technomancy: i get your meaning there, but I can't make that choice.

1:17 yogthos: callen: with startups you have a good chance to sneak clojure in too :)

1:17 callen: people tend to be a lot more open minded

1:17 callen: technomancy: I'm working towards the profit of a private entity, always. I consider open source to be something I do on "me-time"

1:17 er

1:17 wtf

1:18 change the technomancy to yogthos above.

1:18 clearly it's time for more vodka.

1:18 yogthos: ha!

1:19 juldre: yogthos: works great thanks

1:19 yogthos: juldre: good stuff

1:19 callen: but yeah amount of push back I got initially was crazy

1:19 callen: yogthos: oh don't worry, I was dealing with almost immediate push-back the moment I mentioned it.

1:19 yogthos: "IT'S A LISP?!!>!!231341231"

1:19 yogthos: callen: in the end it all boils down to "how are we going to find people who know clojure"

1:20 callen: yogthos: you don't, you train a Java/Ruby/python programmer.

1:20 yogthos: callen: I didn't have much problem with the team, it's the management!

1:20 callen: well exactly

1:20 callen: I had pushback from team too :(

1:20 yogthos: callen: the nature of the industry is things change!

1:20 ibdknox: fuck managers ;)

1:20 yogthos: callen: why would you hire somebody who can only do one thing and not learn anything new

1:20 bbloom: "how are we going to find people who know clojure"

1:20 callen: yogthos: explaining to managers that it's really not that big of a deal to learn a new programming language is the struggle of my last few years.

1:20 yogthos: hear hear

1:21 Raynes: ibdknox: Listen to Cinderella Man by Eminem. I always imagine this song is about us.

1:21 callen: yogthos: precisely.

1:21 yogthos: well what's amusing is that people have to learn a ton of shit anyways

1:21 ibdknox: Raynes: haha

1:21 yogthos: language is a small part of it

1:21 bbloom: is code for "how are we going to fend off all of these awesome canidates that want to write clojure?"

1:21 yogthos: you work on a java project in one company and you go to another

1:21 ibdknox: bbloom: lol

1:21 yogthos: chances are you have to learn new tools, libs, frameworks, etc

1:21 Raynes: ibdknox: You have to listen to the whole thing, no matter how much you hate Eminem or rap music.

1:21 callen: yogthos: case in point, I've spent the last day or two battling migration libraries. lol.

1:21 yogthos: and if you can't learn a language how are you going to learn the rest of it :)

1:21 technomancy: Raynes: that's a lot to ask

1:21 Raynes: technomancy: I know, man.

1:22 callen: Raynes: k, you've piqued my curiosity

1:22 ibdknox: technomancy: every once in a while you have to take one for the team, you know?

1:22 bbloom: maybe link them to http://www.paulgraham.com/avg.html ?

1:22 Raynes: technomancy: I hate rap and anything relating to it, but I have this strange affection for Eminem's Recovery album.

1:22 ibdknox: bbloom: that is surprisingly ineffective

1:22 callen: Raynes: just so you know, you're interrupting Russian Pop music and norwegian black metal. This better be good.

1:22 bbloom: I don't think PGs Reality Distortion Field works on managers.

1:22 Raynes: callen: The part that I enjoy is mostly the latter half of the song.

1:23 There are some lyrical gems in there.

1:23 yogthos: callen: my approach to managers is that it's easier to ask forgivness :P

1:23 callen: ogad, I'm listening to Eminem and I'm nearly out of vodka.

1:23 yogthos: engineer pushback prevented that approach

1:23 Raynes: callen: I've infected you.

1:23 callen: yogthos: I have a blubby Java/Spring dev I can't seem to rid myself of.

1:23 bbloom: callen: maybe point out the value of YC's portfolio? :-P

1:23 yogthos: callen: ah shitty :)

1:23 callen: yogthos: he complains...loudly.

1:23 yogthos: callen: I know that problem :P

1:24 callen: my approach is we go to a meeting discuss what we'll do in the next month, I go back and write it in a couple of nights :P

1:24 callen: I don't understand why he's working in startups. At all.

1:24 technomancy: the only rap I can handle is the overclocked remix rap battle between link and gannon: http://hvv.ocremix.org/project.html

1:24 yogthos: callen: then next meeting oh yeah I already have it working, why don't we use it "interm" and rewrite when we need to

1:24 callen: after all it's just a jar, we can always swap it out with a java one later :P

1:24 callen: technomancy: jesus I'd nearly forgotten about OCRemix. way to start me on another musical sprint.

1:24 Raynes: callen: Once you've listened, I'll point out what I actually like about the song, because there is a 90% chance you'll hate everything about it.

1:25 yogthos: callen: fast forward to later, oh yeah project is a in a crunch and there's no way we'll have time to replace anything might as well keep it

1:25 callen: works surprising amount of time :P

1:25 callen: Raynes: it involves storms.

1:25 technomancy: better link: http://hvv.ocremix.org/music.html#link

1:25 no pun intended

1:25 yogthos: haha

1:26 callen: Raynes: I have no opinion. it's a white dude rapping.

1:27 technomancy: callen: how about a white dude ... from Hyrule?

1:27 callen: I generally can't do rap.

1:27 bbloom: on topic for a moment: is there an intersperse function in core? ie equivalent to (#(next (interleave (repeat :comma) %)) [:foo :bar :baz])

1:27 Raynes: I just jumped to Windows, so if anyone said anything to me in the last 45 seconds or so, I missed it.

1:27 yogthos: interpose?

1:28 callen: bbloom: find-fn?

1:28 yogthos: %(interpose "," (range 5))

1:28 bbloom: yogthos: aaaah THANK YOU

1:28 Raynes: &(interpose "," (range 5))

1:28 lazybot: ⇒ (0 "," 1 "," 2 "," 3 "," 4)

1:28 yogthos: ah right :)

1:28 bbloom: no idea why i couldn't ever find that

1:28 callen: bbloom: you warmed my cockles, I feel better about not being able to beat amalloy_ on 4clojure now.

1:29 yogthos: speaking of which TIL about string/join instead of (-> foo interpose str) thanks Raynes :)

1:29 technomancy: interpose is still shorter unless you need to use it multiple times

1:29 Raynes: callen: Specific things I like about the song: "F*ck catching lightning, he struck it, screamed shut up at thunder, flipped the world upside down and made it rain upward."

1:29 technomancy: since clojure.string requires adding a :require clause

1:30 Raynes: callen: "Hot enough to melt hell and burn Satan too, fry his ass and put his ashes back together with glue."

1:30 yogthos: true

1:30 callen: Raynes: do you and ibdknox both hate storms?

1:30 Raynes: callen: See, I can't even *imagine* lyrics like this, so I'm fascinated by people who can.

1:30 ibdknox: I love storms

1:30 callen: Raynes: Eminem is a noted lyricist.

1:31 Raynes: ibdknox is also in San Francisco and is not allowed to declare his love for storms until he has been a few miles away from over 100 people getting torn to bits by an EF4 tornado.

1:31 * technomancy misses monsoons

1:31 callen: technomancy: from wheer?

1:31 ...where.

1:31 yogthos: I guess sf is more about quakes :)

1:31 technomancy: callen: southeast asia

1:31 yogthos: I used to live in LA a while back and got hit by a 6.7

1:32 was not fun

1:32 technomancy: where the rain is warm

1:32 callen: yogthos: I never notice them here.

1:32 technomancy: oh, yeah, I was in SE Asia on the tail-end of that. Was pretty nice.

1:32 technomancy: you never get proper torrents in Seattle, just drizzle

1:32 callen: technomancy: cold drizzle.

1:32 technomancy: callen: yeah, that's what makes all the difference

1:33 yogthos: callen: if a 6+ hits you'll notice

1:33 ibdknox: Raynes: I was born in ohio

1:33 callen: ahoy fellow Ohioan.

1:33 technomancy: used to look forward to rain to cool things off, plus you knew that it'd be cleared up by 3pm anyway.

1:33 ibdknox: I remember being at my grandparents one time with 6 tornados on the ground

1:33 callen: Ohio produces the best people...but they leave :)

1:34 yogthos: I guess unless you want to work for the airforce there's not much to do there :)

1:34 ibdknox: technomancy: that was one thing that I missed while I was in seattle

1:35 callen: yogthos: not totally true. some excellent cost of living arbitrage to be had there.

1:35 yogthos: especially if you're a mercenary contractor like I was.

1:35 bbloom: ibdknox: the one thing? are you forgetting about... oh... i dunno... THE SUN?

1:35 yogthos: callen: ah now I know :)

1:36 ibdknox: bbloom: we got lots of that during the summer!

1:36 callen: bbloom: he's got a startup now, he doesn't have time to see the sun.

1:36 ibdknox: I have no idea why

1:36 technomancy: it took me like two and a half winters to actually start to appreciate the sun when it came

1:36 ibdknox: but that really never bothered me

1:36 yogthos: the day star is my nemesis! :P

1:36 technomancy: getting over the horrible damage that los angeles did to my psyche I guess

1:36 bbloom: callen: now that he doesn't have to use Windows he can use little-w windows

1:36 Raynes: ibdknox: In the same place

1:36 ?

1:36 callen: bbloom: vut.

1:37 Raynes: ibdknox: That doesn't really happen. You probably mean 6 tornado warnings at the same time.

1:37 ibdknox: There were 15 tornado warnings at one time yesterday, all for separate storms.

1:37 bbloom: bad pun on MS windows and actual windows in which he can experience the sun w/o leaving work

1:38 callen: Raynes: http://www.onntv.com/content/stories/2012/03/03/story-tornados-in-ohio.html

1:38 Raynes: callen: Right, that isn't surprising, but I'm trying to tell if he meant 6 tornadoes from the same storm in one place or if he meant 6 tornado warnings.

1:40 callen: technomancy: are you a fan of the legend of zelda series?

1:40 ibdknox: Raynes: nope, 6 actual tornados on the ground

1:40 technomancy: callen: I haven't really kept up with the series beyond the SNES version =)

1:41 ibdknox: within like a 200 mile radius or something, my grandfather used to work for the weather service

1:41 he loved that shit

1:41 technomancy: Link to the Past is fantastic though

1:41 callen: technomancy: hey I have a similar background with it. Loved the NES and SNES versions, lost interest with Ocarina though

1:42 Raynes: ibdknox: 6 ground confirmed tornadoes on the ground then.

1:42 ibdknox: yeah

1:42 I liked ocarina

1:42 Raynes: ibdknox: Was this the Super Outbreak? Were you even old enough for that?

1:42 ibdknox: majora's mask was a little ridiculous

1:42 technomancy: callen: I heard a lot of people loved Ocarina; I've been waiting for emulation to get good enough to give it a shot.

1:42 callen: technomancy: the emulation is there, now.

1:42 technomancy: I tried to get into it, couldn't. I'm a devotee of the 2d era for that sort of thing.

1:42 ibdknox: technomancy: yeah you can easily play n64 games at perfect frame rate

1:43 technomancy: cool; last time I checked was like five years ago

1:43 callen: technomancy: yeah it's good enough now. Especially for a ridiculously popular game like Ocarina.

1:43 yogthos: ibdknox: even on your phone probably :P

1:43 callen: everybody and their sister optimizes their emulator for Ocarina.

1:43 ibdknox: I actually went and bought an SNES for link to the past and super metroid

1:43 technomancy: heh; makes sense

1:44 callen: ibdknox: tempting...

1:44 Raynes: technomancy: I think Emulation is good enough now.

1:44 technomancy: If you're willing to get mupen64 working properly.

1:44 technomancy: ibdknox: what kind of hoops do you have to jump through to hook it into a modern television?

1:44 ibdknox: technomancy: the later versions had RCA out

1:44 technomancy: huh

1:45 tempting, but I'd have to find a place for an actual television too

1:45 ibdknox: I missed the controllers

1:45 emulating just isn't the same

1:45 and as those are consistently rated two of the best games ever made, I figured why not

1:45 technomancy: yeah you can get fairly good playstation-alike controllers, but not so much for snes

1:46 be sure to get Chrono Trigger too

1:46 if you haven't played it

1:46 yogthos: technomancy: now that's a fantastic game!

1:46 technomancy: maybe FF6 if you can find it, though from what I hear the official translation is pretty bad compared to the fan ones.

1:46 ibdknox: I never have and I want to, but it's stupidly hard to get

1:46 technomancy: yeah, shame

1:47 callen: there are USB adapters for real SNES controllers

1:47 and N64, NES, Genesis, etc.

1:47 bbloom: the wired xbox 360 controllers are pretty good substitutes

1:47 callen: that's what I use, but adapters exist.

1:48 bbloom: the wired controllers were highly coveted among game devs, since xboxes came with wireless, but those would turn off while you were staring at the debugger

1:48 technomancy: hah

1:48 bbloom: i think after like 3 years they finally switched the dev kits to come with wired controllers

1:48 ibdknox: ps3 controllers will just hook direectly to a mac

1:49 callen: ibdknox: that hasn't worked great for me in the past.

1:49 ibdknox: it works wonderfully in the mountain lion

1:49 yogthos: same here, though I did get a wiimote to work with dolphin :)

1:49 new super mario for wii was pretty playable

1:49 callen: I got a wiimote to work reaaaasonably well, but the PS3 controller never was quite right.

1:52 I wonder how many times that second-click to do a pull request on github has saved me from making an ass of myself?

1:52 yogthos: ha

1:55 bbloom: what's the idiomatic way to convert a record to a map?

1:58 callen: bbloom: I'm unaware of any established idiom or function. Go with your gut, I'd say.

1:59 jkkramer: bbloom: (into {} arecord) ? A record is already map for many purposes

1:59 bbloom: jkkramer: ah, that seems nicer. yeah i want to strip the type for equality

2:00 callen: jkkramer: nice!

2:02 yogthos: re: all the tornado business earlier :P http://io9.com/5971273/could-a-captive-tornado-power-an-entire-city

2:02 callen: I feel a bit like gollum with the elven rope around his neck whenever I have to interact with the Java ecosystem from Clojure.

2:02 "IT BUUUUUURNS USSS"

2:02 ibdknox: anyone have a raspberry pi?

2:03 yogthos: ibdknox: got one here

2:03 callen: ibdknox: serious question, what's the appeal of those things? the constraints?

2:03 ibdknox: callen: I want to build a robot

2:03 yogthos: what do you do with it/what do you use to program it?

2:04 bbloom: is there a reasonable way to easily customize behavior for str, pr, and pprint all at the same time?

2:04 yogthos: ibdknox: I made a mamebox out of it

2:04 callen: ibdknox: rumor has it Go makes for a nice cheap-n-cheerful embedded lang.

2:04 bbloom: particularly if i want to print as a tagged literal ?

2:04 yogthos: ibdknox: boring I know :) but it has a debian distro so pretty much anything you want runs on it

2:04 callen: yogthos: MAME games will run on an RPI?

2:04 yogthos: callen: some

2:04 Rich_Morin: FYI: http://gigasquidsoftware.com/wordpress/?p=560 (Hobby Languages for Clojurists)

2:05 callen: going to concur with "adorable mascot"

2:05 yogthos: http://ipggi.wordpress.com/2012/11/26/mame-arcade-game-fun-with-a-raspberry-pi/

2:05 callen: I have the Go Gopher on my desk.

2:06 too bad I get tired of for loops quickly.

2:06 Rich_Morin: dude. J.

2:06 Rich_Morin: I love the APL family.

2:06 yogthos: is factor still maintained by anybody?

2:07 ibdknox: apparently node runs pretty nicely on it

2:07 I could make a CLJS robot :D

2:07 callen: yogthos: yeah the crazy slav dude.

2:07 Rich_Morin: callen: I have a button from DEC: "VAX-11 APL -- Array of Hope"

2:07 jkkramer: bbloom: not that I know of. there's toString, print-method, print-dup, and clojure.pprint/simple-dispatch to implement

2:07 ibdknox: could even use core.logic build a constraint system for it

2:07 yogthos: callen: I thought he got bored of it

2:07 ibdknox: you can run the jvm on it

2:07 callen: yogthos: oh, guess i'm wrong then. the problem was that factor destroyed the point of it all.

2:07 yogthos: Factor killed the joy of APL langs.

2:07 yogthos: callen: :)

2:08 callen: I'm serious.

2:08 bbloom: Factor is seriously cool

2:08 jkkramer: k thanks

2:08 callen: if I'm using a concatenative language, I fully expect my code to look like glyphs from a Wizard's Grimoire.

2:08 bbloom: jkkramer: i'll study it a bit more & then post something to the clojure list, b/c this is something i've wanted a number of times

2:09 yogthos: ibdknox: apparently startup times are pretty brutal http://stackoverflow.com/questions/14040196/improving-startup-time-of-clojure-repl-with-leiningen-on-the-raspberry-pi

2:10 apparently haskell runs on it though http://www.haskell.org/haskellwiki/Raspberry_Pi

2:10 jkkramer: bbloom: i had to customize that stuff recently and it involved more research and experimentation than I expected

2:10 bbloom: jkkramer: printing is really hard in general

2:11 jkkramer: for speed, you need to do the side effectual (.write writer a-string) thing

2:11 jkkramer: yeah

2:11 bbloom: but what you really want is a composable grammar that generates a parser and a pretty printer for you

2:12 i wonder if you could also generate a fast writer from that....

2:12 probably good :-)

2:12 could*

2:12 jkkramer: I would think so. I encourage you to shave that yak

2:13 bbloom: jkkramer: that's quite a yak....

2:14 callen: my yak-shaving usually comes in the form of the original yak. Emacs.

2:15 bbloom: the pretty printer that's in clojure now is very common-lisp-y... i've considered doing a more clojure-y one

2:15 just cus every good programmer has to write at least one pretty printer in their lifetimes

2:18 callen: bbloom: hey. hey.

2:19 Rich_Morin: bbloom: Go takes pretty-printing VERY seriously: code has to be formatted just so...

2:19 callen: Rich_Morin: Go was made to serve Google's needs.

2:19 Rich_Morin: they have to collectively martial the efforts of thousands of engineers.

2:19 amusingly, in the process, they invented a language less hackerish than C and less powerful than Java.

2:20 Rich_Morin: True, but I believe that Rob and Ken would have told the mgmt to take a hike if they got overweening...

2:20 callen: Rich_Morin: I don't really trust Pike's judgment tbqh. Ken I do though.

2:21 Rich_Morin: Of course Ken isn't allowed to check in C code at Google...

2:21 callen: Rich_Morin: he never bothered with the certification process.

2:22 Rich_Morin: yep :-)

2:22 callen: Rich_Morin: and that process was for C++, not C code.

2:22 Rich_Morin: C isn't an official language at Google.

2:22 not in the same way C++ and Java are.

2:22 Rich_Morin: I'm pretty sure Ken just writes code for the compiler and other people end up vetting it and checking it in.

2:23 hiredman: I would love to have something like gofmt for clojure

2:23 callen: hiredman: well it'd be easy to do.

2:24 hiredman: delimiters galore.

2:25 bbloom: callen: it's only easy if you do like gofmt does and have ZERO OPTIONS

2:25 if you include lots of settings, then pretty printers are stunningly complex

2:25 callen: bbloom: you don't need any for Go. it doesn't recognize the existence of anything other than the official style.

2:25 bbloom: I don't doubt it, I was really just cracking a joke about S-expr

2:26 bbloom: callen: which absolutely brilliant for a bigco language

2:26 callen: bbloom: I'm sorry?

2:26 bbloom: If I ever had to work with a large, rapidly changing, team of mediocre developers (ie any large company, including Google) ever again, then i'd demand it be with Golang

2:27 Go is brilliant from that perspective

2:27 it's got lots of ugly bits, but it's far prettier than C

2:27 ibdknox: I mean emacs's indentation has more or less been turned into the standard

2:27 we could just rip that out into a lib

2:27 bbloom: and it's got some of the bondage nonsense of Java, but only where it proved valuable, and not where it didn't

2:28 ibdknox: I wonder what Clojure with a bunch of "mediocre" devs would be like

2:28 bbloom: ibdknox: unholy.

2:28 callen: ibdknox: excessive defrecord?

2:28 ibdknox: lots of if and do?

2:28 bbloom: ibdknox: do you do any pretty pretty printing & formatting in LT?

2:28 yogthos: ibdknox: can't be worse than java with a bunch of mediocre devs :P

2:28 ibdknox: the things I've seen *shudder*

2:28 bbloom: yogthos: oh yes it can.

2:29 ibdknox: yogthos: yeah, I'm not convinced it would really be worse

2:29 callen: bbloom: I'm not so sure.

2:29 yogthos: bbloom: classes inevitably turn into twisty mazes of passages all alike ;)

2:29 callen: bbloom: people back in CL-land always liked to say that macros would make mediocre devs truly dangerous

2:29 I'm not so sure.

2:30 yogthos: bbloom: I agree with callen, I think clojure would keep people more focused on the actual problem

2:30 callen: for one thing, I'm not convinced the mediocre devs would've ever figured out quote/unqoute.

2:30 for another, Clojure in particular I think would do what yogthos describes.

2:30 bbloom: never underestimate the ability of the average dev to ignore the actual problem :-P

2:30 ibdknox: bbloom: not yet, but I would like to eventually

2:30 there's some very basic support

2:30 for auto-formatting

2:30 shift + tab

2:30 will format the line

2:30 bbloom: ibdknox: you might get lucky and i might write a pretty printer :-P

2:30 ibdknox: that would be nice :D

2:30 yogthos: a lot of oo code is just cargo cult in my experience ;)

2:31 people will write their interfaces and then have a single class implementing them, and then create mazes of these things impossible to navigate

2:31 callen: yogthos: don't you mean...PATTERNS

2:31 yogthos: and when you ask them why they created this insanity, they say it's patterns :P

2:31 exactly!

2:31 callen: yogthos: I ran into a guy once that was writing a 3d audio library in C++

2:31 ibdknox: beautiful, beautiful patterns

2:31 yogthos: that's how you write "good oo" code

2:31 callen: yogthos: I couldn't find the actual implementation.

2:31 ibdknox: they're abstract art

2:31 callen: yogthos: it was the perfection of "ravioli code"

2:31 yogthos: haha we have a project like that at work :P

2:32 callen: yogthos: I use the phrase "spooky action at a distance" when I talk to that blubby Java/Spring guy at work

2:32 yogthos: hahaha

2:32 callen: yogthos: I don't think he gets what I mean yet.

2:32 yogthos: spring is especially nasty with half the shit being defined in xml somewhere

2:32 callen: maybe someday he'll realize his XML-directed java horror was a mistake.

2:32 yogthos: YES. YES. THAT.

2:33 yogthos: so you can never tell what the fuck is actually running :)

2:33 callen: my FUCKING god I hate Spring.

2:33 Play Framework is so much nicer. or was, in 1.0. With 2.0 they appear to have gone off the Scala deep-end.

2:33 Pity.

2:33 yogthos: indeed

2:33 callen: yogthos: I figured out how the blubby-one survives. IntelliJ

2:33 yogthos: it generates all his XML for him through wizards.

2:33 and just manages the entire project state.

2:34 yogthos: yeah it's quite common with java devs

2:34 callen: he even uses git through the damn thing

2:34 generating ugly git commits, I might add.

2:34 I can never read his commit history

2:34 it's an ounce of code buried in a pound of metadata and XML

2:34 yogthos: yup

2:34 callen: and people wonder why I insisted on Python for so long.

2:34 at least that was actual...code...

2:34 and the occasional script.

2:34 yeesh.

2:35 yogthos: yeah I mean java's bad enough as a language, but the way people use it is the worst part by far

2:35 callen: yogthos: aye. Play 1.0 was pretty cool and admirable.

2:35 yogthos: I would love to know where these "best practices" come from exactly

2:36 callen: yogthos: enterprise? C# is an okay language but the Microsoft/corporate influence plus lazy blub programmers ruin it by far.

2:36 yogthos: because never have I seen any of the virtues extolled work in practice

2:36 callen: yogthos: the purportedly useful type-checking makes me laugh because I always think back to the fucking ridiculous pathological "stringly" code I've seen in Java and C#.

2:36 yogthos: and the absolute worst is when people start chasing the generic solution

2:36 callen: yogthos: hadn't you heard? stashing all your data in strings is "generic

2:36 "

2:37 yogthos: we're going to make it so fucking generic and so damn customizable that it'll solve every problem except the one we actually have

2:37 callen: yogthos: reminds me of JWZs law.

2:37 yogthos: all programs expand in scope until they include email functionality.

2:37 yogthos: callen: ha!

2:38 callen: yogthos: could be revised to, "all corporate-developed systems expand in scope until they also are a full ERP system"

2:38 yogthos: callen: indeed

2:39 it's like that steve yegge rant about how all the configuration languages are destined to become turing complete, stuff like ant and maven :)

2:39 ah this one! https://sites.google.com/site/steveyegge2/the-emacs-problem

2:39 very topical :)

2:40 callen: yogthos: somehow I avoid being so directly reliant on regex as yegge. I wonder why.

2:41 yogthos: I suspect partly because I avoid custom arbitrary text formats, I persist to structured data stores, and I tend to save data in XML or JSON

2:42 yogthos: callen: yeah I tend to use them sparingly, regexes can turn code write only pretty fast if you're not careful

2:42 callen: well it's not just that, it's just that I rarely need to manually parse something one-off. I'm generally VERY suspicious the moment that happens.

2:42 yogthos: I weened my team of soap last year, was a big win :)

2:42 callen: for my line of work, it's better to stash something in a SQL db, MangoDB, Redis, Kafka, whatever.

2:42 yogthos: callen: this fell out of the exercise https://github.com/uhnuser/json-service-commons

2:43 callen: and this https://github.com/uhnuser/json-client-commons

2:43 callen: yogthos: yeah I expose RPCs via JSON pretty often. That's practically my standard mode of operation.

2:44 yogthos: callen: soap is another thing that gets used without people thinking

2:44 callen: yogthos: I'm still not certain what it solves that a REST + JSON RPC couldn't.

2:44 yogthos: callen: the whole point of soap is to allow disparate clients to connect to a service using the wsdl description

2:44 callen: oh, that's something else entirely.

2:44 yogthos: callen: yet people keep using it when they control both the client and the service ends where it serves no purpose whatsoever

2:44 callen: yeah that makes sense.

2:45 yogthos: callen: in theory you expose your wsdl and people consume your service using the definition

2:45 callen: few things necessitate or will achieve that level of structuredness thoguh.

2:45 yogthos: callen: in practice that rarely works

2:45 callen: Right.

2:45 yogthos: callen: since the spec is kinda loose on stuff like dates for example

2:46 callen: you ever see this? http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-stands-for-simple/

2:46 callen: nails it

2:46 callen: yogthos: a long long time ago.

2:46 yogthos: part of the skepticism arises from the fact that I've never heard of anyone implementing a meta/automagic client that "just works" with SOAP services.

2:46 yogthos: callen: it's not rpc... so how do you generate the document? oh you just serialize your classes :P

2:47 callen: it's a mystical animal, plus the fact that google and others expose json apis clearly shows that what soap does is not actually useful or necessary

2:50 callen: yogthos: to be fair, that could be argued to be a usability based decision.

2:50 yogthos: callen: which says a lot about soap usability :)

2:51 callen: and I'm off to get some sleep here g'night dude

2:51 callen: yogthos: 'night

3:05 you know, my battles with the migration libraries taught me a fair bit

3:05 I s'ppose there's a fair bit for me to be thankful about there

3:07 yunfan: so is there anyone using clojure for analyzing log

3:07 callen: yunfan: NOPE NEVER EVER

3:07 yunfan: haha, what are you looking for?

3:07 yunfan: text processing? log analysis at scale?

3:08 yunfan: log analysis "at scale" implies Hadoop or Storm.

3:09 yunfan: callen: i want to analyzing our web log using clojure

3:09 callen: i was now using shell and python doing that job

3:10 but the demand changes everytime

3:11 so i think its case like they said in the book "hacker and painter", i could using a lisp dialect for doing these job

3:11 callen: yunfan: generally I'm a fan of using Lisp, but I'd recommend you learn more about Clojure and in the process develop your own opinions about how to solve the problem before proceeding.

3:13 yunfan: you don't want to plunge blindly into Clojure or any Lisp for that matter because of what PG said.

3:14 yunfan: learn and decide for yourself if it's right for you. in my experience, Python works pretty great for cobbling scripts together.

3:15 yunfan: callen: nope , the problem is just that the different demands all based on our logs while it has some differences in details which cause my py code cant reuseable

3:15 * callen rubs forehead, sighs, goes to get another dram of vodka

3:16 yunfan: and my practical py code, i think was written follow the FP style, i am a big fans of python's list comprehension

3:17 Ember-: no, not using clojure for log analyze, but that should be pretty easy with clojure

3:17 read your log as lazy seq by lines and process

3:17 yunfan: i could show you a snippts of my py code which use list comprehension lots

3:18 callen: no

3:18 Ember-: it all depends on what you mean with "log analyzing"

3:18 but callen is correct in his implication that if you have a LOT of logs then you should be using a map-reduce library

3:18 such as Hadoop

3:19 if your data mass is around few hundred megabytes then Hadoop is overkill

3:19 callen: Ember-: your words are redundant, callen is always correct.

3:19 yunfan: http://codepad.org/SDJS01X9 check this, the problem is the python community dont encourage people use this anywhere

3:19 callen: Ember-: especially if you can get away with using grep. grep is fucking fast up to a few gigabytes depending on hard drive.

3:19 Ember-: yeah, but who knows what the actual need is?

3:19 yunfan: i dont have too many logs

3:20 just about 20G a month

3:20 Ember-: ok, you have csv files, not logs?

3:20 yunfan: nope the input is apache log

3:20 and the output is csv

3:21 callen: Ember-: probably doing glorified "group by" on log files.

3:22 Ember-: it looks like it

3:22 counts stuff

3:22 yunfan: well , the log is all track records

3:23 our sdk would send back the client's info via http request

3:23 so i need to collect these log, parse it and analyze it

3:23 Ember-: anyway, I'm not sure if you really *need* clojure or any lisp for that, but it is pretty easy to do with clojure...

3:25 yunfan: then could you told me where i can found any parse related libraries like regex, http request parse

3:27 Ember-: yunfan: that stuff is mostly in clojure core

3:28 ,(re-matches #"[a-z]*" "foo")

3:28 aww, no bot

3:29 AimHere: &(re-matches #"[a-z]*" "foo")

3:29 lazybot: ⇒ "foo"

3:29 AimHere: one bot

3:29 yunfan: Ember-: shame, i dont knew this

3:29 Ember-: anyway, clojure has a reader macro for generating regexp strings

3:29 start your string with # and it's interpreted as regexp

3:29 AimHere: &(slurp "http://www.google.com")

3:29 lazybot: java.security.AccessControlException: access denied (java.net.SocketPermission www.google.com:80 connect,resolve)

3:29 yunfan: i just have read the book "clojure, funtional programming language" which book would you recommend for the next read?

3:30 Ember-: depends on your background, programming clojure 2nd ed is great if you have a java background

3:30 or well, it's great if you have OOP background

3:30 yunfan: nope i am not a java coder

3:30 and to be honestly i dont like java

3:30 Ember-: hehe

3:30 you should learn java at least somewhat if you're going to use clojure

3:31 yunfan: i am a python engineer and got some c and forth experiences

3:31 AimHere: At some point you have to at least learn to read Javadocs :(

3:31 Ember-: since clojure embraces java and doesn't try to reinvent wheel where Java has good implementations

3:31 yunfan: i just dont like the java syntax

3:32 Ember-: for example:

3:32 &(Math/PI)

3:32 lazybot: ⇒ 3.141592653589793

3:32 Ember-: that is a java static method call

3:32 yunfan: yes i knew this fromt he book

3:33 Ember-: but anyway just as a word of advice: if you want to learn clojure you really should learn java too - at least to certain degree

3:33 makes your life so much easier

3:34 AimHere: Well if he knows C and python, then the language itself is a doddle

3:34 yunfan: i am doing that , for my android phone

3:34 Ember-: AimHere: yeah, but java specifics such as java GC, java stacktraces and stuff like that

3:34 which has nothing to do with syntax

3:34 yunfan: just learned too fast that cat remember some method/term

3:35 AimHere: I was thinking the other end, all the libraries that you end up pulling into your code

3:35 yunfan: well python also have GC and stacktraces and even import :]

3:35 Ember-: python GC is a different beast than JVM

3:36 AimHere: Yeah. Also Clojure has Java Stacktraces, which makes it somewhat painful

3:36 yunfan: ok

3:36 Ember-: same basic principle, different implementation with different details

3:36 and python concurrency sucks monkey balls, global interpreter lock anyone?

3:37 yunfan: yes

3:37 callen: Ember-: Python concurrency effectively doesn't exist.

3:37 Ember-: indeed

3:37 yunfan: this is the most famous suck point of python's GIL

3:38 Ember-: on the other hand, Java has a very good concurrency implementation, it's only problem is in the Java's mutable world

3:38 which Clojure happily fixes :)

3:38 but to really answer your question about pointing you towards regexp, http handling etc in clojure

3:39 https://github.com/dakrone/clj-http

3:39 yunfan: Ember-: good, very thanks

3:39 Ember-: and regexps are built in

3:39 yunfan: yep i tried that

3:40 Ember-: and btw, if you didn't already use leiningen to handle your clojure builds then learn that too

3:40 makes adding libraries a breeze to your project

3:40 and a lot of other things too :)

3:40 yunfan: i usede that a little

3:40 just know lein2 deps/repl

4:15 Raynes: You don't need to learn Java to use Clojure.

4:15 You can learn what you need to know from Java just by googling when you need it.

4:16 augustl: I do wish I had more JVM experience though

4:17 finding out a lot of things the hard way, running out of permgenspace, how mvn dep resolution actually works, etc

4:17 (I don't know Java)

4:18 Rich_Morin: I feel your pain. I'd like a book called "Just Enough Java" to fill in the pieces that Clojure, Groovy, JRuby (etc) programmers need to know.

4:19 I have been happily avoiding Java since its inception. I'd like to continue doing so, but still use Clojure.

4:21 All of the Clojure books assume at least some familiarity with Java (even when they say they don't). For example, they talk about static methods. I'm a Rubyist; what's a static method? Oh yeah; kind of like a class method...

4:21 yunfan: Rich_Morin: good i got the book name , thanks

4:21 Rich_Morin: how about using clojure-script

4:21 Rich_Morin: yunfan: the book I mentioned doesn't exist.

4:22 yunfan: err

4:23 Rich_Morin: ClojureScript is a subset of Clojure, so it's missing some nice parts. Also, unless you're happy with the JS ecosystem, it kinda sucks.

4:24 yunfan: well consider you're a rubyist, its amazing that you hate js than java

4:25 Rich_Morin: I'm not really unhappy with Clojure being based on the JVM - that has a lot of practical value. Also, lein is a HUGE help. I just hate having to Google for terms I don't recognize.

4:25 Or worse, not realize that I don't recognize them, eg: a Ruby module is NOTHING like a Java module...

4:26 yunfan: well i'd like new terms, but i hate that i finally found that's a new wheel

4:26 just like when i finally familiar to use make, then they told me i need to intall maven

4:27 Rich_Morin: yunfan: Well, Douglas Crockford has done a nice job at pointing out the good and bad parts of JS. CoffeeScript paints over the bad parts, so I tend to use that...

4:27 yunfan: Rich_Morin: there's a thin book which only tech people the good part of js

4:27 so you could using that to ignore the bad parts

4:27 Ember-: I dislike CoffeeScript due to it's ambigious syntax

4:28 good attempt on 'fixing' the javascript though

4:28 Rich_Morin: yunfan: I think you're talking about Crockford's book.

4:28 yunfan: Rich_Morin: there's a butterfly on the book

4:29 Rich_Morin: yunfan: http://www.amazon.com/dp/0596517742

4:30 Ember-: this pretty much nails my problems with CoffeeScript http://ceronman.com/2012/09/17/coffeescript-less-typing-bad-readability/

4:30 yunfan: Rich_Morin: yes that's the book

4:31 Rich_Morin: Ember-: point taken. hasn't been a problem for me, but I can see his points.

4:32 yunfan: i found many people dislike the parenthesis

4:32 Rich_Morin: One of my major complaints about JS is that JS experts (including Crockford) will defend writing deeply nested hairballs of layered functions and objects. Whither simplicity?

4:33 yunfan: is it possible to define a macro which accept ident/semicolon based scope and parenthesis both?

4:33 that would reduced the mass parenthesis which boring many people

4:34 Rich_Morin: yunfan: Are you talking about Clojure?

4:34 yunfan: Rich_Morin: yep

4:34 augustl: yunfan: tbh I don't see the big point of having as many beginners as possible use Clojure, I'm perfectly happy with Clojure optimizing for the long run instead of getting started

4:34 Ember-: you should not try to kill the parenthesis with clojure

4:34 that's a bad idea

4:35 bbloom: if you want to see what a lisp looks like without parenthesis, you should try Mathematica

4:35 yunfan: Ember-: clojure already import many other symbols

4:35 like []

4:35 Ember-: yes

4:35 but that doesn't reduce it's homoiconicity

4:35 which means roughly "code is data and data is code"

4:36 yunfan: what i said is a macro like (let [a 1] (dosth a; doother a;))

4:36 bbloom: i really like whitespace sensitivity in Python and CoffeeScript, but i don't think that whitespace sensitivity is a good idea in the face of macros

4:36 and i really enjoy the parenthesis in clojure

4:36 Ember-: yunfan: yes and that's a bad idea like I said

4:36 bbloom: i find that i often have FEWER than in parens + curlies when compared to java or javascript

4:36 Ember-: for starters, that is an imperative way to do things

4:36 Rich_Morin: yunfan: My take (and I'm just a noob at Clojure) is that Clojure's use of other symbols (eg, braces and brackets) adds much needed "texture" to the code, making it easier for my optic nerve (etc) to pull apart and hence, requiring less conscious thought.

4:36 Ember-: second, that kills homoiconicity

4:36 bbloom: the only ugly bit is when you get ))))) at the end

4:36 yunfan: Ember-: just want to save the rest of us who using vim not emacs

4:36 bbloom: but i find that -> or ->> or let or similar makes that go away

4:37 )))))))) is a code smell

4:37 Ember-: bbloom: agreed

4:37 yunfan: Rich_Morin: yep, i like that

4:37 bbloom: i'm not opposed to a meta-syntax on top of s-expressions

4:37 Rich_Morin: bbloom: IIRC, there used to be a way in Lisp to put a dollar sign at the end of a form and add as many parens as needed...

4:37 bbloom: but i think you need to do it like mathematica: it has to be a strict superset of the s-expression sytnax

4:37 Ember-: but this (let [a 1] (dosth a; doother a;)) would be imperative

4:38 bbloom: Rich_Morin: yeah, that seems like a terrible idea :-P

4:38 Rich_Morin: bbloom: seriously, why is it a bad idea?

4:38 yunfan: Ember-: then how about indent based solutions?

4:38 bbloom: Rich_Morin: because whenever i see )))))) i know i need to refactor and assign names to intermediate values to make the code more understandable

4:38 or use a pipeline

4:39 Ember-: yunfan: could you elaborate?

4:39 ah I think I just got it

4:39 bbloom: if i could trivially replace )))))))))))) with $, then i'd do that and it would let me nest more deeply than i would otherwise

4:39 Ember-: you mean like in python, where indentation has a meaning?

4:39 bbloom: but i also force myself to 80 character code width for similar reasons

4:39 Ember-: that too would kill homoiconicity

4:39 which would make clojure macros pretty pointless or at least many times harder to implement

4:39 yunfan: Ember-: i cant make a sample in irc's online msg format :]

4:39 Rich_Morin: bbloom: I think you could also tell that from the size of the form. :-)

4:40 bbloom: Rich_Morin: not necessarily. sometimes i have pretty long forms that are perfectly reasonable b/c they are basically long pipelines with -> or ->>

4:40 Ember-: all of the people having complaints about parenthesis should *really* read about homoiconicity and then read it again and again

4:40 until they grasp it

4:40 Rich_Morin: Ember-: Well, Clojure has a bunch of reader magic that isn't actually homoiconic.

4:40 bbloom: Rich_Morin: eh, it *mostly* is

4:41 Ember-: Rich_Morin: true

4:41 bbloom: @x is just (deref x)

4:41 ~x is just (unquote x)

4:41 etc

4:41 there are some shortcomings in the current implementation

4:41 Ember-: makes your life easier those, but they do break the homoiconicity rule

4:41 but those are exceptions in a very good rule

4:41 bbloom: such as [], {}, #{}, etc being "special" rather than just shorthand for (vector ...), (hash-map ...) etc

4:42 yunfan: there is a site codepad.org, is there clones for clojure?

4:42 bbloom: but i don't think any of those shortcomings are inherent

4:42 Rich_Morin: bbloom: yes, it _expands_ to homoiconic code, but the @x isn't itself homiconic. So, the trailing $ (or whatever) would act likewise.

4:42 Ember-: the first rule of Macro Club is that you don't write macros :)

4:42 (not unless you are absolutely sure that's what you need)

4:42 bbloom: Rich_Morin: you can have syntax and still be homoiconic

4:43 katratxo: yunfan: https://www.refheap.com/paste

4:43 bbloom: Rich_Morin: it's just that the reader and printer must understand the syntax

4:43 Rich_Morin: that's what i'm talking about with the shortcomings

4:43 ,'@x

4:43 dammit where are our bots?

4:43 &'@x

4:43 lazybot: ⇒ (clojure.core/deref x)

4:43 bbloom: there

4:44 that's still homoiconic, but it would be NICE if the printer knew to turn clojure.core/deref back into @

4:44 Rich_Morin: bbloom: If you are generating a data structure in Clojure that you intend to feed to the reader, would (could?) you include things like @x ?

4:45 bbloom: &(read-string (pr-str '@x))

4:45 lazybot: ⇒ (clojure.core/deref x)

4:45 bbloom: seems reasonable to me :-P

4:45 Rich_Morin: My suspicion is that you would generate the long forms.

4:45 yunfan: http://codepad.org/yG4SWE2s Ember- the indent based code sample

4:45 bbloom: Rich_Morin: you'd generate the long forms if you were using (list 'clojure.core/deref 'x)

4:45 but you could just do `@x

4:46 yunfan: katratxo: ok

4:46 bbloom: &`@~'x

4:46 lazybot: ⇒ (clojure.core/deref x)

4:46 bbloom: &`@x

4:46 lazybot: ⇒ (clojure.core/deref clojure.core/x)

4:46 Ember-: yunfan: yeah, just what I thought. That's not lisp and not homoiconic

4:46 yunfan: i used want to set a paste based site which accept one page forth code, and run it as a webapp

4:47 Ember-: and you can have multi-line string in clojure with """your string"""

4:48 but anyway, in lisps end of line and indentations don't have a meaning in syntax

4:48 and shouldn't have

4:48 that's not a lisp anymore if they would

4:48 I know it can be hard to grasp but just trust me, it's better this way :)

4:49 there just is no way around the multiple parenthesis with clojure, not without making it into something else than clojure

4:50 if parenthesis makes you sad and you want great expressive power then I'd suggest trying Scala

4:50 but expect a *lot* rougher road in learning that language :P

4:50 yunfan: i just dont want to throw vim keybinding

4:51 i knew you emacs guys dont care of those parenthesis

4:51 Ember-: https://github.com/vim-scripts/VimClojure

4:51 I'm not an emacs guy

4:51 Rich_Morin: My take (and I suffer from extreme dyslispia) is that short, nicely formatted forms aren't all that hard to read.

4:51 yunfan: then eclipse?

4:51 Ember-: currently yes

4:51 but there are *lots* of people writing clojure with vim

4:52 echo-area: Ember-: Isn't "your string" sufficient? The pre- and post- two double quotes seem to do nothing with multi-line strings

4:52 Ember-: check out the link I just pasted

4:52 Rich_Morin: Ember-: I just installed VimClojure and MacVim. Glad to hear it's popular

4:52 Ember-: echo-area: well I'll be damned! :D

4:52 you are absolutely right :)

4:53 bbloom: Rich_Morin: uninstall VimClojure and try vim-foreplay :-)

4:58 yunfan: katratxo: i found many clojure driven sites share the same color scheme :]

4:58 Rich_Morin: OK, guys, fight it out: is VimClojure better or worse than vim-foreplay (and why)? (:-)

4:58 borkdude: goat moaning all

4:58 bbloom: i never got the dynamic bits of VimClojure working correctly

4:59 the nrepl integration is fantastic in foreplay

4:59 and tpope is working on a bunch of new improvements too

5:00 yunfan: then what about lighttable?

5:00 Ember-: lighttable is really interesting but a bit too early

5:01 yunfan: wow

5:01 Ember-: and no offense to mr. Cranger who btw sits on this channel

5:01 :)

5:01 Rich_Morin: I was intrigued by Clooj, but sad that it is broken (in part) for Clojure 1.4.

5:02 The archive exploration ideas look really interesting.

5:03 yunfan: recently i found 2 interesting stuff: overtone and clisk

5:05 Rich_Morin: yunfan: a friend of mine is reworking his generative art project to use clisk - seems very happy with it...

5:06 yunfan: Rich_Morin: i am not, the default documents use many term that i dont knew, so i , like you dont like it, open an issue to the author for more explanation

5:06 but its really cool library

5:07 if you want to do indie game app

5:07 you could written code for generate simple icon image and midi

5:08 Rich_Morin: yunfan: One of the intriguing things about Clojure is the promise of really high-level libraries such as core.logic.

5:12 Ember-: aargh, why my lein midje doesn't work :(

5:13 midje works just fine from REPL, I have the lein-midje plugin added to dev profile

5:13 callen: Rich_Morin: dnolen has a monopoly on high high high-level programming in Clojure :)

5:14 Rich_Morin: and hair that gives RH strong competition :-)

5:15 Ember-: java.lang.RuntimeException: Unsupported character: \\*

5:15 ejackson: anybody have cljs experience and can help me discover why goog.require can't find a cljs library that I think I've included ?

5:15 Ember-: anyone ever faced that with lein midje?

5:15 ejackson: I've :required it in the .cljs file, but when compiled the browser doesn't seem to see it.

5:15 i'm not using advanced compilation

5:16 callen: Rich_Morin: it used to be that they weren't real hackers unless they have beards. I now believe the secret is in the 'fro.

5:16 Rich_Morin: well, I had a beard when it counted - these days, not so much hair :-)

5:17 callen: Rich_Morin: I am young and of welsh ancestry. The closest thing I will have to either is to end up looking like Egoraptor.

5:17 I'm totally devoid of beard-growing faculties.

5:18 Ember-: I have both long hair and a beard, what do I win?

5:19 callen: Ember-: an axe and a roman skull to cleave.

5:19 Ember-: aww

5:19 I was hoping some help for my problem

5:19 but that's ok too

5:19 Rich_Morin: Actually, Stuart Sierra is most impressive (eg, http://www.infoq.com/presentations/Thinking-in-Data) and he has neither.

5:19 callen: Ember-: what's it doing? GIMME STACKTRACES

5:20 Ember-: callen: LispReader dies

5:20 bbloom: Rich_Morin: that was a good talk

5:21 Ember-: callen: http://pastebin.com/gqit27r6

5:21 guessing you don't get too much out of that...

5:23 callen: Ember-: where da character?

5:23 Ember-: I have NO idea

5:23 lein test runs just fine

5:23 and lein run

5:26 callen: and let me add that all my midje tests run just fine from repl

5:26 callen: Ember-: grep

5:27 Ember-: callen: ok... That's strange

5:27 got a line which doesn't have that character

5:30 oh wow, it doesn't like my regexp o_O

5:30 wtf

5:31 ah, no. Something else

5:34 augustl: so.. my macro needs to call a function that passes a java object ref to it, but I'm getting "Caused by: java.lang.RuntimeException: Can't embed object in code, maybe print-dup not defined:"

5:35 how do I fix that?

5:35 Ember-: callen: I have zero * characters in my codebase

5:35 to me it looks like lein-midje itself is dying

5:35 augustl: my macro basically looks like this: `(another-macro (with-redefs [~my-var (some-function-call ~my-java-object)]))

5:38 Ember-: callen: downgrading lein-midje from 2.0.3 to 2.0.1 fixed my problem

5:38 so it indeed is a bug in lein-midje

5:42 yeah, created an empty project which has only project.clj and only thing in it is lein-midje

5:43 lein midje dies with 2.0.3

5:45 augustl: anyone on macros containing refs that points to java objects?

5:49 Ember-: submitted a bug to lein-midje

5:50 hope they'll fix it

7:00 Raynes: Aw shit.

7:00 I just broke all of amalloy's channels on ZNC.

7:00 I upgraded to 1.0.

7:00 Now he is no longer in in any channels.

7:00 * Raynes tries to remember what channels he was in.

8:38 callen: technomancy: I am beginning to really enjoy the literary references in your libraries.

8:38 bawr: +1

9:23 pdvyas: I do a little Python + Django and got interested in the functional parts, list comprehensions, etc. How do I start grokking clojure? Is there a modern howto one could recommend ?

9:24 yogthos: pdvyas: there's a good intro site http://clojure-doc.org/articles/tutorials/getting_started.html

9:25 pdvyas: 4Clojure is also good http://www.4clojure.com/ they have lots of problems of varying difficulty you can solve right on the site

9:25 Ember-: +1 for 4clojure

9:25 yogthos: pdvyas: if you make an account, once you solve one you can see how others did it, really good for learning idiomatic code and tricks

9:26 pdvyas: nice, let me start with 4clojure. Thanks yogthos and Ember-

9:27 Is it recommended to bigbang into emacs right away when you start LISPy stuff ? I am Vim guy.

9:28 Ember-: not really

9:28 some people love emacs with lisp, others love vim, and the third group use something else

9:28 you can install proper clojure plugins for your vim

9:29 I personally use eclipse with ccw-plugin for now

9:29 but really looking forward on progress with lighttable

9:30 pdvyas: Ember-: nice, Light table looks like science fiction coming to life :)

9:30 Ember-: thank ibdknox for it

9:37 lpetit: Hello there. Are there any Counterclockwise users right now? I'd like to ask a feedback question

9:38 Ember-: lpetit: \o

9:38 lpetit: Ember-: hello :-)

9:38 Ember-: do you use the "Toggle comment' feature right now ?

9:38 Ember-: nope

9:38 what does it even do :)

9:39 ah yeah

9:39 lpetit: Ember-: select a few lines, and hit Ctrl+/ (or Ctrl+Shift+/)

9:39 Ember-: got it already

9:39 but no, I'm not using it

9:39 I tend to comment code out very rarely...

9:40 even less with clojure

9:40 :P

9:40 lpetit: Ember-: I've been told via an issue that the current binding is not easy / standard. Indeed, it's more of a "java" reminder than anything else ( / stands for single line java // )

9:40 Ember-: sure, sure :-)

9:40 Ember-: but I don't know, it's the same shortcut for example js editor

9:40 lpetit: Ember-: anyway, was thinking of changing the default keyboard shortcut. Either stick to standard Eclipse convention of Ctrl+Shift+C (C stands for Comment)

9:41 Ember-: maybe, could be a good idea

9:41 lpetit: Ember-: or use a Clojure-specific meno: Ctrl+; ( ; reminding obviously of the single line character for commenting clojure)

9:41 borkdude: ccw is nice

9:42 lpetit I have used the comment feature (you answred me on the mailin glist)

9:42 Ember-: lpetit: maybe the c-version is better due to it being the 'standard'

9:42 lpetit: Ember-, borkdude: not asking you to choose instead of me, but what would you prefer between the two: Ctrl+Shift+C (Eclipse "de facto" standard), or Ctrl+; (more Clojureish)

9:42 Ember-: I can see the reasoning behind Ctrl+;

9:42 lpetit: I'd very slightly lean towards Ctrl+Shift+C

9:42 borkdude: lpetit I don't care, once I know the key binding I use that

9:43 Ember-: Ctrl+; is kinda awkward for finnish keyboard layout for example

9:43 yogthos: I personally like using #_ for comments

9:43 borkdude: Ctrl-Shift-C seems more annoying than just Ctrl+ some key

9:43 Ember-: it's actually Ctrl+Shift+,

9:43 for FI keyboards

9:43 yogthos: cause then you can do it by expression and anywhere

9:43 Ember-: so it can get kinda confusing

9:43 lpetit: yogthos: yep, but that's not the same thing

9:43 borkdude: yogthos yes, that's another way, but not suited when commenting out large parts

9:44 yogthos: borkdude: true

9:44 Ember-: for example, I hate the clojure's backtick symbol since it's so hard to get out of FI layout keyboard :)

9:44 zilti: Actually Ctrl-Shift-C is the easiest to type of all the suggestions

9:44 Ember-: fortunately one doesn't write macros very often

9:44 borkdude: zilti on my kbd that is Cmd-Shift-C and not easy

9:44 zilti if I didn't have piano lessons and trained my left hand, it would be really awkward

9:45 zilti: borkdude: Then why are you using a mac ;)

9:45 borkdude: lpetit what keeps annoying me though is having to redefine next/previous REPL command to Cmd-up/down every time I install an update

9:45 lpetit: borkdude: I do it: Cmd+Shift with the right hand, and C with the left hand

9:45 borkdude: zilti it's a hype

9:45 Ember-: lpetit: I'd say you don't have a perfect answer due to very different keyboard layouts

9:46 mac vs pc keyboards, different locales etc

9:46 lpetit: borkdude: there's also Ctrl+P Ctrl+N already defined (Previous / Next)

9:46 borkdude: lpetit true, but I'm always using arrows

9:47 Ember-: same here

9:47 alt+left and alt+right

9:47 much more intuitive for me

9:47 especially since it's the same in browsers

9:48 lpetit: Who said people can't talk for hours about finely tuning their own Eclipse, as do emacs guys ;-)

9:48 Ember-: hehe

9:48 but alt+arrows isn't fine tuning, it's the default keybinding :)

9:48 lpetit: Ember-: and Ctrl+P / Ctrl+N is the same in shells :-p

9:49 borkdude: lpetit you don't have to finetine emacs in case of an update again, just use the same init.el

9:49 Ember-: I'm a windows user, although I've used my share of linux (and still using in servers) but in desktop it's windows for me

9:49 lpetit: borkdude: wait, you have to recreate your own keybindings after what kind of update?

9:49 Ember-: and those shortcuts aren't in use for example in powershell

9:49 lpetit: Ember-: ok

9:49 borkdude: lpetit after an update of ccw I think

9:50 zilti: I'll never go back to windows because the window manager sucks too much. Otherwise they're pretty much on par for me. Windows at work, Linux at home.

9:50 Ember-: browsers however are universal everywhere, in every browser out there alt+arrows work for back/forward

9:50 at least in every browser I know :)

9:50 lpetit: borkdude: weird. User redefined keyboard shortcuts are managed globally by Eclipse. I thought only starting from a fresh install of Eclipse would mean losing this (and you would still, I guess, have the possibility to export / then reimport the keyboard bindings)

9:51 Ember-: zilti: I miss exposé and similar features, all the other goodies I get in windows

9:51 borkdude: lpetit hmm, I have updated Eclipse recently.. that must have been it then

9:51 Ember-: and those too with 3rd party apps

9:51 zilti: Ember-: exposé in Windows?

9:51 Ember-: yup, not out of the box

9:51 lpetit: Ember-: just tried with Chrome on OSX: not working :(

9:52 Ember-: lpetit: osx sucks then

9:52 :)

9:52 borkdude: I worked in a Windows/.NET based company once, I found it so weird they could get everything working with vbscripts etc, and were totally ignorant of linux/osx

9:52 Ember-: zilti: there are tons of software for expose, but here's one example http://sourceforge.net/projects/mcsoft/

9:52 zilti: Ember-: I'm using kwin. I love how everything is built in, like half a dozen ways to switch windows, exposé, resizing windows using alt+right-mouse-key instead of grabbing the corner, moving windows with alt, tabbing windows...

9:53 lpetit: Ok guys, time to wrap up: I'll keep Ctrl+Shift+C since it's the most natural for Eclipse editors (java, javascript, structured text editors, properties files, etc.

9:53 Ember-: good choice

9:53 people who don't like it can change it

9:53 that's a sensible default

9:53 borkdude: lpetit update your answer on the mailing list :P

9:53 Ember-: zilti: multiple desktops for windows http://virtuawin.sourceforge.net/

9:53 zilti: It's always best to go with the platform defaults.

9:54 Ember-: that one I can't grasp why it doesn't come out of the box...

9:54 lpetit: borkdude: I'll keep the previous binding for backward compatibility

9:54 zilti: Ember-: I'm using that one at work

9:54 borkdude: lpetit is it possible to control the keybindings with a clojure script? I have never programmed an Eclipse plugin before

9:54 Ember-: anyway, you can get most of the goodies in windows too, they just don't come out of the box

9:54 borkdude: lpetit maybe we could make a kind of init.el for ccw ;)

9:54 Ember-: and actually I don't use any of those, not even virtuawin anymore :)

9:55 borkdude: ccw-init.clj

9:55 lpetit: borkdude: shhht, this is my secret project. Not ready yet.

9:55 Ember-: windows 7 provided enough user interface improvements that I don't really need those anymore

9:55 back in the xp days, sure

9:55 borkdude: lpetit ah, keep going then :-)

9:55 I still like XP, maybe because of nostalgia

9:56 lpetit: borkdude: really, could already work if Eclipse 3.X was still the standard. Eclipse 4.X brings a lot of complexity to the table :-(

9:56 Ember-: xp sucks in today's standards

9:56 but I gotta say, I might be going the osx way in the future

9:56 if MS doesn't manage to pull out windows 9 which is reasonable for desktop then it's bye bye from me

9:56 windows 8 is... horrid

9:56 borkdude: Ember- I have gone the OSX way since summer 2011, I like it, although Apple is annoying me a bit

9:56 ravster: hello everyone

9:57 zilti: In Windows 8 in Metro you're not even able to select text or do drag-and-drop.

9:57 ravster: I'm having difficulty getting datomic-free working on my clojure install.

9:57 Ember-: they did the metro/modern thing SO wrong

9:57 zilti: At least they won the bullshit bingo with it

9:57 Ember-: zilti: hehe

9:57 borkdude: Ember- Apple: I have to buy a special screw driver from iFixit to open my own macbook air.. , I have to pay for an upgrade to 10.8 for some functionality in iPhoto I want, etc.

9:57 ravster: it gives some classpath error

9:58 filenotfoundexception

9:58 Ember-: in my opinion modern UI software should have been inside a window and the the modern "start" screen should have replaced the desktop widgets

9:58 ravster: lein deps doesn't seem to have any problems, though

9:58 Ember-: and provide that by default for desktops

9:58 and keep the current implementation for tablets

9:58 lpetit: borkdude: corrective email sent :-)

9:58 borkdude: I'm kind of fed up with platform differences, I teach .NET and Java, but I really don't look forward to update a .NET course to include some Windows 8-related stuff\

9:59 Ember-: I'm with you on that one

9:59 not teaching, but otherwise :)

9:59 borkdude: lpetit thanks :)

10:00 also the ipad/tablet/mobile things don't really appeal to me, why should I use those devices if I'm always having my laptop around… but it might be just me

10:01 another platform to support

10:01 Ember-: well in that case it is indeed just you

10:01 :)

10:01 zilti: Well, the Surface Pro would be a great device if they improved battery life

10:02 borkdude: the thing that really annoys me even more: why the hell are some apps having functionality I don't even have on my desktop, like some banking apps

10:02 jaen: It's a damn shame you don't have full C# on Linux, it's so much nicer than Java for all those enterprisey things. And I'll take wasting time to figure how to force Oracle work on Arch Linux rather than use Windows any time, it's just too awkward for me.

10:02 borkdude: enough crankiness, happy holidays everyone ;)

10:03 o wait, those are already over right?

10:03 jaen: I figure

10:03 borkdude: in the Netherlands many people take time off between xmas and sylvester

10:04 lpetit: borkdude: I have been taking mondays/wednesdays around the 2 tuesdays. Good compromise for me :)

10:28 borkdude: is there something like a review system of "qualitative" clojure libraries, info on how well they are maintained or deprecated, etc?

10:29 lpetit: borkdude: not that I'm aware of

10:30 New Beta of CCW released. Features "documentation hover"!

10:30 marcellus1: damn. I was fumbiling around with making a web scraper for months, and just now got to the scraper example in Clojure Programming... it's so simple when they put it that way, makes me want to start from scratch

10:32 borkdude: lpetit nice, btw, do you recommend using beta, because stabe isn't updated frequently or...?

10:33 lpetit: borkdude: beta is generally quite stable. Of course, as soon as I say so, it may occur that the next release won't work ;-)

10:34 borkdude: beta is definitely for use if you're the kind of people that knows how to go back to e.g. last stable in the rare occasion the beta breaks badly (which did not happen as far as I can remember)

10:35 borkdude: updating

10:35 lpetit: borkdude: I think a new stable will be released before mid-january. I wanted to add generalized leiningen support in next stable, but I think it'll have to wait, 'cause there are lots of interesting things in the betas right now.

10:36 ToxicFrog: CCW?

10:37 lpetit: ToxicFrog: Sorry, I keep using the acronym for no good reason. CCW stands for CounterClockWise, a Clojure plugin for Eclipse

10:38 borkdude: lpetit the good reason is that ccw is shorter. why is it called this anyway?

10:38 ToxicFrog: Aah

10:39 lpetit: borkdude: why is it called ccw ? or Counterclockwise?

10:39 borkdude: lpetit yes, counterclockwise

10:39 lpetit: borkdude: because "clo" for clojure stands in the middle of Counter and wise ? :-)

10:40 lpetit: long story short = we had a brainstorm with cgrand, I was thinking about "clockwise", when he suggested "being wild" and call it "counterclockwise". It stick.

10:40 borkdude: Somehow, to some people, clojure seems "backwards" like in "back in the future"

10:41 borkdude: lpetit ok :)

10:41 lpetit: borkdude: working with clojure brings the fun back, etc.

10:43 borkdude: lpetit I remember saying in 2005 about common lisp, that I didn't have this much fun programming since GW Basic on primary school ;)

10:43 lpetit: :-)

10:44 borkdude: have you successfully updated? Did you try the "doc hover" feature?

10:44 borkdude: lpetit I have updated, let me try it

10:44 lpetit: borkdude: sure :)

10:45 borkdude: lpetit you mean, when you hover over a symbol, the docs show? that already worked in the previous beta I think?

10:45 lpetit keybindings preserved while updating

10:46 lpetit: borkdude: phew :-)

10:46 borkdude: lpetit the hover thing, I think I've seen it in a previous version, really

10:46 lpetit: borkdude: no. previous release was "context doc": after selecting a symbol from completion proposal, you had a short 2-3 lines summary. you could/can also ask for this short 2-3 lines summary from anywhere in the form via Shift+Ctrl+space

10:47 Fauno1: is there an elegant way to handle mongo replica sets with any of the current mongo libraries?

10:47 borkdude: lpetit ah… well, it sure is an improvement, it's getting better and better man

10:47 lpetit: borkdude: now, the "hover thing": it's the same doc you get when you're "browsing" the symbols suggestions of the completion proposal.

10:47 borkdude: lpetit ah

10:48 lpetit: and you can't call it from anywhere in the form. You have to hover over a symbol, wait a tiny amount of millesecs (defined in Eclipse I guess), and there you are (provided, of course, that you have loaded the file in a REPL)

10:48 borkdude: lpetit a question about "running" a project, wouldn't it be convenient when the project is run, the REPL's default namespace is the file you sleected when choosing run?

10:48 lpetit: borkdude: if it doesn't work for you, then it's a bug and you can report it as such

10:49 borkdude: lpetit what is the correct way or "stopping" a project, so the contrary to "run"

10:49 lpetit closing the console and repl (both?)

10:49 lpetit: borkdude: you're in luck. since the previous beta, you just have to close the repl, it will close the underlying console :-D

10:50 borkdude: lpetit :-D

10:50 lpetit: borkdude: I'm updating the release note for the beta, see: http://code.google.com/p/counterclockwise/wiki/ReleaseNotes#Version_0.10.3.SNAPSHOT

10:51 borkdude: as you can guess from the length of it, we're close to going stable :)

10:51 borkdude: lpetit it would be nice if the REPL printed it's startup namespace

10:51 lpetit: borkdude: ah yes, currently it's only reminded in the REPLView's title

10:51 borkdude: lpetit and also, it should obey the :main property from a leiningen project file, else choose projectname.core if it's available

10:52 lpetit that last one is disputable

10:52 lpetit: borkdude: that is one of the joint goals of getting a "generalized leiningen launcher".

10:53 borkdude: by "obey the :main property", do you mean it should search for the -main function in :main, or just load the :main namespace and have the repl positioned to that namespace?

10:53 borkdude: must go, see you

10:54 borkdude: lpetit execute the -main function and repl inside that ns

10:54 I have other feature requests (drawn from students using it for the first time)

10:54 lpetit ok, cya

10:56 lpetit: borkdude: I am greatly interested in your feature request drawn from students using it for the first time. Could you wrap them up together somewhere? Maybe not directly as tickets, I'd like to discuss / think about them globally before turning them into enhancement tickets.

10:56 borkdude: lpetit well, just one thing actually. they tend to press run everytime they change something in the code, because they're not used to interactive development

10:56 lpetit: (I don't want direct issues 'cause I'd like to appley the "5 whys" method on them :) )

10:57 borkdude: lpetit so maybe a warning: this project is already running, are you sure? or smth would be in place

10:57 lpetit I want "Run" to do what lein run does when a project.clj is present, does that make sense?

10:58 lpetit: borkdude: ok, this one you can turn immediately into a feature request, with the explanation you just gave me. We could do what you suggest, as well as make the REPL go to the front and be active if it was not already

10:58 borkdude: does lein run keep a repl around?

10:58 borkdude: lpetit you got me there. no

10:59 lpetit but why not have that also

10:59 lpetit: borkdude: I must really leave for now. I invite you to join the #ccw channel, so you can continue the discussion there even if I'm leaving, and thus it'll be easier for me to see your posts (generally better noise/ratio there concerning ccw :)

10:59 borkdude: lpetit ok thanks, I'll join

10:59 lpetit: borkdude: yes, I think those are 2 different commands

11:00 borkdude: lpetit good point, I hadn't even thought of it, goodbye now

11:44 zilti: What does "IllegalArgumentException No matching ctor found for class" mean?

11:45 S11001001: zilti: ctor means constructor

11:47 zilti: IllegalArgumentException No matching ctor found for class lopia_server.database$make_entity$fn__13104 clojure.lang.Reflector.invokeConstructor (Reflector.java:163)

11:47 Weird stuff

11:48 S11001001: ~paste

11:49 zilti: The code? https://www.refheap.com/paste/7881 Disclaimer: You might want to kill yourself after seeing this code.

11:50 S11001001:

12:32 owainlewis: monadic

12:32 mondic

12:33 "!quit"

12:38 mondic

12:38 monad12345: YES

12:39 S11001001: zilti: I assume you're trying to deserialize a function

12:41 tdrgabi: what book should I read to get started on clojure, if I'm familiar with lisp syntax from other lispes?

12:41 mostly interested in the more advanced features

12:42 S11001001: tdrgabi: joy

12:42 tdrgabi: joy of clojure?

12:42 S11001001: yes

12:42 joevandyk: tdrgabi: http://www.clojurebook.com/ is good as well

12:42 tdrgabi: thank you

12:54 dnolen: higher order constraints https://github.com/clojure/core.logic/commit/2406f2d31ebebcdaca4b3dd9c302b9b9688c6e0c :)

13:06 aaelony: Say I have :a but want "a" … what's a good way to undo what keyword does?

13:07 marcellus1: (name :a)

13:07 aaelony: ah, thanks

13:09 joevandyk: i'm getting confused about when to use periods and when to use slashes in namespaces and calling functions

13:10 drewr: joevandyk: a slash splits a namespace/function; periods are just delimiters in namespaces

13:10 technically it's namespace/Var, but a defn creates a Var

13:11 joevandyk: ahh, right

13:13 technomancy: joevandyk: note that hierarchy in namespaces is basically an illusion; it's not like ruby where one module is nested inside another.

13:13 joevandyk: technomancy: it's all flat?

13:14 technomancy: joevandyk: there's no actual relationship between namespaces that share a common prefix

13:14 zilti: joevandyk: The hierarchy is only represented in your file system.

13:14 borkdude: this however works, but it's not recommended: (def foo.bar 3), (deref #'foo.bar) ;;=> 3

13:14 technomancy: right; other than location on disk

13:20 zilti: Is there some kind of "macroexpand" that works for functions? Some kind of step-by-step-resolution of the expression.

13:23 joevandyk: is there a way to start a repl in another terminal and have vim send commands to the repl and have the output displayed in the repl? vimclojure seems to display the output in a vimbuffer, which i don't want.

13:25 dnolen: zilti: http://github.com/clojure/tools.trace

13:25 pdvyas: joevandyk: https://github.com/jpalardy/vim-slime

13:25 lpetit: borkdude: Issue 496 "warn if project is already running" almost done

13:25 borkdude: lpetit neat!

13:25 zilti: dnolen: awesome, thanks!

13:30 m0smith: anyone around?

13:31 The question for the day: jayq or domina?

13:32 dnolen: m0smith: domina is optimizable, jayq is familiar

13:46 kovas: ping

13:46 kovas: dnolen: pong

13:46 dnolen: kovas: so CLJS-335/448, what you need is compile time support right?

13:47 kovas: dnolen: yes. that is the last thing that is missing

13:47 dnolen: kovas: and do you have patch to make this work?

13:47 kovas: dnolen: I can make one

13:48 dnolen: kovas: that would be great, thanks

13:48 kovas: dnolen: sweet.

14:32 zilti: ARGH. Something in korma really is broken by design :(

14:32 ibdknox: zilti: ?

14:33 zilti: ibdknox: I'm forced to use defentity if I want to use sqlkorma, but I want to avoid that so I can dynamically create new entities.

14:34 ibdknox: zilti: so don't use defentity

14:34 take a look, all that does is create a map

14:34 and you don't even need entities if you don't want them

14:34 zilti: ibdknox: I'm forced to, because the relations-stuff looks up the names, I can't give a relation-function just that map. That won't work.

14:35 ibdknox: like (has-many (create-entity "table2")), that won't work... :(

14:36 ibdknox: I'm not sure I understand what you want. You want to define the entities at runtime? just put them in a map with all the relations there?

14:37 If you want relations to be taken care of, you have to define what they are somewhere, right?

14:37 Perhaps, I don't understand your use-case well

14:37 zilti: ibdknox: Agreed, but I don't understand why that has to be a definition in the namespace instead of being able to just give it the entity map.

14:38 ibdknox: zilti: https://github.com/korma/Korma/blob/master/src/korma/core.clj#L421

14:39 looks like a couple functions would need to change, but making it work with maps directly should be a pretty easy change

14:40 the weirdness there is the result of dealing with circular dependencies which exist in entity defs

14:41 zilti: ibdknox: I'll look at it. I'm using incubator right now for many-to-many support, so I'll probably fork it and take a look. Seems like it would be a change at the rel-function.

14:41 ibdknox: zilti: looks like it

14:41 definitely something that should work

14:41 zilti: ibdknox: Thanks for pointing me in the correct direction!

14:42 ibdknox: no problem!

14:42 Korma should also be getting a new maintainer soon it sounds like, so it'll get moving forward again

14:51 joevandyk: any ideas? (use 'ring.util.serve)

14:51 IllegalAccessError defelem does not exist clojure.core/refer (core.clj:3778)

14:51 trying to start compojure from the repl

15:01 ppppaul: hey cldwalker_ you there?

15:03 joevandyk: hm, ring-serve depends on ring 1.0.0, which is older than compojure uses. how is that typically resolved?

15:04 ring 1.0.0 requires an old version of hiccup, which isn't compatible with later versions apparently

15:04 S11001001: joevandyk: shallowest dep wins

15:04 joevandyk: then leftmost I think

15:04 zilti: joevandyk: Try adding an ":exclude ring" to the ring-serve dependency

15:05 joevandyk: You have to replace ring with the exact name it has as a dependency

15:08 joevandyk: zilti: i tried ":exclude ring/ring-devel", no work

15:08 :profiles { :dev {:dependencies [[ring-serve "0.1.2" :exclude ring/ring-devel]]}}

15:08 it's not :exclusions, right?

15:09 hyPiRion: joevandyk: https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L38

15:09 zilti: joevandyk: Does it depend on ring-devel, not ring? And for "namespaced" deps, it'll have to be like ":exclusions [ring/ring-devel]"

15:09 hyPiRion: so heh.

15:09 zilti: Jup, it's exclusions

15:10 joevandyk: :dependencies [[ring-serve "0.1.2" :exclusions [ring/ring-devel]]] did the trick

15:10 thanks!

15:17 zilti: Is "sub-ent (if (map? sub-ent) sub-ent (when resolved (deref sub-ent)))" ugly?

15:20 gfredericks: contracts for higher-order functions!

15:21 bbloom: gfredericks: ?

15:21 gfredericks: I don't know what exactly is meant by https://github.com/clojure/core.contracts/commit/66fbe3d77ca27d4d5b20b43f391180360c67171d, but if it is what I think it is then I like it.

15:21 I was just needing some of that

15:22 zilti: I wonder if (or (deref sub-ent) sub-ent) would still work if (deref sub-ent) throws an exception)

15:22 gfredericks: zilti: or doesn't suppress exceptions

15:22 does ##(doc force) help?

15:22 lazybot: ⇒ "([x]); If x is a Delay, returns the (possibly cached) value of its expression, else returns x"

15:25 ppppaul: how is (binding) different from (with-redef)?

15:25 gfredericks: binding is thread-loacl

15:25 local*

15:25 but requires the var to be declared dynamic

15:25 zilti: gfredericks: What I'd like to do is to look if sub-ent is a symbol which can be deref'd to a map or sub-ent is a map, and I think an if-clause is an ugly solution to this.

15:26 bbloom: thread local and *thread-safe*

15:26 gfredericks: ppppaul: with-redefs is really only suitable for stubbing in tests

15:26 bbloom: what sorts of things are thread-local but not safe?

15:26 zilti: a symbol? you can't deref a symbol

15:26 ,(deref 'first)

15:26 ppppaul: oh... i've been having some problems with (with-redef) with mocking-ring.

15:27 gfredericks: &(deref 'first)

15:27 lazybot: java.lang.ClassCastException: clojure.lang.Symbol cannot be cast to clojure.lang.IDeref

15:27 zilti: gfredericks: more like ##(deref first)

15:27 lazybot: java.lang.ClassCastException: clojure.core$first cannot be cast to clojure.lang.IDeref

15:27 gfredericks: (defer (deref 'redef)) ;; words

15:27 zilti: oh okay; what type are you expecting it to have then?

15:29 zilti: gfredericks: When I write (defentity something) and defentity is a macro, what is something? Isn't that an unquoted symbol?

15:29 gfredericks: from the macro's perspective it is seeing a symbol

15:29 I don't know what you mean by "unquoted" exactly

15:30 zilti: gfredericks: something = unquoted 'something = quoted

15:30 gfredericks: So I can deref that symbol handed to the macro, or else sqlkorma would not work

15:30 gfredericks: you deref it at macroexpand time, or you expand into code that derefs it?

15:31 zilti: gfredericks: It's deref'd in a function called by the macro at macroexpand time

15:31 At least that's what I've read out of the code

15:32 gfredericks: you must mean something else or be misunderstanding it, because passing a symbol to the deref function is always going to throw that exception

15:32 are you just reading the korma source?

15:32 zilti: gfredericks: yes.

15:32 gfredericks: if you give a link to what you're looking at I can check it out

15:33 zilti: gfredericks: https://github.com/zilti/korma.incubator/blob/master/src/korma/incubator/core.clj#L-493

15:34 which gets called by e.g. has-one at line 518

15:34 gfredericks: ah it's not getting called at macroexpand time

15:34 note the backtick on line 525

15:34 the call is quoted

15:34 so has-one is just returning code that calls rel at runtime

15:35 the (var ~sub-ent) bit means that it's also using var to resolve the symbol into a var before calling rel

15:35 so what rel is seeing, at runtime, is a var, which is derefable

15:36 zilti: so you're trying to edit it such that sub-ent could be a map literal as well?

15:37 zilti: gfredericks: Strangely it's only dereferable when sub-ent has been given like (has-one tablename), but not when it's been given like (has-one {:table "whatever" :pk "id" ...})

15:37 gfredericks: zilti: that's not strange; the map won't survive the var form

15:37 repl

15:37 I'd expect the exception to be ##(var {})

15:37 lazybot: java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to clojure.lang.Symbol

15:38 zilti: "cannot be cast to clojure.lang.Symbol"

15:38 gfredericks: if you want to pass maps you'll have to support it within the has-one macro as well

15:38 zilti: Ah, so I've been looking at the wrong place.

15:40 gfredericks: I'm just trying to figure out if that (var) is really needed in the macro

15:40 gfredericks: If not, I'd only have to "fix" rel and could remove that (var) from the macros?

15:40 gfredericks: depends on what fixing it means

15:40 why does real want the var?

15:41 atyz: hey guys, i'm trying out korma, and have the following line: (defentity events (belongs-to venue)). According to the documentation this assumes events.venue_id = venue.id - however

15:41 gfredericks: it must be using it for something

15:41 atyz: i get the following error Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: venue in this context

15:41 gfredericks: atyz: did you (defentity venue ...) prior?

15:42 if you have mutually referential entities you can use declare to make the names resolve

15:42 ibdknox: gfredericks: which is why you need the var

15:42 zilti: gfredericks: A quick look makes it appear that it's only used at one line for getting the metadata, but a map's metadata map seems to be the map itself so that's either there because it once was used, or it has some purpose I don't understand and shouldn't mess with I guess.

15:43 gfredericks: Didn't understood a single word of your last phrase.

15:43 gfredericks: zilti: my last phrase was to atyz

15:43 atyz: gfredericks: I see, i had tried (defentity venues) because i thought it was correlating to the tablename

15:44 zilti: gfredericks: I mean the one with mutually referential entities

15:44 gfredericks: ibdknox: eh? you're connecting zilti's investigation with atyz's issue?

15:44 ibdknox: that whole mess was to allow for mutually referential relations

15:44 gfredericks: zilti: yes I was answering atyz;

15:44 ibdknox: in order to really do it, you have to delay grabbing the value until later

15:45 gfredericks: ah right

15:45 I think that's making sense in my head

15:45 ibdknox: I'm sure there's some better solution hiding somewhere, but it would likely require some serious breaking changes

15:46 which is probably a good thing at some level

15:46 zilti: I'm afraid I'm too dumb to understand what mutually referential means.

15:46 gfredericks: ibdknox: I've got a patch for korma that let me use it with postgres arrays -- are you still maintaining it, or is there someone else I should mention it to?

15:46 zilti: two tables whose definitions refer to each other; e.g. a has-many and a belongs-to

15:47 zilti: gfredericks: Where comes the val into the game?

15:47 gfredericks: ibdknox: I know there's lots of edge-cases you wouldn't want to support one-by-one, but if there's a built in way to configure it to do that, I couldn't find it

15:47 zilti: the val?

15:48 zilti: gfredericks: Yes, what's the difference when using the val

15:48 gfredericks: oh instead of the var

15:48 zilti: yes

15:48 gfredericks: say you have (declare bars) (defentity foos (has-many bars)) (defentity bars (belongs-to foos))

15:49 zilti: yep

15:49 gfredericks: in the second form, (defentity foos (has-many bars)), derefing the bars var immediately gives nil

15:49 so unless you keep the var, you have no idea what bars is supposed to be

15:49 and you may as well have said (defentity foos (has-many nil))

15:50 ibdknox: gfredericks: I think alexbaranosky is going to be taking it over

15:50 zilti: gfredericks: Now it's clear

15:50 gfredericks: ibdknox: okay, thanks

15:51 zilti: gfredericks: It behaves like a pointer I guess, except that it eats maps for breakfast

15:52 gfredericks: zilti: it's a reference type.

15:52 zilti: ,(val {:content {:a 1 :b 2}})

15:52 hmm

15:56 &(val (first {:content {:a 1 :b 2}}))

15:56 lazybot: ⇒ {:a 1, :b 2}

15:58 ibdknox: zilti: I think I'd do something like this https://gist.github.com/4391820

15:58 untested, but that's the basic idea of what would need to be done

16:00 zilti: ibdknox: It's not possible to test that at macroexpand-time because the thing referred to by the symbol probably doesn't exist yet

16:01 oh nevermind

16:01 ibdknox: zilti: yeah it's just checking for symbol :)

16:01 zilti: just seen that.

16:01 :)

16:01 ibdknox: that's tricky stuff

16:01 I was very unhappy having to come up with it

16:02 but the interface is more important than the impl and honestly it's only like 15ish lines of code, seems like a reasonable tradeoff

16:09 chouser: Has anyone played with reducibles? If not, why not? If so, do you have any open questions? What do you find most confusing about them?

16:10 sorry, I mean reducers. clojure.core.reducers

16:10 callen: ibdknox: do you remember when you bumped the org.clojure/java.jdbc version in the last few versions?

16:10 gfredericks: phew

16:10 callen: assuming it was you.

16:10 gfredericks: also, what's with your korma fork on clojars?

16:10 gfredericks: chouser: not played with them, haven't had a reason to.

16:10 bbloom: chouser: heh, i was just opening my rss reader to see if i could find what "reducibles" was about

16:10 gfredericks: callen: needed to support postgres arrays

16:11 callen: gfredericks: yeah I saw that it said sorta as if it wasn't stable. What would it take to make it stable?

16:11 chouser: gfredericks: have you written new seq-processing code (used map, filter, reduce, etc.) since reducers became available? Did you consider reducers and reject them, or just didn't think to consider them?

16:12 ...that's where I've been, by the way, just don't think of using reducers when I write new map/filter/etc code

16:12 gfredericks: chouser: yes; I assumed it's not worth reaching for them any faster than transients; i.e., not till the code is measurably slow where it matters

16:12 I haven't really been in a position to be optimizing clojure code lately

16:13 chouser: fair enough. Any one else have thoughts?

16:13 bbloom: +1 to gfredericks's transients comparison

16:13 xeqi: is there a function to rename keys in a map?

16:13 bbloom: i assume reducers also work on sequences, ie without any parallelization support

16:14 gfredericks: xeqi: in clojure.set I think

16:14 chouser: the impact to your code is much smaller than with transients. Add "r/" to the front of some function names.

16:14 xeqi: gfredericks: thanks

16:14 gfredericks: bbloom: I think you benefit a bit from removing intermediate values even if you don't get parallelism

16:15 bbloom: gfredericks: ah yes

16:15 gfredericks: chouser: I think I had the impression there was an extra step as well

16:15 bbloom: when reducers were first announced, i aske don hacker news "why not always use reducers?"

16:16 and rich hickey replied to me saying that seq processing and coll-reduce were complementary

16:16 which makes sense to me, except that i don't see why coll-reduce can't degenerate to seq processing in the case of seqs

16:16 if that's the case, then why not just make reducers the default?

16:16 abaranosky: bbloom: the seq versions of map/filter are lazy for one

16:17 bbloom: abaranosky: can't that also be true of reducers on seqs?

16:17 and laziness doesn't make much sense for reduce really

16:17 gtrak: do you guys recommend slingshot's throw+ with a map or (throw (ex-info... ? to be consumed by try+/catch

16:17 chouser: yeah, the actual promised semantics are different, so changing the default would be a bitter step. But the differences don't matter in a large number of normal use cases.

16:17 s/bitter/bigger/

16:17 though perhaps bitter as well

16:17 abaranosky: my understanding was that anything using `fold` should be assumed to not be run sequentially, in other words it could be run in parallel

16:17 callen: gtrak: I use slingshot and I'm happy with it, but I'm far from an advanced user.

16:18 chouser: abaranosky: yes, but fold is not reduce.

16:18 bbloom: chouser: why do you ask about this?

16:18 chouser: Oh, just doing some writing. Was curious what the esteemed members of #clojure were thinking on the topic.

16:18 abaranosky: chouser: I haven't looked at them recently. My recollection was that they were all implemented with fold under the hood. I guess that's not the case?

16:19 chouser: abaranosky: no, you get to choose between calling reduce and are/fold

16:19 callen: chouser: it was my impression that reduce in Clojure was a synonym for fold.

16:20 bbloom: http://news.ycombinator.com/item?id=3945372

16:20 callen: chouser: whereas in CL reduce, foldl, and foldr were distinct.

16:20 reduce in CL is like Python's reduce.

16:20 chouser: callen: reduce in clojure means roughly the same as fold in some other languages. clojure.core.reducers/fold is not a synonym for clojure.core/reduce

16:21 callen: I wasn't equating the reducers function, but good to know.

16:21 gtrak: they both throw a clojure.lang.ExceptionInfo

16:21 chouser: The word "fold" isn't used anywhere else in Clojure that I'm aware of, for whatever that's worth.

16:22 abaranosky: I sawa talk by Rich Hickey where he explained that he is using the word 'fold' to mean "reduce where there are no ordering guarantees"

16:22 did I get that correct?

16:22 callen: chouser: Clojure's reduce is a foldl. amalloy has said as much before as well.

16:23 abaranosky: it's in keeping with his tendency to redefine vocabulary :)

16:23 llasram: bbloom: You can't get a lazy sequence out of a reducer is the difference. So abstractions based on e.g. infinite lazy sequences aren't reproducible with reducers

16:23 bbloom: right?

16:24 chouser: abaranosky: yes, I think that's how he uses "fold" in Clojure.

16:24 gtrak: llasram: reduce isn't lazy either

16:24 callen: I don't totally understand the point of a lazy reduce.

16:25 gtrak: lazy reductions, maybe

16:25 callen: you say that as if it makes sense.

16:25 isn't the final aggregation the reason you're using it?

16:25 chouser: but reduce on both lazy seqs and reducers could technically be halted by wrapping take-while (or r/take-while) around a lazy collection

16:25 gtrak: reductions gives you the intermediate steps of the reduce ;-)

16:25 bbloom: llasram: maybe, i haven't studied them extremely deeply for reasons of gfredericks' transients comparison

16:25 gtrak: not in the sense you were thinking

16:25 callen: I gather that, I'm just saying the semantics don't make as much sense as a map or filter that is lazy.

16:26 the intermediate values produced by a lazy reduce aren't usually as meaningful as that produced by a map or filter unless there are some interesting statistical properties to your data.

16:27 gtrak: if you want an accumulator with map, you have to close over some state I suppose

16:27 * callen nods

16:27 chouser: mutable state even. Closing a lazy seq over mutable state is bound to be fun for someone eventually.

16:27 hyPiRion: Rich is talking about clojure.core.reducers as not being lazy, not reduce itself

16:28 gtrak: reduce itself was never lazy

16:28 it was a loop/recur I believe

16:28 hyPiRion: reducers have mapping, mapcat, filter, remove, flatten...

16:30 gtrak: you guys and your newfangled libs... I just like me some polymorphic coll-reduce

16:30 abaranosky: chouser: what I'd like to get a better feel for is when I should consider using the reducer versions of map/filter/reduce?

16:31 chouser: ... how that compares w/ when to use pmap also

16:34 callen: abaranosky: it seems like the same "do I need to make this faster?" consideration to me. I don't know what else it introduces.

16:35 dnolen: chouser: I'm looking forward to trying them out, just haven't had time. Perhaps unrelated but do other people occasionally desire a short circuiting reduce?

16:36 bbloom: dnolen: would would be a "short circuiting reduce"? something like a parallelized linear search?

16:37 technomancy: gtrak: I recommend ex-info for throwing and slingshot if you need fancy catch clauses

16:37 bbloom: like a 'some but on an unordered set?

16:37 dnolen: bbloom: just something that stops upon returning a failure value.

16:37 technomancy: gtrak: slingshot could get you ex-info-like behaviour on pre-1.4, but the better solution there is to stop using pre-1.4 =)

16:37 gtrak: technomancy: any particular reason? seems like ex-info was made for that, but I'm not sure how to choose

16:38 for libs you don't want to drag in a dependency, but we are producing and consuming the API in the same app, which already has slingshot

16:38 technomancy: gtrak: slingshot only has throw+ because ex-info didn't exist at the time

16:38 ex-info is a better solution if you can count on it being there

16:39 well, technically throw+ supports throwing non-map objects, but IMO that's silly

16:39 gtrak: yea, that's silly

16:39 technomancy: try+ on the other hand, is six kinds of slick

16:40 chouser: dnolen: yes! ..and I've written a few (halting reduce fns, that is) each of them ugly in their own unique way.

16:40 dnolen: bbloom: I've found myself using loop/recur just to get short circuit behavior in core.logic. Not a big deal - I can understand why I tend to need it and others might not.

16:41 chouser: or you can use reductions, but then you often have to process the results -- last, map first, etc.

16:41 dnolen: chouser: yeah I've refrained from actually writing a helper thus far.

16:41 bbloom: dnolen: do those short circuiting processes require foldL semantics?

16:42 dnolen: bbloom: it usually involves reducing a value over a tree actually. probably a word for that I'm not aware of.

16:43 but once we fail, we just want to exit the whole process.

16:43 I think in one case I'm just throwing an exception :)

16:43 gtrak: reduce with continuations..

16:43 bbloom: gotcha

16:43 gtrak: reduce over the reduce continuations :-)

16:43 bbloom: as a side note, i dislike the name "reduce"... i always forget that the result doesn't need to be *smaller*. Like mapcat can be trivially implemented with reduce, but i forget that b/c reduce implies decrease in size to me

16:44 i much prefer the name "fold", plus it's shorter, considering how damn often i type "reduce" :-)

16:45 chouser: you fold things to make them bigger? ;-)

16:45 joevandyk: i parsed a giant xml string using clojure.data.xml. what's the best way to access a specific node deep in the xml?

16:45 bbloom: chouser: heh, good point

16:45 i guess i just don't ever fold physical things

16:45 whiteboards and terminals... who needs this paper shit?

16:46 hyPiRion: Computer Scientists, apparently.

16:46 bbloom: the C# folks went with "Aggregate" http://msdn.microsoft.com/en-us/library/bb548651.aspx

16:46 abaranosky: bbloom: or what about the name `aggregate`

16:46 tpope: I grew up on inject

16:46 zilti: joevandyk: Clojure needs a lense library.

16:46 tpope: anything else sounds strange :)

16:47 bbloom: does anyone but ruby call it inject ?

16:47 tpope: smalltalk

16:47 abaranosky: tpope inject just never made any sense at all

16:47 tpope: none of them *really* make sense

16:47 hyPiRion: Ruby's reduce is called inject?

16:48 tpope: hyPiRion: yep. although it has reduce now too

16:48 bbloom: abaranosky: sure it does. inject, like injecting heroine. you just gotta have your higher order collection processing

16:48 technomancy: hyPiRion: from smalltalk

16:48 zilti: "fold" makes sense.

16:48 technomancy: so I have to fix a problem with the jdbc sqlite driver by calling .setBusyTimeout on an org.sqlite.Database object. but using korma/c.j.jdbc only exposes a connection object (org.sqlite.Conn)

16:49 hyPiRion: tpope: Sounds alien to me - what is it about reduce/fold that makes it inject?

16:49 technomancy: anyone got the jdbc chops to help me find the magic class?

16:49 yogthos: reduce makes sense to me ;)

16:49 amalloy: abaranosky: inject makes sense if you're a bit of a loon

16:49 tpope: hyPiRion: something about allison's restaurant

16:49 gtrak: parameterize the injection of items into the accumulator

16:49 amalloy: you have a list: [1,2,3,4], and you inject a + operator in between each of them

16:49 abaranosky: I guess you are injecting the seq into the seed value?

16:49 amalloy: tada, you have 1+2+3+4, which is a reduce

16:50 yogthos: amalloy: that feels more like interpose :)

16:50 zilti: "inject" always reminds me of that dependency injection nightmare stuff

16:50 hyPiRion: hah

16:50 yogthos: lol

16:50 tpope: I saw it more as injecting each element into the memo, one by one

16:50 yogthos: zilti: traumatized by java? :)

16:50 zilti: yogthos: Somewhat, yes :)

16:50 yogthos: but if you think about what it's doing, you're reducing a collection into an accumulator

16:51 tpope: smalltalk (and thus ruby) has inject for reduce, detect for some, select for filter, reject for remove, and collect for map

16:51 joevandyk: for example, say i have this: https://gist.github.com/efa92479e3e8dd7b0436 and I want to access Status/StatusType/Description

16:51 hyPiRion: (injections + [1 2 3]) #_=> (1 3 6)

16:51 yogthos: it's not really about where you're sticking the operators

16:51 bbloom: yogthos: but the point of reducers is that there isn't a single accumulator :-)

16:51 amalloy: bbloom: eh? that's the point of fold, but not of reducers in general

16:52 bbloom: s/the point/one difference of/

16:52 yogthos: bbloom: fair point

16:53 I still feel it conveys the intent better than inject though :)

16:53 bbloom: yeah, boooo inject

16:53 sorry tpope!

16:54 hyPiRion: Well, I suppose it could've been named something worse

16:54 joevandyk: With Ruby's nokogiri library, I'd do Nokogiri::Slop(response).css('Status StatusType Description')

16:54 hyPiRion: "crunch" or "squeeze" something

16:55 technomancy: M-x paredit-convolute-sexp

16:55 zilti: hyPiRion: Should I ever create a programming language I know what I'll name it!

16:57 hyPiRion: zilti: I'll fork the language and rename it just because I can :)

16:57 joevandyk: should i use a zipper?

16:58 abaranosky: technomancy: oh, convolute-sexp ... awesome. Does it not have default binding?

16:58 technomancy: abaranosky: I don't know; I only use it like once a month =)

16:58 amalloy: abaranosky: it doesn't. i put it on M-<LEFT>

16:59 since i couldn't think of any clever letter-based mnemonics and it kinda moves stuff leftish

16:59 technomancy: joevandyk: zippers are good for when you care about the structure, but it sounds like you don't. enlive might do that; I think its scraping features are better-documented than its templating

16:59 amalloy: joevandyk: IME the answer to "should i use a zipper" is never yes. if you need to use a zipper you already know

16:59 gtrak: squeeze checks for divergence of your seq by a passed in function and taking the limit

16:59 joevandyk: technomancy: i know what the xml looks like, just looking for the best way to extract the elements out

17:00 technomancy: https://gist.github.com/efa92479e3e8dd7b0436 I need the first Package/Activity/Status/StatusType/Description field

17:00 amalloy: yeah, i think you want enlive, or Raynes's new laser. you could do it with data.xml too, but it would be difficult

17:01 technomancy: I haven't used clojure.data.xml, but one way to do it would be to call tree-seq and just filter for the class you want.

17:01 amalloy: or maybe laser only works on html, not xml? i dunno

17:01 technomancy: amalloy: oh, is laser scraping too?

17:01 I thought it was just templating

17:01 abaranosky: joevandyk maybe something like this is of some use to you? https://www.refheap.com/paste/7884

17:01 callen: I'm pretty sure it's just templating.

17:02 unless you really want tree-traversal for your scraping. ick.

17:02 amalloy: technomancy: it can parse html (xml?) into a tree. you can manipulate that just as much as you could a template you were building. i was presuming he already has the xml in-hand

17:02 * callen gags

17:03 technomancy: cool

17:03 callen: tree-seq+filter =)

17:05 Guest26268: Is it more idiomatic to use a recursive function or a (loop (recur)) form

17:05 jkkramer: joevandyk: https://github.com/clojure/data.zip/ - (xml-> (clojure.zip/xml-zip parsed-xml) :Package :Activity :Status :StatusType :Description)

17:05 gtrak: Guest26268: you can recur with functions too

17:06 loop is like let but also sets a recur-point

17:06 callen: technomancy: maybe so, but I like Sizzle.

17:06 yogthos: gtrak: absolutely

17:06 jkkramer: joevandyk: or xml1->. see also clojure.data.zip/text for getting the string value

17:06 callen: technomancy: also just wanted to say that I really like the literary theming in your libraries (leiningen, slamhound)

17:07 technomancy: callen: heh; thanks

17:08 callen: technomancy: if you haven't, you should check out the Mistborn series by Sanderson.

17:08 gtrak: Guest26268: equivalent: (loop [a init-a b init-b] ... (recur next-a next-b)) vs ((fn [a b] ... (recur next-a next-b)) init-a init-b)

17:09 technomancy: callen: I'll add it to the list

17:09 Guest26268: gtrak: thanks

17:10 technomancy: callen: from the one-¶ summary it sounds a bit like http://www.meetmyminion.com/?p=1031

17:12 callen: technomancy: it's more enjoyable a series than one would suspect. Also, the system is internally consistent.

17:18 joevandyk: jkkramer: is data.zip bundled with clojure?

17:18 jkkramer: joevandyk: no, it's contrib

17:24 joevandyk: jkkramer: hm, trying to do (clojure.data.zip.xml/xml1->) and getting a class not found exception

17:26 nm, figured it out

17:28 ravster: hello everyone

17:47 ppppaul: anybody here use datomic-simple?

17:53 Raynes: amalloy, callen, technomancy: I've never used it for scraping, but I can't see how it'd be any less useful for it than Enlive is. *shrug*

17:53 But yeah, no XML support.

17:55 If it isn't useful for screen scraping, it probably wouldn't take much to make it so (at least to the extent that Enlive is useful).

17:57 I'll look into that particular use case later. Looking at how Enlive does it, I probably need to add a function for that.

18:25 [1]tufflax: In Simple Made Easy, Rich was talking about rule systems (as opposed to having the rules spread out across the code base in if expressions). I've tried prolog, so I have some vague idea of what he means, but how would I go about extracting the rules from the if statements and putting them in a rule system? He also said there are libraries for this kind of thing, as if one does not need to go all-in with prolog to make a rule system.

18:26 AimHere: Well the obvious place to go for clojure would be core.logic, which is an implementation of a Prolog-like language called miniKanren

18:28 There should be a bunch of clojure talks and the like by core.logic and Kanren people, though maybe some didn't survive the exodus from blip.tv

18:29 tufflax: AimHere, I know about core.logic, but I need more guidance than that. What are some of the principles I need to keep in mind? Is there a good example of it somewhere? Can I have a majority of my code in regular clojure and use core.logic for the rules somehow?

18:30 bbloom: tufflax: logic and constraint programming as something of a black art and very new to the clojure community

18:30 AimHere: Well I've only done a little tinkering with it myself, so I'm not the person to ask, really. It's an inline DSL for clojure though, so your second question is yes

18:30 tufflax: I mean it sounds great to be able to have all the "rules" in one place, but I don't know how to achieve it

18:30 bbloom: tufflax: it's extremely application specific

18:30 tufflax: ok...

18:30 :p

18:30 dnolen: tufflax: I know a couple people are doing this - but no blog posts about the details thus far :(

18:30 chouser: tufflax: have you read the tarpit paper?

18:31 tufflax: not sure chouser

18:31 bbloom: ~tarpit

18:31 clojurebot: you there?

18:31 :-(

18:31 Rich_Morin: tufflax: On a related note, the Datomic query library supports a combination of Datalog, rules, and helper functions.

18:31 chouser: I think that continues to be a sort of general framework for where we might want to end up, and it certainly describes having all the rules in one place. But I'm not sure we have all the tools we need yet to write applications that way in Clojure.

18:32 Or at least, not many applications have yet been written that way.

18:32 tufflax: chouser, do you mean "out of the tarpit"?

18:32 chouser: that's the one

18:32 tufflax: i think i've read it, but don't remember much

18:33 I'll reread it and see if that helps ;)

18:33 chouser: :-)

18:44 tmciver: tufflax: I've created an epub version of that article (without the 2 or 3 images) if you're interested: https://github.com/tmciver/out-of-the-tar-pit-epub </shameless-plug>

18:51 ivaraasen: tmciver: nice

20:29 devn: Breaking a fever after doing a bunch of Datomic gives you strange, strange dreams.

20:30 technomancy: feverish dreams are the best. my favourite was when I dreamed I had to implement http://en.wikipedia.org/wiki/Puyo_Puyo_(series) in elisp as a derived mode of M-x tetris

20:31 hyPiRion: hah, I dreamt I was a Java compiler once and puked because of a syntax error

20:31 technomancy: nice

20:31 callen: my last fever dream was about Hyperdex and some seriously freaky shit that had nothing to do with programming.

20:32 at the time, I was figuring out how to do efficient n-dimensional indexing with conventional software.

20:33 devn: technomancy: I had the sensation that I was desperately trying to resolve a problem, but I couldn't quite make out what the problem was.

20:33 That feeling sucks.

20:34 technomancy: just documented Clojars Releases repo: https://github.com/ato/clojars-web/wiki/Releases

20:34 feedback welcome if you're confused about the recent developments

20:35 and also if you are not

20:39 bbloom: technomancy: the word "promotion" confused the hell outof me

20:39 i equate promotion with marketing

20:39 i was like "why does code signing affect my ability to promote usage of my package?"

20:39 technomancy: hmm

20:39 "level up your library"

20:39 bbloom: heh

20:40 the bullet points listed are validation errors, basically, right?

20:40 does anything else go there other than a "Promote" button?

20:40 technomancy: in the web UI? yeah, it's a list of blockers to promotion

20:40 bbloom: maybe "validation warnings" ? :-P

20:41 technomancy: the message you get when your pubkey is missing is confusing; I have a patch to fix it that I need to deploy

20:41 bbloom: the more confusing bit is that there is no distinction between a package's profile and admin panel

20:41 technomancy: "warnings" often implies they're suggestions rather than requirements

20:42 bbloom: promotion validation bullet points don't show up for other people's packages, right?

20:42 technomancy: right; you have to be logged in as an owner

20:42 do you think it merits a completely separate page?

20:43 bbloom: i think it does, or at least some kind of "admin zone" box

20:43 technomancy: yeah, maybe some kind of way of visually distinguishing it as special

20:43 bbloom: i want to see what other people see

20:44 technomancy: could probably come up with a better word for the list of blockers to promotion; will noodle on that

20:45 heading off but happy to take further feedback on the lein mailing list or later on IRC

20:45 bbloom: cya

21:00 zilti: I get SQL errors from sqlkorma about "expected identifier", what exactly does that mean? how do I have to

21:00 https://www.refheap.com/paste/7885

21:09 gfredericks: was just reviewing my project(from work)'s README.md and noticed that the link with the first use of "Leiningen" inexplicably points to http://jacobian.org/writing/great-documentation/what-to-write/ instead of anything to do with leiningen o_O

21:09 I feel like somehow this is technomancy's fault

21:10 zilti: Maybe it's a small hint for people start developping to show them how to write good documentation.

21:11 Wow. I just rewrote a namespace in a tenth of the time which is now half the length and twice as good as the old one.

21:12 gfredericks: that's a lose win win win

21:12 abaranosky: zilti: high five

21:12 zilti: o/

21:12 gfredericks: abaranosky: is you is the new korma guy?

21:12 abaranosky: gfredericks I'm not sure if it is official yet

21:12 * zilti *sound of self-backslapping*

21:13 gfredericks: abaranosky: is you is a guy who knows a lot about korma?

21:13 abaranosky: gfredericks at this point I only know the internal implementation of it "ok".

21:14 gfredericks: abaranosky: if you have a minute, I recently made a patch and am curious if you know of an easier way to do it, and if it would be useful in the main project

21:14 abaranosky: is there a pull request for it?

21:14 the easiest thing to do is make a pull request and we could comment there

21:15 gfredericks: that sounds SO EASY

21:15 hyPiRion: too easy

21:15 You guys should set up a JIRA page and get a CA and stuff

21:16 bbloom: :-/

21:16 gfredericks: abaranosky: I'll get on this once I receive your CA

21:16 abaranosky: I'm confused.

21:17 * gfredericks intends to keep spouting nonsense until he somehow ends up in a position of power

21:18 abaranosky: ah, I figured

21:18 gfredericks: hrm

21:18 bbloom: gfredericks: i'm pretty sure that's how anyone ever achieves power

21:18 gfredericks: can a pull request be cherry-pick style?

21:18 I guess I can cherrypick myself in a different branch

21:18 bbloom: gfredericks: yeah, that's what you need to do

21:19 gfredericks: there I go pretending I don't know git

21:21 man github is turning into this place where maybe you could get by doing stuff even if you didn't really know much about git

21:23 zilti: gfredericks: For your reassurance, it is already. Or I would already have studied the git manual.

21:23 hyPiRion: Yeah, edit files online, download easily, etc. etc.

21:23 * zilti goes to sleep mode

21:23 bbloom: zilti: that's a shame, b/c git has been as life changing for me as vim

21:23 gfredericks: this makes me feel old-school or something

21:24 I'm like those 35 year olds who swear perl is great or something but it'll never be worth learning for me

21:24 * gfredericks isn't sure that sentence made much sense

21:24 gfredericks: abaranosky: https://github.com/korma/Korma/pull/102

21:25 ToxicFrog: I'm sad github dropped upload support, though

21:25 Now I need to check in my releases, blargh

21:26 abaranosky: gfredericks checkin it out

21:29 gfredericks I've got to get going, but we should continue this discussion

21:29 gfredericks: abaranosky: cool, thanks!

21:40 dnolen: man, I love reify ...

21:40 devn: :)

21:45 i love datomic

21:46 dnolen: devn: still haven't found enough time to play with it ...

21:46 devn: dnolen: im finally "making" time in the sense that i have a couple of weeks off

21:47 Rich_Morin is doing an amazing job on the codeq-cookbook

21:47 dnolen: https://github.com/RichMorin/codeq-cookbook

21:48 dnolen: devn: nea, thanks

21:48 neat

21:48 devn: https://github.com/RichMorin/codeq-cookbook/wiki/qx__playground_rules

21:48 that's the big one^

21:49 Raynes: ToxicFrog: wat

21:50 ToxicFrog: What do you mean by upload support and checking in your releases?

21:50 devn: Raynes: github dropped Upload support

21:50 hyPiRion: Raynes: https://github.com/blog/1302-goodbye-uploads

21:50 Raynes: Please, define 'upload' support. I do not know what this means.

21:50 Thank you.

21:50 devn: you won't be able to upload a .zip and so on

21:51 ToxicFrog: Raynes: you used to be able to upload plain files to github, without checking them in to git, which was extremely useful for binary releases.

21:51 Now you need to either host them elsewhere or commit them.

21:51 Raynes: Yeah, don't commit them.

21:51 Please.

21:51 But this sucks.

21:52 Eh, they were a source of 'confusion'? Who was confused, I wonder?

21:52 I've got several projects that have releases in the download section. I guess this means they've thrown them away without even warning me.

21:53 I'm not sure I like that very much.

21:53 ToxicFrog: Committing them is clearly the wrong answer but it really sucks having to find a separate, reliable source of hosting (and then a reliable way of pointing users to it from the github page rather than having everything conveniently under the "downloads" tab on that very page)

21:54 Raynes: It isn't a problem for me to host my stuff myself. It's simply infuriating that I have to do. I put them in the Downloads section merely to keep everything contained.

21:54 ToxicFrog: Raynes: if you read the post, download listings will keep working for three months and direct links will keep working "for the forseeable future", but new uploads have been disabled.

21:54 Raynes: Yeah, I see. Doesn't make me feel any better. :\

21:55 Darn Github, taking away my free services.

21:55 yogthos: How are we doing on the revisions?

22:10 technomancy: on the bright side if you use your own S3 bucket you can actually get logs

22:10 since github also took away traffic graphs

22:10 (though they never offered them for downloads)

22:13 UberNerdGirl: hi...anyone recommend a good clojure static site generator, like Octopress/Jekyll?

22:14 * UberNerdGirl has tried Misaki

22:14 Raynes: I use octopress for my blog.

22:14 ToxicFrog: I try to avoid web dev, sorry.

22:37 djwonk: I use Octopress

22:39 does clojars allow anyone to fork and push a new version? I'm looking at https://github.com/weavejester/clj-aws-s3 as an example

22:40 weavejester pushed 0.3.3 but reiddraper pushed 0.4.0

22:41 xeqi: djwonk: anyone can fork and push, but we restrict pushing to a group by group membership

22:41 but you can always fork to org.clojars.username as a group

22:42 djwonk: so, generally speaking, a later version has the blessing of the original author?

22:42 maybe that is the essence of my question

22:43 xeqi: nope, it just means someone forked and bumped the version number

22:43 djwonk: but I thought that you said that only certain people (by group membership) can push a new version

22:44 xeqi: artifacts (like jars) come with 3 pieces of data: group, name, and version

22:44 you've found two artifacts with the same name

22:44 but the group is different

22:45 clj-aws-s3 vs com.reiddraper

22:45 djwonk: xeqi: thanks for clearing that up

22:46 xeqi: for an example of group memberships look at https://clojars.org/lein-swank; newest version pushed by tcrawley, older versions pushed by technomancy

22:47 that usually only happens on maintainer change though

23:14 jlewis: can one access the fields of a deftype outside of an implementation of a protocol method?

23:14 gfredericks: I think with regular interop

23:15 (.foo bar)

23:15 jlewis: is that considered gross? :)

23:15 gfredericks: definitely maybe?

23:16 callen: jlewis: I might be wrong, but it's been my impression that the attitude in Clojure is, "we're all consenting adults here, but lets exercise some taste"

23:16 gfredericks: do whatever you want but never ever do too much of it

23:16 hyPiRion: "drink only piss if you have to"

23:16 jlewis: hehe :)

23:16 tmciver: because if you do it too much, you'll go blind.

23:16 callen: jlewis: is there some reason you need to do this?

23:17 jlewis: usually I only "pierce the veil" of some code because 1. a java-tard wrote it or 2. somebody's clj code is breaking and I need to test a hypothesis.

23:18 jlewis: note that the assumption in both cases is that I didn't write the code.

23:18 jlewis: consider a deftype that has two functions on it that do an assoc kind of thing - a copy-and-modify of the object

23:19 one delegates to the other as an intermediate step

23:19 after that intermediate step, i'd like to be able to poke at the insides of my new object

23:19 does that make sense? i can gist up a little baby example if i'm not being clear

23:20 callen: jlewis: I'd like the refheap of this if only to potentially learn something new.

23:20 Raynes: why haven't you merged http://tryclj.com/ and http://refheap.com/ ?

23:22 Raynes: callen: Why haven't you merged Ireland with Florida?

23:22 gfredericks: s/merged/complected/

23:22 Raynes: They have about as much to do with each other as these two things do.

23:23 egghead: tryrefheap.com

23:23 gfredericks: oh man

23:23 egghead: you can just put some text in there and see if it's your sort of thing

23:23 gfredericks: the refheap+tryclj combo was so implausible that my brain replaced refheap with 4clojure without telling me

23:24 Raynes: Some dude wrote a (now broken) chrome extension that added a tryclj repl to your browser. I imagine you can embed it wherever you like.

23:24 gfredericks: I've been waiting for someone other than me to have that idea, but surprisingly nobody has done it yet.

23:24 callen: gfredericks: implausible?

23:24 Raynes: It would be trivial to embed a little tryclj repl in 4clojure's problem pages, gfredericks.

23:24 At least, I think it would be trivial.

23:24 gfredericks: callen: what's the use case?

23:25 Raynes: He probably just wants code evaluation.

23:25 gfredericks: Raynes: uh oh but then people could get more than a single bit of feedback!

23:25 callen: single bit of feedback?

23:25 gfredericks: pass/fail

23:25 eval in the pastie is nice actually

23:25 callen: gfredericks: being lazy when wanting to test other peoples' code.

23:25 gfredericks: there's some pastie that had that

23:25 I used it a lot

23:25 egghead: light table distributed pastebin w/ websockets

23:25 gfredericks: codepad.org I think

23:25 callen: gfredericks: http://ideone.com/

23:25 Raynes: gfredericks: codepad, ideone, etc.

23:26 gfredericks: I plan on doing some ideone-like stuff, only much, much simpler and prettier.

23:26 gfredericks: I don't want to know how much support goes into evaling C++ code

23:26 Raynes: I was working on the infrastructure for it with a friend, but that friend currently doesn't like me very much. I'll get it done one way or the other.

23:26 ibdknox: egghead: I have some neat ideas for code sharing with LT

23:27 Raynes: gfredericks: Not much, actually. C++ is easy to eval. You throw it in a file, compile it, run it.

23:27 I mean, these sorts of things aren't meant to run whole programs.

23:27 callen: Ehhhh. You end up need something like Geordi.

23:27 egghead: nice ibdknox :)

23:27 technomancy: LaForge?

23:28 callen: technomancy: da

23:28 jlewis: callen: https://gist.github.com/4394437

23:28 callen: obviously this example is contrived, and it could be done with records instead of types, or any other 100 things

23:31 callen: jlewis: so, this may sound ridiculous but bear with me here. 1. Please use refheap 2. Avoid nonsense names like foo/bar it damages the readability semantically.

23:32 technomancy: meh; gist is fine; it's the ad-laden ones that are wretched.

23:32 jlewis: well, the whole point is that it's a contrived example :) the functions i wrote don't make much sense outside of this example

23:33 callen: jlewis: so what are you getting at? what's the question?

23:34 jlewis: i suppose i was just showing you the example that i was talking about, since you had asked.

23:35 but i suppose what i'm asking is, if you're implementing a protocol method inside a deftype, is there a better way of sneaking a peek at the insides of a different instance of that same type?

23:38 tmciver: I tried to serialize a Joda DateTime object but got the error: IllegalArgumentException No method in multimethod 'print-dup' for dispatch value: class org.joda.time.DateTime

23:38 Is the only way to make this work to implement print-dup?

23:39 technomancy: tmciver: sure, you can do a defmethod

23:39 hyPiRion: tmciver: You can implement it as a multimethod

23:39 no need to hack around in the source.

23:40 tmciver: Should print-dup be defined in clj-time for user-friendliness?

23:42 callen: jlewis: I'm thinking about it. My impulse is to say that it's probably fine.

23:43 jlewis: I'm far from the most knowledgeable person here though.

23:45 jlewis: note however that if you set :unsynchronized-mutable or :volatile-mutable for any of the types you do this with, direct-field access will break.

23:45 jlewis: yikes - not going there! :)

23:45 callen: jlewis: so this would seem to only work, absent the application of blood magic, for default immutable types.

23:45 jlewis: then godspeed and if it breaks, please come back and tell me I'm an idiot.

23:46 jlewis: will do! i'm not so much worried about it breaking - it seems like a pretty straightforward use of the regular interop syntax. i was just wondering if there's a better way. thanks for your thoughts.

23:48 callen: jlewis: well I started thinking about that, and the moment my brain went to "recursive protocol implementor invocations" came to mind, I decided this way was better.

23:48 but I'm an idiot, don't take the limits of my imagination for anything approximating good taste.

23:48 jlewis: yeah... you could make a getter, but that seems silly

23:49 like, really silly :)

23:50 callen: jlewis: right. I was also considering the compile time semantics of a macro wrapping the defprotocol. I quickly reached, "No. Don't."

23:52 Raynes: yogthos: You tested your stuff locally, right?

23:52 yogthos: Raynes: yeah I've been using it with the template

23:52 Raynes: I'm asking because I'm going to release this without testing it at all, because I obviously care a lot about quality control.

23:52 yogthos: Raynes: :P

23:53 Raynes: yeah it should be ok, I'll keep testing tonight, if I find anything I'll ping you :)

23:53 Raynes: yogthos: Too late. I released.

23:53 yogthos: Note that I don't mind releasing fix versions if necessary. I'm at version 1.10 of laser. ;)

23:53 yogthos: Raynes: we'll just have 0.2.2 :P

23:53 Raynes: 0.3.0

23:53 callen: yogthos: vut.

23:53 Raynes: yogthos: 0.3.0 is deployed.

23:53 callen: Raynes: of what?

23:53 yogthos: awesome!

23:53 Raynes: lib-noir

23:54 yogthos: and I got the template options working, so once I update it you'll be able to do stuff like new luminus myapp bootstrap

23:54 callen: Raynes: is stuff from Luminus merged in?

23:55 yogthos: callen: yeah like 2 minutes ago :)

23:55 * callen does a happy dance

23:55 Raynes: yogthos: Now I'm going to give you commit access. I only ask that you do any work in branches so that I or Hermione may look it over before you merge it in.

23:55 yogthos: Raynes: awesome thanks, we'll definitely do code reviews first

23:55 Raynes: I think we found a lot of stuff that way

23:56 the system works :)

23:56 Raynes: Indeed

23:56 Plus, you have this thing about end of line whitespace.

23:56 ;P

23:56 yogthos: lol yeah it came back

23:56 haha I caught another one in route too :P

23:57 callen: Raynes: Hermione?

23:57 Raynes: callen: Chris Granger

23:57 * callen facepalms and laughs

23:57 callen: Raynes: does he know you have a book tracking app named after him?

23:58 Raynes: wat

23:58 callen: oh woops, not you.

23:58 nicl

23:58 Raynes: https://github.com/nicl/granger

23:59 Raynes: yogthos: It is done.

23:59 jlewis: heh, there are better reasons to call a book tracking app 'granger' than that quote

23:59 yogthos: Raynes: golden :)

23:59 jlewis: ever read farenheit 451?

23:59 "Granger is the leader of a group of wandering intellectual exiles who memorize books in order to preserve their contents.

23:59 "

Logging service provided by n01se.net