#clojure logs

2009-09-01

03:22mikem`i'm getting a java.io.IOException: Stream closed trying to read from a file. How can I know exactly which code threw this exception? how to continue debugging?
03:27crc_could be a lazyness issue? reading past with-open scope?
03:27crc_(just shooting in the dark :)
03:28mikem`crc_: probably :) I have (with-open [rdr (reader filename)] (line-seq rdr))), which I then use in further processing.
03:28crc_ah! most probably thats it!
03:29mikem`so the line-seq is only "valid" within the with-open scope.
03:29crc_since it returns a lazy seq. The reader behind the seq is only valid within that scope.
03:29crc_may do a doall?
03:31mikem`where would the doall go? around (with-open) or (line-seq)?
03:33crc_around line-seq. Anything outside of with-open is out of scope. If the file is big, you could also do a doseq within the scope and processing before it ends.
03:33crc_If i remember right, c.contrib.duck-streams has a function that returns a sequence which closes the reader *after* it is consumed fully.
03:34crc_that might be more appropriate?
03:34mikem`crc_: gott it, it works :)
03:34crc_cool!
03:35mikem`hm, that would be useful (the stream that's closed when the sequence is consumed). i'll look into that
04:20AWizzArdHow can I see which Clojure functions produced an error when an Exception was thrown? In the stack trace I only see evals and invokes and some applys and runs here and there.
04:51mikem`crc_: i guess the reader that closes the stream after the sequence is consumed is (read-lines): http://github.com/richhickey/clojure-contrib/blob/39618b6d881fb0c3b52de4929aa34134bb32ffdb/src/clojure/contrib/duck_streams.clj#L228
04:52crc_Yes. I think thats the one.
04:56mikem`yep, it works great. thanks for the pointer :)
04:59crc_sure
07:35AWizzArd~seen stuartsierra
07:35clojurebotstuartsierra was last seen parting #clojure, 817 minutes ago
08:00adityohow will i add type hints to a let binding?
08:02adityofor eg. (let [keyval] (.split foo-string "="))
08:02liwp(let [var #^hint val] ...)
08:02adityoon compilation i get a warning 'call to split can't be resolved'
08:03liwpString.split returns a String array, right? I can't remember the syntax for a string array type hint...
08:03adityoliwp: thanks
08:03liwpahh
08:03liwpyou want to hint the .split call
08:03adityoliwp: yeah
08:03liwp,(.split #^String "foo=bar" "=")
08:03clojurebotMetadata can only be applied to IMetas
08:04liwpblah
08:04liwpanyhow, that's how it should work
08:04liwpmight be that you have to hint both args
08:09liwpso this work:
08:09liwp,(let [#^String str "foo=bar"] (.split str "="))
08:09clojurebot#<String[] [Ljava.lang.String;@678646>
08:10liwpi.e. the hint is before the var in the let binding
08:12adityoliwp: thanks i shall try it out :)
08:19cschreinerswank does not accept unicode, how can I fix this?
08:20jdzcschreiner: works like charm with utf-8 for me...
08:20cschreinerok, so how do I set utf-8?
08:21cschreinerCoding system iso-latin-1-unix not suitable for "00004c(:emacs-rex (swank:....
08:21jdz(slime-connect "127.0.0.1" 4005 'utf-8-unix)
08:21cschreinerah
08:21jdzoh, sorry
08:21jdz(slime 'clojure 'utf-8-unix)
08:22tashafa,(keys (apply hash-map [ a 5 b (inc a) c [a b] d {:foo c :bar (* a b)}]))
08:22clojurebotjava.lang.Exception: Unable to resolve symbol: a in this context
08:23tashafa,(keys (apply hash-map (list a 5 b (inc a) c [a b] d {:foo c :bar (* a b)})))
08:23clojurebotjava.lang.Exception: Unable to resolve symbol: a in this context
08:23cschreinerjdz: thanks
08:30ChouserThis is cool abuse of the GPU: http://ideolalia.com/performance-in-clojure-and-factor
08:30tashafa,(keys (apply hash-map '(a 2 b 7)))
08:30clojurebot(a b)
08:31tashafa,(keys (apply hash-map [a 2 b 7]))
08:31clojurebotjava.lang.Exception: Unable to resolve symbol: a in this context
08:31liwpyou need to quote a and b in the vector
08:31jdztashafa: don't you have your own repl?
08:31tashafai dont have one right now
08:31tashafasorry
08:31Chousertashafa: you can PM clojurebot too
08:32tashafaoh thanks
08:32liwpChouser: yeah, the penumbra GPU stuff was really nice
08:32ambienti'm looking at penumbra too, really cool how it does both opengl and shaders with s-expressions
08:33ambienteven if opencl is done 100% on the cpu it might be faster than the java libs depending on how it's implemented, afaict
08:48Fossiis there a way to compare two maps "lazily", as in, at least all given elements of map 1 are in map 2 as well
08:48Fossisome kind of deep contains?
08:53Chouser,(every? {:a 1, :b 2, :extra 3} (keys {:a 1, :b 4}))
08:53clojurebottrue
08:56ChousukeChouser: clever.
08:57Chousukethough that'll only test for keys I guess.
09:01Chouser,(let [m1 {:a 1, :b 4}, m2 {:a 1, :b 2, :extra 3}] (= m1 (select-keys m2 (keys m1))))
09:01clojurebotfalse
09:33icylisperhttp://paste.lisp.org/display/86361 ; how do I call a method on an instance; for example in the paste how do i call the method createChannel(). In java it would be conn.createChannel()
09:33icylisper(doto conn (.createChannel)) does not work
09:34icylisperany ideas ?
09:35ChouserI would guess newConnection is a static method of ConnectionFactory
09:35icylisperChouser: yes
09:35icylisperref: http://www.rabbitmq.com/api-guide.html
09:35Chouserthen you want (ConnectionFactory/newConnection ...) instead.
09:35icylisperah interesting.
09:35Chouser(.foo bar) is to call instance method foo on the the instance bar
09:37Chousericylisper: if you really want to ignore that distinction, you can still use the plain . operator for either case: (. thing1 thing2) ...but that's generally considered unattractive these days.
09:38icylisperChouser: makes sense :)
09:39icylisperChouser: (def conn (ConnectionFactory/newConnection "localhost" 5672)) doesnt work. Could you correct me there ?
09:40Chousericylisper: what sort of error do you get?
09:40icylisperChouser: No Matching Method: newConnection
09:41Chousericylisper: hm. This is a shot in the dark, but maybe try (ConnectionFactory/newConnection "localhost" (int 5672))
09:42Chouserthe 'int' shouldn't be required, but it's the last thing I can think of before digging in deeper. :-/
09:42mikem`I think you need to call newConnection on a ConnectionFactory instance
09:42Chousermikem`: you're right.
09:42Chouserbad assumption on my part back a ways.
09:43Chouserit's not a statis method at all.
09:43rhickeyhttp://best-practice-software-engineering.blogspot.com/2009/09/clojure-clojure-book-review.html asks: "Is it really worth investing half a year in a hot language like Clojure to be able to produce code that is 3 times more accurate imperative Code?"
09:43Chousericylisper: so -- what error were you getting with your original doto expression?
09:44icylisperChouser: http://paste.lisp.org/display/86361 the doto works. However, doing (.createChannel conn) fails.
09:45Chousericylisper: with what error?
09:46icylisperChouser: No matching field found: createChannel for class com.rabbitmq.client.ConnectionFactory
09:46icylisperChouser: wierd in java the method works on the conn instance
09:46Chouserah! sheesh. ok, I see the problem.
09:46icylisperChouser: :)
09:46Chouserdoto returns the result of its first expression
09:47Chouserso conn is the Factory
09:47icylisperChouser: ah brilliant. yeah.
09:47rhickeyChouser: in looking at the MIDI thing the other day, I found that the inheritance graph was quite screwy. An abstract superclass defined the method the op was trying to call, but only the most derived class derived from the interface the method was supposed to be a member of, so looking up from the implementing class didn't find the interface
09:48Chousericylisper: the clue is in that error message, that it's trying to call createChannel on ConnectionFactory
09:48rhickeythis one seems simpler :)
09:48Fossirhickey: i don't get it. did he really mean "3 tumes more accurate imperative" or "than imperative"?
09:48icylisperChouser: kewl. but how do i get the last expression using doto ?
09:48rhickeyFossi: I presume "than"
09:49Chousericylisper: just don't use doto.
09:49Chousericylisper: (def conn (.newConnection (new ConnectionFactory) "localhost" 5672))
09:49icylisperChouser: ook :) thanks a lot!
09:49Chouseror use -> or .. if you prefer to keep the same word order as doto
09:50icylisperChouser: nice.
09:51icylisperChouser: there works beautifully. Clojure rocks!
09:51eevar2that blog post wasn't entirely coherent? i'm not sure what he's trying to say with his first point
09:54LauJensen,(meta (cons (with-meta [1 2 3] {:vec true}) [4 5 6]))
09:54clojurebotnil
09:54LauJensenwhy ?
09:54Chouser,(cons (with-meta [1 2 3] {:vec true}) [4 5 6])
09:54clojurebot([1 2 3] 4 5 6)
09:54LauJensennvm, I got it
09:59Chouserusing swig to get access to C++ objects from Clojure is pretty heady stuff. So much "just works" it makes me a bit dizzy.
10:05Chouserre: that blog article; it's interesting to me to consider what people seem to think the "lifespan" of Clojure will be.
10:07ChouserI suppose perl has been pretty well "dead" to me for a while, though I once loved it so dearly.
10:08Chouserwait, is this a public forum?
10:08rhickeyI wondered if a) people think it takes 6 months, and b) is it worth it
10:12rysPerl isn't dead. It's just sat there quiet in the corner glueing everything else together ;)
10:13cemerickdoes that blog have any sway at all, anywhere? I'm bad at gauging the cred of random blogs that I'm not familiar with.
10:13cemerickspelling it "BLOG" is funny, though.
10:13rhickeyI just thought it was an interesting question, not necessarily an important blog
10:14cemerickoh, OK
10:14rhickeyi.e. how long did it take you to grok Clojure and was it worth it?
10:14rhickeyand also, how steep is the learning curve?
10:14cemerickThe basics took 2 weeks. I think becoming proficient (FWIW, in my case) took a solid 3-4 months. I actually only think I'm hitting my stride now.
10:15cemerickworth it? I'm here :-)
10:15ambientmost problems learning clojure for me is definitely the functional approach and immutability
10:15cemerickSeriously though, of course it's worth it, at least if you're working away from the fleshy middle of the "I.T. Industry"
10:16iBongas a java -> ruby programmer (who absolutely has not grokked clojure) my brain continues to experience stiff resistance to everything but list comprehensions and multimethods, and yes I think it will be worth it
10:16rhickeyCertainly most of the early adopters were willing to deal with sexprs. I think the next wave has a lot more people stuck at "not intuitive/easy to read", all flavors of "unfamiliar"
10:16ambienti think reading through SICP and doing stuff in it with Scheme definitely helped
10:17ambientin scheme one can use mutability way freer though, so it's not that big a step
10:17ambientafaict
10:17jdzexcept that mutation is introduced well good into half of the book (SICP)
10:18rsynnott_I think it's very easy to pick up for someone who has programmed in common lisp
10:18cemerickI think the #1 issue as more people come in will be tools. I know the 133t hackers (;-)) love emacs, but 90% of programmers simply won't bother if that's the recommended path.
10:18rsynnott_rhickey: maybe you should do a Dylan on it :)
10:18rhickeyDylan had its shot
10:18ambientyes, emacs+lisp at the same time is... heavy
10:19rsynnott_(Dylan started off with s-exps but switched to a ruby-looking syntax)
10:19ambienta simple drscheme style IDE would be golden
10:19ambientalthough i dont know if I can call that simple
10:19raphinou_rhickey: I wondered what your opinion is about the closure conversion feature of Jruby and if it's interesting for Clojure ( http://groups.google.com/group/clojure/browse_thread/thread/fa13ce48fe01893e )
10:20cemerickambient: no, it must be eclipse/netbeans/intellij/visual studio based. There's zero tolerance for one-off environments outside of enthusiasts.
10:20iBongI think the sexps shouldnt be much of a problem for most people coming from ruby, although some people are really into their tidy-looking dsls
10:20rhickeyraphinou_: I think it is a gimmick of limited utility that muddies the language semantics
10:21raphinou_ok rhickey, that's clear :-) thx
10:21ChouserI actually learned lazy seqs, immutable locals, and immutable collections on Scala first, so then switching to Clojure wasn't very hard at all.
10:21cemerickrhickey: hrm, do you do much swing?
10:22cemerickChouser: yeah, I came the same way
10:22ChousukeI think you could get pretty close to that gimmick with a macro
10:22cemerickyeah, it doesn't need to be bolted into the language at all.
10:23rhickeycemerick: no, Chousuke: yes
10:23ChouserI would have rather learned the functional/immutable stuff here. #scala was a bit harsh a bit too often.
10:24AWizzArdHi stuartsierra. I discovered a problem in append-spit.
10:24raphinou_Chousuke: if you're talking about the listener gimmick, I'm interested in advice. I currently have a macro here: http://www.nsa.be/index.php/eng/Blog/Using-Jwt-yes-it-s-a-J-with-Clojure
10:25stuartsierraAWizzArd: what's the problem
10:25AWizzArdstuartsierra: when I do (binding [*default-encoding* "UTF-16"] (append-spit "/foo.txt" "x\n")) a few times in the repl, it will then write the utf-16 marker into each row. Loading this file will show in emacs new lines (not the first one) with a space in front.
10:26AWizzArdappend-spit should not write the encoding marker if the file already exists
10:26stuartsierraHmm, ok, I'll have to think about how to fix that.
10:26stuartsierraCan you file a ticket for it?
10:26AWizzArdjust eval this form that I just posted 3x in your repl and then slurp the file and do a (map int (slurp "/foo.txt" "UTF-16"))
10:27AWizzArdstuartsierra: k
10:27Chousukeraphinou_: well, the simplest way of course is to write separate macros for each interface. but I think it would be possible to generate code that uses reflection at runtime to figure out which interface to implement.
10:30raphinou_ok
10:30Chousukeraphinou_: for your code, you could have a (signal-listener [evt parameters] ...) that figures out which proxy to generate based on the number of elements in the parameter vector, for example.
10:30raphinou_Chousuke: yes, that's what I do actually
10:31raphinou_it implements Signal, Signal1, Signal2 etc for 0, 1 , 2 etc arguments
10:31Chousukeoh, heh, I didn't read that far yet. :P
10:31raphinou_ok :)
10:33Chousukedid you work around the clojure bug in the macro yet though?
10:34ChousukeAnd I see you do (let [argsnum# ...] ...) there. that's not necessary. autogensyms only matter inside syntax-quote.
10:34raphinou_well, cgrand attached a patch to http://www.assembla.com/spaces/clojure/tickets/181
10:34raphinou_ok, thx Chousuke for this remark. Good catch :-)
10:35rhickeyraphinou_: I don't see a patch there
10:36raphinou_ho, you're right rhickey. I just looked at his status update
10:37Chousukehm, I wonder if he has notice the patch isn't there.
10:37Chousukenoticed*
10:38cgrandpatch attached
10:43ambientnot sure if this is the right place to ask but emacs doesn't seem to smart indent in clj file buffers, only in repl. any way to enable the indent in the file buffers?
10:43eevar2ambient: does hitting tab indent your lines correctly?
10:45rhickeycgrand: thanks, approved. Is 186 supposed to have a patch attached? It is marked 'test' but no patch
10:47cgrandattached!
10:47cgrandI should learn to click submit buttons...
10:47Chouserah... yes, you get multiple submit buttons on the assembla pages.
10:48Chouserif you fill out the file upload and then fill out a comment without "submit" in between, you're going to lose one or the other.
10:48Chousukebad UI :/
10:49ChouserChousuke: fortunately that's the only site on the web with a bad UI, so we can all relaz.
10:49Chouserrelax
10:49cgrandChouser: ah? thanks!
10:49Chousukeheh.
10:50ChousukeI'm picky about UIs
10:50rhickeycgrand: cool - thanks for all the patches!
10:53ambienteevar2 yes it seems to do that
10:54cgrandrhickey: 186 should also apply cleanly on 1.0.x
10:54eevar2rebinding the enter key to 'newline-and-indent, rather than just 'newline might do the trick
10:54ambientok, i shall try that, ty
11:05raphinou_rhickey, cgrand: FYI, I tested patch 181 and it works fine. thanks for the fix!
13:04cemerickwow, java 5 becomes EOL'ed this October
13:10fdaoudwow indeed
13:29ambientwhat would be the best data structure to handle 2d 24-bit RGB images? 1d arrays?
13:29ambienthmm, perhaps this is premature optimization
13:32stuartsierraambient: 1-d arrays are generally the best way to manage binary data
13:33ambientok
13:33dnolenambient: 1d arrays are going to provide the fastest access to primitive data. 2d arrays are quite slow.
13:34dnolenrather > 1d arrays are slow. every dimension is another hit on dereferencing.
13:34ambientoptimally, increasing the dimension only takes 1 clock cycle on the CPU, shift left
13:35dnolenambient: not sure how the JVM does this, but it actually more like 3-4x slower for 2d arrays.
13:35dnolenin my own experience anyway.
13:35ambientok
13:35stuartsierraIn the JVM, byte[][] creates an array of pointers to byte[]
13:36ambientaww
13:36ambient1d array of size width*height seems to be the way to do it then
13:48Chouseranyone know of a CSS parser for Java/clojure?
13:49Chouseroh, google says http://cssparser.sourceforge.net/
13:49LauJensenCant enlive handle that Chouser?
13:50Chouserenlive queries DOM trees, so no.
13:55LauJensenk
15:37angermanhow much of kotka's stuff has made it into clojure? monads, lazy-map?
15:38angermanI'm just wondering what would be duplicated stuff if I used the parser
15:49stuartsierraNeither monads nor lazy-map are include in the Clojure distribution. monads are in contrib, I think.
15:55angermanstuartsierra: that's not kotka's stuff is it?
15:57stuartsierraoh, I don't know who wrote what
15:57angermanstuartsierra: well monads is by Konrad Hinsen
15:58angermanstuartsierra: ujmp is the universal java math p(...)
15:59angermanThe thing with math libraries is: I don't want to care what sub-library is used. I just want to use a certain functionality and the library is supposed to take the best solution for the task. [...]
15:59angermanIf I have 80 cores spare. it should try to get the best parrallel solution... if there are a lot of GPUs available it should try a more OpenCL or OpenGL or what ever seems possible solution.
15:59angermanbut ujmp at least has the option to work with matrices bigger then the memory
16:00stuartsierraWhat you're describing is the holy grail of library optimization.
16:00angermanstuartsierra: yes I know :(
16:00stuartsierraI think that's one of the goals of Sun's X10 language.
16:00angermanit's a bit like jiting.
16:01angermanstuartsierra: the thing is, being a student. I work in very heterogenus networks.
16:01stuartsierrame too, as a coder in academia
16:02angermane.g. I have two macbook, a p4 and access to the 4 mainfraims from the university. (though I never now how much resources are left on the mainframes)
16:02angerman(second macbook being the one of my g/f :)
16:02stuartsierraRight, so you want code that's automatically optimized for any one of those environments. For now, dream on.
16:03angermanmaybe it boils down to that :)
16:04angermanall I want is to get the stupid breast cancer classification I work on to yield nice results and not violate any reasoning.
16:06prospero_angerman: OpenCL is designed to work on CPUs and GPUs
16:06prospero_what's missing is something that will distribute work across multiple OpenCL kernels
16:06prospero_but as far as I understand it, it's being positioned as a homogeneous interface to heterogeneous computing resources
16:06angermanprospero_: well I'd like to look at it from a way higher perspective.
16:07prospero_well, one layer of abstraction at a time
16:07angermanprospero_: I look at the problem the following way: I have a box with a certain amount of chips inside that all can do special computations. (some more generic then the others)
16:08angermanand then I have a problem: run a SVM on a dataset.
16:08angermanthe first issue I run into is the limit of matrixes.
16:09angermanI have yet to see which java library does not exhibit that. I ran into issues with matlab and python so far.
16:10prospero_you mean limits in the dimensions?
16:10stuartsierrahow big are your matrices?
16:10angermanstuartsierra: more entries then an integer is large.
16:10prospero_ha
16:10angermanAnd I think that's an inherative issue with BLAS ...
16:11prospero_can't matrix operations be split over sub-matrices?
16:11angermanprospero_: in theory sure, split a matrix into four soub matrices
16:12ambientwhy not just parallelize by row
16:12angermanprospero_: the issue is the algorithm I'm supposed to use.
16:12angermanambient: that's the next way I'm about to tackle.
16:12angermanthe last solution I uses was so called recursive feature selection.
16:12ambientsounds complicated
16:13angermanproblem with that approach is, it's not stable.
16:13ambientstable means so many things in CS
16:13ambient:P
16:13angermanambient: this is stable it the most understandable way.
16:14angermanslightly vary the parameter (in this case the amount of features to keep in each run) and the result varies
16:14angermanand it's not even converging
16:15angermananyway, thanks for listening guys :)
16:16ambienti wish the nice implmenetations of BLAS weren't so expensive :/
16:18angermanambient: I wish I wasn't supposed to use lagranean svm :)
16:20prospero_on a vaguely related note, did anyone see the penumbra GPGPU stuff that's been on programming.reddit?
16:20prospero_and if so, do they have any ideas on what would be an effective application to use as a tutorial?
16:21prospero_I'm thinking n-body, and looking at how performance changes as n grows
16:21ambientlaplace transform?
16:21prospero_but I dunno if that's going to grab people
16:22prospero_which do you think would be more understandable to people without a strong math background
16:22prospero_because I don't think that's a prerequisite to using this
16:22prospero_or rather, it shouldn't be
16:23ambientwell you could show them simple 2d fluid simulation
16:23prospero_hell, I'm pretty weak math-wise myself
16:23ambientthat looks really nice
16:23prospero_yeah, that would be a good one
16:23ambientdont remember what the formulas were called
16:23prospero_navier-stokes
16:23prospero_?
16:23ambientyep, thats it
16:24prospero_I could also do something much simpler, like the mona lisa evolution thing that was floating around
16:24prospero_then the GPU would just be used as a fitness evaluator
16:24ambientim not sure that's good for GPGPU
16:24angermanor just do fft :p
16:24prospero_you need to compare NxM pixels to each other
16:24prospero_and then sum the absolute differences together, to get the fitness
16:24hiredmanhttp://gist.github.com/179346 is an aot test script
16:25Licenserevening everyone :)
16:25hiredman(nonsequitur for clojurebot's url logger)
16:25prospero_also, the image is already living on the GPU, since you rendered it
16:25prospero_I agree, it's not custom-fitted to GPGPU
16:26prospero_but it's a nice demonstration of how the whole logic doesn't have to fit on the graphics card
16:26prospero_I dunno, I guess I could just do all of them over a few months
16:26angermanif you want other nice things you could so spring simularion.
16:26ambientjpeg compression
16:26ambientthat's just not very visual
16:26prospero_angerman: flag in the wind, or something?
16:27angermane.g. chain 5 to 10 springs together and let the system find it's least-energy point
16:27angermanI might have a matlab file i wrote for class floating around somewhere ...
16:28prospero_eh, I don't really speak matlab, so I don't know how much good it'd do me
16:28prospero_but all good ideas
16:28angermanprospero_: if you know any imperative language you know matlab :(
16:29prospero_angerman: ok, fair enough
16:29prospero_at the very least, I've never tried
16:29angermanR is a very different beast though :)
16:31angermanprospero_: once I find the code I'll hand you a copy :)
16:31angermancan't take too long to find it :)
16:31prospero_angerman: ok, thanks
16:31angermanprospero_: maybe you mix processing in for the visuals
16:32prospero_angerman: I've already got a full-fledged OpenGL implementation
16:32prospero_it was kind of a necessary prerequisite to the GPGPU stuff
16:37angermanok, found it.
16:37angermanwhere to send?
16:38angermanahh got an idea
16:40angermando public dropbox links work?
16:40angermanhttps://dl-web.getdropbox.com/get/Matlab-Spring-Simulation.zip?w=cc3f9d92&amp;dl=1
16:40ambient403
16:41angermanawesome ...
16:43angermanhttp://dl.getdropbox.com/u/281539/Matlab-Spring-Simulation.zip
16:47angermanbasically it's implementing a runge-kutta solver
16:51LicenserI wonder what is the best way to make Ruby (rails) talk to Clojure
16:52LicenserIs there a suggested and well working model for that?
16:53AnniepooUse the JACOB library and the clojure binding to it somebody wrote to get to COM, then from COM to Ruby via the Ruby WIN32OLE extension =8cD
16:54LicenserI had the idea to use compojure (or how it is spelled) to make a RESTfull http model, then use ActiveResource on the ruby side, but having a webserver handle HTTP just to move some data seems to be a huge overhead and likely to kill every performance reason to do this
16:54LicenserErm yes, let me just install windows on this sparc server o.o
16:54AnniepooUse a windows emulator 8cD
16:54Licenserah dosbox!
16:55LicenserI guess using sockets and a properetary protocoll might be better but then again isn't nearly as flexible I think
16:57AnniepooI think the objective with capjure is to promote scalability, not per-box performance
16:57Licenserwhat is capjure?
16:57Licenser*looks it up*
16:57hiredmanLicenser: you could use jruby and integrate via the jvm
16:58Licensertrue the idea isn't bad
16:58headiusyay
16:58Licenseractually I think it is quite ingeniuse
16:58Licensertoo obviouse so
16:58stuartsierraLicenser: I mix JRuby and Clojure in one VM, haven't tried it with Rails.
16:58stuartsierraInterop is easy though, since they both implement the Java Collection interfaces.
16:59Anniepooask amit - Runa's mostly in Clojure, but their legacy stuff is Ruby
16:59Anniepoohttp://s-expressions.com/2009/03/31/capjure-a-simple-hbase-persistence-layer/
16:59Anniepoothis explains some of the rational for capjure
16:59hiredmanyou could use some kind of message queue
16:59hiredmanbus
17:00Licenser*nods*
17:00Licenserthat ends up with a proparitary implementation, not sure if that is good or bad
17:01LicenserI mean it would likely yield the best mixture of performance vs scalability
17:08Chouserso if I have a namespace of utilities that may be useful for both clojure users (who will call public functions) and Java users (who will call static methods of a gen-classed class), should I name the namespace util (clojurey) or Util (javay)
17:09Anniepooit's a commercial question
17:09Chousukeyou could have two namespaces :P
17:10Chouserand is it worth creating a -doSomeThings method fn that just turns around and calls the do-some-things fn?
17:10ChouserI guess I can just have the clojure users call the static methods
17:11AnniepooI'd use the Java names - my argument - clojure includes the idea of calling java, so the 'world' is ready for a Java name in Clojure code
17:11Chouserthen they'd expect (Util/doSomeThings ...)
17:12Anniepoobut the reverse isn't true
17:13Anniepooany idea why ns-aliases always fails from the REPL?
17:14Chouser,(require '[clojure.zip :as z])
17:14clojurebotnil
17:14Anniepoonvrmnd
17:14Chouser,(ns-aliases *ns*)
17:14clojurebot{z #<Namespace clojure.zip>}
17:14hiredmanAnniepoo: what do you mean by fails?
17:14LicenserChouser: I'd use the clojurey way
17:15Anniepoo,(ns-aliases 'foo)
17:15clojurebotjava.lang.Exception: No namespace: foo found
17:15Anniepoo,(do (in-ns 'foo) (def bar 2) (ns-aliases 'foo))
17:15clojurebotDENIED
17:16hiredmanthat is not an alias
17:16Anniepooclojurebot: paste
17:16clojurebotlisppaste8, url
17:16lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
17:17lisppaste8Anniepoo pasted "ns-aliases" at http://paste.lisp.org/display/86391
17:18ChouserAnniepoo: namespace aliases are created using alias or the :as clause of use or require
17:19Anniepooah, ok
17:19stuartsierraThe gen-class name does not have to be the same as the ns name, either.
17:19Chousernot quite sure why (ns-aliases 'user) doesn't work.
17:19Chouserstuartsierra: yeah...
17:19AnniepooI'm trying to find a seq of public symbols in the namespace
17:20hiredmanChouser: works here
17:20Chouserhiredman: right, that's what I meant.
17:20Chouserdunno why it fails in her paste
17:20ChouserAnniepoo: ns-publics
17:20hiredman,(count (ns-publics *ns*))
17:20clojurebot0
17:20hiredman:|
17:20AnniepooI want to make a tool for myself to learn all the core and contrib functions
17:20hiredman,(count (ns-publics 'clojure.core))
17:20clojurebot477
17:20hiredmanzounds
17:22Anniepooah, i switched to foo namespace before (ns-aliases 'user)
17:23hiredmanthat shouldn't matter
17:23Anniepoolovely
17:23Anniepoodid matter to me
17:23hiredman:/
17:23Anniepoothis in the slime-repl clojure in emacs
17:24Anniepoois there a function version of doc?
17:25Chouserprint-doc
17:25hiredmanprint-doc takes a var
17:26Anniepoo,(def boo 'clojure.core/merge)(print-doc boo)
17:26clojurebotDENIED
17:26Chouser,(print-doc #'identity)
17:26clojurebot------------------------- clojure.core/identity ([x]) Returns its argument.
17:27Anniepooooh, var, not symbol 8cD
17:27Anniepooway cool
17:55powr-tocThe docs at http://clojure.org/Reader say "keywords are like symbols except ... they cannot contain '.' or name classes" yet the following seems to work without error:
17:55powr-toc,:foo.bar
17:55clojurebot:foo.bar
17:55lisppaste8ambient pasted "lazy-seq problem" at http://paste.lisp.org/display/86393
17:56ambienti have *print-length* set to 20 but (foo 5000000) still eats all my memory and crashes :/
17:56hiredman~ticket #1
17:56clojurebot{:url http://tinyurl.com/ntftnj, :summary "Add chunk support to map filter et al", :status :test, :priority :normal, :created-on "2009-06-13T14:38:41+00:00"}
17:56hiredmanhmmm
17:57hiredman~ticket #17
17:57clojurebot{:url http://tinyurl.com/nq6ef7, :summary "GC Issue 13: validate in (keyword s) and (symbol s)", :status :test, :priority :low, :created-on "2009-06-17T18:56:26+00:00"}
17:58hiredmanambient: don't use recur
17:58hiredman(inside a lazy-seq call)
17:58ambientit can't be used in lazy sequences?
17:58hiredmanI would look for some examples of how to write functions using lazy-seq
17:59Chousukeambient: it's not needed
17:59hiredmanambient: not inside the call to lazy-seq
17:59ambientwell i dont quite grok lazy-seq yet but here's for more trying
17:59Chousuke(doc lazy-seq)
17:59clojurebot"([& body]); Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only the first time seq is called, and will cache the result and return it on all subsequent seq calls."
17:59hiredmanlazy-seq essentially creates a thunk, which sets up another recur point
17:59hiredmanso recur doesn't recur to the function frame
18:00hiredmanit recurs to the thunk created by lazy-seq
18:01hiredmanwait
18:01hiredmanthat might not be right
18:01hiredmanI didn't notice the (loop there
18:01hiredmanjust saw a recur inside a (lazy-seq
18:01Chousukethe most common pattern is (defn foo [x] (when x (lazy-seq (cons (something x) (foo (somethingelse x))))))
18:02hiredmanbut that is certainly not the way to produce a lazy sequence
18:02Chousukenow the trick is that since foo itself returns a lazy thing, the second argument of the cons is not actually evaluated until it's needed.
18:04ambientthat looks a lot like tail recursion
18:04Anniepoo,(read-line)
18:04Anniepoodsfsdfsd
18:04clojurebotExecution Timed Out
18:05tomojso, lazy-seq does or does not set up a recur point?
18:05tomojI didn't think it did
18:05Anniepoohmm.... doing (read-line) at the repl in emacs hangs me, it takes an infinite number of lines
18:05hiredman~def lazy-seq
18:06Chousukeambient: basically, you're setting up a thunk (with lazy-seq) that, when evaluated, conses whatever to another lazy sequence (which happens to be generated by the same function)
18:06tomojAnniepoo: emacs does some weird things with input/output
18:06tomojer, well, slime with clojure anyway
18:06Anniepoo8cD I broke it. I must be getting better at this
18:07Chousukeambient: and this "recursion" stops when foo returns nil and the return value of the previous invocation becomes (lazy-seq (cons whatever nil))
18:07Anniepoobet it's cause clojure only has half the proper \r\n at the end of the line
18:07ambientbut it can be infinite too right?
18:07Chousukeambient: yes.
18:08hiredmanit sort of flatten's out the stack
18:08ambientwell it takes some absorbing but thanks for the help
18:08Chousukeambient: but because the "recursion" is lazy it won't accumulate stack frames.
18:08tomojAnniepoo: I don't think it's anything to do with that
18:08tomojAnniepoo: because I get the problem too
18:08tomojit's just that slime doesn't have the repl connected to standard in, I guess
18:09Anniepoook, so read-line is broken within the repl? foo - that limits the usefulness of my toy
18:09Chousukeambient: when consing, foo gets called, then returns the thunk, at which point it's done. then, when someone calls (rest ...), the thunk is evaluated, resulting in another call to foo which again returns just a thunk, etc...
18:09tomojAnniepoo: just program functionally..
18:10tomojif you really want to read-line in the repl, it seems you can get it to work by going to the inferior lisp buffer to type in the input, but it seems to chop off the first character
18:10Anniepoono, this is the 'repl' loop of a toy trainer , I need a loop - it's the UI
18:10Anniepoothanks tomoj
18:11Chousukecan't you use your own repl function?
18:11tomojI think you shouldn't use your repl within slime's repl
18:11Anniepoono, no, I want to MAKE a repl like function - it shows you the docstring for a function, you type in the function name, - to learn clojure libs
18:12tomojthat doesn't sound like a repl to me :)
18:12tomojbut yeah, why run it within slime?
18:13Anniepooof course -read, evaluate (did they get it right?) then print
18:13Anniepoocause I'm debugging it?
18:13hiredman
18:13hiredmansure, sure, *de*bugging
18:13Anniepoook, I'm enbugging it
18:22ambient(defn foon [x] (when (> x 0) (lazy-seq (foo (- x 1))))) i still get out of memory error with this :/
18:22powr-tocare there any simple clojure examples of clojure programs that write simple clojure programs?
18:24Anniepoo,(def i-write-clojure [a b] '(+ a b)) (i-write-clojure 3 2)
18:24clojurebotDENIED
18:24Anniepoo(that's defn)
18:25powr-tocI'm looking for inspiration/wisdom on how to programmatically write a simple s-exp tree of functions, which can later be executed
18:25broolpowr-toc: well, any macro
18:25tomojit's just lists
18:25Anniepoo,(defn iwc [a b] '(+ a b)) (iwc 2 3)
18:25clojurebotDENIED
18:26Anniepoothat works at the repl, it's just clojurebot won't let me pollute it's innerds
18:26tomojthat works at your repl???
18:26powr-tocbrool: I know macros can do it, but I'm looking first at doing it without macros
18:26tomojit doesn't work at my repl
18:26Anniepoosorry, brain not working
18:27Anniepoo(defn iwc [a b] (list '+ a b))(iwc 2 3)
18:28Anniepoothat does
18:28tomojor `(+ ~a ~b)
18:28tomojthe simplest way depends on what kind of stuff you want to build up I guess
18:32powr-toctomoj: well ultimately I'm wanting to compose a filter pipeline, where the vast majority of functions are filters... i.e. it's just a list of functions that take the same argument... I will also need a very basic form of branching
18:33tomojit seems strange to me to build the clojure code up in lists
18:33tomojbut sometimes you need to do that I guess
18:33Anniepoo,(doc apply)
18:33clojurebot"([f args* argseq]); Applies fn f to the argument list formed by prepending args to argseq."
18:33tomojlike someone was in here before with a genetic programming thing that built up clojure code as lists
18:34powr-toctomoj: so what would you suggest? Macros?
18:34tomojI dunno, I still don't understand what you're trying to do
18:34Anniepoopowr, are you needing apply? like to write some filter-all I'd get the filter funs one by one and do apply with them (or map)
18:35tomojyou mean the functions are fixed and you just want to compose them in different ways?
18:36tomojyou don't need to have clojure write clojure code to do that
18:38powr-toctomoj: well the idea is to have a restricted language, with a fixed set of filter funs that can be composed in different ways (probably ultimately built by partial application of arguments to more generic functions)... This tree should then form several purposes... 1) be executable 2) be easily processed into other representations, e.g. a graph
18:38powr-toc(by graph I mean a pictoral representation of the tree/program)
18:39powr-tocIt should be pretty easy... but I've yet spent enough time with clojure to work it all out
18:39powr-tocs/yet/not-yet/
18:39tomojsorry, I still don't understand what you're saying really
18:39Anniepoocheck out zippers
18:40tomojif all you needed was to compose some functions, you can just (apply comp thefunctions)
18:40tomojto get a function that's the composition
18:40AnniepooI think you don't really want the tree to be executable, you want to be able to interpret it
18:41powr-tocAnniepoo: what advantage does that have?
18:41Anniepoohe's got a datastructure, he wants to represent it in various ways, one of which is execution
18:42Anniepoo(sorry, thot that was tomoj writing - s/he's/you/)
18:44broolpowr-toc: so, given a list of functions, you want to apply predicates, possibly with conditionals? i.e., on numbers, [ (if >0? even?) (if <0? odd?) ] to find even negative and odd positive numbers?
18:44broolwhoops, even positive and odd negatives
18:45Anniepoook, so you want a function (filter-all [seq-of-filters seq]) that reduces seq by applying each filtern in seq-of-filters in turn?
18:46tomojthat's what I thought too, but that's not a very good tree
18:47Anniepoopine tree?
18:47tomojI mean, it's just (foo (bar (baz ...)))
18:47tomojnot a very interesting tree I should say
18:49Anniepoomaybe that's whats wanted - (apply (comp filters) s)
18:49tomojrather ((apply comp filters) s) I would think
18:49Anniepooyah, you're right
18:50powr-tocYou'd be right if I only needed filtering, but I need to represent it as a tree because I have conditionals... as execution might proceed down different branches... so at the top level I have a value to test... the value gets passed down a series of filters that test criteria... if those criteria pass then it might come to a branch-point, that might (on the basis of another function) randomly decide which branch to pass the value
18:50powr-tocfor further evaluation
18:50broolso, it's still a list of filters, where some of the filters are a composition of other functions
18:50tomojso you're doing logical combinations of predicate functions?
18:51powr-tocand it is those branch points, that make it a tree... and it is those along with the criteria that (amongst other things) I would want to represent pictorially
18:51powr-toctomoj: yes
18:52powr-tocbrool: yes
18:52powr-tocbrool: except that I want to be able to draw what the tree of combinations looks like
18:53powr-toc(or at least have it a form that is easy to do such things)
18:54tomojyeah doesn't sound to me like you want to be producing clojure code
18:55broolpowr-toc: yah, the form of '(filter1 filter2 (branch filter3 filter4)) seems amenable
18:55powr-tocbrool: that's the form I'm looking at
18:56powr-tocor perhaps more like '(filter1 filter2 (branch '(filter3 filter4) '(filter5 filter6)))
18:56tomojeh
18:56tomojI must be too tired
18:56tomojI have no idea what you two are talking about :)
18:57powr-toctomoj: haha... I had no idea I was so bad at explaining things... You can't be the only one ;-)
18:57broolbranch just applies one set of filters or another, based on a conditional, i think
18:57powr-tocbrool: exactly
18:57tomojbut where's the conditional
18:58Anniepooso, powr, your filters might be something like
18:59Anniepoo(beanie-babies? tacos? (or lemons? unguents?) rats?)
19:00tomojthe way I understood it makes it difficult to write in something like boolean logic
19:01tomojmaybe it would help if you gave us an example :+
19:01Anniepoo(powr, the pain goes down with time)
19:02Anniepoook, all, I've written a little file in emacs/slime, now how do I load the buffer?
19:02broolCtrl-C Ctrl-L, I think? should be on the menu
19:02Anniepooah, ok, thanks
19:02Anniepoothe menu forces me into bad places (a winders file dialog)
19:04tomojC-c C-k
19:04ambientwait, is (not (= x)) only way to test not equal?
19:04ambient(not (= x 0))
19:04broolambient: (not= x 0)
19:04ambientok ty
19:17Anniepoono clojure.contrib in my classpath for slime
19:21broolAnniepoo: did you add (setq swank-clojure-extra-classpaths ...)?
19:21Anniepoono, that goes in .emacs?
19:21Anniepooand does it literally have an ellipsis in it?
19:22tomojclojure-install set that up magically for me I guess :/
19:22broolno, i was eliding for brevity. i set mine up on Mac OS and it was kind of a pain
19:22broollet me paste me .emacs somewhere, sec
19:22Anniepoothanks
19:23tomojI think if it's unset you can just drop the jar in ~/.clojure
19:23tomojwhatever ~ means on windows
19:23lisppaste8brool pasted ".emacs for slime/clojure" at http://paste.lisp.org/display/86395
19:23Anniepoothanks
19:24tomojthat last line seems strange to me
19:24tomojisn't that the default?
19:24brooltomoj: wasn't working without it, but i might have a strange configuration
19:25broolseems strange you'd have to add it explicitly, i admit
19:26tomojoh hmm
19:26powr-tocbrool: tomoj: sorry... got interrupted by the misses...
19:26tomojactually seems the default is to take clojure-src-root and stick on /clojure-contrib-src/
19:27tomojer, /clojure-contrib/src/
19:27AnniepooI had an install with a lot of problems, somebody turned me on to clojure box and I installed that
19:27tomojoh.. dunno anything about clojure box
19:28Anniepoostrangely, I can't FIND a .emacs now
19:32powr-toctomoj: branch would be a type of conditional... it would force evaluation down one of the branches on the basis of the value passed in
19:35powr-tocThough those values have been ommited from the sexp I showed above... as I thought they'd be supplied by apply or -> or some such
19:45ambientgetting stack overflow errors with loop/recur.. wth :/
19:49Anniepooclojurebot: paste
19:49clojurebotlisppaste8, url
19:49lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
19:50ambientnah, i got emacs macro for that :D
19:51lisppaste8Anniepoo pasted ".emacs" at http://paste.lisp.org/display/86397
19:53Anniepooit's expecting a list?
19:54ambienttry / instead of \\
19:54AnniepooI suspect emacs would be cool if it worked, but it doesn't
19:56Anniepoo forward slashes didn't help
19:56lisppaste8ambient pasted "prime number gen stack problems" at http://paste.lisp.org/display/86398
19:56ambientcant even get 1M primes :/
20:00hiredmanambient: I would suggest going back through the pastes in #clojure, there must be about 1M methods for finding primes
20:00hiredmanI imagine everyone in the channel is sick of it (maybe it's just me)
20:00ambientmy problem isnt finding primes but learning clojure while writing code for finding primes
20:00ambientyeah ok
20:00ambienti shall look around
20:01ambientim sure nobody hasnt done huffman compression? :p thats my next step
20:01hiredmanhttp://paste.lisp.org/list/clojure if your not familiar with paste.lisp
20:01Anniepooanybody know where I might find documentation for swank-clojure-extra-classpaths??
20:03ambientdoesnt that thing have a search functionality?
20:05hiredmangoogle?
20:06hiredmanhttp://delicious.com/search?p=prime&amp;chk=&amp;context=userposts|clojurebot|lisppaste8&amp;fr=del_icio_us&amp;lc=0
20:07broolambient: http://paste.lisp.org/display/69952
20:08ambientthose things dont really solve my original problem, which was to find out the reason for running out of stack, but it might be better to continue this tomorrow
20:09Anniepoook, adding (list ) around it fixed the error, but addign that to my emacs isn't curing the problem
20:09Anniepoo,(require 'clojure.contrib)
20:09clojurebotjava.io.FileNotFoundException: Could not locate clojure/contrib__init.class or clojure/contrib.clj on classpath:
20:10Anniepoosame message I get
20:12hiredmanwell
20:12hiredmanthere is such thing as clojure.contrib
20:12hiredmanso that is exactly correct
20:13Anniepoo??
20:13hiredmanthere are a bunch of namespaces that start with clojure.contrib
20:13Anniepooah!
20:13AnniepooAaaargh!
20:13AnniepooLOL
20:13Anniepoook, I've been blaming emacs
20:15broolAnniepoo: that's M-x blame-emacs
20:16Anniepoowhen I type that it writes a bunch of i-nodes into my NTFS file system
20:31Anniepoook, I can load my toy program, but can't get the repl to figure out where it is
20:32Anniepooas in funfun is my namespace, but (require 'funfun) complains it can't find it
20:32Anniepooah!
20:35powr-tocdoes the mantra "use exceptions for exceptional conditions" apply in idiomatic clojure, or is it acceptable to signal other events whilst unwinding the stack?
20:35powr-tocwith exceptions?
20:36Anniepooit's very rare to throw exceptions in clojure
20:36Anniepooit's a functional language, you're always 'unwinding the stack'
20:46powr-tocAnniepoo: what about error-kit then?
20:47Anniepooerror-kit?
20:47Anniepoosorry, i just rebooted
20:47Anniepooah, the issue of exceptions
20:48powr-tocclojure.contrib.error-kit ... similar to common lisps condition system
20:48Anniepooyes, the 'use exceptions for exceptional conditions' applies
20:51Anniepoothis is stupid
20:51Anniepooattempting to load the file directly at the repl fails
21:13Anniepoois ; a comment in elisp?
21:13broolyes
21:14Anniepoothank you
21:16Anniepoo8cD got paredit working, now if only I could run my program from within emacs
21:18AnniepooI've got some bug - it's throwing an exception. But the stack trace doesn't give a clue where it is
21:19Anniepoo(thanks to those helping me deal with emacs 2day)
21:21brooldid you try (.printStackTrace (.getCause *e))?
21:21broolAnniepoo: honestly, it's worth it once everything's working!
21:22broolor, if slime pops up the exception, you can hit "0" to get the root cause, usually
21:22Anniepooah! thanks! that's what that's for
21:23AnniepooI keep getting bufferes with error messages
21:23AnniepooI have to quit out of emacs every 10 mins to clear out all those buffers
21:23Anniepoois there a way to get rid of them?
21:26hiredmanstop doing things to generate errors?
21:27Anniepooformat /f c: ? become Amish?
21:27broolIf you become Amish first, you don't need to format. More efficient.
21:28broolI think Q? or one of the number keys? iirc it says in the exception window how to close it.
21:28AnniepooIf I were Amish I'd be struggling with a wagon wheel that kept coming loose
21:28Anniepoocan't get away from technical issues
21:29kylesmith_Is anyone here familiar with Incanter?
21:30kylesmith_I'm trying to use non-local-model. It works for a toy example, but I'm getting divide by zero on other data.
21:30broolProbably be the same type of conversation anyway. "Oh, you're on 1.01 of the wagon wheel? You'll need to install 1.02 and make sure that your axle path is all set up properly."
21:30Anniepoook, I've got paredit, and I'm trying to turn s into (vec s) - is there a way to do this without retyping s?
21:32liebkekylesmith_: do you mean non-linear-model? do you have more details?
21:33nselAnniepoo: put the cursor before s and do M-(. Also, try reading the docs...
21:33kylesmith_oh yeah, non-linear-model.
21:33Anniepoosorry - found it, it's called "depth changing commands"
21:34kylesmith_I'm trying to it to fit parameters for classical molecular dynamics.
21:34liebkekylesmith_: were you using the default :guass-newton option or :newton_raphson?
21:35kylesmith_I used a homegrown optimization function before, so I don't think the problem is in my code.
21:35kylesmith_I just tried both.
21:35liebkesame error in both cases?
21:35kylesmith_yep
21:36liebkehave you tried different starting values? (I'm trying to see if I can track down where the problem might be)
21:37nselyeah the paredit docs are a little confusing, probably just because it's a hard thing to explain in a text file
21:37kylesmith_well, my starting values should be reasonable, but let me play around with it
21:37liebkeI'm sure they are, I'm just trying to see were my code is having a problem
21:38liebkemaybe try reducing :max-iter (which defaults to 200). I need to make that function more robust, obviously :)
21:45kylesmith_still calculating... my code is slow (I haven't done any performance optimization yet)
21:47kylesmith_I included an arbitrary offset in my potentials (to compare between different programs). I just adjusted it such that the initial sum of squares would be much closer to zero. It crashed right away before, but it's still going. *crosses fingers*
21:48liebkeI'll have to sign off soon, but you can email me, liebke at gmail. I haven't looked at the optimization library for a while, but I'll see if I can figure what the problem is on my side.
21:49kylesmith_Cool, I'll email you a stack trace if it happens again.
21:49liebkethanks, good luck!
21:49Anniepoo@nsel - yah, I'm trying to find answers myself first, probably less so now, I'm at the end of a frusttrating 56 hours of fighting emacs
21:49Anniepoo(5 hour, not 56 =8c))
21:52nselit'll be 56 by the end of next week :) emacs is incredible but boy is it frustrating. It keeps going deeper and getting cooler until you're far enough in you can't ever use another editor because of what you'd be giving up, but you're not to the point where your emacs *works right* yet.
21:54nselanyway didn't mean to bite your head off
21:54Anniepooin total I'm about 35 hours in
21:54Anniepoonp
21:56AnniepooI wonder if there are enough people in the bay area going thru this now to justify a get-together-and-slam-heads-collectively thing
22:07Anniepooaaargh.....
22:14prospero_so I just installed Snow Leopard, and my GPGPU benchmark is now running 10x faster
22:14prospero_100x faster than Java
22:14prospero_how about that
22:16mattreplnice
22:17prospero_I already knew it was spending the majority of the time waiting to talk to the graphics card
22:17prospero_I just figured it was a hardware limitation
22:18Anniepoois this thru CUDA?
22:19prospero_GLSL
22:19prospero_http://ideolalia.com/performance-in-clojure-and-factor
22:23Anniepooyah, this is great!
23:14technomancyso are auto-gensyms only guaranteed to be consistent within a single backquote form?
23:14technomancyI've got a backquote inside a ~ inside a backquote with a let binding in the first backquote that I want to reference in the second.
23:14technomancybut it generates a different sym
23:22hiredmanyes
23:22technomancyI think what I'm trying to do is ill-adivsed. =)
23:23technomancyI'm trying to generate a proxy form that implements methods from functions provided in a map.
23:24hiredmanmakes sense to me
23:24Chousertechnomancy: proxy is a great base material to build things on.
23:24Chousernote though that it actually uses a map internally that you're allowed to manipulate -- you might not even need a macro.
23:26hiredman,(doc init-proxy)
23:26clojurebot"([proxy mappings]); Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces) to fns (which must take arguments matching the corresponding method, plus an additional (explicit) first arg corresponding to this, and sets the proxy's fn map."
23:26technomancyI just mean my nested backquote was probably ill-adivsed
23:26technomancyooh.
23:26technomancythat's nice.
23:26technomancythanks