#clojure logs

2008-12-08

00:19Kerris7finished red black tree
00:20Kerris7oops wrong channel
03:04Lau_of_DKGood morning gents
03:22hiredmanshow
03:22hiredmaner
03:22hiredmanclojurebot: show
03:22clojurebotshow is http://groups.google.com/group/clojure/msg/96ed91f823305f02
03:39AWizzArdWhen I have a (def x (new javax.swing.JFrame)) object visible as a window, close it and do (def x nil), will this object then get gc'ed sooner or later? Or does Java somehow keep track of those guys and they live long?
03:41hiredmangui stuff is weird, because whatever windowing system also can have a ref
03:41hiredman(I don't know)
03:47AWizzArdhiredman: why don't you sleep? ;-)
03:47arbschtwe didn't hire him to sleep!
03:47AWizzArdweren't we just talking about find-factors and how fast it runs on our systems?
03:48AWizzArd(or: "how slow it runs when it is the Clojure version" *g*)
03:52hiredmaneh?
03:52hiredmanI slept, then someone called me (the bastards), so now I am awake
03:55AWizzArdOkay, so like me you got only a few moments of sleep.
03:56hiredmanit was a few hours I think
03:56AWizzArd4-5
03:56hoeckhi all, for the germans here: has anyone tried a clojure version for http://blog.fefe.de/?ts=b7c295e7 ?
03:57hiredmanneo4j sounds cute, maybe clojurebot can use it
03:59hiredmanclojurebot: neo4j is http://github.com/JulianMorrison/neo4j-clojure/tree/master
03:59clojurebotAck. Ack.
04:29hiredmansvn rev 1145
04:31hiredmansvn rev 1145
04:31clojurebotsvn rev 1145; made RT.DEFAULT_COMPARATOR use Util.compare
04:31hiredmanclojurebot: botsnack
04:31clojurebotthanks; that was delicious. (nom nom nom)
06:41AWizzArdIs there something in Java/Clojure for variably adding data to an url? Like (make-url ip port data), for example: (make-url "localhost" 8080 {:name "David" :lang "Clojure" :age 24}) ==> "http://localhost:8080/?name=David&lang=Clojure&age=24"
06:49AWizzArdhmm, probably java.net.URI comes closest
06:49AWizzArdHi black
06:49blackdoghi AWizzArd how's rife?
06:53AWizzArdI didn't continue yet. My next step is to write a report tonight and post it to the Rife mailing list, so that the author of Rife can reproduce my problem.
06:53AWizzArdIt will probably need some .java code in Rife to make Clojure accessible.
06:54blackdogyuck :)
06:56AWizzArdWhat is this # sign in (.toString (new java.net.URI "http" "foo.com" "/hello world/" "name=blackdog"))?
06:56AWizzArd==> "http://foo.com/hello%20world/#name=blackdog"
06:56blackdogan html anchor?
06:58AWizzArdok, probably right
07:04AWizzArdblackdog: I am not interested in these fragment parts of an URI. Unfortunately both constructors that allow me to specify a query also take a fragment string. How can I get rid of that # in the uri?
07:07blackdogwhy don't you just pass a sinlge string
07:07blackdogthere is a constructor for that
07:08AWizzArdbecause I want to let java correctly encode my variable data. I don't know how many vars I want to put into the url. Sometimes it is just name=blackdog, but sometimes also age=29 and lang="a b c"
07:10AWizzArd(.create java.net.URI "http://foo.com/path?var=some spaces") ==> IllegalArgumentException
07:12AWizzArdBut the URI class can do this correctly for me, and I can call (.toASCIIString on-it) and get the correctly encoded result, even for unicode chars in my data.
07:14blackdogI use org.apache.commons.httpClient.util.URIUtil.encodeAll
07:14blackdogthere must be something similar in the jdk but i was using that anyway
08:14gnuvincemorning
08:14AWizzArdHi Vince
08:16AWizzArdIs there something like CLs equalp or string-equal for strings? (string-equal "clojure" "CLoJure") ==> true
08:18duck1123AWizzArd: have you been doing any gen-class yet?
08:20AWizzArdyes
08:20duck1123I see you said something about needing to write Java code. I was wondering if you tried just using gen-class and discarded that approach.
08:21AWizzArdduck1123: the web development framework Rife (for Java) can read .class or .java files. I wanted to make it work with Clojure. As a first step I hoped that .class files, compiled by Clojure would be accepted. But that wasn't the case.
08:22duck1123I'm still having a hell of a time getting gen-class to produce a class file that can be read by Tomcat
08:22AWizzArdFor me it is a .class file for Jetty (+ Rife)
08:22AWizzArddoesn't work for me right now
08:23AWizzArdAlthough I don't know if it is Jetty or Rife that can't handle Clojures .class files.
08:23duck1123AWizzArd: looks like we may be getting hit by the same problem. (whatever that may be)
08:23AWizzArdmaybe
08:24duck1123have you tried running your class through javap?
08:24AWizzArdblackdog was able to make Jetty run with .clj files, by starting Jetty from Clojure, instead of going the other way, as I do.
08:24AWizzArdNo, never heared of javap
08:24duck1123That's how Compojure works
08:24duck1123javap is the java classfile decompiler
08:24duck1123you give it the name of your classfile, and it spits out the method signatures
08:25AWizzArdCompojure works by making use of javap or by starting Jetty/Tomcat from Clojure?
08:25duck1123Compojure starts jetty within clojure
08:25duck1123and makes use of proxy to generate the classes
08:26AWizzArdduck1123: can you try to make your example run in Jetty instead of Tomcat? Do you still get the same error message(s) then?
08:26AWizzArdI remember that I got some error that said that my HelloWorld class can't be instantiated
08:27duck1123I was just thinking about giving that a try. My application is not giving me an error. (which is frustrating) it's just refusing to load and gives a 404
08:28AWizzArdRife tells me about some error messages at least, which I will soon send to Rifes mailing list. Maybe the author knows more about what to do.
08:28duck1123AWizzArd: the reason I mentioned javap is because I'm getting a method signature of "public static {};" which looks really weird.
08:29AWizzArdDid you ask rhickey about that?
08:30duck1123no, he wasn't around when I discovered it yesterday. When I see him, I'll make sure to ask
08:31duck1123it's odd, because all of the other signatures are of the form: public java.lang.String toString();
08:34AWizzArdPossible that we have the same challenge right now.
08:35AWizzArdI just have not much time to look into this for some time *sigh*
08:36rhickeyduck1123: isn't that just a static initializer?
08:37duck1123rhickey: yeah, looking at the decompiled code, it looks like it interns all the vars
08:38duck1123I've just never seen anything like that before, and it was the only thing that stood out for me as being out of place
09:26ChousukeAWizzArd: you asked about string comparison earlier: java strings have the .equalsIgnoreCase method.
09:30AWizzArdthx Chou
09:33ChousukeIt's worth looking through the java docs for types such as maps, strings and numbers. the java api provides a lot of functionality that isn't mentioned in the clojure docs.
09:34duck1123AWizzArd: Jetty is giving me an error. (which is actually a positive thing) Looks like I have an IllegalArgumentException
09:35AWizzArdYou are getting closer!
09:36AWizzArdChous: yes thanks, I will look at this more often. I was not used to the javadocs so far, but instead I used http://www.lispworks.com/documentation/HyperSpec/Front/index.htm :-)
09:37AWizzArdHow can I remove the first occurence of a char in a string efficiently?
09:38Chousukestrings are immutable, so that would most likely involve copying the string in any case.
09:38AWizzArdright
09:39AWizzArdI just would like to do it in one run, and not traverse it several times
09:39duck1123(apply str (rest (seq "Hello"))) perhaps?
09:40waltersAWizzArd: i wouldn't worry about those kinds of things unless it's an actual bottleneck in your app
09:40Chousukeif you want to remove just the first character the substring method is probably the best.
09:42ChousukeIt seems StringBuffer is what you want.
09:42Chousukeit has a delete method.
09:43blackdogii think stringBuilder is meant to be faster than StringBuffer
09:44ChousukeStringBuilder isn't thread-safe though. 
09:45blackdogslurp and str use stringbuilder
09:45Chousukewell, they don't use the instance across multiple threads I suppose
09:46blackdogdepends on AWizzArd usage I guess
09:46Chousukebut other than the thread-safety difference, sbuilder and sbuffer are identical, so pick whichever works
10:00rhickeydon't use StringBuffer anymore
10:03duck1123interesting... I have a Hello World in jetty
10:05Chouserduck1123: still no love fromtomcat?
10:05duck1123I don't know yet. I need to move my code back home and try
10:06Chouseroh, ok.
10:08duck1123but it works on jetty 6.1.14 on Ubuntu... That's farther than I've gotten before
10:09AWizzArdWhy no StringBuffers? Will they be deprecated?
10:10rhickeyStringBuilder is proof that StringBuffer is wrong
10:14duck1123Chouser: still no love from Tomcat :(
10:14rhickeyduck1123: what happens?
10:15duck1123rhickey: I'm getting a 404 when I try to load the app
10:16duck1123No errors that I can see. I can load static content, and manager shows the app as being loaded
10:17rhickeyduck1123: that could be anything
10:17rhickeyis this a simple hello world or a more involved thing?
10:17AWizzArdWhat is the function called that makes (? :a :b :c 10 20 30) ==> {:a 10 :b 20 :c 30}?
10:18AWizzArdi have used it yesterday but can't remember its name
10:19Chouser(doc zipmap)
10:19clojurebotReturns a map with the keys mapped to the corresponding vals.; arglists ([keys vals])
10:20AWizzArdthanks Chous
10:20lisppaste8duck1123 annotated #71768 with "latest attempt at getting Tomcat to work" at http://paste.lisp.org/display/71768#2
10:39RSchulzIs there something special about function names that begin with a hyphen? Or is it just a naming convention of some sort?
10:40duck1123that's how genclass identifies the functions
10:40duck1123the default prefix is "-"
10:40RSchulzWhat is the difference between those with and those without the hyphen?
10:43duck1123I think gen-class only looks for implementations of the for (str prefix methodname) other functions are just normal functions
10:43rhickeyRSchulz: when you gen some class Foo, with a method bar, and say the implementing ns is my.baz, then the Foo stub will look for my.baz/-bar at runtime when bar is called. If you define it, it will get called. You can still define anything else you want in my.baz. You can pick any prefix you want with :prefix
10:44RSchulzSo the prefixed functions become public methods in the generated class? Is that it?
10:45RSchulzIt establishes the connection between Clojure functions and generated class methods?
10:45duck1123if it's an override of the base class, or specified in :methods
10:45RSchulzThe first time I saw it, I thought it signified static methods, 'cause it was a "main" that had it.
10:45duck1123check out http://clojure.org/api#toc247
10:46RSchulzAnd then I guessed it meant private (as in (defn- ...))
10:46rhickeyhttp://clojure.org/api#gen-class works too
10:46RSchulzI did read that, but I didn't grok it.
10:46rhickeyRSchulz: well, there is a hint of that interpretation - the prefix is used to prevent collisions
10:47RSchulzWhat happened to the distinction between generating and writing a class file? Didn't there use to be two differen gen-...-class functions?
10:48rhickeybut nothing you write in the implementation shapes the stub, the gen-class drives everything
10:48rhickeyRSchulz: gen-and-load-class engendered bad behavior and false expectations
10:48cemerickrhickey: I noticed that the Reflector requires that all fields/methods it invokes are public. That caught me by surprise when I was trying to invoke a method on an instance of a package-private class from a clojure impl of a genclass in the same package. It'd be nice if the invocation context were threaded through the reflector usage.
10:50rhickeycemerick: this is a reflection limitation - there is no threading of context through reflection
10:51cemerickrhickey: you mean just of the clojure impl, right? I seem to vaguely remember using reflection to forcefully invoke a private method on an object many years ago...
10:52rhickeycemerick: you can't with default privileges call anything other than public members via reflection
10:55cemerickah, I forgot about ReflectPermission
10:56drewolsonhey all, i'm trying to read an rss feed from my internal cruisecontrol box, any idea why i'm getting nothing from this: http://gist.github.com/33497
10:56drewolsonit just hangs
10:56drewolsonand i can curl the url just fine
10:57cemerickrhickey: isn't that only relevant if the jvm was configured to use a security manager?
10:59danlarkindrewolson: works for me with http://www.reddit.com/.rss
10:59drewolsondanlarkin: hrm, strange...maybe java is being funky with respect to the proxy
10:59drewolsonalthough it's an internal site
10:59drewolsonand i don't have my http_proxy env var set
11:00duck1123authentication, maybe?
11:00drewolsonduck1123: naw, i can hit it from ruby just fine
11:00drewolsonusing open-uri
11:03AWizzArdIs there something similar to doseq, but which stops as soon one of the sequences is traversed (like map). (doseq [x (range 5) y (repeat 0)] (println x y)) <-- this should print 5 lines
11:05ChouserAWizzArd: you could add ':while x', though I guess that's not exactly the same thing.
11:05rhickeycemerick: I'm really not interested in going there
11:06Chouseroh, wait, that doesn't even make sense.
11:06AWizzArdChouser: I think this won't help, as x will begin to cycle from the beginning.
11:06Chousery is an inner loop -- goes forever.
11:06AWizzArdyes
11:07Chouserso what do you want again? When should y stop?
11:07Chouseror do you want x and y traversed in parrallel, instead of nested?
11:07cemerickrhickey: fair enough. I might submit some patches to make the associated error msgs more descriptive, then.
11:07AWizzArdyes, like (map vector (range 10) (repeat 4)), but for doing side effects
11:07AWizzArd(such as appending to a StringBuilder)
11:08AWizzArdMaybe there exists already some function to do that.
11:08ChouserAWizzArd: currently I think the only thing that takes seqs in parallel like that is 'map' (or I guess zipmap)
11:09ChouserAWizzArd: so: (doseq [[x y] (map list (range 5) (repeat 0))] ...)
11:10AWizzArdsure, I can work around it, just thought there could be something like (domap ...)
11:36hiredmanclojurebot: latest?
11:36clojurebotlatest is 1147
11:36hiredmansvn rev 1147
11:37clojurebotsvn rev 1147; added unchecked-remainder
11:42AWizzArdOh, that is cool stuff!
11:43AWizzArdChouser: do you know who added the unchecked-remainder?
11:45duck1123I wonder why the github mirror is falling behind. It used to be really good, but it says the latest is 1146
11:46hiredmanAWizzArd: I think it was rhickey, he was in last night with his own factor using all the unchecked stuffs
11:51danlarkininteresting talk: http://www.infoq.com/presentations/click-fast-bytecodes-funny-languages
11:54ChouserFor the record, only Rich can add anything to clojure svn, and I wouldn't expect that to change anytime soon.
11:55ChouserIf what he adds is entirely or mainly from a patch submitted to the google group, he's careful to give credit in the checking comment. No attribution generally means it all his.
13:16clojurebotsvn rev 1147; added unchecked-remainder
13:16clojurebotsvn rev 1147; added unchecked-remainder
13:17clojurebotsvn rev 1147; added unchecked-remainder
13:17clojurebotsvn rev 1147; added unchecked-remainder
13:18clojurebotsvn rev 1147; added unchecked-remainder
13:19clojurebotsvn rev 1147; added unchecked-remainder
13:19rhickeyclojurebot: stop
13:20clojurebotexcusez-moi
13:20clojurebotsvn rev 1147; added unchecked-remainder
13:20abrooksrhickey: /kick clojurebot
13:20clojurebotsvn rev 1147; added unchecked-remainder
13:20gnuvincewth?
13:21clojurebotsvn rev 1147; added unchecked-remainder
13:21duck1123clojurebot: klaatu barada nikto
13:21clojurebotI don't understand.
13:21clojurebotsvn rev 1147; added unchecked-remainder
13:22duck1123clojurebot: latest?
13:22clojurebotlatest is 1147
13:22abrooksrhickey: Which brings up something I've been meaning to mention in the Google group but want to know how you feel about it: Branching off a #clojure-dev for developers and quiet lurkers, having #clojure as a place for general user questions and runaway bots?
13:22hiredmanoh
13:22hiredmanrhickey: so sorry
13:22rhickeyhiredman: no problem
13:23hiredmanI was messing with it and wonder why it wasn't responding to me in my privmsg window
13:24rhickeyabrooks: clojure-dev would be for contributors?
13:25abrooksrhickey: That's the general idea - contributors and people interested in quietly watching the contribution process. Other opensource projects are set up with a #foo and #foo-dev channel scheme.
13:26rhickeyabrooks: fine by me - you want to set it up?
13:26abrooksrhickey: The tradeoff is that developers (contributors) sometimes withdraw to the #foo-dev channel by habit and won't pay as much attention to #foo. It's desirable that they still be in both but have a high signal-to-noise ratio in #foo-dev when the want to communicate together but still get stuff done.
13:26abrooksrhickey: Who set up #clojure?
13:27gnuvincejcowan
13:27abrooksrhickey: Ah. It would probably be good to make you and tomhickey (and perhaps some others) operators so you can kick/ban runaway bots and users if the need emerges.
13:28Lau_of_DKEvening gents
13:28Lau_of_DKGentlemen, wonderful news: Emacs 23 is stable!! :)~~~
13:29gnuvinceLau_of_DK: post it to reddit!
13:29abrooksChouser: Do you still have reservations about starting a #clojure-dev at this point?
13:32danlarkinabrooks: is there reason enough? Does this channel get too chatty for discussion of clojure development?
13:33duck1123is this channel really that busy that it needs to be split in two? I could see that more with the mailing list, but not so much here.
13:35blackdogi don't think it's busy enough
13:35Lau_of_DKI will say though, that Im having a hard time keeping up with the mailing list
13:39jvoorhishello
13:39Lau_of_DKhello jvoorhis
13:40jvoorhisi've just started liking clojure, and wondered what the story is with java generics
13:41jvoorhishow does one go about instantiating a generic collection, for example http://java.sun.com/j2se/1.5.0/docs/api/java/util/PriorityQueue.html
13:42drewrjvoorhis: In Clojure you would do well to use j.u.concurrent. http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/LinkedBlockingQueue.html
13:42abrooksdanlarkin, duck1123: Perhaps not. I intend to raise this question in the Google group to get wider feedback. I think it's getting chattier all the time. The real question is: Do rhickey and the contributors feel that it's a distraction.
13:43rhickeyjvoorhis: just leave off the generic part: (java.util.PriorityQueue.)
13:43jvoorhisdrewr, rhickey: thanks, that's helpful
13:43rhickeyabrooks: I would appreciate it if people stayed on topic, when they do it's fine
13:44rhickeyIf we create a culture of that, we'll all be better off
13:44drewrAnybody watch any football yesterday?
13:44rhickeyI just don't want to be the 'can we please stop talking about editors/vcs?' police :)
13:46abrooksrhickey: So it sounds like you'd want to try to keep the focus on #clojure and keep #clojure focused. More easily said than done but it's a good goal. I suspect that if enough of the regulars give gentle nudges to the others to stay on-topic we can avoid #clojure-dev for a while.
13:46rhickeyabrooks: sounds like a plan
13:47danlarkina little healthy chatter when the channel is otherwise silent is okay I'd think... helps build community :)
13:48abrooksdrewr: STAY ON TOPIC, DARN YOU!!! ;-)
13:48abrooksOh.. I said gentle didn't I...
13:48abrooksdanlarkin: Agreed. It's a tricky blance though.
13:48Lau_of_DKabrooks: The only one not staying on topic for the last 10 minutes is.. can you guess? :)
13:49abrooksLau_of_DK: Ack -- you beat me to it. :)
13:49Lau_of_DKAnyway, back to Emacs23
13:49abrooksHa!
13:50Lau_of_DKHA!
13:50Lau_of_DK:)
13:51AWizzArdLau_of_DK: did you find out more about Clojure+JavaFX? Do you think it's possible to write FX apps with exclusively using Clojure as lang?
13:52Lau_of_DKAWizzArd: Im not deep enough into it to confirm one way or the other, but 1) I _think_ its possible, 2) its worth pursuing, so I will most likely spend some time on it, once I wrap up another project
13:52AWizzArdwould be cool :-)
13:53Lau_of_DKYes, would be awesome :)
13:54gnuvinceEmacs 23 was officially released?
13:54gnuvincelink?
13:56whiddenhow do you make a "reference" to a java enum/constant from within clojuer, e.g. something to java.util.concurrent.TimeUnit.MILLISECONDS?
13:56Lau_of_DKgnuvince: not official, just stable
13:56Lau_of_DK cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs co -r emacs-unicode-2 emacs
13:56Lau_of_DKcvs update -A
13:56gnuvinceLau_of_DK: what's the difference?
13:57gnuvincestable is like RC or something?
13:57RSchulzwhidden: java.util.concurrent.TimeUnit/MILLISECONDS
13:57Lau_of_DKgnuvince: I'll explain later when Rich isnt looking, go check it out :)
13:57RSchulzAssuming MILLISECONDS is static.
13:57whiddenRSchulz... ah forgot the '/' thanks.
13:58stuarthallowaywhidden: you could also (import-static java.util.concurrent.TimeUnit MILLISECONDS)
13:59RSchulzWhere is import-static defined?
13:59stuarthallowaycontrib
13:59stuarthallowayit will be in the book (macros chapter) in the next beta
13:59RSchulzSounds like it ought to be in core. Why isn't it?
14:00stuarthallowaywhoa man, book prose written, don't go "improving" things :-)
14:00RSchulzhttp://www.infoq.com/presentations/click-fast-bytecodes-funny-languages is much more interesting than the slides alone!
14:00rhickeystuarthalloway: who me?
14:01stuarthallowayrhickey: no, you should improve as much as you like! I was giving RSchulz a hard time
14:01RSchulzStu, if you wanted to write a book that could be "correct" and "complete", you should write abount ancient Rome.
14:02duck1123ok, no more bug fixes for stuarthalloway's sake
14:02stuarthallowayduck1123: Nooooo!
14:02stuarthallowayI have a test suite now, break what you want, I can take it
14:08whiddenstuarthalloway, right now your chapter on macros is a little thin :) and if Mr. Hickey keeps making late Sunday night addtions to the core you might have a difficult time finishing your book :)
14:08stuarthallowaywhidden: you will have a macro chapter by tomorrow, mehopes
14:09RSchulzstuarthalloway: Are you saying beta4 will be out tomorrow??
14:09stuarthallowayI am going to ship the prose to the prags today
14:10whiddenis there a way to load all of contrib in one fell swoop?
14:10stuarthallowaythey usually turn it around in hours
14:10RSchulzGreat. How long does it take them to get it to the gerbils?
14:10RSchulzHours! Then they'll send out notice to us pre-purchasers? Fabulous.
14:10stuarthallowayI'd be done already except I let Chouser look at it first. :-)
14:11RSchulzSomething you do no doubt at your own peril.
14:12whiddenyeah.. i realize that. but REPL emacs connection is only inferior-lisp and not swank so name completion doesn't work so well :(
14:14RSchulzrhickey: Why isn't import-static in core? Is it somehow inappropriate?
14:15rhickeyRSchulz: I haven't looked at it much
14:15RSchulzDoes anyone know why import-static presents static methods as macros? It hardly seems intuitive.
14:18AWizzArdrhickey: thanks for reacting so fast and providing an unchecked-remainder *thumbs-up*
14:18rhickeyAWizzArd: np
14:18danlarkinRSchulz: you'll have to ask Stuart Sierra I suppose
14:18RSchulzrhickey: Did you give any thought to a TRUNCATE counterpart for Clojure?
14:18rhickeyRSchulz: I imagine perf - wrapper fns would hide types
14:19rhickeyRSchulz: yes, I used to have that
14:19rhickeygot lost during numbers reworking a while back
14:19RSchulzAre you considering reinstating it?
14:20Lau_of_DKAWizzArd: Did you ever figure out why that function you did was super slow ?
14:20RSchulzLau_of_DK: You mean the one Rich made super fast...?
14:20Lau_of_DKCould be
14:21AWizzArdLau_of_DK: I made some changes. Two type hints #^Long and an unchecked-divide and an unchecked-remainder.
14:21rhickeyRSchulz: sure - patch welcome
14:21Lau_of_DKAWizzArd: And I mathced Java in terms of speed?
14:21RSchulzI started looking at it, but I'm even more relucant to fiddle with the Java. ... Why, I don't know. At least I know that language...
14:21RSchulzDo patches require a CA?
14:22Lau_of_DKRSchulz: considering that Rich is American, I imagine even posting to the googlegroup will eventually require signing on some type of legal document :)
14:22AWizzArdThese four changes made the runtime going from 1360 msecs runtime down to now 124 msecs
14:22Lau_of_DKwow
14:22RSchulzAre you suggesting Americans are excessively legalistic?
14:23Lau_of_DKHave you pasted it somewhere AWizzArd, with the annotations?
14:23Lau_of_DKRSchulz: We're a little beyond suggestions :)
14:23AWizzArdLau_of_DK: well, the Java version still runs at 29 msecs, but now the Clojure version is fast enough. It's a good result now.
14:23rhickeyRSchulz: yes please
14:23RSchulzDoes anyone know if Java 7 is going to use escape analysis to effect stack-local allocations?
14:24Lau_of_DKAWizzArd: Why such overhead? In % its still masive
14:24RSchulzCliff Click's talk (is that really his name?) was pretty interesting, especially the part about how much allocation Clojure demands.
14:25Lau_of_DKRSchulz: You got a link to that talk ?
14:25lisppaste8AWizzArd annotated #71780 with "Update on find-factor" at http://paste.lisp.org/display/71780#1
14:25RSchulzhttp://www.infoq.com/presentations/click-fast-bytecodes-funny-languages
14:25RSchulzdanlarkin posted it earlier today. Up 'til then, I'd only seen the slides.
14:25AWizzArdLau, there you can see the changes
14:25Lau_of_DKThank you Mr. Schulz
14:25Lau_of_DKThanks alot AWizzArd
14:25RSchulzEh? My father isn't here.
14:26duck1123I hate that you can't download the infoq videos
14:26RSchulzBut thank _you_ for spelling it correctly.
14:26RSchulzYeah. In that case, the slides are sychronized in a separate Flash animation on the same page, which is kinda' nice.
14:26duck1123for some reason my box here at work won't play sound in flash. I have to wait till I get home to watch any videos like that
14:30RSchulzYou know, even the latest version of find-factors still produces the wrong value for my numeric-pad mash: 43587438757
14:30RSchulzuser=> (find-factors 43587438757)
14:30RSchulz[21517]
14:30RSchulzAccording to Gnu "factor:"
14:30RSchulzfactor 43587438757
14:30RSchulz43587438757: 21517 2025721
14:31AWizzArdRSchulz: maybe it is not doing what you expect, but anyway, this was the function that was posted in c.l.l
14:31RSchulzYes, but since it clearly has a bug, that should be addressed, don't you think?
14:31AWizzArdI just mimiced that, without wanting to correct it, as I wanted a comparison between those. So by definition, that program is behaving correctly.
14:32RSchulzSo your contention is that it's just misnamed...
14:32AWizzArdone could maybe rename it to: find-some-factors :-)
14:39abrooksfind-factors-<=-sqrt-of-n
14:43AWizzArdrhickey: let's say a company has a codebase in CL. Now we imagine they want to slowly begin to rewrite their app in Clojure. Both sides would have to communicate with each other during the transition phase.
14:43AWizzArdHow should they do this? Sockets? Trying Kawa or ABCL?
14:44danlarkinAWizzArd: seems like that isn't a decision for rich to make... wouldn't it depend on what the app is doing, etc?
14:44AWizzArdWhat approach would be the one about which you would think first? I ask you because you were there, you even developed jfli and so on.
14:44rhickeyAWizzArd: if it runs under ABCL, they could at least share a VM. Kawa isn't CL, so just another port
14:45rhickeydepends totally on the granularity of the conversations
14:46AWizzArdWould be cool if both sides could use code developed by the other. So, sitting inside the same vm sounds nice.
14:49dmiles_afki am very interested in finding ways of using ABCL and clojure together
14:49Lau_of_DKrhickey: Are you putting any focus on the bytecode emission issues that Mr. Click raises in his talk in infoq ?
14:50rhickeyLau_of_DK: what issues?
14:50AWizzArdAnd jfli could maybe also be helpful? Parts of the app that were rewritten in Clojure could be called from the Lisp side with it, and the Lisp code could work as it did before.
14:50Lau_of_DKrhickey: If you didnt see the talk you should, he explains it very well, but it seems that Clojure bytecode emission has some odd holes in it, compared to going straight to inline
14:50rhickeyAWizzArd: there was a jFli port to ABCL for Java interop
14:51rhickeyLau_of_DK: I saw the talk and spent a lot of time talking to Cliff over 3 days
14:51Lau_of_DKrhickey: Ok, did you learn anything interesting?
14:51rhickeyLau_of_DK: yes
14:51Lau_of_DKhehe
14:51Lau_of_DK...that youre willing to share?
14:51rhickeyseriously, trying to work here
14:52Lau_of_DKOk
14:52dmiles_afkwhat the benefits of clozure and ABCL working together?
14:54dmiles_afkwell the benefits to cojure it seems to use java w/o the boxing of primitives it looks like.. where ABCL is still boxing everything
14:55dmiles_afki like Kawa because it attempts to do more than just Lisp.. but yet it doenst make it all the way to common lisp the way abcl does
14:56dmiles_afkABCL has enough jclass/jstatic/jcall etc it could use cojure pretty well.. and clojure is smart enough to use user defined types (the ones that are from ABCL)
14:58dmiles_afkclojure seems like some routines on Conses since in clojure they are immuatble they probably faster operations?
14:59AWizzArdWell, I should have a look at both then, abcl and jfli
15:02dmiles_afkyeah i'd start out by making sure their code ran in ABCL first
15:03dmiles_afkit probly will, but still you can undo any tangles that come up from abcl if any
15:03Lau_of_DKAWizzArd: Can you explain unchecked-remained for me please?
15:03AWizzArdLau_of_DK: it is modulo. 10%3 = 1
15:03AWizzArd(rem 10 3) ==> 1
15:03AWizzArd(unchecked-remainder 10 3) ==> 1
15:05Lau_of_DKHow does their implementation differ?
15:06AWizzArdthe unchecked-remainder simply uses the % from Java
15:08Lau_of_DKhmm, odd, I would have expeced rem to do that ?
15:08AWizzArdcompare it: (let [#^Long x 9999999999999999999999999999999999999999999999999, #^Long y 17] (unchecked-remainder x y))
15:08AWizzArd==> -7
15:09AWizzArdbut try rem instead, and it will give you the correct result
15:09AWizzArdno overflow of cpu registers and so on
15:09AWizzArdrem does not simply call Javas % operator, because that one is broken and only works for a fraction of possible cases
15:10AWizzArdwhere the number of possible cases increases with the amount of ram you have available
15:10Lau_of_DKoh, thats surprising
15:10AWizzArdwell, a long consumes about 8 bytes of ram, something like that. Only very few numbers can be represented with 64 bit
15:11AWizzArdBut if you have gigabytes of ram you could encode much bigger numbers, for example a 400 megabyte number. Javas modulo does not always work for those.
15:12Lau_of_DKSloppy coders
15:12AWizzArdgenau
15:12Lau_of_DK?
15:12AWizzArdwell, they just cared about efficiency
15:13Lau_of_DKhehe
15:13AWizzArdit's efficient when you do it only for cases for which the cpu gives you direct support
15:14AWizzArdalthough I have to admit that in my programs not often numbers greater than a few billions are needed
15:14AWizzArdso for lot's of cases this unchecked-remainder guy comes in handy
15:14Lau_of_DKThats true - Its just not typically seen in public libraries that they knowingly flunk in certain areas.
15:15Chousukeflunk?
15:16Lau_of_DKflunk, as in produce incorrect results
15:16Chousukeoh, well % not working for arbitrarily large numbers is quite normal.
15:17Chousukeafter all, on very few platforms you have "true" arbitrary precision integers.
15:17Lau_of_DKk
15:18Chousukesome techniques could be used to automatically decide if native number types can be used, and fall back to bigints when the native precision isn't enough though, but the JVM doesn't offer that as far as I know :/
15:22Lau_of_DKIts surprising Chousuke, that in 2008 we're still struggling with lowlevel prolems like that
15:23Lau_of_DKI mean, in the 80's people were anticipating flying cars in the new millenium, and here we still have work out when to use ints and bigints :)
15:24cemerickwhen implementing a genclass method that has a boolean return type, it looks like one needs to wrap values with (boolean ...) in order to avoid a classcastexception. It seems that the genclass machinery should automatically convert logical truth values to booleans on their way out of clojure-land.
15:27ChousukeLau_of_DK: computer hardware doesn't get magically smarter. :)
15:27ChousukeLau_of_DK: software tricks can help, but those come at the expense of efficiency.
15:29Lau_of_DKWell aint that just a fact :)
15:40kib2Hi. Is there any equivalent to CL's atom ?
15:41Chouserkib2: (not (coll? x)) is pretty close
15:41gnuvince(not (coll? x))
15:41gnuvinceoops
15:41gnuvincetoo slow
15:41kib2thanks Chouser and gnuvince :)
15:53Lau_of_DKHellooo kota :)
15:53kotarakZdravej, Lau.
16:10RSchulzHey, Meikel, I'd watch out for Lau. He has disclosed Denmark's imperial designs... You guys are just about first in line!
16:10Lau_of_DKhaha
16:11Lau_of_DKOur mission was simple - Try to make germany collapse on itself by imposing ugly hair-do's and an unmistakeable Arnold Schwartzenegger accent on the population
16:11Lau_of_DKSo far its an immense success
16:15danlarkinours was to creep angela merkel out with unsolicited back rubs
16:16kotarakoh dear. Maybe I should think about emmigrating...
16:18kotarakWhen she became chancellor a newspaper had a picture of her with the label "Miss Germany". A colleague from Auburn Hills took it with him to shock his colleagues.
16:20Lau_of_DKkotarak: Is it true, that since she became the new leader of your Empire, that you start a cold war every month around 28/29/30.th ?
16:20kotarak?? Not that I am aware of. She actually does ... well ... nothing.
16:21Lau_of_DKk
16:21danlarkinlol @ Miss Germany
16:22kotarakdanlarkin: It's rather depressing....
16:22Lau_of_DK/names #clojure-dev
16:22Lau_of_DKERC> abrooks
16:22Lau_of_DKHmm.. maybe we should talk about Clojure :)
16:23danlarkinhaha yeah rich is itching to tell us to shut up
16:23kotarako.O What's clojure-dev?
16:23Lau_of_DKKota, abrooks gave a 40 minute lecture today on why #clojure should be pure code :)
16:23Lau_of_DKIt was good too
16:23Lau_of_DK(maybe it was 20)
16:24Lau_of_DKaround 19:00
16:26Lau_of_DKkotarak: when youre done, have a look at this http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.11.4048
16:27kotarakLau_of_DK: yes. I know this.
16:28whiddenis there a sqrt function for bigints/bignumbers in clojure?
16:39Chouserwhidden: (Math/sqrt x) works, I believe.
16:52stuarthallowayhow hard would it be to make the :reload option to use/require recursive?
17:00Chouserto recurse into dependencies?
17:01Chouserstuarthalloway: as easy as saying :reload-all perhaps?
17:02stuarthallowaysound of head-slapping
17:02ChouserI didn't know it was there either, if that saves your head any pain.
17:03stuarthallowayin the best spirit of Clojure, I am now a lazy reader, and was never forced to read past the "," in the doc for require
17:03rhickeystuarthalloway: me too, I was going to suggest it should be called something different - maybe :reload-all
17:03rhickey:)
17:04stuarthallowaymore people will care about that flag once people are writing unit tests
17:04stuarthallowayand debugging them in the REPL
17:11Lau_of_DKCan somebody remind me, why did we want this confusion of (ns foo.bar.baz) and elsewhere (in-ns 'foo.far.baz) ?
17:14danlarkinbecause ns is macro that calls in-ns
17:17rhickeyns sets up a namespace declaratively, in-ns just puts you in one
17:18Lau_of_DKSure - But why not just either skip the ' as a whole, or use it in every instance. To other way around seems confusing
17:19Lau_of_DKs/To/The
17:31stuarthallowayand in similar vein, find-doc could take an unquoted symbol
17:32Lau_of_DKtrue - Like cgrandes javadoc
17:42Lau_of_DKOk, lets say I have a regex that finds ints, and I run it on "a b c 1 2 3", is there a function which will return [1 2 3] to me ?
17:43RSchulzIsn't that just an application of (filter ...)?
17:43AWizzArdI think only for digits
17:43RSchulzOh, you mean starting from the string?
17:43Lau_of_DKI need regex
17:43AWizzArdLau_of_DK: yes, it is possible. No, I don't remember how :-)
17:44Chouserre-seq?
17:44Chouser*sigh*
17:44AWizzArdI need regexps 2-3 times per year, and every time I basically have to learn from scratch how to use them: http://www.regular-expressions.info/
17:44Chouser'reseq'?
17:44Chouser're-seq'?
17:44RSchulzI thought there was an re-split, but it doesn't turn when I (find-doc "re-")
17:44AWizzArdbut Lau, one easy thing you could do, although not really efficient: split the string on each position that is *not* a digit char
17:44Lau_of_DKThats the one Chouser
17:44Lau_of_DKThanks alot! :)
17:45Chouser(map #(Integer. %) (re-seq #"\d+" "a b c 1 2 3"))
17:45Lau_of_DKAWizzArd: Like I said, I need regex :)
17:45RSchulzBut (re-seq ...) should work.
17:45Lau_of_DKIts in the bag
17:45AWizzArdLau: that's what I mean
17:45Lau_of_DKThats alot guys
17:45ChouserRSchulz: re-split is in clojure.contrib.str-utils I think
17:46RSchulzGot regex? "Mastering Regular Expressions" is pretty good, and comprehensive. It's in its 3rd ed. now. I have the 2nd (I passed on my copy of the 1st ed. to a friend who always finds REs troublesome.)
17:46RSchulzREs are like FP: A mind-set thing.
17:46Lau_of_DKI'll look into it Mr. Schulz - I need it
17:47AWizzArdChouser: yes, and I used it to clean a string from unwanted chars
17:47RSchulzChouser: Yup. There it is. In contrib.str-utils, as you said.
17:47AWizzArdjust split on everything that is not in ^[0-9a-z���] or something like that
17:47AWizzArdand then one can (filter #(not (empty? %)) result)
17:48RSchulzAWizzArd: For that approach, you'd be much better off inverting the character class you want, rather than trying to enumerate ever non-numeric Unicode character.
17:48Chouser#(seq %) is shorter and clearer than #(not (empty? %))
17:49AWizzArdyes
17:50AWizzArdChouser: or simply seq instead of #(seq %)?
17:50ChouserAWizzArd: oh, of course.
17:50Chouserhttp://clojure-log.n01se.net/date/2008-09-05.html#13:21b
17:51Lau_of_DKpictures (re-seq #"(?<=<(img.*)>).*(?=</img>)" raw-page)]
17:51Lau_of_DKGuys, how would you write this, so that it actually works? :)
17:51stuarthallowaywith an xml parser :-)
17:51AWizzArdi c
17:51Chouserding ding ding stuarthalloway wins
17:51Lau_of_DKhmm
17:52Lau_of_DKWould xml-> work straight on a html ?
17:52stuarthallowayon good html :-)
17:52Lau_of_DKbut I love xml-> :)
17:52AWizzArdLau: html can do things that are not possible with xml or s-expressions
17:52hiredmanwhat is xml-> ?
17:53pjb3Just saw this on twitter: http://www.turbojugend-cossebaude.de/clojure/clojure-logo.svg
17:53RSchulzLau: What are you trying to do with that?
17:53RSchulz(I love an RE challenge.)
17:53Lau_of_DKMr. Schulz - I need to extract links and pictures specifically, in order to crawl a website and make local copies
17:54RSchulzpjb3: I see a Java logo when I view that URL.
17:54pjb3RSchulz: look carefully, you'll see the lambda
17:54RSchulzpjb3: I was wondering about that. It's very similar to the origina, no? Probably a copyright infringement.
17:55RSchulzLau: You want the attribute value, right?
17:55Lau_of_DKYes sir
17:55pjb3RSchulz: yeah, probably, it's cool anyway :)
17:55RSchulzI've not totally figured out the escaping requirements for the look-ahead and look-behind sub-patterns.
17:56RSchulzI think that may be what you're bumping into.
17:56Lau_of_DKRSchulz: Theyre actually easy, but Clojure does it a little differently than others
17:56RSchulzCould you give me a sample that should be matched?
17:57RSchulzWhat's different about Clojure? It just passes everything on to java.util.Pattern, right?
17:57RSchulz(or java.util.regex.Pattern, as the case may be)
17:57Lau_of_DKI dunno
17:57Lau_of_DKTry this (re-seq #"(?<=<(\w+)>).*(?=<\/\1>)" some-html)
17:57RSchulzIt's just that with #"..." you don't have to go through the rigamarole of extra escaping.
17:57Lau_of_DKYou'll get a regex error, but it would work fine in C# or Perl
17:57RSchulzI'm looking for the some-html to use to test.
17:58Lau_of_DK(defn get-data
17:58Lau_of_DK [url]
17:58Lau_of_DK (let [s (.openStream (java.net.URL. url))]
17:58Lau_of_DK (apply str
17:58Lau_of_DK (map char (take-while pos? (repeatedly #(.read s)))))))
17:58Lau_of_DK
17:58Lau_of_DK
17:58Lau_of_DK(def some-html (get-data "http://www.google.com&quot;))
17:58RSchulzUnmatched delimiter.
17:59RSchulzThe very first close-paren is being seen as ending the zero-width look-behind, yes?
17:59RSchulzThat leaves the second open paren unmatched.
17:59RSchulzThat's what I meant by escaping nested patterns in the look-behind notation.
18:00RSchulzAlso, an unbounded look-behind appears to be a no-no.
18:00Lau_of_DKI can read the error also, but the point is, this works in C#
18:01RSchulzSo what? It has its own RE syntax, no doubt.
18:01RSchulzBesides, what are you trying to capture in the look-behind?
18:01sarcher|workhow do you run a clojure program so that it exits when it's one?
18:01sarcher|worki'm a newbie
18:01sarcher|workwhen it's done
18:01sarcher|worksorry
18:01Lau_of_DKIn this particular, anything between <htmltag> ... </htmltag>
18:02RSchulzsarcher|work: You can just call (System/exit status-value)
18:02sarcher|workthanks
18:02Lau_of_DKRSchulz: How do I fix it ?
18:02sarcher|worki knew it would be something easy, i just didn't see an (exit) or (close)
18:02RSchulzLau_of_DK: How generic does it need to be? What can be assumed about what appears inside the element?
18:03RSchulzThe tag itself is fixed, right? Say, <img ...>...</img> ?
18:03Lau_of_DKSpecifically I need <img src="****"> and <a href="****">
18:03RSchulzOK. And to be clear, you want the value of the src= or href= attributes, not the content of the element, right?
18:03hiredmanuh
18:04Lau_of_DKExactly right
18:04Lau_of_DK(I know the last example was the opposite, but the current task is the most important)
18:04RSchulzOK. Give me a minute. In the mean time, consider that the only context you care about is the <img on the left and the very next > on the right.
18:12RSchulzLau_of_DK: OK. Here goes:
18:13Lau_of_DKoops
18:13RSchulz(def img-src-RE #"<img\b[^>]+src=['\"]([^'\">]+)['\"]")
18:13RSchulz(def some-html "this is stuff with an <img foo='bar' src=\"http://foo.bar/image.img\&quot;&gt; in the middle")
18:13RSchulzuser=> (re-find img-src-RE some-html)
18:13RSchulz["<img foo='bar' src=\"http://foo.bar/image.img\&quot;&quot; "http://foo.bar/image.img&quot;]
18:13duck1123parsing html with regex is almost always a bad idea
18:14RSchulz(I don't know where that &lt; came from. It's a literal < in the RE I pasted.
18:14duck1123which is a shame, because it's so handy most of the time
18:14RSchulzduck1123: I agree, but snippet extraction of this very limited sort is manageable.
18:14kib2Is there any html lib like the PCL one here : http://www.gigamonkeys.com/book/practical-an-html-generation-library-the-interpreter.html ?
18:15RSchulzSomeone recently posted something like that on the Google groups / list.
18:15duck1123there are tons of good java libs you could use to tidy up bad html, and the xml lib to take care of the well-formed ones
18:17RSchulzduck1123: You convince Lau to change his approach.
18:17kib2RSchulz: any hint about when it has been posted ?
18:17Lau_of_DKRSchulz: thats amazing
18:17RSchulzI'm just a RE hired gun!
18:17RSchulzkib2: Let me check. BRB.
18:17Lau_of_DKIm dead tired and its past midnight here, so I hope I can return tomorrow for a walkthrough
18:17kib2RSchulz: thanks
18:18RSchulzSubject: Clojure template library; Initial posting date: 2008-12-03@10:04
18:18RSchulz(that's 10:04 PST)
18:19Lau_of_DKMr. Schulz, have a good night sir, and thank you for your help, youve been instrumental
18:19kib2RSchulz: thanks a lot, I'm looking for it
18:20AWizzArdWill clojure compile to the same bytecode for (filter seq x) and (filter #(seq %) x)?
18:20duck1123I'm sure everyone's seen it, but it seems relevant: http://xkcd.com/208/
18:21RSchulzI wonder if I can guess which that one is before I look (I've read them all...)
18:22RSchulzWrong. I was thinking it was the one where God admits he hacked the universe toget in Perl instead of using Lisp...
18:22RSchulzduck1123: And I'm flattered at the comparison!
18:23RSchulzhttp://xkcd.com/224/
18:25AWizzArdnever saw those before
18:27duck1123he made a shirt out of the regex one
18:31dmiles_afkRSchulz, are you from Teknowlege?
18:31RSchulzHowdy, Doug.
18:31dmiles_afkHey :)
18:31RSchulzTeknowledge was long in the past, though.
18:32dmiles_afkclojure doing you well?
18:33RSchulzMy brain has yet to warp itself to fit. Even Lisp has been quite a while. But FP really stretches you.
18:33RSchulzBut I like (Clojure, that is)
18:33dmiles_afki am working on the java port of Cyc (cycorp sanctioned) and seeing what bit of clojure helps
18:34RSchulzInteresting. This is based on the openCyc KB?
18:34dmiles_afkwell its based on ResearchCyc, but the OpenCyc works from the same code when the port source is protected enough to be released as OpenCyc
18:35dmiles_afkthe OpenCyc/ResearchCyc/FullCyc are the same codebase.. SubLisp translated to C or Java.. then compiled to make the binary
18:35RSchulzThat could work.
18:36dmiles_afki was researching a SubLisp -> Clojure port .. still waiting on something 2 weeks late from the "vendor" cycorp
18:37dmiles_afkits be the same amount of work for anyone deciding if they could indomatically translate Common Lisp to Cojure for the same effect
18:38dmiles_afkI keep waiting for anyone in here to undertake something like this :) LISP2CLOJ
18:38SimonAdameitHi
18:39SimonAdameitHow can I define a local function?
18:39SimonAdameitlet does not allow recursion
18:40dmiles_afkRSchulz, i still have to say your implmentation of a indexed KB using java int[]s still beats everything i've seen
18:40AWizzArdSimonAdameit: with fn or loop
18:40AWizzArdanonymous functions can call themselves in Clojure
18:40RSchulzDid I do that?
18:40SimonAdameithow?
18:41AWizzArdwith (recur ...)
18:41AWizzArdso, no Y-Combinator needed ;-)
18:41SimonAdameitcool, thanks :)
18:41AWizzArdJust think about recur as if it were the name of the function.
18:41dmiles_afkRSchulz, well the Teknowleedge Sigma code arround SKBs .. i figured was your authorship
18:42dmiles_afkRSchulz, up until three months ago someone exposed the Tek Web CVS for annonymous browsing for 6 years of public unfetered access
18:42SimonAdameitAWizzArd: "Can only recur from tail position"
18:45SimonAdameitOk, got it, fn takes a "name" argument. Though it is somewhat unexpected at first doing it this way (when you're comming from lisp)
18:53AWizzArdSimonAdameit: you don't need the name argument
18:53AWizzArdand yes, you should use recur only in a tail position, so that it can optimize the overhead away
18:54SimonAdameitHow do I do non tail recursion without the name?
18:54AWizzArdwell, for that you need a name
18:55AWizzArdI just don't see why you would want to do it ;-)
18:56SimonAdameitAhh, come on, I'll paste to have some fun :)
19:00lisppaste8SimonAdameit pasted "cfg parser" at http://paste.lisp.org/display/71828
19:02hiredmanSimonAdameit: (fn somename [args] body)
19:02hiredmanyou can use (somename x) in the body
19:02hiredmanI normally use "this"
19:03SimonAdameithiredman: thanks, I already discovered that one :)
19:17Chouserhiredman: earlier versions of clojure bound 'thisfn' for you.
19:29hiredmanI remember
19:35powr-tocIs there a function in clojure that returns a seq where only the first item to match a predicate is removed?
19:40blackdogpowr-toc, (doc some)
21:39danlarkincan someone give an example of fnseq? Not sure why (fnseq 4 #(vector 45)) throws a ClassCastException
21:41Chousera vector is not an ISeq
21:42Chouser(fnseq 4 #(list 45))
21:45danlarkinah perhaps the documentation should be updated to reflect the need for an ISeq?
21:49ChouserThe exception described the need pretty emphatically. :-)
21:55jvoorhisi noticed some similarities between the doc strings in src and the website -�is there a clojure documentation tool?
22:02joha1I'm testing compojure and want to add a function from the REPL, but I get an unresolved error when calling defservlet. Probably just a namespace problem, but I'm new to clojure and can't figure out what to do. Help?
22:02Chouseryou have a .clj file that's working?
22:03joha1I'm just testing from the repl script supplied in compojure
22:03Chouserjvoorhis: there's 'doc' and 'find-doc' -- I don't know what's used to convert that to a web page.
22:04jvoorhisthanks
22:04Chouser(doc doc)
22:04clojurebotPrints documentation for a var or special form given its name; arglists ([name])
22:04jvoorhisbegs the question, is the website code checked into the main repo?
22:05Chouserjvoorhis: it's a wiki of some sort
22:05rhickeywikispaces
22:05jvoorhiscool, thanks
22:07jvoorhislooking forward to writing some more clojure code :) so far, i've been able to send midi messages to ableton live from the repl
22:07rhickeyjvoorhis: neat
22:07jvoorhiswith little effort: http://gist.github.com/32973
22:09jvoorhisit's cool to see others are doing multimedia stuff with clojure, too
22:09jvoorhissomeday, i expect to see a processing demo
22:10Chouserjvoorhis: like this? http://github.com/rosado/clj-processing/tree/master
22:11jvoorhisChouser: that's it
22:15jvoorhisChouser: the example code is nice
22:16ChouserGreat. I've not done anything with it -- just saw it go by on the group.
22:17jvoorhisoh, i see
22:17Chouserjoha1: sorry, I'm apparently just as lost as you are.
22:18joha1np
22:18jvoorhisi should probably subscribe, and poke around in clojure-contrib while i'm at it
22:21Chouserjoha1: shot in the dark: (use 'compojure.http)
22:22joha1cool, it worked. I'm a real n00b at this :) thanks
22:25Chousernp
23:02danlarkinhttp://nothings.org/computer/iterate.html -- it's funny, the title is "Iteration is hard" but it should really be "State is hard"
23:19Chouserthat's a great link for when anybody complains about how "hard" it is to "just set a variable" in clojure.
23:19ChouserYou want mutable state? Really?
23:24danlarkinsadly it's too verbose for the type of person complaining about that :-/
23:26Chouserhm.
23:29danlarkinhopefully that didn't come off as insulting
23:38Chouserno, you probably have a point. And stated sufficiently broadly that we can each justify our own exclusion from that group.
23:42RSchulzAlong the lines of of the "talking Barbie" shtick, remember the line uttered by the talking Malibu Stacie doll: "Thinking give you wrinkles!"