2010-09-23
| 00:26 | slyrus | evening |
| 00:31 | defn | I wonder... would anyone cut my head off if I said that Ruby was the OOP version of CL? |
| 00:39 | Raynes | defn: I'll ready the hatchet and the guillotine and allow the CL crew to decide which to use. |
| 00:43 | slyrus | thanks Raynes |
| 00:47 | amalloy | is this feature a recent addition to destructuring, or has it been around a while? |
| 00:47 | amalloy | ,(let [f (fn [& {a :a}] (inc a))] (f :a 10)) |
| 00:47 | clojurebot | 11 |
| 00:47 | amalloy | (i mean the ability to pass keyword arguments without a caller-built map, not the :keys feature in general) |
| 00:48 | Chousuke | It was introduced in 1.2 |
| 00:49 | amalloy | ah, 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:36 | sandGorgon | what is the mycroft inspector ? I cant figure out what it does |
| 02:43 | scottj | sandGorgon: do you know what an inspector is? |
| 02:46 | sandGorgon | scottj, ah.. that would be a negative. I'm a c++ prisoner here - know what valgrind is (sounds similar) |
| 02:47 | scottj | basically it just lets you navigate objects/datastrutures and see their contents. I'm guessing c++ debuggers have something similar |
| 02:48 | scottj | the 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:50 | andyfingerhut | I'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:06 | LauJensen | Good morning all ya'll - We're into C++ now? :) |
| 03:06 | octe | anyone know where i can find an example of parsing xml, transforming it, and outputting new xml? |
| 03:06 | bobo_ | yes, we changed the channel to c++ and php |
| 03:06 | Raynes | Morning. |
| 03:07 | LauJensen | bobo_: sweet, those are almost my two favorite technologies |
| 03:07 | octe | i'm trying to fit clojure.zip clojure.xml and clojure.contrib.zip-filter.xml together in some way but not succeeding :-) |
| 03:07 | clojurebot | vimclojure is state-of-the-art |
| 03:07 | Raynes | LauJensen: Also, ya'll is a combination of "you" and "all", so that all before ya'll wasn't necessary. Get your redneck right. |
| 03:09 | Chousuke | Raynes: I vaguely remember reading that "all ya'll" is actually in use somewhere |
| 03:10 | Chousuke | redundancy in natural languages is nothing new :P |
| 03:10 | Raynes | Chousuke: Seriously? Hrm. |
| 03:10 | LauJensen | Raynes: I've heard it from Americans "all ya'll" |
| 03:10 | LauJensen | Possibly ebonics |
| 03:10 | Raynes | "I heard it from Americans" |
| 03:11 | Raynes | Hehehe. That totally makes it right. ;) |
| 03:11 | LauJensen | octe: I think the very first Clojure project I did read and emitted xml with zip-filter, but Ive long since forgotten how |
| 03:11 | andyfingerhut | http://memphis.about.com/od/midsouthliving/qt/yall.htm |
| 03:11 | LauJensen | andyfingerhut: Nice - Seems I speak better english than Raynes :) |
| 03:12 | Raynes | To be completely and totally honest, I have *never* heard "all y'all" out of a person's mouth in Alabama. Ever. |
| 03:13 | LauJensen | Raynes: No need to make excuses, just accept defeat like a man :) |
| 03:14 | andyfingerhut | No one has heard all of the dialects of English, except perhaps Henry Higgins, and he hated most of them :) |
| 03:14 | LauJensen | I find it difficult to truly hate any other accent than british |
| 03:15 | Chousuke | which british accent? :P |
| 03:15 | LauJensen | hehe, right |
| 03:15 | Chousuke | I actually like them though. |
| 03:15 | Chousuke | some of them are hilarious |
| 03:17 | Chousuke | I'm probably biased though, as I was taught British English at school :P |
| 03:20 | Chousuke | "Sir, why do you have bananas in your ears?" "Pardon?" ... <- A comic like this in our textbook of first year English |
| 03:20 | LauJensen | Our english books made fun of French people, which I was sure to tell Christophe about :) |
| 03:21 | LauJensen | I remember a picture of a french guy who was drowning and exclaiming "I am drowning and noone shall help me!" |
| 03:21 | Chousuke | Then noone arrived and helped him? :P |
| 03:21 | LauJensen | No |
| 03:22 | LauJensen | I guess the indian/american accent can also get a little hard on the ears after a while |
| 03:22 | LauJensen | And one accent which really bites, is the danish/american accent :( |
| 03:25 | octe | LauJensen, my main problem is turning the zipper back into xml.. |
| 03:25 | LauJensen | octe: I think the function is called emit |
| 03:25 | LauJensen | in zip-filter |
| 03:27 | octe | LauJensen, can't find anything like that. there's xml/emit but it doesn't want a zipper |
| 03:28 | amalloy | LauJensen: 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:28 | amalloy | octe: not exactly a clojure tool, but if your task is fairly simple have you tried an xslt? |
| 03:29 | LauJensen | octe: 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:29 | LauJensen | "in the general area of minnesota" -- quote, amalloy |
| 03:29 | LauJensen | gotcha :) |
| 03:30 | amalloy | noooooo |
| 03:30 | octe | i think i got it working http://paste.lisp.org/display/114797 |
| 03:30 | octe | seems kind of convoluted though |
| 03:31 | amalloy | another amusing one is "yins". wiki claims that's only used in pittsburgh, but it's basically the same as y'all |
| 03:36 | Raynes | LauJensen: I concede. I'll be jumping off a bridge now. ;) |
| 03:37 | LauJensen | Raynes: 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:38 | Raynes | The only male in this household is my Uncle. And seeing him get tasered would be amusing enough to warrant inconvenience. |
| 03:38 | LauJensen | haha, man you're cold |
| 03:40 | tomoj | are there uncles named "Uncle"? |
| 03:40 | Raynes | Uncle Tom |
| 03:58 | cais2002 | hi, does anybody use leiningen with subversion? how do u do a lein jar? |
| 03:59 | cais2002 | I got this error msg: Exception in thread "main" java.util.zip.ZipException: duplicate entry: .svn/entries |
| 04:07 | LauJensen | subversion? |
| 04:09 | esj | subversion. |
| 04:10 | LauJensen | like a sub version of git? |
| 04:13 | flintf | hyuk hyuk |
| 04:13 | esj | a politically dangerous one |
| 04:13 | LauJensen | cais2002: I never heard of lein and subversion in the same sentence, what are you doing with it ? |
| 04:14 | cais2002 | my project is using subversion for version control and lein for build |
| 04:14 | LauJensen | ah like that |
| 04:15 | cais2002 | i guess the .svn folder in the resource path conflict with the .svn folder of the root folder of the project.. |
| 04:15 | LauJensen | cais2002: 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:15 | esj | i have used svn successfully in a clojure project before, didn't have such weirdness |
| 04:15 | LauJensen | You might want to check if you can exclude the .svn dir from the build then |
| 04:16 | esj | (then LauJensen put me in a headlock, and enumerated the benefits of git...) |
| 04:16 | LauJensen | esj: come on, did I? :) |
| 04:16 | esj | ok, I might exagarate massively |
| 04:17 | LauJensen | hehe, thought so |
| 04:17 | esj | i figured out I should use git on my own :) |
| 04:17 | LauJensen | Although I prefer git to SVN I definitely wouldn't advocate it as the ultimate version control system |
| 04:17 | esj | "Well.... if its good enough of Linus and Rich...." |
| 04:18 | LauJensen | exactly, 'good enough' |
| 04:18 | esj | oh, perhaps a misunderstanding: "..." were my thoughts at the time of switching. |
| 04:19 | LauJensen | ok |
| 04:19 | bobo_ | git > svn >>>>>> perforce |
| 04:19 | esj | what about Hg != |
| 04:19 | esj | Hg ~= Git ? |
| 04:19 | bobo_ | never used it, but yeh, around git |
| 04:20 | cais2002 | LauJensen: there does not seem to be an option to specify exclusion of folders in th eproject.clj file |
| 04:20 | LauJensen | ok |
| 04:21 | andyfingerhut | and perforce >>>>>>>>>>>>>>>>>>>>> no version control |
| 04:21 | cais2002 | and i just confirmed that it's due to the .svn folder in the resources folder.. |
| 04:21 | LauJensen | esj: 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:21 | esj | cais2002: ah, I did not use a resources directory in my svn project, so could well be. |
| 04:22 | esj | LauJensen: cool, thanks. |
| 04:23 | cais2002 | esj: any quick fix to this? |
| 04:25 | esj | take resources out of version control ? |
| 04:26 | esj | LauJensen: is anybody working on a test coverage tool for clojure ? |
| 04:27 | esj | or have I missed an existing solution ? |
| 04:28 | cais2002 | the 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:28 | cais2002 | rightnow it just accepts all directories |
| 04:29 | esj | cais2002: afraid I don't use leiningen, so couldn't say :( |
| 04:29 | LauJensen | esj: I think stuartsierra is cooking up something |
| 04:30 | esj | LauJensen: that's great, thanks. |
| 04:30 | LauJensen | cais2002: I think it makes sense, I can check with ninjudd who's working on cake and hear what he thinks |
| 04:31 | cais2002 | LauJensen: thanks. I will just update in my local copy of lein first |
| 04:32 | LauJensen | cais2002: Yes start there, then possible migrate to cake in a little while. They're usually überfast in implementing small things like that |
| 04:50 | notsonerdysunny | when I execute the code in http://gist.github.com/593350 and run (ns-publics 'clojuratica-exp.core) I only see the following .... |
| 04:50 | notsonerdysunny | {kernel-link #'clojuratica-exp.core/kernel-link} |
| 04:50 | notsonerdysunny | what happened to the other variables like math-evaluate.. can anybody help? |
| 05:37 | AWizzArd | Can one download the Clojure API docs somewhere as .pdf or .html? |
| 05:40 | scottj | you can probably generate them yourself from the clojure source |
| 05:51 | LauJensen | AWizzArd: Isnt the entire API on a single html page on clojure.org still? |
| 05:54 | raek | I'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:55 | raek | doesn't solaris sh support "export X=y"? |
| 05:56 | flintf | LauJensen: AWizzArd: yea, I think you can just do wget -r http://clojure.github.com/clojure/ |
| 05:56 | flintf | and grab it |
| 05:57 | LauJensen | raek: Im not sure solaris accepts assignment without calling export |
| 05:57 | bobo_ | raek: thinkit has another syntax |
| 05:57 | LauJensen | so... try cake |
| 05:57 | LauJensen | :) |
| 05:57 | bobo_ | solaris is weird |
| 05:57 | raek | indeed |
| 05:57 | bobo_ | one could almost think LauJensen has money invested in cake :-) |
| 05:57 | cgrand | AWizzArd: just switch to the gh-pages in git |
| 05:58 | cgrand | AWizzArd: just switch to the gh-pages *branch* in git |
| 05:58 | raek | LauJensen: line number 3 in the lein script is: export LEIN_VERSION="1.3.1" |
| 05:58 | raek | but yes, cake sounds like a very good idea |
| 05:59 | raek | I'm going to do a getting started with clojure and emacs mini-talk next wednesday |
| 06:00 | LauJensen | In Sweden I suppose, how far away from Cph are you ? |
| 06:01 | raek | and now I'm trying to get the usual stuff working at the computers we're going to use |
| 06:01 | raek | LauJensen: yes, Linköping. 356 km |
| 06:02 | LauJensen | Ok, if you want you can hope on your bike now then, there's a Clojure meeting up 4 hours |
| 06:02 | LauJensen | free snacks I hear :) |
| 06:04 | raek | wouldn't be too complicated to get there some time... not much longer that to my home town |
| 06:04 | bobo_ | think x2000 goes al the way? |
| 06:04 | LauJensen | Its Ative thats hosting it, they're a pretty cool bunch |
| 06:05 | bobo_ | ive done some daytrips to copenhagen, its abit to much travel for one day =) |
| 06:06 | LauJensen | bobo_: Yea, save your strength for Frankfurt :) |
| 06:06 | bobo_ | indeed! |
| 06:10 | raek | found a quick hack to the Solaris sh problem: replace the shebang line in the lein script with #!/usb/bin/bash |
| 06:13 | raek | LauJensen: I promise I'll teach them cake too |
| 06:13 | LauJensen | usb? :) |
| 06:14 | raek | heh. typo. |
| 06:16 | LauJensen | It'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:25 | raek | for the Conj Labs? |
| 06:33 | LauJensen | No I just meant in general |
| 06:33 | LauJensen | There's not a Conj Labs Denmark in the works yet |
| 06:42 | Raynes | raek: Found out whether or not you'll be able to make the Conj yet? |
| 06:43 | raek | nope, not yet |
| 06:48 | LauJensen | Raynes: Looking forward to going? |
| 06:48 | Raynes | LauJensen: Absolutely dreading it. |
| 06:48 | Raynes | ;) |
| 06:48 | Raynes | I'm ecstatic. |
| 06:48 | LauJensen | You're afraid chas will get on your back about not using maven I suppose... I understand |
| 06:49 | Raynes | If cemerick can be stubborn for 15 years about Emacs, I think I'm entitled to the same privileges with maven. :> |
| 06:50 | LauJensen | Raynes: 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:50 | Raynes | Hehe. |
| 06:50 | cemerick | Raynes: indeed you are |
| 06:50 | Raynes | If it requires a passport, it's way too far for me. |
| 06:50 | cemerick | Though you're already using maven via lein and cake. Sorry. |
| 06:50 | LauJensen | whoop, there he is, good morning cemerick :) |
| 06:50 | Raynes | cemerick: Not for long. cake is to use Ivy soon. |
| 06:50 | LauJensen | cemerick: cake is converting to Ivy as we speak |
| 06:51 | cemerick | ...which uses maven repos. *shrug* |
| 06:51 | LauJensen | well, it doesn't really make sense to copy all of those repos just to change the name now does it? :) |
| 06:51 | cemerick | Interesting move, though. |
| 06:52 | cemerick | well, with the repos comes the whole versioning scheme, the semantics of SNAPSHOT, version range semantics, etc. |
| 06:52 | cemerick | Along with the impl. detail of XML pom files.. |
| 06:52 | LauJensen | I 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:53 | cemerick | Interestingly, other people in other contexts wont use lisps because of the sexprs. Meaningless syntax battles are...meaningless. |
| 06:54 | LauJensen | cemerick: I think the arguments against the bloat of XML are valid, those against lisp arent even rational |
| 06:55 | LauJensen | cemerick: 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:55 | cemerick | Representational compactness is the only objection? They're semantically equivalent w.r.t. config files. |
| 06:56 | LauJensen | Its not the only, but its huge |
| 06:56 | cemerick | Hrm. If that's the big one, then clojure should switch to yaml. |
| 06:57 | LauJensen | I 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:58 | scottj | have you considered you might be missing the point? |
| 06:58 | cemerick | Because I don't want to reimplement (or help to reimplement) 10 years or more worth of tools. |
| 06:58 | bobo_ | you can open a maven project in idea, eclipse and netbeans, you can open a lein project in...nothing |
| 06:58 | LauJensen | cemerick: Why not? Isnt it plausible that with 10 years passed, we're able to make much better tools? |
| 06:58 | neotyk | bobo_: I do it in emacs |
| 06:59 | neotyk | and am much happier person now |
| 06:59 | bobo_ | neotyk: ofc, but of the "big tools" many developers are used too. |
| 06:59 | cemerick | LauJensen: There's no "better version" of a build process for building .war files. This stuff is a commodity, and fundamentally uninteresting. |
| 06:59 | scottj | neotyk: ide's give all sorts of features for maven like UI's to tasks and autocompleting of plugins repos etc |
| 06:59 | scottj | that emacs doesn't give to lein |
| 07:00 | LauJensen | bobo_: Its important not to work on the premises of people who are unwilling to learn |
| 07:00 | neotyk | bobo_: it is called enterprise not "big tools" |
| 07:00 | Raynes | Not sure lein requires such tools. |
| 07:00 | neotyk | scottj: I never needed auto completion for project.clj |
| 07:01 | bobo_ | i dont think it does, i love lein. |
| 07:01 | bobo_ | im just saying joe developer might wanna use the ide he is used too |
| 07:01 | scottj | Raynes: requires != would be nice |
| 07:01 | Raynes | Not sure why it would be useful. |
| 07:02 | scottj | Raynes: the same reason autocomplete is useful anywhere |
| 07:02 | neotyk | bobo_: for sure he will like to use his ide |
| 07:02 | Raynes | I don't think I've ever seen a project.clj that was longer than my Emacs frame. |
| 07:02 | neotyk | but I just don't see why would I write pom.xml for clojure project if I can have project.clj |
| 07:02 | Raynes | Maven is a bit of a different beast. |
| 07:03 | cemerick | Raynes: And you've never seen a project.clj file that could do more than 5 or 6 things, either. |
| 07:03 | Raynes | cemerick: I was actually getting to that. |
| 07:03 | Raynes | Like I said: different beasts. |
| 07:03 | Raynes | I'm not defending either one. I'm agnostic. |
| 07:03 | LauJensen | Raynes: I have project.clj which almost 100 lines, but then it does everything except wash my clothes |
| 07:03 | bobo_ | i assume you can mix clojure and java in one project with maven? |
| 07:03 | LauJensen | In 100 lines, maven does "Hello, world!" |
| 07:03 | bobo_ | for example |
| 07:04 | neotyk | bobo_: I do that in http.async.client |
| 07:04 | Raynes | I 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:04 | cemerick | Raynes: Fundamentally, I am as well, but LauJensen enjoys baiting me. :-| |
| 07:05 | LauJensen | hehe, cemerick I dont mean to bait, I just dont understand your reasons for advocating this ancient and verbose beast of a build system |
| 07:05 | cemerick | Raynes: That's a very good perspective. Unfortunately, many others assume reimplementation is a sane strategy. |
| 07:05 | LauJensen | cemerick: after 10 years it is a sane strategy! |
| 07:05 | hoornet | hey guys, about what screencast are you talking about? Can I see it? |
| 07:05 | LauJensen | cemerick: got link to that maven screencast you did? |
| 07:06 | cemerick | http://cemerick.com/2010/03/25/why-using-maven-for-clojure-builds-is-a-no-brainer/ |
| 07:06 | cemerick | hoornet: ^^ |
| 07:06 | LauJensen | 'no brain' thats for sure :) |
| 07:06 | scottj | neotyk: 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:06 | hoornet | thanks a lot. I'll take a look at it |
| 07:07 | neotyk | scottj: point taken, though I only experienced that need in Java projects, as they tend to have a lot of deps |
| 07:07 | cemerick | My 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:08 | LauJensen | cemerick: great, look forward to reading it! |
| 07:08 | cemerick | LauJensen: 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:09 | LauJensen | cemerick: You have a funny way of driving your arguments :) |
| 07:09 | LauJensen | "If you believe that, why not do this completely unrelated thing?" |
| 07:09 | cemerick | Not unrelated at all. I'm simply extending your preference for reimplementation of other tools with flaws to other domains. |
| 07:10 | neotyk | cemerick: 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:10 | LauJensen | cemerick: 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:10 | Raynes | http://raynes.github.com/clj-github/clj-github.gists-api.html Is it just me, or does this page not exist? |
| 07:10 | LauJensen | Raynes: doesnt exist / broken |
| 07:11 | Raynes | Damn. Autodoc has failed. |
| 07:11 | neotyk | ahh, and one more, try working with maven in emacs |
| 07:11 | cemerick | LauJensen: Then I wonder why you think reimplementing all of the plugins and tooling available for maven / XML is so much easier. |
| 07:11 | neotyk | good luck with that one |
| 07:11 | LauJensen | neotyk: no fun? |
| 07:11 | LauJensen | cemerick: Because all of the essentials are already done |
| 07:12 | cemerick | One man's essentials is another man's barest foundation. |
| 07:12 | neotyk | it is nice in IDE, once you decide to go with emacs, no support anymore |
| 07:12 | cemerick | neotyk: That is a good point. Though, I've not yet needed plugin functionality that isn't already available. |
| 07:13 | cemerick | One 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:13 | neotyk | I had written those, and shit this was painfull |
| 07:13 | Raynes | Nosir, I failed me. Forgot to actually commit that particular documentation page. |
| 07:13 | LauJensen | cemerick: I think I need to see more screencasts to appreciate Maven like you do. Screencasts and money |
| 07:14 | cemerick | I 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:14 | LauJensen | Try cake |
| 07:14 | Raynes | Something get this man a magic wand! |
| 07:15 | Raynes | somebody, even |
| 07:15 | neotyk | or 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:16 | scottj | Can't you write pom in several other formats in latest maven? |
| 07:16 | cemerick | LauJensen: 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:16 | neotyk | scottj: you have maven polyglot |
| 07:16 | LauJensen | cemerick: What specifically is it, thats cake missing? |
| 07:16 | cemerick | scottj: Yeah, that's polyglot maven. Certainly on its way. |
| 07:17 | Raynes | I've been writing plugins for cake because ninjudd promises me sweets. :> |
| 07:17 | neotyk | I'm very happy user of leiningen, though must admit that haven't done any commercial project in clojure, yet |
| 07:18 | neotyk | so I don't now really |
| 07:18 | cemerick | LauJensen: for starters, plugins for generating NSIS installers, cross-compilng jar files to .NET assemblies via ikvm, and obfuscation via proguard |
| 07:18 | LauJensen | cemerick: Do you need obfuscation even when not embedding the source ? |
| 07:18 | scottj | I would guess maven has plugins for deploying to android, GAE, hudson, etc |
| 07:19 | Raynes | cemerick: Awww, I was already writing it down. :( |
| 07:19 | cemerick | scottj: well, one doesn't "deploy" to hudson, but yeah, if you've got a pom.xml, your hudson configuration is already done |
| 07:20 | cemerick | LauJensen: Nearly all of my projects have some java components -- and yes, I still obfuscate the clojure classfiles as well. |
| 07:20 | scottj | maven also builds project files for ides I think |
| 07:21 | LauJensen | cemerick: Alright - And all of those items are completed automatically once you initiate the build? |
| 07:21 | cemerick | One can have the project files subsumed by the pom in eclipse and netbeans, if one prefers. NB is smoother in that regard. |
| 07:22 | cemerick | LauJensen: Yes. Then there's the plugins for selenium, and functional and unit tests in general. |
| 07:22 | LauJensen | Ok, whats the Windows story for Maven ? |
| 07:23 | cemerick | windows story? |
| 07:23 | scottj | works great, probably has a million people using it |
| 07:23 | Raynes | "Does it work properly on Windows" |
| 07:23 | scottj | daily |
| 07:23 | cemerick | ah |
| 07:23 | cemerick | I'd wager there's more maven users on windows than on flavors of linux / OS X / bsd |
| 07:23 | LauJensen | Oh ok |
| 07:24 | LauJensen | Interesting |
| 07:35 | esj | cemerick: you nailed it on the head with the tyranny of diversity that we face. |
| 07:36 | cemerick | esj: oh, in yesterday's post? |
| 07:36 | esj | indeed |
| 07:36 | cemerick | If I were brighter, I would have used that far more concise phrasing. :-) |
| 07:36 | joubert | hi, I have a question about JSON-STR in clojure.contrib.json |
| 07:37 | cemerick | ~asking |
| 07:37 | clojurebot | asking is Don't Ask to Ask, Just ASK |
| 07:37 | cemerick | joubert: go for it |
| 07:37 | esj | if I were brighter i'd understand all this stuff :) |
| 07:37 | Raynes | I'd so very much enjoy it if Github would complete it's gist API/documentation. :\ |
| 07:37 | Raynes | I feel so limited. |
| 07:37 | joubert | cemerick: why does JSON-STR add quotes in the resulting string for strings, keywords, and symbols? |
| 07:38 | cemerick | joubert: you mean for keys in maps? |
| 07:39 | joubert | cemerick: I expected (json-str :test) to return "test", but instead "\"test\"" is returned |
| 07:39 | joubert | similarly for strings and symbols |
| 07:39 | Raynes | -> (clojure.contrib.json/json-str :hai) |
| 07:39 | sexpbot | ⟹ "\"hai\"" |
| 07:39 | Raynes | I understand why it does it for strings. Not sure why it would do it for symbols. |
| 07:40 | cemerick | Raynes: because unquoted strings are not allowed in json |
| 07:40 | Raynes | cemerick: Oh, brainfart. |
| 07:40 | cemerick | joubert: ^^ |
| 07:40 | Raynes | I was too busy thinking about Haskell's Show typeclass. |
| 07:41 | cemerick | joubert: BTW, there's no "JSON-STR" function. It's "json-str". :-) |
| 07:41 | joubert | cemerick: ok, thanks |
| 07:41 | Raynes | cemerick: He is probably a CLer. They capitalize everything. |
| 07:41 | cemerick | I figured. :-) |
| 07:41 | cemerick | Clojure: saving caps lock keys worldwide. ;-) |
| 07:42 | joubert | cemerick: :-) the only reason I uppercase it is because then it stands out in a sentence |
| 07:42 | Raynes | Most people use single quotes for that. |
| 07:42 | Raynes | Ohai, I has a question about the 'json-str' function! Halp! :> |
| 07:43 | joubert | raynes: at least we're using hyphenated style instead of camelCase! |
| 07:44 | Raynes | My dash key has never been the same. |
| 08:08 | kumarshantanu | cemerick: I am going to tweet that [caps lock thing] ;-) |
| 08:08 | cemerick | kumarshantanu: have at it :-) |
| 08:14 | LauJensen | cemerick: Gotta duck out, was good reading your post and hearing your specific reasons in here, thanks |
| 09:17 | @chouser | cemerick: that blog post of yours is depressing |
| 09:17 | cemerick | Yeah. I know. :-( |
| 09:17 | Raynes | Morning House. |
| 09:17 | cemerick | chouser: The whole state of software development practice is depressing, IMO. |
| 09:17 | Raynes | Er, chouser. I keep forgetting that your first name isn't Gregory. |
| 09:18 | cemerick | Nearly a fatally-flawed situation, perhaps. |
| 09:18 | kjeldahl | chouser: Link? |
| 09:18 | chouser | http://cemerick.com/2010/09/22/wherein-i-feel-the-pain-of-being-a-generalist/ |
| 09:18 | chouser | Raynes: :-) |
| 09:19 | cemerick | Raynes: chouser is like House in that both are awesome. |
| 09:19 | cemerick | chouser: I think a solid 5-year Englebart-esque program would result in a big leap forward. |
| 09:19 | cemerick | I don't see anyone or any organization stepping up to that, though. |
| 09:20 | chouser | cemerick: 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:20 | cemerick | *maybe* MS research, but they're not so great at pollenating productized versions of things. |
| 09:20 | cemerick | chouser: Absolutely. I could put it together in ~4 min. |
| 09:21 | cemerick | That's after ~10 years of JVM background and ~2 of maven though. |
| 09:21 | alexyk | cemerick: it's by 9:24 am then, right? |
| 09:22 | cemerick | heh |
| 09:22 | chouser | *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:22 | alexyk | ok, have it on my desk by 9:25, to be lenient |
| 09:22 | chouser | but I'm not fully convinced that's the case. |
| 09:23 | alexyk | chouser: are you saying they are *alive*? (gasp) |
| 09:23 | alexyk | oh, dead-on |
| 09:23 | chouser | well "entirely content" might be a stretch, but I would be willing to learn it and wouldn't "waste" time on cake or lein |
| 09:24 | alexyk | chouser: maven is just a right of passage. You have to prove your manliness by subduing it. |
| 09:24 | cemerick | chouser: 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:24 | chouser | cemerick: I don't honestly care all that much about existing players, at least in regards to "mainstream" programmers or "established" IDEs |
| 09:24 | alexyk | the multi-language ability of maven is still what nobody else has |
| 09:25 | chouser | perhaps I should, but I don't. |
| 09:25 | cemerick | chouser: That's an odd sort of communal solipsism. :-| |
| 09:25 | chouser | sorry, don't follow. |
| 09:27 | cemerick | Community 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:27 | chouser | alexyk: ah, so now it's design begins to make sense... |
| 09:27 | cemerick | In any case, the problem is the problem, not the lack of an adequate solution. |
| 09:27 | Raynes | cemerick: I had to look up solipsism. Thank you. What a beautiful word. |
| 09:28 | cemerick | Raynes: Enroll thyself in an epistemology class. You'll be happy for it. |
| 09:28 | chouser | cemerick: 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:29 | cemerick | chouser: 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:29 | chouser | cemerick: so whether they're good decisions or not, you do seem to have discovered my pattern |
| 09:29 | cemerick | And, even though you don't use those 95% tools, you benefit by their dominance. |
| 09:30 | Raynes | chouser: You're such a maverick. I bet you even put ketchup in your scrambled eggs! |
| 09:30 | cemerick | ha |
| 09:30 | cemerick | I used to enjoy grape jelly in my eggs. That was a lifetime ago, though. |
| 09:30 | Raynes | I used to put ketchup in mine. Now I just don't eat scrambled eggs. |
| 09:31 | chouser | but 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:31 | Raynes | Very rarely. Not much of a breakfast person. |
| 09:31 | chouser | I 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:32 | chouser | Some 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:32 | cemerick | Of course, it's a spectrum. Most people tend towards satisficing, insofar as they don't care about the same things you care about. |
| 09:32 | shoover__ | I use Windows and C# and put ketchup on my scrambled eggs. I don't know what that makes me. |
| 09:34 | cemerick | I don't think there's nearly "enough" community around clojure, just to pick on our favorite son. |
| 09:34 | cemerick | But anyway, we've strayed from the point. |
| 09:34 | chouser | I suppose to choose to bet on it, maven does not have to be the best imaginable solution, just the best available. |
| 09:35 | chouser | cemerick: I qualified my "enough". "enough" to be easier to use that it was. growing not shrinking. |
| 09:35 | cemerick | Sure. |
| 09:36 | chouser | My life would be so much easier if *everyone* used linux, ion, clojure, firefox, bash, vim, etc. |
| 09:36 | cemerick | Again, 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:37 | chouser | Raynes: http://en.wikipedia.org/wiki/Ion_%28window_manager%29 |
| 09:39 | Raynes | Aww, a discontinued Window manager. |
| 09:39 | chouser | :-/ |
| 09:39 | Raynes | Discontinued software makes me all emotional. |
| 09:41 | chouser | cemerick: oh, had you said that before? I missed it. |
| 09:41 | chouser | what problem should be solved instead? |
| 09:43 | cemerick | There are a lot of problems. :-) |
| 09:43 | cemerick | Specifically related to build tooling, deployment, etc., the problem is that the mode of deployment dictates packaging. |
| 09:43 | cemerick | I shouldn't have to know about .war files. |
| 09:43 | cemerick | I shouldn't have to know about .app directory structures. |
| 09:43 | cemerick | When 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:46 | cemerick | To 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:46 | cemerick | Bad analogy, but perhaps it gets across. |
| 09:46 | chouser | :-) |
| 09:47 | cemerick | In any case, the situation is not good for people with domain expertise. |
| 09:47 | cemerick | It *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:53 | alexyk | what's the best resource for a comprehensive API docs, including core and contrib? |
| 09:54 | alexyk | with the contrib refactoring and osmosis into core |
| 09:56 | cemerick | alexyk: http://clojure.github.com/clojure/branch-master/index.html and http://clojure.github.com/clojure-contrib/branch-master/index.html |
| 09:56 | cemerick | Those track HEAD AFAIK |
| 09:56 | alexyk | cuuute |
| 09:58 | alexyk | is re-find etc what people use for regexes? Anything like PCRE? |
| 09:58 | clojurebot | max people is 313 |
| 09:59 | cemerick | alexyk: clojure uses java.util.regex.Pattern, which is an excellent PCRE impl. |
| 10:00 | alexyk | cemerick: ok, just checking :) |
| 10:00 | cemerick | Arguably second only to perl, IMO. |
| 10:00 | alexyk | so looks like re-seq is the most clojure-like of them... |
| 10:01 | chouser | re-seq is my most common fn for regex. Then re-find and finally clojure.string/replace |
| 10:19 | kjeldahl | ,(bound? somevarname) |
| 10:19 | clojurebot | java.lang.Exception: Unable to resolve symbol: somevarname in this context |
| 10:19 | chouser | ,(resolve 'somevarname) |
| 10:19 | clojurebot | nil |
| 10:19 | chouser | ,(resolve 'reduce) |
| 10:19 | clojurebot | #'clojure.core/reduce |
| 10:20 | kjeldahl | Thanks! |
| 10:35 | alexyk | chouser: what's the idiomatic way to walk a directory and grep files for a pattern? |
| 10:44 | chouser | (file-seq (java.io.File. "foo")) |
| 10:45 | alexyk | chouser: ok, and then duck-streams and re-seq, right? |
| 10:45 | chouser | I guess you could use duck-streams |
| 10:46 | chouser | (filter #(re-find #".svg" (.getName %)) (file-seq (java.io.File. "/home/chouser/misc/art"))) |
| 10:48 | cemerick | shoover__: it's historical, but serendipitous. See clojure.java.io/file |
| 10:48 | cemerick | mefesto: Awesome. Bring three friends! :-) |
| 10:49 | mefesto | hah |
| 10:49 | alexyk | two of them cute females at that |
| 10:49 | shoover__ | I'm not sure I've ever heard historical, but serendipitous in any context |
| 10:49 | shoover__ | Usually it's just historical |
| 10:51 | alexyk | hmm, there will be two rich hickeys and two chousers at clojure-conj... or their evil twins... |
| 10:51 | chouser | ??? |
| 10:51 | alexyk | and two stu's |
| 10:51 | alexyk | clojure-conj.org, two rows of pics |
| 10:53 | alexyk | (is it just for my Chrome or for everybody?) |
| 10:54 | esj | alexyk: so THAT'S how they're so impossibly productive. |
| 10:55 | cgrand | alexyk: when you zoom out everybody has a "twin" |
| 10:56 | chouser | alexyk: yeah, an odd choice of visual design |
| 10:57 | alexyk | well, now we just have to go there, to meet the twins! :) |
| 10:57 | chouser | he walks like me; he talks like me; he's even got a twin like me |
| 11:06 | l_a_m | does someone use compojure ? |
| 11:06 | l_a_m | i 've got a problem with my defroutes |
| 11:06 | l_a_m | i would like to have an URI like this : "/version?api_key=xxxx" |
| 11:06 | l_a_m | how can i do this ? |
| 11:07 | l_a_m | i try (GET "/version" (params :params) |
| 11:07 | l_a_m | does someone have any idea ? |
| 11:09 | kjeldahl | I_a_m: (ANY "*" [& params] ....) |
| 11:11 | kjeldahl | (ANY "*" [& params] (str (prn-str params))) |
| 11:12 | kjeldahl | I'm still clueless on how to get the whole session stuff and similar using compojure routes like above... |
| 11:15 | bhenry | kjeldahl: i think you want ring middleware. i'm not sure what compojure does to them if anything. look into ring wrap-params |
| 11:17 | bhenry | kjeldahl: er. ring.middleware.keyword-params/wrap-keyword-params |
| 11:19 | l_a_m | kjeldahl: so i can use (GET "/users/:id" [id params] |
| 11:19 | l_a_m | ? |
| 11:25 | kjeldahl | I_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:27 | shoover__ | l_a_m: did you try what you just wrote? It looks right |
| 11:27 | l_a_m | shoover__: yeah i try |
| 11:28 | shoover__ | l_a_m: well, just id. If you want a map of all the params, you may need something different |
| 11:28 | l_a_m | shoover__: and i ve got a NullPointerException |
| 11:29 | shoover__ | 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:29 | l_a_m | it works |
| 11:30 | l_a_m | GET "/users/:id" [id & params] and not : [id params] |
| 11:30 | shoover__ | ok, good |
| 11:31 | shoover__ | If you want to see the entire request, leave off the [] and destructure a map like {{id "id"} :params :as req} |
| 11:31 | shoover__ | (that :as req is untested, just a guess) |
| 11:50 | dnolen | wow, composable regexes, http://github.com/cgrand/regex |
| 11:51 | alexyk | dnolen: cool |
| 11:51 | alexyk | cgrand: grand! :0 |
| 11:53 | cgrand | it's just a toy |
| 12:25 | alexyk | ninjudd: ping |
| 12:32 | amalloy | alexyk: pong (ninja'd! get it?) |
| 12:33 | alexyk | amalloy: but you got no cake! |
| 12:35 | amalloy | :( i'll try it out one of these days |
| 12:36 | alexyk | amalloy: today's the day! cake rocks |
| 12:39 | amalloy | gem install cake? or something trickier? |
| 12:40 | ohpauleez | alexyk: what advantages does cake give you over lein... or is it just how they each approach the problem? |
| 12:43 | amalloy | ohpauleez: it keeps a persistent jvm running in the background to speed up new clojure tasks, for one |
| 12:43 | ohpauleez | lein interactive |
| 12:43 | ohpauleez | The autotest stuff could be cool |
| 12:44 | ohpauleez | but currently my text editor fires that off for me, in a nailgun instance |
| 12:47 | amalloy | alexyk: i notice cake repl says it gives you tab completion, but for me it just types a tab character? |
| 13:20 | Bahman | Hi all! |
| 13:20 | alexyk | amalloy: didn't try tabs yet |
| 13:25 | cemerick | ninjudd: instead of nREPL, what do you think of clojack? (a play on "clojure ack", etc) |
| 13:26 | cemerick | Coming up with project names is straight-up misery. |
| 13:29 | kotarak | On the other hand: a sister site for clojars called clochards? |
| 13:29 | cemerick | kotarak: hrm, good to know |
| 13:29 | kotarak | cemerick: yeah, we live in a global world. |
| 13:30 | ninjudd | cais2002: 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:31 | cemerick | perhaps ackie then :-P |
| 13:31 | cais2002 | ninjudd: thanks for the quick fix. I will check it out tomorrow morning |
| 13:32 | ninjudd | cais2002: no fix necessary ;-) but you're welcome |
| 13:34 | ninjudd | cemerick: clojack is certainly better, but i still prefer portal :> |
| 13:35 | ninjudd | Toiletjure? |
| 13:35 | cemerick | portal will forever mean altavista and such in my head :-/ |
| 13:36 | ninjudd | portal will forever mean shooting a teleporting door into a wall and walking through it to me |
| 13:36 | ninjudd | which is exactly what nREPL aims to do ;) |
| 13:37 | cemerick | heh, bugs bunny-style |
| 13:37 | ninjudd | http://en.wikipedia.org/wiki/Portal_(video_game) |
| 13:37 | cemerick | hrm, maybe it was daffy |
| 13:37 | kotarak | Yeah. These portable holes. Say are kinda cool. |
| 13:37 | bhenry | i've always wanted one of those black circles you could put anywhere to make a hole. |
| 13:37 | kotarak | s/say/they |
| 13:38 | ninjudd | cemerick: you could name it ASHPD |
| 13:38 | ninjudd | which is the technical name for the portal gun (Aperture Science Handheld Portal Device) |
| 13:40 | ninjudd | nice parallel to nailgun too |
| 13:45 | ninjudd | yes, except there is already a ruby lib called railgun |
| 13:46 | ninjudd | and snailgun |
| 13:47 | kotarak | pfff... there is no :or for list destructuring. :( |
| 13:47 | dakrone | snailgun? do you send nailgun requests via snail-mail? |
| 13:50 | ninjudd | dakrone: something like that |
| 13:54 | scottj | kotarak: yeah I've wanted that before too |
| 13:54 | cgrand | kotarak: if you are destructuring a vector you can use :or :-) |
| 13:55 | kotarak | Hmm.. I thought I *was* destructuring a vector. |
| 13:55 | kotarak | Lemme check again. |
| 13:55 | kotarak | (Maybe I tested with a list...) |
| 13:55 | cgrand | '(let [{a 0 b 1 :or {b 43}} (seq [42])] [a b]) |
| 13:56 | cgrand | ,(let [{a 0 b 1 :or {b 43}} (seq [42])] [a b]) |
| 13:56 | clojurebot | java.lang.IllegalArgumentException: No value supplied for key: 42 |
| 13:56 | cgrand | don't work but |
| 13:56 | cgrand | ,(let [{a 0 b 1 :or {b 43}} [42]] [a b]) |
| 13:56 | clojurebot | [42 43] |
| 13:56 | kotarak | argh |
| 13:56 | cgrand | not pretty and brittle, you are warned |
| 13:56 | kotarak | ok |
| 13:57 | kotarak | Well. This whole code is not pretty. But it reduces runtime by a factor of 3. :] |
| 13:57 | ohpauleez | cemerick: I just looked at nREPL for the first time right now... I just did a similar thing using aleph |
| 13:57 | ohpauleez | but am now moving my focus to net-ns, a remote ns system for clojure |
| 13:57 | cemerick | "remote ns system"? |
| 13:58 | ohpauleez | an ns like macro that lets you :expose :use-remote, etc |
| 13:58 | kotarak | cgrand: btw: I'm absoliutely happy, that I got into fighting distance to the vector. :) |
| 13:59 | ohpauleez | :use-remote :at "127.0.0.1" for example |
| 13:59 | cgrand | kotarak: ah, it's vlist stuff... I haven't looked at your latest yet |
| 14:00 | cgrand | sorry |
| 14:00 | raek | a RPC library? |
| 14:00 | kotarak | cgrand: no hurry. :) I know you are completely booked at the moment. |
| 14:01 | kotarak | cgrand: 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:01 | ohpauleez | raek: a type of RPC library, yes |
| 14:02 | svs` | anyone using carte? any idea what this means? "db-spec null is missing |
| 14:02 | svs` | a required parameter" |
| 14:05 | @rhickey | cemerick: any thoughts on contributing nRepl when you are ready? |
| 14:05 | duncanm | dum de dum |
| 14:06 | duncanm | it's easy to find the biggest number in a seq (use max), but what if i also want to know its position? |
| 14:07 | cemerick | rhickey: Happy to. |
| 14:07 | cemerick | It'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:07 | chouser | duncanm: which position? the first, last, or all of them? |
| 14:07 | cemerick | s/globally/generally |
| 14:07 | mrBliss | ,(apply (partial max-key first) (map vector [1 3 2] (range))) |
| 14:07 | clojurebot | [3 1] |
| 14:07 | duncanm | mrBliss: nice |
| 14:07 | mrBliss | duncanm: ^^ |
| 14:07 | duncanm | max-key? |
| 14:08 | duncanm | mrBliss: so if i have a matrix ([a b c] [d e f] ...) and i want to find the indices to the largest element..... |
| 14:08 | duncanm | hmm |
| 14:08 | chouser | mrBliss: nice, I keep forgetting max-key |
| 14:08 | chouser | (map-indexed vector [1 3 2]) |
| 14:08 | duncanm | oh |
| 14:08 | duncanm | i know nothing about these functions, are they new? |
| 14:09 | chouser | ,(:added (meta #'max-key)) |
| 14:09 | clojurebot | "1.0" |
| 14:09 | chouser | ,(:added (meta #'map-indexed)) |
| 14:09 | clojurebot | "1.2" |
| 14:12 | @rhickey | cemerick: that's great. Please also consider WebSockets protocol |
| 14:13 | dnolen | +1 for WebSockets |
| 14:13 | cemerick | rhickey: 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:13 | cemerick | that == websockets |
| 14:14 | ninjudd | cemerick: yeah, franks42 suggested websockets earlier too. not sure if i forwarded it along or not |
| 14:15 | cemerick | I think this is the first I've heard of it; I'll add it to the design notes just so its not forgotten. |
| 14:15 | ninjudd | who can? |
| 14:16 | hiredman | haskellers |
| 14:16 | hiredman | clojurebot: rimshot |
| 14:16 | clojurebot | Excuse me? |
| 14:18 | @rhickey | http://en.wikipedia.org/wiki/WebSockets |
| 14:19 | hiredman | it seems like something like websockets would be better added as a proxy clientish thing |
| 14:19 | @rhickey | hiredman: why? |
| 14:20 | hiredman | because not everyone wants to embed an http server |
| 14:21 | @rhickey | hiredman: you don't need an HTTP server for WebSockets |
| 14:22 | @rhickey | just sockets |
| 14:22 | cemerick | huh, so that HTTP-esque stuff is bogus. |
| 14:23 | @rhickey | It just has an HTTP compatible handshake |
| 14:23 | @rhickey | so you can initiate it via http from browsers |
| 14:23 | cemerick | Browsers: keeping security guys in full-employment since 1995. |
| 14:24 | @rhickey | but it is a lot easier to send character-by-character data to the reader via websockets than via HTTP |
| 14:25 | cemerick | yeah, it looks like it'll be totally reasonable. |
| 14:35 | scottj | rhickey: why isn't :or supported in seq destructuring? |
| 14:38 | ohpauleez | Does anyone have a good script example for lein's :repl-init-script |
| 14:59 | rickmode | As 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:04 | chouser | even when using records it may make sense to use extend instead of implementing the methods inline in the defrecord |
| 15:04 | rickmode | Is 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:04 | rickmode | chouser: would that effectively fix the issue? |
| 15:05 | kotarak | rickmode: I don't think so. |
| 15:05 | kotarak | Because the class changes. |
| 15:05 | kotarak | Ah. |
| 15:05 | kotarak | Maybe yes. |
| 15:05 | hiredman | you shouldn't be changing datatypes in a long running process |
| 15:05 | chouser | hm... no, but it would reduce the reasons for re-evaluating the defrecord to only when the fields change. |
| 15:05 | kotarak | The protocol still knows the old one. |
| 15:06 | rickmode | kotarak: so satisfies? will work and the protocol would be backwards compatible? |
| 15:06 | chouser | hm, actually if you re-eval the extend-type as well, the protocol will know about both |
| 15:06 | kotarak | maybe, haven't tested it. But when chouser says "no" .... |
| 15:08 | chouser | when you eval defrecord again, you're getting a completely different class with the same name |
| 15:09 | chouser | using extend means you need to do that less often. |
| 15:09 | rickmode | chouser, 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:14 | lancepantz | anyone know what time the conj ends on saturday? |
| 15:15 | lancepantz | nm, its on the ticket |
| 15:15 | lancepantz | 5:30 |
| 15:17 | raek | (off topic: YECH! the colors of ERC on emacs in a terminal are *horrible*... anyone here have any advice?) |
| 15:19 | defn | raek: color-theme |
| 15:19 | defn | raek: make sure your terminal has support for 256colors |
| 15:19 | bhenry | http://alexpogosyan.com/color-theme-creator/ |
| 15:20 | defn | meh screw those |
| 15:20 | defn | just use zenburn :) |
| 15:20 | lancepantz | wombat! |
| 15:20 | bhenry | i did until i found that. too much yellow in zenburn |
| 15:20 | lancepantz | i ported wombat from vim, it was hell though |
| 15:20 | bhenry | (if memory serves me correctly) |
| 15:21 | lancepantz | that site is awesome |
| 15:23 | scottj | lancepantz: too bad, someone did that long long ago |
| 15:23 | scottj | well a couple years ago, not that long I guess |
| 15:23 | lancepantz | :/ |
| 15:27 | kotarak | How do I find out, where boxing is going on? |
| 15:29 | dnolen | kotarak: i think jvisualvm will show you |
| 15:33 | defn | Anyone know of a directory watcher written in Clojure? |
| 15:33 | defn | Something I can have execute some code everytime something in a diretory changes? |
| 15:36 | kotarak | dnolen: wow. jvisualvm is pretty self-explaining. Just fired it up. Connected to my session. And started profiling. Cool. |
| 15:36 | bhenry | defn: 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:38 | defn | bhenry: yeah I was looking at that, just wansn't initially very enthused given his note on the README |
| 15:39 | defn | bhenry: ill try 'er out though |
| 15:39 | defn | thanks |
| 16:03 | defn | hmph, looks like most of kibbits is Stuart S's handywork |
| 16:03 | ninjudd | cemerick: i heard a rumor you're interested in writing some cake plugins for NSIS, ikvm, and proguard ;) |
| 16:04 | cemerick | ha! |
| 16:04 | cemerick | :-) |
| 16:04 | ninjudd | wouldn't be too hard. i'd recommend just wrapping the maven tasks ;-) |
| 16:04 | cemerick | lol |
| 16:04 | ninjudd | no point in reimplementing something like that |
| 16:04 | cemerick | indeed |
| 16:05 | ninjudd | i bet you could do it in less lines of code than your current pom.xml :P |
| 16:06 | cemerick | almost surely not -- if so, then polyglot maven wouldn't have been much of a project |
| 16:06 | ninjudd | how many lines is you pom.xml? |
| 16:07 | cemerick | (not that LoC is a worthwhile metric in either direction) |
| 16:07 | cemerick | My largest pom is 400 lines. |
| 16:07 | ninjudd | oh, that's too easy |
| 16:08 | cemerick | I beg you not to try :-) |
| 16:08 | ninjudd | of course not, you would be able to do it way quicker |
| 16:09 | cemerick | never gonna happen |
| 16:09 | LauJensen | Great, this is the kind of warfare I was hoping to jump into, good evening everybody! :) |
| 16:09 | cemerick | ninjudd: 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:10 | ninjudd | so you're addicted to the tools, huh? |
| 16:10 | cemerick | yeah, eclipse and hudson are nifty |
| 16:11 | cemerick | And 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:11 | ninjudd | can't do a let in xml though |
| 16:12 | ninjudd | or map, reduce, et. al |
| 16:12 | AWizzArd | cemerick: before I look at the sources, what is the transporter for communication in your nREPL? Just some Sockets? http + rest? soap? |
| 16:12 | cemerick | Hrm, right, because I want that in my build definitions. ;-) |
| 16:12 | ninjudd | cemerick: you prefer copy and paste? |
| 16:12 | cemerick | AWizzArd: Very simple character-based protocol. |
| 16:13 | cemerick | ninjudd: 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:13 | ninjudd | me too! that's exactly why cake uses a dependency-based model |
| 16:14 | cemerick | nah, that's a red-herring. I did ant for years (and still do, very occasionally). Thanks, but no thanks. :-) |
| 16:15 | cemerick | The 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:16 | cemerick | That breaks down a little when you consider ant tasks or exec's in pom files, but buyer beware in those cases. |
| 16:17 | ninjudd | that breaks down a little when you have 400 line pom.xml files ;-) |
| 16:18 | ninjudd | i certainly cannot look at 400 lines of code and know what it is going to do. |
| 16:18 | cemerick | not 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:20 | ninjudd | i don't buy that. i think you're just more familiar with maven and the tools you use |
| 16:22 | cemerick | vs. what? I'm pretty well-versed in my build tools. |
| 16:23 | ninjudd | vs. cake/lein/ant/whatever |
| 16:24 | bobo_ | 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:24 | bobo_ | havent seen that with anything else |
| 16:24 | ninjudd | bobo_: doesn't lein-search provide something similar? |
| 16:24 | cemerick | ninjudd: and make and gradle and scons and sbt... |
| 16:25 | bobo_ | ninjudd: well... kinda, but not as smooth. still have to search for it then? |
| 16:25 | cemerick | Many things can be said of me, but unacquainted with tools is not one of them. :-) |
| 16:26 | cemerick | rake and buildr are two I've never used |
| 16:26 | defn | via SOAP! via SOAP! |
| 16:26 | ninjudd | i didn't say that. i used the word addicted i think :p |
| 16:26 | shoover_ | c'mon guys, give poor cemerick a break. he was in here talking about this stuff 10 hours ago |
| 16:26 | cemerick | shoover_: I'm the local build tool piñata |
| 16:27 | ninjudd | hey defn, what ever happened to the cake-search plugin you were working on? |
| 16:27 | shoover_ | cemerick: I'm my own IRC unicode decoder, apparently |
| 16:27 | LauJensen | cemerick: I hope you don't mind these talks, I think they're educational |
| 16:27 | cemerick | heh |
| 16:27 | cemerick | not AFAICT |
| 16:28 | cemerick | most people in the clojure world appear to have a serious blub blind spot in this particular department |
| 16:28 | bobo_ | build tools is almost as sensitive as vim vs emacs and dynamic vs static typing |
| 16:29 | ohpauleez | bobo_: My mother was a saint!! |
| 16:29 | ohpauleez | :) |
| 16:29 | AWizzArd | cemerick: wait, I didn't follow the discussion, but did someone mention Maven? ;) |
| 16:29 | lancepantz | oh jeesus |
| 16:29 | cemerick | My life the past couple of days, it seems :-/ |
| 16:29 | lancepantz | i just got done reading the logs from this discussion this morning |
| 16:29 | ohpauleez | I'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:29 | lancepantz | now scrolling back through my irc buffer, same thing |
| 16:29 | lancepantz | there's probably going to be multiple fights at the conj :) |
| 16:30 | bobo_ | i have to get a i love maven t-short for conj-labs |
| 16:30 | cemerick | lancepantz: I doubt that |
| 16:30 | bobo_ | *t-shirt |
| 16:30 | LauJensen | hehe, ohpauleez the Vim Vs Emacs discussion was settled years ago by Emacs, its just that the Vim users haven't realized that yet |
| 16:30 | lancepantz | </sarcasm> :) |
| 16:30 | ohpauleez | true talk, RMS uses vim inside emacs, which he uses as a psuedo screen |
| 16:30 | LauJensen | bobo_: Alright, but you understand I won't be able to guarantee your safety though, right? :) |
| 16:30 | cemerick | lancepantz: nah, I think you're entirely correct, I'm just being hopeful |
| 16:31 | bobo_ | LauJensen: :-) il just login to awesome and start emacs. |
| 16:31 | ohpauleez | bobo_: You'll be safe |
| 16:31 | ohpauleez | barely |
| 16:31 | ohpauleez | but it should work |
| 16:31 | bobo_ | or i can boot windows and start netbeans |
| 16:31 | LauJensen | bobo_: 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:32 | bobo_ | LauJensen: yeh im just teasing you :-) |
| 16:32 | bobo_ | im one of thoose that dont care what im using. |
| 16:32 | cemerick | LauJensen: you *allow* Eclipse? :-O |
| 16:32 | LauJensen | cemerick: We even support it :) |
| 16:32 | bobo_ | "We" must be cgrand? :-) |
| 16:32 | LauJensen | cgrand has put in alot of work on the Eclipse plugin |
| 16:32 | LauJensen | bobo_: yea, like I said, "we" :) |
| 16:32 | cemerick | LauJensen: The churck of emacs will certainly excommunicate you for being associated with such subversive activities. |
| 16:32 | bobo_ | :-) |
| 16:33 | LauJensen | cemerick: 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:34 | cemerick | I'm entirely unfamiliar with this well-reasoned, pragmatic LauJensen ;-) |
| 16:34 | LauJensen | cemerick: riight, when have I not claimed that Emacs is superior? |
| 16:34 | ninjudd | i 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:36 | LauJensen | ninjudd: Do you also get disappointed in Thunderbird or Firefox when you hit C-k and nothing happens? :) |
| 16:36 | lancepantz | does in chrome! |
| 16:36 | bobo_ | indeed! |
| 16:37 | rich_holygoat | I am wedded to Vimperator |
| 16:37 | bobo_ | actualy, it goes to the searchfield in firefox! :-) |
| 16:37 | rich_holygoat | keep hitting 't' and 'd' in Safari :D |
| 16:38 | bobo_ | oh, floss weekly this week was just released, and its about emacs! |
| 16:38 | mrBliss | bobo_: Just started to download it :-) about org-mode |
| 16:42 | plathrop | I think I'm missing something obvious |
| 16:42 | plathrop | I've been iterating over some code in emacs/swank |
| 16:42 | plathrop | saved my progress in a file because I needed to restart my computer |
| 16:43 | plathrop | Now 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:43 | plathrop | But (load "my-file") doesn't seem to load all the code |
| 16:43 | bobo_ | M-x slime-eval-buffer |
| 16:44 | plathrop | thanks, bobo_ I knew it was something simple |
| 16:44 | bobo_ | :-) |
| 16:51 | ninjudd | LauJensen: C-k works for me in firefox |
| 16:51 | LauJensen | k, it was just an example, I use Conkeror so I dont remember firefoxs bindings :) |
| 16:52 | ninjudd | may be an OS X thing |
| 16:53 | bhenry | if i pass a keyword into a function can i turn it into :keyword.dotsomething ? |
| 16:54 | bhenry | ie (let [x :x] (something here returns :x.extended)) |
| 16:56 | briancarper | ,(let [x :x] (keyword (str (name x) ".extended"))) |
| 16:56 | clojurebot | :x.extended |
| 16:56 | bhenry | briancarper: thanks that's what i just tried. |
| 17:05 | amalloy | plathrop: C-c C-k works too, and takes less typing than this M-x blah blah nonsense |
| 17:11 | plathrop | What happened to the clojure.string docs? |
| 17:19 | jjido | can I assign three values in a vector to three variables at once? Like (let [a, b, c [3, 2, 1]] ...) |
| 17:20 | dnolen | jjido: yup |
| 17:20 | dnolen | ,(let [[a b c] [1 2 3]] (println a b c)) |
| 17:20 | clojurebot | 1 2 3 |
| 17:20 | jjido | great :) |
| 17:29 | amalloy | jjido: you don't even need them to be in a vector already, if this is more convenient for you: |
| 17:29 | amalloy | ,(let [f (fn [& [a b c]] (println a b c))] (f 4 6 8)) |
| 17:29 | clojurebot | 4 6 8 |
| 17:30 | ohpauleez | jjido: that above example is called destructuring |
| 17:31 | ohpauleez | it's used extensively in clojure, if you need to dig up more docs on it |
| 17:31 | ohpauleez | you can also do it with maps (which is very helpful) |
| 17:35 | amalloy | ,(let [{name :first} {:last 'smith, :first 'david}] name) |
| 17:35 | clojurebot | david |
| 18:50 | lancepantz | anyone know if there is a way to get the arity of a lambda? |
| 18:58 | replaca | lancepantz: no, I don't believe there is |
| 18:58 | technomancy | lancepantz: it seems like a bug that metadata on fns is very sketchy |
| 18:58 | lancepantz | yeah, i expected meta to do it, returns nil though |
| 18:59 | amalloy | lancepantz: meta of a defn gets you arglists, but meta of a lambda doesn't seem to |
| 18:59 | replaca | technomancy: can you tell me how to install my own version of clojure for lein to use? |
| 18:59 | technomancy | really, nil? I get {:line 1} |
| 18:59 | technomancy | replaca: you mean to make lein itself use a version other than it uses out of the box? |
| 19:00 | ninjudd | ,(contains? (transient #{1 2 3}) 3) |
| 19:00 | clojurebot | false |
| 19:00 | ninjudd | huh? |
| 19:00 | replaca | technomancy: no, so that my program uses a custom version that I made myself |
| 19:00 | lancepantz | ,(meta #(println "hi")) |
| 19:00 | clojurebot | nil |
| 19:00 | amalloy | ,(some #{3} (transient #{1 2 3})) |
| 19:00 | clojurebot | java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.PersistentHashSet$TransientHashSet |
| 19:01 | technomancy | replaca: 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:01 | ninjudd | ,((transient #{1 2 3}) 3) |
| 19:01 | clojurebot | 3 |
| 19:01 | hsuh | hey... whats the current state of enclojure vs emacs+swank+slime ? |
| 19:01 | ninjudd | i guess i can't use contains? for transients |
| 19:01 | replaca | technomancy: cool. what do the args to mvn install look like? |
| 19:02 | replaca | technomancy: does it just look at ./pom.xml? |
| 19:02 | technomancy | replaca: I'm not sure; I haven't built clojure from source in over a year |
| 19:02 | technomancy | probably |
| 19:02 | replaca | technomancy: believe it or not, I think I just found a showstopper bug in keywords |
| 19:03 | ohpauleez | ninjudd: How are you using the transient? |
| 19:03 | replaca | want to play with it and understand it better before I file |
| 19:03 | ohpauleez | I'm having a hard time to think of a case where you'd want to do that |
| 19:03 | replaca | (and also fix my program :-)) |
| 19:04 | ninjudd | ohpauleez: why does one ever use transients? to make constructing large, persistent data structures faster |
| 19:04 | ohpauleez | right, typically in a loop |
| 19:05 | ninjudd | correct |
| 19:05 | ohpauleez | but I can't think why end that process using a contains? on the collect itself |
| 19:05 | ohpauleez | typically it's a function return or some other value that is used as a sentinel to return |
| 19:06 | ninjudd | ohpauleez: are you arguing that contains? shouldn't work on a transient because you can't think of why i would need it? |
| 19:06 | ohpauleez | haha, I'm not arguing for anything, I just couldn't come up with a use-case for using contains? on a transient |
| 19:07 | ninjudd | ohpauleez: i doing a breadth-first search of a large graph |
| 19:07 | ninjudd | the result of that search is an object which encapsulates all the paths that were found. |
| 19:08 | ninjudd | to avoid infinite loops, i have to check if a node has already been traversed, thus i need to call contains? on a transient |
| 19:09 | amalloy | ninjudd: it looks like clojure.lang.RT.contains() just checks whether something is an IPersistentSet |
| 19:09 | ohpauleez | the only way I can think of making that work is persistent!, checking, and transient'ing again |
| 19:09 | ninjudd | ohpauleez: that would kill performance |
| 19:09 | ohpauleez | totally |
| 19:09 | ohpauleez | completely defeats the purpose |
| 19:09 | ninjudd | ,(get (transient #{1 2 3}) 3) |
| 19:09 | clojurebot | nil |
| 19:10 | ninjudd | get also doesn't work on transients |
| 19:10 | ohpauleez | ,(get (transient #{1 2 3}) 0) |
| 19:10 | clojurebot | nil |
| 19:10 | ninjudd | ,(get-in {:foo (transient #{1 2 3})} [:foo 3]) |
| 19:10 | clojurebot | nil |
| 19:10 | ninjudd | and get-in |
| 19:10 | ohpauleez | right, this is very atypical usage |
| 19:11 | ninjudd | ohpauleez: i disagree |
| 19:11 | ohpauleez | can you gist the block? I'd totally love to take a look |
| 19:11 | ninjudd | ;) |
| 19:11 | amalloy | ninjudd: 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:12 | ninjudd | ohpauleez: http://github.com/ninjudd/jiraph/blob/deftype/src/jiraph/walk.clj |
| 19:12 | ohpauleez | thanks |
| 19:12 | ninjudd | i am changing :includes? from a map to a set |
| 19:13 | ninjudd | which is what is causing the breakage |
| 19:13 | ninjudd | haven't checked the broken code in though |
| 19:15 | ninjudd | ohpauleez: i guess you're right about it being uncommon, otherwise someone would have found the bug already |
| 19:16 | ohpauleez | ninjudd: yeah, I'm gisting you a typical use of transients |
| 19:16 | ohpauleez | you usually transient in the let block that does the loop |
| 19:17 | ohpauleez | http://gist.github.com/594584 |
| 19:17 | ninjudd | ohpauleez: that's what i'm doing. look at init-walk, which is called in the binding part of the loop |
| 19:22 | defn | anyone here ever remote pair? |
| 19:22 | defn | anyone here ever pair on clojure before? |
| 19:23 | ohpauleez | defn, as in pair programming? |
| 19:23 | defn | ohpauleez: yea |
| 19:23 | ohpauleez | yes, I have |
| 19:23 | ohpauleez | a few times |
| 19:23 | ohpauleez | in person and remotely |
| 19:23 | defn | i dont know anyone around my area who does any clojure, and i know precious few who pair |
| 19:23 | technomancy | defn: every day |
| 19:23 | defn | id like to get together and pair on a project some time |
| 19:24 | ninjudd | defn: where are you? |
| 19:24 | defn | Madison, WI |
| 19:24 | ohpauleez | defn: I use screen often to pair remotely |
| 19:25 | ohpauleez | defn: but I'd totally jump into a one-off channel on IRC, on screen, or PM a lot of gists |
| 19:25 | defn | ohpauleez: use Emacs? http://github.com/scymtym/rudel |
| 19:25 | defn | ohpauleez: as in, you'd be interested in pairing sometime? |
| 19:26 | technomancy | defn: I've found tmux/screen nicer than rudel if you're sharing more than one buffer |
| 19:26 | ohpauleez | I'm fine in both in emacs and vim. I use vim more, but that looks like a cool project |
| 19:26 | defn | technomancy: yeah i was looking at a link from HN today about tmux technomancy |
| 19:26 | defn | sorry for the double nick highlight, terrible [TAB] habit |
| 19:27 | defn | yeah 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:27 | defn | there's just no comparison |
| 19:27 | defn | but i prefer emacs -- im not one of those vim-mode on the CL guys -- give me set -o emacs please |
| 19:28 | defn | technomancy: do you have any dotfiles or configuration stuff hanging out in your dotfiles related to tmux/screen for pairing? |
| 19:28 | technomancy | defn: sure, http://p.hagelb.org/.tmux.conf |
| 19:28 | defn | win. |
| 19:29 | defn | technomancy: wanna let me try it out on you? :D |
| 19:30 | ninjudd | i keep meaning to switch to tmux |
| 19:31 | technomancy | defn: already pairing w/ someone; sorry |
| 19:31 | technomancy | defn: you could join our seajure meetings; they're held in a tmux session. =) |
| 19:31 | ohpauleez | defn: rad, but yeah holler if you want another set of eyes or pairing |
| 19:31 | ohpauleez | technomancy: for real?! |
| 19:31 | ohpauleez | I'm in Eugene, OR and keep meaning to get on the train and head up for a meeting |
| 19:33 | defn | technomancy: no problem -- is that info on the seajure page? |
| 19:33 | defn | ohpauleez: im going to hold you to that. |
| 19:33 | technomancy | well it wouldn't be that useful without voip though |
| 19:33 | defn | ohpauleez: are you interested in pairing tomorrow? |
| 19:33 | defn | i just spent all day pairing and am a little worn out |
| 19:35 | ninjudd | ohpauleez, amalloy: thanks. i'm going to post this bug to clojure-dev |
| 19:35 | ohpauleez | ninjudd: cool, sorry I couldn't be more of a help |
| 19:44 | ninjudd | ohpauleez: no worries. for now i'm just using the alternate sytax |
| 19:44 | ninjudd | ,((transient #{1 2 3}) 3) |
| 19:44 | clojurebot | 3 |
| 20:07 | dreish | Well 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:08 | technomancy | dreish: you can do a :disable-implicit-clean in project.clj |
| 20:08 | dreish | technomancy: That was easy. |
| 20:08 | technomancy | =) |
| 20:09 | technomancy | you could also add-hook on the deps task to run native-deps along with deps |
| 20:09 | technomancy | but this is easier |
| 20:10 | dreish | Yes, and now I have an uberjar. |
| 20:10 | dreish | Thanks. |
| 20:10 | dnolen | dreish: 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:10 | dreish | I'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:10 | dnolen | s/try/tried |
| 20:11 | dreish | dnolen: 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:11 | dnolen | dreish: if you get it working, or if it just works, let me know :) |
| 20:12 | dreish | It does not work. |
| 20:12 | dreish | I could have sworn it used to. |
| 20:12 | ninjudd | dnolen: i implemented it, but there is a bug in clojure that prevents it from working correctly without a patch |
| 20:13 | ninjudd | http://github.com/ninjudd/classlojure |
| 20:13 | dnolen | ninjudd: oh yeah, I remember you talking about that. |
| 20:13 | ninjudd | cemerick actually blocked the patch because he said "it probably doesn't work in netbeans" |
| 20:13 | dnolen | huh |
| 20:14 | ninjudd | wasted a whole weekend trying to recreate the bug that he thought my patch would cause ;-) |
| 20:14 | ninjudd | i'm still planning to punch him for that when i see him... |
| 20:15 | dnolen | heh, well perhaps it should be reopened. Did you try the patched jar with Netbeans? |
| 20:16 | ninjudd | i did, and couldn't cause the bug. but netbeans is so confusing, i don't really know if my test was valid |
| 20:16 | ninjudd | but, cake supports native deps in jars just fine |
| 20:16 | dnolen | do you have a link to the ticket/patch, I'll try to check this out this weekend. |
| 20:17 | dnolen | ninjudd:^ |
| 20:17 | ninjudd | automatically extracts them and sets your library path and everything |
| 20:17 | dnolen | ninjudd: yeah I've looked at classlojure |
| 20:17 | dreish | I guess I'll be trying cake this weekend. |
| 20:17 | ninjudd | dnolen: http://groups.google.com/group/clojure-dev/browse_thread/thread/f61b550abf7f9c52/da25ba7e31b9431c?q= |
| 20:17 | dnolen | ninjudd: thx |
| 20:17 | ninjudd | i remember cemerick said "this is something your tools should handle for you!" |
| 20:18 | ninjudd | he didn't realize i was going to write a build tool though rather than use maven ;-) |
| 20:18 | lancepantz | lol |
| 20:21 | defn | haters gonna hate |
| 20:22 | defn | isn'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:22 | ninjudd | aye |
| 20:22 | defn | obviously not the guy who should be reviewing your patch then :) |
| 20:23 | defn | conflict of interest and such |
| 20:23 | ninjudd | i wouldn't say he's a hater though. just opinionated |
| 20:23 | defn | well said -- im down with opinionated software |
| 20:23 | defn | im just /more/ down with it when i agree with the opinion |
| 20:23 | ninjudd | hehe |
| 20:24 | ninjudd | so defn, you're almost done with your cake-search plugin, right? |
| 20:24 | defn | :X |
| 20:25 | ninjudd | maybe we can use tmux to pair on it one of these days ;-) |
| 20:25 | defn | ninjudd: that'd be cool actually |
| 20:26 | defn | im deeply introverted in certain ways |
| 20:26 | ninjudd | defn: you going to clojure-conj? |
| 20:26 | defn | but having a conversation about technical stuff is important to me |
| 20:26 | defn | something that has been hard with clojure given the community in my area |
| 20:26 | defn | ninjudd: i havent committed yes or no yet |
| 20:26 | defn | im going to strange loop |
| 20:27 | defn | im 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:30 | defn | '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:30 | defn | ninjudd: i take it you're going? |
| 20:30 | lancepantz | he just left, but yeah, we're both going |
| 20:31 | replaca | technomancy: doing an "ant ci-build" seemed to do the trick (mvn install just created an empty file) |
| 20:31 | defn | lancepantz: cool |
| 20:32 | defn | lancepantz: strange loop is actually my first conference ever |
| 20:32 | lancepantz | yeah, i've never been to one either |
| 20:32 | defn | going alone to a conf makes me sort of nervous |
| 20:32 | defn | ive 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:33 | lancepantz | heh, well atleast it sounds like your friends program atleast |
| 20:33 | defn | debatable |
| 20:34 | defn | some of them get paid to write code but don't get my stamp of approval as being real programmers |
| 20:35 | defn | writing 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:35 | defn | </rant> |
| 20:35 | clojurebot | have you heard about the bird? is<reply>The bird, bird, bird, the bird is the word. |
| 20:35 | technomancy | clojurebot: you crack me up sometimes |
| 20:35 | clojurebot | Excuse me? |
| 20:36 | defn | trying to imitate an infobot |
| 20:36 | defn | for shame, clojurebot... for shame... |
| 20:39 | defn | do conference putter-onner-guys prohibit the taping of talks at conferences? |
| 20:39 | defn | i ask because ive seen mention of like 10 rhickey talks but never is there any video |
| 20:40 | hiredman | clojurebot: tv? |
| 20:40 | clojurebot | blip.tv is http://clojure.blip.tv/ |
| 21:28 | alexyk | lancepantz: WTF is *shell-env* anyway? :) |
| 21:29 | lancepantz | a map of your bash environment |
| 21:29 | lancepantz | dnolen requested it for the textmate bundle |
| 21:29 | alexyk | lancepantz: 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:29 | alexyk | :) |
| 21:30 | alexyk | so now we found out and it's *shell-env* everywhere and it's ugly! :) |
| 21:30 | lancepantz | i wanted to use *env* for a more important feature |
| 21:30 | alexyk | lancepantz: like what? |
| 21:31 | alexyk | there'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:32 | alexyk | and JVM has no env anyway. So rename it back! :) |
| 21:32 | lancepantz | i added an environment map the the project.clj |
| 21:32 | alexyk | hmm... |
| 21:32 | alexyk | so you'd have :env? |
| 21:33 | lancepantz | so :environment{:qa {:foo "bar"}} sets *env* to {:foo "bar"} when you set env=qa in your your .cake/config |
| 21:33 | alexyk | cemerick: when you see *env*, what comes to mind? |
| 21:34 | cemerick | shit, who am I gonna piss off? :-) |
| 21:34 | alexyk | cemerick: nobody, it's just a test |
| 21:34 | alexyk | don't look up |
| 21:35 | cemerick | something named *env* make me think someone made a bad design decision. |
| 21:35 | ninjudd | ha! |
| 21:36 | lancepantz | so *shell-env* would make more sense, right? |
| 21:36 | cemerick | Yup, I definitely pissed someone off. |
| 21:40 | ninjudd | a bad design decision would have been naming alexyk's *ENV* and lancepantz's *env* |
| 21:40 | alexyk | cemerick: wow, you deserve to represent UMass in Confgress! |
| 21:40 | alexyk | Conjgress |
| 21:41 | ninjudd | which lancepantz talked me out of |
| 21:41 | alexyk | I meant Western Mass |
| 21:41 | cemerick | Conjgress, huh? |
| 21:41 | alexyk | lancepantz's *env* is just *fake-env* |
| 21:41 | alexyk | or *presets* |
| 21:42 | alexyk | or *args-alist* or some such; it's not really an env |
| 21:42 | alexyk | env is shared by all shell things |
| 21:42 | lancepantz | i think cemerick has a good point, maybe *shell-env* and *cake-env* would make sense |
| 21:42 | ninjudd | yes it is *deploy-env* |
| 21:43 | ninjudd | alexyk: doesn't understand what it is for |
| 21:43 | alexyk | ninjudd: who doesn't? |
| 21:43 | ninjudd | cake/*cake-env* huh? |
| 21:44 | ninjudd | veto |
| 21:44 | ninjudd | alexyk: you |
| 21:44 | alexyk | ninjudd: I understand, but your *env* is not set by anything but cake right |
| 21:45 | ninjudd | it is for deployment environments.. equivalent to RAILS_ENV |
| 21:46 | ninjudd | neither is set by anything but cake |
| 21:46 | alexyk | yeah, Rails is to blame, DHH personally :) |
| 21:47 | ninjudd | alexyk: come up with a better name for deployment environment and you can have *env* back |
| 21:48 | alexyk | ok I'll ponder it over some fishing on the weekend :) |
| 21:48 | ninjudd | ok |
| 21:49 | ninjudd | can't have the word cake or lancepantz in it |
| 21:49 | cemerick | I 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:49 | alexyk | cemerick: blame Unix! it's useful for decades not for nothing |
| 21:50 | ninjudd | i believe maven calls them properties? |
| 21:50 | cemerick | Sure, 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:51 | alexyk | cemerick: 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:52 | cemerick | bah. Compojure / ring eliminated the notion of global contexts for web applications. |
| 21:52 | cemerick | There *is* an environment, but it can be encapsulated, and restricted to local fn scope. |
| 21:52 | cemerick | Makes a lot of stuff easier. |
| 21:53 | ninjudd | alexyk and i are talking about two different things |
| 21:53 | alexyk | our *env* is to interface cake with TextMate on a Unix platform; an artefact of iterop with the big bad world out there |
| 21:54 | ninjudd | actually, it looks like maven calls them profiles: http://maven.apache.org/guides/introduction/introduction-to-profiles.html |
| 21:55 | alexyk | ninjudd: aha! cake/*profile* for you |
| 21:56 | alexyk | or cake/*maven-profile* |
| 21:56 | alexyk | :) |
| 21:56 | ninjudd | lancepantz: what about *context*? |
| 21:57 | ninjudd | alexyk: maybe we should keep discussions about what to name an obscure cake var in #cake.clj next time |
| 21:57 | alexyk | ninjudd: sure |
| 21:58 | cais2002 | ninjudd: good morning |
| 21:58 | ninjudd | cais2002: good morning |
| 21:58 | alexyk | ninjudd: thanks for pondering it anyway |
| 21:58 | alexyk | the main thing TM/cake works beautifully |
| 21:59 | lancepantz | i think we can find something more obvious than context |
| 21:59 | alexyk | lancepantz: thanks too! you guys are doing a great job, nitpicking is all for sport |
| 22:00 | cais2002 | ninjudd: I am a bit confused about how to use cake to do lein jar to exclude .svn folders |
| 22:00 | lancepantz | dont mind at all |
| 22:01 | ninjudd | cais2002: you would use cake instead of lein |
| 22:01 | ninjudd | cake jar |
| 22:01 | lancepantz | i'll let alexyk fish on it :) |
| 22:02 | lancepantz | trying to buy these damn tickets |
| 22:07 | nroot7 | Is 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:11 | cemerick | nroot7: they're agents, not actors; and yes, they use two threadpools. The overhead involved is a single object creation IIRC. |
| 22:14 | nroot7 | cemerick: Thanks. also found some reference here http://groups.google.com/group/clojure/browse_thread/thread/2a2b24ffef5d1631 |
| 22:17 | cemerick | nroot7: Sure; old, but still accurate. I presume you've seen this: http://clojure.org/agents |
| 22:17 | cemerick | The example gives an example of what the overhead is like. |
| 22:17 | cemerick | i.e. essentially none at all |
| 22:21 | ninjudd | alexyk: you can have *env* back. we came up with a better solution |
| 22:22 | ninjudd | and he's gone |
| 22:22 | ninjudd | i don't want him to spend his whole fishing trip thinking of variable names |
| 22:24 | ninjudd | does memoserv actually work? |
| 22:25 | ninjudd | clojurebot: does memoserv work? |
| 22:26 | clojurebot | http://haacked.com/images/haacked_com/WindowsLiveWriter/IConfigMapPathIsInaccessibleDueToItsProt_1446B/works-on-my-machine-starburst.png |
| 22:26 | ninjudd | good enough for me |
| 22:26 | ninjudd | sexpbot, do you agree? |
| 22:28 | dnolen | ANN: textmate-clojure, http://blip.tv/file/4160578 |
| 22:28 | nroot7 | What is the key binding on emacs to execute a line in buffer on the repl ? |
| 22:28 | lancepantz | congrats dnolen! |
| 22:29 | amalloy | nroot7: try C-c C-c |
| 22:30 | nroot7 | amalloy : C-c C-c is undefined. I am using clojure box on windows. |
| 22:30 | amalloy | and you're in clojure mode? |
| 22:31 | dnolen | lancepantz: thx! most of the credit goes to other people tho :) |
| 22:31 | amalloy | you have to be in clojure mode, and have a connected slime/swank session, but after that C-c C-c should work |
| 22:31 | ninjudd | dnolen: awesome |
| 22:31 | hsuh | will i enter a world of pain if i try to develop a site with clojure these days? (needs mosfly file upload & sessions) |
| 22:37 | cais2002 | ninjudd: finally managed to exclude .svn folder in lein by modifying jar.clj |
| 22:37 | amalloy | hsuh: i haven't tried it myself, but various #clojure regulars use compojure and seem to still be alive and sane |
| 22:37 | lancepantz | hsuh: compojure is great, but i don't have any experience with the html generation modules |
| 22:39 | hsuh | i read about it, and ring too.... which apparently has a session module |
| 22:39 | lancepantz | compojure is built on ring, and yeah sessions will probably be pain free |
| 22:39 | hsuh | cool |
| 22:41 | ninjudd | cais2002: ok |
| 22:41 | dnolen | if you're on HN and you like TextMate, upvote por favor, http://news.ycombinator.com/item?id=1722413 |
| 22:44 | hsuh | dnolen: por favor? |
| 22:48 | dnolen | hsuh: oh sorry, please |
| 22:50 | kumarshantanu | hi, I need a slightly different merge-with behavior |
| 22:50 | kumarshantanu | ,(merge-with vector {:a 10 :b 20} {:a 30 :c 40}) |
| 22:50 | clojurebot | {:c 40, :a [10 30], :b 20} |
| 22:51 | kumarshantanu | I need {:c [40], :a [10 30], :b [20]} |
| 22:51 | kumarshantanu | any suggestions? |
| 23:07 | chouser | ,(reduce (fn [m [k v]] (assoc m k (conj (m k []) v))) {} (concat {:a 10 :b 20} {:a 30 :c 40})) |
| 23:07 | clojurebot | {:c [40], :b [20], :a [10 30]} |
| 23:07 | chouser | ,(apply merge-with concat (map (fn [[k v]] {k (list v)}) (concat {:a 10 :b 20} {:a 30 :c 40}))) |
| 23:07 | clojurebot | {:c (40), :b (20), :a (10 30)} |
| 23:08 | chouser | kumarshantanu: a couple options there. hm, I wonder if there's something in contrib |
| 23:09 | kumarshantanu | chouser: thanks, it looks good |
| 23:09 | chouser | I'm sure I've seen a better way, but it's not coming to me. |
| 23:34 | kumarshantanu | chouser: 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:37 | amalloy | kumarshantanu: hard to guess what you're doing wrong without a sample? |
| 23:43 | kumarshantanu | amalloy: right, maybe will post later -- got to rush now :( |