#clojure logs

2010-09-23

00:26slyrusevening
00:31defnI wonder... would anyone cut my head off if I said that Ruby was the OOP version of CL?
00:39Raynesdefn: I'll ready the hatchet and the guillotine and allow the CL crew to decide which to use.
00:43slyrusthanks Raynes
00:47amalloyis this feature a recent addition to destructuring, or has it been around a while?
00:47amalloy,(let [f (fn [& {a :a}] (inc a))] (f :a 10))
00:47clojurebot11
00:47amalloy(i mean the ability to pass keyword arguments without a caller-built map, not the :keys feature in general)
00:48ChousukeIt was introduced in 1.2
00:49amalloyah, okay. i saw stuart sierra's article on map destructuring, and was surprised to find that this works since he said it doesn't, and might even be a bad idea
01:36sandGorgonwhat is the mycroft inspector ? I cant figure out what it does
02:43scottjsandGorgon: do you know what an inspector is?
02:46sandGorgonscottj, ah.. that would be a negative. I'm a c++ prisoner here - know what valgrind is (sounds similar)
02:47scottjbasically it just lets you navigate objects/datastrutures and see their contents. I'm guessing c++ debuggers have something similar
02:48scottjthe smalltalk one is realy fun because when you're navigating you can eval code where this refers to whatever is selected in the inspector
02:50andyfingerhutI've not used it, but DDD adds a GUI on top of gdb, and it can display some C/C++ data structs graphically. http://www.gnu.org/software/ddd
03:06LauJensenGood morning all ya'll - We're into C++ now? :)
03:06octeanyone know where i can find an example of parsing xml, transforming it, and outputting new xml?
03:06bobo_yes, we changed the channel to c++ and php
03:06RaynesMorning.
03:07LauJensenbobo_: sweet, those are almost my two favorite technologies
03:07octei'm trying to fit clojure.zip clojure.xml and clojure.contrib.zip-filter.xml together in some way but not succeeding :-)
03:07clojurebotvimclojure is state-of-the-art
03:07RaynesLauJensen: Also, ya'll is a combination of "you" and "all", so that all before ya'll wasn't necessary. Get your redneck right.
03:09ChousukeRaynes: I vaguely remember reading that "all ya'll" is actually in use somewhere
03:10Chousukeredundancy in natural languages is nothing new :P
03:10RaynesChousuke: Seriously? Hrm.
03:10LauJensenRaynes: I've heard it from Americans "all ya'll"
03:10LauJensenPossibly ebonics
03:10Raynes"I heard it from Americans"
03:11RaynesHehehe. That totally makes it right. ;)
03:11LauJensenocte: I think the very first Clojure project I did read and emitted xml with zip-filter, but Ive long since forgotten how
03:11andyfingerhuthttp://memphis.about.com/od/midsouthliving/qt/yall.htm
03:11LauJensenandyfingerhut: Nice - Seems I speak better english than Raynes :)
03:12RaynesTo be completely and totally honest, I have *never* heard "all y'all" out of a person's mouth in Alabama. Ever.
03:13LauJensenRaynes: No need to make excuses, just accept defeat like a man :)
03:14andyfingerhutNo one has heard all of the dialects of English, except perhaps Henry Higgins, and he hated most of them :)
03:14LauJensenI find it difficult to truly hate any other accent than british
03:15Chousukewhich british accent? :P
03:15LauJensenhehe, right
03:15ChousukeI actually like them though.
03:15Chousukesome of them are hilarious
03:17ChousukeI'm probably biased though, as I was taught British English at school :P
03:20Chousuke"Sir, why do you have bananas in your ears?" "Pardon?" ... <- A comic like this in our textbook of first year English
03:20LauJensenOur english books made fun of French people, which I was sure to tell Christophe about :)
03:21LauJensenI remember a picture of a french guy who was drowning and exclaiming "I am drowning and noone shall help me!"
03:21ChousukeThen noone arrived and helped him? :P
03:21LauJensenNo
03:22LauJensenI guess the indian/american accent can also get a little hard on the ears after a while
03:22LauJensenAnd one accent which really bites, is the danish/american accent :(
03:25octeLauJensen, my main problem is turning the zipper back into xml..
03:25LauJensenocte: I think the function is called emit
03:25LauJensenin zip-filter
03:27octeLauJensen, can't find anything like that. there's xml/emit but it doesn't want a zipper
03:28amalloyLauJensen: all y'all is a regional thing, confined to not very many regions in america. i think it's in the general area of minnesota, but don't quote me
03:28amalloyocte: not exactly a clojure tool, but if your task is fairly simple have you tried an xslt?
03:29LauJensenocte: This is nearly the first piece of Clojure I ever wrote so don't laugh, its just to show you what I did way back when https://gist.github.com/11fea14db41cfefa9f54
03:29LauJensen"in the general area of minnesota" -- quote, amalloy
03:29LauJensengotcha :)
03:30amalloynoooooo
03:30octei think i got it working http://paste.lisp.org/display/114797
03:30octeseems kind of convoluted though
03:31amalloyanother amusing one is "yins". wiki claims that's only used in pittsburgh, but it's basically the same as y'all
03:36RaynesLauJensen: I concede. I'll be jumping off a bridge now. ;)
03:37LauJensenRaynes: Seeing how you're American I wouldn't joke about that stuff online, next thing you know officers will breaking down the door tasering your dad
03:38RaynesThe only male in this household is my Uncle. And seeing him get tasered would be amusing enough to warrant inconvenience.
03:38LauJensenhaha, man you're cold
03:40tomojare there uncles named "Uncle"?
03:40RaynesUncle Tom
03:58cais2002hi, does anybody use leiningen with subversion? how do u do a lein jar?
03:59cais2002I got this error msg: Exception in thread "main" java.util.zip.ZipException: duplicate entry: .svn/entries
04:07LauJensensubversion?
04:09esjsubversion.
04:10LauJensenlike a sub version of git?
04:13flintfhyuk hyuk
04:13esja politically dangerous one
04:13LauJensencais2002: I never heard of lein and subversion in the same sentence, what are you doing with it ?
04:14cais2002my project is using subversion for version control and lein for build
04:14LauJensenah like that
04:15cais2002i guess the .svn folder in the resource path conflict with the .svn folder of the root folder of the project..
04:15LauJensencais2002: lein will throw an exception if a file is locked, and as I recall it also barks at Emacs temp files, could that be an issue?
04:15esji have used svn successfully in a clojure project before, didn't have such weirdness
04:15LauJensenYou might want to check if you can exclude the .svn dir from the build then
04:16esj(then LauJensen put me in a headlock, and enumerated the benefits of git...)
04:16LauJensenesj: come on, did I? :)
04:16esjok, I might exagarate massively
04:17LauJensenhehe, thought so
04:17esji figured out I should use git on my own :)
04:17LauJensenAlthough I prefer git to SVN I definitely wouldn't advocate it as the ultimate version control system
04:17esj"Well.... if its good enough of Linus and Rich...."
04:18LauJensenexactly, 'good enough'
04:18esjoh, perhaps a misunderstanding: "..." were my thoughts at the time of switching.
04:19LauJensenok
04:19bobo_git > svn >>>>>> perforce
04:19esjwhat about Hg !=
04:19esjHg ~= Git ?
04:19bobo_never used it, but yeh, around git
04:20cais2002LauJensen: there does not seem to be an option to specify exclusion of folders in th eproject.clj file
04:20LauJensenok
04:21andyfingerhutand perforce >>>>>>>>>>>>>>>>>>>>> no version control
04:21cais2002and i just confirmed that it's due to the .svn folder in the resources folder..
04:21LauJensenesj: The major benefits in Hg, is that its a very clean implementation, where as git is an insane mess of intertwined C code which nobody understands. In terms of usability I couldn't get used to the anonymous branching scheme
04:21esjcais2002: ah, I did not use a resources directory in my svn project, so could well be.
04:22esjLauJensen: cool, thanks.
04:23cais2002esj: any quick fix to this?
04:25esjtake resources out of version control ?
04:26esjLauJensen: is anybody working on a test coverage tool for clojure ?
04:27esjor have I missed an existing solution ?
04:28cais2002the skip-file? function in jar.clj http://github.com/technomancy/leiningen/blob/master/src/leiningen/jar.clj#L77 can we update it to skip ^\. for directory? is that a reasonable solution?
04:28cais2002rightnow it just accepts all directories
04:29esjcais2002: afraid I don't use leiningen, so couldn't say :(
04:29LauJensenesj: I think stuartsierra is cooking up something
04:30esjLauJensen: that's great, thanks.
04:30LauJensencais2002: I think it makes sense, I can check with ninjudd who's working on cake and hear what he thinks
04:31cais2002LauJensen: thanks. I will just update in my local copy of lein first
04:32LauJensencais2002: Yes start there, then possible migrate to cake in a little while. They're usually überfast in implementing small things like that
04:50notsonerdysunnywhen I execute the code in http://gist.github.com/593350 and run (ns-publics 'clojuratica-exp.core) I only see the following ....
04:50notsonerdysunny{kernel-link #'clojuratica-exp.core/kernel-link}
04:50notsonerdysunnywhat happened to the other variables like math-evaluate.. can anybody help?
05:37AWizzArdCan one download the Clojure API docs somewhere as .pdf or .html?
05:40scottjyou can probably generate them yourself from the clojure source
05:51LauJensenAWizzArd: Isnt the entire API on a single html page on clojure.org still?
05:54raekI'm trying to set up leiningen on a Solaris computer and I get this when I run lein: ".bin/lein: LEIN_VERSION=1.3.1: is not an identifier"
05:55raekdoesn't solaris sh support "export X=y"?
05:56flintfLauJensen: AWizzArd: yea, I think you can just do wget -r http://clojure.github.com/clojure/
05:56flintfand grab it
05:57LauJensenraek: Im not sure solaris accepts assignment without calling export
05:57bobo_raek: thinkit has another syntax
05:57LauJensenso... try cake
05:57LauJensen:)
05:57bobo_solaris is weird
05:57raekindeed
05:57bobo_one could almost think LauJensen has money invested in cake :-)
05:57cgrandAWizzArd: just switch to the gh-pages in git
05:58cgrandAWizzArd: just switch to the gh-pages *branch* in git
05:58raekLauJensen: line number 3 in the lein script is: export LEIN_VERSION="1.3.1"
05:58raekbut yes, cake sounds like a very good idea
05:59raekI'm going to do a getting started with clojure and emacs mini-talk next wednesday
06:00LauJensenIn Sweden I suppose, how far away from Cph are you ?
06:01raekand now I'm trying to get the usual stuff working at the computers we're going to use
06:01raekLauJensen: yes, Linköping. 356 km
06:02LauJensenOk, if you want you can hope on your bike now then, there's a Clojure meeting up 4 hours
06:02LauJensenfree snacks I hear :)
06:04raekwouldn't be too complicated to get there some time... not much longer that to my home town
06:04bobo_think x2000 goes al the way?
06:04LauJensenIts Ative thats hosting it, they're a pretty cool bunch
06:05bobo_ive done some daytrips to copenhagen, its abit to much travel for one day =)
06:06LauJensenbobo_: Yea, save your strength for Frankfurt :)
06:06bobo_indeed!
06:10raekfound a quick hack to the Solaris sh problem: replace the shebang line in the lein script with #!/usb/bin/bash
06:13raekLauJensen: I promise I'll teach them cake too
06:13LauJensenusb? :)
06:14raekheh. typo.
06:16LauJensenIt'll be interesting to see how many Clojurians will turn out. Sweden seems a little more advanced than DK in that regard - but thats just a gut feeling (and a PR statement)
06:25raekfor the Conj Labs?
06:33LauJensenNo I just meant in general
06:33LauJensenThere's not a Conj Labs Denmark in the works yet
06:42Raynesraek: Found out whether or not you'll be able to make the Conj yet?
06:43raeknope, not yet
06:48LauJensenRaynes: Looking forward to going?
06:48RaynesLauJensen: Absolutely dreading it.
06:48Raynes;)
06:48RaynesI'm ecstatic.
06:48LauJensenYou're afraid chas will get on your back about not using maven I suppose... I understand
06:49RaynesIf cemerick can be stubborn for 15 years about Emacs, I think I'm entitled to the same privileges with maven. :>
06:50LauJensenRaynes: I must say Im a little disappointed that you didn't ask to have your scholarship converted to a trip to Conj Labs, but I guess we all make stupid decisions when we're young :)
06:50RaynesHehe.
06:50cemerickRaynes: indeed you are
06:50RaynesIf it requires a passport, it's way too far for me.
06:50cemerickThough you're already using maven via lein and cake. Sorry.
06:50LauJensenwhoop, there he is, good morning cemerick :)
06:50Raynescemerick: Not for long. cake is to use Ivy soon.
06:50LauJensencemerick: cake is converting to Ivy as we speak
06:51cemerick...which uses maven repos. *shrug*
06:51LauJensenwell, it doesn't really make sense to copy all of those repos just to change the name now does it? :)
06:51cemerickInteresting move, though.
06:52cemerickwell, with the repos comes the whole versioning scheme, the semantics of SNAPSHOT, version range semantics, etc.
06:52cemerickAlong with the impl. detail of XML pom files..
06:52LauJensenI think most of the actual design of the Maven work flow is quite good, its just the implementation and all of thats XML which bugs me
06:53cemerickInterestingly, other people in other contexts wont use lisps because of the sexprs. Meaningless syntax battles are...meaningless.
06:54LauJensencemerick: I think the arguments against the bloat of XML are valid, those against lisp arent even rational
06:55LauJensencemerick: I think everybody was impressed by your screencast about Maven, where you start out saying "These simple 40 lines make out the basic config", but I was less impressed when the screencast ended and your simple build had grown to over 100 lines, thats just nuts
06:55cemerickRepresentational compactness is the only objection? They're semantically equivalent w.r.t. config files.
06:56LauJensenIts not the only, but its huge
06:56cemerickHrm. If that's the big one, then clojure should switch to yaml.
06:57LauJensenI think you're mixing things a bit. What I don't understand, is why you think that its worth the trouble of writing out these huge xml configs, when a few vectors can do the trick?
06:58scottjhave you considered you might be missing the point?
06:58cemerickBecause I don't want to reimplement (or help to reimplement) 10 years or more worth of tools.
06:58bobo_you can open a maven project in idea, eclipse and netbeans, you can open a lein project in...nothing
06:58LauJensencemerick: Why not? Isnt it plausible that with 10 years passed, we're able to make much better tools?
06:58neotykbobo_: I do it in emacs
06:59neotykand am much happier person now
06:59bobo_neotyk: ofc, but of the "big tools" many developers are used too.
06:59cemerickLauJensen: There's no "better version" of a build process for building .war files. This stuff is a commodity, and fundamentally uninteresting.
06:59scottjneotyk: ide's give all sorts of features for maven like UI's to tasks and autocompleting of plugins repos etc
06:59scottjthat emacs doesn't give to lein
07:00LauJensenbobo_: Its important not to work on the premises of people who are unwilling to learn
07:00neotykbobo_: it is called enterprise not "big tools"
07:00RaynesNot sure lein requires such tools.
07:00neotykscottj: I never needed auto completion for project.clj
07:01bobo_i dont think it does, i love lein.
07:01bobo_im just saying joe developer might wanna use the ide he is used too
07:01scottjRaynes: requires != would be nice
07:01RaynesNot sure why it would be useful.
07:02scottjRaynes: the same reason autocomplete is useful anywhere
07:02neotykbobo_: for sure he will like to use his ide
07:02RaynesI don't think I've ever seen a project.clj that was longer than my Emacs frame.
07:02neotykbut I just don't see why would I write pom.xml for clojure project if I can have project.clj
07:02RaynesMaven is a bit of a different beast.
07:03cemerickRaynes: And you've never seen a project.clj file that could do more than 5 or 6 things, either.
07:03Raynescemerick: I was actually getting to that.
07:03RaynesLike I said: different beasts.
07:03RaynesI'm not defending either one. I'm agnostic.
07:03LauJensenRaynes: I have project.clj which almost 100 lines, but then it does everything except wash my clothes
07:03bobo_i assume you can mix clojure and java in one project with maven?
07:03LauJensenIn 100 lines, maven does "Hello, world!"
07:03bobo_for example
07:04neotykbobo_: I do that in http.async.client
07:04RaynesI just like to use cake, don't care for XML, and simply do not require services that maven requires that cake does not. If ever I am in need of such services, I suppose I'll be learning maven.
07:04cemerickRaynes: Fundamentally, I am as well, but LauJensen enjoys baiting me. :-|
07:05LauJensenhehe, cemerick I dont mean to bait, I just dont understand your reasons for advocating this ancient and verbose beast of a build system
07:05cemerickRaynes: That's a very good perspective. Unfortunately, many others assume reimplementation is a sane strategy.
07:05LauJensencemerick: after 10 years it is a sane strategy!
07:05hoornethey guys, about what screencast are you talking about? Can I see it?
07:05LauJensencemerick: got link to that maven screencast you did?
07:06cemerickhttp://cemerick.com/2010/03/25/why-using-maven-for-clojure-builds-is-a-no-brainer/
07:06cemerickhoornet: ^^
07:06LauJensen'no brain' thats for sure :)
07:06scottjneotyk: autocomplete will tell you what versions of a lib are available and other info you end up having to google for w/ just emacs
07:06hoornetthanks a lot. I'll take a look at it
07:07neotykscottj: point taken, though I only experienced that need in Java projects, as they tend to have a lot of deps
07:07cemerickMy recent post is worth a read as well if one is interested in build and deploy processes. http://cemerick.com/2010/09/22/wherein-i-feel-the-pain-of-being-a-generalist/
07:08LauJensencemerick: great, look forward to reading it!
07:08cemerickLauJensen: So, if you're a fan of reimplementation, why not push to reimplement the JVM, since it's the source of so many limitations and sharp corners that pure-clojure devs often view as obstacles?
07:09LauJensencemerick: You have a funny way of driving your arguments :)
07:09LauJensen"If you believe that, why not do this completely unrelated thing?"
07:09cemerickNot unrelated at all. I'm simply extending your preference for reimplementation of other tools with flaws to other domains.
07:10neotykcemerick: problem with maven is that once you need a plugin for it you are facing quite some bad time, while you can have plugins local to you project in leningen
07:10LauJensencemerick: Its not that reimplemeting some fundamental things of the JVM is a bad thing, it would be excellent, its just too much work right now
07:10Rayneshttp://raynes.github.com/clj-github/clj-github.gists-api.html Is it just me, or does this page not exist?
07:10LauJensenRaynes: doesnt exist / broken
07:11RaynesDamn. Autodoc has failed.
07:11neotykahh, and one more, try working with maven in emacs
07:11cemerickLauJensen: Then I wonder why you think reimplementing all of the plugins and tooling available for maven / XML is so much easier.
07:11neotykgood luck with that one
07:11LauJensenneotyk: no fun?
07:11LauJensencemerick: Because all of the essentials are already done
07:12cemerickOne man's essentials is another man's barest foundation.
07:12neotykit is nice in IDE, once you decide to go with emacs, no support anymore
07:12cemerickneotyk: That is a good point. Though, I've not yet needed plugin functionality that isn't already available.
07:13cemerickOne could always simply exec a clojure script if that came along....and I do remember a maven plugin that allowed you to inline clojure code into the pom.xml file, but I never tried it.
07:13neotykI had written those, and shit this was painfull
07:13RaynesNosir, I failed me. Forgot to actually commit that particular documentation page.
07:13LauJensencemerick: I think I need to see more screencasts to appreciate Maven like you do. Screencasts and money
07:14cemerickI don't "appreciate" maven, I use it out of sheer necessity. If a more elegant yet similarly-capable tool existed, I'd use that instead.
07:14LauJensenTry cake
07:14RaynesSomething get this man a magic wand!
07:15Raynessomebody, even
07:15neotykor maybe it is that I'm just tired of Maven, and for me verbosity of pom.xml is a bit to much to handle
07:16scottjCan't you write pom in several other formats in latest maven?
07:16cemerickLauJensen: Seen it. I'm well past an ant-like target model. And again, no sizable plugin ecosystem, and no tool support. Then I'd have to install and maintain ruby everywhere I'm building stuff. Yikes.
07:16neotykscottj: you have maven polyglot
07:16LauJensencemerick: What specifically is it, thats cake missing?
07:16cemerickscottj: Yeah, that's polyglot maven. Certainly on its way.
07:17RaynesI've been writing plugins for cake because ninjudd promises me sweets. :>
07:17neotykI'm very happy user of leiningen, though must admit that haven't done any commercial project in clojure, yet
07:18neotykso I don't now really
07:18cemerickLauJensen: for starters, plugins for generating NSIS installers, cross-compilng jar files to .NET assemblies via ikvm, and obfuscation via proguard
07:18LauJensencemerick: Do you need obfuscation even when not embedding the source ?
07:18scottjI would guess maven has plugins for deploying to android, GAE, hudson, etc
07:19Raynescemerick: Awww, I was already writing it down. :(
07:19cemerickscottj: well, one doesn't "deploy" to hudson, but yeah, if you've got a pom.xml, your hudson configuration is already done
07:20cemerickLauJensen: Nearly all of my projects have some java components -- and yes, I still obfuscate the clojure classfiles as well.
07:20scottjmaven also builds project files for ides I think
07:21LauJensencemerick: Alright - And all of those items are completed automatically once you initiate the build?
07:21cemerickOne can have the project files subsumed by the pom in eclipse and netbeans, if one prefers. NB is smoother in that regard.
07:22cemerickLauJensen: Yes. Then there's the plugins for selenium, and functional and unit tests in general.
07:22LauJensenOk, whats the Windows story for Maven ?
07:23cemerickwindows story?
07:23scottjworks great, probably has a million people using it
07:23Raynes"Does it work properly on Windows"
07:23scottjdaily
07:23cemerickah
07:23cemerickI'd wager there's more maven users on windows than on flavors of linux / OS X / bsd
07:23LauJensenOh ok
07:24LauJensenInteresting
07:35esjcemerick: you nailed it on the head with the tyranny of diversity that we face.
07:36cemerickesj: oh, in yesterday's post?
07:36esjindeed
07:36cemerickIf I were brighter, I would have used that far more concise phrasing. :-)
07:36jouberthi, I have a question about JSON-STR in clojure.contrib.json
07:37cemerick~asking
07:37clojurebotasking is Don't Ask to Ask, Just ASK
07:37cemerickjoubert: go for it
07:37esjif I were brighter i'd understand all this stuff :)
07:37RaynesI'd so very much enjoy it if Github would complete it's gist API/documentation. :\
07:37RaynesI feel so limited.
07:37joubertcemerick: why does JSON-STR add quotes in the resulting string for strings, keywords, and symbols?
07:38cemerickjoubert: you mean for keys in maps?
07:39joubertcemerick: I expected (json-str :test) to return "test", but instead "\"test\"" is returned
07:39joubertsimilarly for strings and symbols
07:39Raynes-> (clojure.contrib.json/json-str :hai)
07:39sexpbot⟹ "\"hai\""
07:39RaynesI understand why it does it for strings. Not sure why it would do it for symbols.
07:40cemerickRaynes: because unquoted strings are not allowed in json
07:40Raynescemerick: Oh, brainfart.
07:40cemerickjoubert: ^^
07:40RaynesI was too busy thinking about Haskell's Show typeclass.
07:41cemerickjoubert: BTW, there's no "JSON-STR" function. It's "json-str". :-)
07:41joubertcemerick: ok, thanks
07:41Raynescemerick: He is probably a CLer. They capitalize everything.
07:41cemerickI figured. :-)
07:41cemerickClojure: saving caps lock keys worldwide. ;-)
07:42joubertcemerick: :-) the only reason I uppercase it is because then it stands out in a sentence
07:42RaynesMost people use single quotes for that.
07:42RaynesOhai, I has a question about the 'json-str' function! Halp! :>
07:43joubertraynes: at least we're using hyphenated style instead of camelCase!
07:44RaynesMy dash key has never been the same.
08:08kumarshantanucemerick: I am going to tweet that [caps lock thing] ;-)
08:08cemerickkumarshantanu: have at it :-)
08:14LauJensencemerick: Gotta duck out, was good reading your post and hearing your specific reasons in here, thanks
09:17@chousercemerick: that blog post of yours is depressing
09:17cemerickYeah. I know. :-(
09:17RaynesMorning House.
09:17cemerickchouser: The whole state of software development practice is depressing, IMO.
09:17RaynesEr, chouser. I keep forgetting that your first name isn't Gregory.
09:18cemerickNearly a fatally-flawed situation, perhaps.
09:18kjeldahlchouser: Link?
09:18chouserhttp://cemerick.com/2010/09/22/wherein-i-feel-the-pain-of-being-a-generalist/
09:18chouserRaynes: :-)
09:19cemerickRaynes: chouser is like House in that both are awesome.
09:19cemerickchouser: I think a solid 5-year Englebart-esque program would result in a big leap forward.
09:19cemerickI don't see anyone or any organization stepping up to that, though.
09:20chousercemerick: now, theoretically couldn't one provide a pom.xml (or perhaps a pom-generator) that would provide one-button clojure+processing->applet building, right?
09:20cemerick*maybe* MS research, but they're not so great at pollenating productized versions of things.
09:20cemerickchouser: Absolutely. I could put it together in ~4 min.
09:21cemerickThat's after ~10 years of JVM background and ~2 of maven though.
09:21alexykcemerick: it's by 9:24 am then, right?
09:22cemerickheh
09:22chouser*if* maven's internal semantics were dead-on exactly right no reason to complain, then I'd be entirely content learning it and/or building pretty little simplifier tools on top of it.
09:22alexykok, have it on my desk by 9:25, to be lenient
09:22chouserbut I'm not fully convinced that's the case.
09:23alexykchouser: are you saying they are *alive*? (gasp)
09:23alexykoh, dead-on
09:23chouserwell "entirely content" might be a stretch, but I would be willing to learn it and wouldn't "waste" time on cake or lein
09:24alexykchouser: maven is just a right of passage. You have to prove your manliness by subduing it.
09:24cemerickchouser: I'm not convinced either. Unfortunately, the nature of things is such that a clean break is extremely risky, and existing players are generally unwilling to change.
09:24chousercemerick: I don't honestly care all that much about existing players, at least in regards to "mainstream" programmers or "established" IDEs
09:24alexykthe multi-language ability of maven is still what nobody else has
09:25chouserperhaps I should, but I don't.
09:25cemerickchouser: That's an odd sort of communal solipsism. :-|
09:25chousersorry, don't follow.
09:27cemerickCommunity is oxygen; if you're not worried about uptake, then you'll be forever doomed to building stuff on your own, or with a very small cohort.
09:27chouseralexyk: ah, so now it's design begins to make sense...
09:27cemerickIn any case, the problem is the problem, not the lack of an adequate solution.
09:27Raynescemerick: I had to look up solipsism. Thank you. What a beautiful word.
09:28cemerickRaynes: Enroll thyself in an epistemology class. You'll be happy for it.
09:28chousercemerick: Well, let's see... I use the 5% desktop OS (linux), and within that a 5% window manager (ion). I don't use IE or Safari. My favorite language is hated by all who hate the JVM *and* all who hate Lisp...
09:29cemerickchouser: Sure, that's fine in your particular corner. But if you are looking at building something that's better than X, you need all those other people.
09:29chousercemerick: so whether they're good decisions or not, you do seem to have discovered my pattern
09:29cemerickAnd, even though you don't use those 95% tools, you benefit by their dominance.
09:30Rayneschouser: You're such a maverick. I bet you even put ketchup in your scrambled eggs!
09:30cemerickha
09:30cemerickI used to enjoy grape jelly in my eggs. That was a lifetime ago, though.
09:30RaynesI used to put ketchup in mine. Now I just don't eat scrambled eggs.
09:31chouserbut I don't do it to *be* a maverick. I do it because I prefer better tools, or at least tools that are better for what I do.
09:31RaynesVery rarely. Not much of a breakfast person.
09:31chouserI have used Windows as my primary OS, and C++ as my primary language, etc. I have specific articulable reasons for choosing other than each of those.
09:32chouserSome of these choices have become popular enough that enough community has gathered around to make using them much easier than they were before (linux, clojure). Others have not (ion)
09:32cemerickOf course, it's a spectrum. Most people tend towards satisficing, insofar as they don't care about the same things you care about.
09:32shoover__I use Windows and C# and put ketchup on my scrambled eggs. I don't know what that makes me.
09:34cemerickI don't think there's nearly "enough" community around clojure, just to pick on our favorite son.
09:34cemerickBut anyway, we've strayed from the point.
09:34chouserI suppose to choose to bet on it, maven does not have to be the best imaginable solution, just the best available.
09:35chousercemerick: I qualified my "enough". "enough" to be easier to use that it was. growing not shrinking.
09:35cemerickSure.
09:36chouserMy life would be so much easier if *everyone* used linux, ion, clojure, firefox, bash, vim, etc.
09:36cemerickAgain, I think maven et al. are solving the wrong problem. Build tools and all of the process around software development are an artifice symptomatic of a lot of brokenness.
09:37chouserRaynes: http://en.wikipedia.org/wiki/Ion_%28window_manager%29
09:39RaynesAww, a discontinued Window manager.
09:39chouser:-/
09:39RaynesDiscontinued software makes me all emotional.
09:41chousercemerick: oh, had you said that before? I missed it.
09:41chouserwhat problem should be solved instead?
09:43cemerickThere are a lot of problems. :-)
09:43cemerickSpecifically related to build tooling, deployment, etc., the problem is that the mode of deployment dictates packaging.
09:43cemerickI shouldn't have to know about .war files.
09:43cemerickI shouldn't have to know about .app directory structures.
09:43cemerickWhen I shove a file into an app container, the application contained therein should be transparently mirrored across my cluster, if I've set one up.
09:46cemerickTo a certain extent, that's screaming at the ocean. In practical terms, I might as well say I want to program in straight C, get the perf that implies, yet not have to manage memory.
09:46cemerickBad analogy, but perhaps it gets across.
09:46chouser:-)
09:47cemerickIn any case, the situation is not good for people with domain expertise.
09:47cemerickIt *is* good for those whose domain expertise is whatever the shifting sands of the software industry are shoveling these days -- which happens to be a friggin' lot of people.
09:53alexykwhat's the best resource for a comprehensive API docs, including core and contrib?
09:54alexykwith the contrib refactoring and osmosis into core
09:56cemerickalexyk: http://clojure.github.com/clojure/branch-master/index.html and http://clojure.github.com/clojure-contrib/branch-master/index.html
09:56cemerickThose track HEAD AFAIK
09:56alexykcuuute
09:58alexykis re-find etc what people use for regexes? Anything like PCRE?
09:58clojurebotmax people is 313
09:59cemerickalexyk: clojure uses java.util.regex.Pattern, which is an excellent PCRE impl.
10:00alexykcemerick: ok, just checking :)
10:00cemerickArguably second only to perl, IMO.
10:00alexykso looks like re-seq is the most clojure-like of them...
10:01chouserre-seq is my most common fn for regex. Then re-find and finally clojure.string/replace
10:19kjeldahl,(bound? somevarname)
10:19clojurebotjava.lang.Exception: Unable to resolve symbol: somevarname in this context
10:19chouser,(resolve 'somevarname)
10:19clojurebotnil
10:19chouser,(resolve 'reduce)
10:19clojurebot#'clojure.core/reduce
10:20kjeldahlThanks!
10:35alexykchouser: what's the idiomatic way to walk a directory and grep files for a pattern?
10:44chouser(file-seq (java.io.File. "foo"))
10:45alexykchouser: ok, and then duck-streams and re-seq, right?
10:45chouserI guess you could use duck-streams
10:46chouser(filter #(re-find #".svg" (.getName %)) (file-seq (java.io.File. "/home/chouser/misc/art")))
10:48cemerickshoover__: it's historical, but serendipitous. See clojure.java.io/file
10:48cemerickmefesto: Awesome. Bring three friends! :-)
10:49mefestohah
10:49alexyktwo of them cute females at that
10:49shoover__I'm not sure I've ever heard historical, but serendipitous in any context
10:49shoover__Usually it's just historical
10:51alexykhmm, there will be two rich hickeys and two chousers at clojure-conj... or their evil twins...
10:51chouser???
10:51alexykand two stu's
10:51alexykclojure-conj.org, two rows of pics
10:53alexyk(is it just for my Chrome or for everybody?)
10:54esjalexyk: so THAT'S how they're so impossibly productive.
10:55cgrandalexyk: when you zoom out everybody has a "twin"
10:56chouseralexyk: yeah, an odd choice of visual design
10:57alexykwell, now we just have to go there, to meet the twins! :)
10:57chouserhe walks like me; he talks like me; he's even got a twin like me
11:06l_a_mdoes someone use compojure ?
11:06l_a_mi 've got a problem with my defroutes
11:06l_a_mi would like to have an URI like this : "/version?api_key=xxxx"
11:06l_a_mhow can i do this ?
11:07l_a_mi try (GET "/version" (params :params)
11:07l_a_mdoes someone have any idea ?
11:09kjeldahlI_a_m: (ANY "*" [& params] ....)
11:11kjeldahl (ANY "*" [& params] (str (prn-str params)))
11:12kjeldahlI'm still clueless on how to get the whole session stuff and similar using compojure routes like above...
11:15bhenrykjeldahl: i think you want ring middleware. i'm not sure what compojure does to them if anything. look into ring wrap-params
11:17bhenrykjeldahl: er. ring.middleware.keyword-params/wrap-keyword-params
11:19l_a_mkjeldahl: so i can use (GET "/users/:id" [id params]
11:19l_a_m?
11:25kjeldahlI_a_m: Extracting from the URI string is easy. But how about the headers and similar? There's a little bit too much "magic" for me to grasp yet (or lack of docs..).
11:27shoover__l_a_m: did you try what you just wrote? It looks right
11:27l_a_mshoover__: yeah i try
11:28shoover__l_a_m: well, just id. If you want a map of all the params, you may need something different
11:28l_a_mshoover__: and i ve got a NullPointerException
11:29shoover__there's special destructuring going on in compojure. If you use a vector, you have to provide the names of the params you want. So [id] should work.
11:29l_a_mit works
11:30l_a_mGET "/users/:id" [id & params] and not : [id params]
11:30shoover__ok, good
11:31shoover__If you want to see the entire request, leave off the [] and destructure a map like {{id "id"} :params :as req}
11:31shoover__(that :as req is untested, just a guess)
11:50dnolenwow, composable regexes, http://github.com/cgrand/regex
11:51alexykdnolen: cool
11:51alexykcgrand: grand! :0
11:53cgrandit's just a toy
12:25alexykninjudd: ping
12:32amalloyalexyk: pong (ninja'd! get it?)
12:33alexykamalloy: but you got no cake!
12:35amalloy:( i'll try it out one of these days
12:36alexykamalloy: today's the day! cake rocks
12:39amalloygem install cake? or something trickier?
12:40ohpauleezalexyk: what advantages does cake give you over lein... or is it just how they each approach the problem?
12:43amalloyohpauleez: it keeps a persistent jvm running in the background to speed up new clojure tasks, for one
12:43ohpauleezlein interactive
12:43ohpauleezThe autotest stuff could be cool
12:44ohpauleezbut currently my text editor fires that off for me, in a nailgun instance
12:47amalloyalexyk: i notice cake repl says it gives you tab completion, but for me it just types a tab character?
13:20BahmanHi all!
13:20alexykamalloy: didn't try tabs yet
13:25cemerickninjudd: instead of nREPL, what do you think of clojack? (a play on "clojure ack", etc)
13:26cemerickComing up with project names is straight-up misery.
13:29kotarakOn the other hand: a sister site for clojars called clochards?
13:29cemerickkotarak: hrm, good to know
13:29kotarakcemerick: yeah, we live in a global world.
13:30ninjuddcais2002: i just checked. cake uses the ant jar task, so it excludes .svn files by default http://ant.apache.org/manual/dirtasks.html#defaultexcludes
13:31cemerickperhaps ackie then :-P
13:31cais2002ninjudd: thanks for the quick fix. I will check it out tomorrow morning
13:32ninjuddcais2002: no fix necessary ;-) but you're welcome
13:34ninjuddcemerick: clojack is certainly better, but i still prefer portal :>
13:35ninjuddToiletjure?
13:35cemerickportal will forever mean altavista and such in my head :-/
13:36ninjuddportal will forever mean shooting a teleporting door into a wall and walking through it to me
13:36ninjuddwhich is exactly what nREPL aims to do ;)
13:37cemerickheh, bugs bunny-style
13:37ninjuddhttp://en.wikipedia.org/wiki/Portal_(video_game)
13:37cemerickhrm, maybe it was daffy
13:37kotarakYeah. These portable holes. Say are kinda cool.
13:37bhenryi've always wanted one of those black circles you could put anywhere to make a hole.
13:37kotaraks/say/they
13:38ninjuddcemerick: you could name it ASHPD
13:38ninjuddwhich is the technical name for the portal gun (Aperture Science Handheld Portal Device)
13:40ninjuddnice parallel to nailgun too
13:45ninjuddyes, except there is already a ruby lib called railgun
13:46ninjuddand snailgun
13:47kotarakpfff... there is no :or for list destructuring. :(
13:47dakronesnailgun? do you send nailgun requests via snail-mail?
13:50ninjudddakrone: something like that
13:54scottjkotarak: yeah I've wanted that before too
13:54cgrandkotarak: if you are destructuring a vector you can use :or :-)
13:55kotarakHmm.. I thought I *was* destructuring a vector.
13:55kotarakLemme check again.
13:55kotarak(Maybe I tested with a list...)
13:55cgrand'(let [{a 0 b 1 :or {b 43}} (seq [42])] [a b])
13:56cgrand,(let [{a 0 b 1 :or {b 43}} (seq [42])] [a b])
13:56clojurebotjava.lang.IllegalArgumentException: No value supplied for key: 42
13:56cgranddon't work but
13:56cgrand,(let [{a 0 b 1 :or {b 43}} [42]] [a b])
13:56clojurebot[42 43]
13:56kotarakargh
13:56cgrandnot pretty and brittle, you are warned
13:56kotarakok
13:57kotarakWell. This whole code is not pretty. But it reduces runtime by a factor of 3. :]
13:57ohpauleezcemerick: I just looked at nREPL for the first time right now... I just did a similar thing using aleph
13:57ohpauleezbut am now moving my focus to net-ns, a remote ns system for clojure
13:57cemerick"remote ns system"?
13:58ohpauleezan ns like macro that lets you :expose :use-remote, etc
13:58kotarakcgrand: btw: I'm absoliutely happy, that I got into fighting distance to the vector. :)
13:59ohpauleez:use-remote :at "127.0.0.1" for example
13:59cgrandkotarak: ah, it's vlist stuff... I haven't looked at your latest yet
14:00cgrandsorry
14:00raeka RPC library?
14:00kotarakcgrand: no hurry. :) I know you are completely booked at the moment.
14:01kotarakcgrand: no matter whether it's useful, but less than factor two away from a vector (written in Java) with a datatype written in Clojure seems pretty cool to me. :)
14:01ohpauleezraek: a type of RPC library, yes
14:02svs`anyone using carte? any idea what this means? "db-spec null is missing
14:02svs` a required parameter"
14:05@rhickeycemerick: any thoughts on contributing nRepl when you are ready?
14:05duncanmdum de dum
14:06duncanmit's easy to find the biggest number in a seq (use max), but what if i also want to know its position?
14:07cemerickrhickey: Happy to.
14:07cemerickIt's early days (I think I'm ~ a full day into it so far!), but it's coming together. I'd like to make sure I've got everyone's bases covered so that it's globally useful.
14:07chouserduncanm: which position? the first, last, or all of them?
14:07cemericks/globally/generally
14:07mrBliss,(apply (partial max-key first) (map vector [1 3 2] (range)))
14:07clojurebot[3 1]
14:07duncanmmrBliss: nice
14:07mrBlissduncanm: ^^
14:07duncanmmax-key?
14:08duncanmmrBliss: so if i have a matrix ([a b c] [d e f] ...) and i want to find the indices to the largest element.....
14:08duncanmhmm
14:08chousermrBliss: nice, I keep forgetting max-key
14:08chouser(map-indexed vector [1 3 2])
14:08duncanmoh
14:08duncanmi know nothing about these functions, are they new?
14:09chouser,(:added (meta #'max-key))
14:09clojurebot"1.0"
14:09chouser,(:added (meta #'map-indexed))
14:09clojurebot"1.2"
14:12@rhickeycemerick: that's great. Please also consider WebSockets protocol
14:13dnolen+1 for WebSockets
14:13cemerickrhickey: HTTP was going to be my first thought, but sure. Maybe I can twist someone's arm to look at that, as I've never touched them. Stacking stuff on top of what's there should be totally straightforward in any case.
14:13cemerickthat == websockets
14:14ninjuddcemerick: yeah, franks42 suggested websockets earlier too. not sure if i forwarded it along or not
14:15cemerickI think this is the first I've heard of it; I'll add it to the design notes just so its not forgotten.
14:15ninjuddwho can?
14:16hiredmanhaskellers
14:16hiredmanclojurebot: rimshot
14:16clojurebotExcuse me?
14:18@rhickeyhttp://en.wikipedia.org/wiki/WebSockets
14:19hiredmanit seems like something like websockets would be better added as a proxy clientish thing
14:19@rhickeyhiredman: why?
14:20hiredmanbecause not everyone wants to embed an http server
14:21@rhickeyhiredman: you don't need an HTTP server for WebSockets
14:22@rhickeyjust sockets
14:22cemerickhuh, so that HTTP-esque stuff is bogus.
14:23@rhickeyIt just has an HTTP compatible handshake
14:23@rhickeyso you can initiate it via http from browsers
14:23cemerickBrowsers: keeping security guys in full-employment since 1995.
14:24@rhickeybut it is a lot easier to send character-by-character data to the reader via websockets than via HTTP
14:25cemerickyeah, it looks like it'll be totally reasonable.
14:35scottjrhickey: why isn't :or supported in seq destructuring?
14:38ohpauleezDoes anyone have a good script example for lein's :repl-init-script
14:59rickmodeAs I develop using datatypes (defrecord in my case) I run into a quirk where I create a record, later recompile the defrecord, then use the old record. This old record's methods fail when called and instance? checks no longer work. Now, I presume this is because the underlying class has been recreated and so is simply not the same class as before, but this does seem to be a pain for long running processes.
15:04chousereven when using records it may make sense to use extend instead of implementing the methods inline in the defrecord
15:04rickmodeIs this a side effect of using swank? I assume it would happen with any REPL. I wonder if datatypes could be "fixed" similar to Eclipse's hot code replacement. Am I nuts?
15:04rickmodechouser: would that effectively fix the issue?
15:05kotarakrickmode: I don't think so.
15:05kotarakBecause the class changes.
15:05kotarakAh.
15:05kotarakMaybe yes.
15:05hiredmanyou shouldn't be changing datatypes in a long running process
15:05chouserhm... no, but it would reduce the reasons for re-evaluating the defrecord to only when the fields change.
15:05kotarakThe protocol still knows the old one.
15:06rickmodekotarak: so satisfies? will work and the protocol would be backwards compatible?
15:06chouserhm, actually if you re-eval the extend-type as well, the protocol will know about both
15:06kotarakmaybe, haven't tested it. But when chouser says "no" ....
15:08chouserwhen you eval defrecord again, you're getting a completely different class with the same name
15:09chouserusing extend means you need to do that less often.
15:09rickmodechouser, kotarak: I'm thinking I should put protocols and defrecords (and the like) in separate source files so minimize the problem, though it would be nice if that wasn't needed
15:14lancepantzanyone know what time the conj ends on saturday?
15:15lancepantznm, its on the ticket
15:15lancepantz5:30
15:17raek(off topic: YECH! the colors of ERC on emacs in a terminal are *horrible*... anyone here have any advice?)
15:19defnraek: color-theme
15:19defnraek: make sure your terminal has support for 256colors
15:19bhenryhttp://alexpogosyan.com/color-theme-creator/
15:20defnmeh screw those
15:20defnjust use zenburn :)
15:20lancepantzwombat!
15:20bhenryi did until i found that. too much yellow in zenburn
15:20lancepantzi ported wombat from vim, it was hell though
15:20bhenry(if memory serves me correctly)
15:21lancepantzthat site is awesome
15:23scottjlancepantz: too bad, someone did that long long ago
15:23scottjwell a couple years ago, not that long I guess
15:23lancepantz:/
15:27kotarakHow do I find out, where boxing is going on?
15:29dnolenkotarak: i think jvisualvm will show you
15:33defnAnyone know of a directory watcher written in Clojure?
15:33defnSomething I can have execute some code everytime something in a diretory changes?
15:36kotarakdnolen: wow. jvisualvm is pretty self-explaining. Just fired it up. Connected to my session. And started profiling. Cool.
15:36bhenrydefn: start here? http://github.com/wilkes/Kibitz/blob/master/src/kibitz/core.clj it looks like it wouldn't be very hard to pass a function to watch-project
15:38defnbhenry: yeah I was looking at that, just wansn't initially very enthused given his note on the README
15:39defnbhenry: ill try 'er out though
15:39defnthanks
16:03defnhmph, looks like most of kibbits is Stuart S's handywork
16:03ninjuddcemerick: i heard a rumor you're interested in writing some cake plugins for NSIS, ikvm, and proguard ;)
16:04cemerickha!
16:04cemerick:-)
16:04ninjuddwouldn't be too hard. i'd recommend just wrapping the maven tasks ;-)
16:04cemericklol
16:04ninjuddno point in reimplementing something like that
16:04cemerickindeed
16:05ninjuddi bet you could do it in less lines of code than your current pom.xml :P
16:06cemerickalmost surely not -- if so, then polyglot maven wouldn't have been much of a project
16:06ninjuddhow many lines is you pom.xml?
16:07cemerick(not that LoC is a worthwhile metric in either direction)
16:07cemerickMy largest pom is 400 lines.
16:07ninjuddoh, that's too easy
16:08cemerickI beg you not to try :-)
16:08ninjuddof course not, you would be able to do it way quicker
16:09cemericknever gonna happen
16:09LauJensenGreat, this is the kind of warfare I was hoping to jump into, good evening everybody! :)
16:09cemerickninjudd: polyglot maven is sitting right over *there*, and I still don't use it because then my pom.clj files would be useless with all tools.
16:10ninjuddso you're addicted to the tools, huh?
16:10cemerickyeah, eclipse and hudson are nifty
16:11cemerickAnd I'm not an sexpr zealot, so I've little patience with rebuilding things just so I can change a bunch of <>'s to ()'s.
16:11ninjuddcan't do a let in xml though
16:12ninjuddor map, reduce, et. al
16:12AWizzArdcemerick: before I look at the sources, what is the transporter for communication in your nREPL? Just some Sockets? http + rest? soap?
16:12cemerickHrm, right, because I want that in my build definitions. ;-)
16:12ninjuddcemerick: you prefer copy and paste?
16:12cemerickAWizzArd: Very simple character-based protocol.
16:13cemerickninjudd: I like not having to run all possible goals/tasks/whatever in a build in order to know exactly what it's going to do.
16:13ninjuddme too! that's exactly why cake uses a dependency-based model
16:14cemericknah, that's a red-herring. I did ant for years (and still do, very occasionally). Thanks, but no thanks. :-)
16:15cemerickThe point of a declarative build process is that one has the potential of determining exactly what will be done, without running the thing. Not so if you can inject arbitrary code into arbitrary stages/phases/whatever.
16:16cemerickThat breaks down a little when you consider ant tasks or exec's in pom files, but buyer beware in those cases.
16:17ninjuddthat breaks down a little when you have 400 line pom.xml files ;-)
16:18ninjuddi certainly cannot look at 400 lines of code and know what it is going to do.
16:18cemericknot at all true -- I can open that thing, and see exactly what goals are going to be run for any given phase in this nifty pom viewer in eclipse
16:20ninjuddi don't buy that. i think you're just more familiar with maven and the tools you use
16:22cemerickvs. what? I'm pretty well-versed in my build tools.
16:23ninjuddvs. cake/lein/ant/whatever
16:24bobo_one thing i love with maven, is when editing a sourcefile. and netbeans cant find the class. it can search maven and add it to dependencies.
16:24bobo_havent seen that with anything else
16:24ninjuddbobo_: doesn't lein-search provide something similar?
16:24cemerickninjudd: and make and gradle and scons and sbt...
16:25bobo_ninjudd: well... kinda, but not as smooth. still have to search for it then?
16:25cemerickMany things can be said of me, but unacquainted with tools is not one of them. :-)
16:26cemerickrake and buildr are two I've never used
16:26defnvia SOAP! via SOAP!
16:26ninjuddi didn't say that. i used the word addicted i think :p
16:26shoover_c'mon guys, give poor cemerick a break. he was in here talking about this stuff 10 hours ago
16:26cemerickshoover_: I'm the local build tool piñata
16:27ninjuddhey defn, what ever happened to the cake-search plugin you were working on?
16:27shoover_cemerick: I'm my own IRC unicode decoder, apparently
16:27LauJensencemerick: I hope you don't mind these talks, I think they're educational
16:27cemerickheh
16:27cemericknot AFAICT
16:28cemerickmost people in the clojure world appear to have a serious blub blind spot in this particular department
16:28bobo_build tools is almost as sensitive as vim vs emacs and dynamic vs static typing
16:29ohpauleezbobo_: My mother was a saint!!
16:29ohpauleez:)
16:29AWizzArdcemerick: wait, I didn't follow the discussion, but did someone mention Maven? ;)
16:29lancepantzoh jeesus
16:29cemerickMy life the past couple of days, it seems :-/
16:29lancepantzi just got done reading the logs from this discussion this morning
16:29ohpauleezI'm waiting for #clojure to turn into a bar brawl so LauJensen and I can settle the vim vs emacs conversation, the celebrate our friendship over awesomewm
16:29lancepantznow scrolling back through my irc buffer, same thing
16:29lancepantzthere's probably going to be multiple fights at the conj :)
16:30bobo_i have to get a i love maven t-short for conj-labs
16:30cemericklancepantz: I doubt that
16:30bobo_*t-shirt
16:30LauJensenhehe, ohpauleez the Vim Vs Emacs discussion was settled years ago by Emacs, its just that the Vim users haven't realized that yet
16:30lancepantz</sarcasm> :)
16:30ohpauleeztrue talk, RMS uses vim inside emacs, which he uses as a psuedo screen
16:30LauJensenbobo_: Alright, but you understand I won't be able to guarantee your safety though, right? :)
16:30cemericklancepantz: nah, I think you're entirely correct, I'm just being hopeful
16:31bobo_LauJensen: :-) il just login to awesome and start emacs.
16:31ohpauleezbobo_: You'll be safe
16:31ohpauleezbarely
16:31ohpauleezbut it should work
16:31bobo_or i can boot windows and start netbeans
16:31LauJensenbobo_: You can log into whatever you want, we'll primarily be working with Emacs and Eclipse, but there's freedom to use whatever you want
16:32bobo_LauJensen: yeh im just teasing you :-)
16:32bobo_im one of thoose that dont care what im using.
16:32cemerickLauJensen: you *allow* Eclipse? :-O
16:32LauJensencemerick: We even support it :)
16:32bobo_"We" must be cgrand? :-)
16:32LauJensencgrand has put in alot of work on the Eclipse plugin
16:32LauJensenbobo_: yea, like I said, "we" :)
16:32cemerickLauJensen: The churck of emacs will certainly excommunicate you for being associated with such subversive activities.
16:32bobo_:-)
16:33LauJensencemerick: Im not a fanatic, I simply use Emacs because its superior to the alternatives, if that position changes I'll likely change with it
16:34cemerickI'm entirely unfamiliar with this well-reasoned, pragmatic LauJensen ;-)
16:34LauJensencemerick: riight, when have I not claimed that Emacs is superior?
16:34ninjuddi use emacs because i will never be able to forget the command shortcuts. they were drilled into my head at such a formative age
16:36LauJensenninjudd: Do you also get disappointed in Thunderbird or Firefox when you hit C-k and nothing happens? :)
16:36lancepantzdoes in chrome!
16:36bobo_indeed!
16:37rich_holygoatI am wedded to Vimperator
16:37bobo_actualy, it goes to the searchfield in firefox! :-)
16:37rich_holygoatkeep hitting 't' and 'd' in Safari :D
16:38bobo_oh, floss weekly this week was just released, and its about emacs!
16:38mrBlissbobo_: Just started to download it :-) about org-mode
16:42plathropI think I'm missing something obvious
16:42plathropI've been iterating over some code in emacs/swank
16:42plathropsaved my progress in a file because I needed to restart my computer
16:43plathropNow I've come back to it and I don't want to go over every form and use eval-last-sexp to load it into swank
16:43plathropBut (load "my-file") doesn't seem to load all the code
16:43bobo_M-x slime-eval-buffer
16:44plathropthanks, bobo_ I knew it was something simple
16:44bobo_:-)
16:51ninjuddLauJensen: C-k works for me in firefox
16:51LauJensenk, it was just an example, I use Conkeror so I dont remember firefoxs bindings :)
16:52ninjuddmay be an OS X thing
16:53bhenryif i pass a keyword into a function can i turn it into :keyword.dotsomething ?
16:54bhenryie (let [x :x] (something here returns :x.extended))
16:56briancarper,(let [x :x] (keyword (str (name x) ".extended")))
16:56clojurebot:x.extended
16:56bhenrybriancarper: thanks that's what i just tried.
17:05amalloyplathrop: C-c C-k works too, and takes less typing than this M-x blah blah nonsense
17:11plathropWhat happened to the clojure.string docs?
17:19jjidocan I assign three values in a vector to three variables at once? Like (let [a, b, c [3, 2, 1]] ...)
17:20dnolenjjido: yup
17:20dnolen,(let [[a b c] [1 2 3]] (println a b c))
17:20clojurebot1 2 3
17:20jjidogreat :)
17:29amalloyjjido: you don't even need them to be in a vector already, if this is more convenient for you:
17:29amalloy,(let [f (fn [& [a b c]] (println a b c))] (f 4 6 8))
17:29clojurebot4 6 8
17:30ohpauleezjjido: that above example is called destructuring
17:31ohpauleezit's used extensively in clojure, if you need to dig up more docs on it
17:31ohpauleezyou can also do it with maps (which is very helpful)
17:35amalloy,(let [{name :first} {:last 'smith, :first 'david}] name)
17:35clojurebotdavid
18:50lancepantzanyone know if there is a way to get the arity of a lambda?
18:58replacalancepantz: no, I don't believe there is
18:58technomancylancepantz: it seems like a bug that metadata on fns is very sketchy
18:58lancepantzyeah, i expected meta to do it, returns nil though
18:59amalloylancepantz: meta of a defn gets you arglists, but meta of a lambda doesn't seem to
18:59replacatechnomancy: can you tell me how to install my own version of clojure for lein to use?
18:59technomancyreally, nil? I get {:line 1}
18:59technomancyreplaca: you mean to make lein itself use a version other than it uses out of the box?
19:00ninjudd,(contains? (transient #{1 2 3}) 3)
19:00clojurebotfalse
19:00ninjuddhuh?
19:00replacatechnomancy: no, so that my program uses a custom version that I made myself
19:00lancepantz,(meta #(println "hi"))
19:00clojurebotnil
19:00amalloy,(some #{3} (transient #{1 2 3}))
19:00clojurebotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.PersistentHashSet$TransientHashSet
19:01technomancyreplaca: oh, I see. I would change the groupid in clojure's own pom.xml and mvn install from there, then make your project.clj match the new groupid
19:01ninjudd,((transient #{1 2 3}) 3)
19:01clojurebot3
19:01hsuhhey... whats the current state of enclojure vs emacs+swank+slime ?
19:01ninjuddi guess i can't use contains? for transients
19:01replacatechnomancy: cool. what do the args to mvn install look like?
19:02replacatechnomancy: does it just look at ./pom.xml?
19:02technomancyreplaca: I'm not sure; I haven't built clojure from source in over a year
19:02technomancyprobably
19:02replacatechnomancy: believe it or not, I think I just found a showstopper bug in keywords
19:03ohpauleezninjudd: How are you using the transient?
19:03replacawant to play with it and understand it better before I file
19:03ohpauleezI'm having a hard time to think of a case where you'd want to do that
19:03replaca(and also fix my program :-))
19:04ninjuddohpauleez: why does one ever use transients? to make constructing large, persistent data structures faster
19:04ohpauleezright, typically in a loop
19:05ninjuddcorrect
19:05ohpauleezbut I can't think why end that process using a contains? on the collect itself
19:05ohpauleeztypically it's a function return or some other value that is used as a sentinel to return
19:06ninjuddohpauleez: are you arguing that contains? shouldn't work on a transient because you can't think of why i would need it?
19:06ohpauleezhaha, I'm not arguing for anything, I just couldn't come up with a use-case for using contains? on a transient
19:07ninjuddohpauleez: i doing a breadth-first search of a large graph
19:07ninjuddthe result of that search is an object which encapsulates all the paths that were found.
19:08ninjuddto avoid infinite loops, i have to check if a node has already been traversed, thus i need to call contains? on a transient
19:09amalloyninjudd: it looks like clojure.lang.RT.contains() just checks whether something is an IPersistentSet
19:09ohpauleezthe only way I can think of making that work is persistent!, checking, and transient'ing again
19:09ninjuddohpauleez: that would kill performance
19:09ohpauleeztotally
19:09ohpauleezcompletely defeats the purpose
19:09ninjudd,(get (transient #{1 2 3}) 3)
19:09clojurebotnil
19:10ninjuddget also doesn't work on transients
19:10ohpauleez,(get (transient #{1 2 3}) 0)
19:10clojurebotnil
19:10ninjudd,(get-in {:foo (transient #{1 2 3})} [:foo 3])
19:10clojurebotnil
19:10ninjuddand get-in
19:10ohpauleezright, this is very atypical usage
19:11ninjuddohpauleez: i disagree
19:11ohpauleezcan you gist the block? I'd totally love to take a look
19:11ninjudd;)
19:11amalloyninjudd: sounds like a bug. ITransientSet has get/contains methods, but RT doesn't actually invoke them since it's using (instanceof) instead of polymorphism
19:12ninjuddohpauleez: http://github.com/ninjudd/jiraph/blob/deftype/src/jiraph/walk.clj
19:12ohpauleezthanks
19:12ninjuddi am changing :includes? from a map to a set
19:13ninjuddwhich is what is causing the breakage
19:13ninjuddhaven't checked the broken code in though
19:15ninjuddohpauleez: i guess you're right about it being uncommon, otherwise someone would have found the bug already
19:16ohpauleezninjudd: yeah, I'm gisting you a typical use of transients
19:16ohpauleezyou usually transient in the let block that does the loop
19:17ohpauleezhttp://gist.github.com/594584
19:17ninjuddohpauleez: that's what i'm doing. look at init-walk, which is called in the binding part of the loop
19:22defnanyone here ever remote pair?
19:22defnanyone here ever pair on clojure before?
19:23ohpauleezdefn, as in pair programming?
19:23defnohpauleez: yea
19:23ohpauleezyes, I have
19:23ohpauleeza few times
19:23ohpauleezin person and remotely
19:23defni dont know anyone around my area who does any clojure, and i know precious few who pair
19:23technomancydefn: every day
19:23defnid like to get together and pair on a project some time
19:24ninjudddefn: where are you?
19:24defnMadison, WI
19:24ohpauleezdefn: I use screen often to pair remotely
19:25ohpauleezdefn: but I'd totally jump into a one-off channel on IRC, on screen, or PM a lot of gists
19:25defnohpauleez: use Emacs? http://github.com/scymtym/rudel
19:25defnohpauleez: as in, you'd be interested in pairing sometime?
19:26technomancydefn: I've found tmux/screen nicer than rudel if you're sharing more than one buffer
19:26ohpauleezI'm fine in both in emacs and vim. I use vim more, but that looks like a cool project
19:26defntechnomancy: yeah i was looking at a link from HN today about tmux technomancy
19:26defnsorry for the double nick highlight, terrible [TAB] habit
19:27defnyeah ohpauleez -- i use vim at work mostly because the vim-rails bundle is far and away better than anything ive seen anyone come up with for Emacs
19:27defnthere's just no comparison
19:27defnbut i prefer emacs -- im not one of those vim-mode on the CL guys -- give me set -o emacs please
19:28defntechnomancy: do you have any dotfiles or configuration stuff hanging out in your dotfiles related to tmux/screen for pairing?
19:28technomancydefn: sure, http://p.hagelb.org/.tmux.conf
19:28defnwin.
19:29defntechnomancy: wanna let me try it out on you? :D
19:30ninjuddi keep meaning to switch to tmux
19:31technomancydefn: already pairing w/ someone; sorry
19:31technomancydefn: you could join our seajure meetings; they're held in a tmux session. =)
19:31ohpauleezdefn: rad, but yeah holler if you want another set of eyes or pairing
19:31ohpauleeztechnomancy: for real?!
19:31ohpauleezI'm in Eugene, OR and keep meaning to get on the train and head up for a meeting
19:33defntechnomancy: no problem -- is that info on the seajure page?
19:33defnohpauleez: im going to hold you to that.
19:33technomancywell it wouldn't be that useful without voip though
19:33defnohpauleez: are you interested in pairing tomorrow?
19:33defni just spent all day pairing and am a little worn out
19:35ninjuddohpauleez, amalloy: thanks. i'm going to post this bug to clojure-dev
19:35ohpauleezninjudd: cool, sorry I couldn't be more of a help
19:44ninjuddohpauleez: no worries. for now i'm just using the alternate sytax
19:44ninjudd,((transient #{1 2 3}) 3)
19:44clojurebot3
20:07dreishWell this is unpleasant. Leiningen can't build an uberjar for a project that uses native-deps, since it cleans up and does lein deps, but not lein native-deps, before trying to make the jar.
20:08technomancydreish: you can do a :disable-implicit-clean in project.clj
20:08dreishtechnomancy: That was easy.
20:08technomancy=)
20:09technomancyyou could also add-hook on the deps task to run native-deps along with deps
20:09technomancybut this is easier
20:10dreishYes, and now I have an uberjar.
20:10dreishThanks.
20:10dnolendreish: I don't think anyone's try to create a jar that contains native deps. From what I understand something fancy needs to be done to load native libs out of jar. Could be wrong tho.
20:10dreishI'll look into the add-hook later. I had a feeling it would be one or the other. Not too surprised it's both. :)
20:10dnolens/try/tried
20:11dreishdnolen: Really? I could have sworn it worked a couple of versions ago, since I thought I'd run an uberjar that was doing a little test GL thing. I noticed it broke earlier this week.
20:11dnolendreish: if you get it working, or if it just works, let me know :)
20:12dreishIt does not work.
20:12dreishI could have sworn it used to.
20:12ninjudddnolen: i implemented it, but there is a bug in clojure that prevents it from working correctly without a patch
20:13ninjuddhttp://github.com/ninjudd/classlojure
20:13dnolenninjudd: oh yeah, I remember you talking about that.
20:13ninjuddcemerick actually blocked the patch because he said "it probably doesn't work in netbeans"
20:13dnolenhuh
20:14ninjuddwasted a whole weekend trying to recreate the bug that he thought my patch would cause ;-)
20:14ninjuddi'm still planning to punch him for that when i see him...
20:15dnolenheh, well perhaps it should be reopened. Did you try the patched jar with Netbeans?
20:16ninjuddi did, and couldn't cause the bug. but netbeans is so confusing, i don't really know if my test was valid
20:16ninjuddbut, cake supports native deps in jars just fine
20:16dnolendo you have a link to the ticket/patch, I'll try to check this out this weekend.
20:17dnolenninjudd:^
20:17ninjuddautomatically extracts them and sets your library path and everything
20:17dnolenninjudd: yeah I've looked at classlojure
20:17dreishI guess I'll be trying cake this weekend.
20:17ninjudddnolen: http://groups.google.com/group/clojure-dev/browse_thread/thread/f61b550abf7f9c52/da25ba7e31b9431c?q=
20:17dnolenninjudd: thx
20:17ninjuddi remember cemerick said "this is something your tools should handle for you!"
20:18ninjuddhe didn't realize i was going to write a build tool though rather than use maven ;-)
20:18lancepantzlol
20:21defnhaters gonna hate
20:22defnisn't chas the guy who was all about polyglot build system and all of that, saying leiningen et al were a waste of time?
20:22ninjuddaye
20:22defnobviously not the guy who should be reviewing your patch then :)
20:23defnconflict of interest and such
20:23ninjuddi wouldn't say he's a hater though. just opinionated
20:23defnwell said -- im down with opinionated software
20:23defnim just /more/ down with it when i agree with the opinion
20:23ninjuddhehe
20:24ninjuddso defn, you're almost done with your cake-search plugin, right?
20:24defn:X
20:25ninjuddmaybe we can use tmux to pair on it one of these days ;-)
20:25defnninjudd: that'd be cool actually
20:26defnim deeply introverted in certain ways
20:26ninjudddefn: you going to clojure-conj?
20:26defnbut having a conversation about technical stuff is important to me
20:26defnsomething that has been hard with clojure given the community in my area
20:26defnninjudd: i havent committed yes or no yet
20:26defnim going to strange loop
20:27defnim not currently employed and am running on fumes -- unless i can get a scholarship like ole Raynes to head down and hang out I think I may be out of luck
20:30defn'twould be awful nice to go, though -- i've spent a lot of time on disclojure, planet.clojure.in, reddit.com/r/clojure, groups.google.com/group/clojure, and so on over the last nearly two years and would like to meet some of you jerks
20:30defnninjudd: i take it you're going?
20:30lancepantzhe just left, but yeah, we're both going
20:31replacatechnomancy: doing an "ant ci-build" seemed to do the trick (mvn install just created an empty file)
20:31defnlancepantz: cool
20:32defnlancepantz: strange loop is actually my first conference ever
20:32lancepantzyeah, i've never been to one either
20:32defngoing alone to a conf makes me sort of nervous
20:32defnive tried to get friends excited in clojure but im their weird friend who they dont invite to dinner parties for fear I bring up the STM
20:33lancepantzheh, well atleast it sounds like your friends program atleast
20:33defndebatable
20:34defnsome of them get paid to write code but don't get my stamp of approval as being real programmers
20:35defnwriting PHP web apps until the end of time is not being a programmer -- doing .NET for an insurance company for 10 years is not programming -- they work in environments where "design" and all of that are dirty words, things that are a "waste of time", mostly because they dont know how to do them
20:35defn</rant>
20:35clojurebothave you heard about the bird? is<reply>The bird, bird, bird, the bird is the word.
20:35technomancyclojurebot: you crack me up sometimes
20:35clojurebotExcuse me?
20:36defntrying to imitate an infobot
20:36defnfor shame, clojurebot... for shame...
20:39defndo conference putter-onner-guys prohibit the taping of talks at conferences?
20:39defni ask because ive seen mention of like 10 rhickey talks but never is there any video
20:40hiredmanclojurebot: tv?
20:40clojurebotblip.tv is http://clojure.blip.tv/
21:28alexyklancepantz: WTF is *shell-env* anyway? :)
21:29lancepantza map of your bash environment
21:29lancepantzdnolen requested it for the textmate bundle
21:29alexyklancepantz: I know, you renamed *env* to it and it screwed up that bundle! It used to be *env*, and Unix uses env, and Emacs ENV, and it's always $ENV!
21:29alexyk:)
21:30alexykso now we found out and it's *shell-env* everywhere and it's ugly! :)
21:30lancepantzi wanted to use *env* for a more important feature
21:30alexyklancepantz: like what?
21:31alexykthere's nothing more important on a Unix system than ENV. I dare you to search till the end of the Universe and find anything more important!
21:32alexykand JVM has no env anyway. So rename it back! :)
21:32lancepantzi added an environment map the the project.clj
21:32alexykhmm...
21:32alexykso you'd have :env?
21:33lancepantzso :environment{:qa {:foo "bar"}} sets *env* to {:foo "bar"} when you set env=qa in your your .cake/config
21:33alexykcemerick: when you see *env*, what comes to mind?
21:34cemerickshit, who am I gonna piss off? :-)
21:34alexykcemerick: nobody, it's just a test
21:34alexykdon't look up
21:35cemericksomething named *env* make me think someone made a bad design decision.
21:35ninjuddha!
21:36lancepantzso *shell-env* would make more sense, right?
21:36cemerickYup, I definitely pissed someone off.
21:40ninjudda bad design decision would have been naming alexyk's *ENV* and lancepantz's *env*
21:40alexykcemerick: wow, you deserve to represent UMass in Confgress!
21:40alexykConjgress
21:41ninjuddwhich lancepantz talked me out of
21:41alexykI meant Western Mass
21:41cemerickConjgress, huh?
21:41alexyklancepantz's *env* is just *fake-env*
21:41alexykor *presets*
21:42alexykor *args-alist* or some such; it's not really an env
21:42alexykenv is shared by all shell things
21:42lancepantzi think cemerick has a good point, maybe *shell-env* and *cake-env* would make sense
21:42ninjuddyes it is *deploy-env*
21:43ninjuddalexyk: doesn't understand what it is for
21:43alexykninjudd: who doesn't?
21:43ninjuddcake/*cake-env* huh?
21:44ninjuddveto
21:44ninjuddalexyk: you
21:44alexykninjudd: I understand, but your *env* is not set by anything but cake right
21:45ninjuddit is for deployment environments.. equivalent to RAILS_ENV
21:46ninjuddneither is set by anything but cake
21:46alexykyeah, Rails is to blame, DHH personally :)
21:47ninjuddalexyk: come up with a better name for deployment environment and you can have *env* back
21:48alexykok I'll ponder it over some fishing on the weekend :)
21:48ninjuddok
21:49ninjuddcan't have the word cake or lancepantz in it
21:49cemerickI have no idea what the topic is really, but any quasi-global dumping-ground environment is generally bad, regardless of what it's named.
21:49alexykcemerick: blame Unix! it's useful for decades not for nothing
21:50ninjuddi believe maven calls them properties?
21:50cemerickSure, but you're using a programming language with top-notch FP facilities and data structures to go along with it. If you've got a clean slate, why not use 'em?
21:51alexykcemerick: you live and die in an env. Windows has env and Unix too... "Reality is something which doesn't stop to exist when you stop believing in it."
21:52cemerickbah. Compojure / ring eliminated the notion of global contexts for web applications.
21:52cemerickThere *is* an environment, but it can be encapsulated, and restricted to local fn scope.
21:52cemerickMakes a lot of stuff easier.
21:53ninjuddalexyk and i are talking about two different things
21:53alexykour *env* is to interface cake with TextMate on a Unix platform; an artefact of iterop with the big bad world out there
21:54ninjuddactually, it looks like maven calls them profiles: http://maven.apache.org/guides/introduction/introduction-to-profiles.html
21:55alexykninjudd: aha! cake/*profile* for you
21:56alexykor cake/*maven-profile*
21:56alexyk:)
21:56ninjuddlancepantz: what about *context*?
21:57ninjuddalexyk: maybe we should keep discussions about what to name an obscure cake var in #cake.clj next time
21:57alexykninjudd: sure
21:58cais2002ninjudd: good morning
21:58ninjuddcais2002: good morning
21:58alexykninjudd: thanks for pondering it anyway
21:58alexykthe main thing TM/cake works beautifully
21:59lancepantzi think we can find something more obvious than context
21:59alexyklancepantz: thanks too! you guys are doing a great job, nitpicking is all for sport
22:00cais2002ninjudd: I am a bit confused about how to use cake to do lein jar to exclude .svn folders
22:00lancepantzdont mind at all
22:01ninjuddcais2002: you would use cake instead of lein
22:01ninjuddcake jar
22:01lancepantzi'll let alexyk fish on it :)
22:02lancepantztrying to buy these damn tickets
22:07nroot7Is Actors in clojure have a 1:1 mapping with java threads or is it running on a thread pool ? What is the overhead of creating a actor ?
22:11cemericknroot7: they're agents, not actors; and yes, they use two threadpools. The overhead involved is a single object creation IIRC.
22:14nroot7cemerick: Thanks. also found some reference here http://groups.google.com/group/clojure/browse_thread/thread/2a2b24ffef5d1631
22:17cemericknroot7: Sure; old, but still accurate. I presume you've seen this: http://clojure.org/agents
22:17cemerickThe example gives an example of what the overhead is like.
22:17cemericki.e. essentially none at all
22:21ninjuddalexyk: you can have *env* back. we came up with a better solution
22:22ninjuddand he's gone
22:22ninjuddi don't want him to spend his whole fishing trip thinking of variable names
22:24ninjudddoes memoserv actually work?
22:25ninjuddclojurebot: does memoserv work?
22:26clojurebothttp://haacked.com/images/haacked_com/WindowsLiveWriter/IConfigMapPathIsInaccessibleDueToItsProt_1446B/works-on-my-machine-starburst.png
22:26ninjuddgood enough for me
22:26ninjuddsexpbot, do you agree?
22:28dnolenANN: textmate-clojure, http://blip.tv/file/4160578
22:28nroot7What is the key binding on emacs to execute a line in buffer on the repl ?
22:28lancepantzcongrats dnolen!
22:29amalloynroot7: try C-c C-c
22:30nroot7amalloy : C-c C-c is undefined. I am using clojure box on windows.
22:30amalloyand you're in clojure mode?
22:31dnolenlancepantz: thx! most of the credit goes to other people tho :)
22:31amalloyyou have to be in clojure mode, and have a connected slime/swank session, but after that C-c C-c should work
22:31ninjudddnolen: awesome
22:31hsuhwill i enter a world of pain if i try to develop a site with clojure these days? (needs mosfly file upload & sessions)
22:37cais2002ninjudd: finally managed to exclude .svn folder in lein by modifying jar.clj
22:37amalloyhsuh: i haven't tried it myself, but various #clojure regulars use compojure and seem to still be alive and sane
22:37lancepantzhsuh: compojure is great, but i don't have any experience with the html generation modules
22:39hsuhi read about it, and ring too.... which apparently has a session module
22:39lancepantzcompojure is built on ring, and yeah sessions will probably be pain free
22:39hsuhcool
22:41ninjuddcais2002: ok
22:41dnolenif you're on HN and you like TextMate, upvote por favor, http://news.ycombinator.com/item?id=1722413
22:44hsuhdnolen: por favor?
22:48dnolenhsuh: oh sorry, please
22:50kumarshantanuhi, I need a slightly different merge-with behavior
22:50kumarshantanu,(merge-with vector {:a 10 :b 20} {:a 30 :c 40})
22:50clojurebot{:c 40, :a [10 30], :b 20}
22:51kumarshantanuI need {:c [40], :a [10 30], :b [20]}
22:51kumarshantanuany suggestions?
23:07chouser,(reduce (fn [m [k v]] (assoc m k (conj (m k []) v))) {} (concat {:a 10 :b 20} {:a 30 :c 40}))
23:07clojurebot{:c [40], :b [20], :a [10 30]}
23:07chouser,(apply merge-with concat (map (fn [[k v]] {k (list v)}) (concat {:a 10 :b 20} {:a 30 :c 40})))
23:07clojurebot{:c (40), :b (20), :a (10 30)}
23:08chouserkumarshantanu: a couple options there. hm, I wonder if there's something in contrib
23:09kumarshantanuchouser: thanks, it looks good
23:09chouserI'm sure I've seen a better way, but it's not coming to me.
23:34kumarshantanuchouser: I am using these functions where the keys :a, :b etc are actually maps -- I am getting nth not supported (maybe due to de-structuring?)
23:37amalloykumarshantanu: hard to guess what you're doing wrong without a sample?
23:43kumarshantanuamalloy: right, maybe will post later -- got to rush now :(