#clojure logs

2012-12-27

00:01xeqijuldre: I think you can pass ":mode :dev" in the options to noir.server/start to have it do code reloading
00:02callenjuldre: words to the wise: might want to migrate away from Noir and just use vanilla Ring.
00:04juldrecallen: Noir seems to include some templating stuff that's handy, any reason why you prefer Ring?
00:05jkkramerjuldre: http://blog.raynes.me/blog/2012/12/13/moving-away-from-noir/
00:05callenjuldre: it's not about preferring something, Ring underlies Noir.
00:05jkkramerI use ccw. All my web projects use compojure and embedded jetty during development; code reloading happens as part of the usual interactive repl development
00:06callenjuldre: there exists luminus, which itself uses lib-noir, raw ring, and using lib-noir yourself.
00:07jkkramercompojure is generally preferable to raw ring, unless you feel like matching routes yourself
00:07callenjuldre: I'd just get in the habit of doing all web apps with Compojure and Ring, sprinkling on other bits as you see fit.
00:09juldrecallen: thank, just tingling around at this point
00:10juldrejkkramer: can you explain what you mean by "usual interactive repl development" ?
00:11juldrejkkramer: my current problem is that once I have a REPL started, idk how to get the IDE to reload my code changes
00:12jkkramerjuldre: opt-cmd-L
00:12juldrejkkramer: what is that supposed to do?
00:12juldredoesn't do much for me
00:12jkkramerjuldre: loads the current file in the repl
00:13jkkrameryou can also select a function and press cmd-enter to eval it
00:13juldrejkkramer: that works, but then I get "BindException Address already in use" exceptions ?
00:13jkkramerjuldre: are you running the server at the top level?
00:14jkkramerjuldre: the idea is, you start the server once. then just hot recompile functions as you change them. the server doesn't need to restart
00:15callenjkkramer: stuff just kinda reloads automagically for me.
00:15juldrejkkramer: Not sure just running the example that came out of leiningens noir template
00:15callenOTOH, #'handler might have something to do with that.
00:16callenjuldre: 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.
00:16bbloomvars are useful for adding an extra level of indirection when you'd otherwise have issues hot reloading a composed function
00:16jkkramerjuldre: noir does questionable stateful things, which is why most recommend moving away from it. I'm unfamiliar with developing with it
00:16callenjkkramer: I am unfamiliar with this dark magic. What does it need/use state for?
00:16bbloomconsider (def fog (comp #'f g)), if you redefine f, then fog changes. if you redefine g, fog will not change
00:17jkkramerthere'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
00:17jkkramercallen: from what I understand it uses atoms to accumulate middleware and routing stuff
00:18callenjkkramer: odd.
00:18juldreJkkramer, callen: is there a lein plugin you'd recommend to start fresh for a simple web project?
00:18jkkramerI think, I'm not really sure. the way it handles views also seems screwy. I just use compojure
00:18callenjuldre: yes, the default/empty one I spoke of.
00:18juldrepresumably compojure + ring ?
00:18callenjuldre: just learn how to cobble an app together yourself, first time round.
00:18callenjuldre: it takes all of a handful lines of code to get a compojure/ring app going, seriously.
00:18juldrefair enough
00:18callenNoir is saving you at most 5-10 lines of code for the "demo" case.
00:19callenjuldre: Ring underpins all Clojure web dev, effectively, so you might as well know how it works.
00:19callenjuldre: once you've familiarized yourself, you can take a gander at Luminus to see what a relatively mature Ring/Compojure template looks like.
00:19callenlib-luminus has a little bit of magic to rip out though.
00:19callenyou'd want to pester yogthos and Raynes about that one, though.
00:20yogthosheya
00:20Rayneswut
00:20juldrecallen, jkkramer: thanks for the helpful advice
00:20Raynesyogthos: We're apparently the goto guys for web development now.
00:20Rayneso/
00:20yogthoslooks that way :P
00:21Raynesjuldre: yogthos is working on a template for for a batteries included compojure + lib-noir app.
00:21RaynesIt should be great for everyone's sanity.
00:21yogthosyeah we're just in the process of rolling in the good stuff from lib-luminus into lib-noir
00:21yogthosonce that's done I'll update the template and docs
00:21RaynesYup, and I expect that to be done by tomorrow.
00:21RaynesAssuming yogthos has time to do some last minute changes by then.
00:22yogthosthe plan right now is to put libraries and functionality in the lib and all the config stuff in the template
00:22yogthosthat 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
00:22yogthosyeah I'll be around :)
00:23yogthosalso I heard including bootstrap in the template would be useful, anybody have thoughts on that?
00:24RaynesI wouldn't like that.
00:24RaynesI can't imagine lots of people wanting bootstrap.
00:25yogthosI could always make a separate even more batteries included template I guess :P
00:25yogthosis there a way to cascade them with lein newnew?
00:25bbloomNuclear Reactor Included
00:25jkkramerdoes lein templating support adding options to a template? lein new whatever +bootstrap +backbone or sometyhing
00:25Raynesyogthos: No.
00:25Raynesjkkramer: You could do that!
00:25Raynesyogthos: ^ genius
00:25yogthosthat's a good idea! :)
00:26jkkramerthen you can provide all sorts of common helper libs
00:26yogthosyup
00:26yogthosbecause nothing's ever going to please everybody :)
00:27yogthosand flexibility is what a lot of frameworks lack like rails or django for example, it's kind of all or nothing deal
00:27RaynesAin't that the truth.
00:27yogthosif we could make something that's as easy as rails without any of the drawbacks that'd be killer :P
00:27Raynesyogthos: How has the experience building a template been so far?
00:27yogthosRaynes: pretty awesome actually
00:28bbloomthat's the dream right? both simple AND easy!
00:28Raynesyogthos: 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.
00:28Raynesyogthos: 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.
00:28yogthoshonestly I haven't had any issues, it's intuitive and works as I'd expect so far
00:29yogthosyeah I could take a look at that
00:30yogthosI mean it's templating, I don't think it should be terribly complicated, newnew seems like a sweet spot to me
00:30RaynesYeah, I really don't want to change it significantly if I don't have to.
00:30RaynesI can't imagine breaking everyone's templates this late in the game.
00:30RaynesMaybe in Leiningen 3.0 or something.
00:30callenmy talent for rabble-rousing is peerless.
00:31RaynesI do not know what those words mean.
00:31yogthoshaha
00:31callenRaynes: I know people like to rag on the South, but it can't be that bad can it?
00:32RaynesY'all need to stop all that makin' fun of me.
00:32yogthosRaynes: you weren't kidding about him rewriting the whole thing :P
00:32callenI 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.
00:32RaynesI can't help it I ain't from them big cities.
00:32yogthosjust looking at it on github
00:32callenthe South has big cities.
00:32callenyou're just not in any of them :P
00:32RaynesThis is true.
00:32RaynesI'm from the middle of nowhere.
00:33RaynesI don't have a particularly strong accent though. My family originates from Michigan.
00:33callenRaynes: I'm from the midwest, so people in New York and California have always regarded me as some sort of religious leper.
00:33callenRaynes: oh me too, my family's from Ohio and Michigan.
00:33RaynesI was born in Alabama, but my mother and her siblings were not.
00:33xeqiI even hear it has a program to send things into something called "space"
00:33juldrewhat's the best way of finding what I need to include in :dependencies? I had read clojars but that site keeps timing out
00:34juldreif I need to find that for a specific library
00:34callenI'm just going to go ahead and say it
00:34callentechnomancy: clojars goes down because the embedded design is harming concurrency.
00:34RaynesOh my.
00:34RaynesNobody is safe from the callen.
00:34callenRaynes: not my fault they used sqlite and raw lucene indices.
00:35callenbut did anybody listen to the callen? nooooo
00:35juldreso no clojars replacement ?
00:35RaynesRefheap uses mongodb and shells out to pygments. It never goes down unless Heroku breaks. I'm a winner.
00:35callenjuldre: clojars is fine.
00:35xeqihmm, I can't get clojars to time out for me
00:35juldrebut is down often...
00:35RaynesYeah, nor I.
00:35RaynesI don't think it is.
00:35callenRaynes: Heroku does break independently of AWS btw.
00:35yogthosthe repo or the site?
00:36juldrethe site
00:36juldrei'm in canada fyi
00:36callensite search worked for me.
00:36juldreshouldn't matter
00:36yogthosyeah but that doesn't mean you can't use the repo
00:36Raynescallen: I imagine so.
00:36yogthosditto here
00:36mpanjuldre: personally I use google search and read projects' homepages and readmes, but I don't claim that's particular efficient
00:36yogthosand maven caches stuff locally anyways
00:36callenRaynes: I'm saying I have a repro for such a thing.
00:36callenRaynes: 2/3 of my heroku accounts are permanently broken
00:36yogthosso even if it was down for some reason you still have local artifacts
00:36callenRaynes: and I can't seem to get them fixed.
00:36Raynescallen: I really don't like Heroku after that last downtime, so you don't have to convince me of anything on that particular front.
00:37xeqijuldre: 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
00:37xeqiclojars's search is not very good
00:37juldreand it works now
00:37xeqito be fixed
00:37jkkramerjuldre: there's http://www.clojuresphere.com/ but it's currently a bit out of date
00:37yogthosit's not great for searching no
00:37callenRaynes: I just have a hard time taking a web app/hosting service seriously that can't keep their login/admin panel working.
00:37mpangoogle has the added benefit/drawback of bringing up related blog posts and articles
00:37juldrethanks all
00:37yogthosthis is probably the most active place http://clojure-doc.org/articles/content.html
00:37callenthey must not have email notifications for novel HTTP 500s or something, who knows.
00:37xeqiI've got plans to replace the search, just need to do more cleanup to fix some other bugs first
00:38RaynesOur Linode has better uptime than Leonardo Da Vinci.
00:38callenjuldre: going to concur with the mention of clojure-doc.org btw, that's a ClojureWerkz shindig.
00:38yogthoslinode rocks :P
00:38callenjuldre: ClojureWerkz are the people you want to go to for docs, libraries, etc.
00:38RaynesTruth.
00:38yogthosindeed
00:38technomancycallen: did you get migrations working with lein run?
00:38callentechnomancy: no, but I got them working.
00:39callentechnomancy: I scienced up the bitch and figured out what was breaking the migrations library and fixed that.
00:39technomancythere seems to be a lot of confusion about writing lein plugins when you should just use run; bleh
00:39callentechnomancy: I put up a pull request as well.
00:39technomancyI should write a blurgh post
00:39callenyogthos: cwz is why I pestered you about timbre.
00:39RaynesYeah, no shit. If Michael Klishin isn't writing documentation he is whining about other people not writing documentation. His whole life is documentation.
00:39technomancythe idea of a plugin to run your migrations is kinda silly IMO
00:39callentechnomancy: you should get your employer to make my heroku accounts stop 500'ing on login.
00:39yogthoscallen: yeah that was a good catch :)
00:39RaynesDude is like the documentation masta.
00:39callenlol @ klishin
00:39callentechnomancy: lobos embraced that ethos but didn't bother to demonstrate it.
00:39RaynesEverybody has to stop shitting rainbows!
00:40RaynesWhy haven't we made him a meme yet? The shitting rainbows bit was golden.
00:40callentechnomancy: mostly because they seem to use the REPL for migrations (lolwut)
00:40technomancycallen: lobos is deeply misguided
00:40callentechnomancy: oh do tell.
00:40technomancycallen: the idea that you can write database code targeting one DB and use it on another.
00:40callenaha, welcome to why I use migratus.
00:41technomancyit's a losing battle, but by the time you realize it you've already sunk hundreds of man hours into it
00:41callensigh, I went to upload a screenshot of the Heroku HTTP 500 I'm getting
00:41Raynescallen: Speaking of breaking websites, I once permanently broke 3 different repositories that I created while testing the Github API in my tentacles library.
00:41callenwent to imgur, got an HTTP 502
00:41callengod dammit.
00:41Raynescallen: I could not even delete them.
00:42technomancyschema definitions are completely nonstandard and if you think you can abstract over the differences you haven't used enough databases
00:42callenRaynes: wait what. How'd you do that?
00:42technomancycallen: wait, a screenshot?
00:42juldreBTW what is the difference between http://clojuredocs.org/ and http://clojure-doc.org/ ??
00:42Raynescallen: I do not remember.
00:42juldrecame as a bit of a confusion to me initially
00:42yogthoshaha no relation :)
00:42RaynesThey are completely different and unrelated websites.
00:42yogthosone's a really nice lib documentation site the other is general docs
00:42RaynesComplain to Michael Klishin (PLEASE) about not picking a good name.
00:42yogthosclojuredocs is really handy for reference
00:42technomancyjuldre: the maintainer of clojuredocs.org is MIA and moving it to a clojure backend is a work in progress
00:43callentechnomancy: http://i.imgur.com/NM0xc.png
00:43callenjuldre: don't use clojuredocs unless you have to.
00:43Raynestechnomancy: I remember loling hard when I saw that clojuredocs was a Ruby site.
00:43callenRaynes: WOW, ouch.
00:43yogthoslol
00:43technomancyRaynes: I loled too, but then it actually took off =\
00:43callenI still resent the apps that are ruby front/clojure back.
00:43yogthoshey planet clojure runs on python :P
00:44technomancycallen: deployment mullet!
00:44mpanwhat particular issues are there with clojuredocs?
00:44callentechnomancy: oh nice nomenclature.
00:44technomancympan: rails
00:44RaynesIt is old outdated buggy unmaintained and rails.
00:44yogthosthe content is fine :)
00:44callenmpan: abandonment.
00:44RaynesIt even stole my commas.
00:44jkkrameris it open source now?
00:44bbloomRaynes: i nominate you to upgrade it. chop chop
00:44mpanwhat's the recommended alternative? just (doc)?
00:45Raynescallen: https://github.com/Raynes/edited-tentacles-test2
00:45jkkramerah yup, looks like it is. for a while it wasn't
00:45Raynescallen: This repository exists. Figure that one out, bro.
00:45callenRaynes: it...404s...
00:45Raynescallen: https://github.com/Raynes You can see it on my repo list.
00:45RaynesI even told Github about it but they never responded.
00:45RaynesI hope they fixed whatever I did, because it's pretty nasty.
00:46callenRaynes: it just tried to clone...then asked for a login?
00:46technomancyRaynes: where is the lazy bot?
00:46jkkramerRaynes: you're the reason github was down over the weekend, aren't you?
00:46calleneven though my github has been auth'd for awhile?
00:46Raynestechnomancy: Dead.
00:46Raynesjkkramer: Haha, this was ages ago.
00:46technomancyjkkramer: yeah, I couldn't believe he released it without the source; ugh
00:46Raynestechnomancy: It was really the worst case scenario documentation site.
00:46callenRaynes: 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?
00:47technomancyRaynes: just good enough to keep someone else from doing a proper job of it?
00:47callenRaynes: if I had to guess, you broke the layer between git and their persistence layer.
00:47callenRaynes: but I don't know enough about GitHubs' black magic to say for sure what exactly.
00:48Raynescallen: My face is exactly the picture on the github page, sans the blue hair.
00:48RaynesMan, I need blue hair again. I don't feel right without colorful hair.
00:48technomancyRaynes: fsbot over in #emacs has a ,revive command that's useful in scenarios like this
00:48mpanRaynes: do people treat you weird for it where you live? (if I may ask)
00:48technomancysprinkling holy water, muttering enchantments, etc
00:49Raynesmpan: 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.
00:50RaynesBut the ones that inevitably do hate me for it remain quiet.
00:50mpanRaynes: that's really interesting to hear
00:50mpanI vaguely remember the south being very enforcing of conformism
00:50RaynesI imagine in LA people won't even notice. I'll be the normal one with blue or green hair.
00:50yogthosyeah it's like that here in Toronto
00:50RaynesAt least where I live, it's mostly religion and homosexuality that people are very clearly set in their ways on.
00:50yogthosthe normals are the ones who stand out :P
00:50callenmpan: 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.
00:51RaynesI've definitely seen the religious hatred and homophobia.
00:51callenso if you don't have an aborted fetus or leather daddy on your shirt, you're probably okay.
00:51mpaneh, they treated me weirdly in school
00:51callenmpan: I'm sorry to hear that.
00:51mpanbut to what extent that was my identity vs my personality vs my generally being different
00:51mpanI can't honestly say
00:52mpaner, I honestly can't say, rather
00:52callenmpan: hard tellin'. I'm a white dude in the USA, I'm not really in a position to be oppressed.
00:52callenthose that tried, in school, usually ended up coming to some sort of harm.
00:52RaynesI never went to any schools, but I cower in fear from thoughts of how I might have turned out if I had.
00:52mpannone at all?
00:52callenRaynes: you would've done a lot less programming.
00:53RaynesIndeed.
00:53mpanwere you home schooled?
00:53RaynesYes.
00:53mpanoh cool
00:53RaynesNot for religious reasons, thankfully.
00:53technomancywaste a lot less time that way
00:53callenRaynes: when I was in High School, it was a never-ending battle between school and time for programming. between myself, parents, faculty, etc.
00:53callenI should've been homeschooled.
00:53RaynesI 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.
00:54bbloomcould always have done what i did my senior year of high school:
00:54callenbbloom: 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.
00:54bbloomfigure 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
00:54callenbbloom: to my credit, I did get some coding done.
00:54callenin school and out of it.
00:54RaynesThe 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.
00:55technomancyIME a good portion of institutionalized schooling exists primarily to keep kids out of trouble rather than to actually instruct.
00:55bbloomi 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?"
00:55callentechnomancy: 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.
00:56RaynesYour kidneys might disagree.
00:56technomancyproper instruction simply doesn't scale to fit the staffing levels that are feasible in a typical school
00:56technomancycallen: well it wasn't exactly designed with you in mind
00:56callentechnomancy: that's why I figgered I shoulda been home-schooled.
00:56technomancythough using the term "designed" makes it sound less emergent than it is
00:56bbloomtechnomancy: 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
00:57bbloomsmaller class sizes basically just reduce the probability of disruption, but don't eliminate it
00:57callenbbloom: could just do what the Germans do
00:57bbloomwhich is?
00:57callenbbloom: damn the disruptive young ones to a blue collar future so the serious students can get on with it.
00:58callenUK does a similar thing, but that was really more about class warfare.
00:58yogthosthat german efficiency :P
00:58technomancybbloom: well, a society that's incapable of disciplining students gets what it deserves
00:58yogthosI think the main issue with schooling is that it tends to punish curiosity
00:58Raynestechnomancy: IIRC, they still use paddles at a nearby school.
00:58callenRaynes: that's just precious.
00:58RaynesIndeed.
00:58technomancyjust wait for the first lawsuit
00:58RaynesI had a friend with first hand experience.
00:59Raynestechnomancy: It has been going on for a long, long time. I don't think anybody cares.
00:59bbloomheh, 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
00:59bbloomi kid, i kid
00:59yogthosthat was the soviet system incidentally :P
00:59bbloomRaynes: are either of your parents programmers? / what do they do?
00:59mpanbbloom: furthering encouraging GPA optimization? that sounds risky
01:00yogthosyou either did well in science/math or army for you :)
01:00bbloommpan: mostly kidding
01:00callenmpan: it works better when you have an authoritarian gov't like the Soviet Union where gaming the system is marginally harder.
01:00mpanperhaps
01:00Raynesbbloom: 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.
01:00RaynesI wouldn't know what he is up to these days.
01:01mpanlike half my high school pretty much optimized for GPA over actual learning
01:01RaynesI think he used to do various labor jobs, like roofing and building.
01:01RaynesI imagine he still does.
01:01mpanbut they're "successful" and I'm not, so maybe I'm just sour grapes
01:01bbloomRaynes: so did one of them home school you? or are you entirely self taught?
01:01yogthosthat doesn't change in university either unfortunately
01:01RaynesMy aunt home schooled me, but mostly self taught.
01:01yogthospeople just learn to cram for exams and tests
01:01callenI've done reasonably well for myself despite being a uni dropout.
01:01mpanyea university felt quite that way as well
01:01bbloomRaynes: that's quite a super hero origin story
01:01yogthosactually understanding stuff is not required
01:01callenIt turned out that I found real work far more inspiring.
01:02Raynesbbloom: 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.
01:02yogthosI enjoyed it as exploration time, didn't get much out of most of my courses though :)
01:02RaynesHow is babby formed? "GOD!"
01:02yogthosoh dears :)
01:02technomancyLet's bring back apprenticeships
01:03technomancywe can make the apprentices fix the Windows bugs
01:03jkkrameryeah man. I want myself a lackey
01:03bbloomtechnomancy: 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
01:03yogthoslol just burn windows, burn it with fire!
01:03callenI basically apprenticed too, but indirectly.
01:03Raynescallen: 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.
01:03mpanI think I'd actually enjoy being an apprentice for a while, but I missed my chance with internships
01:03callenI'd be down with bringing apprenticeship back.
01:04callenAlthough what we call apprenticeship currently exists as "sub-contracting"
01:04mpanand "internships"
01:04callenRaynes: how angry are you?
01:04yogthoscan you guys imagine life like 30 years ago, pre internet
01:04yogthosI was thinking about that a little while back
01:04Raynescallen: Well, I still enjoy talking to you.
01:04callenyogthos: yes, I call it the birthplace of Unix.
01:04yogthosyou'd basically grow up only knowing people around your geo location
01:04yogthosand then you'd get a job probably locally
01:04yogthosand only talk to people there
01:05Raynesyogthos: We would have found each other anyways, baby. <3
01:05callenRaynes: 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.
01:05yogthosit's scary stuff :P
01:05yogthoshaha
01:05mpanI worry what I would have done for a living if I had lived 30-40 years earlier
01:05RaynesI would have been a meteorologist.
01:05callenmpan: I'd have ended up becoming a pirate electrician.
01:05RaynesNot hard for me to figure outt hat one.
01:05technomancyeven in college, the amount of stuff I learned increased dramatically once I got a wifi card and could get online from the classroom =)
01:05jkkramermud farmer
01:05technomancywell, outside humanities anyway
01:05ibdknoxMy co-founder and I were going to go to culinary school
01:05mpanRaynes: I hear that field has an absolutely absurd surplus of people vs jobs
01:05RaynesI know more about storms than everybody in this IRC channel combined.
01:06yogthoswith internet you just need a few people around the globe to share an interest and bam you can hang out and do shit :)
01:06Raynesmpan: I didn't say I'd be employed. ;)
01:06callentechnomancy: in my personal studies I found the humanities stuff really enriched my ability to leverage what I knew in other realms.
01:06callenRaynes: are you just fascinated with storms?
01:06mpanI suppose I could have become a meche in another life, or something
01:07Raynescallen: Terrified of them. It's easier to protect yourself from things you understand.
01:07callenLOL
01:07technomancycallen: absolutely. I just meant it was one of the few places in which I learned more from actually going to class vs teaching myself.
01:07callenRaynes: I used to ride a 350cc enduro through thunderstorms in Ohio in the mud
01:07technomancycourse that was classical education rather than lectureware
01:07RaynesIt's mostly tornadoes that I worry about.
01:07ibdknoxtechnomancy: ?
01:08callentechnomancy: ditto, although ocw.mit.edu taught me a fair bit about CS.
01:08technomancyibdknox: I guess what I'm trying to say is that I was in a really crappy CS program =)
01:08mpanhm, well, good night from the east coast, folks
01:08mpangonna get some sleep and try to maintain half a sane sleep wake cycle
01:08Raynesmpan: Good night.
01:08Raynesibdknox: Hey.
01:08Raynesibdknox: You.
01:08yogthosg'night
01:09callentechnomancy: 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.
01:09Raynesibdknox: Did you talk to Alex Baranosky? Dude wants to take over Korma and is really excited about it.
01:09callenmpan: g'night.
01:09Raynescallen might also be interested in knowing that.
01:09callenI'm what
01:10RaynesThat there is a maintainer for Korma stepping up.
01:10ibdknoxHe emailed me, earlier, need to respond
01:10ibdknoxI'm really excited about it too
01:10Raynesibdknox: Please do. He is the real deal. He does what he says he is going to do. See slamhound.
01:10ibdknoxbecause he's done great work in other places
01:10ibdknoxyeah
01:10callenso should I start pestering him?
01:10ibdknoxcallen: let him get up to speed first :p
01:10RaynesWell, I'd give it a few days. ;)
01:10callenibdknox: no, no breathers!
01:10callenSTURM UND DRANG! SCHNELL!
01:11callenoh Runa employee, right.
01:11callenone of rathore's people.
01:12juldre One more question guys, in CCW how can I run commands like "lein ring server" in the embedded REPL ?
01:12ibdknoxcallen: rathore's not at Runa anymore
01:12callenRaynes: one of the problems with applying for a job in Lisp is that you're now competing with Lisp programmers for the job.
01:12callenibdknox: oh he'd just announced departure right?
01:12Raynescallen: Luckily I'm pretty damn good.
01:12callenlike a week ago or so?
01:12juldreI 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
01:12yogthosjuldre: you can't you'd need a main
01:13technomancyjuldre: whatever you're running from the command line, you can run in the repl
01:13technomancyjust find the -main function and call it
01:13juldreyogthos: what should the main contain ?
01:13ibdknoxI thought it was a good while ago. He talked about his new project at strange loop in september
01:13yogthoscallen: my trick has been to slowly infect my workplace with clojure :P
01:14yogthosjuldre: make a new Leiningen project in eclipse and change template from default to compojure-app
01:14yogthosjuldre: it'll set it all up for you
01:14callenyogthos: I'm musing a similar approach. I'm a pseudo-CTO so I've got better leverage to that end.
01:14callenyogthos: I end up writing most of it anyway, so they don't really have a choice.
01:14yogthoscallen: it took me about 2 years, but now we have a team working mostly in clojure and actual production use :)
01:14yogthoscallen: same here :P
01:14callenyogthos: that's damned impressive, where at?
01:15yogthoscallen: it started with this https://github.com/yogthos/clj-pdf
01:15yogthosI work here http://www.uhn.ca/clinics_&amp;_Services/services/SIMS/index.asp
01:15yogthosbeing public sector has some advantages :)
01:15callenyogthos: very cool. I'm a little terrified of anything that involves PDF, I must confess.
01:16yogthosmainly open sourcing tends to be easy seeing how we're run by tax money to begin with :)
01:16yogthoscallen: we had to do report generation and if you've ever used iText it's not pretty :)
01:16yogthosI also made it into a service :) http://yogthos.net/instant-pdf/
01:16callenyogthos: I tend to start with "All rights reserved" and then turn stuff into open source libraries on a case-by-case basis.
01:17callenyogthos: I work mostly on startups / on contract though, so that'd be why.
01:17technomancyif 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
01:17yogthoscallen: 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 :)
01:17callentechnomancy: i get your meaning there, but I can't make that choice.
01:17yogthoscallen: with startups you have a good chance to sneak clojure in too :)
01:17yogthoscallen: people tend to be a lot more open minded
01:17callentechnomancy: I'm working towards the profit of a private entity, always. I consider open source to be something I do on "me-time"
01:17callener
01:17callenwtf
01:18callenchange the technomancy to yogthos above.
01:18callenclearly it's time for more vodka.
01:18yogthosha!
01:19juldreyogthos: works great thanks
01:19yogthosjuldre: good stuff
01:19yogthoscallen: but yeah amount of push back I got initially was crazy
01:19callenyogthos: oh don't worry, I was dealing with almost immediate push-back the moment I mentioned it.
01:19callenyogthos: "IT'S A LISP?!!>!!231341231"
01:19yogthoscallen: in the end it all boils down to "how are we going to find people who know clojure"
01:20callenyogthos: you don't, you train a Java/Ruby/python programmer.
01:20yogthoscallen: I didn't have much problem with the team, it's the management!
01:20yogthoscallen: well exactly
01:20callenI had pushback from team too :(
01:20yogthoscallen: the nature of the industry is things change!
01:20ibdknoxfuck managers ;)
01:20yogthoscallen: why would you hire somebody who can only do one thing and not learn anything new
01:20bbloom"how are we going to find people who know clojure"
01:20callenyogthos: 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.
01:20yogthoshear hear
01:21Raynesibdknox: Listen to Cinderella Man by Eminem. I always imagine this song is about us.
01:21callenyogthos: precisely.
01:21yogthoswell what's amusing is that people have to learn a ton of shit anyways
01:21ibdknoxRaynes: haha
01:21yogthoslanguage is a small part of it
01:21bbloomis code for "how are we going to fend off all of these awesome canidates that want to write clojure?"
01:21yogthosyou work on a java project in one company and you go to another
01:21ibdknoxbbloom: lol
01:21yogthoschances are you have to learn new tools, libs, frameworks, etc
01:21Raynesibdknox: You have to listen to the whole thing, no matter how much you hate Eminem or rap music.
01:21callenyogthos: case in point, I've spent the last day or two battling migration libraries. lol.
01:21yogthosand if you can't learn a language how are you going to learn the rest of it :)
01:21technomancyRaynes: that's a lot to ask
01:21Raynestechnomancy: I know, man.
01:22callenRaynes: k, you've piqued my curiosity
01:22ibdknoxtechnomancy: every once in a while you have to take one for the team, you know?
01:22bbloommaybe link them to http://www.paulgraham.com/avg.html ?
01:22Raynestechnomancy: I hate rap and anything relating to it, but I have this strange affection for Eminem's Recovery album.
01:22ibdknoxbbloom: that is surprisingly ineffective
01:22callenRaynes: just so you know, you're interrupting Russian Pop music and norwegian black metal. This better be good.
01:22callenbbloom: I don't think PGs Reality Distortion Field works on managers.
01:22Raynescallen: The part that I enjoy is mostly the latter half of the song.
01:23RaynesThere are some lyrical gems in there.
01:23yogthoscallen: my approach to managers is that it's easier to ask forgivness :P
01:23callenogad, I'm listening to Eminem and I'm nearly out of vodka.
01:23callenyogthos: engineer pushback prevented that approach
01:23Raynescallen: I've infected you.
01:23callenyogthos: I have a blubby Java/Spring dev I can't seem to rid myself of.
01:23bbloomcallen: maybe point out the value of YC's portfolio? :-P
01:23yogthoscallen: ah shitty :)
01:23callenyogthos: he complains...loudly.
01:23yogthoscallen: I know that problem :P
01:24yogthoscallen: 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
01:24callenI don't understand why he's working in startups. At all.
01:24technomancythe only rap I can handle is the overclocked remix rap battle between link and gannon: http://hvv.ocremix.org/project.html
01:24yogthoscallen: then next meeting oh yeah I already have it working, why don't we use it "interm" and rewrite when we need to
01:24yogthoscallen: after all it's just a jar, we can always swap it out with a java one later :P
01:24callentechnomancy: jesus I'd nearly forgotten about OCRemix. way to start me on another musical sprint.
01:24Raynescallen: 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.
01:25yogthoscallen: 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
01:25yogthoscallen: works surprising amount of time :P
01:25callenRaynes: it involves storms.
01:25technomancybetter link: http://hvv.ocremix.org/music.html#link
01:25technomancyno pun intended
01:25yogthoshaha
01:26callenRaynes: I have no opinion. it's a white dude rapping.
01:27technomancycallen: how about a white dude ... from Hyrule?
01:27callenI generally can't do rap.
01:27bbloomon topic for a moment: is there an intersperse function in core? ie equivalent to (#(next (interleave (repeat :comma) %)) [:foo :bar :baz])
01:27RaynesI just jumped to Windows, so if anyone said anything to me in the last 45 seconds or so, I missed it.
01:27yogthosinterpose?
01:28callenbbloom: find-fn?
01:28yogthos%(interpose "," (range 5))
01:28bbloomyogthos: aaaah THANK YOU
01:28Raynes&(interpose "," (range 5))
01:28lazybot⇒ (0 "," 1 "," 2 "," 3 "," 4)
01:28yogthosah right :)
01:28bbloomno idea why i couldn't ever find that
01:28callenbbloom: you warmed my cockles, I feel better about not being able to beat amalloy_ on 4clojure now.
01:29yogthosspeaking of which TIL about string/join instead of (-> foo interpose str) thanks Raynes :)
01:29technomancyinterpose is still shorter unless you need to use it multiple times
01:29Raynescallen: 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."
01:29technomancysince clojure.string requires adding a :require clause
01:30Raynescallen: "Hot enough to melt hell and burn Satan too, fry his ass and put his ashes back together with glue."
01:30yogthostrue
01:30callenRaynes: do you and ibdknox both hate storms?
01:30Raynescallen: See, I can't even *imagine* lyrics like this, so I'm fascinated by people who can.
01:30ibdknoxI love storms
01:30callenRaynes: Eminem is a noted lyricist.
01:31Raynesibdknox 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.
01:31callentechnomancy: from wheer?
01:31callen...where.
01:31yogthosI guess sf is more about quakes :)
01:31technomancycallen: southeast asia
01:31yogthosI used to live in LA a while back and got hit by a 6.7
01:32yogthoswas not fun
01:32technomancywhere the rain is warm
01:32callenyogthos: I never notice them here.
01:32callentechnomancy: oh, yeah, I was in SE Asia on the tail-end of that. Was pretty nice.
01:32technomancyyou never get proper torrents in Seattle, just drizzle
01:32callentechnomancy: cold drizzle.
01:32technomancycallen: yeah, that's what makes all the difference
01:33yogthoscallen: if a 6+ hits you'll notice
01:33ibdknoxRaynes: I was born in ohio
01:33callenahoy fellow Ohioan.
01:33technomancyused to look forward to rain to cool things off, plus you knew that it'd be cleared up by 3pm anyway.
01:33ibdknoxI remember being at my grandparents one time with 6 tornados on the ground
01:33callenOhio produces the best people...but they leave :)
01:34yogthosI guess unless you want to work for the airforce there's not much to do there :)
01:34ibdknoxtechnomancy: that was one thing that I missed while I was in seattle
01:35callenyogthos: not totally true. some excellent cost of living arbitrage to be had there.
01:35callenyogthos: especially if you're a mercenary contractor like I was.
01:35bbloomibdknox: the one thing? are you forgetting about... oh... i dunno... THE SUN?
01:35yogthoscallen: ah now I know :)
01:36ibdknoxbbloom: we got lots of that during the summer!
01:36callenbbloom: he's got a startup now, he doesn't have time to see the sun.
01:36ibdknoxI have no idea why
01:36technomancyit took me like two and a half winters to actually start to appreciate the sun when it came
01:36ibdknoxbut that really never bothered me
01:36yogthosthe day star is my nemesis! :P
01:36technomancygetting over the horrible damage that los angeles did to my psyche I guess
01:36bbloomcallen: now that he doesn't have to use Windows he can use little-w windows
01:36Raynesibdknox: In the same place
01:36Raynes?
01:36callenbbloom: vut.
01:37Raynesibdknox: That doesn't really happen. You probably mean 6 tornado warnings at the same time.
01:37Raynesibdknox: There were 15 tornado warnings at one time yesterday, all for separate storms.
01:37bbloombad pun on MS windows and actual windows in which he can experience the sun w/o leaving work
01:38callenRaynes: http://www.onntv.com/content/stories/2012/03/03/story-tornados-in-ohio.html
01:38Raynescallen: 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.
01:40callentechnomancy: are you a fan of the legend of zelda series?
01:40ibdknoxRaynes: nope, 6 actual tornados on the ground
01:40technomancycallen: I haven't really kept up with the series beyond the SNES version =)
01:41ibdknoxwithin like a 200 mile radius or something, my grandfather used to work for the weather service
01:41ibdknoxhe loved that shit
01:41technomancyLink to the Past is fantastic though
01:41callentechnomancy: hey I have a similar background with it. Loved the NES and SNES versions, lost interest with Ocarina though
01:42Raynesibdknox: 6 ground confirmed tornadoes on the ground then.
01:42ibdknoxyeah
01:42ibdknoxI liked ocarina
01:42Raynesibdknox: Was this the Super Outbreak? Were you even old enough for that?
01:42ibdknoxmajora's mask was a little ridiculous
01:42technomancycallen: I heard a lot of people loved Ocarina; I've been waiting for emulation to get good enough to give it a shot.
01:42callentechnomancy: the emulation is there, now.
01:42callentechnomancy: I tried to get into it, couldn't. I'm a devotee of the 2d era for that sort of thing.
01:42ibdknoxtechnomancy: yeah you can easily play n64 games at perfect frame rate
01:43technomancycool; last time I checked was like five years ago
01:43callentechnomancy: yeah it's good enough now. Especially for a ridiculously popular game like Ocarina.
01:43yogthosibdknox: even on your phone probably :P
01:43calleneverybody and their sister optimizes their emulator for Ocarina.
01:43ibdknoxI actually went and bought an SNES for link to the past and super metroid
01:43technomancyheh; makes sense
01:44callenibdknox: tempting...
01:44Raynestechnomancy: I think Emulation is good enough now.
01:44Raynestechnomancy: If you're willing to get mupen64 working properly.
01:44technomancyibdknox: what kind of hoops do you have to jump through to hook it into a modern television?
01:44ibdknoxtechnomancy: the later versions had RCA out
01:44technomancyhuh
01:45technomancytempting, but I'd have to find a place for an actual television too
01:45ibdknoxI missed the controllers
01:45ibdknoxemulating just isn't the same
01:45ibdknoxand as those are consistently rated two of the best games ever made, I figured why not
01:45technomancyyeah you can get fairly good playstation-alike controllers, but not so much for snes
01:46technomancybe sure to get Chrono Trigger too
01:46technomancyif you haven't played it
01:46yogthostechnomancy: now that's a fantastic game!
01:46technomancymaybe FF6 if you can find it, though from what I hear the official translation is pretty bad compared to the fan ones.
01:46ibdknoxI never have and I want to, but it's stupidly hard to get
01:46technomancyyeah, shame
01:47callenthere are USB adapters for real SNES controllers
01:47callenand N64, NES, Genesis, etc.
01:47bbloomthe wired xbox 360 controllers are pretty good substitutes
01:47callenthat's what I use, but adapters exist.
01:48bbloomthe 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
01:48technomancyhah
01:48bbloomi think after like 3 years they finally switched the dev kits to come with wired controllers
01:48ibdknoxps3 controllers will just hook direectly to a mac
01:49callenibdknox: that hasn't worked great for me in the past.
01:49ibdknoxit works wonderfully in the mountain lion
01:49yogthossame here, though I did get a wiimote to work with dolphin :)
01:49yogthosnew super mario for wii was pretty playable
01:49callenI got a wiimote to work reaaaasonably well, but the PS3 controller never was quite right.
01:52callenI wonder how many times that second-click to do a pull request on github has saved me from making an ass of myself?
01:52yogthosha
01:55bbloomwhat's the idiomatic way to convert a record to a map?
01:58callenbbloom: I'm unaware of any established idiom or function. Go with your gut, I'd say.
01:59jkkramerbbloom: (into {} arecord) ? A record is already map for many purposes
01:59bbloomjkkramer: ah, that seems nicer. yeah i want to strip the type for equality
02:00callenjkkramer: nice!
02:02yogthosre: all the tornado business earlier :P http://io9.com/5971273/could-a-captive-tornado-power-an-entire-city
02:02callenI feel a bit like gollum with the elven rope around his neck whenever I have to interact with the Java ecosystem from Clojure.
02:02callen"IT BUUUUUURNS USSS"
02:02ibdknoxanyone have a raspberry pi?
02:03yogthosibdknox: got one here
02:03callenibdknox: serious question, what's the appeal of those things? the constraints?
02:03ibdknoxcallen: I want to build a robot
02:03ibdknoxyogthos: what do you do with it/what do you use to program it?
02:04bbloomis there a reasonable way to easily customize behavior for str, pr, and pprint all at the same time?
02:04yogthosibdknox: I made a mamebox out of it
02:04callenibdknox: rumor has it Go makes for a nice cheap-n-cheerful embedded lang.
02:04bbloomparticularly if i want to print as a tagged literal ?
02:04yogthosibdknox: boring I know :) but it has a debian distro so pretty much anything you want runs on it
02:04callenyogthos: MAME games will run on an RPI?
02:04yogthoscallen: some
02:04Rich_MorinFYI: http://gigasquidsoftware.com/wordpress/?p=560 (Hobby Languages for Clojurists)
02:05callengoing to concur with "adorable mascot"
02:05yogthoshttp://ipggi.wordpress.com/2012/11/26/mame-arcade-game-fun-with-a-raspberry-pi/
02:05callenI have the Go Gopher on my desk.
02:06callentoo bad I get tired of for loops quickly.
02:06callenRich_Morin: dude. J.
02:06callenRich_Morin: I love the APL family.
02:06yogthosis factor still maintained by anybody?
02:07ibdknoxapparently node runs pretty nicely on it
02:07ibdknoxI could make a CLJS robot :D
02:07callenyogthos: yeah the crazy slav dude.
02:07Rich_Morincallen: I have a button from DEC: "VAX-11 APL -- Array of Hope"
02:07jkkramerbbloom: not that I know of. there's toString, print-method, print-dup, and clojure.pprint/simple-dispatch to implement
02:07ibdknoxcould even use core.logic build a constraint system for it
02:07yogthoscallen: I thought he got bored of it
02:07yogthosibdknox: you can run the jvm on it
02:07callenyogthos: oh, guess i'm wrong then. the problem was that factor destroyed the point of it all.
02:07callenyogthos: Factor killed the joy of APL langs.
02:07yogthoscallen: :)
02:08callenI'm serious.
02:08bbloomFactor is seriously cool
02:08bbloomjkkramer: k thanks
02:08callenif I'm using a concatenative language, I fully expect my code to look like glyphs from a Wizard's Grimoire.
02:08bbloomjkkramer: 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
02:09yogthosibdknox: apparently startup times are pretty brutal http://stackoverflow.com/questions/14040196/improving-startup-time-of-clojure-repl-with-leiningen-on-the-raspberry-pi
02:10yogthosapparently haskell runs on it though http://www.haskell.org/haskellwiki/Raspberry_Pi
02:10jkkramerbbloom: i had to customize that stuff recently and it involved more research and experimentation than I expected
02:10bbloomjkkramer: printing is really hard in general
02:11bbloomjkkramer: for speed, you need to do the side effectual (.write writer a-string) thing
02:11jkkrameryeah
02:11bbloombut what you really want is a composable grammar that generates a parser and a pretty printer for you
02:12bbloomi wonder if you could also generate a fast writer from that....
02:12bbloomprobably good :-)
02:12bbloomcould*
02:12jkkramerI would think so. I encourage you to shave that yak
02:13bbloomjkkramer: that's quite a yak....
02:14callenmy yak-shaving usually comes in the form of the original yak. Emacs.
02:15bbloomthe pretty printer that's in clojure now is very common-lisp-y... i've considered doing a more clojure-y one
02:15bbloomjust cus every good programmer has to write at least one pretty printer in their lifetimes
02:18callenbbloom: hey. hey.
02:19Rich_Morinbbloom: Go takes pretty-printing VERY seriously: code has to be formatted just so...
02:19callenRich_Morin: Go was made to serve Google's needs.
02:19callenRich_Morin: they have to collectively martial the efforts of thousands of engineers.
02:19callenamusingly, in the process, they invented a language less hackerish than C and less powerful than Java.
02:20Rich_MorinTrue, but I believe that Rob and Ken would have told the mgmt to take a hike if they got overweening...
02:20callenRich_Morin: I don't really trust Pike's judgment tbqh. Ken I do though.
02:21Rich_MorinOf course Ken isn't allowed to check in C code at Google...
02:21callenRich_Morin: he never bothered with the certification process.
02:22Rich_Morinyep :-)
02:22callenRich_Morin: and that process was for C++, not C code.
02:22callenRich_Morin: C isn't an official language at Google.
02:22callennot in the same way C++ and Java are.
02:22callenRich_Morin: I'm pretty sure Ken just writes code for the compiler and other people end up vetting it and checking it in.
02:23hiredmanI would love to have something like gofmt for clojure
02:23callenhiredman: well it'd be easy to do.
02:24callenhiredman: delimiters galore.
02:25bbloomcallen: it's only easy if you do like gofmt does and have ZERO OPTIONS
02:25bbloomif you include lots of settings, then pretty printers are stunningly complex
02:25callenbbloom: you don't need any for Go. it doesn't recognize the existence of anything other than the official style.
02:25callenbbloom: I don't doubt it, I was really just cracking a joke about S-expr
02:26bbloomcallen: which absolutely brilliant for a bigco language
02:26callenbbloom: I'm sorry?
02:26bbloomIf 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
02:27bbloomGo is brilliant from that perspective
02:27bbloomit's got lots of ugly bits, but it's far prettier than C
02:27ibdknoxI mean emacs's indentation has more or less been turned into the standard
02:27ibdknoxwe could just rip that out into a lib
02:27bbloomand it's got some of the bondage nonsense of Java, but only where it proved valuable, and not where it didn't
02:28ibdknoxI wonder what Clojure with a bunch of "mediocre" devs would be like
02:28bbloomibdknox: unholy.
02:28callenibdknox: excessive defrecord?
02:28callenibdknox: lots of if and do?
02:28bbloomibdknox: do you do any pretty pretty printing & formatting in LT?
02:28yogthosibdknox: can't be worse than java with a bunch of mediocre devs :P
02:28yogthosibdknox: the things I've seen *shudder*
02:28bbloomyogthos: oh yes it can.
02:29ibdknoxyogthos: yeah, I'm not convinced it would really be worse
02:29callenbbloom: I'm not so sure.
02:29yogthosbbloom: classes inevitably turn into twisty mazes of passages all alike ;)
02:29callenbbloom: people back in CL-land always liked to say that macros would make mediocre devs truly dangerous
02:29callenI'm not so sure.
02:30yogthosbbloom: I agree with callen, I think clojure would keep people more focused on the actual problem
02:30callenfor one thing, I'm not convinced the mediocre devs would've ever figured out quote/unqoute.
02:30callenfor another, Clojure in particular I think would do what yogthos describes.
02:30bbloomnever underestimate the ability of the average dev to ignore the actual problem :-P
02:30ibdknoxbbloom: not yet, but I would like to eventually
02:30ibdknoxthere's some very basic support
02:30ibdknoxfor auto-formatting
02:30ibdknoxshift + tab
02:30ibdknoxwill format the line
02:30bbloomibdknox: you might get lucky and i might write a pretty printer :-P
02:30ibdknoxthat would be nice :D
02:30yogthosa lot of oo code is just cargo cult in my experience ;)
02:31yogthospeople will write their interfaces and then have a single class implementing them, and then create mazes of these things impossible to navigate
02:31callenyogthos: don't you mean...PATTERNS
02:31yogthosand when you ask them why they created this insanity, they say it's patterns :P
02:31yogthosexactly!
02:31callenyogthos: I ran into a guy once that was writing a 3d audio library in C++
02:31ibdknoxbeautiful, beautiful patterns
02:31yogthosthat's how you write "good oo" code
02:31callenyogthos: I couldn't find the actual implementation.
02:31ibdknoxthey're abstract art
02:31callenyogthos: it was the perfection of "ravioli code"
02:31yogthoshaha we have a project like that at work :P
02:32callenyogthos: I use the phrase "spooky action at a distance" when I talk to that blubby Java/Spring guy at work
02:32yogthoshahaha
02:32callenyogthos: I don't think he gets what I mean yet.
02:32yogthosspring is especially nasty with half the shit being defined in xml somewhere
02:32callenmaybe someday he'll realize his XML-directed java horror was a mistake.
02:32callenyogthos: YES. YES. THAT.
02:33yogthosso you can never tell what the fuck is actually running :)
02:33callenmy FUCKING god I hate Spring.
02:33callenPlay Framework is so much nicer. or was, in 1.0. With 2.0 they appear to have gone off the Scala deep-end.
02:33callenPity.
02:33yogthosindeed
02:33callenyogthos: I figured out how the blubby-one survives. IntelliJ
02:33callenyogthos: it generates all his XML for him through wizards.
02:33callenand just manages the entire project state.
02:34yogthosyeah it's quite common with java devs
02:34callenhe even uses git through the damn thing
02:34callengenerating ugly git commits, I might add.
02:34callenI can never read his commit history
02:34callenit's an ounce of code buried in a pound of metadata and XML
02:34yogthosyup
02:34callenand people wonder why I insisted on Python for so long.
02:34callenat least that was actual...code...
02:34callenand the occasional script.
02:34callenyeesh.
02:35yogthosyeah I mean java's bad enough as a language, but the way people use it is the worst part by far
02:35callenyogthos: aye. Play 1.0 was pretty cool and admirable.
02:35yogthosI would love to know where these "best practices" come from exactly
02:36callenyogthos: enterprise? C# is an okay language but the Microsoft/corporate influence plus lazy blub programmers ruin it by far.
02:36yogthosbecause never have I seen any of the virtues extolled work in practice
02:36callenyogthos: 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#.
02:36yogthosand the absolute worst is when people start chasing the generic solution
02:36callenyogthos: hadn't you heard? stashing all your data in strings is "generic
02:36callen"
02:37yogthoswe're going to make it so fucking generic and so damn customizable that it'll solve every problem except the one we actually have
02:37callenyogthos: reminds me of JWZs law.
02:37callenyogthos: all programs expand in scope until they include email functionality.
02:37yogthoscallen: ha!
02:38callenyogthos: could be revised to, "all corporate-developed systems expand in scope until they also are a full ERP system"
02:38yogthoscallen: indeed
02:39yogthosit's like that steve yegge rant about how all the configuration languages are destined to become turing complete, stuff like ant and maven :)
02:39yogthosah this one! https://sites.google.com/site/steveyegge2/the-emacs-problem
02:39yogthosvery topical :)
02:40callenyogthos: somehow I avoid being so directly reliant on regex as yegge. I wonder why.
02:41callenyogthos: 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
02:42yogthoscallen: yeah I tend to use them sparingly, regexes can turn code write only pretty fast if you're not careful
02:42callenwell 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.
02:42yogthosI weened my team of soap last year, was a big win :)
02:42callenfor my line of work, it's better to stash something in a SQL db, MangoDB, Redis, Kafka, whatever.
02:42yogthoscallen: this fell out of the exercise https://github.com/uhnuser/json-service-commons
02:43yogthoscallen: and this https://github.com/uhnuser/json-client-commons
02:43callenyogthos: yeah I expose RPCs via JSON pretty often. That's practically my standard mode of operation.
02:44yogthoscallen: soap is another thing that gets used without people thinking
02:44callenyogthos: I'm still not certain what it solves that a REST + JSON RPC couldn't.
02:44yogthoscallen: the whole point of soap is to allow disparate clients to connect to a service using the wsdl description
02:44callenoh, that's something else entirely.
02:44yogthoscallen: yet people keep using it when they control both the client and the service ends where it serves no purpose whatsoever
02:44callenyeah that makes sense.
02:45yogthoscallen: in theory you expose your wsdl and people consume your service using the definition
02:45callenfew things necessitate or will achieve that level of structuredness thoguh.
02:45yogthoscallen: in practice that rarely works
02:45callenRight.
02:45yogthoscallen: since the spec is kinda loose on stuff like dates for example
02:46yogthoscallen: you ever see this? http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-stands-for-simple/
02:46yogthoscallen: nails it
02:46callenyogthos: a long long time ago.
02:46callenyogthos: 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.
02:46yogthoscallen: it's not rpc... so how do you generate the document? oh you just serialize your classes :P
02:47yogthoscallen: 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
02:50callenyogthos: to be fair, that could be argued to be a usability based decision.
02:50yogthoscallen: which says a lot about soap usability :)
02:51yogthoscallen: and I'm off to get some sleep here g'night dude
02:51callenyogthos: 'night
03:05callenyou know, my battles with the migration libraries taught me a fair bit
03:05callenI s'ppose there's a fair bit for me to be thankful about there
03:07yunfanso is there anyone using clojure for analyzing log
03:07callenyunfan: NOPE NEVER EVER
03:07callenyunfan: haha, what are you looking for?
03:07callenyunfan: text processing? log analysis at scale?
03:08callenyunfan: log analysis "at scale" implies Hadoop or Storm.
03:09yunfancallen: i want to analyzing our web log using clojure
03:09yunfancallen: i was now using shell and python doing that job
03:10yunfanbut the demand changes everytime
03:11yunfanso i think its case like they said in the book "hacker and painter", i could using a lisp dialect for doing these job
03:11callenyunfan: 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.
03:13callenyunfan: you don't want to plunge blindly into Clojure or any Lisp for that matter because of what PG said.
03:14callenyunfan: learn and decide for yourself if it's right for you. in my experience, Python works pretty great for cobbling scripts together.
03:15yunfancallen: 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
03:16yunfanand my practical py code, i think was written follow the FP style, i am a big fans of python's list comprehension
03:17Ember-no, not using clojure for log analyze, but that should be pretty easy with clojure
03:17Ember-read your log as lazy seq by lines and process
03:17yunfani could show you a snippts of my py code which use list comprehension lots
03:18callenno
03:18Ember-it all depends on what you mean with "log analyzing"
03:18Ember-but callen is correct in his implication that if you have a LOT of logs then you should be using a map-reduce library
03:18Ember-such as Hadoop
03:19Ember-if your data mass is around few hundred megabytes then Hadoop is overkill
03:19callenEmber-: your words are redundant, callen is always correct.
03:19yunfanhttp://codepad.org/SDJS01X9 check this, the problem is the python community dont encourage people use this anywhere
03:19callenEmber-: especially if you can get away with using grep. grep is fucking fast up to a few gigabytes depending on hard drive.
03:19Ember-yeah, but who knows what the actual need is?
03:19yunfani dont have too many logs
03:20yunfanjust about 20G a month
03:20Ember-ok, you have csv files, not logs?
03:20yunfannope the input is apache log
03:20yunfanand the output is csv
03:21callenEmber-: probably doing glorified "group by" on log files.
03:22Ember-it looks like it
03:22Ember-counts stuff
03:22yunfanwell , the log is all track records
03:23yunfanour sdk would send back the client's info via http request
03:23yunfanso i need to collect these log, parse it and analyze it
03:23Ember-anyway, I'm not sure if you really *need* clojure or any lisp for that, but it is pretty easy to do with clojure...
03:25yunfanthen could you told me where i can found any parse related libraries like regex, http request parse
03:27Ember-yunfan: that stuff is mostly in clojure core
03:28Ember-,(re-matches #"[a-z]*" "foo")
03:28Ember-aww, no bot
03:29AimHere&(re-matches #"[a-z]*" "foo")
03:29lazybot⇒ "foo"
03:29AimHereone bot
03:29yunfanEmber-: shame, i dont knew this
03:29Ember-anyway, clojure has a reader macro for generating regexp strings
03:29Ember-start your string with # and it's interpreted as regexp
03:29AimHere&(slurp "http://www.google.com&quot;)
03:29lazybotjava.security.AccessControlException: access denied (java.net.SocketPermission www.google.com:80 connect,resolve)
03:29yunfani just have read the book "clojure, funtional programming language" which book would you recommend for the next read?
03:30Ember-depends on your background, programming clojure 2nd ed is great if you have a java background
03:30Ember-or well, it's great if you have OOP background
03:30yunfannope i am not a java coder
03:30yunfanand to be honestly i dont like java
03:30Ember-hehe
03:30Ember-you should learn java at least somewhat if you're going to use clojure
03:31yunfani am a python engineer and got some c and forth experiences
03:31AimHereAt some point you have to at least learn to read Javadocs :(
03:31Ember-since clojure embraces java and doesn't try to reinvent wheel where Java has good implementations
03:31yunfani just dont like the java syntax
03:32Ember-for example:
03:32Ember-&(Math/PI)
03:32lazybot⇒ 3.141592653589793
03:32Ember-that is a java static method call
03:32yunfanyes i knew this fromt he book
03:33Ember-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
03:33Ember-makes your life so much easier
03:34AimHereWell if he knows C and python, then the language itself is a doddle
03:34yunfani am doing that , for my android phone
03:34Ember-AimHere: yeah, but java specifics such as java GC, java stacktraces and stuff like that
03:34Ember-which has nothing to do with syntax
03:34yunfanjust learned too fast that cat remember some method/term
03:35AimHereI was thinking the other end, all the libraries that you end up pulling into your code
03:35yunfanwell python also have GC and stacktraces and even import :]
03:35Ember-python GC is a different beast than JVM
03:36AimHereYeah. Also Clojure has Java Stacktraces, which makes it somewhat painful
03:36yunfanok
03:36Ember-same basic principle, different implementation with different details
03:36Ember-and python concurrency sucks monkey balls, global interpreter lock anyone?
03:37yunfanyes
03:37callenEmber-: Python concurrency effectively doesn't exist.
03:37Ember-indeed
03:37yunfanthis is the most famous suck point of python's GIL
03:38Ember-on the other hand, Java has a very good concurrency implementation, it's only problem is in the Java's mutable world
03:38Ember-which Clojure happily fixes :)
03:38Ember-but to really answer your question about pointing you towards regexp, http handling etc in clojure
03:39Ember-https://github.com/dakrone/clj-http
03:39yunfanEmber-: good, very thanks
03:39Ember-and regexps are built in
03:39yunfanyep i tried that
03:40Ember-and btw, if you didn't already use leiningen to handle your clojure builds then learn that too
03:40Ember-makes adding libraries a breeze to your project
03:40Ember-and a lot of other things too :)
03:40yunfani usede that a little
03:40yunfanjust know lein2 deps/repl
04:15RaynesYou don't need to learn Java to use Clojure.
04:15RaynesYou can learn what you need to know from Java just by googling when you need it.
04:16augustlI do wish I had more JVM experience though
04:17augustlfinding out a lot of things the hard way, running out of permgenspace, how mvn dep resolution actually works, etc
04:17augustl(I don't know Java)
04:18Rich_MorinI 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.
04:19Rich_MorinI have been happily avoiding Java since its inception. I'd like to continue doing so, but still use Clojure.
04:21Rich_MorinAll 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...
04:21yunfanRich_Morin: good i got the book name , thanks
04:21yunfanRich_Morin: how about using clojure-script
04:21Rich_Morinyunfan: the book I mentioned doesn't exist.
04:22yunfanerr
04:23Rich_MorinClojureScript is a subset of Clojure, so it's missing some nice parts. Also, unless you're happy with the JS ecosystem, it kinda sucks.
04:24yunfanwell consider you're a rubyist, its amazing that you hate js than java
04:25Rich_MorinI'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.
04:25Rich_MorinOr worse, not realize that I don't recognize them, eg: a Ruby module is NOTHING like a Java module...
04:26yunfanwell i'd like new terms, but i hate that i finally found that's a new wheel
04:26yunfanjust like when i finally familiar to use make, then they told me i need to intall maven
04:27Rich_Morinyunfan: 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...
04:27yunfanRich_Morin: there's a thin book which only tech people the good part of js
04:27yunfanso you could using that to ignore the bad parts
04:27Ember-I dislike CoffeeScript due to it's ambigious syntax
04:28Ember-good attempt on 'fixing' the javascript though
04:28Rich_Morinyunfan: I think you're talking about Crockford's book.
04:28yunfanRich_Morin: there's a butterfly on the book
04:29Rich_Morinyunfan: http://www.amazon.com/dp/0596517742
04:30Ember-this pretty much nails my problems with CoffeeScript http://ceronman.com/2012/09/17/coffeescript-less-typing-bad-readability/
04:30yunfanRich_Morin: yes that's the book
04:31Rich_MorinEmber-: point taken. hasn't been a problem for me, but I can see his points.
04:32yunfani found many people dislike the parenthesis
04:32Rich_MorinOne 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?
04:33yunfanis it possible to define a macro which accept ident/semicolon based scope and parenthesis both?
04:33yunfanthat would reduced the mass parenthesis which boring many people
04:34Rich_Morinyunfan: Are you talking about Clojure?
04:34yunfanRich_Morin: yep
04:34augustlyunfan: 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
04:34Ember-you should not try to kill the parenthesis with clojure
04:34Ember-that's a bad idea
04:35bbloomif you want to see what a lisp looks like without parenthesis, you should try Mathematica
04:35yunfanEmber-: clojure already import many other symbols
04:35yunfanlike []
04:35Ember-yes
04:35Ember-but that doesn't reduce it's homoiconicity
04:35Ember-which means roughly "code is data and data is code"
04:36yunfanwhat i said is a macro like (let [a 1] (dosth a; doother a;))
04:36bbloomi 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
04:36bbloomand i really enjoy the parenthesis in clojure
04:36Ember-yunfan: yes and that's a bad idea like I said
04:36bbloomi find that i often have FEWER than in parens + curlies when compared to java or javascript
04:36Ember-for starters, that is an imperative way to do things
04:36Rich_Morinyunfan: 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.
04:36Ember-second, that kills homoiconicity
04:36bbloomthe only ugly bit is when you get ))))) at the end
04:36yunfanEmber-: just want to save the rest of us who using vim not emacs
04:36bbloombut i find that -> or ->> or let or similar makes that go away
04:37bbloom)))))))) is a code smell
04:37Ember-bbloom: agreed
04:37yunfanRich_Morin: yep, i like that
04:37bbloomi'm not opposed to a meta-syntax on top of s-expressions
04:37Rich_Morinbbloom: 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...
04:37bbloombut i think you need to do it like mathematica: it has to be a strict superset of the s-expression sytnax
04:37Ember-but this (let [a 1] (dosth a; doother a;)) would be imperative
04:38bbloomRich_Morin: yeah, that seems like a terrible idea :-P
04:38Rich_Morinbbloom: seriously, why is it a bad idea?
04:38yunfanEmber-: then how about indent based solutions?
04:38bbloomRich_Morin: because whenever i see )))))) i know i need to refactor and assign names to intermediate values to make the code more understandable
04:38bbloomor use a pipeline
04:39Ember-yunfan: could you elaborate?
04:39Ember-ah I think I just got it
04:39bbloomif i could trivially replace )))))))))))) with $, then i'd do that and it would let me nest more deeply than i would otherwise
04:39Ember-you mean like in python, where indentation has a meaning?
04:39bbloombut i also force myself to 80 character code width for similar reasons
04:39Ember-that too would kill homoiconicity
04:39Ember-which would make clojure macros pretty pointless or at least many times harder to implement
04:39yunfanEmber-: i cant make a sample in irc's online msg format :]
04:39Rich_Morinbbloom: I think you could also tell that from the size of the form. :-)
04:40bbloomRich_Morin: not necessarily. sometimes i have pretty long forms that are perfectly reasonable b/c they are basically long pipelines with -> or ->>
04:40Ember-all of the people having complaints about parenthesis should *really* read about homoiconicity and then read it again and again
04:40Ember-until they grasp it
04:40Rich_MorinEmber-: Well, Clojure has a bunch of reader magic that isn't actually homoiconic.
04:40bbloomRich_Morin: eh, it *mostly* is
04:41Ember-Rich_Morin: true
04:41bbloom@x is just (deref x)
04:41bbloom~x is just (unquote x)
04:41bbloometc
04:41bbloomthere are some shortcomings in the current implementation
04:41Ember-makes your life easier those, but they do break the homoiconicity rule
04:41Ember-but those are exceptions in a very good rule
04:41bbloomsuch as [], {}, #{}, etc being "special" rather than just shorthand for (vector ...), (hash-map ...) etc
04:42yunfanthere is a site codepad.org, is there clones for clojure?
04:42bbloombut i don't think any of those shortcomings are inherent
04:42Rich_Morinbbloom: yes, it _expands_ to homoiconic code, but the @x isn't itself homiconic. So, the trailing $ (or whatever) would act likewise.
04:42Ember-the first rule of Macro Club is that you don't write macros :)
04:42Ember-(not unless you are absolutely sure that's what you need)
04:42bbloomRich_Morin: you can have syntax and still be homoiconic
04:43katratxoyunfan: https://www.refheap.com/paste
04:43bbloomRich_Morin: it's just that the reader and printer must understand the syntax
04:43bbloomRich_Morin: that's what i'm talking about with the shortcomings
04:43bbloom,'@x
04:43bbloomdammit where are our bots?
04:43bbloom&'@x
04:43lazybot⇒ (clojure.core/deref x)
04:43bbloomthere
04:44bbloomthat's still homoiconic, but it would be NICE if the printer knew to turn clojure.core/deref back into @
04:44Rich_Morinbbloom: If you are generating a data structure in Clojure that you intend to feed to the reader, would (could?) you include things like @x ?
04:45bbloom&(read-string (pr-str '@x))
04:45lazybot⇒ (clojure.core/deref x)
04:45bbloomseems reasonable to me :-P
04:45Rich_MorinMy suspicion is that you would generate the long forms.
04:45yunfanhttp://codepad.org/yG4SWE2s Ember- the indent based code sample
04:45bbloomRich_Morin: you'd generate the long forms if you were using (list 'clojure.core/deref 'x)
04:45bbloombut you could just do `@x
04:46yunfankatratxo: ok
04:46bbloom&`@~'x
04:46lazybot⇒ (clojure.core/deref x)
04:46bbloom&`@x
04:46lazybot⇒ (clojure.core/deref clojure.core/x)
04:46Ember-yunfan: yeah, just what I thought. That's not lisp and not homoiconic
04:46yunfani used want to set a paste based site which accept one page forth code, and run it as a webapp
04:47Ember-and you can have multi-line string in clojure with """your string"""
04:48Ember-but anyway, in lisps end of line and indentations don't have a meaning in syntax
04:48Ember-and shouldn't have
04:48Ember-that's not a lisp anymore if they would
04:48Ember-I know it can be hard to grasp but just trust me, it's better this way :)
04:49Ember-there just is no way around the multiple parenthesis with clojure, not without making it into something else than clojure
04:50Ember-if parenthesis makes you sad and you want great expressive power then I'd suggest trying Scala
04:50Ember-but expect a *lot* rougher road in learning that language :P
04:50yunfani just dont want to throw vim keybinding
04:51yunfani knew you emacs guys dont care of those parenthesis
04:51Ember-https://github.com/vim-scripts/VimClojure
04:51Ember-I'm not an emacs guy
04:51Rich_MorinMy take (and I suffer from extreme dyslispia) is that short, nicely formatted forms aren't all that hard to read.
04:51yunfanthen eclipse?
04:51Ember-currently yes
04:51Ember-but there are *lots* of people writing clojure with vim
04:52echo-areaEmber-: Isn't "your string" sufficient? The pre- and post- two double quotes seem to do nothing with multi-line strings
04:52Ember-check out the link I just pasted
04:52Rich_MorinEmber-: I just installed VimClojure and MacVim. Glad to hear it's popular
04:52Ember-echo-area: well I'll be damned! :D
04:52Ember-you are absolutely right :)
04:53bbloomRich_Morin: uninstall VimClojure and try vim-foreplay :-)
04:58yunfankatratxo: i found many clojure driven sites share the same color scheme :]
04:58Rich_MorinOK, guys, fight it out: is VimClojure better or worse than vim-foreplay (and why)? (:-)
04:58borkdudegoat moaning all
04:58bbloomi never got the dynamic bits of VimClojure working correctly
04:59bbloomthe nrepl integration is fantastic in foreplay
04:59bbloomand tpope is working on a bunch of new improvements too
05:00yunfanthen what about lighttable?
05:00Ember-lighttable is really interesting but a bit too early
05:01yunfanwow
05:01Ember-and no offense to mr. Cranger who btw sits on this channel
05:01Ember-:)
05:01Rich_MorinI was intrigued by Clooj, but sad that it is broken (in part) for Clojure 1.4.
05:02Rich_MorinThe archive exploration ideas look really interesting.
05:03yunfanrecently i found 2 interesting stuff: overtone and clisk
05:05Rich_Morinyunfan: a friend of mine is reworking his generative art project to use clisk - seems very happy with it...
05:06yunfanRich_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
05:06yunfanbut its really cool library
05:07yunfanif you want to do indie game app
05:07yunfanyou could written code for generate simple icon image and midi
05:08Rich_Morinyunfan: One of the intriguing things about Clojure is the promise of really high-level libraries such as core.logic.
05:12Ember-aargh, why my lein midje doesn't work :(
05:13Ember-midje works just fine from REPL, I have the lein-midje plugin added to dev profile
05:13callenRich_Morin: dnolen has a monopoly on high high high-level programming in Clojure :)
05:14Rich_Morinand hair that gives RH strong competition :-)
05:15Ember-java.lang.RuntimeException: Unsupported character: \\*
05:15ejacksonanybody have cljs experience and can help me discover why goog.require can't find a cljs library that I think I've included ?
05:15Ember-anyone ever faced that with lein midje?
05:15ejacksonI've :required it in the .cljs file, but when compiled the browser doesn't seem to see it.
05:15ejacksoni'm not using advanced compilation
05:16callenRich_Morin: it used to be that they weren't real hackers unless they have beards. I now believe the secret is in the 'fro.
05:16Rich_Morinwell, I had a beard when it counted - these days, not so much hair :-)
05:17callenRich_Morin: I am young and of welsh ancestry. The closest thing I will have to either is to end up looking like Egoraptor.
05:17callenI'm totally devoid of beard-growing faculties.
05:18Ember-I have both long hair and a beard, what do I win?
05:19callenEmber-: an axe and a roman skull to cleave.
05:19Ember-aww
05:19Ember-I was hoping some help for my problem
05:19Ember-but that's ok too
05:19Rich_MorinActually, Stuart Sierra is most impressive (eg, http://www.infoq.com/presentations/Thinking-in-Data) and he has neither.
05:19callenEmber-: what's it doing? GIMME STACKTRACES
05:20Ember-callen: LispReader dies
05:20bbloomRich_Morin: that was a good talk
05:21Ember-callen: http://pastebin.com/gqit27r6
05:21Ember-guessing you don't get too much out of that...
05:23callenEmber-: where da character?
05:23Ember-I have NO idea
05:23Ember-lein test runs just fine
05:23Ember-and lein run
05:26Ember-callen: and let me add that all my midje tests run just fine from repl
05:26callenEmber-: grep
05:27Ember-callen: ok... That's strange
05:27Ember-got a line which doesn't have that character
05:30Ember-oh wow, it doesn't like my regexp o_O
05:30Ember-wtf
05:31Ember-ah, no. Something else
05:34augustlso.. 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:"
05:35augustlhow do I fix that?
05:35Ember-callen: I have zero * characters in my codebase
05:35Ember-to me it looks like lein-midje itself is dying
05:35augustlmy macro basically looks like this: `(another-macro (with-redefs [~my-var (some-function-call ~my-java-object)]))
05:38Ember-callen: downgrading lein-midje from 2.0.3 to 2.0.1 fixed my problem
05:38Ember-so it indeed is a bug in lein-midje
05:42Ember-yeah, created an empty project which has only project.clj and only thing in it is lein-midje
05:43Ember-lein midje dies with 2.0.3
05:45augustlanyone on macros containing refs that points to java objects?
05:49Ember-submitted a bug to lein-midje
05:50Ember-hope they'll fix it
07:00RaynesAw shit.
07:00RaynesI just broke all of amalloy's channels on ZNC.
07:00RaynesI upgraded to 1.0.
07:00RaynesNow he is no longer in in any channels.
08:38callentechnomancy: I am beginning to really enjoy the literary references in your libraries.
08:38bawr+1
09:23pdvyasI 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 ?
09:24yogthospdvyas: there's a good intro site http://clojure-doc.org/articles/tutorials/getting_started.html
09:25yogthospdvyas: 4Clojure is also good http://www.4clojure.com/ they have lots of problems of varying difficulty you can solve right on the site
09:25Ember-+1 for 4clojure
09:25yogthospdvyas: if you make an account, once you solve one you can see how others did it, really good for learning idiomatic code and tricks
09:26pdvyasnice, let me start with 4clojure. Thanks yogthos and Ember-
09:27pdvyasIs it recommended to bigbang into emacs right away when you start LISPy stuff ? I am Vim guy.
09:28Ember-not really
09:28Ember-some people love emacs with lisp, others love vim, and the third group use something else
09:28Ember-you can install proper clojure plugins for your vim
09:29Ember-I personally use eclipse with ccw-plugin for now
09:29Ember-but really looking forward on progress with lighttable
09:30pdvyasEmber-: nice, Light table looks like science fiction coming to life :)
09:30Ember-thank ibdknox for it
09:37lpetitHello there. Are there any Counterclockwise users right now? I'd like to ask a feedback question
09:38Ember-lpetit: \o
09:38lpetitEmber-: hello :-)
09:38lpetitEmber-: do you use the "Toggle comment' feature right now ?
09:38Ember-nope
09:38Ember-what does it even do :)
09:39Ember-ah yeah
09:39lpetitEmber-: select a few lines, and hit Ctrl+/ (or Ctrl+Shift+/)
09:39Ember-got it already
09:39Ember-but no, I'm not using it
09:39Ember-I tend to comment code out very rarely...
09:40Ember-even less with clojure
09:40Ember-:P
09:40lpetitEmber-: 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 // )
09:40lpetitEmber-: sure, sure :-)
09:40Ember-but I don't know, it's the same shortcut for example js editor
09:40lpetitEmber-: anyway, was thinking of changing the default keyboard shortcut. Either stick to standard Eclipse convention of Ctrl+Shift+C (C stands for Comment)
09:41Ember-maybe, could be a good idea
09:41lpetitEmber-: or use a Clojure-specific meno: Ctrl+; ( ; reminding obviously of the single line character for commenting clojure)
09:41borkdudeccw is nice
09:42borkdudelpetit I have used the comment feature (you answred me on the mailin glist)
09:42Ember-lpetit: maybe the c-version is better due to it being the 'standard'
09:42lpetitEmber-, 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)
09:42Ember-I can see the reasoning behind Ctrl+;
09:42Ember-lpetit: I'd very slightly lean towards Ctrl+Shift+C
09:42borkdudelpetit I don't care, once I know the key binding I use that
09:43Ember-Ctrl+; is kinda awkward for finnish keyboard layout for example
09:43yogthosI personally like using #_ for comments
09:43borkdudeCtrl-Shift-C seems more annoying than just Ctrl+ some key
09:43Ember-it's actually Ctrl+Shift+,
09:43Ember-for FI keyboards
09:43yogthoscause then you can do it by expression and anywhere
09:43Ember-so it can get kinda confusing
09:43lpetityogthos: yep, but that's not the same thing
09:43borkdudeyogthos yes, that's another way, but not suited when commenting out large parts
09:44yogthosborkdude: true
09:44Ember-for example, I hate the clojure's backtick symbol since it's so hard to get out of FI layout keyboard :)
09:44ziltiActually Ctrl-Shift-C is the easiest to type of all the suggestions
09:44Ember-fortunately one doesn't write macros very often
09:44borkdudezilti on my kbd that is Cmd-Shift-C and not easy
09:44borkdudezilti if I didn't have piano lessons and trained my left hand, it would be really awkward
09:45ziltiborkdude: Then why are you using a mac ;)
09:45borkdudelpetit what keeps annoying me though is having to redefine next/previous REPL command to Cmd-up/down every time I install an update
09:45lpetitborkdude: I do it: Cmd+Shift with the right hand, and C with the left hand
09:45borkdudezilti it's a hype
09:45Ember-lpetit: I'd say you don't have a perfect answer due to very different keyboard layouts
09:46Ember-mac vs pc keyboards, different locales etc
09:46lpetitborkdude: there's also Ctrl+P Ctrl+N already defined (Previous / Next)
09:46borkdudelpetit true, but I'm always using arrows
09:47Ember-same here
09:47Ember-alt+left and alt+right
09:47Ember-much more intuitive for me
09:47Ember-especially since it's the same in browsers
09:48lpetitWho said people can't talk for hours about finely tuning their own Eclipse, as do emacs guys ;-)
09:48Ember-hehe
09:48Ember-but alt+arrows isn't fine tuning, it's the default keybinding :)
09:48lpetitEmber-: and Ctrl+P / Ctrl+N is the same in shells :-p
09:49borkdudelpetit you don't have to finetine emacs in case of an update again, just use the same init.el
09:49Ember-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
09:49lpetitborkdude: wait, you have to recreate your own keybindings after what kind of update?
09:49Ember-and those shortcuts aren't in use for example in powershell
09:49lpetitEmber-: ok
09:49borkdudelpetit after an update of ccw I think
09:50ziltiI'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.
09:50Ember-browsers however are universal everywhere, in every browser out there alt+arrows work for back/forward
09:50Ember-at least in every browser I know :)
09:50lpetitborkdude: 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)
09:51Ember-zilti: I miss exposé and similar features, all the other goodies I get in windows
09:51borkdudelpetit hmm, I have updated Eclipse recently.. that must have been it then
09:51Ember-and those too with 3rd party apps
09:51ziltiEmber-: exposé in Windows?
09:51Ember-yup, not out of the box
09:51lpetitEmber-: just tried with Chrome on OSX: not working :(
09:52Ember-lpetit: osx sucks then
09:52Ember-:)
09:52borkdudeI 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
09:52Ember-zilti: there are tons of software for expose, but here's one example http://sourceforge.net/projects/mcsoft/
09:52ziltiEmber-: 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...
09:53lpetitOk 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.
09:53Ember-good choice
09:53Ember-people who don't like it can change it
09:53Ember-that's a sensible default
09:53borkdudelpetit update your answer on the mailing list :P
09:53Ember-zilti: multiple desktops for windows http://virtuawin.sourceforge.net/
09:53ziltiIt's always best to go with the platform defaults.
09:54Ember-that one I can't grasp why it doesn't come out of the box...
09:54lpetitborkdude: I'll keep the previous binding for backward compatibility
09:54ziltiEmber-: I'm using that one at work
09:54borkdudelpetit is it possible to control the keybindings with a clojure script? I have never programmed an Eclipse plugin before
09:54Ember-anyway, you can get most of the goodies in windows too, they just don't come out of the box
09:54borkdudelpetit maybe we could make a kind of init.el for ccw ;)
09:54Ember-and actually I don't use any of those, not even virtuawin anymore :)
09:55borkdudeccw-init.clj
09:55lpetitborkdude: shhht, this is my secret project. Not ready yet.
09:55Ember-windows 7 provided enough user interface improvements that I don't really need those anymore
09:55Ember-back in the xp days, sure
09:55borkdudelpetit ah, keep going then :-)
09:55borkdudeI still like XP, maybe because of nostalgia
09:56lpetitborkdude: really, could already work if Eclipse 3.X was still the standard. Eclipse 4.X brings a lot of complexity to the table :-(
09:56Ember-xp sucks in today's standards
09:56Ember-but I gotta say, I might be going the osx way in the future
09:56Ember-if MS doesn't manage to pull out windows 9 which is reasonable for desktop then it's bye bye from me
09:56Ember-windows 8 is... horrid
09:56borkdudeEmber- I have gone the OSX way since summer 2011, I like it, although Apple is annoying me a bit
09:56ravsterhello everyone
09:57ziltiIn Windows 8 in Metro you're not even able to select text or do drag-and-drop.
09:57ravsterI'm having difficulty getting datomic-free working on my clojure install.
09:57Ember-they did the metro/modern thing SO wrong
09:57ziltiAt least they won the bullshit bingo with it
09:57Ember-zilti: hehe
09:57borkdudeEmber- 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.
09:57ravsterit gives some classpath error
09:58ravsterfilenotfoundexception
09:58Ember-in my opinion modern UI software should have been inside a window and the the modern "start" screen should have replaced the desktop widgets
09:58ravsterlein deps doesn't seem to have any problems, though
09:58Ember-and provide that by default for desktops
09:58Ember-and keep the current implementation for tablets
09:58lpetitborkdude: corrective email sent :-)
09:58borkdudeI'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\
09:59Ember-I'm with you on that one
09:59Ember-not teaching, but otherwise :)
09:59borkdudelpetit thanks :)
10:00borkdudealso 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:01borkdudeanother platform to support
10:01Ember-well in that case it is indeed just you
10:01Ember-:)
10:01ziltiWell, the Surface Pro would be a great device if they improved battery life
10:02borkdudethe 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:02jaenIt'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:02borkdudeenough crankiness, happy holidays everyone ;)
10:03borkdudeo wait, those are already over right?
10:03jaenI figure
10:03borkdudein the Netherlands many people take time off between xmas and sylvester
10:04lpetitborkdude: I have been taking mondays/wednesdays around the 2 tuesdays. Good compromise for me :)
10:28borkdudeis there something like a review system of "qualitative" clojure libraries, info on how well they are maintained or deprecated, etc?
10:29lpetitborkdude: not that I'm aware of
10:30lpetitNew Beta of CCW released. Features "documentation hover"!
10:30marcellus1damn. 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:32borkdudelpetit nice, btw, do you recommend using beta, because stabe isn't updated frequently or...?
10:33lpetitborkdude: beta is generally quite stable. Of course, as soon as I say so, it may occur that the next release won't work ;-)
10:34lpetitborkdude: 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:35borkdudeupdating
10:35lpetitborkdude: 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:36ToxicFrogCCW?
10:37lpetitToxicFrog: Sorry, I keep using the acronym for no good reason. CCW stands for CounterClockWise, a Clojure plugin for Eclipse
10:38borkdudelpetit the good reason is that ccw is shorter. why is it called this anyway?
10:38ToxicFrogAah
10:39lpetitborkdude: why is it called ccw ? or Counterclockwise?
10:39borkdudelpetit yes, counterclockwise
10:39lpetitborkdude: because "clo" for clojure stands in the middle of Counter and wise ? :-)
10:40lpetitlpetit: 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:40lpetitborkdude: Somehow, to some people, clojure seems "backwards" like in "back in the future"
10:41borkdudelpetit ok :)
10:41lpetitborkdude: working with clojure brings the fun back, etc.
10:43borkdudelpetit I remember saying in 2005 about common lisp, that I didn't have this much fun programming since GW Basic on primary school ;)
10:43lpetit:-)
10:44lpetitborkdude: have you successfully updated? Did you try the "doc hover" feature?
10:44borkdudelpetit I have updated, let me try it
10:44lpetitborkdude: sure :)
10:45borkdudelpetit you mean, when you hover over a symbol, the docs show? that already worked in the previous beta I think?
10:45borkdudelpetit keybindings preserved while updating
10:46lpetitborkdude: phew :-)
10:46borkdudelpetit the hover thing, I think I've seen it in a previous version, really
10:46lpetitborkdude: 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:47Fauno1is there an elegant way to handle mongo replica sets with any of the current mongo libraries?
10:47borkdudelpetit ah… well, it sure is an improvement, it's getting better and better man
10:47lpetitborkdude: now, the "hover thing": it's the same doc you get when you're "browsing" the symbols suggestions of the completion proposal.
10:47borkdudelpetit ah
10:48lpetitand 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:48borkdudelpetit 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:48lpetitborkdude: if it doesn't work for you, then it's a bug and you can report it as such
10:49borkdudelpetit what is the correct way or "stopping" a project, so the contrary to "run"
10:49borkdudelpetit closing the console and repl (both?)
10:49lpetitborkdude: you're in luck. since the previous beta, you just have to close the repl, it will close the underlying console :-D
10:50borkdudelpetit :-D
10:50lpetitborkdude: I'm updating the release note for the beta, see: http://code.google.com/p/counterclockwise/wiki/ReleaseNotes#Version_0.10.3.SNAPSHOT
10:51lpetitborkdude: as you can guess from the length of it, we're close to going stable :)
10:51borkdudelpetit it would be nice if the REPL printed it's startup namespace
10:51lpetitborkdude: ah yes, currently it's only reminded in the REPLView's title
10:51borkdudelpetit and also, it should obey the :main property from a leiningen project file, else choose projectname.core if it's available
10:52borkdudelpetit that last one is disputable
10:52lpetitborkdude: that is one of the joint goals of getting a "generalized leiningen launcher".
10:53lpetitborkdude: 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:53lpetitborkdude: must go, see you
10:54borkdudelpetit execute the -main function and repl inside that ns
10:54borkdudeI have other feature requests (drawn from students using it for the first time)
10:54borkdudelpetit ok, cya
10:56lpetitborkdude: 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:56borkdudelpetit 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:56lpetit(I don't want direct issues 'cause I'd like to appley the "5 whys" method on them :) )
10:57borkdudelpetit so maybe a warning: this project is already running, are you sure? or smth would be in place
10:57borkdudelpetit I want "Run" to do what lein run does when a project.clj is present, does that make sense?
10:58lpetitborkdude: 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:58lpetitborkdude: does lein run keep a repl around?
10:58borkdudelpetit you got me there. no
10:59borkdudelpetit but why not have that also
10:59lpetitborkdude: 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:59borkdudelpetit ok thanks, I'll join
10:59lpetitborkdude: yes, I think those are 2 different commands
11:00borkdudelpetit good point, I hadn't even thought of it, goodbye now
11:44ziltiWhat does "IllegalArgumentException No matching ctor found for class" mean?
11:45S11001001zilti: ctor means constructor
11:47ziltiIllegalArgumentException No matching ctor found for class lopia_server.database$make_entity$fn__13104 clojure.lang.Reflector.invokeConstructor (Reflector.java:163)
11:47ziltiWeird stuff
11:48S11001001~paste
11:49ziltiThe code? https://www.refheap.com/paste/7881 Disclaimer: You might want to kill yourself after seeing this code.
11:50ziltiS11001001:
12:32owainlewismonadic
12:32owainlewismondic
12:33owainlewis"!quit"
12:38owainlewismondic
12:38monad12345YES
12:39S11001001zilti: I assume you're trying to deserialize a function
12:41tdrgabiwhat book should I read to get started on clojure, if I'm familiar with lisp syntax from other lispes?
12:41tdrgabimostly interested in the more advanced features
12:42S11001001tdrgabi: joy
12:42tdrgabijoy of clojure?
12:42S11001001yes
12:42joevandyktdrgabi: http://www.clojurebook.com/ is good as well
12:42tdrgabithank you
12:54dnolenhigher order constraints https://github.com/clojure/core.logic/commit/2406f2d31ebebcdaca4b3dd9c302b9b9688c6e0c :)
13:06aaelony Say I have :a but want "a" … what's a good way to undo what keyword does?
13:07marcellus1(name :a)
13:07aaelonyah, thanks
13:09joevandyki'm getting confused about when to use periods and when to use slashes in namespaces and calling functions
13:10drewrjoevandyk: a slash splits a namespace/function; periods are just delimiters in namespaces
13:10drewrtechnically it's namespace/Var, but a defn creates a Var
13:11joevandykahh, right
13:13technomancyjoevandyk: note that hierarchy in namespaces is basically an illusion; it's not like ruby where one module is nested inside another.
13:13joevandyktechnomancy: it's all flat?
13:14technomancyjoevandyk: there's no actual relationship between namespaces that share a common prefix
13:14ziltijoevandyk: The hierarchy is only represented in your file system.
13:14borkdudethis however works, but it's not recommended: (def foo.bar 3), (deref #'foo.bar) ;;=> 3
13:14technomancyright; other than location on disk
13:20ziltiIs there some kind of "macroexpand" that works for functions? Some kind of step-by-step-resolution of the expression.
13:23joevandykis 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:25dnolenzilti: http://github.com/clojure/tools.trace
13:25pdvyasjoevandyk: https://github.com/jpalardy/vim-slime
13:25lpetitborkdude: Issue 496 "warn if project is already running" almost done
13:25borkdudelpetit neat!
13:25ziltidnolen: awesome, thanks!
13:30m0smithanyone around?
13:31m0smithThe question for the day: jayq or domina?
13:32dnolenm0smith: domina is optimizable, jayq is familiar
13:46dnolenkovas: ping
13:46kovasdnolen: pong
13:46dnolenkovas: so CLJS-335/448, what you need is compile time support right?
13:47kovasdnolen: yes. that is the last thing that is missing
13:47dnolenkovas: and do you have patch to make this work?
13:47kovasdnolen: I can make one
13:48dnolenkovas: that would be great, thanks
13:48kovasdnolen: sweet.
14:32ziltiARGH. Something in korma really is broken by design :(
14:32ibdknoxzilti: ?
14:33ziltiibdknox: 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:34ibdknoxzilti: so don't use defentity
14:34ibdknoxtake a look, all that does is create a map
14:34ibdknoxand you don't even need entities if you don't want them
14:34ziltiibdknox: 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:35ziltiibdknox: like (has-many (create-entity "table2")), that won't work... :(
14:36ibdknoxI'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:37ibdknoxIf you want relations to be taken care of, you have to define what they are somewhere, right?
14:37ibdknoxPerhaps, I don't understand your use-case well
14:37ziltiibdknox: 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:38ibdknoxzilti: https://github.com/korma/Korma/blob/master/src/korma/core.clj#L421
14:39ibdknoxlooks like a couple functions would need to change, but making it work with maps directly should be a pretty easy change
14:40ibdknoxthe weirdness there is the result of dealing with circular dependencies which exist in entity defs
14:41ziltiibdknox: 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:41ibdknoxzilti: looks like it
14:41ibdknoxdefinitely something that should work
14:41ziltiibdknox: Thanks for pointing me in the correct direction!
14:42ibdknoxno problem!
14:42ibdknoxKorma should also be getting a new maintainer soon it sounds like, so it'll get moving forward again
14:51joevandykany ideas? (use 'ring.util.serve)
14:51joevandykIllegalAccessError defelem does not exist clojure.core/refer (core.clj:3778)
14:51joevandyktrying to start compojure from the repl
15:01ppppaulhey cldwalker_ you there?
15:03joevandykhm, ring-serve depends on ring 1.0.0, which is older than compojure uses. how is that typically resolved?
15:04joevandykring 1.0.0 requires an old version of hiccup, which isn't compatible with later versions apparently
15:04S11001001joevandyk: shallowest dep wins
15:04S11001001joevandyk: then leftmost I think
15:04ziltijoevandyk: Try adding an ":exclude ring" to the ring-serve dependency
15:05ziltijoevandyk: You have to replace ring with the exact name it has as a dependency
15:08joevandykzilti: i tried ":exclude ring/ring-devel", no work
15:08joevandyk:profiles { :dev {:dependencies [[ring-serve "0.1.2" :exclude ring/ring-devel]]}}
15:08joevandykit's not :exclusions, right?
15:09hyPiRionjoevandyk: https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L38
15:09ziltijoevandyk: Does it depend on ring-devel, not ring? And for "namespaced" deps, it'll have to be like ":exclusions [ring/ring-devel]"
15:09hyPiRionso heh.
15:09ziltiJup, it's exclusions
15:10joevandyk:dependencies [[ring-serve "0.1.2" :exclusions [ring/ring-devel]]] did the trick
15:10joevandykthanks!
15:17ziltiIs "sub-ent (if (map? sub-ent) sub-ent (when resolved (deref sub-ent)))" ugly?
15:20gfrederickscontracts for higher-order functions!
15:21bbloomgfredericks: ?
15:21gfredericksI 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:21gfredericksI was just needing some of that
15:22ziltiI wonder if (or (deref sub-ent) sub-ent) would still work if (deref sub-ent) throws an exception)
15:22gfrederickszilti: or doesn't suppress exceptions
15:22gfredericksdoes ##(doc force) help?
15:22lazybot⇒ "([x]); If x is a Delay, returns the (possibly cached) value of its expression, else returns x"
15:25ppppaulhow is (binding) different from (with-redef)?
15:25gfredericksbinding is thread-loacl
15:25gfrederickslocal*
15:25gfredericksbut requires the var to be declared dynamic
15:25ziltigfredericks: 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:26bbloomthread local and *thread-safe*
15:26gfredericksppppaul: with-redefs is really only suitable for stubbing in tests
15:26gfredericksbbloom: what sorts of things are thread-local but not safe?
15:26gfrederickszilti: a symbol? you can't deref a symbol
15:26gfredericks,(deref 'first)
15:26ppppauloh... i've been having some problems with (with-redef) with mocking-ring.
15:27gfredericks&(deref 'first)
15:27lazybotjava.lang.ClassCastException: clojure.lang.Symbol cannot be cast to clojure.lang.IDeref
15:27ziltigfredericks: more like ##(deref first)
15:27lazybotjava.lang.ClassCastException: clojure.core$first cannot be cast to clojure.lang.IDeref
15:27gfredericks(defer (deref 'redef)) ;; words
15:27gfrederickszilti: oh okay; what type are you expecting it to have then?
15:29ziltigfredericks: When I write (defentity something) and defentity is a macro, what is something? Isn't that an unquoted symbol?
15:29gfredericksfrom the macro's perspective it is seeing a symbol
15:29gfredericksI don't know what you mean by "unquoted" exactly
15:30ziltigfredericks: something = unquoted 'something = quoted
15:30ziltigfredericks: So I can deref that symbol handed to the macro, or else sqlkorma would not work
15:30gfredericksyou deref it at macroexpand time, or you expand into code that derefs it?
15:31ziltigfredericks: It's deref'd in a function called by the macro at macroexpand time
15:31ziltiAt least that's what I've read out of the code
15:32gfredericksyou must mean something else or be misunderstanding it, because passing a symbol to the deref function is always going to throw that exception
15:32gfredericksare you just reading the korma source?
15:32ziltigfredericks: yes.
15:32gfredericksif you give a link to what you're looking at I can check it out
15:33ziltigfredericks: https://github.com/zilti/korma.incubator/blob/master/src/korma/incubator/core.clj#L-493
15:34ziltiwhich gets called by e.g. has-one at line 518
15:34gfredericksah it's not getting called at macroexpand time
15:34gfredericksnote the backtick on line 525
15:34gfredericksthe call is quoted
15:34gfredericksso has-one is just returning code that calls rel at runtime
15:35gfredericksthe (var ~sub-ent) bit means that it's also using var to resolve the symbol into a var before calling rel
15:35gfredericksso what rel is seeing, at runtime, is a var, which is derefable
15:36gfrederickszilti: so you're trying to edit it such that sub-ent could be a map literal as well?
15:37ziltigfredericks: 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:37gfrederickszilti: that's not strange; the map won't survive the var form
15:37gfredericksrepl
15:37gfredericksI'd expect the exception to be ##(var {})
15:37lazybotjava.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to clojure.lang.Symbol
15:38zilti"cannot be cast to clojure.lang.Symbol"
15:38gfredericksif you want to pass maps you'll have to support it within the has-one macro as well
15:38ziltiAh, so I've been looking at the wrong place.
15:40ziltigfredericks: I'm just trying to figure out if that (var) is really needed in the macro
15:40ziltigfredericks: If not, I'd only have to "fix" rel and could remove that (var) from the macros?
15:40gfredericksdepends on what fixing it means
15:40gfrederickswhy does real want the var?
15:41atyzhey 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:41gfredericksit must be using it for something
15:41atyzi get the following error Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: venue in this context
15:41gfredericksatyz: did you (defentity venue ...) prior?
15:42gfredericksif you have mutually referential entities you can use declare to make the names resolve
15:42ibdknoxgfredericks: which is why you need the var
15:42ziltigfredericks: 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:43ziltigfredericks: Didn't understood a single word of your last phrase.
15:43gfrederickszilti: my last phrase was to atyz
15:43atyzgfredericks: I see, i had tried (defentity venues) because i thought it was correlating to the tablename
15:44ziltigfredericks: I mean the one with mutually referential entities
15:44gfredericksibdknox: eh? you're connecting zilti's investigation with atyz's issue?
15:44ibdknoxthat whole mess was to allow for mutually referential relations
15:44gfrederickszilti: yes I was answering atyz;
15:44ibdknoxin order to really do it, you have to delay grabbing the value until later
15:45gfredericksah right
15:45gfredericksI think that's making sense in my head
15:45ibdknoxI'm sure there's some better solution hiding somewhere, but it would likely require some serious breaking changes
15:46ibdknoxwhich is probably a good thing at some level
15:46ziltiI'm afraid I'm too dumb to understand what mutually referential means.
15:46gfredericksibdknox: 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:46gfrederickszilti: two tables whose definitions refer to each other; e.g. a has-many and a belongs-to
15:47ziltigfredericks: Where comes the val into the game?
15:47gfredericksibdknox: 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:47gfrederickszilti: the val?
15:48ziltigfredericks: Yes, what's the difference when using the val
15:48gfredericksoh instead of the var
15:48ziltiyes
15:48gfrederickssay you have (declare bars) (defentity foos (has-many bars)) (defentity bars (belongs-to foos))
15:49ziltiyep
15:49gfredericksin the second form, (defentity foos (has-many bars)), derefing the bars var immediately gives nil
15:49gfredericksso unless you keep the var, you have no idea what bars is supposed to be
15:49gfredericksand you may as well have said (defentity foos (has-many nil))
15:50ibdknoxgfredericks: I think alexbaranosky is going to be taking it over
15:50ziltigfredericks: Now it's clear
15:50gfredericksibdknox: okay, thanks
15:51ziltigfredericks: It behaves like a pointer I guess, except that it eats maps for breakfast
15:52gfrederickszilti: it's a reference type.
15:52zilti,(val {:content {:a 1 :b 2}})
15:52ziltihmm
15:56zilti&(val (first {:content {:a 1 :b 2}}))
15:56lazybot⇒ {:a 1, :b 2}
15:58ibdknoxzilti: I think I'd do something like this https://gist.github.com/4391820
15:58ibdknoxuntested, but that's the basic idea of what would need to be done
16:00ziltiibdknox: It's not possible to test that at macroexpand-time because the thing referred to by the symbol probably doesn't exist yet
16:01ziltioh nevermind
16:01ibdknoxzilti: yeah it's just checking for symbol :)
16:01ziltijust seen that.
16:01zilti:)
16:01ibdknoxthat's tricky stuff
16:01ibdknoxI was very unhappy having to come up with it
16:02ibdknoxbut the interface is more important than the impl and honestly it's only like 15ish lines of code, seems like a reasonable tradeoff
16:09chouserHas 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:10chousersorry, I mean reducers. clojure.core.reducers
16:10callenibdknox: do you remember when you bumped the org.clojure/java.jdbc version in the last few versions?
16:10gfredericksphew
16:10callenassuming it was you.
16:10callengfredericks: also, what's with your korma fork on clojars?
16:10gfrederickschouser: not played with them, haven't had a reason to.
16:10bbloomchouser: heh, i was just opening my rss reader to see if i could find what "reducibles" was about
16:10gfrederickscallen: needed to support postgres arrays
16:11callengfredericks: yeah I saw that it said sorta as if it wasn't stable. What would it take to make it stable?
16:11chousergfredericks: 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:12chouser...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:12gfrederickschouser: 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:12gfredericksI haven't really been in a position to be optimizing clojure code lately
16:13chouserfair enough. Any one else have thoughts?
16:13bbloom+1 to gfredericks's transients comparison
16:13xeqiis there a function to rename keys in a map?
16:13bbloomi assume reducers also work on sequences, ie without any parallelization support
16:14gfredericksxeqi: in clojure.set I think
16:14chouserthe impact to your code is much smaller than with transients. Add "r/" to the front of some function names.
16:14xeqigfredericks: thanks
16:14gfredericksbbloom: I think you benefit a bit from removing intermediate values even if you don't get parallelism
16:15bbloomgfredericks: ah yes
16:15gfrederickschouser: I think I had the impression there was an extra step as well
16:15bbloomwhen reducers were first announced, i aske don hacker news "why not always use reducers?"
16:16bbloomand rich hickey replied to me saying that seq processing and coll-reduce were complementary
16:16bbloomwhich 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:16bbloomif that's the case, then why not just make reducers the default?
16:16abaranoskybbloom: the seq versions of map/filter are lazy for one
16:17bbloomabaranosky: can't that also be true of reducers on seqs?
16:17bbloomand laziness doesn't make much sense for reduce really
16:17gtrakdo you guys recommend slingshot's throw+ with a map or (throw (ex-info... ? to be consumed by try+/catch
16:17chouseryeah, 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:17chousers/bitter/bigger/
16:17chouserthough perhaps bitter as well
16:17abaranoskymy understanding was that anything using `fold` should be assumed to not be run sequentially, in other words it could be run in parallel
16:17callengtrak: I use slingshot and I'm happy with it, but I'm far from an advanced user.
16:18chouserabaranosky: yes, but fold is not reduce.
16:18bbloomchouser: why do you ask about this?
16:18chouserOh, just doing some writing. Was curious what the esteemed members of #clojure were thinking on the topic.
16:18abaranoskychouser: 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:19chouserabaranosky: no, you get to choose between calling reduce and are/fold
16:19callenchouser: it was my impression that reduce in Clojure was a synonym for fold.
16:20bbloomhttp://news.ycombinator.com/item?id=3945372
16:20callenchouser: whereas in CL reduce, foldl, and foldr were distinct.
16:20callenreduce in CL is like Python's reduce.
16:20chousercallen: 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:21callenI wasn't equating the reducers function, but good to know.
16:21gtrakthey both throw a clojure.lang.ExceptionInfo
16:21chouserThe word "fold" isn't used anywhere else in Clojure that I'm aware of, for whatever that's worth.
16:22abaranoskyI 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:22abaranoskydid I get that correct?
16:22callenchouser: Clojure's reduce is a foldl. amalloy has said as much before as well.
16:23callenabaranosky: it's in keeping with his tendency to redefine vocabulary :)
16:23llasrambbloom: 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:23llasrambbloom: right?
16:24chouserabaranosky: yes, I think that's how he uses "fold" in Clojure.
16:24gtrakllasram: reduce isn't lazy either
16:24callenI don't totally understand the point of a lazy reduce.
16:25gtraklazy reductions, maybe
16:25callenyou say that as if it makes sense.
16:25callenisn't the final aggregation the reason you're using it?
16:25chouserbut reduce on both lazy seqs and reducers could technically be halted by wrapping take-while (or r/take-while) around a lazy collection
16:25gtrakreductions gives you the intermediate steps of the reduce ;-)
16:25bbloomllasram: maybe, i haven't studied them extremely deeply for reasons of gfredericks' transients comparison
16:25gtraknot in the sense you were thinking
16:25callenI gather that, I'm just saying the semantics don't make as much sense as a map or filter that is lazy.
16:26callenthe 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:27gtrakif you want an accumulator with map, you have to close over some state I suppose
16:27chousermutable state even. Closing a lazy seq over mutable state is bound to be fun for someone eventually.
16:27hyPiRionRich is talking about clojure.core.reducers as not being lazy, not reduce itself
16:28gtrakreduce itself was never lazy
16:28gtrakit was a loop/recur I believe
16:28hyPiRionreducers have mapping, mapcat, filter, remove, flatten...
16:30gtrakyou guys and your newfangled libs... I just like me some polymorphic coll-reduce
16:30abaranoskychouser: what I'd like to get a better feel for is when I should consider using the reducer versions of map/filter/reduce?
16:31abaranoskychouser: ... how that compares w/ when to use pmap also
16:34callenabaranosky: it seems like the same "do I need to make this faster?" consideration to me. I don't know what else it introduces.
16:35dnolenchouser: 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:36bbloomdnolen: would would be a "short circuiting reduce"? something like a parallelized linear search?
16:37technomancygtrak: I recommend ex-info for throwing and slingshot if you need fancy catch clauses
16:37bbloomlike a 'some but on an unordered set?
16:37dnolenbbloom: just something that stops upon returning a failure value.
16:37technomancygtrak: 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:37gtraktechnomancy: any particular reason? seems like ex-info was made for that, but I'm not sure how to choose
16:38gtrakfor 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:38technomancygtrak: slingshot only has throw+ because ex-info didn't exist at the time
16:38technomancyex-info is a better solution if you can count on it being there
16:39technomancywell, technically throw+ supports throwing non-map objects, but IMO that's silly
16:39gtrakyea, that's silly
16:39technomancytry+ on the other hand, is six kinds of slick
16:40chouserdnolen: yes! ..and I've written a few (halting reduce fns, that is) each of them ugly in their own unique way.
16:40dnolenbbloom: 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:41chouseror you can use reductions, but then you often have to process the results -- last, map first, etc.
16:41dnolenchouser: yeah I've refrained from actually writing a helper thus far.
16:41bbloomdnolen: do those short circuiting processes require foldL semantics?
16:42dnolenbbloom: it usually involves reducing a value over a tree actually. probably a word for that I'm not aware of.
16:43dnolenbut once we fail, we just want to exit the whole process.
16:43dnolenI think in one case I'm just throwing an exception :)
16:43gtrakreduce with continuations..
16:43bbloomgotcha
16:43gtrakreduce over the reduce continuations :-)
16:43bbloomas 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:44bbloomi much prefer the name "fold", plus it's shorter, considering how damn often i type "reduce" :-)
16:45chouseryou fold things to make them bigger? ;-)
16:45joevandyki parsed a giant xml string using clojure.data.xml. what's the best way to access a specific node deep in the xml?
16:45bbloomchouser: heh, good point
16:45bbloomi guess i just don't ever fold physical things
16:45bbloomwhiteboards and terminals... who needs this paper shit?
16:46hyPiRionComputer Scientists, apparently.
16:46bbloomthe C# folks went with "Aggregate" http://msdn.microsoft.com/en-us/library/bb548651.aspx
16:46abaranoskybbloom: or what about the name `aggregate`
16:46tpopeI grew up on inject
16:46ziltijoevandyk: Clojure needs a lense library.
16:46tpopeanything else sounds strange :)
16:47bbloomdoes anyone but ruby call it inject ?
16:47tpopesmalltalk
16:47abaranoskytpope inject just never made any sense at all
16:47tpopenone of them *really* make sense
16:47hyPiRionRuby's reduce is called inject?
16:48tpopehyPiRion: yep. although it has reduce now too
16:48bbloomabaranosky: sure it does. inject, like injecting heroine. you just gotta have your higher order collection processing
16:48technomancyhyPiRion: from smalltalk
16:48zilti"fold" makes sense.
16:48technomancyso 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:49hyPiRiontpope: Sounds alien to me - what is it about reduce/fold that makes it inject?
16:49technomancyanyone got the jdbc chops to help me find the magic class?
16:49yogthosreduce makes sense to me ;)
16:49amalloyabaranosky: inject makes sense if you're a bit of a loon
16:49tpopehyPiRion: something about allison's restaurant
16:49gtrakparameterize the injection of items into the accumulator
16:49amalloyyou have a list: [1,2,3,4], and you inject a + operator in between each of them
16:49abaranoskyI guess you are injecting the seq into the seed value?
16:49amalloytada, you have 1+2+3+4, which is a reduce
16:50yogthosamalloy: that feels more like interpose :)
16:50zilti"inject" always reminds me of that dependency injection nightmare stuff
16:50hyPiRionhah
16:50yogthoslol
16:50tpopeI saw it more as injecting each element into the memo, one by one
16:50yogthoszilti: traumatized by java? :)
16:50ziltiyogthos: Somewhat, yes :)
16:50yogthosbut if you think about what it's doing, you're reducing a collection into an accumulator
16:51tpopesmalltalk (and thus ruby) has inject for reduce, detect for some, select for filter, reject for remove, and collect for map
16:51joevandykfor example, say i have this: https://gist.github.com/efa92479e3e8dd7b0436 and I want to access Status/StatusType/Description
16:51hyPiRion(injections + [1 2 3]) #_=> (1 3 6)
16:51yogthosit's not really about where you're sticking the operators
16:51bbloomyogthos: but the point of reducers is that there isn't a single accumulator :-)
16:51amalloybbloom: eh? that's the point of fold, but not of reducers in general
16:52bblooms/the point/one difference of/
16:52yogthosbbloom: fair point
16:53yogthosI still feel it conveys the intent better than inject though :)
16:53bbloomyeah, boooo inject
16:53bbloomsorry tpope!
16:54hyPiRionWell, I suppose it could've been named something worse
16:54joevandykWith Ruby's nokogiri library, I'd do Nokogiri::Slop(response).css('Status StatusType Description')
16:54hyPiRion"crunch" or "squeeze" something
16:55technomancyM-x paredit-convolute-sexp
16:55ziltihyPiRion: Should I ever create a programming language I know what I'll name it!
16:57hyPiRionzilti: I'll fork the language and rename it just because I can :)
16:57joevandykshould i use a zipper?
16:58abaranoskytechnomancy: oh, convolute-sexp ... awesome. Does it not have default binding?
16:58technomancyabaranosky: I don't know; I only use it like once a month =)
16:58amalloyabaranosky: it doesn't. i put it on M-<LEFT>
16:59amalloysince i couldn't think of any clever letter-based mnemonics and it kinda moves stuff leftish
16:59technomancyjoevandyk: 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:59amalloyjoevandyk: IME the answer to "should i use a zipper" is never yes. if you need to use a zipper you already know
16:59gtraksqueeze checks for divergence of your seq by a passed in function and taking the limit
16:59joevandyktechnomancy: i know what the xml looks like, just looking for the best way to extract the elements out
17:00joevandyktechnomancy: https://gist.github.com/efa92479e3e8dd7b0436 I need the first Package/Activity/Status/StatusType/Description field
17:00amalloyyeah, i think you want enlive, or Raynes's new laser. you could do it with data.xml too, but it would be difficult
17:01technomancyI 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:01amalloyor maybe laser only works on html, not xml? i dunno
17:01technomancyamalloy: oh, is laser scraping too?
17:01technomancyI thought it was just templating
17:01abaranoskyjoevandyk maybe something like this is of some use to you? https://www.refheap.com/paste/7884
17:01callenI'm pretty sure it's just templating.
17:02callenunless you really want tree-traversal for your scraping. ick.
17:02amalloytechnomancy: 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:03technomancycool
17:03technomancycallen: tree-seq+filter =)
17:05Guest26268Is it more idiomatic to use a recursive function or a (loop (recur)) form
17:05jkkramerjoevandyk: https://github.com/clojure/data.zip/ - (xml-> (clojure.zip/xml-zip parsed-xml) :Package :Activity :Status :StatusType :Description)
17:05gtrakGuest26268: you can recur with functions too
17:06gtrakloop is like let but also sets a recur-point
17:06callentechnomancy: maybe so, but I like Sizzle.
17:06yogthosgtrak: absolutely
17:06jkkramerjoevandyk: or xml1->. see also clojure.data.zip/text for getting the string value
17:06callentechnomancy: also just wanted to say that I really like the literary theming in your libraries (leiningen, slamhound)
17:07technomancycallen: heh; thanks
17:08callentechnomancy: if you haven't, you should check out the Mistborn series by Sanderson.
17:08gtrakGuest26268: 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:09technomancycallen: I'll add it to the list
17:09Guest26268gtrak: thanks
17:10technomancycallen: from the one-¶ summary it sounds a bit like http://www.meetmyminion.com/?p=1031
17:12callentechnomancy: it's more enjoyable a series than one would suspect. Also, the system is internally consistent.
17:18joevandykjkkramer: is data.zip bundled with clojure?
17:18jkkramerjoevandyk: no, it's contrib
17:24joevandykjkkramer: hm, trying to do (clojure.data.zip.xml/xml1->) and getting a class not found exception
17:26joevandyknm, figured it out
17:28ravsterhello everyone
17:47ppppaulanybody here use datomic-simple?
17:53Raynesamalloy, 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:53RaynesBut yeah, no XML support.
17:55RaynesIf 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:57RaynesI'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]tufflaxIn 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:26AimHereWell the obvious place to go for clojure would be core.logic, which is an implementation of a Prolog-like language called miniKanren
18:28AimHereThere 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:29tufflaxAimHere, 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:30bbloomtufflax: logic and constraint programming as something of a black art and very new to the clojure community
18:30AimHereWell 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:30tufflaxI 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:30bbloomtufflax: it's extremely application specific
18:30tufflaxok...
18:30tufflax:p
18:30dnolentufflax: I know a couple people are doing this - but no blog posts about the details thus far :(
18:30chousertufflax: have you read the tarpit paper?
18:31tufflaxnot sure chouser
18:31bbloom~tarpit
18:31bbloomclojurebot: you there?
18:31bbloom:-(
18:31Rich_Morintufflax: On a related note, the Datomic query library supports a combination of Datalog, rules, and helper functions.
18:31chouserI 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:32chouserOr at least, not many applications have yet been written that way.
18:32tufflaxchouser, do you mean "out of the tarpit"?
18:32chouserthat's the one
18:32tufflaxi think i've read it, but don't remember much
18:33tufflaxI'll reread it and see if that helps ;)
18:33chouser:-)
18:44tmcivertufflax: 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:51ivaraasentmciver: nice
20:29devnBreaking a fever after doing a bunch of Datomic gives you strange, strange dreams.
20:30technomancyfeverish 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:31hyPiRionhah, I dreamt I was a Java compiler once and puked because of a syntax error
20:31technomancynice
20:31callenmy last fever dream was about Hyperdex and some seriously freaky shit that had nothing to do with programming.
20:32callenat the time, I was figuring out how to do efficient n-dimensional indexing with conventional software.
20:33devntechnomancy: 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:33devnThat feeling sucks.
20:34technomancyjust documented Clojars Releases repo: https://github.com/ato/clojars-web/wiki/Releases
20:34technomancyfeedback welcome if you're confused about the recent developments
20:35technomancyand also if you are not
20:39bbloomtechnomancy: the word "promotion" confused the hell outof me
20:39bbloomi equate promotion with marketing
20:39bbloomi was like "why does code signing affect my ability to promote usage of my package?"
20:39technomancyhmm
20:39technomancy"level up your library"
20:39bbloomheh
20:40bbloomthe bullet points listed are validation errors, basically, right?
20:40bbloomdoes anything else go there other than a "Promote" button?
20:40technomancyin the web UI? yeah, it's a list of blockers to promotion
20:40bbloommaybe "validation warnings" ? :-P
20:41technomancythe message you get when your pubkey is missing is confusing; I have a patch to fix it that I need to deploy
20:41bbloomthe more confusing bit is that there is no distinction between a package's profile and admin panel
20:41technomancy"warnings" often implies they're suggestions rather than requirements
20:42bbloompromotion validation bullet points don't show up for other people's packages, right?
20:42technomancyright; you have to be logged in as an owner
20:42technomancydo you think it merits a completely separate page?
20:43bbloomi think it does, or at least some kind of "admin zone" box
20:43technomancyyeah, maybe some kind of way of visually distinguishing it as special
20:43bbloomi want to see what other people see
20:44technomancycould probably come up with a better word for the list of blockers to promotion; will noodle on that
20:45technomancyheading off but happy to take further feedback on the lein mailing list or later on IRC
20:45bbloomcya
21:00ziltiI get SQL errors from sqlkorma about "expected identifier", what exactly does that mean? how do I have to
21:00ziltihttps://www.refheap.com/paste/7885
21:09gfrederickswas 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:09gfredericksI feel like somehow this is technomancy's fault
21:10ziltiMaybe it's a small hint for people start developping to show them how to write good documentation.
21:11ziltiWow. 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:12gfredericksthat's a lose win win win
21:12abaranoskyzilti: high five
21:12ziltio/
21:12gfredericksabaranosky: is you is the new korma guy?
21:12abaranoskygfredericks I'm not sure if it is official yet
21:13gfredericksabaranosky: is you is a guy who knows a lot about korma?
21:13abaranoskygfredericks at this point I only know the internal implementation of it "ok".
21:14gfredericksabaranosky: 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:14abaranoskyis there a pull request for it?
21:14abaranoskythe easiest thing to do is make a pull request and we could comment there
21:15gfredericksthat sounds SO EASY
21:15hyPiRiontoo easy
21:15hyPiRionYou guys should set up a JIRA page and get a CA and stuff
21:16bbloom:-/
21:16gfredericksabaranosky: I'll get on this once I receive your CA
21:16abaranoskyI'm confused.
21:18abaranoskyah, I figured
21:18gfrederickshrm
21:18bbloomgfredericks: i'm pretty sure that's how anyone ever achieves power
21:18gfrederickscan a pull request be cherry-pick style?
21:18gfredericksI guess I can cherrypick myself in a different branch
21:18bbloomgfredericks: yeah, that's what you need to do
21:19gfredericksthere I go pretending I don't know git
21:21gfredericksman 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:23ziltigfredericks: For your reassurance, it is already. Or I would already have studied the git manual.
21:23hyPiRionYeah, edit files online, download easily, etc. etc.
21:23bbloomzilti: that's a shame, b/c git has been as life changing for me as vim
21:23gfredericksthis makes me feel old-school or something
21:24gfredericksI'm like those 35 year olds who swear perl is great or something but it'll never be worth learning for me
21:24gfredericksabaranosky: https://github.com/korma/Korma/pull/102
21:25ToxicFrogI'm sad github dropped upload support, though
21:25ToxicFrogNow I need to check in my releases, blargh
21:26abaranoskygfredericks checkin it out
21:29abaranoskygfredericks I've got to get going, but we should continue this discussion
21:29gfredericksabaranosky: cool, thanks!
21:40dnolenman, I love reify ...
21:40devn:)
21:45devni love datomic
21:46dnolendevn: still haven't found enough time to play with it ...
21:46devndnolen: im finally "making" time in the sense that i have a couple of weeks off
21:47devnRich_Morin is doing an amazing job on the codeq-cookbook
21:47devndnolen: https://github.com/RichMorin/codeq-cookbook
21:48dnolendevn: nea, thanks
21:48dnolenneat
21:48devnhttps://github.com/RichMorin/codeq-cookbook/wiki/qx__playground_rules
21:48devnthat's the big one^
21:49RaynesToxicFrog: wat
21:50RaynesToxicFrog: What do you mean by upload support and checking in your releases?
21:50devnRaynes: github dropped Upload support
21:50hyPiRionRaynes: https://github.com/blog/1302-goodbye-uploads
21:50RaynesPlease, define 'upload' support. I do not know what this means.
21:50RaynesThank you.
21:50devnyou won't be able to upload a .zip and so on
21:51ToxicFrogRaynes: 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:51ToxicFrogNow you need to either host them elsewhere or commit them.
21:51RaynesYeah, don't commit them.
21:51RaynesPlease.
21:51RaynesBut this sucks.
21:52RaynesEh, they were a source of 'confusion'? Who was confused, I wonder?
21:52RaynesI'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:53RaynesI'm not sure I like that very much.
21:53ToxicFrogCommitting 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:54RaynesIt 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:54ToxicFrogRaynes: 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:54RaynesYeah, I see. Doesn't make me feel any better. :\
21:55RaynesDarn Github, taking away my free services.
21:55Raynesyogthos: How are we doing on the revisions?
22:10technomancyon the bright side if you use your own S3 bucket you can actually get logs
22:10technomancysince github also took away traffic graphs
22:10technomancy(though they never offered them for downloads)
22:13UberNerdGirlhi...anyone recommend a good clojure static site generator, like Octopress/Jekyll?
22:14RaynesI use octopress for my blog.
22:14ToxicFrogI try to avoid web dev, sorry.
22:37djwonkI use Octopress
22:39djwonkdoes 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:40djwonkweavejester pushed 0.3.3 but reiddraper pushed 0.4.0
22:41xeqidjwonk: anyone can fork and push, but we restrict pushing to a group by group membership
22:41xeqibut you can always fork to org.clojars.username as a group
22:42djwonkso, generally speaking, a later version has the blessing of the original author?
22:42djwonkmaybe that is the essence of my question
22:43xeqinope, it just means someone forked and bumped the version number
22:43djwonkbut I thought that you said that only certain people (by group membership) can push a new version
22:44xeqiartifacts (like jars) come with 3 pieces of data: group, name, and version
22:44xeqiyou've found two artifacts with the same name
22:44xeqibut the group is different
22:45xeqiclj-aws-s3 vs com.reiddraper
22:45djwonkxeqi: thanks for clearing that up
22:46xeqifor an example of group memberships look at https://clojars.org/lein-swank; newest version pushed by tcrawley, older versions pushed by technomancy
22:47xeqithat usually only happens on maintainer change though
23:14jlewiscan one access the fields of a deftype outside of an implementation of a protocol method?
23:14gfredericksI think with regular interop
23:15gfredericks(.foo bar)
23:15jlewisis that considered gross? :)
23:15gfredericksdefinitely maybe?
23:16callenjlewis: 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:16gfredericksdo whatever you want but never ever do too much of it
23:16hyPiRion"drink only piss if you have to"
23:16jlewishehe :)
23:16tmciverbecause if you do it too much, you'll go blind.
23:16callenjlewis: is there some reason you need to do this?
23:17callenjlewis: 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:18callenjlewis: note that the assumption in both cases is that I didn't write the code.
23:18jlewisconsider a deftype that has two functions on it that do an assoc kind of thing - a copy-and-modify of the object
23:19jlewisone delegates to the other as an intermediate step
23:19jlewisafter that intermediate step, i'd like to be able to poke at the insides of my new object
23:19jlewisdoes that make sense? i can gist up a little baby example if i'm not being clear
23:20callenjlewis: I'd like the refheap of this if only to potentially learn something new.
23:20callenRaynes: why haven't you merged http://tryclj.com/ and http://refheap.com/ ?
23:22Raynescallen: Why haven't you merged Ireland with Florida?
23:22gfrederickss/merged/complected/
23:22RaynesThey have about as much to do with each other as these two things do.
23:23eggheadtryrefheap.com
23:23gfredericksoh man
23:23eggheadyou can just put some text in there and see if it's your sort of thing
23:23gfredericksthe refheap+tryclj combo was so implausible that my brain replaced refheap with 4clojure without telling me
23:24RaynesSome 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:24Raynesgfredericks: I've been waiting for someone other than me to have that idea, but surprisingly nobody has done it yet.
23:24callengfredericks: implausible?
23:24RaynesIt would be trivial to embed a little tryclj repl in 4clojure's problem pages, gfredericks.
23:24RaynesAt least, I think it would be trivial.
23:24gfrederickscallen: what's the use case?
23:25RaynesHe probably just wants code evaluation.
23:25gfredericksRaynes: uh oh but then people could get more than a single bit of feedback!
23:25callensingle bit of feedback?
23:25gfrederickspass/fail
23:25gfrederickseval in the pastie is nice actually
23:25callengfredericks: being lazy when wanting to test other peoples' code.
23:25gfredericksthere's some pastie that had that
23:25gfredericksI used it a lot
23:25eggheadlight table distributed pastebin w/ websockets
23:25gfrederickscodepad.org I think
23:25callengfredericks: http://ideone.com/
23:25Raynesgfredericks: codepad, ideone, etc.
23:26Raynesgfredericks: I plan on doing some ideone-like stuff, only much, much simpler and prettier.
23:26gfredericksI don't want to know how much support goes into evaling C++ code
23:26RaynesI 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:26ibdknoxegghead: I have some neat ideas for code sharing with LT
23:27Raynesgfredericks: Not much, actually. C++ is easy to eval. You throw it in a file, compile it, run it.
23:27RaynesI mean, these sorts of things aren't meant to run whole programs.
23:27callenEhhhh. You end up need something like Geordi.
23:27eggheadnice ibdknox :)
23:27technomancyLaForge?
23:28callentechnomancy: da
23:28jlewiscallen: https://gist.github.com/4394437
23:28jlewiscallen: obviously this example is contrived, and it could be done with records instead of types, or any other 100 things
23:31callenjlewis: 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:32technomancymeh; gist is fine; it's the ad-laden ones that are wretched.
23:32jlewiswell, the whole point is that it's a contrived example :) the functions i wrote don't make much sense outside of this example
23:33callenjlewis: so what are you getting at? what's the question?
23:34jlewisi suppose i was just showing you the example that i was talking about, since you had asked.
23:35jlewisbut 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:38tmciverI 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:38tmciverIs the only way to make this work to implement print-dup?
23:39technomancytmciver: sure, you can do a defmethod
23:39hyPiRiontmciver: You can implement it as a multimethod
23:39hyPiRionno need to hack around in the source.
23:40tmciverShould print-dup be defined in clj-time for user-friendliness?
23:42callenjlewis: I'm thinking about it. My impulse is to say that it's probably fine.
23:43callenjlewis: I'm far from the most knowledgeable person here though.
23:45callenjlewis: 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:45jlewisyikes - not going there! :)
23:45callenjlewis: so this would seem to only work, absent the application of blood magic, for default immutable types.
23:45callenjlewis: then godspeed and if it breaks, please come back and tell me I'm an idiot.
23:46jlewiswill 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:48callenjlewis: 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:48callenbut I'm an idiot, don't take the limits of my imagination for anything approximating good taste.
23:48jlewisyeah... you could make a getter, but that seems silly
23:49jlewislike, really silly :)
23:50callenjlewis: right. I was also considering the compile time semantics of a macro wrapping the defprotocol. I quickly reached, "No. Don't."
23:52Raynesyogthos: You tested your stuff locally, right?
23:52yogthosRaynes: yeah I've been using it with the template
23:52RaynesI'm asking because I'm going to release this without testing it at all, because I obviously care a lot about quality control.
23:52yogthosRaynes: :P
23:53yogthosRaynes: yeah it should be ok, I'll keep testing tonight, if I find anything I'll ping you :)
23:53Raynesyogthos: Too late. I released.
23:53Raynesyogthos: Note that I don't mind releasing fix versions if necessary. I'm at version 1.10 of laser. ;)
23:53yogthosRaynes: we'll just have 0.2.2 :P
23:53Raynes0.3.0
23:53callenyogthos: vut.
23:53Raynesyogthos: 0.3.0 is deployed.
23:53callenRaynes: of what?
23:53yogthosawesome!
23:53Rayneslib-noir
23:54yogthosand I got the template options working, so once I update it you'll be able to do stuff like new luminus myapp bootstrap
23:54callenRaynes: is stuff from Luminus merged in?
23:55yogthoscallen: yeah like 2 minutes ago :)
23:55Raynesyogthos: 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:55yogthosRaynes: awesome thanks, we'll definitely do code reviews first
23:55yogthosRaynes: I think we found a lot of stuff that way
23:56yogthosthe system works :)
23:56RaynesIndeed
23:56RaynesPlus, you have this thing about end of line whitespace.
23:56Raynes;P
23:56yogthoslol yeah it came back
23:56yogthoshaha I caught another one in route too :P
23:57callenRaynes: Hermione?
23:57Raynescallen: Chris Granger
23:57callenRaynes: does he know you have a book tracking app named after him?
23:58Rayneswat
23:58callenoh woops, not you.
23:58callennicl
23:58callenRaynes: https://github.com/nicl/granger
23:59Raynesyogthos: It is done.
23:59jlewisheh, there are better reasons to call a book tracking app 'granger' than that quote
23:59yogthosRaynes: golden :)
23:59jlewisever read farenheit 451?
23:59jlewis"Granger is the leader of a group of wandering intellectual exiles who memorize books in order to preserve their contents.
23:59jlewis"