#clojure logs

2009-02-05

00:02blbrownis there a way to select an atom in a struct/map through a string. E.g. (def a { :abc-one 1 :abc-two 2 }) and then (a (str ":abc-one")) ...or something similar
00:02blbrownmaybe like a way to convert a string to an atom
00:03Chouser,(keyword "abc-one")
00:03clojurebot:abc-one
00:04Chouser,(let [a {:abc-one 1 :abc-two 2 }] (a (keyword "abc-one")))
00:04clojurebot1
00:04Chouserblbrown: is that what you mean?
00:04blbrownyea
00:05blbrownand I guess clojure doesn't use the term 'atom' in that sense
00:05Chouserno, there's no vocab for that concept. non-collection object. :-)
00:12blbrownChouser, another small question. what is the 'else' clause for 'cond' (cond (= 1 2) 3 ... true (println "abc")?
00:13Chouser'true' works fine of course, but it's conventional to use ':else'
00:14blbrownbecause :else always evaluates to true anyway
00:14Chouserexactly
02:22hiredmanclojurebot: emacs?
02:22clojurebotemacs is hard, lets go shopping!
02:23metaperlhow do you write unicode characters in clojure?
02:27hiredmanmetaperl: all characters in clojure are unicode
02:28metaperlhow would you get at one via hex?
02:28metaperlthe unicode char 1F18 for instance
02:29hiredman,(.codePointAt "?foo" 0)
02:29clojurebot9021
02:29hiredman,(char 9021)
02:29clojurebot\?
02:30metaperlthat's odd... my irc client has garbled text: (.codePointAt "GIBBERISH" 0)
02:30hiredman,(Integer/toHexString 9021)
02:30clojurebot"233d"
02:30hiredmanmetaperl: your irc client is not doing unicode then
02:30hiredmanyou should get a better one
02:30hiredman,(char 0233d)
02:30clojurebotEval-in-box threw an exception:Invalid number: 0233d
02:30hiredman,(char 0x233d)
02:30clojurebot\?
02:30hiredman:P
02:31hiredman,(char 0x1f18)
02:31clojurebot\?
02:32metaperlthanks for your help - http://github.com/metaperl/begin-clojure/blob/619eb489fb68839d2376d2cdf7375f2370d38494/1/unicode-chars.txt
02:33hiredmanyeah
02:33hiredmanthat is not the character I was playing with
02:33hiredmanthe character I was playing with is one of the APL symbols
02:33hiredmana circle with a vertical like through it
02:36lisppaste8metaperl pasted "How to create a string from a series of characters?" at http://paste.lisp.org/display/74908
02:37hiredmanstr
02:37hiredman,(str \a \b \c)
02:37clojurebot"abc"
02:38hiredmanbut clojure is all unicode, so you can just use unicode strings
02:39hiredman,(apply str (map char (range 100 150)))
02:39clojurebot"defghijklmnopqrstuvwxyz{|}~����������������������"
02:39hiredman,(apply str (map char (range 200 300)))
02:39clojurebot"��������������������������������������������������������????????????????????????????????????????????"
02:40hiredman,(char 0x2620)
02:40clojurebot\?
02:44metaperlmoving on to numbers... how would I print the decimal value of 01101 interpreted as oct and binary?
02:44hiredman,(Integer/parseInt "01101" 2)
02:44clojurebot13
02:45hiredmanhttp://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html <-- go nuts
02:46metaperlwell I need to create a lambda that takes a base and map over 2 and 8
02:46metaperl,'(2 8)
02:46clojurebot(2 8)
02:46metaperl,(map (fn [x] (+ 1 x)) '(2 8))
02:46clojurebot(3 9)
02:47metaperl,(map (fn [x] (Integer/parseInt "01101" x) '(2 8))
02:47clojurebotEval-in-box threw an exception:EOF while reading
02:47hiredmanuh
02:47metaperl,(map (fn [x] (Integer/parseInt "01101" x)) '(2 8))
02:47clojurebot(13 577)
02:48hiredmanread the javadoc for the parseInt method of Integer
02:48hiredmanI don't think it does what you think it does
02:49metaperlhttp://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
02:49metaperlI thought the 2 was a base
02:49hiredmanit is
02:49hiredman01101 is not in base 8
02:49jdzwell, why not?
02:49metaperloh its the method above
02:49hiredmanwell it could be
02:50hiredmanbut, I mean, come on
02:50jdz:)
02:50hiredmanso running parseInt with base 8 is islly
02:50metaperlhiredman: why?
02:51hiredmanbecause it isn't base 8
02:51metaperloh you mean there are more efficient ways to express that in octal
02:51hiredmanno
02:53jdzthe point is that the number 01101 looks like a binary, not octal
02:53metaperlHow do I put a newline in a string? (. javax.swing.JOptionPane (showMessageDialog nil "Hello World\newlineHi Mom"))
02:53hiredmanno
02:53hiredman\newline is the chracter literal for newline
02:53metaperlright that's a string
02:54metaperli mean my code
02:54metaperlhas a string
02:54jdzmetaperl: how about you read some tutorial on Java?
02:54hiredmanmetaperl: try it and see
02:55metaperl,(. System getProperty "line.separator")
02:55clojurebotjava.security.AccessControlException: access denied (java.util.PropertyPermission line.separator read)
02:58hiredmanthe current prefered style for static methods would be (System/getProperty "line.separator")
03:17Lau_of_DKGood morning gents
03:28boxbeatgood morning danskj�vel
03:39BigTom,(prn 07)
03:39clojurebot7
03:40BigTom,(prn 08)
03:40clojurebotEval-in-box threw an exception:Invalid number: 08
03:40BigTomThat messed me up for a few minutes
03:42Carkhum these are octal ?
03:42Chousukeyeah.
05:27zakwilsonI'm contemplating writing an IRC client in Clojure, mostly for my own entertainment. I'm looking for a library that abstracts away the details of communicating with the server - unfortunately, Google has 200000 hits for "java IRC library". Does anybody here have experience with any of them?
05:30karmazillazakwilson: nope, but the clojurebot source code on github might be a source of inspiration
05:31HolcxjoThe last.fm people had a post recently how they used IRC in their everyday life -- http://www.metabrew.com/article/how-we-use-irc-at-lastfm/ -- they use Java...
05:32HolcxjoPoints to http://github.com/RJ/irccat/tree/master
05:35Holcxjowhich in turn has a libs dir which has a conspicuous pircbot.jar file -- googling finds http://www.jibble.org/pircbot.php
05:36zakwilsonThanks guys.
05:51Lau_of_DKzakwilson: If you havent found something yet I can look up one I used a while ago
05:59zakwilsonLau_of_DK: pircbot is looking pretty attractive, but if you have something you were happy with, I'd like to see it.
06:16ayrnieuzakwilson, there's very little detail in communicating with the server.
06:18zakwilsonayrnieu: I know - I looked over the API. Still, I'm not sure there's any good reason to do that part myself.
06:18zakwilsonErr... not API. RFC.
06:26Lau_of_DKmetaperl: Did u figure it out re your last lisp paste?
07:53AWizzArdWhere again can I find the Clojure roadmap (,,to do list")?
07:56danlarkinclojurebot: todo?
07:56clojurebottodo is not what you think it is
07:57danlarkinclojurebot: todo list?
07:57clojurebottodo is not what you think it is
07:57danlarkingrrrr
07:58karmazillaclojurebot: what is todo?
07:58clojurebottodo is not what you think it is
07:58karmazillaclojurebot: what?
07:58clojurebotwhat is latest
08:00metaperlLau_of_DK: he had the installer on a different git branch... he may have changed it now
08:00metaperlyou have to do a git checkout after the git clone to get it
08:03AWizzArdrhickey: there is no ref?, agent? yet?
08:04AWizzArdI saw there is an atom? which corresponds closely to CLs ATOM.
08:04AWizzArdclojure.inspector/atom?
08:06ayrnieu,(map class [(ref nil) (agent nil) (atom nil)])
08:06clojurebot(clojure.lang.Ref clojure.lang.Agent clojure.lang.Atom)
08:06rhickeyAWizzArd: all these predicates are tiresome, just use instance?
08:06AWizzArdk
08:18cemerickrhickey: clojure.lang.Compile really needs a way to set *warn-on-reflection* -- would you accept a patch to it that set that var based on a system property?
08:20rhickeycemerick: sure
08:21rhickeythanks
08:30ayrnieuhuh. (defmacro yet? [sym] `(= `~sym '~sym)), (macroexpand '(yet? +)) => (clojure.core/= user/sym (quote +)) -- but it's the same way in CL.
08:31jdzwhat are you suprised by?
08:32jdzsurprised even
08:32ayrnieuI expected (clojure.core/= 'clojure.core/+ '+)
08:32ayrnieu,[`+ '+]
08:32clojurebot[clojure.core/+ +]
08:33jdzayrnieu: well, you have nested backquotes
08:33ayrnieuright. I expected them to nest.
08:33jdzand the do, in fact, nest
08:33jdz*they
08:34ayrnieusym does not interpolate into `(= `~sym '~sym))
08:36jdzyou sure you don't want `(= ~`~sym '~sym))?
08:37ayrnieu,(let [sym '+] `(= ~`~sym '~sym))
08:37clojurebot(clojure.core/= + (quote +))
08:38ayrnieuno, I don't want that. I want `(= xxx ~sym '~sym) to become (= xxx + '+) But ` doesn't nest, which surprised me.
08:43jdzso, isn't (let [sym '+] `(= ~sym '~sym)) what you want?
08:43jdz,(let [sym '+] `(= ~sym '~sym))
08:43clojurebot(clojure.core/= + (quote +))
08:44jdz(note that (quote +) *is* the same as '+)
08:44ayrnieuno.
08:44ayrnieulook.p
08:45ayrnieu,(let [x 1] `(xxx (yyy (bbb (zzz ~x) ~x) ~x ~x ~x)))
08:45clojurebot(sandbox/xxx (sandbox/yyy (sandbox/bbb (sandbox/zzz 1) 1) 1 1 1))
08:45ayrnieu,(let [x 1] `(xxx (yyy (bbb (zzz ~x) ''~x) ~x '~x '~x)))
08:45clojurebot(sandbox/xxx (sandbox/yyy (sandbox/bbb (sandbox/zzz 1) (quote (quote 1))) 1 (quote 1) (quote 1)))
08:46ayrnieuONLY ` CHANGES MEANING INSIDE `
08:46jdzi still don't understand what you want
08:46ayrnieuyou can change bbb to quote , or just type '(zzz ~x) instead, and x gets interpolated directly into the form.
08:46rhickey(resolve 'sym)
08:46ayrnieuI've told you: < ayrnieu> I expected (clojure.core/= 'clojure.core/+ '+)
08:47ayrnieuThe effect of (= `+ '+)
08:47ayrnieuthanks.
08:48rhickeyayrnieu: when would you expect (= `+ '+) to be true?
08:48rhickeyonly (= `+ 'clojure.core/+) is true
08:49rhickeythis is not CL
08:49rhickeywhere the reader would have put all read symbols in packages
08:50ayrnieuI hadn't thought as far as seeing that `some-undefined-thing resolved anyway to 'user/some-undefined-thing
08:50rhickeyayrnieu: right, you force the issue with syntaxy-quote, but resolve should let you write yet?
08:51ayrnieuyes. yet? is just `(resolve ~arg) :-)
08:51rhickeythere you go!
08:51ayrnieuwell, '~arg
08:52rhickeyyet? need not be a macro
08:52rhickey(def yet? resolve)
08:53rhickeyor is this for use outside of macros?
08:55ayrnieuI think just resolve is fine. /me &
09:00AWizzArd,`(list `(+ ~(* 10 5) 2))
09:00clojurebot(clojure.core/list (clojure.core/concat (clojure.core/list (quote clojure.core/+)) (clojure.core/list (clojure.core/* 10 5)) (clojure.core/list 2)))
09:00AWizzArdayrnieu: seems that ` nests.
09:04cemerickclojure.lang.Compile really should (at least optionally) take a list of clojure source roots, and just walk the dirs looking for libs to compile. The necessary ant gymnastics for getting a proper set of arguments into c.l.Compile right now are pretty painful (and probably fragile, in my current impl).
09:04cemerickI suppose there are edge cases where a simple directory walk would trip over files that don't define a separate lib...
09:04cemerick(or, edge cases for me :-) )
09:05rhickeycemerick: you can't presume file == lib
09:06cemerickrhickey: yeah, I know -- but in my world, I can blithely call such circumstances "edge cases"
09:06AWizzArdcemerick: can't Enclojure do that?
09:06cemerickHaving to manually enumerate each lib that should be compiled is not sustainable, though. Perhaps some header comment can be used to identify libs, or not-libs
09:07cemerickAWizzArd: Perhaps, but IMO, builds must be able to run in a headless environment
09:07cemerickheadless and automated, I should say
09:11bstephensonAWizzard: by default, enclojure enumerates all clj files under a projects source directory, converts the file names into the proper dot syntax that clojure compile expects, and sends each file separately as an arg to the java command that calls clojure's compile function.
09:13rhickeybstephenson: so it presumes file == lib, or does it look for ns declarations?
09:14bstephensonrhickey: right now, the default project build file for clojure projects does presume file == lib
09:18rhickeybstephenson: hmm..., so clojure core couldn't be a clojure project
09:23bstephensonrhickey: well, couldn't be buildwith the build file from a DEFAULT clojure project, which just compiles clojure files and java files and jars them up. There are changes to the build file that are sometimes needed for more complex projects, such as those that mix java and clojure code that call each other. I know all of our enclojure projects do NOT use the default build file that is created when you use NetBeans to create a new
09:24thickeyrhickey: is the ns declaration all that makes a file a lib, or is there some other defining characteristics? (sorry, not used to using the term "lib" here)
09:25bstephenson...to create a new clojure project.
09:26jayfieldsis there a way to get a list if all the functions defined in a namespace?
09:26AWizzArd,*ns*
09:26clojurebot#<Namespace sandbox>
09:26AWizzArd,(ns-map 'sandbox)
09:26clojurebot{sorted-map #'clojure.core/sorted-map, read-line #'clojure.core/read-line, re-pattern #'clojure.core/re-pattern, keyword? #'clojure.core/keyword?, val #'clojure.core/val, ProcessBuilder java.lang.ProcessBuilder, Enum java.lang.Enum, SuppressWarnings java.lang.SuppressWarnings, *compile-path* #'clojure.core/*compile-path*, max-key #'clojure.core/max-key, list* #'clojure.core/list*, ns-aliases #'clojure.core/ns-aliases, the
09:27jayfieldsthanks
09:28AWizzArdthis reminds me: I forgot how to check if an object x is a function object...
09:30bstephenson,(ns-publics 'sandbox)
09:30clojurebot{}
09:31rhickeythickey: I think that idiomatic use of ns would make it such that files containing ns declarations would be considered lib roots, subordinate files would use in-ns
09:35karmazillawhat kind of array is [B ?
09:36cemerickrhickey: if that's the operational definition, then we can definitely make c.l.Compile accept just the top-level src dirs. That'd make life a lot more pleasant for just about every use case, I think.
09:36rhickeykarmazilla: bute - see: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html#getName()
09:36rhickeybyte
09:37karmazillaty
09:38rhickeycemerick: you're advocating putting the ns-detecting code in Compile?
09:38cemerickrhickey: no, I presume it'd be useful elsewhere, but I think that's the most critical "user-facing" piece that needs that functionality at the moment
09:39rhickeycemerick: sorry, I didn't mean locating it there, just using that logic in Compile
09:40cemerickrhickey: yeah -- otherwise, every lib in every project has to be enumerated, or everyone needs to muck around with ant absurdity in order to produce a sane build process
09:40cemericksane == repeatable
09:41rhickeythe enclojure team might already have ns-detecting logic somewhere
09:42cemerickI'm sure they do. I'll bring it up later.
09:42rhickeyI'm even fine with saying the first non-comment form (i.e. the first object returned by read) must be an ns form
09:42rhickeywould be interested in use cases where it's not
09:46karmazillarhickey: where would that be checked?
09:47rhickeykarmazilla: we've been talking about build tools using it to identify a source file that is a lib compilation root
09:49karmazillaso it's only when figuring out whether some file is a lib or not
09:49rhickeykarmazilla: right
09:53walterscemerick: i have hopes that the Jigsaw project is going to have a sane module system integrated with the VM and language
10:17tei still dont understand what the hell is going on in clojure
10:20AWizzArdHow can I do (function? x) ?
10:20gnuvinceAWizzArd: (fn? x)
10:21AWizzArdthx
10:21Chousuke,(fn? :a)
10:21clojurebotfalse
10:21gnuvince,(fn? take)
10:21clojurebottrue
10:21gnuvinceifn? if you want something that works like a function to return true too.
10:21Chousukeso it doesn't check for IFn.
10:22rhickey,(ifn? :a)
10:22clojurebottrue
10:22beatboxanynone know if it is possible to write applications in mathematica or it is just prototyping and calculating?
10:23Chouser"ifn?" sounds funny in my head. Makes me smile.
10:23bitbckt"if'n y'all want, get 'er done!"
10:24gnuvinceI read it as "I Fun"
10:24gnuvinceAnd it makes me happy?
10:24gnuvinceBut then it returns false
10:24gnuvinceand I'm brought back to reality
10:24Chouserbitbckt: right, to which one might reply "if'n?"
10:24bitbckt=> false
10:25bitbckt(ifn? :english)
10:25bitbckt;-)
10:26gnuvince(def yall? every?)
10:26cooldude127oh god
10:26bitbckthaha
10:26mattreplheh
10:26gnuvince(yall? ifn? acoll)
10:26gnuvinceclj-redneck
10:27cooldude127ha
10:27mattreplbeatbox: it's possible to write apps in mathematica, but they look ugly. wouldn't do much more than interactive data visualization with it
10:28mattreplbeatbox: doh, sorry. I was thinking matlab, disregard...
10:28bitbcktand mattrepl tears us all back down to reality...
10:28cooldude127matlab sucks
10:29mattreplclojure + jfreechart + jME + JAMA is a nice replacement for matlab
10:29cooldude127but gatech is all about matlab, so :(
10:30ChouserDejcartes is a jfreechart wrapper for clojure that I've been meaning to look at.
10:34gnuvinceThe name hurts my jaw
10:35ChouserIt's not its fault that all the cool names like "textjure" are already taken.
10:36beatboxso basically suff like matlab, R, mathematica etc is for prototyping, noone writes real datamining or machine leaning applications in it?
10:36beatboxcould you do soemthing like the netflix prize in mathematica? i mean is it efficient, can it handle 17770*450000 sparse matrices?
10:46beatboxill put a 1000000$ bounty on the next person nameing something -jure
10:58danlarkinbeatbox: haha I'll double it
11:00brianh_beatbox: it's been a while, but in a past life i worked with engineers who used SAS for mining/analysis
11:09bstephensonGuess I will have to get rid of my clojure-based entertainment product: "It's Your Pleajure"
11:10noidi:D
11:10Chouseroh dear
11:23beatboxSAS?
11:33brianh_beatbox: http://www.sas.com/
11:34brianh_disclaimer! never used it myself though
11:35Chouserrhickey: would you accept a patch that changes Var to implement Named? They do have names, after all.
11:41cgrand1chouser: local vars don't have names, no?
11:44Chouserright, they have .ns and .sym fields still, but both are nil
11:45Chouserbut I suppose the with-local-vars macro could give them a .sym and leave the .ns nil
11:45Chousera nil namespace isn't unusual for a Named thing
11:45Chouser,(namespace 'foo)
11:45clojurebotnil
11:55Carkhum i can't find a way to access some java enum ...
11:55Carkit's define like this : JXFrame.StartPosition
11:55Carkand i want to access the CenterScreen value
11:56Carkso i tried this : JXFrame$StartPosition/CenterInScreen
11:56Carkand all variations
11:56Carkbut none is working
11:58ChouserCark: you have a javadoc or .jar link for that class?
11:59Carkhttp://swinglabs.org/hudson/job/SwingX%20Continuous%20Build/javadoc/org/jdesktop/swingx/JXFrame.StartPosition.html
12:00Carkthat's the first time i try accessing a java enum
12:01Chouser,(prn java.lang.Thread$State/BLOCKED
12:01clojurebotEval-in-box threw an exception:EOF while reading
12:01Chouser,(prn java.lang.Thread$State/BLOCKED)
12:01clojurebot#<State BLOCKED>
12:01ChouserThat seems to work. Did you import the JXFrame$StartPosition class?
12:02Carkright your example seems to work =/
12:02Carkahh let me try that
12:03Carkthat was it !
12:03Carkthanks again chouser
12:04Carki guess without the import, i needed to fully qualify the name
12:04Carkthough JXFrame was imported
12:04Chouserright. the nested classes are really completely different classes than their container class
12:04Chouseror whatever the right word is
12:05Carkgood to know =)
12:06StartsWithKhow could i turn {:a {:b 1} :c {:d 2 :e 3}}} into ((:a :b) 1 (:c :d) 2 (:c :e) 3), it there function for something like this already?
12:09Chouserseems unlikely that there'd be one built in
12:10Chouserlooks fun though
12:11kefkaI have a question about transactions/dosync: does dosync put a lock on state it alters?
12:12kefkaerr, let me phrase that more intelligently:
12:13kefkaIf I (dosync (alter *ref* fun)) and *ref* changes during the transaction, is there any risk of *ref* holding fun of the old value?
12:13ChouserStartsWithK: (apply concat (for [[k1 m] mm [k2 v] m] [(list k1 k2) v]))
12:13Chouserkefka: no
12:14kefkaChouser: Thanks. Btw, did you see you made Hacker News?
12:14Chouserkefka: if something else changed *ref* between when fun ran and when the transaction commits, the transaction will be retried.
12:15durka42Chouser: that only works for two level deep, doesn't it?
12:15Chouserkefka: nope, hadn't seen that.
12:15kefkaChouser: Cool. That's how I assumed transactions worked. Just making sure because concurrency is a weak area for me.
12:15kefkaChouser: http://news.ycombinator.com/item?id=466341
12:15StartsWithKChouser: it gives me "Don't know how to create ISeq from: Integer", but thanks for a start, i'll poke at it later
12:16StartsWithKdidn't know you can do that little trick you did with 'm' in for
12:17ChouserStartsWithK: yep, true nested loops.
12:21StartsWithKChouser: I can see the problem, [k2 v] can't be destructed for leaf nodes, so thans for this
12:21StartsWithKeveryhing can be implemented as one-liner in clojure :)
12:21Chouserthat why I like it!
12:21Chouserok, maybe not the only reason.
12:22ozy`,[defn 'no 'u]
12:22clojurebotjava.lang.Exception: Can't take value of a macro: #'clojure.core/defn
12:27LordOfTheNoobsclojurebot: ,(let [v {:a {:b 1} :c {:d 2 :e 3}}] (apply concat (for [k (keys v) v (v k)] (list (list k (first v)) (frest v)))))
12:27clojurebotfor is not a loop
12:28Chouserhehe
12:36ChouserLordOfTheNoobs: looks good, though. Have you done much with destructuring?
12:47stuhood,(new Long 1)
12:47clojurebotjava.lang.IllegalArgumentException: No matching ctor found for class java.lang.Long
12:47stuhoodthat is really annoying =/
12:47stuhoodis the only way to get a long via coercion?
12:48Chousukehmm :/
12:48Chousuke,(long 1)
12:48clojurebot1
12:48Chousuke,(class (long 1))
12:48clojurebotjava.lang.Long
12:48Chouser,(new Long (long 1))
12:48clojurebot1
12:48Chouser:-P
12:49Chousuke,(Long. (int 1))
12:49clojurebotjava.lang.IllegalArgumentException: No matching ctor found for class java.lang.Long
12:49stuhoodisn't it going from Int -> Long -> Long in that one?
12:49Chousukeheh.
12:49Chousuke,(class 1)
12:49clojurebotjava.lang.Integer
12:50stuhoodin Java, passing an integer to a function that expects a long is kosher... it probably should be here as well
12:54Chousukeexcept those aren't integers or longs, they're Integers and Longs :)
12:54stuhoodtrue... i think we still need a solution though
12:55waltersstuhood: actually you can't do that in Java either
12:55waltersstuhood: int can get auto-promoted to long, OR auto-boxed to Integer, but not int->long->Long
12:56waltersnow if you're taking the reflection hit there's no reason not to do the conversion
12:56stuhoodwalters: that chain of conversions i showed was for this code: (new Long (long 1))
12:57waltersstuhood: oh i see, yeah Long takes a long arg; yeah Clojure should probably have similar upcasting conversions as java
13:00ChouserI wish 'keyword' could take a symbol and not just a string
13:04Carkhum how would i cast a [Ljava.lang.Object array to some other type of array ?
13:04Carki thought it wasn't necessary
13:07ChouserI've never tried to do that. You need it to be an array of a different type for a java method call?
13:08Carkyes
13:08ChouserDid you build the array?
13:08Carkyes i have indeed a [Ljava.lang.Object array
13:08Carklooks like we might need a to-typed-array function somewhere
13:09Chouser,(into-array [1 2 3])
13:09clojurebot#<Integer[] [Ljava.lang.Integer;@1cbf6bb>
13:09Chouser,(into-array Long [1 2 3])
13:09clojurebotjava.lang.IllegalArgumentException: array element type mismatch
13:09Carkright but what if you need a [Lorg.jdesktop.swingx.painter.Painter array =P
13:09Chouser,(into-array (map long [1 2 3]))
13:09clojurebot#<Long[] [Ljava.lang.Long;@287ca7>
13:10Cark(doc to-array)
13:10clojurebotReturns an array of Objects containing the contents of coll, which can be any Collection. Maps to java.util.Collection.toArray().; arglists ([coll])
13:10Cark(doc into-array)
13:10clojurebotReturns an array with components set to the values in aseq. The array's component type is type if provided, or the type of the first value in aseq if present, or Object. All values in aseq must be compatible with the component type. Class objects for the primitive types can be obtained using, e.g., Integer/TYPE.; arglists ([aseq] [type aseq])
13:10Carkallright this should make it
13:11Carkyes it does, thanks !
13:19boxbeatdo you think clojure code looks aesthetic?
13:20technomancyheh; nice quit message there, walters.
13:20technomancyboxbeat: depends on who writes it. =)
13:21technomancystuff that interacts with Java a lot is often not as pretty as pure lisp clojure
13:21gnuvinceboxbeat: depends if it's written like Lisp code ought to be written or if it's written like somebody who using using it as a dynamic Java with parens
13:22jayfieldsIn the closure.contrib.test-is documentation it says: You can plug in your own test-reporting framework by rebinding the "report" function: (report event msg expected actual). How do I rebind a function?
13:23Chousukeprobably through (binding [report yourfn] ...)
13:23Chousukewith all the test-is calling inside that form.
13:23jayfieldscool. thanks.
13:24Chousukeboxbeat: I think idiomatic clojure code looks better than common lisp :)
13:25technomancyheh; well CL was designed back before they realized you could put question marks in your function names
13:25technomancyor vowels, for that matter
13:25Chousukeeven the java interop can look okay if it's done properly.
13:25Chousuketechnomancy: mostly I like how clojure uses non-parentheses very elegantly in the syntax.
13:25Chouseryes, though I think that depends more on the Java library API in question than on Clojure.
13:27Chousukeclojure often avoids the situation where you have two opening parentheses, like in common lisp (let ((foo bar))) which I think just looks ugly.
13:28Chouserwhen you see that in Clojure it almost always means you're actually getting a function and then calling it.
13:29Chousukethough destructuring in vectors often leads to [[foo bar]], that's somehow less offensive... I guess it's because in a vector the head position is not special.
13:32ChousukeChouser: I prefer avoiding that though. somehow I feel it's clearer to use let first and call a named function, even if it's temporary :)
13:38technomancyChousuke: I often do that to figure out what I'm doing, then inline it once I've got it working.
13:38Chousukewhy not just leave it in as documentation though? :/
13:39technomancyI usually find it easier to read, just not easy to write.
13:39technomancywhich is weird
13:40technomancywhen I see let, it often acts as a signal for "this variable is going to be used in more than one place"
13:41jbondesoni'm a big fan of using a let for local functions, even if only used once.
13:44Chouserbut then it takes two lines. :-(
13:44jbondesonyes, but it can make your code substantially more readable
13:44Chouseryes, but TWO LINES!
13:44jbondesonheh
13:45Chousersorry
13:46durka42http://news.ycombinator.com/item?id=467155
13:47durka42he threw clojure onto a mono jvm and it worked... cool
13:55technomancymono kinda reminds me of http://en.wikipedia.org/wiki/Harmony_toolkit
13:56technomancygreat idea, back before the JVM was freed. but today... what's the point again?
13:57stuhoodcompetition is good! (see recent javascript developments)
14:11gnuvinceDoes this seem like a decent solution to the matching brackets problem? http://gist.github.com/58924
14:11gnuvince(Clojure style speaking)
14:14kotarakJust out of curiosity: do people really write a lot of macros defining macros? I wrote a bit of Clojure code, but I'm yet to see the need for a macro defined by a macro....
14:15ChousukeI don't think I've done that.
14:15rhickeygnuvince: opening/closing-brackets should be sets
14:15Chousukein fact the only macro defining macro I can think of right now is defmacro :P
14:16rhickeygnuvince: then you could use like predicate (cond (opening-bracket x) ...)
14:17kotarakChousuke: ok, that a use case. :)
14:17danlarkinclojurebot: max people
14:17clojurebotmax people is 145
14:17gnuvincerhickey: but I'd need to replicate the brackets for my hash-map, because I cannot assume the order of the sets will be preserved, right?
14:19rhickeygnuvince: you could build the sets and the map from the strings, but the some linear lookup code is not good
14:19gnuvinceok
14:22rhickey,(zipmap "({[<" ")}]>")
14:22clojurebot{\< \>, \[ \], \{ \}, \( \)}
14:22rhickey,(set (keys *))
14:22clojurebotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: core$_STAR___3192
14:23Chousukeit's not that smart :)
14:23rhickey,(set (keys *2))
14:23clojurebotjava.lang.IllegalStateException: Var clojure.core/*2 is unbound.
14:23rhickeyhrm
14:23kotaraksorted-set works also
14:23rhickeygnuvince: anyway, zipmap
14:23gnuvince(doc zipmap)
14:23clojurebotReturns a map with the keys mapped to the corresponding vals.; arglists ([keys vals])
14:23gnuvincecool
14:29gnuvincehttp://gist.github.com/58942
14:45lisppaste8rhickey pasted "more idiomatic check-brackets" at http://paste.lisp.org/display/74934
14:46rhickeygnuvince: oh, I didn't see you later paste
14:47gnuvinceNo problem
14:47gnuvincerhickey: nice code; I always forget the (and ...) idiom.
14:54ChouserI think my first contributions to a free software project were to Harmony.
14:58sethtrainhttp://www.faa.gov/data_statistics/accident_incident/1549/media/N90%20AWE1546%201-15-09%20L116.mp3
14:58sethtrainsorry guys, wrong window
14:58cp2that mp3 is illegally shared
14:59cp2the riaa will be at your doorstep in a matter of hours
15:09Chouserhm, when-first but no if-first.
15:10ayrnieu(if-let [x (first xs)] ...)
15:11Chouseror even (if-let [[x] xs] ...) I suppose
15:12Chouseroh, those are slightly different, and both different from when-let
15:13Chouserayrnieu: yours tests the value of x, not xs
15:13Chousermy if-let tests the value of xs
15:13Chouserwhen-first test (seq xs)
15:47RaynesIs paste.lisp.org down? :| I'm getting a 502.
15:48durka42lisppaste8: url?
15:48lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
15:48durka42ya, proxy error
15:48ayrnieuReason: Document contains no data
15:48hiredmanain't that the truth
15:49durka42back up
15:50durka42that was quick
15:54hiredman,(int H)
15:54clojurebotjava.lang.Exception: Unable to resolve symbol: H in this context
15:54hiredman,(int \H)
15:54clojurebot72
15:54hiredman,(int \Z)
15:54clojurebot90
15:54hiredman,(char (/ (- 90 72) 2))
15:54clojurebot\tab
15:54hiredman,(int \A)
15:54clojurebot65
15:55hiredman,(char (+ (/ (- 90 72) 2) 72))
15:55clojurebot\Q
16:15lisppaste8jkantz pasted "untitled" at http://paste.lisp.org/display/74938
16:16jkantznested maps: is there some cool short cut for merging cookies into the :cookie-jar
16:17hiredman(doc update-in)
16:17clojurebot'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure. If any levels do not exist, hash-maps will be created.; arglists ([m [k & ks] f & args])
16:19jkantznice!
16:20kotarakjkantz: also assoc-in and get-in
16:24lisppaste8jkantz annotated #74938 with "untitled" at http://paste.lisp.org/display/74938#1
16:24ayrnieu(update-in places [:kitchen :cupboard :cookie-jar] conj 'cookies)
17:14cemerickI'm seeing a ClassName__init.class file and a bunch of related inner classes (one for each fn, I think), but I'm not seeing a ClassName.class file. Any thoughts?
17:15cemerickthis, after compiling, of course.
17:16Chouseryou only get that if you ask for it. Via :gen-class, I think.
17:17cemerickChouser: yeah -- this is actually in conjunction with an explicit gen-class (separate from the ns form)
17:20Chouserhmph
17:20hiredmanhuh
17:20hiredmanmy explicit gen-class stuff does generate a .class file named after the class
17:21cemerickhiredman: yeah, that's what I'm expecting
17:21kotarakIsn't ClassName.class for the namespace file? So if you have it separate from the ns, there is none?
17:21hiredmanhmmm
17:21hiredmanactually
17:22cemerickkotarak: you're right, putting a gen-class in the ns produces the ClassName.class file
17:22cemerickwell, that's no good :-/
17:23cemerickhiredman: can you verify what you're seeing there?
17:25hiredmancemerick: working on it
17:25cemerickhiredman: great, thanks
17:25cemerickgotta run for a bit -- hopefully, I'll catch the brilliant solution in the log ;-) thanks, all
17:28hiredmanhttp://gist.github.com/34229 <-- this is the gen-class deal I am testing with
17:29hiredmanwhen I compile hiredman.beans I get a wsbean.class file in ./classes/hiredman/
17:47hiredman,(char (- 9432 10))
17:47clojurebot\(Y)
17:48kotarakhiredman: you are right. I also get the ClassName.class file, but in a subdirectory according to the qualified name of the class.
17:48kotarakSo it isn't necessarily in the same directory as the .class files for the implementing functions.
17:49hiredmanyeah
17:49hiredmanclass files go in the classpath of the namespace the entity they represent is in
17:54ozy`,[def]
17:54clojurebotjava.lang.Exception: Unable to resolve symbol: def in this context
17:54ozy`huh
17:54hiredmandef is a special form
17:54ozy`yes
17:55ozy`I'm playing around with an interpreter and trying to decide if it should differentiate between special forms and macros
17:55ozy`it currently doesn't
18:24jayfieldswhat's the easiest way to 'use' all the namespaces in a parent namespace? For example if I have tests.test-one and tests.test-two can I load them both via (use [tests])
18:26hiredman(ns foo.bar (:user (tests test-one test-two)))
18:27hiredmanI do not believe use ever takes a vector
18:27jayfieldsis there a dynamic way to just use all of the children of tests?
18:27hiredmannope
18:28technomancyjayfields: if they've been required, there could be one, but if not then you'd have to inspect the filesystem or something.
18:28technomancywhich is lame
18:28kotarakhiredman: use may take a vector, eg. for :only
18:29technomancybut seems pretty reasonable
18:29hiredmankotarak: ok
18:41tmiHi.. trying to use compojure - Don't know how to create ISeq from: Symbol - http://pastebin.com/d262a54d ... should be latest svn/git version of all.
18:43ayrnieu... and your hello.clj ?
18:43tmihttp://pastebin.com/d64615397
18:49Raynestmi: paste.lisp.org/list/clojure and paste.pocoo.org are better choices for Clojure ;)
18:50Chousuketmi: your namespace name doesn't match your filename, but that's probably not the main problem :/
18:50tmiRaynes: details, details. :P I'll try to remember next time. Put it in subject?
18:50ayrnieuIn any case, I also get ExceptionInInitializer as soon as I (use 'compojure)
18:51hiredmanyou need to look lower down the stack
18:51hiredmanor higher
18:51hiredmanor which ever
18:52hiredmantmi: is your clojure up to date?
18:52ayrnieuit fails even when you use the supplied clojure.jar
18:52tmihiredman: yes. Revision: 1162
18:53hiredmanayrnieu: oh
18:53tmiayrnieu: it worked with the supplied one for me.
18:53ayrnieutmi - the latest is 1251
18:53hiredmansounds like time to hit up the compojure google group
18:53hiredmanclojurebot: latest?
18:53clojurebotlatest is 1250
18:53hiredmanhmmm
18:53hiredmanyeah
18:53tmiayrnieu: gah. that might explain.
18:53ayrnieuhm, maybe -cp doesn't defeat CLASSPATH
18:53hiredmanclojurebot's task runner died
18:54Raynes,(doc +)
18:54clojurebot"([] [x] [x y] [x y & more]); Returns the sums of nums. (+) should never be used."
18:54Raynes:D
18:55Chousukeinteresting remark
18:55Chousuke,(+) ;muhahha
18:55clojurebot0
18:55ayrnieutwo days ago: <ayrnieu> ,(.setMeta #'+ (assoc (meta #'+) :doc "Returns the sums of nums. (+) should never be used."))
18:56ChousukeI see.
18:56ayrnieu(want to improve the documentation? Distribute an improved-doc.clj !)
18:56tmihmm, why does SF say 1162 then? and my "svn update -r HEAD" says 1162. https://clojure.svn.sourceforge.net/svnroot/clojure/trunk *confused*
18:57RaynesGoogle Code bro.
18:57Chousuke(doc reset-meta!)
18:57clojurebotAtomically resets the metadata for a namespace/var/ref/agent/atom; arglists ([iref metadata-map])
18:57Chousukeor alter-meta! I guess.
18:57Chousuketmi: clojure moved to google code a long time ago :)
18:58RaynesLong long ago.
18:58RaynesAt least 100 years ago.
18:58ayrnieu,(- 1251 1162) ;; ago
18:58clojurebot89
18:58tmican't be _that_ long ago... but sure, then I'm unconfused again. thanks.
18:59tmibesides, if I google "clojure svn" SF is still the top hit :-(
19:00ayrnieuclojure.org has a prominent 'SVN'
19:00Chousukethe move happened 16th of december it seems
19:01RaynesIf XChat freezes one more time...
19:01ayrnieuyou'll write an IRC client?
19:01RaynesYes.
19:01hiredmanyou'll get a real client?
19:02Rayneshiredman: I'm trying out XChat for a friend. Great client, besides the constant freezin g.
19:02Raynesfreezing*
19:02clojurebotsvn rev 1251; [lazy] removed loop from distinct
19:02Rayneskotarak: You probably aren't on Windows vista either.
19:03RaynesI wouldn't use irssi if it was the only client in existence.
19:03kotarakNo. Used xchat on Linux, no colloquy on mac
19:03Chousukeit could just as well be, since it's perfect!
19:03kotaraks/no/now
19:03ChousukeIt's not built on lisp though
19:03Chousukebut that doesn't matter as there are no missing features.
19:04RayneskvIRC is a nice client for windows. Just too colorful.
19:04ayrnieuyeah, a day is plenty of time to write an IRC client.
19:05Chousukecolloquy is a passable client.
19:05Chousukeafter a bit of tweaking, anyway
19:06Chousukewith the defaults I can't stand it.
19:06ayrnieuit defiantly spreads error.
19:06Arienslimechat is better
19:06cp2i prefer irssi, but im on windows so i am using the dreadfully lame mirc
19:06cp2nnscript makes it a lot better :)
19:06Chousukebut there's still nothing that rivals irssi.
19:07ayrnieuirssi has acceptable defaults.
19:07tmiyay, now it works. thanks all for your help. now I can go play some more.
19:07cp2,(doc dotimes)
19:07clojurebot"([bindings & body]); bindings => name n Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-1."
19:07ayrnieutmi - what did you do?
19:07tmiayrnieu: did a fresh checkout from the right svn servers ;-)
19:09ayrnieuhmph. That doesn't help me, but I wasn't doing anything with compojure anyway.
19:10tmi:/
19:16cp2is there a way to generate a keyword from a string?
19:16cp2as in
19:16cp2"foo" would result in :foo
19:16hiredman,(doc keyword)
19:16clojurebot"([name] [ns name]); Returns a Keyword with the given namespace and name. Do not use : in the keyword strings, it will be added automatically."
19:16ayrnieu,(keyword (symbol "foo"))
19:16clojurebotjava.lang.ClassCastException: clojure.lang.Symbol cannot be cast to java.lang.String
19:16ayrnieuor just that.
19:16cp2i see
19:17cp2thanks
19:17hiredman,((comp keyword name) (symbol "foo"))
19:17clojurebot:foo
19:17cp2i suppose i should get more acquainted with the api page
19:18ayrnieuor use find-doc , or you write your own: the first thing I did was throw together a http://paste.lisp.org/display/74207
19:19cp2heh, i still prefer http://clojure.org/api
19:19cp2for the moment, at least
19:44hiredmanclojurebot: latest?
19:44clojurebotlatest is 1251
19:45hiredmansvn rev 1251
19:45clojurebotsvn rev 1251; [lazy] removed loop from distinct
19:45clojurebotsvn rev 1251; [lazy] removed loop from distinct
19:45hiredmanhmm
19:45clojurebotsvn rev 1251; [lazy] removed loop from distinct
19:45clojurebotsvn rev 1251; [lazy] removed loop from distinct
19:45hiredmanthat is not good
19:46hiredmansvn rev 1251
19:46clojurebotsvn rev 1251; [lazy] removed loop from distinct
19:46clojurebotsvn rev 1251; [lazy] removed loop from distinct
19:47hiredmansvn rev 1235
19:47clojurebotsvn rev 1235; added pcalls, pvalues
19:50Raynesclojurebot: earliest?
19:50clojurebotGabh mo leithsc�al?
19:50Raynes;o
19:51ayrnieu,(-> 1235 range sort first)
19:51clojurebot0
19:52hiredmanNice
19:55ayrnieuc.f. http://xahlee.org/UnixResource_dir/writ/lisp_problems_by_ruby.html
19:58hiredmanI started working on a fn that would take something like (a b (c d)) and turn it into a block of (comp (partial a b) c)
19:59technomancyheh; xah lee.
19:59hiredmanI forget why I stopped
20:00ayrnieutechnomancy - he's better than the assholes who take him for a troll, but this isn't a shining post from him.
20:00hiredmanclojurebot: the doctor?
20:00clojurebotNo entiendo
20:00hiredmanclojurebot: the doctor is out
20:00clojurebotAlles klar
20:01technomancyayrnieu: he was definitely a troll when he frequented the #emacs channel but luckily I haven't heard from him since '05 or so; he could have reformed his ways since then
20:02ayrnieutechnomancy - no, he definitely was not a troll; #emacs just went bat fucking insane, all on their own, all in *anticipation* of trolling.
20:03technomancyyou can't use the word "fuckfaces" without provocation twice in the same sentence without being a troll.
20:03technomancyit doesn't work like that.
20:04ayrnieuI feel dirty even for using this worthless terminology. Xah Lee's kind of a dork, but the people who react to him are contemptible.
20:05ayrnieubut the point is, clojure cuts through some of the initial counter-arguments that someone would make to "what? Just use ->"
20:14cemerickhiredman, Chouser: found the cause of my gen-class-not-generating-classfile issue -- I omitted a tilde ahead of the value for the :name in the gen-class spec, so the name was being given as com.snowtide.clojure.utils/fq-classname. Doh! :-|
20:17cemerickrhickey: that particular *oops* was all my fault, but maybe the gen-class machinery should complain loudly when an invalid classname is provided (or, a classname that clojure doesn't know how to normalize). The slash in the name above was actually having the effect of generating a fq_classname.class file in the com/snowtide/clojure/utils dir.
20:24rhickeycemerick: I guess it shouldn't be normalizing, otherwise that behavior would be correct
20:25cemerickwell, I was just talking about the dash-to-underscore translation, and whatever other transformations that are done to the classname
20:28rhickeycemerick: do you want munging or not? Because foo_bar is a valid classname
20:29rhickeyI guess I'm not understanding
20:30rhickeyor you want foo/bar-baz flagged as bad classname due to / ?
20:34cemericksorry, yes, the slash is the problematic thing here, just because I think it's indicative of a maybe-semi-common programming error
21:34ChouserI want thread-local storage, but I don't want nested scopes to stack.
21:34ChouserIs there something like binding-once
21:34Chouser?
21:35schoppenhauer!
21:38ChouserThreadLocal will do, I think.
21:40Raynes,(meta #'str)
21:40clojurebot{:ns #<Namespace clojure.core>, :name str, :file "core.clj", :line 313, :arglists ([] [x] [x & ys]), :tag java.lang.String, :doc "With no args, returns the empty string. With one arg x, returns\n x.toString(). (str nil) returns the empty string. With more than\n one arg, returns the concatenation of the str values of the args."}
21:41ayrnieuChouser, what would binding-once do?
21:42Chouserayrnieu: establish a thread-local binding if this thread didn't have one yet
21:43Chouserthis would allow 'set!' to communicate up the call stack through multiple binding-once blocks, instead of stopping at the nearest enclosing 'binding' block.
21:43Chouserbut I'm not sure it would be any better than using the ThreadLocal class directly. That's what I'm trying now.
22:58dreishAnyone know a good way to make a library redefine a function (or in this case macro) in clojure.core?
23:00dreishI'd like to be able to (use 'util) or (:use util) and get my redefined version of ->
23:01arohnerdreish: you can use binding, but that's scope local
23:01dreishRight, not really what I'm looking for.
23:02Chouseryou can say (ns mylib (:refer-clojure :exclude (->)) (:use util))
23:02dreishI thought ns-unmap would do it, but it needs an ns arg, and what I really want is the ns of the namespace importing me.
23:02dreishChouser: That's maybe not the worst thing, if it works. I was hoping for something I could put inside util, rather than forcing users to do something ugly.
23:03dreishArguably it should be explicit if you're redeffing stuff from core, but my -> is essentially backward-compatible.
23:04arohneryou can also do (in-ns 'clojure.core) (defn -> [] ...), but I didn't show you that
23:04Chouserheh
23:04dreishAh, that's what I wanted. Thanks.
23:05ayrnieu(.doReset (var ->) (fn [& rst] (println rst))) (-> 1 2 3) => printed: (1 2 3)
23:05Chouserthat changes it for everyone
23:05dreishYeah, but everyone is just me.
23:05dreishAnd like I said, it's backward-compatible. It just adds usages that formerly would do nothing but die.
23:06ayrnieuwhat does it add?
23:06dreish#() fns without an extra set of parens, and maybe a little more dangerously, _ as a special symbol meaning "insert previous form here".
23:07ayrnieuuse (.setMacro (var ->)) after you .doReset
23:07dreishI.e., (-> 2 (+ 2) (/ 3 _))
23:07Chousermm, yeah, I've had that _ feature before.
23:08dreishuser=> (map #(-> % name seq drop-last (apply str _) symbol) #{'AddObject. 'AskInv. 'Blob.})
23:08dreish(Blob AddObject AskInv)
23:08stimuliIt could make your library break some else's lib if everyone starts doing it
23:08dreishMeh, I'll deal with it when it happns.
23:08arohneris there already a macro for (when (not (nil? foo)) foo) ?
23:08arohnerI find myself writing that often
23:09stimulithat's what the ruby guys said ... look at the mess they now have
23:09dreishstimuli: True, nobody has ever done anything useful with ruby. :-P
23:09Chouserarohner: (when foo foo)
23:09stimuli:)
23:09stimuliwhy not just call it --> or something ?
23:09arohnerChouser: yeah, but that depends on false == nil
23:09dreishThat's probably how I'll deal with it.
23:10stimulior fred
23:10arohnerI'm not a huge fan of that
23:10Chouseroh
23:10ayrnieu(defmacro unless (test & body) `(when (not ~test) ~@body))
23:10Chouserthat's never gonna change. Clojure's going to keep nil meaning false forever.
23:11dreishLispers have been arguing about (if (not (nil? x))) for decades.
23:11ayrnieuof course that should be [test & body]
23:11stimuliso a couple of my coworker who are "java only" sort of guys want to learn Clojure
23:12stimulibut I have no idea how they could learn it now give the available resources
23:12arohnerI'm not expecting it to change, but I have situations in my code where they are not the same
23:12arohnerstimuli: how did all of us learn it?
23:12dreishProgramming Clojure.
23:12stimulihow much of that is done now ?
23:12dreishAll but some typos.
23:12stimuliwell ... I knew CL .. they don't
23:12ayrnieustimuli - it's pretty helpful for Java. I used (filter #(.contains (val %) "32") (System/getProperties)) to answer a ##java question earlier.
23:13arohneryeah, I keep telling people clojure is a better java than java
23:13stimuliindeed
23:13arohnerand Chouser's cool class introspection fns
23:14stimuliI think I'll buy learning clojure then
23:15stimuliI had thought only a couple chapters were done
23:16dreishI think it's close to printing. They cut one chapter, and now there are none that say "this chapter is not yet written".
23:16stimulicool
23:16stimulihow would you rate it as a book ?
23:17dreishI thought it was perfect as a rapid introduction to the language.
23:17stimulido you think it will work for the "I only know Java and C#" guys ?
23:18dreishSome of the stuff about getting set up with the environment I remember not liking, but I'm sure everything's changed a few times since I read it.
23:18Chouserstimuli: that's one of the key audiences
23:18stimulithat will change as teh eclipse and netbeans stuff matures
23:18stimulinot everyone will use emacs :)
23:19stimuliand I'm sure if I suggested to someone to install "slime" they'd look at me funny
23:19arohnerfor shame
23:19hiredmanclojurebot: slime?
23:19clojurebotslime is icky
23:19stimulislime is an emacs-lisp thingy
23:19arohnerI really wish slime would become the defacto standard for clojure IDEs. static analysis of a dynamic language seems misguided at best
23:19stimuliwith a debugger and stuff
23:19hiredmanI am well aware
23:20stimuliwell .. yeah
23:20hiredmangiven that #clojure turns into #emacs for a few hours a day
23:20LordOfTheNoobsstimuli: hiredman just likes playing with clojurebot
23:20hiredmanit's actually kind of a drag
23:20stimulidude ... if clojure on eclipse gets people to try it I'll sign on
23:21hiredmanclojurebot: emacs?
23:21clojurebot"Learning Emacs and SLIME was just about the most painful computer experience I've ever been through."
23:21c|plol
23:21stimulipoor poor clojurebot
23:21arohnerI don't have a problem with them using eclipse, I just want them to use slime for the introspection/debugging stuff
23:21hiredmanthat one comes up way too often
23:21hiredmanI really like "emacs is hard, lets go shopping!"
23:21stimuliI'm using one of the not-quite-slime emacs modes I d/l'ed
23:22stimuli(don't ask me which one)
23:23hiredmanugh
23:23hiredmanmy poor poor network
23:23hiredmanso much lag
23:25RaynesI use the netbeans plugin myself. I think it's fine. It's buggy as hell, but it works.
23:26RaynesI use enclojure for Clojure and emacs for everything else.
23:56hiredmanclojurebot: ping?
23:56clojurebotPONG!
23:56hiredmanclojurebot: how much do you know?
23:56clojurebotI know 192 things
23:56Cark~ping ?
23:56clojurebotPONG!
23:57Carkhe's not that smart !
23:57Carkhow about the whole doc thing
23:57ayrnieuhe doesn't even get confused by considering that "I know 192 things" is also something he knows.
23:57Carkthat should boost his knowledge a little bit
23:58hiredmansvn rev 1155
23:58hiredmanclojurebot: well?
23:58clojurebotNo entiendo
23:59hiredmansvn rev 1251
23:59hiredmanoh