#clojure logs

2009-05-22

00:07durka42i don't understand where clojure.lang.Compiler/macroexpand could be throwing away the metadata where clojure.core/macroexpand does not, as it is as direct a port as i can determine
00:08durka42+1 for that disassemble idea i suppose
00:15avitalhello. is there a good reference for what set! does? i'm trying to get it from http://clojure.org/vars but it doesn't make much sense to me. altogether i'm trying to see what would "go wrong" if you just vars instead of atoms
00:17avitalor maybe someone here might be able to elaborate?
00:18hiredmanthats an interesting question, I believe at one point refs and vars where the same thing (back in clojure pre-history)
00:18avitalmy current answer - i'm not sure its completely accurate
00:19avitalis that with atoms you can use a function that computes the new value for the atom and there is no intermediate value problems (that could cause broken invariants, etc)
00:19avitaland with vars you can still modify data you just don't have that added benefit
00:19hiredmanvars also interact with binding
00:22durka42man, if i knew jvm bytecode i could maybe figure out what's going on
00:22hiredman~def c.l.Compiler
00:22hiredman:O
00:22hiredman~ping
00:22clojurebotPONG!
00:22hiredman~def c.l.Compiler
00:23hiredmanconnection refused
00:25durka42connection refused going where?
00:25hiredmantinyurl I guess
00:26hiredmanI wonder if I over some quote
00:26hiredmanquota
00:27durka42~google tinyurl api quota
00:27durka42o_O
00:27hiredmanhuh
00:28hiredmanseems like maybe clojurebot needs a kick
00:28durka42~kick
00:28clojurebotFirst, out of 2520 results is:
00:28clojurebotGoogle Analytics Data API - Protocol - Google Analytics - Google Code
00:28clojurebothttp://code.google.com/apis/analytics/docs/gdata/1.0/gdataProtocol.html
00:28clojurebotNo entiendo
00:28durka42ha
00:28durka42it worked
00:56durka42unless i'm missing something really obvious, what is the point of the (new clojure.lang.Range ...) lines in c.core/range?
01:00hiredman,(range -20 10)
01:00clojurebot(-20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9)
01:04durka42but that does two things
01:05durka42the first is
01:05durka42,(new clojure.lang.Range -20 10)
01:05clojurebot(-20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9)
01:05durka42and the second is
01:05durka42,(take (- 10 -20) (iterate inc -20))
01:05clojurebot(-20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9)
01:05durka42and it throws the first one away
01:05durka42~def range
01:06hiredmanuh
01:06hiredmanit's in an if
01:07durka42that would be the "something really obvious" :)
01:07hiredman~def range
01:07hiredman~def max
01:07durka42why then...
01:07durka42because Range is faster but can't do bignums?
01:08hiredmanpossibly
01:08hiredmandunno
02:14cadscan I launch shell applications and pipe together arbitrary system processes inside clojure?
02:15hiredman~javadoc System
02:15hiredmanbah
02:15cadsin ruby, for example, `ls` => "bin\nDesktop\nDocuments\ndocument.tex\nincoming\nnbody\nopt\np\nPictures\nproject\nPublic\nstore\nTemplates\ntmp\n"
02:15hiredmanright
02:15hiredmanRuntime not System
02:16hiredman~javadoc Runtime
02:35yangsx,(clojure.set/rename-keys {:a 1 :b 2} {:a :a1 :c c1})
02:35clojurebotjava.lang.Exception: Unable to resolve symbol: c1 in this context
02:35yangsx,(clojure.set/rename-keys {:a 1 :b 2} {:a :a1 :c :c1})
02:35clojurebot{:c1 nil, :a1 1, :b 2}
02:37yangsxrhickey: Shouldn't the result be {:a1 1, :b 2}?
02:43slashus2hmm
04:00unlinkWhen are vars useful as a container for mutable data?
04:02AWizzArdunlink: it is difficult to say (formally)
04:02AWizzArdtypically vars will be used for atomic values, such as flags
04:03AWizzArdin most cases you would not want to store collections in vars and dynamically change their bindings
04:03AWizzArdcan you specify what you need?
04:12unlinkI don't have a use case. I'm just trying to understand the options.
04:13AWizzArdThey are in most cases used to send signals to other threads and not really as mutable data.
05:10Chousukehmm
05:14Chousukehad an exam for a course called "programmin language principles" today. the last problem was to write reverse in lisp
05:15ChousukeI hope they accept my solution using reduce. :/
05:16ChousukeI forgot the syntax for it in CL (with :initial-value whatever) so I used it like it works in clojure (with a comment). :P
05:16clojurebotfor is not a loop
05:17jdztheoretically they should. but you're in trouble if they are old-school and wanted you to write a recursive function...
06:27Chousukejdz: I guess I should've included a recursive definition of reduce.
06:27jdzhehe
06:34Chousukeactually, the previous problem was to tell what a given lisp function does... it was append. I guess I could've used that too :P
06:34Chousukebut reduce is much neater. :)
06:36AWizzArdImpress your teacher by letting him know that you are aware that map is just a special case of reduce :)
07:09maaclAnybody has any experience with JACOB (COM/Java) bridge and Clojure?
07:12maaclI cannot figure out how to apply map or doseq to the Variant objects returned by JACOB.
07:45opqdonutis there a simple way of propagating current local bindings inside an eval
07:48AWizzArdopqdonut: you could (list '+ loc1 loc2) and eval that
07:49opqdonuti'm not building the evalled structure, it's coming from elsewhere
07:53AWizzArdDo you have an example? Do you mean something like (defn foo [a b] (eval (+ b 10))) and then (foo 5 'a) and you want ==> 15?
07:54opqdonutyeah basically
07:55opqdonuti have a macro that builds a complex structure, which is then processed. processing includes eval
07:56jdzopqdonut: do you have experience with lisp programming?
07:56opqdonutand i'd like to parametrize these sturcutes built with the macro: "(defn foo [a b] (macro ...))"
07:56AWizzArdProbably you will need to write your own interpreter then
07:56opqdonutjdz: some, i've done cl and scheme in the past
07:56jdzopqdonut: anyway, macroexpand is your friend
07:57opqdonutjdz: please elaborate
07:58jdzopqdonut: macros are expanded when code is processed (compiled). with macroexpand you can see what code will be executed at runtime.
07:58opqdonutyes
07:59opqdonutah, with-local-vars will probably help
08:00opqdonuthmm
08:02jdzbtw, anybody noticed that [maybe all] source code locations are 0 now?
08:02opqdonutyeah
08:03opqdonutluckily we have contrib.stacktrace
08:03Chouserregression in svn 1370
08:03opqdonut(which doesn't help with all compile-time errors, sure)
08:04Chouserhm, and durka42 wrote a patch: http://paste.lisp.org/display/80629
08:06Chouserrhickey: are you getting this? :-)
08:06rhickeylooking now
08:07opqdonutis there a reason for eval not looking up current local bindings?
08:07jdzopqdonut: yes.
08:08opqdonutpray tell?
08:08jdzopqdonut: by the time your eval runs, the names of bindings may have long gone and replaced by register references.
08:08rhickeyChouser: what/s a test case?
08:08opqdonutok
08:09Chouser,(:line ^#'map)
08:09clojurebot1509
08:09rhickeyoh, in metadata
08:15jdz38 out of 460 public vars in clojure.core have a non-zero (and non-nil) values
08:17jdz:line values i mean
08:35rhickey.^#'when
08:35rhickey,^#'when
08:35clojurebot{:macro true, :ns #<Namespace clojure.core>, :name when, :file "clojure/core.clj", :line 310, :arglists ([test & body]), :doc "Evaluates test. If logical true, evaluates body in an implicit do."}
08:36Chousuke,*clojure-version*
08:36clojurebotjava.lang.Exception: Unable to resolve symbol: *clojure-version* in this context
08:37Chousukehmm.
08:38jdzclojurebot must be running on a version without *clojure-version*
08:38Chousukeyeah
08:50AWizzArdDoes the newest version of Clojure run in emacs + jochu's swank?
08:55jdzwhat's jochu's swank?
08:56eevar2http://github.com/jochu/swank-clojure/tree/master
08:56marklarAWizzArd: I set up a new comp the other day, trunk (the alpha snapshot) didn't work, but the 1.0 branch does
08:57jdzoh, that's the only swank :)
08:57jdzi might make a patch that makes it work for me
08:59AWizzArdjochu seems to be busy, no updates since over one month
08:59lisppaste8jdz pasted "swank patch for trunk clojure" at http://paste.lisp.org/display/80652
09:02AWizzArdjdz: great, that also works for me
09:03jdzthere's more work to be done if somebody wants to get swank-clojure-compile-p to work
09:03rhickeyadd-classpath be gone!
09:04jdzrhickey: yes, that's the short story :)
09:08Chousukehm
09:10Chousukeit seems clojure-slime-config forgets to add the swank directory to its classpath
09:10Chousukeso swank is correct, clojure-mode isn't.
09:10Chousukeor hm
09:10jdzChousuke: it does not forget, it is doing it using add-classpath
09:11ChousukeI can't see it anywhere
09:11jdzsee the paste above
09:14jdz,(:line (meta (var *ns*)))
09:14clojurebotnil
09:14Chousukeright; works
09:15Chousukenow to figure out why viper mode is not automatically enabled anymore...
09:16ChousukeI should really refactor my non-aquamacs-specific configuration into .emacs or something I guess.
09:22gnuvinceChousuke: I recommend ~/.emacs.d/init.el
09:23Chousukedoes every self-respecting emacs variant load that first? :)
09:23Chousukewhat.
09:24ChousukeI typed "info emacs" into a terminal and the window closed
09:24Chousukeit didn't crash. it just closed.
09:24Chousuke... maybe the shell did crash, though.
09:28Chousukefor something large like emacs a full manual is fine in info format I suppose, but it wouldn't hurt to have man 5 emacs that describes briefly what configuration files influence emacs and how. :/
10:30Chousukemeh, why is emacs making no sense.
10:31ChousukeI do (load "~/emacs.d/init.el") at the top of my init file and that seems to break custom-set-variables :/ (init.el itself does not have it)
10:36jdzChousuke: i think custom-set-variables wants to be the first form in .emacs
10:36jdzas always, i may be wrong
10:36Chousukewell, meh
10:37Chousukethat's no fun at all. spoils my modularisation attempt :P
10:37jdzand i think if you customize something with emacs customizer, it will put custom-set-variables as the first form later, anyway
10:37Chousukehmm
10:39Chousukeweird stuff.
10:40ChousukeI put the load statement in my .emacs file and now it works. but not in aquamacs' own config file (custom-blah still isn't the first form though)
12:18lisppaste8j-dot pasted "aliases and keywords" at http://paste.lisp.org/display/80657
12:19j-dotI've got a question about aliases and keywords ... in the REPL session I just pasted, I want the call to (my/foo {:my/bar "baz"}) to print "baz". Is this possible?
12:20j-dota call like (my/foo {:my-ns/bar "baz"}) works as expected
12:20hiredman::my/bar
12:20j-dotawesome, thanks!
12:21j-dotI thought the double :: was just for use within the namespace
12:32hiredmanclojurebot: :: is <reply>itym Paamayim Nekudotayim
12:32clojurebot'Sea, mhuise.
12:32hiredmanclojurebot: ::?
12:32clojurebotitym Paamayim Nekudotayim
12:48gnuvinceDoes anyone know when (if) Rich's QCon talks videos will be available
12:52duncanmdum de dum
12:53duncanmthis might be an idea that has been brought up before
12:53duncanmbut what about extending the . form to include something like (. 1 + 2)
12:53Chousukethat would be weird.
12:53duncanmi just tried it and got "No matching method found: + for class java.lang.Integer"
12:54duncanmbut it could be nicer syntax to people new to s-exprs
12:54duncanmin particular (. i < j)
12:54technomancyduncanm: I don't think Java works like other OO languages in that regard.
12:54duncanminstead of the usual (< i j)
12:54durka42it doesn't really relate to the established purpose of . though
12:54Chousukeduncanm: I don't think the benefit is enough to justify overloading it like that though.
12:55duncanmi guess it's my inner Smalltalker talking right now ;-)
12:55rhickeygnuvince: InfoQ spreads out their vids over time, some of the OOPSLA talks are just coming out
12:55technomancyduncanm: yeah, Java is not real OO. =)
12:55technomancyduncanm: but shielding people from prefix notation is generally not helpful... they need to dive into the deep end.
12:55Chousukeif you want infix notation, you can always write a macro
12:55duncanmhey rhickey
12:56rhickeyhey
12:56duncanmwell, usually i prefer the prefix notation (.foo obj) to (. obj foo), but sometimes i feel some tension deciding which form looks better
12:56duncanmi figured if that tension exists for method calls as is, no harm extending to operators too ;-)
12:57technomancythe tension will fade with time, don't worry.
12:57replacarhickey: question about metadata on namespaces? (from yesterday, but I don't think you saw it)
12:57duncanmi mention this because i found out the PLT Scheme people now have an extension that lets them write (i . < . j)
12:57duncanmthe syntax obviously(?) inspired by haskell
12:58replacarhickey: right now it seems to get lost in gen-class'ing, which means no ns doc for compiled classes.
12:58replacarhickey: should we have an issue on this?
12:58technomancyduncanm: with all due respect, don't go there.
12:58ChousukeI think (.foo obj) is better because it puts the actual operation first
12:58technomancyduncanm: that's a rabbit hole that everyone is tempted by, but it leads nowhere
12:58duncanmChousuke: but then if you nest a bit more, the (.. ) notation becomes mighty attractive
12:58ChousukeI prefer -> :)
12:58Chousuke(it's more general)
12:58duncanmthen i start to think, why don't i start with (. obj foo)
12:59duncanmChousuke: what's -> ?
12:59duncanmis that an alias to 'doto' ?
12:59technomancy-> is like a cross between doto and reduce
12:59rhickeyreplaca: yes, issue would be great, thanks
12:59technomancyit accumulates the return value of each call
12:59replacarhickey: ok, will do
12:59Chousuke(-> "foo" .toUpperCase symbol)
12:59duncanmi guess this sort of conversation must have been rehashed over and over again back in the Lisp days
12:59Chousuke,(-> "foo" .toUpperCase symbol)
12:59clojurebotFOO
12:59duncanmChousuke: oooh, that's news to me
13:00Chousukenote that it allows mixing java and clojure, which .. doesn't allow
13:00duncanmoooh, fun
13:00Chousuke,(macroexpand-1 '(-> "foo" .toUpperCase symbol))
13:00clojurebot(clojure.core/-> (clojure.core/-> "foo" .toUpperCase) symbol)
13:00technomancyduncanm: it's even come up on the clojure list several times. the consensus is always: people need to get comfortable with prefix notation or they will remain second-class citizens when it comes to reading existing code
13:00duncanmtechnomancy: right
13:01technomancywe don't want to fragment the community
13:01duncanmtechnomancy: yeah, i'm okay with the prefix notation
13:01duncanmtechnomancy: i just thought, the PLT people are now incorporating this . op . notation
13:01duncanmand clojure's front-dot notation is in fact even better, if only it supported operators
13:01Chousuke,(-> "foo" .toUpperCase (str "bar"))
13:01clojurebot"FOObar"
13:02duncanmbut i have no personal feelings regarding the underlying idea (that there be syntax for infix notation)
13:03duncanmhmm
13:03duncanmChousuke: is that like cascades in Smalltalk?
13:03rhickeyinfix is a non-priority, dramatically complicates readability once you are used to prefix
13:03duncanmrhickey: agreed
13:03technomancyduncanm: here's the latest discussion on that if you want to follow the last time it was raised: http://groups.google.com/group/clojure/browse_thread/thread/319a1c77ed718ba/3e4be7484b7cbe38?q=infix+mark&amp;lnk=ol&amp;
13:03duncanmheh, thanks but no thanks ;-)
13:04Chousukeduncanm: it's just a simple recursive macro: first form is put right after the head in the second form, the result of that is again put after the head of the third form, etc.
13:04duncanmall of this came to me because i was reading this guy blogging about this .op. notation from PLT, and I thought, Clojure can do better than that!
13:04gnuvincerhickey: ok, thanks.
13:04technomancyclojurebot: infix is not worth the trouble; see http://groups.google.com/group/clojure/browse_thread/thread/319a1c77ed718ba/3e4be7484b7cbe38
13:04clojurebotIn Ordnung
13:05duncanmso (-> "foo" .toUpperCase (str "bar")) is the same as (str (.toUpperCase "foo") "bar")
13:05Chousukeyes.
13:05duncanmfunky... i wonder when this form would be useful..
13:05duncanmneat
13:05duncanmlearned something new today
13:06Chousukeit's useful quite often
13:06Chousukeyou could also write (.toUpperCase) but the macro allows omitting the parens in that case
13:06rhickeyreplaca: could you please email me details on the SF meetup?
13:06duncanmrhickey: are you still doing a lot of travelling spreading the gospels of Clojure around?
13:07replacarhickey: yup, you'll get them this morning
13:07duncanmrhickey: like i said to you at the ILC, i keep thinking of how great it is that, 3 months after i saw your talk in Boston, i'm now writing Clojure code at work everyday ;-)
13:07rhickeyduncanm: Java one coming up. I might do JAOO in the fall if I can work it in. Overall I'm trying to ease up on travel so I can get more done
13:07Chousuke,(let [x 5] (> 6 x 1)) ; <- perk of prefix notation
13:07clojurebottrue
13:07technomancyduncanm: that sounds like a lot of fun actually. some kind of mendicant friar hacker wandering around with a time-worn copy of the book of First Halloway. =)
13:08duncanmChousuke: sure
13:08ChousukeI was surprised when I saw that in some code.
13:09ChousukeI didn't even consider > could take more than two parameters
13:09duncanmguys, i don't need to be sold on prefix notation ;-)
13:09technomancyheh
13:09duncanmi rarely use to front-dot notation myself
13:10duncanmtechnomancy: just for the sake of argument, wouldn't it be a good idea to disallow (. obj foo) and always wrote (.foo obj) ?
13:10Chousukeduncanm: . is the special form
13:11Chousuke.foo and Foo/bar are sugar for it.
13:12duncanmChousuke: that's implementation, one could choose not to expose . on its own, right?
13:12Chousukewell, I guess.
13:12duncanmah well
13:12Chousukeit could be useful for macro writers though.
13:12duncanmahh
13:12duncanmgood point
13:13duncanmsigh, how did i get myself into a discussion about syntax
13:13duncanmnext time, i should learn to keep it to myself - syntax discussions are generally silly
13:14Chousukethere's not that much syntax to discuss anyway :)
13:16hiredmanrhickey: docs say "The current namespace, *ns* can and should be set only with a call to in-ns or the ns macro, both of which create the namespace if it doesn't exist." but (binding [*ns* (create-ns 'foo)] stuff) seems to work fine, is correct that binding should not be used for this case?
13:22rhickeyhiredman: right, binding *ns* not advised
13:23hiredmanoh :(
13:24hiredmanin-ns seems hoplessly imperative
13:24hiredman(in-ns 'foo) do stuff (in-ns 'bar)
13:25rhickeyin-ns is not something for use in program logic, just for repl and declaratively establishing ns at top of file
13:26mcroomdoes anyone know if it's possible to bind *use-context-classloader* when generating a class via gen-class?
13:26hiredmanrhickey: so what would be used in program logic?
13:29rhickeyhiredman: what kind of program logic?
13:30hiredmanrhickey: uh, good question, someone was in here yesterday trying to write a macro for defining functions in another namespace so those functions would have access to private vars
13:36technomancywasn't there a with-ns macro contributed recently?
13:37replaca~def with-ns
13:37hiredman:(
13:37replacatechnomancy: looks like the answer is yes :-)
13:40hiredmanugh
13:41hiredmanno wonder, I re-defed that
13:45hiredmanclojurebot: how much do you know?
13:45clojurebotI know 302 things
13:47cemerickthere should be an add-method to go along with remove-method (and make roping an existing fn in as the impl of a method simpler)
13:51Chousuke(.addmethod multi dispatch fn)
13:51Chousuke:p
13:51Chousuke(I picked that from defmethod)
13:53cemerickChousuke: yeah, I looked it up, too -- I'm not saying that's hard at all, but it's a common-enough operation that a std fn should be available IMO (just like remove-method, which is just a wrapped call to .removeMethod) *shrug*
13:53hiredman~def max
13:53hiredmanoh crap
13:53cemerickspeaking of....
13:53cemerick~max
13:54hiredmanmismatch between what version clojurebot thinks is running and what version it is
13:56hiredman~def max
13:57hiredman,*clojure-version*
13:57clojurebot{:interim true, :major 1, :minor 1, :incremental 0, :qualifier "alpha"}
14:01technomancyI'm trying a project that complains due to the absence of ~/.clojure.conf, but it doesn't give any details about what this file should look like.
14:01technomancyanyone know where I could find a sample?
14:02danlarkinis it this? http://github.com/bkudria/dotfiles/blob/d5f9ea692162171664d604886a2467debab6c293/.clojure.conf
14:02hiredmanoh, isn't that a lanucher config dingus
14:02technomancylooks about right; thanks
14:03danlarkinfirst link in google for "clojure.conf" btw :)
14:03technomancyheh... the output told me to look in the "emacs-clojure" repository instead, which doesn't seem to exist.
14:10technomancyany other seattle residents in here besides myself and hiredman?
14:10technomancy=(
14:12technomancydanlarkin: I got the go-ahead to open-source my couch adapter btw
14:12ataggart /msg NickServ identify passw0rd
14:12hiredmancute
14:12technomancythere's not much to it, but here it is: http://p.hagelb.org/couch.clj.html
14:13technomancydanlarkin: is that pretty close to what you had?
14:13danlarkintechnomancy: I have a bit more than that
14:13hiredmanand hiredman doesn't do any software developement
14:13technomancydanlarkin: what do you think about the way with-db binds couch/*db*?
14:14technomancyI found it convenient syntax, but it breaks if you have anything lazy that gets realized outside the with-db block.
14:14danlarkinit's a neat idea.. yeah you have to be careful with the laziness
14:15hiredmanthe alternative is contrib.sql style passing around db
14:15danlarkinI have only explicit parameters, other than server, which is *server*
14:15technomancypassing around the DB name to every request felt tiresome to me, but you don't run into the laziness problem
14:16technomancyit might make more sense if you had code that used more than one DB at a time
14:16danlarkintechnomancy: yeah I was thinking I'd tackle that problem when I came to it
14:16hiredmanyou could make everything a multimethod to allow both styles
14:17technomancyhiredman: would you need a multimethod for that? seems you could just have optional args.
14:17technomancyoh, you mean a multi-body fn?
14:17hiredmanyeah
14:17technomancythat would probably be better, yeah.
14:17danlarkinit doesn't work for some cases, at least with my lib..
14:18danlarkinsince I've got, like, document-get which can take a DB and a document, or a DB, document and revision
14:20hiredmanhmmm
14:20technomancyhiredman: SeaFunc is next wednesday BTW
14:21technomancyin case you're interested. (Seattle Functional Group)
14:21hiredmanhmmm
14:22danlarkintwism also has a couchdb interface
14:22danlarkinI don't think any of us have "released" yet though
14:23danlarkinohhhh cemerick is coming around
14:23danlarkin:)
14:24cemerickdanlarkin: heh -- we'll see.
14:24cemerickWe are using jcouchdb for now, though.
14:24danlarkinI would be sortof almost ready to release, except I want an ordered-map, and lacking one I'm not sure what datastructure to use
14:25cemerick...and shelling out via python for a couple of key java-driven views. We may or may not make our own view server depending on timelines.
14:34StartsWithKhi
14:35StartsWithKany way i can load .clj file without executing it? like read-string
14:35StartsWithKwell, not like read-string as it reads only the first object
14:36hiredmanuh
14:36hiredmanread?
14:37StartsWithKheh, thanks
14:49ChouserI've got to be thinging about this wrong. I should not have this kind of race condition in Clojure code.
15:06cemerickWas I imagining things, or is there some kind of pretty-printing macroexpand these days?
15:07Chouserthere's pprint in contrib which can do such things
15:14hiredmanthe distiction is not unimportant with regards to scoping
15:14hiredmanoh wow
15:14hiredmanwrong channel
15:16sh10151uh
15:16sh10151how about
15:16sh10151"the distinction is important for scoping"
15:16sh10151just a suggestion
15:17hiredmanDENIED
15:17ChouserI use such double negatives a lot. They don't mean quite the same when cancelled out.
15:17sh10151Chouser: ITYM "it is not uncommon that I use double negatives"
15:18Chousersh10151: indeed, it's impossible that you're incorrect.
15:19sh10151"not unlikely that I'm correct"
15:19sh10151your version is a de morgan's nightmare or something
15:19emacsenI have an easy question. Can somone please help me by clojurizing this Java line (I'm getting constructor errors): Session session = Session.getInstance(new Properties());
15:20sh10151(Session/getInstance(Properties.))
15:20emacsenI've not seen the / macro before...
15:20emacsenwhat the heck is that? (doc is unhelpfu)
15:20sh10151you're old school like me then
15:21sh10151tried to learn the language and rich goes "hey, lemme improve that for you!"
15:21Chouserit's just a namespace qualified symbol, but if the namespace is actually a class name, and the name part is a static method or field, then it's a java interop call
15:21sh10151http://clojure.org/java_interop
15:21sh10151(Classname/staticMethod args*)
15:21Chouser,(macroexpand '(Session/getInstance(Properties.)))
15:21clojurebot(Session/getInstance (Properties.))
15:21sh10151if you don't know Java that might be rough for you
15:22sh10151you'd need to know that Session.getInstance is a static method call
15:22emacsenWow... that's useful but wow.... (No I don't know Java, and this is biting me)
15:22emacsenoh it's not instanced?
15:22Chouserhm. that macroexpand was not useful, because those classes are not imported for clojurebot
15:22sh10151Anything that starts out with Classname.methodCall has no instance
15:23emacsengotcha
15:23sh10151Java has no metaclasses
15:24emacsenThere really needs to be a quick primer somewhere
15:24sh10151a rosetta stone like you just asked for
15:24sh10151nothing too involved
15:24sh10151just covering the case of using Java libraries while not knowing Java syntax
15:24sh10151though Java syntax isn't the most complicated thing to learn
15:25emacsenExactly. It's also that many of the Clojure docs I've read assume you know Java
15:25hiredmanhttp://java.sun.com/docs/books/tutorial/java/index.html
15:25emacsenthey're all like "You know Java, so here's Clojure"
15:25sh10151yep
15:25sh10151like the talk about the Comparator interface and proxy and whatnot
15:25hiredmanclojurebot: learn java?
15:25clojurebot?
15:25sh10151Though it strikes me that Clojure's intent is to drag java developers to lisp
15:25hiredmanclojurebot: learn java is <reply>http://java.sun.com/docs/books/tutorial/java/index.html
15:25clojurebotOk.
15:26sh10151rather than the reverse :)
15:26hiredmanclojurebot: please help me learn java!
15:26clojurebothttp://www.khanacademy.org/
15:26hiredmanhuh
15:26emacsensh10151 I think so too but there are some of us who purposefully never learned Java :)
15:26hiredman~learn
15:26clojurebothttp://java.sun.com/docs/books/tutorial/java/index.html
15:26hiredmanclojurebot: are you kidding me?
15:26clojurebotIt's greek to me.
15:26sh10151it's worth knowing the syntax
15:27hiredmanclojurebot: learn me some java for great good!
15:27clojurebot?
15:28hiredmanclojurebot: how can I learn java?
15:28clojurebothttp://java.sun.com/docs/books/tutorial/java/index.html
15:29emacsenSo in that Session/getInstance (Properties) example I'm passing a Properties to the Session/getInstance?
15:29hiredmanactually berkely's 61b course video is online somewhere. that is like the most boring intro to java every
15:29hiredmanever
15:30hiredmanemacsen: don't forget the .
15:30hiredman,(macroexpand '(Properties.))
15:30clojurebot(new Properties)
15:30emacsenright... I got that... so yes, :)
15:47Lau_of_DKI need to get a thread-local-var going, is 'binding' the method of choise?
15:52danlarkinLau_of_DK: that's what I use, anyway
15:55Chousukewith-local-vars too
16:02cemerickhrm...why isn't there a tag in clojure-contrib's svn for 1.0?
16:02cemerick(I see the revision-comment, but a tag is good, and canonical.)
16:04Lau_of_DKThanks
16:06Lau_of_DKI have a problem picking between binding and with-local-vars - In the setting of using routes in compojure, each route needs to get an instance of the cookie for a given session - which would be appropriate?
16:10maaclDoes anyone have any experience with using JACOB (the Java COM bridge) with Clojure? I have problems applying Clojure functions/macros like map and doseq to the objects (Variants) returned by JACOB. I am guessing I need to do some kind of conversion, but I can't figure out how.
16:11replacacemerick: are you a slime guy?
16:11cemerickreplaca: no, enclojure :-)
16:12hiredmanmaacl: do you have specific code + exception?
16:12gnuvinceWould it be possible to make Java array accesses *not* go through the reflection library?
16:12replacacemerick: oh,, weren't you fighting enclojure that other night? I thought they had added pretty printing macro expansion, but maybe that's just slime & the vim extension
16:12Chousukegnuvince: hint them as #^ints etc?
16:13gnuvinceChousuke: still calls java.lang.reflect.Array.setInt and whatnot
16:13hiredmangnuvince: seems like it should be
16:13replacacemerick: but to answer your earlier question (pprint (marcroexpand-1 foo)) should do it
16:13hiredmangnuvince: are you using aset-int?
16:13cemerickreplaca: they may have. I haven't explored the new features much at all...just trying to get the work done. :-)
16:13gnuvincehiredman: yes.
16:13hiredmangnuvince: don't
16:13Chousukehmm.
16:14replacayou might want to wrap that in a (binding [*pprint-suppress-namespaces* true] ...) to remove the namespaces from the symbols (which makes it easier to read)
16:14dnolenaset is faster then aset-int, confirmed by the BDFL
16:14gnuvincehiredman: no change
16:15replacaI should probably just add that whole thing as a function in the pprint package... hmmm...
16:15maaclhiredman: sure , just a sec
16:15dnolenYou need to create a let expression. Cast with (ints ary)
16:15dnolenOr whatever
16:16hiredman2009:May:11:08:53:29 rhickey : Chouser: yes, hinted array + aset is fastest, aset-int is not a fast thing at all
16:16gnuvincednolen: this is what I got:
16:16gnuvince(let [#^ints arr (int-array len)]
16:16gnuvince (dotimes [i len]
16:16gnuvince (aset arr i (mask-fn (getter buf))))
16:16Chousuke(binding [*warn-on-reflection* true] (let [a (into-array Integer/TYPE [1 2 3 4 5]) a (ints a)] (aset a 1 (int 10)))
16:16Chousuke,(binding [*warn-on-reflection* true] (let [a (into-array Integer/TYPE [1 2 3 4 5]) a (ints a)] (aset a 1 (int 10)))
16:16clojurebotEOF while reading
16:16Chousukeoops
16:16Chousuke,(binding [*warn-on-reflection* true] (let [a (into-array Integer/TYPE [1 2 3 4 5]) a (ints a)] (aset a 1 (int 10))))
16:16clojurebot10
16:18Chousukehm, looks like the type casts are pointless
16:18ChousukeI don't get reflection warnings even if I remove them
16:18dnolengnuvince: I think you need yo cast the result of mask-fn. Return values are boxed.
16:19gnuvinceI meant, I get calls to java.lang.reflect.Array.setInt in the outputs of -Xprof and -Xrunhprof
16:19dnolenYou should not I'm pretty sure.
16:20gnuvincelet me try casting the result of mask-fn
16:20ChouserChousuke: I'm pretty sure that binding happens too late
16:23emacsenHey technomancy
16:23ChousukeChouser: might be.
16:24technomancyemacsen: hi
16:24gnuvincednolen: I still got some calls, although they look nearly negligible.
16:25dnolengnuvince: So an improvement?
16:26gnuvincenot really, performance is basically the same
16:26maaclhiredman: http://paste.lisp.org/display/80674
16:26dnolenSeems
16:26dnolenOdd
16:27technomancyemacsen: how goes it?
16:27hiredmanmaacl: replace (map mtch paras) with (class paras)
16:27gnuvincednolen: don't worry too much about it, I've been trying to improve the performance of this program for over two months now.
16:28maaclhiredman: com.jacob.com.Dispatch
16:29hiredmanmaacl: map takes a seq
16:29hiredmanor a Collection
16:30hiredmanbtw putting defs inside a function like that is not cool
16:30maaclhiredman: Yeah, and I don't know how to go from the Dispatch or Variant classes that I get from JACOB to a seq or Collection
16:31hiredmanmaacl: well, read the javadoc for Dispatch
16:31maaclhiredman: I know, this is just quick and dirty stuff to see if I can get it to work
16:31hiredmanis it some kind of logical collection? is does it provide an interator?
16:32hiredmanyou maybe need to write your own lazy-seq wrapper over Dispatch
16:32ataggartis any Iterable automatically seqable?
16:32technomancy,doc iterable-seq
16:32clojurebotjava.lang.Exception: Can't take value of a macro: #'clojure.core/doc
16:32ataggartah nice
16:33hiredmanataggart: well, not the same way a Collection is
16:33hiredmanbut you just call iterable-seq on it
16:33technomancy(doc iterator-seq)
16:33clojurebot"([iter]); Returns a seq on a java.util.Iterator. Note that most collections providing iterators implement Iterable and thus support seq directly."
16:33ataggartexcellent
16:33hiredmanok, ? what that said
16:34ataggartspelling counts ;)
16:35maaclhiredman: it is a java version of a MS level dispatch object whatever that is
16:36hiredmanmaacl: well, go read the javadocs
16:38maaclhiredman: that is what I did, it has no methods that imply that it is a collection
16:38hiredmanmaacl: don't look at methods, look at inheritence
16:38hiredmanmaacl: is it some kind of collection of things?
16:38hiredmanif it isn't, why are you trying to use map?
16:39hiredmanugh
16:39hiredmanand you're mapping a function that keeps re-defing stuff
16:39hiredmanhorrible!
16:39hiredmaninfact
16:39hiredmanjust forget about the map for now and rewrite the function using let
16:39maaclhiredman: it is a collection in this case but apparently it can represent any com object
16:40hiredmanmaacl: so how would you access the objects in the collection?
16:40maaclhiredman: as I said, quick a dirty, planning to clean it up
16:40hiredmanthere is quick and dirty, and there is shameful
16:41maaclhiredman: thanks, that is really helpful being a newb and all
16:41hiredmanif you are new there is all the more reason you should be writing in proper style
16:42hiredmanwriting it like that makes it difficult to read
16:42hiredmanand makes it harder for other people to help you
16:43maaclhiredman: I realise that, but that is what my current skills suffice for
16:44maaclhiredman: not that I do not want to improve them that is
16:45hiredmanmaacl: for binding names to values locally (within a function or some other scope) use let
16:45hiredman,(let [a 1] a)
16:45clojurebot1
16:45maaclhiredman: ok
16:47hiredmanso, how would you get one of the objects in the collection out of the Dispatch object?
16:49maaclhiredman: that is what I cannot figure out - the dispatch object is some sort of generic object and it has no useful methods as far as I can see
16:50hiredman...
16:50maaclhiredman: the com object it represents has a First and Last Property but no methids to iterate over it
16:51hiredmanis the javadoc online somewhere?
16:51maaclhiredman: I am really fumbling around in the dark here
16:51Chousermaacl: do you have clojure.contrib? Can you get one of these objects in your REPL?
16:51maaclyes
16:51Chouserhave you ever used clojure.contrib.repl-utils/show ?
16:51clojurebotclojure is the brand
16:52Chouseroh
16:52Chouser...catching up here...
16:53maaclChouser: http://paste.lisp.org/display/80674#1
16:53maaclhiredman: http://paste.lisp.org/display/80674#1
16:53Chouseryeah, see that now, sorry.
16:54maaclhiredman: don't think so
16:54hiredmanmaacl: what is this supposed to be a collection of?
16:55maaclhiredman: paragraph objects
16:56hiredmanwhat kind of java object is that?
16:56maaclhiredman: also a variant
16:57Chouserhave you managed to call any methods yet?
16:57Chouserdo you have any docs for this paragraph collection object?
16:57Chouserthe COM object I mean
16:57hiredmanmaacl: where there are a few nice getVariant methods there
16:57hiredmanI would start with those
17:01durka42,(defmacro_ with-nested-meta [obj & metas] `(with-meta ~obj (-> ~(last metas) ~@(map (fn [m] `((fn [~'_1 ~'_2] (with-meta ~'_2 ~'_1)) ~m)) (reverse (butlast metas))))))
17:01clojurebotjava.lang.Exception: Unable to resolve symbol: defmacro_ in this context
17:01maaclhiredman: but how would that help me to iterate over the collection
17:01Chouserdurka42: try _defmacro
17:02durka42,(_defmacro with-nested-meta [obj & metas] `(with-meta ~obj (-> ~(last metas) ~@(map (fn [m] `((fn [~'_1 ~'_2] (with-meta ~'_2 ~'_1)) ~m)) (reverse (butlast metas))))))
17:02clojurebotjava.lang.Exception: Unable to resolve symbol: _defmacro in this context
17:02durka42Chouser: i knew you had done something evil yesterday
17:02maaclChouser: yeah, only vaguely useful properties are First and Last and Count
17:02durka42,(keys (ns-publics *ns*))
17:02clojurebotnil
17:03Chouserdurka42: ok, now try with _defmacro
17:03durka42,(_defmacro with-nested-meta [obj & metas] `(with-meta ~obj (-> ~(last metas) ~@(map (fn [m] `((fn [~'_1 ~'_2] (with-meta ~'_2 ~'_1)) ~m)) (reverse (butlast metas))))))
17:03clojurebot#'sandbox/with-nested-meta
17:04hiredmanChouser: could you stop that?
17:04durka42,^^^^^(with-nested-meta [:base "base"] {:two 2} {:three 3} {:four 4} {:five 5} {:six 6})
17:04clojurebot{:six 6}
17:04hiredmanI am well aware there are holes in clojurebot
17:04Chouser,(clear-temps)
17:04clojurebotnil
17:04durka42maybe intern should be added to the blacklist
17:04hiredmanI am ok leaving holes
17:04Chouser,with-nested-meta
17:04clojurebotjava.lang.Exception: Unable to resolve symbol: with-nested-meta in this context
17:05ChouserIt's easy to clean up
17:05hiredmanthats not the point
17:05Chouseroh?
17:06hiredmanChouser: there are DoS like attacks using (try (catch)) allowing people to make macros waltzs around clojurebot's filtering of catch statements
17:09Chouser,_defmacro
17:09clojurebotjava.lang.Exception: Unable to resolve symbol: _defmacro in this context
17:09hiredman,(_def #^{:macro true} a [& b])
17:09clojurebotjava.lang.Exception: Unable to resolve symbol: & in this context
17:10hiredman,(_def #^{:macro true} a [b])
17:10clojurebotjava.lang.Exception: Unable to resolve symbol: b in this context
17:10hiredman*shrug*
17:11twism,(doc true?)
17:11clojurebot"([x]); Returns true if x is the value true, false otherwise."
17:11hiredmanoh
17:11hiredmanpffft
17:12hiredman,(_defn #^{:macro true} a [& b])
17:12clojurebot#'sandbox/a
17:12hiredman,(a foo bar baz)
17:12clojurebotnil
17:12hiredmanman I have been tpying def where I mean defn a lot lately
17:13Chouser,(intern *ns* '#^{:macro true} ummm (fn [& x] 5))
17:13clojurebot#'sandbox/ummm
17:13Chouser,(ummm baz bar foo)
17:13clojurebot5
17:16Chousuke,(ns-publics *ns*)
17:16clojurebot{temp-vars #'sandbox/temp-vars, ummm #'sandbox/ummm, _defn #'sandbox/_defn, a #'sandbox/a, _def #'sandbox/_def}
17:16Chousuke,a
17:16clojurebotjava.lang.Exception: Can't take value of a macro: #'sandbox/a
17:18Chousuke,(map #(ns-unmap *ns* %) '(temp-vars ummm a))
17:18clojurebot(nil nil nil)
17:19Chouser,(ns-publics *ns*)
17:19clojurebot{}
17:20Chousukewhere did the others go? :/
17:20ChouserI assume hiredman nixed them
17:22hiredmanyep
17:43unlink,*ns*
17:43clojurebot#<Namespace sandbox>
17:43unlink,+
17:43clojurebot#<core$_PLUS___3346 clojure.core$_PLUS___3346@b3c24f>
17:43unlink,`+
17:43clojurebotclojure.core/+
17:44unlink,`a
17:44clojurebotsandbox/a
17:44unlinkYeah, you'd have to change those numbers every invocation of the program.
17:44Chousertedious
17:49Chouserrhickey: would you consider letting agents have immutable names, for debugging?
17:51mrsolo_ +1 for that feature!
18:32rhickeyChouser: like Maxwell Smart?
18:32durka42(def shoe phone)
18:33hiredman~laugh
18:33clojurebotNo entiendo
18:33rhickeywith-cone-of-silence
18:42ataggartis this an idiomatic way of declaring optional named formal parameters? (defn foo [& [a b c]] ...)
18:47hiredmanor make a multifn
18:47ataggartah yes, thx
19:04rhickeyping technomancy
19:05technomancyrhickey: hello
19:05rhickeytechnomancy: I'll check out your sdb changes as soon as I figure out how :)
19:05technomancyheh.
19:06technomancyrhickey: if you add my repo as a remote then you can diff it against your master branch
19:07rhickeysounds good, how do I add your repo as a remote?
19:08bitbcktheh
19:08technomancynot at all
19:08bitbcktgit remote add <name> <url>
19:08technomancygit remote add technomancy git://github.com/technomancy/sdb
19:08bitbcktLike that.
19:09technomancythen create a new branch to pull my changes into: git checkout -b service-url
19:09technomancygit pull technomancy service-url
19:09technomancygit diff master
19:10technomancyyou can also just view the history of my branch from github's web interface and check out each commit individually: http://github.com/technomancy/sdb/commits/service-url/
19:11technomancyrhickey: the PeepCode screencast on Git is pretty helpful at explaining how things work; if you ask Geoff I'm sure he'd be happy to send you a coupon code for it. =)
19:12rhickeytechnomancy: already bought it, haven't watched it yet
19:12technomancyoh cool.
19:14rhickeyso, if I like your changes then what?
19:14rhickeyI know, git this that the other
19:15rhickey:)
19:15technomancyheh; yep: switch back to your master (git checkout master) and merge with git merge service-url.
19:15rhickeygit checkout master
19:16gnuvince_Just a FYI guys: http://www.reddit.com/r/programming/comments/8mfh7/terrible_ironpython_20_and_pretty_good_jython_25/c09rdwn
19:16technomancyeven if clojure ends up on hg, a lot of the concepts are the same. (cheap in-place branching, managing remotes, etc.)
19:17opqdonutgit rules
19:17bitbcktHere we go...
19:17opqdonut:)
19:18Chousuke:p
19:18lisppaste8gnuvince pasted "Simple binary tree constructor" at http://paste.lisp.org/display/80683
19:18ChousukeI wouldn't mind hg. it's better than SVN ;(
19:18rhickeytechnomancy: so, after git merge service-url, git status (in master) doesn't show any changed files, did the merge commit them?
19:19technomancyrhickey: yeah, that's right. if you "git log -n 5" you'll see the history
19:19gnuvince_I bet we generate more conversation on VCS choices than on Clojure itself :)
19:19technomancygnuvince_: http://twitter.com/chacon/status/1865583992
19:19technomancyand also: http://twitter.com/coda/status/1865644913
19:21technomancyI heard the book was delayed till the end of June... too bad.
19:22gnuvince_Stuart's book?
19:22technomancyyeah
19:22gnuvince_Well I guess it's time to make more backward incompatible changes :)
19:22technomancyheh
19:22opqdonutrhickey: the merge commits if there were no conflicts
19:23technomancyoh wait, now it says next week: http://www.pragprog.com/titles/shcloj/programming-clojure
19:23rhickeyso, now how do I get it up on github?
19:23technomancymaybe I was imagining things.
19:23technomancyrhickey: you should be able to just "git push origin master"
19:23technomancypossibly just "git push" depending on how it's configured
19:25mrsolo_book delayed? :-<
19:25rhickeyooh baby: http://github.com/richhickey/sdb/tree/master
19:25rhickeythanks!
19:25technomancyrhickey: looks good! there's a lot to wrap your head around, but it's worth it; I promise. =)
19:27rhickeyit seems weird that by switching between branches in the same dir, you don't get separate files to view simultaneously
19:27rhickeyhow do you view diffs in context?
19:27bitbcktgit diff
19:28opqdonutyou can diff whole trees
19:28rhickeygit diff was pretty ugly
19:28bitbcktheh
19:28Chousuketry some of the GUI tools
19:28opqdonutyou can also use gitk or git-gui to browse
19:28rhickeyopqdonut: also ugly
19:28Chousukegitk is pretty bare, but... did you use OS X?
19:28technomancyrhickey: the built-in Emacs version-control tools work the same for git as they do for any other VCS
19:29rhickeytechnomancy: more ugly :)
19:29Chousukegitx is a pretty one for os x
19:29rhickeyI will try IntelliJ's git support, it's the reason I tried git before hg
19:29technomancyrhickey: if the text is ugly then you should pick a better typeface. =)
19:30technomancybut yeah, I've heard good things about gitx if you like point-and-click
19:31bitbcktdo they ever
19:32rhickeyI don't have spare brain cells to memorize the commands and keystrokes of every program
19:34technomancyC-u C-x v = being a personal favourite of mine
19:34dnolenGitX makes life easy. For diffs I prefer Changes (very pretty and useful), still waiting for a Git client as good as Cornerstone for OS X.
19:35dnolenAs Cornerstone is for SVN i mean.
19:40technomancymagit is great for project-level support in Emacs: http://alexvollmer.com/index.php/2009/01/18/meet-magit/
19:40technomancynothing like it for partial commits particularly
19:40ChousukeI never learned to use that properly.
19:41dnolenmagit is quite good.
19:41ChousukeI always just use git add --patch :P
19:41ChousukeI never use much of the emacs funky features
19:41technomancyis that an interactive add?
19:41Chousukeyeah
19:41bitbcktgit add -i
19:42bitbckta bit more flexible
19:42bitbcktat the expense of extra brain cells ;-)
19:42ChousukeI get confused with all the key combos in emacs
19:42clojurebotbut I like using notepad++!
19:42ChousukeI just don't use them.
19:42Chousukeand clojurebot deserves a cookie
19:42technomancycool... when I was starting I always did commit -a to automatically add everything, but it's much nicer to commit only as much as makes sense for a single unit.
19:43Chousukeyeah.
19:43technomancyotherwise it's too easy to end up with commits that contain totally orthogonal changes in them
19:43technomancythat's the best part about magit
19:44rhickeyah, that's much better:
19:44rhickeyhttp://cloud.github.com/downloads/richhickey/sdb/Picture_1.png
19:44rhickeyhttp://cloud.github.com/downloads/richhickey/sdb/Picture_2.png
19:44bitbcktlol
19:44Chousukeneat
19:46bitbcktClearly.
19:47rhickeythey are getting closer with their Clojure support, but I'm still using AquaMacs...
19:47rhickeyenclojure too, improving rapidly
19:48Chousukeaquamacs lacks the clojure logo :(
19:48rhickeybut Netbeans only supports Hg :)
19:48bitbcktBy all means, please use IntelliJ, then. ;-)
19:48technomancyI've always been wary of programs that aren't extensible in lisp, but I suppose you could extend IntelliJ or NetBeans using Clojure now?
19:48hiredmanI nautilus (gnome file manager) showing the clojure logo for .clj files on my freebsd machine
19:49hiredmanI have
19:49rhickeytechnomancy: a lot of enclojure is written in Clojure
19:49technomancyyeah, that's really the only reasonable way to go.
19:52technomancyrhickey: how are you finding simpleDB? is it pretty pleasant to work with?
19:53rhickeytechnomancy: with the sdb lib, I think so, yes, but I've only played (put my iTunes db on it etc)
19:53rhickeyquery perf is good with 4000 records
19:53rhickeyeventual consistency is the tricky bit, for apps
19:54technomancyyeah, it's nice to have a fire-and-forget solution
19:54technomancykeep stuffing things in and let Amazon handle the scaling. =)
19:55rhickeykeeping my music lib on Amazon costs me 4 cents a month
19:55technomancythe query system looks primitive compared to CouchDB, but I guess it just depends on what kind of things you're going to use it for.
19:55rhickeyGreetings from Amazon Web Services,
19:55rhickeyThis e-mail confirms that your latest billing statement is available on the AWS web site. Your account will be charged the following:
19:55rhickeyTotal: $0.04
19:55rhickeytechnomancy: at least it's ad-hoc query
19:56technomancyI wonder if they actually issue a charge for such a small amount, or do they let it accumulate a bit? seems like the credit card processing fees would make that not even worth collecting.
19:57rhickeytechnomancy: I don't know, but I love it! Startup for nothing
19:58technomancypretty slick.
19:58rottcoddare there any examples of using jna from clojure?
19:59hiredman~google chouser clojure-jna
19:59clojurebotFirst, out of 8 results is:
19:59clojurebotChouser&#39;s clojure-jna at master - GitHub
19:59clojurebothttp://github.com/Chouser/clojure-jna/tree/master
19:59technomancyclojurebot: psst--you've got an HTML entity showing there.
19:59clojurebotexcusez-moi
19:59technomancyhow embarassing.
20:00hiredmanclojurebot: clojure-jna?
20:00clojurebotclojure is like life: you make trade-offs
20:00hiredmanclojurebot: clojure-jna is http://github.com/Chouser/clojure-jna/tree/master
20:00clojurebot'Sea, mhuise.
20:08rottcoddthanks, any reason it's not on the libraries page on clojure.org?
20:10technomancythat page is manually updated, takes time for stuff to show up there
20:12technomancydeep breath... let it out... it doesn't matter.
21:53gnuvince_Wow
21:54gnuvince_That V8 engine the Google guys are writing is pretty impressive.
21:54gnuvince_The "node counter benchmark" on my machine takes 549s with Python 2.6, 14s with Clojure 1.1 and 1.7s with V8.
21:56durka42python looks like a big loser there
21:58gnuvince_Yes
21:59gnuvince_I was quite surprised with Clojure, though I'm quite sure it could do a lot better given some work on the compiler.