#clojure logs

2010-08-18

01:22technomancyso, how 'bout that leiningen 1.3 documentation, eh? http://github.com/technomancy/leiningen/commit/77d8a5c4ef26e5d01ea69fd70c0b1eb5d065a364
01:22technomancypretty good, if I may say so myself.
01:25lancepantz_,(let [bits [1 0 1 0 1 0]] (map (partial take-nth 2) [bits (rest bits)]))
01:25clojurebot((1 1 1) (0 0 0))
01:26lancepantz_can any on see a better way to do that?
01:26lancepantz_i was thinking the [bits (rest bits)] part may be able us some clojure magic
01:30tomojseems fine to me
01:32lancepantz_alright, thanks tomoj
01:32lancepantz_how have you been?
01:32tomojgoodly, and you
01:32lancepantz_same, finished up my clojure project
01:32lancepantz_doing some solr stuff now
01:33lancepantz_still going to do my plugins in clojure :P
01:33lancepantz_still doing cake too i guess
01:34tomojoh?
01:34tomojI've done a bit of work with clojure and solr
01:34lancepantz_really!?
01:34tomojwould be interested to hear about your approach and/or share mine
01:35tomojthough my current approach is terrible
01:35lancepantz_what were you attempting to do?
01:35lancepantz_so i'm still really early with solr
01:35lancepantz_just started today
01:36tomojall I'm really doing now is generating function queries using java interop to the solr classes
01:36tomojwhich is really nasty
01:36tomojwhat I'd like to see is pure clojure value sources
01:36lancepantz_but it look you can set it up and put it in a war, and not even write a line of code
01:36tomojbut I'm not sure if that's really feasible :(
01:39lancepantz_so you mean you're using interop to interface the java api?
01:40lancepantz_tomoj: actually i have to run, lets discuss tomorrow
01:41tomojokey
02:39LauJensenMorning all
02:43slyrusmorning LauJensen
02:54scottj /exit
03:55esjMorning Good People
03:55esjthe rest of you can have a bad morning...
04:03cgrandMorning esj!
04:03esjhello cgrand
04:03esjoh I owe you a link....
04:36zmila,(comment not calculated 3/0 really?)
04:36clojurebotDivide by zero
04:36zmila,(comment not calculated 3/7 really?)
04:36clojurebotnil
04:39tomoj,(read-string "(comment 3/7)")
04:39clojurebot(comment 3/7)
04:39tomoj,(read-string "(comment 3/0)")
04:39clojurebotjava.lang.RuntimeException: java.lang.ArithmeticException: Divide by zero
04:41zmilanice :)
04:41tomoj,(comment {1 2 3})
04:41clojurebot3
04:41tomoj-> (comment {1 2 3})
04:41sexpbot=> ()
04:42tomojheh
04:42tomojfor me, (comment {1 2 3}) returns nil
04:42tomojeven though (read-string "(comment {1 2 3})") throws an error
04:58bsteuberis is allowed to use a gen-class inside do?
04:58bsteuber*it
05:16AWizzArdbsteuber: what happens when you try it?
05:17bsteuberhm, it didn't work, but I think the problem is somewehere else :)
05:17BjeringIs there a way to undef an entire namespace?
05:19bartjer, I forgot the macro to comment an expression
05:19smokecfhwhat would be a good data structure in clojure for 2d images (32 bit, rgba)?
05:20bartjoh it is the #_
05:23bsteuberAWizzArd: http://gist.github.com/534131
05:23bsteuberso I'm trying to generate a class from a macro
05:24bsteuberI think the {:static true} might be the problem
05:24bsteuberas I'm not sure how meta-information interacts with compile vs. runtime
05:31bartjsmokecfh, maybe this can help - http://nakkaya.com/2010/01/12/fun-with-clojure-opencv-and-face-detection/
05:35smokecfhbartj: thanks. it seems that most people wrap low level libraries to do image processing. (including akkaya)
05:36smokecfhother people use the java image classes, such as BufferedImage.
05:36smokecfhbut is there no 2d array data structure in clojure?
05:37hoeckbsteuber: the metadata thing will work in macros
05:37bsteuberhoeck: ok, thx - then I'll have to look somewhere else
05:37bsteuberoh, in the snippet I positioned the metadate wrong
05:37hoeckbsteuber: maybe you want to look at reify if you are not using subclassing and other java features
05:39RaynesBjering: In case nobody mentioned it yet: (doc remove-ns)
05:40BjeringRaynes: thank you
05:40bsteuberhoeck: hm, also for pure Java-interop classes?
05:40bsteuberI thought somehow they're more for clojure-internal use
05:42hoeckmy understanding may be wrong but to me reify is like a faster but limited proxy
05:44bartjsmokecfh, as far as I know, no
05:45hanDerPederhow can I write this predicate: "The square root of x is a whole number"
05:45bsteuberhoeck: hm, looks good - I just have to generate an extra interface per class
05:45bsteuberbut that's not a real problem with macros :)
05:46hoeckbsteuber: and what about using deftype?
05:46bsteuberstill needs to have all methods in interfaces, no?
05:46bartjsmokecfh, see this http://clj-me.cgrand.net/2009/10/15/multidim-arrays/ for multidimensional arrays
05:46bsteuberbut yeah, I might use defrecord
05:47hoeckbsteuber: or in protocols
05:47bsteubererm yes, that's what I meant to say :)
05:47hoeckbut you can change them at runtime
05:47bsteuberanyways, I think using defrecord is much nicer than gen-class
05:48bsteuberbecause of slime + AOT awkwardness, for example
05:48bsteuberso thanks :)
05:49smokecfhbartj: thanks
05:52bartjhanDerPeder, here is my attempt - (= (Math/sqrt 10) (int (Math/sqrt 10)))
05:52bartjhanDerPeder, substitute 10 for any number
05:53hanDerPederok, so you just try casting it?
05:53bartjhanDerPeder, yeah
05:54hanDerPedercool
05:54hoeckbsteuber: yes
05:54hanDerPederbut why doesn't this work (not same semantics, i know) (defn is-whole-number [x] (= (x (Math/floor x))))
05:55hanDerPedergives me ClassCastException..
05:55hoeckhanDerPeder: one paren too much
05:55hoeck(= x (Math/floor x))
05:55hanDerPederah, thanks :)
05:57smokecfhi read that add-classpath is deprecated, but it does not say what i should use instead?
05:59hoecksmokecfh: add everything to the classpath before starting clojure
06:00smokecfhhoeck: i'm using the slime repl, and would like to read a jar dynamically -- is that still possible?
06:03hoeckits still possible, you have to put the jar somewhere in your classpath and then just :require or :import the namespaces or classes
06:04hoeckmaybe you have ~/.clojure/jar/ directory which is included in the classpath by default
06:06BjeringWhat am I doing wrong here: https://gist.github.com/51144e1c64ff615ff854
06:06Bjeringlast test fails, count is 1 but I expected 2.
06:13ordnungswidrigwhat is the content of the ref at line 36?
06:13BjeringMarcus
06:13Bjering{#<core$name clojure.core$name@4ba4d6> {:username Marcus}}
06:13ordnungswidrigwhat is "name" at line 11?
06:14Bjeringah, that one is wrong.... copy-paste error from last attempt... should be username
06:14ordnungswidrig*g*
06:14Bjeringpass :)
06:15Bjeringthank you
06:16ordnungswidrigshuldn't it read then       (alter (users :by-name) conj new-user)
06:18Bjeringnah, it should be map from username -> the map of users. Currently user only contains its name, but it will change.. after lunch :)
06:19Bjeringmap username-> user I mean.
06:19ordnungswidrigI see
06:19ordnungswidrigyou conj onto the map
06:19Bjeringbbl
06:20LauJensenGents - Im very happy to announce that Conj Labs is partnering with InnoQ to provide the next Conj Labs session in Frankfurt, Germany! See http://conj-labs.eu for more info!
06:20Bjeringyes, this is the way right?
06:35ordnungswidriggreat news!
06:35ordnungswidrigI'd love to see more adoption in .de
06:40LauJensenWith any luck its coming :)
06:49LauJensenSweet, hope to see you there - Are you a native of Frankfurt? @bobo_
06:50bobo_no, sweden
06:50bobo_but was cheap to fly
06:50LauJensenYea, Central European flights are crazy cheap these days
06:51bobo_its the hotell that quickly can get expensive, but 99eur didnt seem that crazy
06:51LauJensenNo its a good deal - Same standard hotel as the one we used in Brussels (very good) but I think we paid 145 per night in Brussels
06:51LauJensenStill - Was worth it
06:58ordnungswidrigI just returned from berlin — a combined trip rail + hotel — the trip (4 days) cost just 70€ more than the pure rail ticket.
06:58ordnungswidrigso 70€ for 4nights standard hotel is a good deal :-)
06:58LauJensenok - its not that kind of hotel :)
06:59LauJensenI assume Berlin and Frankfurt should be pretty similar in terms of pricing?
07:03ordnungswidrigLauJensen: I don't know, Berlin is actually very cheap. "Poor but sexy" they us as a slogan
07:04ordnungswidrig(the citiy, not the hotels)
07:04LauJensenoh - I didnt know
07:04LauJensenhehe, gotcha
07:04LauJensenIt was our German partners that pushed for Frankfurt, so I think we're in for a good time
07:05ordnungswidrigfrankfurt is fine because it is as central as you can be in germany, I think. At least regarding transportation
07:07esjlast time I was in Frankfurt I was inadvertently booked into the "Stay and Learn" hostel, due to its cheapness and proximity to the rail station.
07:07ordnungswidrigLauJensen: which role does InnoQ play regarding the sessions?
07:07esjTurns out it as on floors 4-5 of a buliding where 1-3 were the "World of Sex"
07:07esjit was my wife who made the booking....
07:07ordnungswidrigesj: I guest it was a special experience
07:07bobo_esj: sounds like a trap!
07:08LauJensenordnungswidrig: They help make arrangement with the venue as well as marketing through various channels + misc
07:08esjI was offered all sorts of dessert that night.
07:08ordnungswidrigesj: was there a seperate entrance?
07:08esjyeah
07:19LauJensenordnungswidrig: no need, you can register directly on conj-labs.eu
07:26ordnungswidrigLauJensen: oh, you got me wrong. I had to talk to my carrier to stop them sending me offers via sms.
07:26LauJensenI know, I was just joking :)
07:26LauJensen(we dont have registration by phone)
07:27ordnungswidrigLauJensen: then you got me
07:28ordnungswidrigI still think that a german clojure user group would be a good idea. Perhaps you can collect some feedback when you do the session
07:28LauJensenThere's one in Berlin
07:29BjeringDoes anyone knows if there is any clojure user groups in Sweden?
07:29LauJensenHaven't heard of any
07:29LauJensenBut the danish group has about 30 members, so its not unlikely
07:29ordnungswidrigLauJensen: Really? That would be a start. I'm sitting on the other end of germany
07:30LauJensenordnungswidrig: you should check with @pbholdings on twitter
07:30bobo_Bjering: yes in stockholm
07:30ordnungswidrigon #clojure.de we are about 10 regulars who do manage to organize a "get together" :)
07:30bobo_we hade one meeting before the summer, but will start soon again i hope
07:31Bjeringbobo_: Cool, how does one get in touch with it?
07:31LauJensenordnungswidrig: You guys should come meet up a Conj Labs then
07:31bobo_Bjering: http://groups.google.com/group/stockholm-clojure-user-group?pli=1
07:32Bjeringbobo: Do you live in Stockholm?
07:32bobo_yehs
07:32BjeringOk, I live in Skövde, but I travel to Stockholm often enough.
07:32LauJensenBjering: I've been to Skövde! :)
07:32ordnungswidrigLauJensen: although it's not expensive, me budget is exhausted for this year.
07:33BjeringLauJensen: Really, do you have aclient here?
07:33LauJensenordnungswidrig: Ah ok, I understand - Would be great if you could let them know its going on though
07:33LauJensenBjering: No - It was years ago
07:37ordnungswidrigLauJensen: I do not find @pbholdings on twitter
07:37LauJensenlemme chek
07:37LauJensencheck
07:38LauJensensorry, I imagined the 'b'
07:38LauJensenpholdings
07:43fogus_LauJensen: Sorry, just received your question. The advantage is that if they work, then I do not have to define my own.
07:44LauJensenoh ok. I imagine they'll work fine, the only reason I opted for the custom exception was because of clarity - you dont need to read more than 'Clash'
07:50fogus_understood. For me it's not worth the AOT in this case since the semantics of the existing execpts fit
07:59LauJensenSure I understand
07:59ordnungswidrignew topic: any news about a clojure prevalence layer? I don't lose the feeling that persistent data structures are the perfect match on this.
08:02Bjeringhmm, when I google prevalence to understand what it is it is all about diseases, I suspect this isn't what you are after?
08:06ordnungswidrigBjering: prevayler.org basically a form of event sourcing. You do not store the state of the system on disk, but only the stream of operations on the systems state. The state of the system is typically held in memory only, and rebuilt from the operation log if needed. Like bookkeeper does since hundret of years :-)
08:07ordnungswidrigs/hundret/hundred/
08:07sexpbotBjering: prevayler.org basically a form of event sourcing. You do not store the state of the system on disk, but only the stream of operations on the systems state. The state of the system is typically held in memory only, and rebuilt from the operation log if needed. Like bookkeeper does since hundred of years :-)
08:09srjHi all
08:09srji am a post-grad student looking for a good project in compilers, anywhere i can start digging?
08:09BjeringVery interesting
08:10ordnungswidrigbbl, lunch
08:12fogus_srj: Clojure-specific?
08:25BjeringAlright, I have build a datastructure with circular refs, is there a print method available that dont expand refs?
08:30chouserHm, I wrote one once. Where did I put it...
08:32chouserwell, not expanding refs is easy enough. I wrote one that expanded only non-circular ones
08:34Bjeringeven nicer
08:34Rayneschouser: Check under the sofa cushions.
08:36chouserBjering: http://paste.lisp.org/display/83647#2
08:36zmila,(time (reduce + (range 1000)))
08:36clojurebot499500
08:36clojurebot"Elapsed time: 0.918 msecs"
08:36zmila,(time (reduce unchecked-add (range 1000)))
08:36clojurebot499500
08:37clojurebot"Elapsed time: 112.321 msecs"
08:37zmila,(time (reduce unchecked-add (range (int 1000))))
08:37clojurebot499500
08:37clojurebot"Elapsed time: 106.836 msecs"
08:37zmilawhy simple + is quicker than unchecked-add
08:37zmila,(clojure-version)
08:38clojurebot"1.2.0-master-SNAPSHOT"
08:39chouserBjering: note you have to use 'binding' around the print to define the scope in which refs should be checked for repetition
08:39Bjeringchouser: Please excuse my newbieness, but it complains it cannot resolve classname Writer, something I neet to import first?
08:40Bjeringneed
08:40chouseroh, sorry. I hate it when people paste broken code. :-P
08:40zmilaBjering - java.io.Writer
08:41chouserjust use #^java.io.Writer instead of #^Writer
08:42Bjeringnext unresolved is print-sequential
08:42chouserheh
08:43chouseryou're on 1.1 or 1.2 (not that it matters for this question)
08:43Bjering1.2
08:43zmilaprint-sequential is private in core_print.clj
08:45chouserBjering: you want this for normal REPL printing, right? So that it doesn't spew uselessly deep structures?
08:46chouserTry just this: (defmethod print-method clojure.lang.IDeref [o w] (.write w (format "#<%s@%x>" (.getSimpleName (class o)) (System/identityHashCode o))))
08:46BjeringYes, it nothing critical though, I was just bummed when I tried to print my structure. And I thought perhaps there was a util somewhere that solved it.
08:48raeksetting *print-level* can be a cheap workaround
08:48Bjeringah now REPL dont expand
08:48Bjeringprint-method is what the REPL calls?
09:16chouserBjering: yes, print-method is what the REPL calls.
09:21chouserto that more complex solution working would require customizing the REPL a bit. Not particularly hard, but incrementally more complex and fragile.
09:21chouserto get that
09:38bmhCould someone steer me toward a good namespace tutorial?
09:39RaynesI would, but I haven't written it yet. ;)
09:41bmhRaynes: get crackin'!
09:55arkhI'm in the process of trying to wrap some Java UDP networking code in clojure. Any reviewing and/or critiquing of my first 31 lines would be much appreciated. Thank you. http://gist.github.com/534794
10:28LauJensenarkh: I think it looks good. You alternate between (.method obj) and (. obj method) and you use a ref in a scenario where there's no need for coordination. Although Im sure I dont understand the concurrency situations you'll be facing, you should perhaps consider an atom
10:33defnhugod: love your dependency graph library
10:33arkhLauJensen: I think I'm struggling between trying to make something general purpose and trying to just make it fit my needs. That may not be evident in what I posted but it's what's in my head. Anyway, I like what you brought up and probably repost more of an end-result later.
10:34defnLauJensen: aren't atoms uncoordinated though?
10:34hugoddefn: glad you're finding a use for it - btw, it doesn't find dynamic dependencies
10:35defnLauJensen: network traffic seems like it ought to be coordinated
10:36chouserclose-udp-server has a bit of a race, I think.
10:37chouserit might not matter in this particular case, but may be worth thinking about now anyway.
10:37arkhwhat I have in mind is keeping with clojure's verb-style and having agents sit in a (listen) and (send) where they can fill and drain separate vectors (or whatever) of packets. The main routine will take them in, process, and put them in a queue to be sent back out.
10:37defnchouser: enjoyed your interview @ strange loop btw
10:37defnchouser: precisely what i was thinking
10:37chouserdefn: thanks :-)
10:38arkh.. which is totally not what I posted so far : /
10:38chouserarkh: if you indend for udp-server being nil to indicate the server's closed, you have a race
10:38defnchouser: i have questions for you, have been compiling as i re-read my favorite parts of coders at work :)
10:39arkhchouser: thank you - will change
10:39chouserputting .close inside dosync isn't an options, as .close is impure
10:39arkhyeah : ( same with .connect
10:40defnis there anyway to sanitize those with what currently exists in 1.2 chouser?
10:40chouserI wrote a little thing when I did my own clojure network stuff -- it worked, but I'm not comfortable recommending it.
10:41defnhttp://github.com/aberant/clojure-networking/blob/master/server/udp.clj
10:41defnlooks like what you're doing arkh is par for the course
10:42chouserdefn: oh dear. well, shoot 'em to me whenever you want so I can start procrastinating.
10:42defnheh -- chouser forgive me, but-- is JoC fully released now?
10:42defni havent been paying close attention the last couple weeks
10:43chouserall the chapters are out, yes. All the chapters will be re-released as MEAP soon (this week?) to reflect additions, changes, etc.
10:43defncongratulations
10:43defneven if it's a bit premature
10:43chouserthanks
10:43defnno small feat to finish a book :)
10:44chouserindeed! And I'm so greatful fogus as done exactly that. :-)
10:44defnhaha, so modest
10:45chouserno seriously, he's the only reason the book is anywhere close to on schedule.
10:45defn:F
10:46chouserthat udp.clj start-udp-server is scary. looks quite wrong to me
10:46arkhI hope to make something better, unless you beat me to it ;)
10:46chouserarkh: no fears, I won't
10:47defnthat's the beauty of the current clojure community -- not a lot of competition. people will eat your garbage gladly :)
10:47defni of course mean so respect, there are some niches which are quite saturated with well-rounded mature code
10:48defnbut you can get away with a bit more given our size right now :)
10:48arkhperfect for me :)
10:48defns/so/no
10:48chouserso I think what you have to do to make something like close-udp-server correct is to atomically nil udp-server, and then (knowing that yours is the thread that did that) mutate the real resource with .close
10:49arkhchouser: I like the sound of that. clojure 'sentinel' objects to be the face of java objects
10:49chouserarkh: I think 'sentinel' was a word being considered for what has most recently been called "pods"
10:49defnlike...cells? </ignorance>
10:50chouserand are probably the right solution here.
10:50chouserdefn: nope, I think that's right.
10:50defn"sentries", "sentinels"
10:50defn"pods", "cells"
10:50defnhave cells -> pods?
10:50chouseryes
10:50defnah, interesting
10:50defni like that
10:50chouserme too. less baggage
10:51defni remember being in here trying to get the whole cell, sentry story correct and it felt a bit forced
10:54chouserok, so I'm looking at this swap!-when thing I wrote, and it did seem to work but it really does scare me. Perhaps it'd be better to work with some unreleased version of pods (cells) and hope the final API is similar.
10:55chouserhttp://paste.lisp.org/display/81237
10:57chouserthe idea being you could do something like (when (swap!-when server #(deref server) (constantly nil)) (.close @server))
10:58chouserbut again, there's got to be a better way
11:00chouserhey look, there's an early implementation of 'promise'
11:12rhickeychouser: yes, that's scary
11:13chouserheh. good to know.
11:13chouserIt's been removed from our code base for some months now.
11:13chouseras has await-iref
11:14rhickeyI think you might want a version of swap! that takes a fn that returns 2 values, the one to swap and a return. You could use that more general thing to do swap-when
11:15chouserThat's an interesting measure -- is the code produced by the person in question, after a few months, discarded in shame or does it become a cherished part of a popular language.
11:16arohneris there a "group-by" function that works like sort-by, but for things that aren't Comparable, like keywords?
11:16chouserrhickey: seems reasonable. But in genearl, providing concurrency protection for real mutable resources is one thing pods are meant for, right?
11:17defn"Are you sick of cracking eggs all the time? There's got to be a better way!"
11:17defn"New, from Minoku, the egg cracker!"
11:17rhickeychouser: right, plus pods do true coordination of activity, by associating it with a place
11:19rhickeychouser: above, server is an atom that holds another reference?
11:20Raynesdefn: Yeah, I was sitting here thinking about how bad life is when you have to manually crack eggs.
11:20chouseran atom that holds a DatagramSocket
11:20chouserlike udp-server here: http://gist.github.com/534794 but an atom instead of a ref
11:21chouserin my code I had an atom holding a map with a bunch of things including a socket and some IO streams
11:21defnhow do you mean associate it with a 'place'?
11:22fogus_rhickey: "a place"?
11:22rhickeyfogus_: the pod
11:22defnah
11:22chouserhow conceptualy different is a place from an identity?
11:22rhickeychouser: and multiple calls to .close are bad?
11:23chouserrhickey: in that gist, probably not. But it seems like a dangerous pattern -- I was just pointing out to the author that he may want to be careful there.
11:24chouserin my code I had a whole series of things I had to shut down in order, queues to drain, etc.
11:24defnchouser: but with a ref he is okay, no?
11:25chouserdefn: he's ok only if he never assumes a non-nil udp-server is open
11:26chouserthat is, there is a moment as the code stands where @udp-server is a non-nil object, but is closed.
11:26defnahhh
11:26defnthank you
11:27defnfogus_: link?
11:27chousermoving .close into the transaction would fix that, but then .close may be called multiple times. Which is probably not a problem for .close, but in general making changes to or using a socket in a transaction may be unsafe because of retries.
11:27fogus_defn: just arrived on the google group
11:28defnchouser: yeah, didn't consider retries
11:28chouserfogus_: seems like I remember explaining something about this once...
11:28rhickeychouser: a pod is still an identity. It differs from the other references in that change is not speculative, i.e. you don't have the potential parallel work of STM or atoms (which is the problem above, since any speculative work should be pure and .close isn't). Instead, pods have stricter "you've gotta be in it to win it" semantics, like physical (Newtonian) places
11:28fogus_chouser: We should probably put that in the book. ;-)
11:29chouserrhickey: ah, very good.
11:30defni have to suggest there ought to be a common tag in IRC to mark where a question which involves considerable effort is fully answered for the person posing the original question
11:30chouserfogus_: maybe call the section "Don't create Boolean objects" and use memorable words like "evil-false" and "landmine"
11:30fogus_chouser: I like it! Stop the presses!
11:31rhickeythere is only one 'process' associated with a pod at a time, working on its transition from value to value
11:31chouserfogus_: seriously, can we paste a section of our markdown straight into the response? Surely we're allowed...
11:32fogus_chouser: I think so yes
11:47BahmanHi all!
12:25technomancyshould it be considered a bug that clojure.contrib.find-namespaces only checks for namespaces where ns is the first form?
12:26technomancyI know it's crazy to do otherwise, but we had to work around a last-var-wins issue with ns-unmap that had to preceed the ns form
12:26technomancyand it caused our tests to be skipped =\
12:27technomancyon the other hand, reading through the whole file until you hit an ns form is not so hot either for perf reasons. =\
12:56cemericktechnomancy: To that, I'd say rip the offending use/require(s) out of the ns. It really needs to be the first form.
13:06technomancycemerick: right; I did that for now, I'm just wondering if there's a good general solution to be less strict in the future.
13:14pdk(doc read)
13:14clojurebot"([] [stream] [stream eof-error? eof-value] [stream eof-error? eof-value recursive?]); Reads the next object from stream, which must be an instance of java.io.PushbackReader or some derivee. stream defaults to the current value of *in* ."
13:14pdk(doc load)
13:14clojurebot"([& paths]); Loads Clojure code from resources in classpath. A path is interpreted as classpath-relative if it begins with a slash or relative to the root directory for the current namespace otherwise."
13:14technomancythe perf probably wouldn't be too bad for searching the whole file
13:14pdk(doc load-file)
13:14clojurebot"([name]); Sequentially read and evaluate the set of forms contained in the file."
13:18pdk(doc print)
13:18clojurebot"([& more]); Prints the object(s) to the output stream that is the current value of *out*. print and println produce output for human consumption."
13:20cemerickAre there any good reasons to not have a set-field in clojure.contrib.reflect? The patch is a git invocation away...
13:28LauJensenchouser: link to interview?
13:30polypusis 1.2.0-RC3 or 1.2.0-SNAPSHOT more up to date?
13:33hiredmanping?
13:33clojurebotPONG!
13:35polypuswhich will include the most recent changes, clojure 1.2.0-RC3 or 1.2.0-SNAPSHOT?
13:35dnolenpolypus: RC3
13:36polypusdnolen: ty. so what's SNAPSHOT for?
13:37bmhAre there style guidelines for contributing to contrib? I'm working on a suite of stream ciphers / pseudo-random number generators
13:39MrHus@bmh http://www.assembla.com/wiki/show/clojure/Clojure_Library_Coding_Standards
13:39bmhthanks MrHus
13:39LauJensenbmh: also, dont implement whats already in /proc/sys/kernal/random :)
13:39LauJensenkernel..
13:40bmhLauJensen: Different situations call for different randomness guarantees.
13:40LauJensenYea I know - Look forward to seeing your contribution
13:40AWizzArdSomething that can run under all major OSes sounds good
13:41technomancybmh: probably better to start it as an independent lib
13:41AWizzArdSo, /p/s/k/r should maybe not be the only way to read random nums.
13:41jfieldsis there a way to get the current ns?
13:42bmhtechnomancy: That's the plan. I'm writing this all for a procedural generation project and figure that the random numbers would be of general interest
13:42LauJensenAWizzArd: Well. No serious application runs on Windows
13:42bmhLauJensen: Cygwin? ;-)
13:42LauJensenhaha, good one
13:43bmhtechnomancy: Thanks for lein, by the way.
13:52ordnungswidrigjfields: *ns*
14:00jfieldsordnungswidrig, thanks
14:01craigmarshall9I love this quote:
14:01craigmarshall9Lisp turned out to be a bit like chocolate mousse. At first sight, it might look like dog shit. But once you put aside your prejudices, it turns out to be delicious!
14:02craigmarshall9source: http://groovyguts.wordpress.com/2010/01/08/10-reasons-to-learn-clojure-or-any-other-lisp/
14:02craigmarshall9:-)
14:12ChousukeThe first five points are basically all summarised with the word "macros"
14:12ChousukeI suppose It's good that they're elaborated :P
14:14kilofuI'm a bit of a clojure / lisp noob, and trying to get better about writing idiomatic clojure. I've written a function that, for each element in a sequence, returns the sum of a parameter function applied to that element and each other element (excluding the element). Could anyone take a look and see if I'm on the right path? I've thrown a gist up at http://gist.github.com/535261
14:15craigmarshall9Chousuke: I guess so, but for a non-lisper, that means nothing and for a C or C++ programmer, it's meaning is even less clear than that.
14:16Chousukekilofu: You shouldn't put closing parens on their own lines. Other than that, I can't really see anything wrong with that
14:16craigmarshall9Chousuke: You could summarise all 10 as "It's lispy" :-)
14:16Chousukeeh :(
14:16Chousukecraigmarshall9: yeah. :P
14:17Chousukebut to me it kind of read like, "ten reasons to learn lisp: 1. macros 2. macros 3. macros 4. macros 5. macros 6. functions 6. functions ..."
14:17Chousukeand while I agree it was kind of amusing
14:18Chousukealso, the last 6 is supposed to be 7
14:18Bjering,(dorun (map print [:a :b]))
14:19clojurebot:a:b
14:19Bjeringis there a better way?
14:19ChousukeUse doseq
14:19Bjeringthanks :)
14:19craigmarshall9Chousuke: yeah - I see what you mean about the macros
14:21Bjering,(doseq [:a :b] print)
14:21clojurebotnil
14:22Bjeringah
14:22Bjering,(doseq [x [:a :b]] (print x))
14:23clojurebot:a:b
14:26pdelgallegoIs there any other option, besides google app engine, to host freely clojure websites ? something like heroku ?
14:33natesbrainhi, I'm writing a form like this (.. elt getAttributes (getNamedItem attr) getValue)
14:33natesbrainwhich works pretty good unless one of those methods returns nil
14:33natesbrainis there a form that returns nil if any of them return nil ?
14:35chouserI think it's called -?> in contrib somewhere
14:35natesbrainawesome, thanks
14:37chouserclojure.contrib.core/-?>
14:37chouser(-?> elt .getAttributes (.getNamedItem attr) .getValue)
14:37kencauseyIf I was going to buy just one Clojure book and I'm an experienced user with some CL/Scheme experience but relatively little Java in the last decade, I've studied Clojure somewhat already, and I would prefer more advanced info... Which would you recommend?
14:38chouserJoy of Clojure, no question. :-)
14:38kencauseyno bias? ;)
14:39chouserhonestly though, you sound like just the sort of person we were aiming for. We didn't want to write another intro text -- the other three have that pretty well covered.
14:40arkhthree?
14:40chouserI don't know if perhaps you'd find Clojure in Action compelling -- that intends to cover a wider range of practical applications that JoC does.
14:40kencauseyhttp://gist.github.com/535261
14:40kencauseyoops, wrong URL
14:40Bjering,(do (let [a (agent 0)] (send a (fn [_] 42)) (send a print)))
14:40clojurebot#<Agent@8e83f6: 0>
14:41kencauseyhttp://stackoverflow.com/questions/2578837/comparing-clojure-books
14:41kencauseyarkh: that lists all 4
14:41kencauseythe main answer anyway
14:41chouserProgramming Clojure is very good, but is missing some of the newer Clojure features. I've heard good things about Practical Clojure -- it's up to date. Both those are meant as more introductory books I believe.
14:41Bjeringis the above the best way to SET an agent, ie I must pass an anonymous function like that, no shorthand for that?
14:41kilofuChousuke: Thanks for taking a look
14:42chouserBjering: (constantly 42) instead of (fn [_] 42). But wanting to do that would cause to to question if an agent is the right approach.
14:43Bjeringchouser: Yes, I question it myself, 30 min more and I hope to show the code "working" and then learning here how I do it all wrong :)
14:43chouser:-)
14:44technomancykencausey: I vote for JoC too
14:54kencauseythanks guys
15:05BjeringAlright, time to enter total humbleness mode, please point me in the right directions how to do this: https://gist.github.com/a4b57f89783fa9f50922 in a more clojuresque way.
15:06BjeringIn particular I know I am doing one very bad thing, I am invoking methods with side effects inside dosync, thats why I dabbled with agents, but I did not find a clean way to do it.
15:06LauJensenBjering: You are aware that transactions can respin?
15:07BjeringYes, that is a known bug in there, I need to fix that in a good way.
15:08LauJensenBjering: Interesting. We actually had an entire lab on how to build a thread-safe chat-bot for Conj Labs Brussels
15:10BjeringI have written this whole very basic chat-server in C++ with boost::asio, using normal locking strategies. Now Ive read Programming in clojure and Pragmatic clojure and then read up on Netty online. Yet it feels like very much like I am fumbling blindly.
15:11BjeringMy goal is to prove to my team I can use clojure, the C++ one handled 50k emulated clients on localhost with 3% CPU , if clojure/Netty is withing 500% of that I much rather go with clojure then spend the next 18 months worrying about locking...
15:13Bjeringbut ofc, I have the whole thing with me beeing clojure newbie agains me :) But one always has to start somewhere...
15:14chouserIt's difficult, especially at first, to think clearly about where the line is between identity and value. Code intimately wrapped up in real resources like channels and sockets muddles things even further.
15:14BjeringYes, yet it is necessary
15:14chousernevertheless, that's likely the crux of a "clean" solution over one that feels fumbly.
15:14chouserexactly.
15:16LauJensenBjering: Im afraid I dont have time to spar with you on this, but skimming your code makes me think that you should try and read up on the reference types and when/where to apply them. Also note, that if you put a mutable thing inside of a reference, that reference isnt doing much for you
15:16chouserso, the fact the so many of your functions have dosync is hint that perhaps too much of your code is manipulating identities instead of values.
15:18kencauseytechnomancy: one annoyance I have with Leiningen on cygwin is that if I forget to background lein swink (&) then I can't background it at all or even cleanly exit without using the task manager or killing it from another bash session
15:19Bjeringchouser: First, the two "global" state arrays I have, user and channels, adding to them implicitly when calling create-user and create-channel, this isn't wrong is it? It seems to me the way to do it.
15:21technomancykencausey: I've never used cygwin, but if there's a swank bug could you file an issue on github?
15:22BjeringI don't see how I can get rid of users and channels as identities as I want them to be referenceable over the network.
15:22kencauseyOK, it seems like the write thing for lein swank to do is to background itself and log to a file if needed, but I'm not sure I understand how it might be used or why it presents somethign that at least looks like a REPL at the command line
15:22kencauseys/write/right/
15:22sexpbotOK, it seems like the right thing for lein swank to do is to background itself and log to a file if needed, but I'm not sure I understand how it might be used or why it presents somethign that at least looks like a REPL at the command line
15:24technomancykencausey: you mean because cygwin doesn't provide enough process control?
15:24technomancyC-z + bg works fine here.
15:24kencauseytechnomancy: it doesn't respond to C-z, C-d, C-c on cygwin
15:25kencauseyor anything else I can think of
15:25technomancy=\
15:26kencauseyI'm inclined to just work around it and fix my habits since using it on cygwin is just temporary for me
15:32dnolenBjering, have you looked at Aleph at all?
15:34Bjeringdnolen: Very little, just enough to convince me Netty was a good idea. As it is a HTTP-server I doubt it has my issues with mutable state?
15:34BjeringI am looking more now, seems its more than an http server.
15:35dnolenBjering: yes it's more than http server. It's a young project but perhaps you have some thoughts to contribute to it's direction
15:36Bjeringdnolen: Well atleast perhaps I could contribute questions ;)
15:36dnolenBjering: it abstracts away the low-level aspects of Netty in an interesting manner
15:38BjeringAlright, sounds like a good idea, I'll replace my own Netty code with aleph and see if I can then see the forest again.
15:38technomancykencausey: might want to try http://p.hagelb.org/lein-swank.html
15:38kencauseytechnomancy: thanks
15:40dnolenBjering: there's an aelph google group, ztellman's a pretty responsive guy.
15:41Bjeringdnolen: Thanks, just reading this source code wil be enlightening I am sure
15:52kencauseytechnomancy: this is complicated by the fact that you can run emacs either as a unix/cygwin process or as a windows process and in either case it has a mix of dos/unix conventions, not a nice situation to have to deal with overall.
16:38dakronecan someone tell me what I'm doing wrong with the trampoline here: http://gist.github.com/536105 ?
16:39mefestohey everyone. is it possible to override the :arglist metadata ?
16:39qbgOverride how?
16:40mefestoqbg: i have a macro that creates a function and i'd like to specify the arglist myself but i keep getting an error related to "unable to resolve symbol ..."
16:40mefestowhich is about the :arglist metadata that im trying to set
16:40qbgI once did something like that
16:41qbgIt turns out that the :arglist part of the metadata is double evaluated for some reason
16:41qbgSo you have to quote it an extra time
16:41mefestoqbg: thanks i'll give that a try! :)
16:41qbgIt is weird...
17:01LauJensenI have this weird situation with mysql where I have a user table containing 8 columns with various info. I added an extra column named 'group' of the type 'TEXT'. Subsequent updates to this table fail with a 'syntax error near group' if I try to update that column as well. An update that does not affect group suceeds. Anybody seen that before?
17:01apgwozgroup is a reserved word
17:01ordnungswidrigLauJensen: group might be a reserved word in sql
17:01apgwozso, you have to quote it
17:02LauJensenah right, thanks
17:02ordnungswidrigLauJensen: you know, select x from a group by b
17:02LauJensenyes yes got it. I thought they where shielded somehow
17:04ordnungswidrigdo you build your SQL by hand or do you use some clojure lib to "abstract the pain away"
17:04LauJensenI was trying out contribs sql
17:07mefestoI'm trying to override the arglists metadata and thanks to qbg I'm able to. But I was wondering if someone could explain _why_ it's like this or point out a better way? https://gist.github.com/91e161a8c5da96faa217
17:10ordnungswidrigLauJensen: AFAIK jdbc does not provide a general way to quote reserved names
17:13raekmefesto: why what is like what?
17:13mefestoraek: the extra quoting of the :arglists in metadata
17:15raekin a macro, the returned code is evaluated. you don't want the arglist to be evaluated like an ordinary function application, so you need to generade a quote form around it
17:15raekyou can try (macroexpand-1 '(defthing my-test <stuff>)) to see what the macro expands to
17:16mefestoraek: yea i was using that but it didn't show the ~(with-meta ...) portion
17:17mefestoraek: thanks though, I think you cleared up the mystery for me
17:18raekmefesto: (def *print-meta* true)
17:18raekthe metadata is in the symbol, but is not printed by default...
17:18mefestoraek: oh neat! :)
17:19mefestowish i knew about *print-meta* earlier today :)
17:20raekoh, maybe def is bad to use there...
17:20raek(alter-var-root #'*print-meta* (constantly true))
17:21mefesto(set! *print-meta* true) is what i used
17:21raekah, rigth.
17:21raekthose variables are automatically locally bound by the repl
17:22raekset! is the preferred way. I think.. :)
17:22BjeringHow do I do the javacode: new byte[10] in clojure?
17:23mefestoBjering: (byte-array 10)
17:23Bjeringthank you
17:23pdkyou can do this for all java primitives
17:24pdkthough note that when clojure code works on a java primitive it takes in
17:24pdkit'll box it again automatically
17:28Bjering,(.String (byte-array 10))
17:28clojurebotjava.lang.IllegalArgumentException: No matching field found: String for class [B
17:28Bjeringnope... :(
17:29raekwhat did you want to do? new byte[10].toString()? new String(new byte[10])?
17:29Bjeringdnolen: aleph's tcp-server initial channel feeds me java.nio.HeapByteBuffer, how do I get from this one to a String?
17:30dnolenBjering: you've already dived a bit further than I 've gone :) I would post on the Aleph ML :)
17:30Bjeringraek: This is just a test to demo my type trouble, what Ireally want todo is the above (ie convert from HeapByteBuffer)
17:30raekthen you also need to decode the bytes into some characters
17:31Bjeringyes, but that isnt the issue
17:31Bjering,(.String (byte-array 10) "UTF-8")
17:31clojurebotjava.lang.IllegalArgumentException: No matching method found: String for class [B
17:31Bjeringno better...
17:31raek,(String. (byte-array 10) "UTF-8")
17:31clojurebot"
17:32Bjeringits like the String ctor dont see the result of (byte-array) as a byte[]
17:32Bjering:)
17:32BjeringAHHH
17:32Bjeringits so frustrating beeing this newbie :)
17:32Bjeringthanks
17:33raek,(String. (.getBytes "hello world" "UTF-8") "UTF-8")
17:33clojurebot"hello world"
17:34raekI dunno if there is a constructor fore ByteBuffers
17:34Bjeringwell you helped me
17:34BjeringI had the . on the wrong side of String!
17:34Bjeringnow it works
17:35pdkyeah . is kind of an oddball
17:35pdkcould do (.x y) (. x y) (x. y) etc with subtly different usage cases
17:36raekI think it's nice that clojure manages to make java interop look lispy :)
17:57dunpealCan you define classes in a Clojure code file that would be reusable from Java?
17:58pdkdunpeal look at clojure protocols
17:58raekthere are several ways
17:58raekone is gen-class: http://clojure.org/compilation "Ahead-of-time Compilation and Class Generation
17:59raekone is deftype/defrecord
17:59raekand then there's proxy and reify
18:01raekgen-class and proxy has been around for a while
18:01raekdeftype, defrecord and reify are new in 1.2
18:01pdkhas 1.2 gone gold yet
18:02raeknot yet
18:02raekcurrently at Release Candidate 3
18:03dunpealraek: thanks. seems like it's still a bit less straightforward and trivial than reusing Scala classes, right?
18:04raekyes, scala is object oriented itself, but clojure mostly provide those features for interop
18:04raekthe new 1.2 things, however, are designed to be for clojure
18:04pdkclojure tries not to be OO within its own idioms
18:05raek...and is biased towards clojure's ideals
18:06raekdunpeal: do you need to interface with a java lib from clojure or the other way around?
18:06dunpealraek: both.
18:07raek(Programming Clojure has a great chapter about this, if you happen to have it)
18:07dunpealwe have Java code that will have to call Clojure code.
18:08raekif you do a java program and need to implement a class in clojure, then gen-class is probably what you are looking for
18:09raekif you need to implement a class in order to use a java lib from clojure, proxy can be used
18:10raekone third option is to interact with the clojure runtime from java, if you just want to call some functions and don't need a new class
18:10dunpealraek: thanks. basically, I'm wondering how much code re-usability I can get between Clojure and Java, particularly compared to Scala.
18:11dunpealmy investigations show that Scala has nearly perfect re-usability vis-a-vis Java; it's almost as easy as reusing Java code in Java.
18:11dunpealI wonder how much cost I would incur over that if I go with Clojure instead.
18:12raekwell, clojure is not OO... :) I think that make re-usability much harder
18:12raekscala is much closer to java
18:12dunpealyup, that it is.
18:21raekprogramming in Clojure is done in a different programming paradigm (i.e. Functional Programming)
18:21raekso if you are looking for something that is very Java-transparent, I'm afraid you won't find it to be Clojure
18:21raekI would still like to encourage you to check out Clojure
18:21raekI believe that it solves some very fundamental issues with Object Oriented Programming
18:21raekand that learning it can be eye-opening
18:23raekI hope you find the right tool for the job
18:35gfrlogis there a formal description of clojure syntax anywhere?
18:43akhudekdoes anyone here use enclojure?
18:43akhudekif so are you encountering problems after the last netbeans update
19:08bobbytekwhat is the coolest feature of clojure that sets it apart from other lisps?
19:12mefesto_dunno about the coolest, but for me the fact that it runs on the jvm and interops very well is pretty cool :)
19:14mefesto_i'd imagine the stm is probably _the_ coolest
19:15tomojpersistent data structures
19:30bobbytekdoesn't scala have persistent data structures?
19:30bobbyteklazy sequences seem pretty cool
19:37tomojscala stole them from us I think
19:37tomojand it's not a lisp, anyway
19:38technomancytomoj: that was just a proposal; it hasn't been applied yet
19:38tomojyou mean scala doesn't really have them yet, they've just been ported to scala?
19:39hiredman~scala {((x: Any, y: Any) => (f: Function2[Any, Any, Any]) => f(x, y))(1, 2)((x: Any, y: Any) => x)}
19:39clojurebotAny = 1
19:42bobbytek~scala
19:42bobbytek:(
19:42hiredman~scala 1 + 1
19:42clojurebotInt = 2
19:42bobbytekclojurebot can eval scala too?
19:42bobbytek~groovy 1+!
19:42clojurebotHuh?
19:42bobbytek~groovy 1+1
19:43clojurebotExcuse me?
19:43bobbytek:(
19:43bobbytek~1+1
19:43clojurebotNo entiendo
19:43bobbytek~(1+1)
19:43clojurebotGabh mo leithscéal?
19:43technomancytomoj: scala has them, but they're an independent implementation from Clojure's
19:43bobbytek~clojure (+ 1 1)
19:43clojurebothttp://www.thelastcitadel.com/dirt-simple-clojure
19:43bobbytek:(
19:44technomancybut someone proposed replacing them with that had been ported from clojure for better perf
19:44hiredman,(+ 1 1)
19:44clojurebot2
19:44tomojtechnomancy: ah, I see
19:49hiredman,(doc instance?)
19:49clojurebot"([c x]); Evaluates x and tests if it is an instance of the class c. Returns true or false"
19:50bobbytek, (/ 1 0)
19:50clojurebotjava.lang.ArithmeticException: Divide by zero
19:50bobbytekyes!
20:57summersaultshould i learn java before clojure?
21:01wwmorgansummersault: what languages are you coming from?
21:07laurusCan anyone here give me a reason to use Clojure as opposed to Scheme?
21:09arkhlaurus: watching a video or three of Rich Hickey explain clojure makes for some compelling reasons
21:09polypuslaurus: datastructures. they rock in clojure, both semantically because of persistence, and syntactically because of concise syntax and regularity of interface
21:09scottjlaurus: clojure.org/features
21:10laurusBasically, here's my thing: I used to use a program called XLispStat, which was abandoned in favor of R... and I just found out today about something new called Incanter, which is Clojure-based.
21:10laurusSo I guess I'm wondering if it is worth learning Clojure to use Incanter.
21:11itistodayso, given just an open .clj file in emacs, how do i launch slime and load it?
21:12itistodayM-x slime... i think that's it
21:12laurusIs Incanter just a small project, or is it likely to become important in the future?
21:12polypuslaurus: is there an R replacement for scheme? the incanter page gives some prettu compelling reasons for learning clojure and using incanter.
21:13polypuspretty*
21:13lauruspolypus, there isn't, but I've considered porting some of the XLispStat code over to Scheme
21:13arkhlaurus: I've heard some people rave about Incanter (enough so that I purchased R in a Nutshell) but I haven't used it yet so I can't speak from personal experience
21:14laurusarkh, well that's worth something
21:15laurus:)
21:15polypuslaurus: you might find this an interesting read. he pretty much nails why i coded in ruby for years and then switched to clojure, even though i loved scheme. datastructures. http://programming-puzzler.blogspot.com/2010/08/racket-vs-clojure.html
21:15laurusXLispStat was so great, I'm still sad about it being abandoned
21:15lauruspolypus, thanks, that is *exactly* the kind of thing I'm looking for!
21:15laurusBy the way, does Clojure work on OpenJDK?
21:16arkhyes
21:16arkh(running on that now)
21:16laurusAnd OpenJDK is sort of the successor to GCJ right?
21:17scottjlaurus: no
21:17arkhopenjdk is the eventual successor to the sun jdk, afaik
21:17laurusAh okay
21:17arkhit's the reference implementation now (I think)
21:18laurusarkh, ah, good to know, thanks
21:18laurusI haven't done anything related to Java for a little while
21:18laurus"Something about Java seems to turn every library into an insanely complex explosion of classes" - that is one reason I haven't used it in a while :P
21:19arkhI find writing java in clojure to be way better than java in java
21:19laurusHehe
21:19laurusWell I doubt I'd ever explicitly use any of the Java stuff
21:19arkhthe java interop is very good
21:20polypuslaurus: problem is you might have to dabble every once in a while. sometimes you have no choice
21:20arkhthere's libraries that are handy or sometimes required for functionality. Rich has mentioned that he's not trying to reinvent wheels already well-made in Java space
21:21laurusarkh, what's the best Clojure book in your opinion?
21:21arkhlaurus: others have said it better than I can - http://stackoverflow.com/questions/2578837/comparing-clojure-books
21:22arkhI've currently only read Programming Clojure but I look forward to JoC
21:23polypuslaurus: i'd also recommend http://www.amazon.com/Java-Practical-Guide-Programmers-Guides/dp/1558609091
21:23polypusyou can get it for a buck used, and it's a weekend read
21:23lauruspolypus, I already know Java actually
21:23laurusBut thank you
21:23polypusnp. i was confusing you for summersault who asked about java above
21:24laurusOh no problem
21:24arkhwith knowledge of scheme and java, I bet you'll find clojure a breeze
21:24laurusarkh, I actually don't have much knowledge of Scheme :) Hahaha. It's just something I'm very interested in learning but haven't been able to justify diving into yet...
21:25lauruspolypus, by the way, I learned Java from a certification book that is actually pretty excellent: http://www.amazon.com/SCJP-Exam-J2SE-Comprehensive-Programmer/dp/1590596978/ref=sr_1_6?ie=UTF8&amp;s=books&amp;qid=1282181084&amp;sr=8-6
21:25arkhlaurus: clojure has been my first functional language and it presented a learning curve (for me)
21:25laurusIt's reasonably short but very good
21:26arkhby far my favorite language now
21:26laurusarkh, well it looks like I'm going to have to try it out, asap.
21:26laurus:)
21:26laurusThanks for your recommendation
21:26polypuscool. always looking for a quick java read. don't need to know every nook and cranny to hack in clojure
21:26lauruspolypus, you can preview it here: http://books.google.com/books?id=YH8UbBTEaOQC&amp;printsec=frontcover&amp;dq=SCJP+Exam+for+J2SE+5&amp;hl=en&amp;ei=HIhsTNCrKoGAnwfTlsnNBw&amp;sa=X&amp;oi=book_result&amp;ct=book-thumbnail&amp;resnum=1&amp;ved=0CDUQ6wEwAA#v=onepage&amp;q&amp;f=false
21:27polypusty
21:27laurusyw )
21:27laurus:)
21:29laurusarkh, so which one of those books did you end up using?
21:30laurusI'm looking for something pretty straightforward, I don't know if you've ever seen the book "The Scheme Programming Language" by Dybvig, but something like that
21:34arkhlaurus: I'd recommend Programming Clojure or Practical Clojure (though I haven't read the latter). Learning to think in clojure, i.e. functionally, is a hurdle all it's own
21:34laurusOk, thanks! :)
21:34arkhlaurus: np!
22:02laurusWhy do the plots from Clojure look so ugly? Is there a way to change that?
22:02laurushttp://wiki.github.com/liebke/incanter/sample-plots-in-incanter
22:02laurusThose are atrocious
22:04ninjuddhmm... clojure.lang.PersistentHashSet/asTransient returns an ITransientCollection, but it should be an ITransientSet, right?
22:05hiredmanlaurus: it's the library incanter uses to draw charts
22:06laurushiredman, right, I'm wondering if there's a way to avoid that
22:06laurusIf they have plans to use a good library instead of that one :P
22:06hiredmanlaurus: figure out which library it uses and find out the options for it
22:06laurusOK! :) Thanks!
22:06hiredmanor figure out if incater has a mailing list and irc channel and ask there
22:08laurusThanks hiredman
22:08laurus:)
22:09danlarkinthat's a first
22:09danlarkinsomeone thanking hiredman
22:09danlarkin:-D
22:09laurusdanlarkin, why?
22:10hiredman~hiredman
22:10clojurebothiredman is slightly retarded
22:14laurusLOL
22:15summersaultwwmorgan: scheme
22:15arohnerlaurus: incanter uses JFreeChart
22:15laurusarohner, yeah, I saw that
22:15laurusIt just looks pretty bad, to me
22:16laurusGotta go! Take care
22:21summersaultwhat is the difference between c and clojure in speed?
22:29wwmorgansummersault: if you're coming from just scheme, I would recommend learning java or any OO language before learning clojure. The error messages are pretty cryptic otherwise
22:37summersaultwwmorgan: i will learn java so
23:00summersaultIs clojure good for embedded programming ?
23:03scottjsummersault: do you have java and a lot of memory on yoru device?
23:04summersaultscottj: Is a pic microcontroller enought ?
23:05summersaultscottj: A top level series...
23:05scottjsummersault: no clue
23:08summersaultscottj: How much ram is required ?
23:11scottjsummersault: I really have no clue. Basically clojure is fine in most situations where java (full not ME) is fine. otherwise no.
23:12wwmorganthe google results for "pic microcontroller java" don't look too promising
23:18summersaultbut linux microcontroller is fine
23:36callenhttp://dpaste.org/EfdZ/ clojure makes me write python like a nob.
23:56technomancyLicenser: hey! I just started using lein-search
23:56technomancyit's nice
23:57technomancypatch coming yoru way
23:58bmhIs the selection algorithm in contrib?