#clojure log - Jul 18 2009

The Joy of Clojure
Main Clojure site
Google Group
IRC
List of all logged dates

0:27 Jomyoot: Anyone using Cocoa Emacs 23?

0:28 slaney: not I

0:28 I am using emacs 23

0:29 but not on OSX

0:30 Jomyoot: (set-default-font "-apple-Akkurat-Mono-medium--14-*-*-*-*-*-*-*") is not doing a thing for me :(

0:31 no error either

0:31 rottcodd: ksclarke: don't use the svn repo, clojure has moved to git http://groups.google.com/group/clojure/msg/ca4fb58428052554

0:31 ksclarke: ah thanks

0:34 duck1123: Rich really needs to empty out the old repositories

0:58 Chouser: hmph. log's still not up. hopefully tomorrow...

1:43 duncanm: la la la

1:49 Lau_of_DK: Top of the morning gents

3:46 Jomyoot: how would I collect result of dotimes into a list

3:46 seq

3:46 cark: you wouldn't

3:47 dotimes is for side effects

3:47 Jomyoot: what would be the way then?

3:48 I want to iterate over ArrayList

3:48 and collect results into a seq

3:48 cark: (seq my-array-list) ?

3:48 or map over it

3:48 or reduce over it

3:50 Jomyoot: do I have to dorun also if over the map as well if I want nonlazy?

3:51 cark: mhh i'm not quite sure ...let's give it a try

3:51 ,(type (seq (doto (new java.util.ArrayList) (.add :a))))

3:51 clojurebot: clojure.lang.IteratorSeq

3:52 cark: I think the sequence is not concrete until you do the dorun

3:52 or doall actually

3:52 that is : the values could be changed

3:52 in the array list

3:53 i'm not making sense, i need coffee =)

5:06 mariorz: how can i get a character unicode code?

5:06 character's

5:07 like an inverse char

5:11 something like python's ord

5:12 hiredman: ,(set (map #(.getName %) (.getMethods Character)))

5:12 clojurebot: #{"compareTo" "codePointBefore" "isISOControl" "toChars" "getClass" "isDigit" "forDigit" "isUnicodeIdentifierStart" "isWhitespace" "isLowerCase" "isSurrogatePair" "isUpperCase" "isJavaIdentifierPart" "valueOf" "toCodePoint" "isMirrored" "reverseBytes" "notify" "isHighSurrogate" "toString" "codePointCount" "isJavaIdentifierStart" "digit" "toTitleCase" "isLowSurrogate" "isUnicodeIdentifierPart" "isLetter" "getType" "isValid

5:12 hiredman: ,(Character/toCodePoint \b)

5:12 clojurebot: java.lang.IllegalArgumentException: No matching method: toCodePoint

5:15 mariorz: hmm

5:16 why method not found?

5:16 ,(. "a" toUpperCase)

5:16 clojurebot: "A"

5:17 hiredman: mariorz: because the call to toCodePoint did not match any known toCodePoint method signature

5:17 go forth, and read the javadoc for Character

5:17 mariorz: oks

5:17 hiredman: and "a" is not a Character it is a String

5:17 mariorz: noted

6:40 smee0815: hi, anybody awake?

6:50 I'm trying to learn some clojure (coming from a java background), and I'm stuck with a seemingly simple problem

6:51 StartsWithK: whats the problem?

6:51 smee0815: I have a list resembling a logical expression like '(:a and :not :b)

6:52 what I'd like is a list like '(:a :and (:not :b))

6:52 i.e. every :not should be in it's own subexpression

6:52 my solution suffers from a stackoverflow exception, though

6:52 lisppaste8: smee0815 pasted "Stackoverflow" at http://paste.lisp.org/display/83783

6:52 smee0815: :(

6:55 bah, this function is also buggy :(

7:00 Chousuke: I don't get a stack overflow, but it does give the wrong result.

7:01 smee0815: the overflow occurs when running this function on a really large expression, in my case about 1,5MB when printed...

7:02 Chousuke: well, that's not a surprise then, since your function is recursive

7:02 and fairly quickly expanding, too

7:02 smee0815: yes, but this problem is recursive, what else could I use?

7:06 rottcodd: ,(doc recur)

7:06 clojurebot: "/;nil; "

7:08 rottcodd: you can use recur to get tail call optimization: http://clojure.org/special_forms#recur

7:08 smee0815: mmh, if I could get the recursion into a tail call position only, right? Or can I use recur, if it would occur several times within the same function?

7:09 rottcodd: only on tail calls

7:13 Chousuke: smee0815: do you ever need to hold the entire thing in memory?

7:14 you might be able to avoid the stack overflow by making it a lazy seq and not holding on to the head.

7:14 lisppaste8: smee0815 annotated #83783 "Fixed bug" at http://paste.lisp.org/display/83783#1

7:16 smee0815: well, yes, I will use the sequence for more transformations, like simplifying them

7:21 StartsWithK: lisppaste8: help

7:21 lisppaste8: To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.

7:21 StartsWithK pasted "For smee" at http://paste.lisp.org/display/83784

7:22 StartsWithK: this will owerflow, but it shoud not so quickly

7:24 smee0815: StartsWithK: Thanks a lot, I'll try to get, what you did there :)

7:37 StartWithK: this function doesn't seem to work in every case, for example: (normalize-nots '(:a :and ((:not :b :or :c) :and :d) :and :e))

7:39 I meant: (normalize-nots '(:a :and ((:not :b :or :c) :and :d) :and :e))

7:39 sry, should really use the pastebot :)

7:40 lisppaste8: smee0815 annotated #83784 "not yet complete" at http://paste.lisp.org/display/83784#1

7:43 StartsWithK: i see

7:44 lisppaste8: StartsWithK pasted "For smee #2" at http://paste.lisp.org/display/83785

7:46 smee0815: StartsWithK: Thanks a lot, that did the trick :)

8:27 dysinger: rhickey - what is gained by having mutable and immutable ? More efficient memory usage ?

8:27 I thought the whole FP ideal was all about the immutable

8:28 rhickey: dysinger: imagine (foo x) -> y, and for any given x, it always produces the same y, and foo never has any other effects observable outside, is it a function/functional?

8:29 then imagine (foo some-huge-collection) -> another-huge-collection

8:30 do you care if inside foo it uses a mutable scratchpad that makes it must faster to build another-huge-collection?

8:31 for instance, inside every assoc call there is some mutation (I create a new array and munge it)

8:32 one of the points of Clojure is that doing persistent data structures that way (with some mutation at birth) makes them much faster than trying to do them purely functionally (e.g. with some purely-functional array)

8:33 this just extends that story to application code, in a smooth way, since the source and destinations of these mutable collections are the persistent collections, and only by doing that can it be fast, copying into a Java collection and then back would be O(n)

8:35 It is certainly an optimization thing, once nice thing about how it works is that the structure of your code is exactly the same - so do it the normal way, then only try the batch mode if you are facing a real perf bottleneck

8:36 some library code will use this by default, like 'into'

8:37 maybe that wasn't your question :)

8:38 If it was just - where does the speed come from?, yes, much less allocation

8:46 Chousuke: hmm

8:48 are you going to make mutable versions of other data structures too?

8:48 rhickey: It's much better to think of these as mutable modes of the persistent data structures

8:48 batch update modes

8:49 Chousuke: right.

8:49 rhickey: but they don't cause anything to "become" mutable, no risk to a coll to call (mutable col)

8:49 should be possible for any of the tree-structured colls, so maps but not lists

8:50 * rhickey drove away dysinger :(

8:50 Chousuke: Does it do copy-on-write or something if you try to modify a part of the mutable collection that is shared with an immutable collection?

8:51 rhickey: or something

8:51 dysinger: sorry

8:51 I went to get coffee rhickey

8:51 catching up

8:51 rhickey: dysinger: just kidding

8:52 I'm loathe to call it copy-on-write as that has O(n) implications not true here. But the mutable version does make 'isolated' copies of nodes as needed

8:52 Chouser: oh, somehow I missed (mutable coll)

8:53 rhickey: (mutable coll) is the key

8:53 dysinger: rhickey thanks for the explaination. It's exactly as I figured and makes sense.

8:54 as long as you don't shoot yourself in the foot and start passing around (mutable xyz)

8:54 rhickey: dysinger: one nice thing is that the mutables don't support the functions of the immutables, and all of their fns have !s, so you'll see the leakage

8:55 dysinger: nice

8:55 rhickey: if accidental, if on purpose, I can't help, any more than if you used ArrayList

8:55 dysinger: true dat

8:56 Chouser: so is each array inside a vector marked to indicate that an initial mutation of it requires a copy first?

8:56 rhickey: Chouser: which means it should be immutable!, per our conversation last night

8:56 Chouser: I suppose I could read the code...

8:56 rhickey: Chouser: a node, yes

8:56 Chouser: ok

8:59 rhickey: there's an indirection so all flags can be flipped in a single atomic op, and identity can be used to assoc with a particular editing stream, i.e. I might support clones of mutables

9:00 Chouser: I was also fiddling with synchronizing them so our agent scenario would work, about 30% perf hit, just like j.u.Vector vs j.u.ArrayList

9:00 not sure I want to encourage MT use of mutables...

9:02 this perf hit not really a good benchmark, with warmup etc. They are working on making uncontested locks really cheap, and single-threaded use should be all uncontested, but it is still not nothing

9:07 Chouser: interesting. and any cost to support "public" access to the mutable seems like a poor tradeoff, I would think.

9:08 rhickey: Chouser: depends on the perspective - they would still be several times faster than the immutable versions for bulk work, but drop a little further behind, e.g. ArrayList

9:10 heh, with synchronized they are exactly the same speed as j.u.Vectors

9:11 * rhickey needs tea, biab

9:58 Chouser: I think my progress would be steadier if I didn't have a kid on my lap and two others trying to talk to me.

9:59 duck1123: I know how that is. (I have a 4 yr old and a 2 yr old)

10:03 Chouser: that'll do it. :-)

10:13 miTDR: hi

10:13 duck1123: hello, miTDR

10:13 miTDR: are you a human or are you a robot?

10:14 duck1123: ah, a turing test then

10:14 I am human

10:14 miTDR: thankyou for answering my question

10:42 rhickey: immutable now immutable! http://github.com/richhickey/clojure/commits/chunks

10:43 since it is actually a mutating operation on the mutable coll

10:43 is anyone trying this?

10:53 miTDR: yes

11:08 Jomyoot_: what is equivalence of map if you don't need return value?

11:09 durka421: what's the rationale for having mutable collections now?

11:09 rhickey: Jomyoot_: doseq

11:09 Jomyoot_: thanks

11:11 rhickey: durka42: if you are writing a pure function of (f collx) -> colly, you can use them to speed up the implementation of f if it involves a lot of transformations of collx

11:13 basically so iff a bit of persistent coll code is a bottleneck, the solution isn't "switch to a different data structure"

11:15 durka42: okay

11:15 Jomyoot_: rhickey: are you the guy who made clojure?

11:15 rhickey: Jomyoot_: yes

11:15 Jomyoot_: wow

11:15 me and my wife are very excited

11:17 i am really amazed by what you have done.

11:18 i wish now there would be someting similar to RAILS for Clojure

11:23 rhickey: Jomyoot_: thanks - I think there are and will be more Clojure-like solutions than Rails - see Compojure and Enlive etc

11:25 Jomyoot_: i am hoping that cascade will be good

11:27 What is your favorite IDE?

11:27 Do you still use Aqua Macs?

11:46 rhickey: LazilyPersistentVector is gone - http://github.com/richhickey/clojure/commits/chunks

11:46 at least instances of it are

11:52 Chouser: cool

11:53 that one one to fix bugs in a class.

11:53 I guess 1.0 should still get patched for the metadata thing

11:54 ok -- http://clojure-log.n01se.net/ is up to date. Will hopefully sync up every 20 minutes now.

12:18 rhickey: naming question - what should the predicate be for collections that support this mutable mode?

12:26 mattrepl: mutant?

12:26 Chousuke: heh

12:27 danlarkin: there's always mutable?

12:27 Chousuke: that's not quite right, though.

12:28 "has-mutable-variant?"... a bit long, though :P

12:28 rhickey: I've been using editable

12:29 instance? clojure.lang.IEditableCollection

12:30 all the vector factory fns and 'into' now use this, should be much faster for large colls

12:44 duncanm: is there a reason why the clojure compiler doesn't automatically proxy a Fn to an interface if that iface has only one method?

12:45 cark: ah that would be nice

12:46 maybe a macro could be devised to do this ?

12:46 duncanm: cark: there's already the proxy form if you want a macro

12:46 rhickey: duncanm: proxy it when?

12:47 cark: duncanm : i mean as simple as a defn

12:47 or fn really

12:47 duncanm: when compiling to bytecode?

12:48 cark: the macro could even check the number of arguments, and maybe add type hints

12:52 duncanm: rhickey: i'm thinking that, instead of writing this:

12:52 (.listFiles (java.io.File. "/tmp")

12:52 (proxy [java.io.FilenameFilter] []

12:52 (accept [file name] (.endsWith name "txt"))))

12:53 be able to write something like this:

12:53 (.listFiles (java.io.File. "/tmp")

12:53 (fn [file name] (.endsWith name "txt")))

12:53 rhickey: duncanm: has been requested, a bit magical

12:54 duncanm: right

12:54 cark: why couldn't you write an ifn macro that does just that ?

12:54 duncanm: rhickey: and the natural extension of that is a map of keywords -> Fn, and have that be 'lifted' into an iface as well

12:54 cark: ahh there it is

12:54 rhickey: cark: you need to have inferred the type of listFiles

12:55 cark: rhickey : can't you do it using reflection at macro expansion time?

12:55 ah right, you need to read the outside form

12:56 rhickey: cark: reflection on what, all you have are a bunch of forms?

12:56 cark: maybe just add the interface type as a parameter

12:56 rhickey: duncanm: a proxy is a map of symbols to fns pretty much

12:56 duncanm: rhickey: i took a brief look at this, one issue that jumped out was that the argument list is an immutable seq, so I can't do any trickery of updating the argument list when invoking the method

12:58 rhickey: duncanm: args are passed individually

12:58 duncanm: oh wait, it's not an immutable thing, it's just an Object []

12:59 rhickey: i thought it could be done during invokingMatchingMethod, but is that too late?

13:00 rhickey: duncanm: I can't work on this right now, but I'm not necessarily in favor, very magical and difficult to explain when it wiil and won't work

13:01 duncanm: well, that's why i'm asking

13:01 if there's a chance of being accepted, i might look into cooking up a patch

13:02 rhickey: duncanm: I think prior to clojure-in-clojure I'm not going to want to complicate the compiler for this

13:02 duncanm: if it's an iface with one method, then the Fn must be of the same arity, and it goes through

13:02 the multi method case is trickier, and perhaps the proxy form is sufficient already

13:03 rhickey: seems like Groovy-envy :)

13:03 duncanm: rhickey: i saw that in JRuby, yeah ;-)

13:21 Raynes: Vectors aren't seqs, right?

13:22 rhickey: Raynes: no, but they are sequential

13:22 ,(sequential? [1 2 3])

13:22 clojurebot: true

13:22 Raynes: When would you want to use a list over a seq?

13:22 Er/

13:22 Said that wrong.

13:22 When would you want to use a list over a vector. :p

13:23 vector?, even.

13:23 rhickey: when generating code, when generating back-to-front

13:23 not too often in Clojure

13:25 Raynes: rhickey: Thanks.

15:08 weissj: how do i split or tokenize a string?

15:09 duncanm: call the split method?

15:10 user> (seq (.split "foo bar baz" " ")) => ("foo" "bar" "baz")

15:18 Raynes: ,(seq (.split "foo bar baz" " "))

15:18 clojurebot: ("foo" "bar" "baz")

15:30 rlb: It looks like the clojure mailing list may be set to not send email to new subscribers by default. If so, is that intentional? I ask because supposedly sometimes this can be set that way accidentally.

15:41 Chouser: Hehe. I think Tim Snyder broke 'binding'.

15:41 kotarak: Chouser: I would never the idea to use binding like that....

15:45 Chouser: yeah. I think "correct" would be for the value printed for y to always be 1

15:46 kotarak: Yes. Because jumping out of the binding with recur should "restore" the 0.

15:47 Chouser: yep.

15:47 'recur' from inside a try/catch just isn't supported. I think you get compiler errors in some cases.

15:48 rhickey: http://www.assembla.com/spaces/clojure/tickets/31

15:50 kotarak: Hmmm.. What does Scheme do? (define (foo x) (fluid-let ((y (+ y 1))) (if (> x 0) (foo (- x 1))))) Geez. The parens.... in case I remember the syntax correctly, that is...

15:51 rhickey: you did a really good job with [] and {}! :)

15:51 rhickey: kotarak: ?

15:52 kotarak: (defn foo [x] (binding [y (inc y)] ....) compared to the above....

15:52 (let ((x (foo a))) .....)

15:52 rlb: This might also be intentional, but an effect of having the default be "no mail" means that you have to have a google account to join the list. Without that, you wouldn't.

15:53 kotarak: I'm now used to Clojure's vector syntax. Much clearer, IMHO.

15:53 rlb: (to usefully join the list)

15:58 rhickey: rlb: there's no setting for the group that determines the default mail option. AFAIK, everyone joining gets prompted as to what they prefer

16:00 kotarak: I'm glad you like it. It's a hard argument to make in the abstract, esp to Lispers who've gotten used to so many parens, and so much overloading of parens, leading multi-parens etc, but your reaction is what was desired

16:00 rlb: rhickey: OK, supposedly I read that there's a default for new subscribers, and that's the one that will apply for those that subscribe via email, which is most relevant for anyone without a google account. However, I may well have misunderstood.

16:00 Of course, without a google account, AFAIK, there'd be no interface to change any settings.

16:00 rhickey: rlb: I don't see it in my group settings options, if you know where it is - let me know

16:00 rlb: OK, thanks for looking -- I probably just misunderstood.

16:04 rhickey: ahh, here's what I'd found (just via some random searching) -- http://lowendmac.com/lists/iphone.html

16:04 Search that page for "inadvertently set that way"

16:04 Though I have no idea if it's accurate, or if it applies to the clojure list.

16:07 Anyway, the only reason I brought this up is because I subscribed a while ago, but never got any mail. I checked my mail server logs, and there's been nothing, so I started poking around.

16:07 rhickey: rlb: only if one adds members directly do you set their delivery option, there's no global default that I see for those joining themselves

16:09 rlb: OK, well perhaps the clojure list just requires that you have a google account. It'd be nice in principle if that weren't the case, but it's not the end of the world. Thanks again for looking.

16:11 rhickey: do you have any opinion about packaging clojure-contrib? Presumably it's not "stable", but I thought it might be appropriate for something like Debian unstable or experimental.

16:12 rhickey: rlb: I don't have any opinion

16:13 rlb: OK, I might go ahead if I have time. Thanks.

16:14 durka42: it's already in macports

16:14 oh, not contrib

16:15 rlb: durka42: right, but I work for Debian ;>

16:16 durka42: well, i was pointing out that clojure has been packaged

16:16 is there a debian package of clojure core?

16:16 rlb: durka42: yes, recently added.

16:16 skalnik: clojure is so awesome!

16:16 rlb: durka42: I think it's in unstable, and perhaps testing.

16:17 BTW, after I asked about adding some kind of #! support a while ago, I saw the "shebang" hack on the wiki -- nice.

16:18 kotarak__: maybe #! !# could be used for block comments instead of #| |# ...

16:18 durka42: that wouldn't help so much with shebang scripts, because you have to prevent the whole file being a block comment

16:19 kotarak: #!clojure-start-stuff\n!# ...

16:19 rlb: kotarak__: or in addition to, though perhaps the wiki hack is enough...

16:21 kotarak: Also #! interpreters allow only one argument. scsh has a nice trick in giving a special argument which makes the second line be read with additional command line arguments to the interpreter. The third line then has the !#.

16:22 rlb: kotarak: guile's command line driver does that, and then supports a '\' "meta-switch" that tells it to treat the first part of the script specially. Apparently you have to do that to remain posix compliant since posix only allows one arg on the #! line.

16:23 See "info guile" (or info guile-1.8 on debian), and search for "meta switch" for details.

16:24 If anyone's interested in something similar for clojure, I might work on it, but for now, I'll probably just use the hack.

16:24 (Actually, for now I'll work on emacs23.)

16:24 kotarak: scsh does it w/o meta switch, just \ as "commandline parameter" and a #! !# block comments...

16:26 rlb: kotarak: interesting -- and certainly, guile's approach might or might not be the exact one you'd want.

16:26 kotarak: I'm not familiar with guile.

16:29 rlb: It has its good points and its bad points, has suffered from grand expectations, and AFAIK is very well un-liked on #scheme. I've enjoyed working on it though, and learned quite a bit that way.

16:36 Chouser: you guys do know that #! is a comment already, right?

16:38 ,(+ 2 3) #! this is a comment

16:38 clojurebot: 5

16:42 rlb: Though you'd need multi-line if you wanted to avoid really long lines and/or stay within POSIX limits.

16:42 (assuming the guile docs are right...)

16:48 kotarak: Chouser: huh? When was it introduced?

16:48 * kotarak sometimes finds it hard to keep up with the speed of Clojure...

16:51 a: better way to deal with undefined optional args? (defn myfn [a b & [c d]]

16:51 (let [c (if c c 0)

16:51 d (if d d 0)]

16:51 (+ a b c d)))

16:52 oops sorry didn't realize it was going to break it up over multiple lines

16:56 kotarak: a: (defn myfn ([a b] (myfn a b 0 0)) ([a b c d] ...))

16:57 a: thx

17:00 Chouser: kotarak: Nov 16, 2008

17:03 kotarak: -.-

17:04 Chouser: :-)

17:45 hserus: hello all.. have a question about structs..

17:45 lets say i have a struct called library and it has 2 keys, :place and :books

17:46 how can i associate a vector to the books?

17:46 and each book is again a struct

17:49 Chousuke: a struct is just like a normal map

17:49 so use assoc

17:50 hserus: i did.. maybe i messed up something

17:50 i want to store a vector of book structs

17:50 Chousuke: can you show the code?

17:50 hserus: yes, can i paste it here?

17:50 Chousuke: lisppaste8: url

17:50 lisppaste8: To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.

17:50 Chousuke: use that.

17:51 hserus: thanks, just a sec

17:52 Chousuke: structs are nothing special, really. they're just normal maps, with the difference that you can generate optimised accessors for the base values should you need them :)

17:53 I think most people just end up using structs instead of maps not because of the accessors, but because they associate structs with similarly named constructs in other languages :P

17:54 lisppaste8: hserus pasted "nested structures" at http://paste.lisp.org/display/83802

17:55 hserus: (:books centrallibrary) returns an empty vector..

17:55 arohner: Chousuke: you say "can generate optimised accessors", does that mean you have to do something special to get the optimized accessor?

17:55 Chousuke: hserus: that's because you define it so.

17:55 hserus: :)

17:56 hserus: clojure is a functional language. none of the function calls modify centrallibrary; they return new values.

17:56 arohner: yeah

17:57 hserus: Chousuke: so how do i associate a vector of books?

17:57 Chousuke: with assoc, as you did.

17:57 the problem is that it returns a new value

17:57 hserus: but use the returned one?

17:58 Chousuke: and you can't modify an existing definition.

17:58 I suppose what you want is a ref, in this case.

17:58 which is kind-of mutable

17:58 hserus: hmmm... kinda makes sense now..

17:59 all these years of imperative programming isnt easy to get rid off :)

18:03 lisppaste8: chousuke annotated #83802 "hm" at http://paste.lisp.org/display/83802#1

18:03 Chousuke: oops

18:04 in the new centrallibrary line there should be parens around the struct book... stuf

18:04 +f

18:04 hserus: got it

18:05 will i be able to use only structs for this purpose though?

18:05 Chousuke: nah, you could use any values.

18:06 as I said, structs are just maps with a special property

18:07 you could replace your struct calls with literals like {:location "foo" :books [{:title ...}]} and it would make no difference.

18:07 hserus: ok.. so what is that special property of struct?

18:07 Chousuke: you can generate optimised accessors for a struct with, hm.

18:08 I forgot the function

18:08 hserus: no problem, will look it up from the api

18:08 Chousuke: duh, accessor :P

18:08 so (def books-accessor (accessor book :title))

18:08 but you really should not bother :)

18:09 hserus: sure thing :)

18:09 Chousuke: unless you're doing hundreds of thousands of lookups with the same key, the accessor is probably not going to help much

18:10 rhickey: Chousuke: the real benefits of structs is not the accessors, it's the sharing of the keys (and thus space) when you have lots of instances with the same key set

18:11 Chousuke: rhickey: does that matter if the keys are keywords though? :/

18:11 But I wasn't aware of that. interesting. :)

18:11 rhickey: they are still slots in the map when hash-maps and not in the object when structs

18:12 Chousuke: I suppose there's no harm in defining structs for your data anyway; if nothing else, it serves as documentation.

18:17 hserus: another question, right now there is only a jar (or a bunch of them) as part of the standard download of clojure.. are there plans to bundle simple scripts for repl and executables?

18:19 r2q2: There is a clj script on wikibooks that seems to work.

18:19 hserus: i haven't seen it before, will check it out

18:19 r2q2: http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started

18:20 Its from a blog post on clojure

18:20 http://paulbarry.com/articles/2007/12/22/getting-started-with-clojure works on linux.

18:21 hserus: i have set aliases on my box, but was just curious if any standard scripts are available..

18:29 r2q2: hserus: The standard way to run clojure for a repl is "java -cp clojure.jar clojure.main" actually. The shell script just makes it a bit nicer with jline which allows for a history. There is also slime for clojure.

19:39 rlb: hserus: the debian package also provides "clojure" and "clojure-repl", though I remember thinking that perhaps they could use some improvment.

19:39 s/improvment/improvement/

19:40 (there are manpages too)

19:40 Oh right, if nothing else, clojure-repl should probably offer jline support.

20:18 iBong: probably a frequent question, but clojure-install in clojure-mode I got from ELP fails because the git repositories don't work... I already installed the clojure tarball, just want to set up slime for clojure in emacs

20:18 any help appreciated

20:32 prospero_: why is /= an invalid token?

21:52 danlei: prospero: I'd say it's because / is already used as a separator for namespaces.

23:48 durka42: are mutable maps in the cards?

23:51 r2q2: durka42: I don't think mutability is in the cards for clojure.

23:57 durka42: r2q2: mutable vectors arrived today :)

23:57 as a performance trick

Logging service provided by n01se.net