#clojure logs

2009-02-13

04:14punyahi
04:22AWizzArdHello punya
04:23punyai'm fairly new to clojure, and i'm wondering if it would be reasonable to make the basic arithmetic ops multimethods
04:23punyai'm sure people have asked this before me, so could you point me somewhere to look?
04:24jdzpunya: what exactly do you mean by basic arithmetic ops?
04:24jdzpunya: you want + to concatenate strings or what?
04:24punyajdz: add vectors, actually
04:25jdza bad idie
04:25jdzidea even
04:25jdzwhat does it mean to add two vectors?
04:25punyajdz: vectors (in the mathematical sense) are tuples of numbers
04:25jdzwhatever your answer is i can find another one that's different
04:25punyajdz: you add them componentwise
04:26punyajdz: i mean vectors the mathematical object, not vectors the data structure
04:26jdzwell, and Clojure is not APL you know
04:26punyajdz: true enough
04:26punyajdz: i didn't mean that the standard library should include such a definition
04:27punyajdz: i agree with you, that would be a terrible idea because other people might not want their vectors added the way i want mine
04:27HolcxjoI assume many people would object to the performance hit that everyone would take on arithmetic
04:27punyaHolcxjo: absolutely
04:28punyano, i was wondering if rebinding + to a generic method in my own namespace was a reasonable thing to do
04:28jdzthe correct soluition is to create your own namespace and define whatever functions with whatever semantics you want there
04:28punyajdz: okay, we're in agreement then
04:29punyajdz: is it considered good coding style to shadow names from the clojure core?
04:29jdzpunya: not really, if you want other people to read your code.
04:29jdz(read and understand, that is)
04:31HolcxjoWell, he won't change the semantics of the op
04:31Holcxjojust extend it -- thus understanding the code should be ok
04:31punyaHolcxjo: not quite -- people who expected to get an exception when adding vectors will now get a different behavior
04:31HolcxjoSome calls to +, - etc might baffle the reader but I don't think that's a big problem
04:32HolcxjoConsider the alternative of having to use other names for the usual arithmetic ops
04:32Holcxjo... *that* would make code unreadable
04:32punyathat's what i'm doing right now
04:33jdzanyway naming the function add-vectors or vector-sum instead of overloading + would be better, imo
04:33punyaokay, thanks for your inputs!
04:33punyai'm going with names like "add", "scale" etc for now
04:34jdzpunya: cool, that way you won't have to write + as clojure.core/+ :)
04:34punyajdz: right, i realized i wasn't going to buy any brevity by shadowing
04:35Holcxjojdz: He wouldn't have to write that (except for the overload definition of + for numbers)
04:36jdzand in some other places (like inner loops) where performance matters
04:36Holcxjojdz: that's the whole point -- his formulas would be completely natural and readable to anybody used to mathematics
04:36punyaHolcxjo: that was what i thought originally
04:36jdzi'm not telling that he can't do it. i'm just trying to point out tradeoffs
04:37HolcxjoI thought we had established that performace would suffer and that he was going for readability rather than absolute performance -- anyway -he can always create an alias for the core + (scalar-+ or something like that)
04:38punyaone nice feature of using separate names for scalar and vector ops is that it serves to document which one i expect to see in a particular place
04:39punyaaccidentally passing in a scalar in place of a vector will fail sooner
04:39jdzusing a name like "sum" and "product" would feel as natural to mathematician as + and * (and it is not actually * in mathematics, really, it's �)
04:40jdzand it's not mathematcians who will read the code, it's programmers :)
04:41punyajdz: i certainly hope mathematicians and programmers aren't disjoint sets
04:41punyajdz: but i take your point
04:42jdzwell, what i wanted to say is that if somebody reads code, he will know what to expect from the code, and would not want to assume that rules of mathematics are at work.
04:53p_ljdz: I get COBOL vibes from that
08:42gnuvince~seen rhickey
08:42clojurebotrhickey was last seen in #clojure, 861 minutes ago saying: that's the only promise made by the sequence fns
08:42gnuvince,(/ 861.0 60)
08:42clojurebot14.35
09:24AWizzArd,(doc future)
09:24clojurebot"([& body]); Takes a body of expressions and yields a future object that will invoke the body in another thread, and will cache the result and return it on all subsequent calls to deref/@. If the computation has not yet finished, calls to deref/@ will block."
09:24AWizzArd,(doc future-call)
09:24clojurebot"([f]); Takes a function of no args and yields a future object that will invoke the function in another thread, and will cache the result and return it on all subsequent calls to deref/@. If the computation has not yet finished, calls to deref/@ will block."
09:29Holcxjo,(let [f (future (do (Thread/sleep 5000) 'done))] (dotimes [i 10] (print i (.isDone f) " - ") (Thread/sleep 1000)) @f)
09:29clojurebotExecution Timed Out
09:29Holcxjo,(let [f (future (do (Thread/sleep 3000) 'done))] (dotimes [i 5] (print i (.isDone f) " - ") (Thread/sleep 1000)) @f)
09:29clojurebotdone
09:29clojurebot0 false - 1 false - 2 false - 3 true - 4 true -
09:30Holcxjoexecution timeout?
09:30Chousuketook more than 10 seconds
09:30cooldude127Holcxjo: i believe clojurebot cuts execution
09:30cooldude127after a certain amount of time
09:30HolcxjoI was hoping it'd tell me what the cut-off is...
09:33durka42sandbox.clj:9 (def *default-timeout* 10) ; in seconds
09:33durka42clojurebot: execution timeout is 10 seconds
09:33clojurebotRoger.
09:34HolcxjoLet's see...
09:34Holcxjoexecution timeout?
09:34durka42~timeout
09:34clojurebotexecution timeout is 10 seconds
09:34durka42clojurebot: how long will you give my code for execution?
09:34clojurebotfor is not a loop
09:34durka42:)
09:35durka42clojurebot: how long before the timeout is triggered?
09:35clojurebotIt's greek to me.
09:35durka42clojurebot: be more fuzzy
09:35clojurebotGabh mo leithsc�al?
09:43durka42clojurebot: what is the sandbox timeout?
09:43clojurebotsandbox is http://calumleslie.blogspot.com/2008/06/simple-jvm-sandboxing.html
09:43durka42clojurebot: what is the sandbox execution timeout?
09:43clojurebotsandbox is http://calumleslie.blogspot.com/2008/06/simple-jvm-sandboxing.html
09:43durka42clojurebot: what is the execution timeout in the sandbox?
09:43clojurebotexecution timeout is 10 seconds
09:44durka42first match apparently
09:44durka42clojurebot: botsnack
09:44clojurebotthanks; that was delicious. (nom nom nom)
09:50alinpopaclojurebot: botsnack
09:50clojurebotthanks; that was delicious. (nom nom nom)
09:50alinpopa:)
09:53clojurebotsvn rev 1279; added intCast from char/byte/short
09:59AWizzArd,(let [x (delay (will-define-this-later 10))] (println 10))
09:59clojurebotjava.lang.Exception: Unable to resolve symbol: will-define-this-later in this context
10:00gnuvince~seen Chousuke
10:00clojurebotChousuke was last seen in #clojure, 29 minutes ago saying: took more than 10 seconds
10:00gnuvince~seen Chouser
10:00clojurebotChouser was last seen in #clojure, 637 minutes ago saying: good enough.
10:00AWizzArdWhy does the delay produce an error when I use a not yet defined function?
10:01jbondesonAWizzArd: probably because while it doesn't execute, it does attempt to check the validity of the enclosed function.
10:01jbondesonit needs to have the proper scope in the delay object
10:01Chousergnuvince: looks like 1279 is for you
10:02Chouser(bit-and (int (.get (ByteBuffer/allocate 10))) 0xff)
10:02rhickeyChouser: yes, message on the way to group
10:02gnuvinceChouser: I thought so too, but it's not; I tried it already and the reflection warning are still there
10:02jbondesonhmmmm
10:02AWizzArdbut if the delay is lazy, how can Clojure check what I do inside it?
10:03ChouserAWizzArd: the code still gets compiled, which is when var resolution is done
10:04gnuvince,*warn-on-reflection*
10:04clojurebotfalse
10:04gnuvince,(set! *warn-on-reflection*)
10:04clojurebotjava.lang.IllegalArgumentException: Malformed assignment, expecting (set! target val)
10:04gnuvince,(set! *warn-on-reflection* true)
10:04clojurebotjava.lang.IllegalStateException: Can't change/establish root binding of: *warn-on-reflection* with set
10:05gnuvince,(binding [*warn-on-reflection* true] (short (bit-and (byte 0) (byte 0xff))))
10:05clojurebot0
10:05gnuvinceWe don't get the warnings?
10:05durka42i believe clojurebot can't do bind
10:05durka42because it uses try-catch
10:05Chousergnuvince: the warn flag is checked at compile time
10:05gnuvinceah
10:05hiredman_durka42: uh?
10:05jbondesonAWizzArd: also, delay will execute the function with your current scope, so if a var is unbound and you bind it later you'll still get the unbound
10:06durka42hiredman_: i thought clojurebot didn't do try/catch blocks?
10:06jbondeson(unless i'm crazy, totally possible)
10:06hiredman_,(binding [a 1] (println a))
10:06clojurebotjava.lang.Exception: Unable to resolve var: a in this context
10:06knoboCan clojure run on j2me?
10:06gnuvinceChouser: anyway, if you try the script I posted yesterday to the mailing list, you'll see that you still get the reflection warnings for both functions.
10:06Chouser,(binding [*warn-on-reflection* true] (eval '(bit-and (byte 0) (byte 0xff))))
10:06clojurebotDENIED
10:06Chouseroh, no eval. :-P
10:06jbondesonclojurebot: that's a bad bot!
10:06clojurebotNo entiendo
10:07Chousergnuvince: right, you need to make changes to your code
10:07durka42,(try (throw (Exception.)) (catch Exception e "boo"))
10:07clojurebotGabh mo leithsc�al?
10:07gnuvinceChouser: Yeah, I am reading Rich's reply now.
10:08durka42all right, class time
10:09AWizzArdHow can I enforce a full GC run?
10:09cooldude127weird, most of my irc time is during class
10:09gnuvinceChouser: finally, yes, it was for me :)
10:09cooldude127AWizzArd: (System/gc) i think
10:09gnuvinceI'll just need to update my code to use use ints
10:13clojurebotsvn rev 1280; [lazy] fixed take-while
10:15kefkaHere's a question about using agents for multi-threading. If I'm trying to do an asynchronous-or of several computations (e.g. I want the first result, and the rest are useless) and want the other threads to die (because they might block indefinitely), how do I do that?
10:16kefkaFor example, if I do (def *doomed-agent* (agent 0)); (send *doomed-agent* (fn [_] (loop [] (Thread/sleep 1000) (println "ANNOYING THREAD!!!") (recur))))... and then later try to "delete" *doomed-agent* by redefining it, the "ANNOYING THREAD!!!" keeps running.
10:25AWizzArdhiredman_: can you extend the clojurebot so that if one asks him something like "clojurebot: definition of count", it would then spit out http://code.google.com/p/clojure/source/browse/trunk/src/clj/clojure/core.clj#856
10:25cooldude127that would be so cool
10:25ChouserI perfer using 'source' in my own repl, I think.
10:25Chouserprefer
10:26cooldude127Chouser: i don't have that
10:26AWizzArdChouser: but then the ,(code-here) could also be done in the repl.
10:26AWizzArdIt just is nice if I am in irssi anyway, or want to show someone the code.
10:26ChouserAWizzArd: yeah, I suppose.
10:27cooldude127Chouser: how do i get source in my repl?
10:27Chousercooldude127: clojure.contrib.repl-utils <-- shameless plug
10:27cooldude127Chouser: there we go
10:28cooldude127Chouser: it seems a little confused on my code
10:28AWizzArd,(require '[clojure.contrib.repl-utils :as ru])
10:28clojurebotjava.io.FileNotFoundException: Could not locate clojure/contrib/repl_utils__init.class or clojure/contrib/repl_utils.clj on classpath:
10:29cooldude127clojurebot: why don't you have contrib?
10:29clojurebotwhy not?
10:29cooldude127AHH
10:29notyouravgjoelI'm looking for a way of taking the ith through jth items from a sequence and returning these items as a sequence
10:29notyouravgjoelsuggestions?
10:29Chousercooldude127: oh, really? I usually only use it on core and sometimes conrib code, but if it's breaking I'd like to know.
10:30cooldude127notyouravgjoel: take and drop
10:30cooldude127or subseq
10:30cooldude127Chouser: it might be the with-test wrapper
10:30cooldude127idk
10:30AWizzArdrhickey: Is Clojure reading some config file in which one could specify all the libs that one wishes to import/require/use?
10:31cooldude127Chouser: the defns after my first two with-test wrapped functions don't have the right code
10:31ChousukeAWizzArd: you can pass the repl an --init argument
10:31cooldude127AWizzArd: i think your ns is supposed to specify that
10:31Chouserkefka: afaik, the only recommended way to halt a thread that's busy doing computation is for it to poll something to see if it should quit.
10:32AWizzArdChousuke: thx
10:32cooldude127Chouser: lol (source source)
10:32cooldude127how meta
10:33notyouravgjoelthankss
10:33Chousercooldude127: ok, that makes sense. I'm not sure there's anything I can do about that.
10:33Chouserthe line number stored by 'def' will of course be its own, not its enclosing with-test.
10:33cooldude127Chouser: the weird part is it gets the code for the with-test functions just fine
10:34cooldude127Chouser: it's everything after that that messes up
10:34Chouseroh. hm.
10:35cooldude127Chouser: yeah gets the whole thing. even the with-test wrapper
10:35cooldude127and the tests
10:35cooldude127maybe it's trying to tell me to test my code better
10:35Chousercooldude127: is your code available somewhere, or other code that fails similarly?
10:38cooldude127Chouser: this is the file i was working with http://tinyurl.com/dau3so
10:39cooldude127Chouser: the first two ones have their source code right, but id and on fail
10:39cooldude127Chouser: actually it just got weirder. i just recompiled that whole file in slime, and now all the stuff is working
10:40Chouserah, well if the file and what you're actually running is out of sync, all bets are off.
10:40cooldude127and they are not surrounded in their with-test blocks
10:40cooldude127Chouser: yeah apparently source is better used on code you're not actively working on
10:40cooldude127which is fine actually, since you've probably got it up in an editor already
10:41reprapare clojure hashmaps worstcase log32 ?
10:41AWizzArd,(.getCorePoolSize clojure.lang.Agent/pooledExecutor)
10:41clojurebot3
10:41reprapor just amortized worst case?
10:42cooldude127reprap: i think it's worst case
10:42AWizzArd,(.getMaximumPoolSize clojure.lang.Agent/pooledExecutor)
10:42clojurebot3
10:42reprapwell i said wrong
10:42reprapamoritzed is orst case
10:43reprapi mean is it worst case or average time
10:43cooldude127reprap: i'm pretty sure it's worst case
10:43cooldude127but i'm not the best guy to ask
10:43Chouserclojure hash-maps are O(log32 n) for lookup where n is the number of items stored
10:44Chouserhm... no, I guess if the hash algos are bad for your keys it might get bad sooner
10:44cooldude127oh yeah
10:45Chouseranyway, the tree caps out at 7 or 8 levels I think, so if you can pretend that's a constant and call it O(1) if you want
10:45cooldude127rhickey knows way more about data structures than i do :)
10:49Chousukeit's O(almost 1)
10:51rhickeyChouser: I was thinking about a debug version of 'if' for easing transition to lazy - some $if$ that you could search/replace in your codebase, and it would throw if its test arg was a LazySeq
10:52ChousukeHowever if you do a *lot* of overwrites it'll ofcourse lose to a mutable structure... even if it's almost O(1), the O(1) access time of a standard array is still a lot faster because the constant is smaller
10:59repraplog 32 = 1.50514998
10:59reprapbut where does 32 come from?
10:59Chousukeit's not log 32, it's log32 :P
10:59Chouserrhickey: that sounds interesting.
11:00Chouserreprap: no, log base 32
11:00repraplog(32) = 1.50514998
11:00reprap?
11:00reprapah
11:00repraphow do i compute that?
11:00Chouser,(/ (Math/log 500) (Math/log 32))
11:00clojurebot1.7931568569324172
11:01Chouser500 items builds a tree of depth 2
11:01reprap,(/ (Math/log 1000000) (Math/log 32))
11:01clojurebot3.986313713864835
11:01reprap,(/ (Math/log 10000000) (Math/log 32))
11:01clojurebot4.650699332842308
11:01Chouserit grows very slowly. :-)
11:01reprapyes
11:02Chousukewhat's the memory overhead by average though? :/
11:03Chouserrhickey: any chance of making more like a binding or pragma or something? there are lots of macros that use 'if' that would not themselves by found easily in a search/replace.
11:11rhickeyChouser: don't the macros contain "if" ?
11:11Chousersure, but are you suggesting I search/replace in core.clj?
11:12Chouserwhen trying to port my app code?
11:12kefkakeys and vals: On a sorted map, they return the keys / vals in sorted order, right?
11:12rhickeyChouser: maybe. OTOH, I could build it into the compiler in lazy branch...
11:12Chouserkefka: keys in sorted order, vals in the same order as the keys (not sorted themselves of course)
11:14Chouserrhickey: it'd be simple if you made 'if' a macro like 'let' already is.
11:16kefkaChouser: Great. That's what I was hoping for. :)
11:17reprapis clojure fast enoughf or large-scale image analysis and mahcine learning?
11:18Chouserreprap: for that kind of work I'd recommend assembly or ruby.
11:19reprapruby?
11:19reprapyeah id love to dig around in assembler, illc all you back 2030 when i finished
11:19rhickeyChouser: want to try it and send me a patch (to lazy) for that? (using if* for primitive)
11:20Chouserrhickey: yes. yes I do.
11:20rhickeyChouser: thanks! bbl
11:24Chouserreprap: just a joke. a lame one, apparently.
11:25Chouserreprap: Clojure can pretty well match Java's speed when you need it to.
11:25rsynnotthiredman: or BOTH
11:26Chousukeyou can always write java for the parts you need speed for, anyway
12:05repraphiredman: webdevelopment requieres quite heavy use of ruby or asm
12:06jbondesonyou had a problem, to solve it you used ruby... now you have two problems
12:07reprapas in: some people think when they have a problem, "I know, I'll use ruby", now they have 2 problems
12:07reprapi rewrote my webapp in asm today, it took 8 hours, i saved 5 processor cycles
12:13Chouseranyone here good with ant?
12:14jbondesondefine "good" for me ;)
12:14ChouserI need to set a sysproperty depending on an ant command-line option (presumably -Dsomething)
12:15jbondesonyep, so not me
12:15Chouserheh
12:15jbondesonquick someone find a java developer...
12:16hiredmanif only there was a #java full of helpful people!
12:16hiredman(there isn't)
12:16technomancytime to switch to lancet. =)
12:17reprapand makes me want to blow my brains out, mostly becuae oyu have to deal with xml
12:17reprapi use python to smack it together
12:17jbondesonyou know what really sucks? editing a CC.Net build file when you build 90+ binaries.
12:18jbondesonand that's what i'm doing right now.
12:20technomancycould be worse... could be makefiles
12:21technomancyactually, I don't have enough experience with either system to say which is worse.
12:21WizardofWestmarcmakefiles can certainly get ugly
12:22danlarkinI donno, I never understood why people hate Makefiles
12:22danlarkinthey're very capable
12:22danlarkinsimple syntax
12:22hiredmanword
12:22technomancythe fact that spaces and tabs are interpreted differently is disastrous
12:23hiredman*shrug*
12:23Chouserunfortunately, but hardly a deal breaker
12:23hiredmanYes.
12:23hiredmanas demonstrated, it could be much worse
12:23Chouser*unfortunate
12:23technomancyyeah, manual memory management is enough of a deal breaker to keep me away from hacking the kind of projects that use makefiles. =)
12:24danlarkinoh but that's the best part, you can use a Makefile with any project!
12:24hiredmanexactly
12:25hiredmanI have a makefile with targets for changing tex->pdf svg->png dot->png etc etc
12:25hiredmanoh
12:25hiredmanand gnuplot files to png
12:26technomancy(was actually replying to danlarkin)
12:27jbondesonhey Chouser, what's the tool you were using to generate your graphs?
12:27jbondesondot?
12:27Chouserjbondeson: yes
12:28jbondesonneed to do some tree-visualizations and that would be handy
12:28rsynnott"oh but that's the best part, you can use a Makefile with any project!" - try with common lisp and see how far you get
12:29rsynnott(in principle, you probably COULD, but you'd need a system file to load the result, anyway, and you could have just used it to build in the first place)
12:31jbondesonlearning how to use graphviz will give me a nice break from looking at 1000+ line build files
12:31technomancygraphviz is pretty handy
12:33jbondesoni love how when i start a project i spend 90% of the time solving meta-problems
12:33technomancyguy at work is learning Groovy, and he's got like five Groovy books in a stack on his desk next to him...
12:33technomancythe stack has grown throughout the week
12:33technomancyI'm wondering how having more books helps you learn faster...
12:34rsynnottthat seems excessive
12:34jbondesontechnomancy: blow his mind and show him that the internet has more than porn on it...
12:35jbondeson"if only someone had thought to put INFORMATION on the internet"
12:35WizardofWestmarcPorn's not informative? Damn it!
12:36WizardofWestmarcbut yeah, getting 5 books about a single language seems silly
12:36technomancyWizardofWestmarc: maybe he's a Pok�mon fan... "gotta catch 'em all"?
12:36technomancyI mean, how many books about Groovy can there be?
12:36jbondesonmy guess would be 5...
12:37WizardofWestmarctechnomancy: shrug, there are like a billion about ruby and rails
12:37WizardofWestmarcso the sky's the limit
12:37technomancyyeah, but three years ago there were only two
12:37WizardofWestmarcok true
12:38Chouserhm, turns out ##java can be helpful after all
12:38WizardofWestmarchah
12:39jbondesonChouser: quick! disinfect yourself before you catch The Java.
12:43notyouravgjoelhow does one convert a set to a list?
12:43technomancynotyouravgjoel: you could just call seq on it
12:44technomancywon't technically be a list, but you can treat it as such
12:44notyouravgjoelah
12:44notyouravgjoelright
12:44notyouravgjoelI just want it to look prettier than lots of #{}'s everywehre
12:44technomancyhuh?
12:45notyouravgjoeln/m =)
13:05rhickeyChouser: any luck with if?
13:05Chouseryep, was just about to post.
13:05Chouseryou want to look at the patch before I do?
13:06rhickeyChouser: no, go ahead
13:06Chouserit found a nil pun in proxy :-)
13:06rhickeyfind any issues in core?
13:06rhickeyhah
13:07rhickeyI've been doing a visual audit - nothing more unsettling than questioning every if you've got
13:07Chouserand it complained about one in 'sort' that I'm not sure was actually a problem.
13:07Chouserbut I had to change it to avoid the exception.
13:10technomancyit seems really strange for me that the test suite is in another repository
13:10rhickeyyep, false positive
13:10technomancyif it were kept together with the code, it would branch together with the code, which would provide some definite benefits in this case
13:10technomancyjust a thought...
13:10Chouserrhickey: My patch replaces that with (when (seq coll) ... is that acceptible?
13:12rhickeyyes
13:12hiredmantechnomancy: well, rhickey (who keeps the central repo) does not prioritize the test suite, and other people do
13:12gnuvincerhickey: thanks for the (int) fix
13:12rhickeyhiredman: more important, other people write the test suite
13:14hiredmanrhickey: well *cough* I decided against saying "rhickey doesn't care about the test suite"
13:14rhickeyhiredman: I do care about it - you want tests or features from me?
13:15hiredmanuh, is that a trick question?
13:15danlarkincan I choose both? :)
13:15rhickeyhiredman: no, it's the real tradeoff
13:16hiredmanI mean, of course I want features
13:16ChousukeI think contrib is a good place for tests
13:17Chousukeotherwise, rhickey would have to individually accept every addition :/
13:18gnuvinceI think a comprehensive unit test suite for Clojure would be a nice addition.
13:18Chousukegnuvince: there's one in contrib. I don't know about "comprehensive", however...
13:19ChouserI can't think of how to capture a value at compile time that will...
13:19gnuvinceYou don't know what? If it'd be benificial or if the current suite is comprehensive?
13:19ChouserI can't think of how to phrase my question.
13:19Chousukegnuvince: whether it's comprehensive or not.
13:20hiredmanChousuke: are you still playing with clojurebot at all? if so, have you tried it on the lazy branch?
13:20gnuvinceChousuke: I imagine it's up to us to comprehensify it
13:20Chousukehiredman: not for a while.
13:20Chousukehiredman: I might take a look.
13:21gnuvinceIn the Java world, do people recommend Swing or SWT for GUIs these days?
13:21ChouserI want to get a value from a fn at compile time, and use that same value at runtime without checking the fn anymore. Any ideas?
13:22jbondesondynamic inlining...
13:22jbondesonheh
13:23danlarkinChouser: isn't that what a macro does?
13:23jbondesondanlarkin: that's read time
13:23danlarkinohhh, compile time
13:23danlarkinhm
13:23technomancyfeatures vs tests is a false dichotomy; without tests, features take longer.
13:23danlarkintechnomancy: or worse, features may not be correct
13:23jbondesonit like you want self modifying code, you want to add an :inline flag that just has the value
13:23technomancybut I do agree that tests are easier for the community to work on
13:24technomancydanlarkin: or nearly as bad: features will not be attempted for fear of breaking things.
13:24jbondesonChouser: could you just memoize it?
13:24technomancybut the codebase is probably still small enough for that not to be a worry except for minor cleanups
13:25jbondesonit's not quite the same thing, because it looks it up, but it won't recalculate
13:26jbondesoncourse that would look it up at load time, not compile. hrmmm
13:26Chouserright, that's the problem
13:26Chouserwell, the problem is I can't even think about it clearly
13:26jbondesonhonestly, i think you want to look it up, modify the :inline tag and then compile
13:27Chouser(if (foo) (def build-foo true) (def build-foo false))
13:27jbondesonoh
13:27jbondesonhah
13:27Chouser...but that will run at load time too, right, so no good.
13:27danlarkinChouser: is there a way you can use that *compiling* var or whatever it's called?
13:27Chouserdanlarkin: maybe, but how?
13:27ChousukeChouser: *compile-files*?
13:28Chouserwhen it's true, store the value in a def, when it's false ... ?
13:29Chousukehmm
13:32Chousuke(def *val* nil) (defmacro whatever [] (when-not *val* (def *val* (get-thing))) `*val*)? is that valid?
13:32Chousukehm
13:32ChousukeI guess that again does it at read time.
13:32ChouserI think I don't sufficiently understand how constants are compiled.
13:33Chouserthere was a thread about this recently, using print-dup vs. something else, but I didn't dig in deep enough to grok it.
13:33Chouserbbl
13:58vsthesquaresare cons and conj both O(1)?
13:59Chouseryes
13:59vsthesquaresnice
13:59vsthesquaresthanks
13:59Chouserhm, well, depending on the data structure, conj maybe as slow as O(n log n), I think.
13:59vsthesquaresah yes
13:59vsthesquareson vectors?
14:00vsthesquaresbut not on lists?
14:00Chouseron sorted sets and maps
14:00ayrnieu,(complexity (conj {} {:a :b}))
14:00clojurebotjava.lang.Exception: Unable to resolve symbol: complexity in this context
14:00gnuvinceayrnieu: that'd be too nice :)
14:00gnuvince(set! *warn-on-O-n-squared* true)
14:01Chouseron hash maps and vectors, conj is more like O(log32 n)
14:01ChouserO(1) on lists
14:01vsthesquaresexcellent
14:02rsynnottChouser: conj is O(1) in lists?!
14:02rsynnottare lists not linked lists?
14:02technomancyrsynnott: conj adds to the head of lists
14:02Chousersure they are.
14:02rsynnottah
14:02vsthesquaresso the list doesn't need to be traversed
14:02ayrnieu,(let [x '(1 2 3)] [(cons 0 x) (conj x 0)])
14:02clojurebot[(0 1 2 3) (0 1 2 3)]
14:02rsynnottah, nevermind, I was thinking of it as a concatenate-type thing
14:04Chouserconcat on lists is O(1) also
14:04Chouser...as long as you never actually traverse it. ;-)
14:04technomancyhehe
14:04gnuvinceDoes the JVM keep a cache of its optimizations between sessions?
14:06rsynnottconcat is lazy, then?
14:06Chouserrsynnott: yes
14:06gnuvince,(class (concat "a" "b"))
14:06clojurebotclojure.lang.LazyCons
14:06rsynnottand working in CL at the same time
14:06rsynnottprobably not a great idea; it all gets quite confusing
14:08alinpopa,(conj (list 1 2 3) 0)
14:08clojurebot(0 1 2 3)
14:09alinpopa,(cons 0 (list 1 2 3))
14:09clojurebot(0 1 2 3)
14:11gnuvincersynnott: how are you liking Clojure?
14:17gnuvincelazy-cons is really gonna be gone once the lazy branch is merged?
14:17Chousergnuvince: I think so.
14:17Chouserit's certainly been removed from the lazy branch.
14:18gnuvinceok
14:18gnuvinceI have a couple lazy-cons in my code, I'll add a comment to remind me to change them
14:19Chouserit'll remind you
14:19Chouserjava.lang.Exception: Unable to resolve symbol: lazy-cons in this context
14:19vsthesquares:D
14:19gnuvince:)
14:19cooldude127Chouser: isn't cons just gonna be naturally lazy?
14:19rsynnottgnuvince: It's quite nice
14:20gnuvincersynnott: nice to hear :)
14:20rsynnottI would probably not choose it over CL for random-thing
14:20rsynnottbut the Java integration is extremely useful
14:20Chousercooldude127: no, I don't think so.
14:20cooldude127Chouser: wait, then what is going on in that branch? maybe i'm confused
14:21Chousermost places that currently use (lazy-cons a b) will have to change to something like (lazy-seq (cons a b))
14:21Chouserimportantly, though, is where the test for the end of the seq goes.
14:22Chousercurrently it usually looks like (when not-done (lazy-cons a b))
14:22gnuvincersynnott: yeah. I'm no fan of Java (the language), but the Java integration is what pushed me to try Clojure: knowing that it would have access to a large body of useful code.
14:22Chouserin lazy, it's more likely to be (lazy-seq (when not-done (cons a b)))
14:22Chouserthis means that even the not-done test is delayed until needed.
14:22cooldude127Chouser: oh. i was hoping it would be like haskell where everything is lazy by default
14:22shooverany word on a .net port coming to clojure.contrib? I heard a rumor here last month. just wondering if there's any public knowledge of such a thing
14:23Chouserpeople are plowing ahead with ikvm, but the rumor is all I've heard for the other.
14:24Chousukethere is some clojure-inspired thing called Xronos, though
14:24shooverXronos logs went silent after November
14:25Chouserthat's an odd one
14:25shooverer, mid December, but still
14:25Chousukeit seems it's still active
14:26Chousukeat least, somewhat
14:26Chouserthe license is incompatible with Clojure's, but there's some code in it that would be hard to defend as not a copy
14:26rsynnottwell, at least they refrained from calling it clo[a-z]ure
14:26cooldude127last commit was feb 1
14:27rsynnott(as it is, there's clojure, clozure and closure (a web browser))
14:27Chouseron the other hand, there is some code that is so different from Clojure's for the same class that it's not clear its profiding the same data-sharing, thread, immutability, etc. properties as Clojure.
14:27Chousukeclogure :(
14:27shoovercooldude127: pretty minor stuff in those February commits
14:27shoovercooldude127: but perhaps a sign of life
14:27cooldude127it's something :)
14:28Chouserthe author's been here before, but I've never talked with him.
14:28shooverthere is also #xronos. I'm asking over there too
14:28cooldude127clozure = os x common lisp
14:28vsthesquareshm, when I populate a list with structs, the repl weirds it all up with pointers. that's weird since the structs are just maps, right?
14:28vsthesquaresthe representation, I mean
14:28rsynnottyep, the impl formerly known as openmcl, and the company that maintains it
14:28cooldude127vsthesquares: care to paste what you mean?
14:29rsynnottare there really enough .NET users to make a .NET version sensible?
14:29Chousukevsthesquares: structs are a special kind of map
14:29cooldude127rsynnott: probably not for rhickey
14:29cooldude127but for someone, maybe
14:29shooverrsynnott: my town is mostly .NET shops
14:29vsthesquaresChousuke: they appeart to be equal
14:29Chousukethe two versions could never be really compatible though :/
14:30vsthesquaresI'll paste it, but right now I've got to run, got to pick up the girlfriend ;)
14:30Chousukethe host platforms are way too different, and clojure makes no attempt to hide the JVM
14:30Chouserit's not unreasonable to have a clojure.core that supports both, I think, but contrib would be another matter entirely.
14:31shooverChousuke: I just want the secret sauce; doesn't have to be 100% compatible
14:31ChousukeChouser: yeah
14:32Chousukemaybe some "clojure.host" namespace that clojure.core could use
14:32Chouserclojurescript has clojure.JS
14:32ChouserI think
14:32Chouseryeah
14:33Chousukeyou wrote it, and you "think" it has that? :P
14:33ChouserI had to check... wondered for a moment if I had called it clojure.lang.JS or something.
14:33ChousukeFor integrating those changes to the main source tree to be feasible they should have no effect on performance though
14:34ChouserI don't think that'd be a problem.
14:34Chousukeshouldn't be.
14:34Chousercore currently makes only a few direct Java assumptions that aren't already abstracted by the api to Numbers, RT, etc.
14:35Chouserthe remaining ones are, I believe, removed by the clojurescript patch.
14:36technomancywhat's the delay getting that patch in? Just need to prove that it doesn't affect perf?
14:37Chousertechnomancy: dunno, though I doubt that's it. I assume it's just not a priority for rhickey at the moment.
14:37ChouserA more significant patch was already applied for clojurescript.
14:38danlarkinI don't want a .net port, a majority of user level code will be totally incompatible between the two
14:38Chousersvn rev 1035 -- mucked about in Compiler.java and such.
14:38shooverdanlarkin: are you a .NET programmer?
14:39cooldude127danlarkin is right, there are a lot of times when dipping down into java is necessary, any code that does it will just not work on .net
14:39Chousermost code would have to be clearly labeled -- clojure, clojure.NET, clojurescript, etc.
14:40danlarkinshoover: no
14:40Chouserthough the same file could support multiple, with some care.
14:40technomancysounds like more work than it's worth
14:40cooldude127that sounds like a pain in the ass
14:40Chousermore of a pain than writing C# code?
14:41Chouserdoesn't C# already have this issue with mono?
14:41hiredmaneh?
14:41cooldude127i think mono is fairly compatible with MS, no?
14:41danlarkinmono is just an alternate VM implementation, same libraries
14:41Chouser"fairly" perhaps, but aren't the GUI toolkits quite different -- gtk vs. MS-whatever?
14:42cooldude127Chouser: well yeah
14:42ChouserI want Clojure to be *everywhere*. :-)
14:42hiredmanI think mono tranlates the windows.forms stuff to gtk
14:42ChousukeChouser: you can use some portable GUI toolkit I guess.
14:42cooldude127it doesn't have something like swing
14:42cooldude127i don't think
14:42cooldude127Chouser: but it could be useful to have a common code base and then just maintain the separate guis
14:42cooldude127if you wanted to do windows and linux apps
14:42hiredmanhttp://www.mono-project.com/WinForms
14:43rsynnott"< shoover> rsynnott: my town is mostly .NET shops" - your TOWN? I hadn't realised it was a geographic thing :)
14:43rsynnottisn't mono terribly slow, though?
14:43rsynnotthiredman: still in trouble if you want MacOS guis, though
14:44cooldude127might as well use java at that point tho
14:44technomancyrsynnott: I'm in Seattle, and I don't know any .NET people, so I'm not sure how that works. =)
14:44hiredmanhttp://geekswithblogs.net/CISCBrain/articles/Mono_vs_dotNet_Performance_Test.aspx
14:44hiredmanrsynnott: apparently winforms also does native stuff on OSX
14:45rsynnottperhaps I too am in the wrong geographic area
14:45cooldude127oh yeah forgot about mono for os x
14:45shooverrsynnott: that's why I said my town. my company and my friends' companies use .NET. come to Indianapolis next Thursday night
14:46rsynnottodd. Dublin (and possibly Europe as a whole) seems to be pretty much .NET free, except for the odd VB classic thing given new life
14:47hiredmanI thought MS had a large presence in dublin?
14:47rsynnottyep, EU headquarters, translation, R&D
14:47rsynnottthey just don't seem to have convinced anyone to use their stuff
14:47shooverI think Chouser said it best: there's nothing in clojure.core that prevents having multiple implementations, if someone wants to take the time to build clojure.lang.RT, clojure.lang.Compiler, etc. on their platform
14:47hiredmanOh
14:48rsynnott(and Sun also has a large presence in Dublin, as does IBM and Google)
14:48technomancyshoover: right now there's not a high priority on implementing as much of clojure as possible in clojure.
14:48technomancyif it ever moves in that direction, alternate runtimes will become much easier to support.
14:49shooveragreed. but even the current state it's doable. clojurescript and xronos have shown that
14:49rsynnotttechnomancy: up to a point
14:50technomancyrsynnott: sure; I don't know if it will ever be self-hosting
14:50hiredmanwasn't there some flash port sort of thing?
14:50Chouserclojurescript doesn't have sorted-anything or persistentqueue yet. ;-)
14:50Chouserhiredman: yep
14:50shooverChouser: any hurdles, or just effort?
14:50technomancythis is what happened with Ruby anyway, as soon as Rubinius focused on implementing as much in itself as possible, it was able to help the JVM and .NET implementations immensely
14:51Chousershoover: just effort.
14:51WizardofWestmarc not sure Ruby's implementation model is what I'd want to follow, last I knew it was the slowest language of anything modern
14:51WizardofWestmarceven with the 1.9/2.0 improvements
14:51ChouserPersistentQueue in particular should be a snap, just haven't done it.
14:51technomancyWizardofWestmarc: well consider that model came from smalltalk
14:51rsynnottself-hosting seems to be the turning point; many self-hosting lisps are REMARKABLY hard to port to other platforms
14:52WizardofWestmarcrsynnott: sbcl on windows proves that so true ;-;
14:52technomancyrsynnott: I'm not sure if that's comparable though since it's not dealing with a VM
14:52ChouserPersistentTreeMap would be roughly as much effort as PersistentHashMap was, after with PersistentTreeSet would be a snap.
14:53rsynnottno, there is that
14:54rsynnottalso, doesn't have to (and nor should it) have its own GC
14:54rsynnott(sbcl and clozure both have at least two GC systems, due to the 386's miserliness with registers)
14:57lisppaste8gnuvince pasted "Improvement suggestions? This seems ugly and complicated" at http://paste.lisp.org/display/75431
14:58cooldude127gnuvince: for one thing, the docstring is in the wrong spot. should go before the arglist
14:59gnuvinceYeah, I've spotted it just now.
14:59cooldude127technomancy: it makes sense when you consider multiple arglists but it is still weird after using CL and elisp
14:59technomancycooldude127: yeah. I need to fix clojure-mode to highlight them differently
15:00cooldude127technomancy: really? is there anyway it could treat them like comments so auto-fill would work?
15:00technomancyyou can already auto-fill them
15:00technomancyoh, sort of...
15:01cooldude127technomancy: it pulls the arglist up to the next line
15:02technomancyright; should be fixable, but needs work
15:02cooldude127technomancy: at the very least, making the indentation system understand that it should be indented two spaces would be AWESOME
15:02gnuvince,(#("hello") 3)
15:02clojurebotjava.lang.IllegalArgumentException: Wrong number of args passed to: sandbox$eval--1197$fn
15:03cooldude127gnuvince: trying to call ("hello")
15:03technomancycooldude127: that already works if you fix the arg list by hand
15:03cooldude127gnuvince: in addition to only creating a zero-arg functions
15:03cooldude127technomancy: yeah, but that drives me nuts having to do that
15:03technomancycooldude127: right, what I mean is you only have to fix the arg list problem, not indentation
15:03technomancywell, and font-lock
15:03gnuvincecooldude127: yeah
15:04gnuvincecooldude127: just checking
15:04cooldude127technomancy: except if you manually hit enter or tab, it doesn't indent inside a docstring
15:04technomancycooldude127: oh, ok. I was thinking of M-q
15:04Chousukeit kind of sucks that docstrings need to be manually indented.
15:04Chouser#(:foo %) is the same as just :foo
15:05gnuvinceAnyway, I use constantly in this case.
15:05ChouserChousuke: they indent fine in vim. ;-)
15:05ChousukeChouser: I didn't mean that; I mean for them to align properly in (doc)
15:05Chousukethe whitespace is actually *meaningful*
15:05gnuvinceWhen is whitespace not meaningful?
15:05cooldude127technomancy: yeah well i would honestly be ok if just one of them worked
15:06Chouseroh. it looks good indented two spaces, doesn't it?
15:06Chousukegnuvince: when indenting :P
15:06ChousukeChouser: yeah, but the two spaces are actually part of the docstring
15:06gnuvinceChousuke: one of the rare cases
15:06cooldude127docstrings should ignore leading spaces
15:06Chousukeso if you print it out, removing newlines, you will get weird spacing.
15:07Chousukeit mixes layout with actual content which is what I don't like :/
15:07Chousergnuvince: can't you say (m action-name) for the :when?
15:08gnuvinceChouser: oh yeah
15:08gnuvincethanks
15:09gnuvincegreat
15:11gnuvinceChouser: that even improved performance ;)
15:40hiredmanis there some handy code around to get the line number of a def or defn in a file?
15:41jbondesongrep?
15:41hiredman:(
15:41shoover(:line ^#'my-fn)
15:41Chouser,(:line ^#'filter)
15:41clojurebot1454
15:41jbondesoni try to be helpful!
15:41Chousershoover: oooh
15:41hiredmanmeh
15:41shooverI lose with my non-botness
15:41hiredmanI guess that'll do
15:41hiredmanhmmm
15:41Chousershoover: but you win in time
15:42jbondesonare you doing the source lookup for clojurebot?
15:42hiredmanyes
15:42jbondesonwhat about the java files?
15:42shoover,(:file ^#'filter)
15:42clojurebot"core.clj"
15:42Chouserhiredman: you may want to look at get-source in repl-utils.
15:42Chouserit does some work to find the right source file
15:43hiredmanhmmm
15:45hiredmanso I need to turn a string into a symbol and then resolve the symbol? and get the metadata off the var?
15:45Chouseror you could grep
15:45danlarkin,(:file ^#'if)
15:45clojurebotjava.lang.Exception: Unable to resolve var: if in this context
15:46hiredmandanlarkin: that would be a problem
15:46Chouserdanlarkin: close, but 'if' is a special form
15:46Chouseroh, was that the point?
15:46danlarkinyeah
15:47danlarkinI was just wondering if it'd point to the .java file, I guess it does not
15:47Chouserbut what would you want? http://code.google.com/p/clojure/source/browse/trunk/src/jvm/clojure/lang/Compiler.java#2324
15:47Chouseror http://code.google.com/p/clojure/source/browse/trunk/src/jvm/clojure/lang/Compiler.java#43
15:47hiredmanhmmm
15:47Chouserprobably not very useful to most folks
15:48danlarkinyeah
15:52e_0rSo I'm trying to get clojure+slime+emacs going (following bill clementson's , and I'm running into a ( NoClassDefFoundError: clojure/lang/Repl )
15:52e_0rcrap.. that was premature
15:52cooldude127e_0r: sounds like you're not pointing it to clojure.jar correctly
15:52e_0ryea im about to start tinkering w/ my ~/.emacs file
15:52cooldude127e_0r: technomancy's clojure-mode on github has a clojure-install function that will take care of it
15:53cooldude127e_0r: it also has a clojure-update function written by me to keep you up-to-date :)
15:53e_0r oh hell yes
15:53e_0ri'm so excited about this language
15:53e_0rjust want to get it in a decent environment
15:54cooldude127e_0r: slime is the only way to ride :)
15:58technomancyit's the most fun, at least
16:01mattrepltechnomancy: has jochu said anything about pulling your changes?
16:02technomancymattrepl: it's been quiet since he merged imenu support
16:02technomancyhaven't heard about the installer
16:05danlarkinhe's an illusive guy huh
16:06hiredmanclojurebot: def filter
16:06hiredmanhmmm
16:07hiredmanthat is not filter
16:07Chouseris that the svn rev clojurebot's currently using?
16:08hiredmanyes
16:08hiredmanclojurebot: def filter
16:10Lau_of_DKGood evening gents
16:10AWizzArdHi the Lau.
16:12danlarkinHi Lau_of_DK
16:12e_0r'ello
16:12danlarkinlots of progress on AYUP
16:12ChouserLau walks in and suddenly this place reminds me of Cheers. :-)
16:13cooldude127hiredman: that is cool :)
16:13hiredman:)
16:14AWizzArdhiredman: thanks for realizing my suggestion so fast
16:14hiredmanmy pleasure
16:15danlarkinhiredman: what if instead of "def" it was "source" :)
16:15hiredman~def *compile-path*
16:15AWizzArdis the ~ short for clojurebot: ?
16:16hiredmanAWizzArd: yes
16:16hiredman~source *compile-path*
16:16hiredman~def *compile-path*
16:16hiredmandoes both
16:17danlarkincoo
16:17danlarkinl
16:21Lau_of_DKChouser: Hehe, which member did you picture me as ? :)
16:22ChouserNorm!!!!
16:22Chouserthough only because of the greetings you recieve.
16:22Chouserreceive
16:24Lau_of_DKFunny, I had the same thought... :)
16:51cooldude127technomancy: you're watching me!
16:52technomancycooldude127: yeah; don't try anything funny
16:52cooldude127lol
16:54cooldude127you checking up on my date library? :p
16:54technomancyyup
16:54cooldude127i figured the linear algebra stuff and the pointless trees weren't it
16:55cooldude127although the linear algebra is what's currently being worked on
16:55technomancyyou ought to fork clojure-contrib and add your date stuff to that
16:56technomancythat way you can keep your tests in the main test suite
16:56cooldude127technomancy: you forgot to prefix that with "write some tests"
16:57lisppaste8reprap pasted "input" at http://paste.lisp.org/display/75443
16:57cooldude127technomancy: you are right about that. i didn't do it at first because i was using svn for clojure-contrib when i started writing it
16:57cooldude127technomancy: it would be easier for sure to keep it with the rest of my clojure-contrib
16:57technomancycooldude127: well before too long I'll probably be interested in jumping on board, and what better place to start than with a test suite
16:57cooldude127technomancy: cool
16:58cooldude127right now the priority is the math stuff cuz i'm gonna need it for a school project
16:59technomancywell my read patch got (rightly) rejected yesterday, so I've got to find another way to get some code in. =)
16:59cooldude127technomancy: why was it rejected?
17:00technomancycooldude127: it doesn't work as expected when objects aren't separated by whitespace and you want to call read repeatedly
17:00technomancyhttp://groups.google.com/group/clojure/browse_thread/thread/fedbb2a63af633f0 <= see the second-to-last post in the thread
17:00technomancyI can't figure out a way to handle that gracefully without changing read to peek instead of pulling a char off and pushing it back.
17:05cooldude127technomancy: wait, i'm not sure i understand why it works if you wrap yourself, but not with the patch? isn't that all the patch does?
17:06technomancycooldude127: the patch creates a new pushback reader for *every* read
17:06technomancyyou're free to do that without the patch, but without the patch the correct thing to do is hang on to the same pushback reader
17:07technomancyif this weren't Java, I could slap the pushback reader into a newly created slot on the wrapped reader and check for it, essentially memoizing.
17:07technomancywhich would possibly be too hacky to cut the mustard, but it would address the problem. =)
17:08cooldude127technomancy: i see now
17:08technomancyit's a tough problem. I was totally oblivious to it due to the limited way in which I was using read.
17:09cooldude127yeah
17:10Chouserstatefulness
17:11technomancyI suspect other lisps get around the problem by using peek on the stream.
17:11Chouserthe underlying reader has state, and the pushback reader adds more. suddenly you start having to pay attention to who owns which state, who mutates it when, etc, etc.
17:12cooldude127this is why we're using clojure in the first place
17:12flowerpowerwow playign aroun wtih scheme now and it really makes me apprecate clojrue even more, plt scheme isnt very mature and basiclaly it is lisp for the 80s or soemthing
17:12Chousukehmm
17:12technomancyflowerpower: well considering your nick, I'm not sure why you consider that a bad thing.
17:12ChousukeI think it's wrong to say scheme is not mature
17:13cooldude127scheme is thin
17:13cooldude127lean
17:13technomancyflowerpower: you prefer maclisp?
17:13Chousukeit... never was expected to grow up :)
17:13technomancy70's style? =)
17:20technomancyit's funny how hard it is for languages to shake the "academic" label
17:21cooldude127technomancy: it's ok, it's not great. it's more the drscheme environment that i find unusable
17:21technomancywell you can hook it up to slime, right?
17:22cooldude127technomancy: i don't know how to do that plt. i know mit scheme supports as well as i think kawa
17:22WizardofWestmarcPLT probably has the best set of libraries of any stand alone scheme, or it does of any I've looked at
17:22cooldude127yeah
17:22WizardofWestmarcit's just the library set is still tiny compared to that available on the jvm
17:23cooldude127woo somebody else is watching my clojure-code repo
17:23technomancyanyway, I'm relieved we don't have to deal with the academic label
17:23gnuvince_cooldude127: link?
17:23cooldude127i feel special
17:23cooldude127http://github.com/cooldude127/clojure-code/tree/master
17:25cooldude127gnuvince_: that's pretty much every piece of useful clojure code i've written
17:42reprapscheme sucks so hard
17:42reprapit doesnt have anything
17:42reprapyou want to do anythign then spend first time coding stuff that has been done a millliont iems already
17:45technomancyif you're limiting yourself to the stuff in RNRS, you're doing it wrong
17:45technomancykawa has all the same advantages as clojure.
17:45technomancy(as far as that goes)
17:50cooldude127i tried all the java-based schemes. none of them worked nearly as well as clojure
17:50technomancywell Bus Scheme has access to a ton of libraries.
17:50hiredmanuh
17:51technomancyalso it comes with my personal guarantee that it will be awesome.
17:51technomancyand slow.
17:54cooldude127technomancy: lol
17:54karmazillaso... "bus" is a metaphor for how it is to "drive"?
17:54cooldude127karmazilla: i don't think intentionally
17:55cooldude127technomancy: bus scheme's in ruby right?
17:55technomancykarmazilla: Bus Scheme is the only scheme implementation that claim to be implemented while riding the bus.
17:55technomancycooldude127: yes, hence the guarantee of slowness.
17:55cooldude127lol
17:55cooldude127wait that's not funny. what the hell ruby?
17:55Chousukewhy not.
17:56karmazillais it a public transport bus?
17:56technomancykarmazilla: yeah
17:56cooldude127ruby's such a beautiful language, but its performance is suck
17:56Chousukeit also has ultrafail string handling.
17:56cooldude127lol
17:56technomancykarmazilla: http://transit.metrokc.gov/tops/bus/schedules/s301_0_.html
17:56gnuvince_Ruby has some MAJOR fails
17:56Chousukeyeah, but the string fail is just unbeliveable.
17:57technomancyChousuke: encoding stuff you mean?
17:57technomancythat stuff is so politicized. =\
17:57karmazillayou must have quiet buses and smooth roads around where you go.
17:57Chousuketechnomancy: the fact that indexing a string will return an integer.
17:57Chousuketechnomancy: which makes no sense at all.
17:57technomancyChousuke: not any more; that was fixed.
17:57technomancybut yeah, brain-dead decision
17:57cooldude127in 1.9?
17:57technomancykarmazilla: it's pretty good; most of the ride is on the freeway
17:57gnuvince_irb(main):001:0> x = 10 if false
17:57gnuvince_=> nil
17:57gnuvince_irb(main):002:0> x
17:57gnuvince_=> nil
17:57technomancystill loud though.
17:57hiredmantechnomancy: oh man
17:58hiredmanor go on
17:58jbondesonany language that thinks puts is a better name than print is bound to be bad.
17:58cooldude127lol
17:58Chousukeheh
17:58Chousukewell, ruby has some nice features too
17:58hiredmanI ride seattle metro every day
17:58cooldude127jbondeson: what about haskell? putStrLn ?
17:58Chousukelike blocks
17:59Chousukethough that's nothing new, it's still nice.
17:59technomancyjbondeson: print works too, it just doesn't include a newline
17:59Raynescooldude127: They have a print function that converts whatever it gets into something printable and prints it.
17:59hiredmanand to think, someone out there was writing a lisp on one of the buses
17:59cooldude127Raynes: no way!
17:59Raynescooldude127: Yeah way!
17:59jbondesoncooldude127: it's functional, it's allowed to not like side effect functions ;)
17:59Raynes:D
17:59cooldude127lol
17:59hiredmanRaynes: doesn't that depend on the show typeclass?
17:59Rayneshiredman: Yes.
17:59gnuvince_Yes
18:00hiredmanYes.
18:00RaynesIt wont print "everything" you give it.
18:00technomancyhiredman: a lot of crazy things happen on the bus. you never know.
18:00RaynesBut it will print anything that is printable.
18:00jbondesontechnomancy: that just makes it worse. two printing functions named *completely* differently that differ only in one adding a new line.
18:00RaynesIncluding Integers.
18:00gnuvince_print in Haskell is like prn in Clojure
18:00Raynes,(prn 2)
18:00Chousukejbondeson: there's a putStr too though, I think
18:00clojurebot2
18:00RaynesOh thats fuckin' neat.
18:00gnuvince_,(prn "hello")
18:01clojurebot"hello"
18:01Raynes,(doc prn)
18:01clojurebot"([& more]); Same as pr followed by (newline). Observes *flush-on-newline*"
18:01hiredmanI started writing a ruby lisp once
18:01Raynes:D
18:01technomancyjbondeson: there's plenty more interesting things to complain about in Ruby. you're scraping the bottom of the barrel; admit it.
18:01gnuvince_technomancy: is the parser bug still there?
18:01hiredmanbut I really hate writing parsers
18:01WizardofWestmarcThe rampant monkeypatching alone is reason to avoid Ruby
18:01RaynesThe problem with Ruby is that it exists.
18:01cooldude127hiredman: what sort of paper?
18:01jbondesontechnomancy: if you can't get the easy stuff right i have no confidence in you getting the hard stuff right
18:01WizardofWestmarcmakes mixing libraries insanely risky
18:02technomancyhiredman: I hate writing parsers for things that aren't sexps
18:02technomancyhiredman: my bus scheme parser was around 100 LOC
18:02cooldude127oh parser
18:02cooldude127nvm
18:02hiredmanwell, I kept trying to take short cuts
18:02gnuvince_Just a question of time; the more the "enterprise" programmers try to find new ways to use XML everywhere, the closer they will be to just using Lisp
18:10cooldude127hmm, i rather like the syntax highlighting that github uses, i wonder if i could translate that to emacs
18:11danlarkincooldude127: they use pygments
18:11cooldude127danlarkin: well i meant the color scheme
18:11danlarkinah
18:12danlarkinyeah it's pleasant
18:13cooldude127god bless google: http://github.com/dudleyf/color-theme-github/tree/master
18:14danlarkinsweet!!
18:15cooldude127danlarkin: yeah i'm trying it to see how good it is
18:16cooldude127danlarkin: it's close but not quite the same
18:16cooldude127maybe when i have a chance i can try to improve it
18:17danlarkinHm, what's different
18:17cooldude127danlarkin: function names are colored red, not teal, function calls are still black
18:18cooldude127danlarkin: maybe that's good when you're actually editing, idk
18:19Lau_of_DKdanlarkin: any news?
18:19danlarkinLau_of_DK: oh yes, much progress
18:20Lau_of_DKNo no not the work, the name?
18:20danlarkinhaha
18:21danlarkinno name progress
18:21Lau_of_DK:(
18:21danlarkinI ran "hansard" by a few friends and they laughed :(
18:21Raynesdanlarkin: I know you. :>
18:22danlarkinRaynes: from my reply to your SO question?
18:22RaynesYou answered one of my stupid questions on Stackoverflow.
18:22Raynes<:
18:23Lau_of_DKOk, danlarkin, Im going to bed now, when I get back tomorrow I want your decision and following that, a Github project:
18:23Lau_of_DK1) Clabango
18:23Lau_of_DK2) Bio Hansard
18:23cooldude127what is this project?
18:24Raynescooldude127: They are coding an IRC bot that closely replicates your behavior. It's called cooldude128.
18:24cooldude127DAMNIT
18:25hiredmanI could wire up a, uh, what do you call it, starts with an 'm'? anyway wire that up to clojurebot and feed it with a corpus of cooldude127
18:25cooldude127i'm scared
18:26hiredmangod, that are those called?
18:26cooldude127hiredman: if i had a clue what you were talking about, i would say
18:26Fibmarkov chain
18:26cooldude127oh
18:26hiredmanding!
18:27cooldude127i do not possess the markov property
18:27cooldude127so while clojurebot may replicate my behavior at first, time will cause us to develop into different beings
18:28hiredmanmarkov chains are a sufficent corpus text are pretty good for replicating style
18:28cooldude127NO. i will not allow myself to be imitated by a bot
18:28cooldude127and i still don't know what this project was
18:28Rayneshttp://paste.pocoo.org/show/103895/
18:35technomancycooldude127: if you start seeding it with inconsistent data now, you can still retain exclusivity on your identity
18:36cooldude127rabble rabble rabblne
18:36cooldude127i need to just start saying everything i hear around me
18:37hiredmanthen you'll be just like the bot
18:37cooldude127lol
18:37cooldude127well once the bot is seeded, i will continue acting as my normal self
18:37hiredmannah
18:37cooldude127lol
18:37hiredmanthe corpos would keep growing
18:38hiredmanyou just lay down new chains
18:38cooldude127hiredman: maybe make the bot before i start worrying about it
18:38hiredman:P
18:38lisppaste8reprap pasted "folding and hashtables" at http://paste.lisp.org/display/75453
18:38hiredmanI started on it a month or so ago
18:38cooldude127i was asking about danlarkin's project lol. how did this even happen?
18:38hiredmanhmmm
18:39hiredmanthis is not clojure
18:39cooldude127reprap: you know this is #clojure right?
18:40RaynesWho is reprap?
18:40Raynes:|
18:40ayrnieuthe person who just pasted some Scheme.
18:42RaynesOh shit.
18:42RaynesThat is illegal in 7 channels. Bad juju.
18:42RaynesI think he should be banhammered for such nonsense.
18:42Raynes:|
18:43Raynes/end off topic jokes and lulz
18:48reprapscheme sucks
18:48ayrnieuwhy does it suck?
19:09dirtmcgirtgreetings. any way to alias an imported java class? ala (alias 'ParserB 'org.parser.Parser)? i get an error currently ("Expecting Symbol + Namespace").
19:09hiredmanerm
19:09Chouserdirtmcgirt: hm, good question. 'alias' doesn't support it directly. what do you intend to do with it
19:10gnuvince_(doc import)
19:10clojurebotimport-list => (package-symbol class-name-symbols*) For each name in class-name-symbols, adds a mapping from name to the class named by package.name to the current namespace. Use :import in the ns macro in preference to calling this directly.; arglists ([& import-symbols-or-lists])
19:10Chouserhm, maybe it doesn't matter. You can do (import '(org.parser Parser)) and then just say Parser
19:10dirtmcgirti have two Java libraries each with a Parser class
19:10hiredmanI thought there was something in contrib that let you do that?
19:10cooldude127dirtmcgirt: you might have to do it the java way, address one by its full name
19:12Chouserbleh. I guess you could slap together a macro or three.
19:12danlarkincooldude127: sorry, went to get some dinner. my project is yet another web framework
19:13Chouserdirtmcgirt: you need to mostly create instances? call statics? some of each?
19:13dirtmcgirtChouser: create instances
19:14dirtmcgirti can always just do a direct reference
19:14cooldude127danlarkin: oh lovely
19:14dirtmcgirtbut i was just curious
19:14hiredmanyawfie
19:16danlarkinwhat's the ie?
19:17hiredmanit is, you know, sort an endearment?
19:17hiredmanlike I have a friend named Jove, who I Jovie
19:18hiredmanpeople sometimes, and only once, call me Kevie
19:18hiredmaner
19:18hiredmanI call him Jovie
19:18danlarkinah
19:19hiredman~google Yawf
19:19clojurebotFirst, out of 6310 results is:
19:19clojurebot1970: Reviving the fighting spirit of Int&#39;l Women&#39;s Day
19:19clojurebothttp://www.workers.org/2005/us/womens-day-0303/
19:19danlarkinclojurebot: google yawfie
19:19clojurebotFirst, out of results is:
19:20hiredmanuh
19:20hiredmanyeah, those corner cases
19:21danlarkinupside is there's only 8 results for yawfie
19:21hiredmanand you could do the argentine Y
19:22hiredmanso pronounced like Joffie
19:23Chouserdirtmcgirt: (defmacro newParserB [& args] `(new org.parser.Parser ~@args))
19:23Chouserthat's all I've got.
19:37stimulihi
19:37stimulihas anyone noticed the contrib unit tests are breaking on the new mod code ?
19:58flowerpowerscheme has so mixed up semantics. it makes me really appreciate clojures ways the mroe i try other languages after having tried clojure
20:00stimuliI never properly learned scheme .. other than reading sicp
20:02greghflowerpower: can you give an example? I'm curious
20:04blbrownif I have a bunch of clojure files (clj) in a jar, within in the clj files is a namespace. How do I load the namespace from another clojure file. I thought I just had to add the clj files in the jar and then add that to the classpath
20:04blbrown...but maybe I have to compile
20:06stimuliblb : does the ns match the folder hierarchy ?
20:09blbrownstimuli, I think so, this is what I have... http://paste.lisp.org/display/75457
20:10stimuliit uses the ns to find the file
20:10stimulins fred.joe.mary is in fred/joe/mary.clj
20:10stimulifred.joe.mary-with-lispy-dividers is in fred/joe/mary_with_lispy_dividers.clj
20:10Chousukeyou should name your namespaces deeper than one level
20:10blbrownstimuli, I need to move 'octane_main...' into octane/octane_main.clj?
20:11Chousukeso a "octane" namespace is not good
20:11stimuliuh .. no .. octane-main (the ns) will be found in octane_name the file
20:11stimulioctane is fine
20:11Chousukestimuli: it's not good practice.
20:11stimulinamespaces are broken on the dots
20:11stimulilike in java
20:11Chousukeblbrown.octane would be better, for example
20:12Chousuketo avoid collisions with others
20:12stimuliyeah
20:12blbrownYea, but clearly I can't get a directory with one directory right
20:12stimulilook in the contrib files and do it like them
20:12Chousukeblbrown: you can have an octane.clj file AND an octane/ directory
20:12stimuliyou should be starting every file with a ns macro that names its imports
20:12Chousukeblbrown: and you can load files from that directory in the octane.clj
20:13Chousukeblbrown: that way, you can break a single namespace into multiple files.
20:13Chousukeyou can also have subnamespaces of course
20:13Chousukefor example, octane, octane.main and octane.analytics
20:13blbrownsorry, where does the namespace have to be defined. 'octane/file.clj' or 'file.clj'
20:14Chousukeblbrown: depends on which namespace it is
20:14Chousukeif the namespace is octane.file, then it is octane/file.clj
20:14Chousukeif it's file, then it's just file.clj
20:14Chousukeno directory
20:14blbrownright now, namespace ... '(ns octane...)
20:15Chousukethat must be in a file called "octane.clj" at the root of the classpath
20:16Chousukeclojure inherits from java the source code organisation conventions.
20:16Chousukethey might strike newbies as restrictive at first, but you'll just have to get used to it.
20:17blbrownChouser, in the file './octane.clj' I define the namespace?
20:17Chousukewith clojure it's not as restrictive either, since it only matters when you create namespaces, not arbitrary files
20:17Chousukeblbrown: yeah
20:17Chousukeblbrown: though as said earlier, you should not call your namespace "octane"
20:18ChouserBeats me, just do whatever Chousuke says.
20:18Chousuke:)
20:18blbrownChousuke, got it, I was trying to get it to work, then I will change the structure
20:19Chousukeokay
20:20Chousukea common trick with clojure code seems to be to have a namespace corresponding to some file, and then that file uses "subnamespaces" internally
20:20Chousukeclojure.contrib seems to use this a lot
20:21blbrownI will have to look at it. besides the ability to get information about a namespace, are there are any special rules for namespaces. LIke, can you change the scope of a namespace. Available to some, unavailable to others
20:22Chousukea namespace will be available to whoever has it in the classpath
20:22Chousukebut you can define private things in it :)
20:24Chousukeclojure.contrib.sql has a subnamespace called clojure.contrib.sql.internal that it uses; it is quite apparent that it's not intended for end users of the library :)
20:24Chouserheh
20:25blbrownthere is no 'com' or 'org' , are we dropping that convention
20:25stimuliblb : seriously, look how they do it in the contrib code
20:25Chousukeyou can use it, but clojure doesn't, nor does contrib
20:25stimuliI hope we drop com and org
20:26blbrownso, it is sort of like the java convention
20:27Chouserblbrown: well, the idea is to be sure you don't have accidental collisions
20:27blbrowngot ya
20:27Chouserpeople using clojure aren't likely to accidentally make their own clojure namespace
20:27Chousukepick something to identify yourself, and stick with it.
20:28Chouserbut who knows if someone might make an octane or textjure namespace
20:29Chouserso using the domain names as aribtration is a practical if verbose solution
20:29Chouserof course domain names can change hands, so it's not exactly foolproof either.
20:29Chouserclearly we should all use uuids for our namespaces.
20:30blbrownhehe
20:30ChousukeI wonder how java handles namespace collisions.
20:30ChousukeI'm thinking it doesn't.
20:30Chousukewhich is probably why the convention is verbose.
20:30blbrownare you talking about classpath hell
20:31blbrownit is also interesting in Java, that you can compile a package with whatever name you want, the directory that it is compiled in doesn't matter, but runtime does.
20:32Chousukeyeah
20:32Chousukethe default package is annoying too
20:33ChousukeI once wrote some java code that did custom classloading and it confused the hell out of me.
20:33ChousukeI was a newbie to Java's package system and it was not fun.
20:34ChousukeI think using netbeans further complicated it :P
20:35blbrownit never is, I work with 'websphere' (complex j2ee application server crap) and it is not always clear how classes are loaded. I get A.class is not compatible with A.class errors all the time
20:58stimulihas anyone noticed the contrib unit tests are breaking on the new mod code ?
20:59durka42well the behavior of mod definitely changed
21:01hiredman~def mod
21:01reprapwhats the easiuest way to do 2d-grpahics in clojure? liek for shoot-emup-sidescroller
21:01durka42(yes, the unit tests fail)
21:02stimuliluckily I don't use mod on floats or ratios :)
21:02hiredmanI could have sworn google code syntax highlighted clojure code
21:03stimuliso is the new mod wrong .. or do the unit tests need to update
21:03stimuliit is nice to mod floats ... I wonder if java.lang.Math has mod on floats
21:03durka42heh, a clojure koan
21:04durka42"mod is broken in SVN HEAD"
21:04stimuliif so we could leave clojure's mod just ints without pain
21:04durka42"perhaps you should... change your definition of mod"
21:05stimuliMath has no mod
21:05Chouserit doesn't look to me like mod has changed
21:05stimuliwell .. I updated both branches from svn about an hour ago and the tests blew up
21:05stimuliyou guys discussed changing it on the list
21:05durka42it was fixed recently to give the same answers as ruby
21:06durka42i remember hearing about it in here
21:06stimuliooooo .. he added multi argument union and intersection
21:06stimuliYAY !!!!
21:06stimulithat will help me
21:07stimuli(sorry ... I get excited easily)
21:09stimuliso ... if I have a macro defined in a namespace ... but I want to *export* it from another namespace as if it were included there .. is there an easy way ?
21:10stimuliI have a macro defined ... in namespace clojure.datalog.rules
21:10stimulibut I want to create a lib named clojure.datalog.datalog
21:11stimuliand have users just import that
21:11stimulibut I want them to get the macro from rules w/out explicitly importing it
21:11durka42oh i see
21:11stimuli(def macroname rules/macroname) doesn't work
21:11stimulimaybe some ns interning trick
21:12stimulisomeone asked something like this on the list recently
21:12durka42wait, if datalog uses or requires rules/macroname, and client uses datalog, it doesn't inherit like that?
21:12stimulino
21:12stimuliwhen you use a ns .. you get the symbols *defined* there
21:12stimulinot the ones transitively included
21:12durka42right
21:15stimuliI could just define a macro that expands to the other macro
21:15stimuliI think
21:15Chouseryes
21:20stimulithat worked
21:21cooldude127~latest?
21:21clojurebotlatest is 1280
21:21cooldude127oh man 1 behind
21:28flowerpowerwhats the easiuest way to do 2d-grpahics in clojure? liek for shoot-emup-sidescroller
21:30stimuliflower : java 2d
21:30cooldude127hsrhlehnrtrstnenenvsnstntht
21:30cooldude127taertnrsta
21:30cooldude127attrstinehartr
21:30stimuliit isn't necessarily easy
21:30cooldude127eiseir
21:30stimulicool : agree
21:30durka42eh?
21:30stimuliI agree
21:30cooldude127yeag it is so easy
21:31stimuliI think cool has a cat
21:31stimuli:)
21:31cooldude127i have 4 cats
21:31stimulievidently
21:31cooldude127but this stuffis soeasy
21:31RaynesI have 1 doggy and a snake :>
21:31stimuliI have four ferrets and a skunk
21:31cooldude127ehh i am not fond of snakes
21:31cooldude127skunk?>
21:31stimuliyes
21:32stimuliblack and white stripey thing
21:32Raynescooldude127: Corn snake. Most docile snakes in the world. He is shedding at the moment, so I can't play with him :|
21:32cooldude127how did you obtain a skunk
21:32stimuliI purchased her at a pet store
21:32cooldude127oh how un forntunate
21:32stimulishe's lovely
21:32cooldude127where do you live that you can buy a skunk at a pet store
21:32stimuliflorida
21:33RaynesSkunks are pretty. But they smell :(
21:33stimuliwell .. when you buy a skunk they come disarmed
21:33cooldude127oh that is a plus
21:33stimuliwell .. yeah
21:33RaynesI should buy a ferret
21:33cooldude127well i will let you talk with the real cool now. i took over his computer :)
21:33stimulipeople ask me if she can spray and I just look at them funny
21:33RaynesI bet they shit constantly.
21:33Raynes:|
21:33stimuliray : always get at least 2
21:33stimuliyes .. they shit a lot
21:34stimuliferrets need playmates or they go a bit off
21:34cooldude127off how?
21:34stimulithey get mean and bite a lot
21:34stimuliI mean .. not always
21:34cooldude127lol not good
21:34stimulibut if they have a friend to play w/ they get along better .. are happier ... and learn not to bite hard
21:34cooldude127i would like a hamster
21:35cooldude127haha
21:37cooldude127hey guys im going to have sex so i will talk to yall later
21:38flowerpowerjava.awt.Graphics2D ?
21:39cooldude127lol gf has a sense of humor
21:41flowerpoweryou mean your bf
21:41cooldude127what's that supposed to mean?
21:41Chouserthat's enough guys
21:42dreishLet's not have any drunk fights tonight.
21:42cooldude127lol
21:42stimulihttp://java.sun.com/docs/books/tutorial/2d/index.html
21:42flowerpowerhe has a bf, he cant fight anyway
21:42stimuliflower .. ^^^^
21:43cooldude127lol
21:46stimuliI don't know if I'd actually like to *see* that
21:46stimuliI mean ... read about it perhaps
21:48flowerpowerif a constructor is proteted what do i import and construct?
21:50Chouseryou probably have to subclass it, perhaps with 'proxy'?
21:50Chouseror maybe there's a static method you're supposed to use to create them?
21:50Chouserflowerpower: what's the class?
21:50flowerpowerhttp://java.sun.com/javase/6/docs/api/java/awt/Graphics2D.html
21:50flowerpowerjava.awt Graphics2D
21:52ChouserI don't think you make those, you're given them.
21:56gnuvince_Is there a document that describes guidelines to improve memory usage in the JVM?
21:56gnuvince_Rich mentioned that ephemeral objects are super cheap in a couple of his talks for example
21:57Chouserflowerpower: (.getGraphics (doto (javax.swing.JFrame.) .show))
21:57Chouserthat returns a Graphics2D
21:57Chouserobject
21:58Chouseractually, a sun.java2d.SunGraphics2D
21:59flowerpowerchouser: given?
21:59flowerpowerwhat does getGraphics do?
21:59flowerpowerah
21:59Chouserit's a method of JFrame
21:59flowerpower(let [myg2d (.getGraphics (doto (javax.swing.JFrame.)] (.dostuff myg2d)) ?
22:01gnuvince_QCon, that's by the site infoq.com, right?
22:01Chouserflowerpower: yes
22:02Chouserflowerpower: well, it seems you have to .show it before it has a graphics object
22:02Chouserbefore that, getGraphics returns nil
22:04lisppaste8fp pasted "graphics 2d" at http://paste.lisp.org/display/75462
22:04flowerpower^^ the string doesnt get shown
22:06Chousertry 100 100 for the coords
22:07Chouserflowerpower: and I'd recommend finding a Java turorial and following that
22:10flowerpower This is an abstract class that cannot be instantiated directly.
22:11flowerpowerwhat does that mean? i need to subclass?
22:11Chouserdidn't I answer that?
22:11ChouserThere are concrete classes that may be platform-specific
22:12Chouserthat are subclasses of Graphics2D
22:12Chouserthings like swing and awt will create the right concrete object for you, and you can get if via .getGraphics
22:18lisppaste8fp pasted "doesnt show" at http://paste.lisp.org/display/75463
22:18flowerpowerdo i need to set color or something?
22:20gnuvince_Anyone here uses paredit?
22:20durka42i used to...
22:21RaynesBecause it has that neat little button that automagically builds jar's for me.
22:21gnuvince_paredit.el, the Emacs minor mode.
22:22RaynesI know what it is.
22:22durka42invaluable for lisp
22:22gnuvince_ok
22:23gnuvince_Just wanted to make sure there was not another program with the same name.
22:23gnuvince_durka42: You say you used to. You stopped?
22:23durka42well, i switched to vim :)
22:23gnuvince_ok
22:23durka42if i were to use emacs for a lisp, i would use apredit
22:23durka42paredit
22:24gnuvince_I need to learn to use it properly
22:24gnuvince_Some things felt weird when I tried it
22:25gnuvince_for instance, because it always inserts a pair of parens at once, I'm not sure how you "wrap" a form into another
22:25durka42you've seen http://www.emacswiki.org/emacs/PareditCheatsheet and http://mumble.net/~campbell/emacs/paredit-beta.html ?
22:25gnuvince_For instance you have (map foo coll) and you want to call count on that. That gives me (count) (map foo coll)
22:25durka42i believe it's M-shift-(
22:26durka42there's also a binding to gobble (i think it calls it slurping) the s-exp to the right
22:26gnuvince_Ah, thanks
22:26gnuvince_I'll bookmark those
22:27gnuvince_I imagine you need to think of it less as inserting individual characters and more as moving forms around
22:28flowerpowerdo i need to set color or something?
22:29durka42gnuvince_: it definitely makes for a more structural editor
22:30gnuvince_I'll enable it and work with it this weekend
22:37durka42FWIW, flowerpower was just drawing the rectangle somewhere offscreen
22:44durka42flowerpower: try changing the rectangle's coordinates
22:44durka42i did setColor but i'm not sure it made a difference
22:44durka42also, you might get more help in #java, although you'd have to be able to translate their advice
23:00RaynesDoes anyone know how to turn off that bothersome feature where emacs creates a back up file when you exit emacs so that if you did it accidentally you wont lose anything?
23:00RaynesBecause it's annoying.
23:00ayrnieuask in #emacs ; that's not why it does it, or when it does it; C-h i m emacs RET C-s back-up , probably.
23:01durka42http://www.lns.cornell.edu/~bxin/computer/emacs/emacs24/emacs047.htm
23:01durka42Raynes: (setq make-backup-files nil)
23:02RaynesThanks.
23:02durka42also known as (setq shoot-self-in-foot t) :p
23:03RaynesI don't use emacs enough for it to be a problem. But everytime I save a file I have to delete the backup and that gets annoying.
23:08reprapis the backup-files the ojnes with ~ after? ie, hmm.clj~
23:14repraphttp://rafb.net/p/pKtPYn75.html
23:15p_lRaynes: change the backup settings then
23:15Raynes[22:14] <Raynes> I'm going to read Clojure until I become so gay for LISP that I piss parentheses and jackoff to macros.
23:16durka42(identical? reprap flowerpower)
23:17reprapclojurebot: Raynes is [22:14] <Raynes>I'm going to read Clojure until I become so gay for LISP that I piss parentheses and jackoff to macros.
23:17clojurebot'Sea, mhuise.