#clojure logs

2010-09-01

00:09anonymouse89how do I make something like ((a) (b) (c)) -> (a) (b) (c) ?
00:13anonymouse89more concretely, I have something like `(do ~(for [foo bar] `(my-fn ~foo)))
00:13arbscht~@ instead of ~
00:13clojurebot@ has nothing to do with whether sth is evaluated or not
00:14anonymouse89and want (do (my-fn foo1) (my-fn foo2))
00:16anonymouse89so my question is, how do I prevent "for" from returning a single seq
00:17arbschtanonymouse89: use ~@ instead of ~
00:17arbscht~@ will splice
00:17Raynesanonymouse89: What he said. ~@ will do it.
00:17clojurebot@ splices in a seq and foo# is a symbol, not a seq
00:17Raynesclojurebot: We got this one bro. S'okay.
00:17clojurebotExcuse me?
00:17arbscht,`(do ~(for [foo [1 2 3]] `(my-fn ~foo)))
00:17clojurebot(do ((sandbox/my-fn 1) (sandbox/my-fn 2) (sandbox/my-fn 3)))
00:17arbscht,`(do ~@(for [foo [1 2 3]] `(my-fn ~foo)))
00:17clojurebot(do (sandbox/my-fn 1) (sandbox/my-fn 2) (sandbox/my-fn 3))
00:17anonymouse89bah, sorry I was not looking at names and the bot fooled me :(
00:18anonymouse89thanks
00:18Raynes:p
00:19Raynes->`(do ~(for [foo [1 2 3]] `(~'my-fn ~foo)))
00:19sexpbot=> (do ((my-fn 1) (my-fn 2) (my-fn 3)))
00:19RaynesNeat.
01:32defnreal neat.
01:38BahmanHi all!
01:39defnhola
01:39BahmanHola defn!
01:39defnI don't know if I can match your intensity.
02:30bartjto get a subset of key/values from a map
02:31bartjI do this: (zipmap keys-subset (map #(me-a-map %) keys-subset)
02:31bartjIs there any better (in terms of performance, idiomatic) way to do this ?
02:31bartjeg:
02:31bartj, (def g #{:a :b :c})
02:31clojurebotDENIED
02:32bartj, (zipmap #{:a :b :c} (map #({:a 1 :b 2 :c 3 :d 4 :e 5} %) #{:a :b :c}))
02:32clojurebot{:b 2, :c 3, :a 1}
02:35bartjsuggestions please ?
02:38hoeck,(select-keys {:a 1 :b 2 :c 3} [:b :c])
02:38clojurebot{:c 3, :b 2}
02:38hoeckbartj: ^
02:43bartjhoeck, thanks!
02:45bartjhoeck, the caret means something :) ?
02:46hoeckbartj: in this case just "look above" (to make your irc client blinking on your name :)
02:58LauJensenWhats available for Java GUIs nowadays? Miglayout? GridLayout? More?
04:03zkimAnybody know what the 'Prefer updating over setting' bullet point on the lib coding standard page means? http://www.assembla.com/wiki/show/clojure/Clojure_Library_Coding_Standards
04:33notsonerdysunnycan anybody suggest a maven-repository which contains jogl.jar ?
04:34fliebelIs there a way to listen for key events with Clojure? I mean the type of events that work when your app is not in focus.
04:34bobo_notsonerdysunny: http://stackoverflow.com/questions/1962718/maven-and-the-jogl-library tried that one?
04:39notsonerdysunnybobo_: I have tried a couple of things .. I have tried using the ones on clojars.org unfortunately they didn't confirm to conventions of native-deps so downloaded those jars and repackaged it and uploaded it to clojars.org/sunilnandihalli/jogl .. but it does not seem to be working I am not sure if the problem is with the jogl .. or is it something else.. I am new to java/jar stuff.. so I...
04:39notsonerdysunny...might be doing something wrong.. I was just hoping somebody had a "native-deps" compatible jogl.jar some-where on the web
04:41hoeckfliebel: don't know if that helps but you can install your own java.awt.EventQueue to process all events the application gets
04:43hoeckfliebel: (-> (java.awt.Toolkit/getDefaultToolkit) .getSystemEventQueue (.push <your-custom-java.awt.EventQueue>))
04:43fliebelhoeck: iirc, awt doesn't even receive any events when it's not focused. It's just made to do the user-clicked-some-button-in-yout-gui type of stuff.
04:44fliebelhoeck: While I want to have the global events, for doing stuff like quicksilver, or gnome do, if you're into linux.
04:47hoeckfliebel: ah, ok
04:48fliebelhoeck: I tried to do it in Jython once, for mouse events… fail… Must be a way to do it...
04:50hoeckI guess one has to hook into some gnome or X libraries, or some use some strange windows messaging API
04:58greghon windows you might use the CBT hooks but I doubt you can write one of those without introducing native code
05:05fliebelgregh: Then I might as well do it in Python, since I already wrote cross-platform native mouse bindings for that.
06:24javeit would be nice if clojure docs where available in info format
06:26esjis that a volonteer I spy ?
06:27javeyes maybe
06:28javehow are the docs made today?
06:28javeif I can do some form of hack to achieve it I can have a try
06:28esjhttp://github.com/tomfaulhaber/autodoc
06:29esjI really like them actually
06:29javebut is docs for core fns such as defn made the same way?
06:30esjyeah, believe so
06:30javecool
06:30esjbut I'm usually wrong :)
06:31javeheh
06:31esjhave fun !
06:31javeThanks
06:31fliebelis info format those frames generated for java docs? or what?
06:31javeno for reading in emacs
06:37fliebelI think it'd be great to have references to other functions in the docs.
06:54esjfliebel: ^^ :P
07:05bartjwhy aren't optional arguments in functions, accessible inside the function ?
07:06bartj(defn blah [a b & c]
07:06bartj (when c (println "hi")))
07:06bartj(blah 1 2 true) ;will *not* print hi
07:06bartjah, never mind
07:07__debaserdoesn't c stand for a list with the rest of the args?
07:08fliebelI thought so, but still:
07:08fliebel,(when '(true) "yes")
07:08clojurebot"yes"
07:09bartjok, I find this behaviour very weird:
07:09bartjI don't know what I am doing wrong
07:09bartjlet me illustrate
07:09bartj(defn blah [a b & c]
07:09bartj (when-not c (println "hi")))
07:09bartj(blah 1 2 false) ;will *not* print hi
07:09bartj(defn blah2 [a b c]
07:09bartj (when-not c (println "hi")))
07:09bartj(blah 1 2 true) ;will print hi
07:10bartjer, the last statement must be:
07:10bartj(blah2 1 2 true) ;will print hi
07:10LauJensen,(when-not false 1)
07:10clojurebot1
07:10opqdonutbartj: [false] is true
07:10opqdonutuse & [c]
07:11bartjopqdonut, you mean everything after & is in a vector ?
07:11opqdonut(def blah [a b & [c]] (when-not c (println "hi")))
07:11opqdonutyes
07:11bartjoh thanks!
07:11opqdonutthat's why its usually called & rest
07:11opqdonutit grabs the rest of the arguments
07:11bartjI was getting excited that I had found a bug or something ;)
07:12fliebelIs there any way to have Python style optional arguments? Like: def test(a b c="default")
07:13fliebelI think this is what bartj was expecting.
07:13esjfliebel: i usually do that with multimethods
07:13esjsorry, i'm lying,
07:13bartjis there a technical term for this sort of behaviour ?
07:13esjwith variadic functions
07:13fliebelesj: difference?
07:14bartjI mean in the functional sense.
07:14esj(defn foo ([] (foo :default) ([a] (str a)))
07:14esjor suchlike
07:14esjso if you call foo with no args, it calls foo with one arg
07:14esjdunno how canonical that sort of carrying on is , though
07:15fliebelesj: ah, and multimethods are the actual fancy things with functions to determine the correct thing and stuff?
07:15esjmultimethods are another thing that allow you to dispatch a function based on a function of the arguments
07:16esjso like in most languages you can dispatch a function on the type of an argument to get your usual polymorphism
07:16fliebelvery fancy… so you could have a different method for positive and negative numbers for example?
07:16esjwith them you can dispatch on any function of the arguments
07:16esjyup
07:20bartjesj: the difference b/w multimethods and protocols is that protocols accept only one argument unlike multimethods ?
07:20esjbartj: no, there's much more to it
07:21bartjesj, and protocols is much better performance-wise
07:21bartjesj, s/is/are
07:22dnolencgrand: around? moustache question.
07:23esjbartj: that's true, but there is a lot going on under the hood
07:24esji gotta dash, so can't continue this, which is probably just as well, as I'd just mangle it. There's lots on the web you can read though.
07:24bartjesj, ok, no problemo
07:25LauJensendnolen: whats the question?
07:26dnolenwondering if it's possible to define a route match like "*/foo"
07:26LauJensenSo to disregard the first level and only match on the second ?
07:26dnolenwhere we don't care what comes before at all, no matter how many levels.
07:26dnolenwould a regex work?
07:27LauJensen[& levels] (when (= "match" (last levels)) ...) ?
07:28dnolenLauJensen, if a handle returns false it moves on to the next handler?
07:28dnolens/handle/handler
07:28LauJensenIm not entirely sure how app dispatches
07:28dnolenor nil rather I mean
07:30dnolenhmm sounds like that would work, if handler returns nil it continues on.
07:30LauJensenI think it calls match-route on all requests, returning a seq of those that match. Then it might be up to emit-validator to decide which gets run. You'll have to 2x check the source, I think Christophe is a little tied up these days
07:31LauJensenI guess what you could do - depending on your situation - was to introduce a middleware that checked for those phrases you want to match ?
07:38dnolenLauJensen: Raynes had an interesting idea, would cool to be able to destructure from the end of something, thought clearly perf implications for anything but vectors.
07:38kumarshantanuLauJensen: I have a question about Ring -- does it lay down how to match URIs? I can't find any mention of that in the SPEC file in master
07:38LauJensenkumarshantanu: No, Ring has nothing to do with routing as far as I know
07:39LauJensendnolen: {dstruc from end} (rseq vec) ?
07:39dnolenkumarshantanu: you'll need to use Compojure/Clout/Moustache for that
08:01mrBlissis there somebody here with a Mac who is willing to show the output of (. System (getProperty "os.name")) ?
08:01mrBlissI'm too lazy to turn mine on ;-)
08:02kumarshantanu,(. System (getProperty "os.name"))
08:02clojurebotjava.security.AccessControlException: access denied (java.util.PropertyPermission os.name read)
08:02nlogaxmrBliss: i get "Mac OS X"
08:02mrBlissthanks
08:03fliebelmrBliss: I'm to slow, but mine also says "Mac OS X"
08:04mrBlissjust found this: http://lopica.sourceforge.net/os.html
08:14LauJensenIs there a Javacomponents which renders html and evalutes JS? (aside from the Qt/webkit)
08:29cemerickLauJensen: http://www.webrenderer.com is the only viable "lightweight" option for swing AFAIK. Besides that, DJProject does a very good job of integrating swt's browser control into swing (resolving tough issues like interleaving of heavyweight and lightweight components). Then there's SWT, which supports mozilla across all platforms (defaulting to webkit on OS X and IE 7/8 on Windows).
08:30LauJensenExcellent, I'll check them out, thanks Chas
08:31LauJensenbtw - I wasn't trying to scare that guy with the Windows perf question last night - I was just reminded of some benchmarking results I saw a while back, where Clojure on Windows had some nasty spikes not seen on *nix
08:35LauJensencemerick: ^^
08:36cemerickLauJensen: you know me, always looking out for the great unwashed masses not using linux and emacs. ;-)
08:37LauJensenI know - And you had a valid point so Im glad you injected it - Im just saying it wasnt purely unbased Windows hatred :)
08:37cemerickwell, "windows is slow" isn't very ambiguous
08:38cemerickIt's fine, as long as you're holding up the extremist front, I can look like a moderate :-D
08:38LauJensenhehe
08:38LauJensenDon't worry, Im not going anywhere
08:44bozhidarI'm not an Windows user, but lets be fair
08:44bozhidarif almost everyone is using it - it can't be that bad
08:44bozhidar:-)
08:45LauJensenbozhidar: That kind of logic will get you killed
08:45bozhidarLauJensen: life will get me killed anyways ;-)
08:46cemerickbozhidar: Indeed, just another bargain between vendor and user, and a product of its history (just like everything else).
08:46bozhidarcemerick: I totally agree
08:46LauJensenbozhidar: By that logic PHP is the 5th best programming language in the world
08:46bozhidarLauJensen: good and bad are extremely subjective words
08:47LauJensen'if everybody uses it, it cant be that BAD' => PHP is the 5.th most deployed language in the world
08:47bozhidarif something has become that wide spread - it has to have some merits
08:47cemerickLauJensen: There's no "good" or "bad" involved -- just "works" or "doesn't work" for particular people/orgs and use-cases.
08:47LauJensenAlright - Lets leave it here while you ponder a career in PHP development :)
08:47bozhidarI personally don't like it very much, but I can see the appeal it has to many developers
08:48bobo_yes, join me in php hell!
08:48bozhidarlots of docs lying around, easy to get started, easy to deploy
08:48bozhidarcompare that to a java web app :-)
08:48bobo_honestly, php is less horrible then swing
08:48cemerickbozhidar: a much stronger comparison would be between mysql and SQLServer admin, but sure. :-)
08:49bozhidarbobo_: I've coded a lot of Swing - at first I hated it, but once you get used to it, it's not that bad. Actually that awful api gives you a lot of flexibility
08:49chouserI'm actually using PHP these days, and am rapidly cementing an informed opinion.
08:50chouser...which is entirely off topic, not to mention rude, so I'll keep it to myself.
08:50cemerickchouser: I think #clojure has been off topic all summer.
08:50fliebelchouser: I've used PHP for years, and still don't have any. PHP is like Rails in that respect, you don't need to know the language to produce something usefull.
08:50bozhidarchouser: I have such secret opinion about Visual Basic ;-)
08:51fliebelWhat does this mean? "Aleph conforms to the interface described by http://github.com/mmcgrana/ring, with one small difference: the request and response are decoupled."
08:51chouserbozhidar: me too! though mine wasn't secert. I made a web page detailing my opinion back in '97 or so.
08:53bozhidarreal story, guys - I go to a job interview for Java developer, they approve me and on the day of the contract signing the HR lady tells me this. "I saw in your resume that you worked 3 months on a PHP project, are you interested in becoming a PHP team leader instead of java developer?"
08:53bozhidarI was shocked and amused at the same time
08:53bozhidar:-)
08:55chouserI'm guessing your shocking and amusing answer was: "no"
08:55LauJensenbozhidar: why? 3 months of steady employment should be more than enough qualification to be a PHP team lead :)
08:55fliebelbozhidar: You became the PHP team leader I suppose?
08:55bozhidarchouser: indeed
08:55bozhidarLauJensen: I wasn't even working on something mainstream
08:56bozhidarwe were migrating the web UI of our flights booking engine
08:56bozhidarand there were to enough PHP devs to meet the deadline
08:56bozhidarso the C++ and Java teams were involved as well
08:57bozhidarbefore that I hadn't written a line of PHP code in my life and the framework we used for the UI was developed internally so this was not knowledge one could apply somewhere else
08:58bozhidarmy old employers were pretty fond of useless custom solutions to generic problems
08:58LauJensenI said 'steady employment', I meant the ability to get up in the morning and show up for work :)
08:58bozhidarbefore the PHP stint they had developed a programming language(!!!) that according to them was better than PHP :-)
08:59bobo_i can belive that
08:59LauJensenYea sounds plausible
08:59bozhidarbobo_: you haven't seen HTTL ;-)
08:59chouserthe Hyper Text Template Language!
08:59mrBlissI would like to see it!
08:59LauJensenThere was a story on HN a few months ago, about this guy being hired to work in JoeX ro something, a personal PHP variant
09:00LauJensens/ro/or/
09:00bozhidarchouser: yes, have you heard of it?
09:00chouserbozhidar: no
09:00bozhidarchouser: lucky man
09:01bozhidarbtw on the subject of Clojure
09:02bozhidaras I mentioned I do a lot of Swing dev and I was wondering something
09:02bozhidargenerally a Swing frame/dialog has a lot of GUI components in it
09:03bozhidarwhat is the preferred approach to model this in Clojure
09:04bozhidarin Java you'd usually have private fields for everything you plan to refer more than once(which is generally everything except labels and separators)
09:04LauJensenbozhidar: check out clojure.contrib.miglayout
09:05bozhidarLauJensen: 10x
09:05bozhidarmiglayout is my favourite layout manager, probably this is exactly what I need
09:06LauJensenThere's a nice wrapper for it, which also lets you label components and refer to them later by id
09:07bozhidargreat
09:07bozhidarjust what the doctor ordered
09:25mrBlisswhat's the recommended name for a test of a function (for example defn ms-to-minutes and deftest ms-to-minutes-test)?
09:44pdk,(sym "complex phrase as a symbol name")
09:44clojurebotjava.lang.Exception: Unable to resolve symbol: sym in this context
09:44pdk,(symbol "complex phrase as a symbol name")
09:44clojurebotcomplex phrase as a symbol name
09:44pdk\o/
09:45pdk,(symbol "\"that\'s amazing!\"")
09:45clojurebotUnsupported escape character: \'
09:45pdkwelp
09:45pdk,(symbol "\"that's amazing!\"")
09:45clojurebot"that's amazing!"
09:46pdkNOW THE QUESTION IS
09:46pdk,(keyword "\"that's amazing!\"")
09:46clojurebot:"that's amazing!"
09:49chouserpdk: that could stop working at any moment. Well, at any moment during which you upgrade clojure. Just so you know.
09:51nlogaxis anyone using aleph for something other than http stuff? i want to write an irc bot as my first project, but i can't find any good examples (and clojure is still fairly alien to me)
09:52nlogaxaleph looks inviting because it appears to hide the java stuff :)
09:52fliebelnlogax: I'm planing to do smtp and imap with it, but nothing done yet.
09:53fliebel(i'm planning A LOT, but not doing everything I plan)
09:53nlogaxheheh, same here
09:55mrBliss(inc that)
09:55chousernlogax: there are some nice Java IRC libs that would let you work at a higher level of abstraction
09:55chouserand even some clojure wrappers around those
09:55fliebelclojurebot: where are you?
09:55clojurebothttp://github.com/hiredman/clojurebot/tree/master
09:55bobo_http://github.com/Raynes/irclj isnt a wrapper
09:55bobo_belive clojurebot uses that aswell
10:03nlogaxi looked briefly at clojurebot, but it was a bit overwhelming. i'll try and pick it apart if i don't find anything else :)
10:04bobo_nlogax: what part is it you want to look at? the irc part?
10:05nlogaxbobo_: ideally i'd just like a socket to put stuff into and read stuff from
10:06bobo_i think you can look att irclj then
10:06nlogaxso i can learn something
10:06nlogaxwill do!
10:10LauJensenAnybody here tried Apache Pivot for a Desktop App?
10:26jkkrameris it ok to assoc a boatload of entries into a record? is it better to give it a single map field that you assoc into instead?
10:27jkkramerlike thousands or millions of entries
10:28chouserjkkramer: it's essentially a single map on the end of record anyway, so go ahead and dump in whatever you need.
10:28jkkramerchouser: thanks. i wasn't sure if there was some class field-generating magic behind the scenes or something
10:29mrBlisshow do you rebind private functions from another namespace? (for testing purposes ofc)
11:02simardcan clojure use java libs ?
11:02yacinyup
11:03simardwell, then it's perfect isn't it ?
11:03simardmore seriously, I was wondering why one would use clojure instead of, say, Lisp
11:03LauJensensimard: getting there
11:03LauJensensimard: Clojure is a Lisp dialect
11:03simardwhich makes it very attractive to me
11:04LauJensenIf you're wondering if why one would use Clojure instead of Common Lisp there are more reasons than I can count, and few against doing so
11:04simardbut I kinda dislike the way common lisp has relatively few libs
11:07LauJensenWhy the 'but' ?
11:07AWizzArdsimard: with ABCL it has exactly the same available as Clojure
11:07simarddunno :)
11:07AWizzArdit also has all the datastructures of Clojure available
11:09LauJensenAWizzArd: interesting, I didn't know that
11:09AWizzArdABCL is an implementation for the JVM.
11:09AWizzArdvice versa it means that you can compile tons of CL code with it to .class files and use those from Clojure.
11:10LauJensenAWizzArd: Why would you want to ?
11:10slyrusLauJensen: why would you want java interop?
11:10AWizzArdpeople may have a code base of a few ten thousand LOC written in CL•
11:10slyrusI have far more CL code than java code lying around I'd like to use from my clojure code
11:11slyrusclearly I am in the minority
11:11LauJensenAh like so
11:11LauJensenI guess I solved that with a rm -rf, once Clojure was released to the public :)
11:11AWizzArd;)
11:11AWizzArdAnyway, there are still plenty of highly experienced lisp users who prefer CL over Clojure.
11:11cemerickWow, what a niche: people with existing CL codebases that are usable in ABCL who would like to use them from clojure!
11:12AWizzArdThey will probably stick with CL.
11:12LauJensencemerick: Yea, you shouldn't start a business doing those ports
11:12AWizzArdI must mean that it is possible.
11:12LauJensen'CommonHarvest'
11:12AWizzArdmust => just
11:15chouserhttp://gist.github.com/560765#file_abomination_desolation.clj
11:20_fogus_chouser: now to allow forms like k = i + j :o
11:21chouser_fogus_: right, clearly this belongs in unfix
11:21_fogus_oooooooo!
11:21chouserthough without any parens at all, we'd need an expression terminator sigil -- but ; is taken.
11:21_fogus_"Are you tired of so-called "let-blocks"?
11:21chouserbut k = (i + j) could be made to work easily enough.
11:23LauJensenchouser: I dont understand, why would you do such a thing?
11:24chouserI think it would be possible to have a (start-using-dolet) macro that, when put just after your (ns ...) would make all do-blocks act like dolet
11:24chouser...allowing (fn [a] b = (inc a), (prn b))
11:25chouserLauJensen: for the sheer twisted joy of it.
11:25metagovchouser: I'd prefer the alternate abomination in that case: (fn [a] (let b (inc a)), (prn b))
11:26chousermetagov: hm.. that would actually be a breaking change. we'd need a different word than 'let'
11:26chouseroh, or maybe just look for a vector.
11:27LauJensenin pom.xml, what is modelversion ?
11:27chouser(let a b) is for the outer scope, (let [a b] ...) creates a new scope.
11:29LauJensenmodelVersion This element indicates what version of the object model this POM is using. The version of the model itself changes very infrequently but it is mandatory in order to ensure stability of use if and when the Maven developers deem it necessary to change the model.
11:31lpetithello
11:31lpetitchouser: what are you talking about ?
11:31chouserlpetit: http://gist.github.com/560765#file_abomination_desolation.clj
11:33lpetitchouser: it's for more easily be able to write code with side-effects ? :)
11:33chouserit's to demonstrate that Clojure's syntax is what it is not because it can't be like more imperative languages, but because it chooses not to be.
11:35lpetitchouser: ok. final touch for you book ? :)
11:36LauJensenlpetit: I think he's holding off until he's implemented (defmacro c++ [& body] ...)
11:36slyruschouser: what is outer scope?
11:36lpetitLauJensen: rofl
11:36lpetitBjarne, GET OUT of chouser's body :) :)
11:37chouserlpetit: nah, but maybe an addition to http://www.fogus.me/fun/unfix/
11:37LauJensenhehe
11:37LauJensenman fogus has the sickest webdesign chops
11:38chouserslyrus: the containing 'do' block that would have been converted to a 'dolet', so the enclosing do, fn, let, etc.
11:39LauJensenchouser: did you guys ever finish that shell on his site?
11:39chouserLauJensen: That's all _fogus_ -- I know nothing.
11:39LauJensenOh
11:40chouserwell, that didn't stir up nearly enough uproar. Should I tweet it?
11:41LauJensenchouser: naah just commit it to master, then tweet
11:42chouserheh. I think that would be my last commit.
11:43cemerickI don't think there'll be much uproar. People'll shrug here, and either not grok it elsewhere.
11:50chouserhm. dull.
12:03bortrebthe DESOLATION!!!!!!
12:03bortrebNOOOOOOOOOOOOOOO11111111111
12:05bortrebchouser: you sir, are a mad genius
12:43chouserbortreb: that's better. thanks!
12:43chouser:-)
12:43chouserI should mention this came out of dangerous conversations with metagov
14:01LauJensenYou get the funniest referers when running a website: http://www.ask.com/web?q=I+found+a+red+pill+that+was+cut+in+half+what+could+it+be%3F&amp;qsrc=0&amp;o=0&amp;l=dir
14:02raekløl
14:03_fogus_chouser: I added you to the unfix contributors, so feel free to add dolet if you feel motivated. :-) http://github.com/fogus/unfix
14:04LauJensen_fogus_: got push ?
14:04chouser_fogus_: :-) thanks
14:05_fogus_LauJensen: Sorry, I meant to but had a kid issue yesterday. I will try again tonight, unless a tar works better right now
14:06LauJensenNo problem, kid issues take priority 10 out of 10 times :)
14:07RaynesLauJensen: 9.5 out of 10 times if you can type and change diapers at the same time.
14:09s450r1but still 10 out of 10 times if you can type and change diapers at diapers at the same time but have twins
14:09LauJensenRaynes: I guess that explains your code.... :)
14:12jfields(= (:price-in-pennies desired) (:price-in-pennies resting))
14:12jfieldsis there a more elegant way to do that?
14:14RaynesLauJensen: I don't change diapers while I code. I have a strange habit of eating difficult foods while coding, however.
14:14LauJensendifficult foods? Sounds unproductive, just have a slice of bread
14:15Raynes:p
14:16dnolenjfields: a little shorter (reduce = (map :prince-in-pennies) [desired resting])
14:16_fogus_jfields: (apply = (map :price-in-pennies [desired resting])) might make for a more generic approach
14:16_fogus_dnolen: too fast!
14:17dnolen_fogus_: but you win by being 2 chars shorter ;)
14:17_fogus_YAY!
14:18jfieldsthanks guyas
14:18jfieldsguys
14:18_fogus_guyas means "gentlemen of great passion" in cambodian
14:23_fogus_Someone kick me for ever thinking that discussing parens was a good idea
14:34_fogus_Is there a better way to do (f (butlast s) (last s)) ?
14:35danlarkin(apply f (drop (- (count s) s) s))
14:36danlarkinbut that is certainly not better
14:36danlarkiner
14:36danlarkinI typoed it
14:36LauJensen_fogus_: only if its a vector
14:36_fogus_yeah, it's actually (fn [& s] ...)
14:37dnolen_fogus_: perhaps another reason to support destructuring from the end?
14:38_fogus_dnolen: That would be very nice.
14:38_fogus_Although my specific case is too obscure to warrant a change
14:38_fogus_http://gist.github.com/561132
14:39dnolen(fn [$head x] ...) ?
14:40_fogus_(fn [[front &middle end]] ...) ?
14:42Anniepoo_this should be trivial, but it's driving me nuts - I want to write a concurrancy-safe 'pop' operation.
14:43LauJensenAnniepoo_: (swap! atom pop)
14:43replacajave: are you there?
14:43Anniepoo_Lau, I want the top item
14:44Anniepoo_if I do (first @atom) beforehand it's not in the transaction
14:44LauJensen(dosync (let [p (first @ref)] (alter ref pop) p)) ?
14:45Anniepoo_ok, thanks.
14:45Anniepoo_dunno why that seemed so hard.
14:45chouserit's hard with an atom
14:45Anniepoo_I'd convinced myself that wouldn't work
14:45LauJensenchouser: impossible you mean?
14:46chouserno
14:46chousermessy
14:47LauJensenCan you demo ?
14:49chouser(defn atom-pop [a] (let [box (clojure.lang.Box. nil)] (swap! a #(do (set! (.val box) (peek %)) (pop %))) (.val box)))
14:50chouser^^ messy
14:50LauJensenNasty
14:50LauJensenBut yes, it would work :)
14:50javereplaca: hello
14:52chouserhttp://clojure-log.n01se.net/date/2010-08-18.html#11:14
14:55LauJensenchouser: Thats really one of the charms of #clojure, on the one hand you and Rich are discussing concurrency semtantics, and at the same time Raynes is pondering how to manually crack eggs - true concurrency! :)
14:57AWizzArda bit cleaner: (defn atom-pop [a] (let [p (promise)] (swap! a #(do (deliver p (first %)) (pop %))) @p))
14:58AWizzArdPromise injection rocks :)
14:58chouserAWizzArd: nice. though that's likely heavier.
14:59AWizzArdyes
14:59chouserthe Box in mine never escapes so there's no need for concurrency support (extra atoms, countdown latches, etc)
14:59chouseryou really do want what rhickey described.
15:00chouser(swap2! stack (fn [v] [(pop v) (peek v)]))
15:00AWizzArdchouser: he described this where you just linked to?
15:00chouser(defn swap2! [a f & args] (let [box (clojure.lang.Box. nil)] (swap! a #(let [[state rtn] (apply f % args)] (set! (.val box) rtn) state)) (.val box)))
15:00chouserall he said was "you might want a version of swap! that takes a fn that returns 2 values, the one to swap and a return"
15:01AWizzArdic
15:02chouserI would guess it would act something like my swap2! above
15:02chouserI wonder if 2 fns would be better than returning a vector.
15:04chouser(swap2! stack pop peek)
15:05raekimplicit juxt...
15:06chouserhm, yeah.
15:06raek(swap2! stack (juxt pop peek))
15:06_fogus_implicit juxt is the point of th my cleave fn
15:07_fogus_"my" as in the one I stole from countless others
15:10slyrusoh, I've been wanting something like juxt and forgot that was there.
15:14slyrusexcept that the one I was thinking of would have been more like (my-juxt [+ - +] 42 7)
15:18replacajave: sorry, got pulled into a meeting :-)
15:18replacajave: if you add info-file building to the autodoc stuff, I'd be happy to merge it into the normal autodoc build
15:19raek_fogus_: what is this "cleave fn"? (loved the part about functions returning functions in JoY, btw)
15:19javereplaca: cool
15:19replacajave: I don't think it should be too hard, you should be able to just have a "copy" of build-html.clj that is a build-info.clj
15:22@rhickeychouser: you wouldn't want to define sawp2! in terms of swap!
15:22chouserrhickey: yeah
15:22chouserthose were just meant to demonstrate the api
15:22chouserdemonstrate and try out
15:25@rhickey2 fns is interesting, because it demonstrates the only interesting case is where they are both functions of the prior value
15:25@rhickeysince a function of the resulting value could be called after swap! returned
15:26chouserpassing the same extra args to both seems a little arbitrary though
15:26chouserfine when there are no extras as with pop and peek, but otherwise not obviously desirable
15:26@rhickeyI'm wondering about the utility in general. Does someone have a use case that doesn't involve side effects?
15:27javereplaca: I tried to run autodocs, but couldnt get it to run. README.md could mention how to run it maybe? I guessed "lein deps" but that failed on a missing artifact
15:30chouserThere'd be a potential use case anytime you're doing something destructive to the value in the atom.
15:30chouserpop is one such, but also dissoc and disj
15:30chouserpossibly even rest or next, I suppose.
15:32replacajave: it's in a little bit of an intermediate state at the moment. It won't work with lein 1.2/1.3 as a plug-in, but I think it will work standalone
15:33javebut I need to build it to run it standalone right?
15:33replacaif you want to do it against clojure core, you'll need to set up the directories right casue that one is done mostly by magic
15:33raekcould one make a priority (set-)queue using this and a sorted-set? the pop operation would let (first queue) and dissoc it...
15:34@rhickeychouser: it could just return both values and be done with it
15:34replacamore doc on running standalone is at http://tomfaulhaber.github.com/autodoc/
15:34replacabut it may have some probs right now
15:35javeah Thanks
15:35replacajave: to set up a clojure build you need to make a ../autodoc-work-area directory and make a clojure subdirectory there
15:35chouserrhickey: hm, nice. The cost of constructing the return value wouldn't be prohibitive?
15:36hiredmanyou could also use binding and set! to emulate multiple returns
15:36javereplaca: but in order to hack in info support I need to build autodocs right?
15:37@rhickeychouser: impossible to answer generally
15:37replacajave: then clone clojure sources into src/ and autodoc/ and, in autodoc, do a "git checkout gh-pages"
15:37replacajave: yeah, but that should work ...
15:38chouserrhickey: maybe two (or three?) flavors of swap! then? return old, return new, return both? :-/
15:38@rhickeychouser: pass in a pod
15:38hiredman(binding [*r1* nil] (swap some-atom (fn [x] (set! *r1* (pop x)) (peek x))))
15:38replacajave: maybe it's breaking cause of new leiningen
15:38hiredmanswap!
15:38replacajave: I still have lein 1.1 on my machine and lein deps, lein uberjar seems to work fine
15:39hiredmans/clojurians/pod people/
15:40chouseroh, you just mean use a pod the way I used Box and hiredman used a Var?
15:40javereplaca: I commented out the lein dev deps in the project.clj, lein deps works then
15:42javereplaca: and "lein autodocs" seems to do something. crashes, but at least starts.
15:42replacaoh, ok. I'll check out what's up there.
15:42simardwhat is better practice, using [1 2 3] or '(1 2 3) and why ?
15:42replacajave: don't use the lein plugin
15:42replacaare you aiming to create info file for clojure itself?
15:42javeyes
15:43ihodessimard: it depends on the situation, but generally [x y z] is used in favor of '(x y z) because it's easier to type and read, and vectors are often faster for the job.
15:43javereplaca: but I could try something simpler 1st
15:43jave
15:43replacajave: clojure itself is different than other things cause autodoc needs to play more games wrt versions and assumptions
15:43simardihodes: k
15:43replacajave: but it should be fine - just a different setup and invocation path
15:44replacajave: in fact it may be better because I've been exercising it a lot lately :-)
15:44raeksimard: when containing self-evaluating things only, they're pretty much equivalent (unless you care about what data structure it is). the vector form is the one I tend to see most as a sequential data literal (and has the most clojure-y feel, for me)
15:45replacajave: just create the directories as described above and then run "./run.sh clojure false" from the root of your autodoc checkout tree
15:45javereplaca: ok
15:46jlf`anyone have a recommendation about which of the many couchdb clojars to use?
15:46replacajave: it will generate new doc in ../autodoc-work-area/clojure/autodoc
15:46jlf`i initially tried the-kenny's, but compilation fails with " error: java.io.FileNotFoundException: Could not locate clojure/contrib/json/read__init.class or clojure/contrib/json/read.clj on classpath:"
15:46@rhickeychouser: pass the pod in
15:46replacajave: interesting config stuff for clojure is in params/clojure/
15:47s450r1jlf`: clutch worked nicely for me
15:48jlf`s450r1: that narrows it to 6 :) which one in particular?
15:53s450r1jlf`: http://github.com/ashafa/clutch
15:55jlf`thanks
15:57hiredmanI wonder if the clojure mailing list could just move to a new address and not tell people who want to argue about paren placement
15:57Rayneshiredman: I second that motion.
15:58slyrus:)
15:58LauJensenhehe
15:59LauJensenWhats the name of that thread?
15:59LauJensen"Lisp/Scheme style guide" ?
15:59lancepantzmaybe just a faq would do
16:00lancepantzthen point those qs at the faq and ignore thme
16:00LauJensen_fogus_: "The beauty of the painting is not that you hang it upside down" haha, classic
16:02_fogus_LauJensen: I've decided to never talk about parens again
16:02hiredmanor just have gmail mark emails from greg as spam
16:02LauJensen_fogus_: Im sorry to hear that, I thought your post was hillarious
16:02LauJensenI actually never thought I would get to meet someone who could out-troll me :)
16:02_fogus_Funny, but pointless
16:05_fogus_If I would have first read the post equating people who dislike that style with segregationists, I would have never bothered to post in the first place.
16:05_fogus_Oh well, live and learn
16:05somniumwaaay late just noticed 'the abomination', and can't resist pointing out that its the identity monad: `do x <- blah; y <- blarg; blotz; quux'
16:06LauJensenI love how monads turn everything into 'blah blarg blotz quux' :)
16:06hiredmanwhat abomination?
16:06somniumLauJensen: ooh, let me dig up something really abomniable
16:06LauJensenhiredman: http://gist.github.com/560765#file_abomination_desolation.clj
16:07somniumhttps://gist.github.com/0508e6219da9ee0adc01
16:08hiredmanyeah, it does look like chouser is reaching for do notation
16:08somnium(maybe it could scare some sense into the paren haters)
16:08hiredmanwell, there is the monad namespace in contrib
16:08somniumits awfully ungainly though
16:09LauJensensomnium: I cant look at that
16:09somnium:D
16:09hiredmansomnium: but it also comes with a modaic io namespace
16:09somniumhiredman: isnt that just absurd in a non-lazy impure language?
16:10somniumor, you were probably being ironic
16:10hiredmanbut clojure operations can be lazy
16:10hiredmane.g. line-seq
16:10hiredmanwhich can cause problems
16:11hiredmanbeing able to safely compose that stuff is good
16:12hiredmanI think arkham is an interpreter monad
16:12hiredmanhmmm
16:12somniumhmm, Ill have to actually look at monadic io
16:12hiredmanmaybe not
16:13somniumI found a way to spoof return type inference, with a deftype UnTyped, then a protocol for each Monad that 'injects' its type into the UnTyped object
16:13hiredmannot to say I have ever used contrib monads or the io stuff
16:13ihodeshiredman: maybe clojurebot could auto-kick anyone who mentions "style" and "parens" in the same sentence?
16:13somniumbut once I got it working it all seemed a bit ridiculous
16:13hiredmanclojurebot doesn't have ops
16:13hiredmanor there would be a lot more kickage
16:15hiredmanI've been trying to get return type inference for Archimedes working
16:15hiredmangiven two numeric types, and a hierarchy of numeric types and rules for return types based on that hierarchy
16:15danlarkinhindley milner?
16:16hiredmanI have haerd of it, but I don't know anything about it except for the name
16:16danlarkinclojurebot: google hindley milner
16:17hiredmanmaybe I should look into it
16:17danlarkinnoooooooo where's clojurebot
16:17hiredmanoh
16:18hiredmanhuh
16:18hiredmannetplit out in lalaland maybe
16:24jlfs450r1: would you mind sharing your [query_servers] incantation from local.ini? i get a 500 error when i run the usage example in the clutch readme, and i suspect i'm not specifying the clutch view server properly
16:27s450r1jlf: sorry, I never played with clutch's view server
16:28jlfoh, you just omit :language "clojure" from the get-database map?
16:29hiredmanclojurebot: google hindley milner
16:29clojurebotFirst, out of 4760 results is:
16:29clojurebotType inference - Wikipedia, the free encyclopedia
16:29clojurebothttp://en.wikipedia.org/wiki/Type_inference
16:34s450r1jlf: I used (clutch/set-clutch-defaults! {:host host :port port}) and clutch/with-db to connect
16:38somniummaybe we should get comp.lang.lisp involved in the Lisp/Scheme Style Guide thread
16:39RaynesOh boy.
16:46LauJensenI vaguely recall that theres some repl trick for seeing the constructors of a class?
16:48somnium,(ancestors (class 'foo))
16:48clojurebot#{java.util.concurrent.Callable clojure.lang.IMeta java.lang.Runnable java.io.Serializable java.lang.Object clojure.lang.IObj :clojure.contrib.generic/any clojure.lang.Named java.lang.Comparable clojure.lang.AFn clojure.lang.IFn}
16:48somniumlike that?
16:49LauJensenNo - I mean something like (Constructor type1 type2 type3)
16:49somniumoh, c.c.repl-utils/show?
16:49LauJensenmaybe, I'll check
16:51chouser(show Integer #(re-find #"<init>" (:text %)))
16:56LauJensennice chouser, thanks
16:56LauJensenand thanks to somnium for pointing the way
17:03chouser(doseq [c (.getConstructors Integer)] (println c))
17:04LauJensennice
17:04jfieldswould you use update-in here: (swap! resting update-in [client-order-id] - quantity)
17:06Chousukelooks fine to me.
17:07jfieldscool. just wanted to make sure there's not a better fn to use when your keyseq is (count 1)
17:07Chousukeheh, yeah. a special case called just "update" or update-key would look a bit better.
17:22AWizzArdAnyone here who programmed an application for Android in Clojure?
17:36defn"Wait, what does your startup do?"
17:36Anniepoo_AWizzArd - find George Jahad, he's done it
17:36defnSo, basically, it's like an API for pets.
17:37kotarakIt starts up?
17:37defnSo basically, it's like Flickr for ex-convicts!
17:37defnlol. http://itsthisforthat.com/
17:39tomoj"node.js server for collegiate jewish women"
17:39defnbahahaha.
17:39defnFinally!
17:39defnI like the ones that are for 'nature blogs'.
17:40Anniepoo_lol - a plugin manager for government corruption
17:41defnhahahahahahahaha. ah man, brilliant site.
17:42Anniepoo_lol - the scariest part is that one small part of my brain is going 'hmm... that's not a bad idea'
17:42defnyeah I know -- same here...
17:42defnSo basically, it's like a mac app for ugg boots.
17:43defna mapreduce query for baristas. lol
17:46Anniepoo_even scarier, I've seen some of these deployed - there IS a flickr for Second Life
17:46defnyeah i think ive seen a "jewbook" or something -- so there's your collegiate jewish women app
17:47Anniepoo_LOL - 'eco friendly marketplace for hunters'
17:47Anniepoo_hey, government corruption's a multi-trillion dollar business globally
17:47Anniepoo_owning the API for it would be worth big bucks
17:49Anniepoo_8c( sadly, the truth is, 'they get paid'
17:49defnslyrus: yeah, they only pay a dime (literally 10c) for each layer of depth in the hierarchy
17:49defngotta get deeper! (that's what she said)
17:49Anniepoo_viral marketer for medical marijuana - sadly, done thousands of times
17:49defnseriously?
17:50defnSo basically it's like a cloud storage provider for the homeless.
17:50Anniepoo_hmm.... probably not commercial - a wikipedia for Erlang
17:51Anniepoo_LOL - CRM for adult dating
17:52Anniepoo_oh heck, there's one I seriously considered
18:00defngame-based incentive for beer.
18:00defnbeen done.
18:00defnbrick-and-mortar solution for government corruption. heh
18:01Anniepoo_been done
18:01Anniepoo_recommendation engine for ex-convicts
18:05Anniepoo_somewhere there's a movie treatment generator that scrapes IMDB
18:09defnhaha -- this one produces a lot of funny results: playboy for ____
18:09defnas in playboy for government corruption, ex-convicts
18:18Chousuke"cash4gold for world of warcraft" duh
18:21defndigg for highway accidents
18:47slyruswhat the hell is an artefact anyway? and why don't they spell it artifact?
18:58Anniepoo_hmm.... should be possible to make a version of this that actually generates the code....socially, that seems like a bad idea.
18:58Anniepoo_maybe you could automate the entire startup process
18:59slyrus"Normally you do not need to set the level of a logger programmatically. This is usually done in configuration files." Oh java-people, why, oh why, do you crave such needless complexity? Oh wait, it's because gosling et al. didn't give you a REPL. nvm.
19:00Anniepoo_for that matter, exactly WHY do we need to change languages to set the level of the logger?
19:02slyruswhich, for me, is another way of saying how-the-&$!)^% do I meaningfully turn on logging in one of these accursed, omnipresent log4j loggers from the clojure REPL?
19:03slyrusI can .setLevel the relevant logger, but darned if I know where the output is going
19:03Anniepoo_I'm glad to hear I'm not the only person who finds this immensely annoying
19:04Anniepoo_slyrus, I think you have to change the class of the logger to change where it's going
19:04ssiderispersumably stdout for warnings and such, and stderr for errors
19:04slyrusholy-misguided object orientation batman!
19:05Anniepoo_log4j has a bunch of kinds of loggers - the idea is to plug in the one you need
19:05slyrusthen again the logger has to work in tomcat, netbeans, eclipse and a bunch of other crap I have absolutely no interest in
19:05Anniepoo_which is borked
19:05slyrusoh, clearly I just need to call the AbstractDelegateLoggerFactoryGeneratorFactory
19:27ihodesis there a particular reason line-seq is in the core lib instead of in, e.g., clojure.java.io?
19:28hiredmanc.l.i didn't exist when line-seq was written
19:28hiredmanc.j.i
19:28ihodeshiredman: right, but it's 1.2 now; couldn't it have been moved?
19:29ihodeshiredman: i guess i'm more interested if it was usuable sans BufferedReasder. direct interop before (reader… and the like
19:29ihodesusable* and BufferedReader* excuse me
19:29hiredmanit is
19:29hiredmanand was
19:29hiredmanmoving it would break any code that uses it
19:30ihodeshow was it usable?
19:30hiredman(line-seq (-> "foo.txt" File. FileReader. BufferedReader.))
19:30hiredmanpardon me
19:31hiredman(-> "foo.txt" File. FileReader. BufferedReader. line-seq)
19:31ihodesright, that used BufferedReader directly. which is fine, i was just wondering if that'd always been the case, or if there used to be something in clojure.core that could be used with line-seq
19:32hiredmanwhats wrong with using BufferedReader directly?
19:32ihodesnothing at all, just wondering
19:42bhenryis there anything in clojure that works kind of like a reverse engineer of format? ie (extract "%d-%d-%d %d:%d:%d" "2010-08-31 14:52:31") => [2010 8 31 14 52 31]
19:42defnregex?
19:42clojurebotSometimes people have a problem, and decide to solve it with regular expressions. Now they have two problems.
19:42defnhaha
19:45bhenrydefn i think python has something like what i'm talking about. i was curious about an existing function. i don't really want to write crazy reg-ex beasts
19:45defnbhenry: im not familiar with one but well
19:45defnyou could write a macro
19:46bhenryi think i'll just pull apart the pieces
19:46Anniepoo_you're looking for something equivilent to sscanf?
19:47bhenryAnniepoo_: yes
19:48Anniepoo_I'd write the regex monster once
19:49ssideristhe regex is not that big anyway: \d{4}-\d\d-\d\d\s+\d\d:\d\d:\d\d
19:49ssiderisxm... no groups though
19:50ihodes(re-split #"-| |:" "string") right? don't recall offhand
19:50ihodesthen map int
19:51ihodes,(clojure.string/split "2010-08-31 14:52:31" #":|-| ")
19:51clojurebotjava.lang.ClassNotFoundException: clojure.string
19:52ihodes(map #(Integer. %) (clojure.string/split "2010-08-31 14:52:31" #":|-| ")) works in my REPL
19:53ihodesthough it's not extracting your specific format.
19:53bhenryi'll see if i can make it work
19:54ihodesanother option for parsing times is looking at clj-time. you can specify a time format, and it'll return a DateSomething object that you can do whatever with.
19:55bhenry(map #(Integer. %) (clojure.contrib.string/split #":|-| " "2010-08-31 14:52:31")) worked in my repl
19:55bhenry,(map #(Integer. %) (clojure.contrib.string/split #":|-| " "2010-08-31 14:52:31"))
19:55clojurebot(2010 8 31 14 52 31)
19:55bhenrynice thanks ihodes
19:56chouseryou can just use .split on a regex
19:56chouser,(map #(Integer. %) (.split #":|-| " "2010-08-31 14:52:31"))
19:56clojurebot(2010 8 31 14 52 31)
19:58ihodesright, and split is on clojure.string now anyway :)
20:12ninjuddhmm, does anyone know why the separator is the second argument of clojure.string/split but it is the first argument of clojure.string/join?
20:17chouseroh man
20:17chouserseriously?
20:18ninjuddchouser: yeah. i thought there might be some deep reason for it
20:19chouserprobably because the string is the first arg to all of them.
20:19tomojninjudd: which clojure.string/split are you looking at?
20:19tomojoh, I see
20:20ninjuddhmm
20:20ihodesninjudd: i always have to go back to the docs when i use split…
20:20ihodesmaybe one day i'll remember
20:20chouserI wouldn't bother using it. Just use .split
20:21ihodesbut it has the *dot* yecck. ;) i think i will-thanks for the pointer
20:22ninjuddyeah. the only thing i don't like about String.split is that you can't pass a regex in, it has to be a string that it compiles to a regex
20:22chouserwell, and it'll come back to bite me as clojure reaches other platforms.
20:22chouserninjudd: use regex's split instead of string's.
20:23chouser,(.split #"/" "a/b/c/d/e/f" 4)
20:23clojurebot#<String[] [Ljava.lang.String;@92949f>
20:23chouser,(map keyword (.split #"/" "a/b/c/d/e/f" 4))
20:23clojurebot(:a :b :c :d/e/f)
20:23ninjuddaha. of course!
20:25sleepynateclojurebox on windows makes me sad :/
20:26chouserninjudd: it took me a surprisingly long time to find that.
20:28defnsleepynate: is that the one that includes emacs and stuff?
20:28sleepynatedefn: yea. i'm a vim guy... and i have all linux boxes except the one vista machine. transitioning is rough :)
20:29sleepynatewithout starting and editor war: "the only emacs command I know is C-c C-x"
20:30sleepynatebut getting vimclojure working on *nix boxes was hard enough... screw trying it on windows
20:31ssiderisin perl, there is this compiler hack (built-in) that allows you to write qw(a b c) and it compiles as ("a", "b", "c"). Is the following a correct re-implementation of something equivalent in clojure?
20:31ssideris(defmacro qw [& symbols] `(quote ~(map #(str %) symbols)))
20:31defnsleepynate: on windows ive been using netbeans
20:32sleepynatedefn: ahh yea. counterclockwise was my fallback for a while
20:32defnusing emacs on windows is kind of painful
20:32sleepynatebut i'm also a scheme-not-java person.. and eclipse took care of that til i got used to it
20:32defnso many of the things written for it are not for windows
20:32defnplus windows sucks and i hate it
20:33defnso there's that
20:33sleepynatehaha, right?
20:35defnI think Clojure running on the CLR is awesome because it's the CLR
20:35defnerr because it's clojure
20:36defnnot because it's on the CLR :)
20:36sleepynatesure. doesn't that break things like Math/sqrt though?
20:39chouserssideris: looks good to me
20:42ssiderischouser: thanks... my main problem is that I don't think I fully grasp what's going on here... the macro is passed a number of symbols that are then converted to a Seq of strings which is then what?
20:42ssideris...inserted into the parse tree?
20:42ssiderisi think i'm having trouble getting rid of the idea that macros are about generating text
20:43ssiderisgenerating text as in generating code
20:43defnmacros are about generating macros that generate macros that generate macros that generate macros...that generate text
20:43coldheadyo dawg i heard you like generating macros?
20:43ssiderishahaha
20:43ssiderisyeah i know about the recursiveness and all
20:44ssiderisbut is the end result really text?
20:44ssiderisin rhickey's talk he seems to imply that they generate sexps
20:45defncode is data
20:45defnwouldn't be a lisp without it
20:47ssiderisyes, but you said "text"
20:47ssiderisyou didn't say "code"
20:50Derandersleepynate: my dependence on *nix has gotten to the point where when I'm forced to use windows for a sustained period of time I will use a linux vm.
20:56sleepynateDerander: yea... i really only boot windows to play battlefield with all my buddies who married or moved away :)
20:57sleepynateDerander: "no honey, go on out with the girls... you need some woman time!" ... <launch vent> ... "k guys, game on"
20:59Deranderhahaha.
21:27simardis there a function/macro that does the same thing as macroexpand but recursively ?
21:28sleepynatesimard: http://github.com/richhickey/clojure/blob/a1eff35124b923ef8539a35e7a292813ba54a0e0/src/clj/clojure/core.clj#L3086 <--- looks pretty recursive to me
21:29tomojmaybe you want c.c.macro-utils/mexpand-all
21:31sleepynategood call
22:48slyrusoh, this makes me feel better: "All of this content is automatically generated by Maven on behalf of the project."
22:51slyrusjava: "we've got a lot of libraries!" or "you're going to need a lot of libraries, even if you only want one or two!"
23:01AWizzArd /away away
23:01AWizzArdoops