#clojure log - Jun 14 2009

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

9:07 baw_heid: /join #clojure

9:12 topic

9:17 duck1123: When a repl is started (via 'clojure.main') is it just using the standard input an outputs?

9:19 I'm trying to modify clojure-maven-plugin to create a repl for my project. When it runs, I see 'Clojure 1.0.0--SNAPSHOT' but no prompt

12:04 Chouser: rhickey: I

12:04 rhickey: I sent you a push request. my first ever! :-)

12:11 Chousuke: Chouser: you mean a pull request? :/

12:19 Chouser: bah

12:19 see?

12:19 yes, pull request.

12:43 jtal: can someone tell me whats wrong with this function? http://kivasti.com/prime.html

12:43 I think it must be something simple

12:44 hiredman: jtal: what kind of exception do you get?

12:44 jtal: java.lang.ClassCastException: java.lang.Boolean (NO_SOURCE_FILE:0)

12:44 hiredman: actually

12:44 seths: I'm looking at the implementation of (distinct) and don't understand the usage of :as

12:44 hiredman: to start off, you have too man parens

12:44 many

12:45 jtal: around the if's ?

12:45 seths: (excerpt) (fn [[f :as xs] seen]

12:45 hiredman: ~destructuring

12:45 seths: I understand it's an anonymous function with two arguments

12:45 clojurebot: destructuring is http://clojure.org/special_forms#let

12:45 hiredman: seths: check out that url

12:46 seths: ok, thx

12:46 hiredman: jtal: the body of the function does not need to be inside a set of parens

12:46 you have something like (defn foo [x] (code here))

12:46 should be (defn foo [x] code here)

12:47 jtal: ok, are there others I dont need?

12:47 hiredman: what is happening is the code is returning a boolean, then because of those extra parens the boolean is being called as a function

12:47 which it isn't

12:47 jtal: ahh

12:48 hiredman: hard to say, your style is a little off which makes it hard to read

12:48 jtal: same error, I must have more extras

12:49 hiredman: http://paste.lisp.org/display/81021

12:49 jtal: is that really easier for you to read? :>

12:50 I cant ever match up the closing parens that way

12:50 hiredman: get a better editor then

12:50 jtal: well, I can do it when the cursor is over them

12:50 (also, there is nothing better than vim) :>

12:51 hiredman: jtal: I doubt it is the same exception

12:51 jtal: oh, sorry

12:51 idiot...I'm editing the version I'm showing you not the one I'm loading

12:52 hiredman: you do have another extra set of parens, but not around anything that returns a boolean

12:53 jtal: hooray

12:54 thanks

12:54 hiredman: sure

13:40 seths: I am struggling to understand how to appropriately use immutable data structures

13:41 I keep wanting to do something like this:

13:41 (def hm (hash-map))

13:41 (def hm (assoc hm 'foo 42))

13:41 I'm pretty sure that's missing the point

13:42 I'm using (map) to build a hash-map, but subsequent calls into my code can't see return values from prior calls

13:44 I looked at (distinct), but that doesn't do quite what I want

13:53 Chouser: seths: that pattern isn't completely wrong -- doing it with 'def' is a bit suspect, but I assume that's a made up example anyway.

13:54 but the general idea of taking the old container, assoc'ing onto it, and replacing the old reference with the new one is exactly right for a lot of circumstances.

14:10 seths: great, thanks Cho

14:11 jackdempsey: hey pjb3 yt?

14:12 was hoping to continue discussion re: clojure from #rubynation

14:12 anyone else of course is welcome.....i was asking Paul my standard question anytime i look at a new tech

14:13 what problem/task best lets Clojure shine

14:13 and whats something you really wouldn't want to do with clojure :-)

14:13 (when people say concurrency i think a lot of the time people imagine something closer to erlang when thats not really the case)

14:14 itistoday: jackdempsey: i think clojure is good for server-side coding

14:14 jackdempsey: and not so great for making GUIs yet

14:14 jackdempsey: k

14:14 itistoday: but that's not really the fault of clojure

14:14 more of a problem java's always had

14:14 jackdempsey: so if you had something like, a web framework, with potentially thousands of requests coming at your code per second

14:15 its well suited to handle that sort of thing (it seems?)

14:15 itistoday: i would think so

14:15 plenty of java stuff that does that

14:15 jackdempsey: i mean i guess a good part of that is actually the jvm at that point

14:15 yeah

14:16 itistoday: i think clojure may also be good for running simulations, especially where concurrency is required

14:16 really, any sub-system type stuff

14:17 for example, I used to work on autonomous cars, and they had a communications system written in java

14:17 that would be used for the various nodes to communicate with each other

14:17 jackdempsey: k gotcha

14:18 itistoday: gotta go

14:18 jackdempsey: cool, thx!

14:26 hoeck: jackdempsey: the list of things I would not use clojure for are more or less restricted by the runtime (jvm)

14:26 jackdempsey: gotcha

14:26 hoeck: jackdempsey: stuff like window-managers, devicedrivers

14:26 jackdempsey: yea

14:30 seths: Chouser: I still can't get my head out of the mutable context world. I really want to update the value of a hashmap while (map) is running

14:30 (let [hm (hash-map)] (map (fn [k v] (assoc hm k v)) ["a" "b" "a"] [1 2 3]))

14:30 ({"a" 1} {"b" 2} {"a" 3})

14:31 I think i get why, but not how to get past that

14:31 (I don't need zipmap, but this would be better than the code above right? (zipmap ["a" "b" "a"] [1 2 3])

15:03 pjb3: jackdempsey: hey

15:03 jackdempsey: hey man

15:03 watching clojure.blip.tv........rich really does a great job with his talks

15:04 makes me want to go learn clojure every time i watch one :-)

15:04 pjb3: Yeah, me too :)

15:04 jackdempsey: reminds me a bit of git even......smart people love it, seems really powerful, learning curve seems a bit steep at first :-)

15:04 pjb3: We have to write some sort of clojure library and call it cilantro :)

15:04 Nah, the learning curve isn't that bad

15:04 jackdempsey: glad he goes into concurrency a bit (and is right), its often spoken about the wrong way

15:05 yeah? ok cool

15:05 durka42: cilantro?

15:05 jackdempsey: hahah totally

15:05 pjb3: You'll learn to love the parentheses

15:05 jackdempsey: hahah

15:05 pjb3: durka42: inside joke

15:05 jackdempsey: someone must be working on a lib packaging system right?

15:05 pjb3: not sure

15:05 durka42: i think technomancy is working on something

15:05 jackdempsey: cool

15:06 is there a need for something small/easily approached by a novice, that would benefit the community?

15:06 durka42: yeah, corkscrew

15:06 jackdempsey: k cool

15:06 durka42: jackdempsey: what are you interested in? :)

15:06 jackdempsey: i'm mostly a web programmer

15:06 do a lot with ruby these days

15:07 but, i see the writing on the wall, and especially when listening to these talks......i don't want to be out in the cold when we have 64 core machines and need to utilize them

15:07 that and something i'm working on right now could benefit from a highly efficient concurrent system

15:07 as far as linguistic analysis

15:07 i guess i can just leverage whatever java's done

15:08 which is a big win

15:08 pjb3: yeah, that java integration is pretty nice

15:09 sgtarr: Hi all. I am new to Clojure and installed VimClojure. I am having problems with the REPL taking 100% CPU and freezing Vim.

15:09 jackdempsey: i think i need a "blog in 15 mins" type app to build in clojure

15:09 yikes

15:09 durka42: sgtarr: when you give it input? or just when it tries to start up?

15:09 jackdempsey: look at compojure

15:09 jackdempsey: ok

15:09 sgtarr: To reproduce, I start the REPL in vim, while in insert mode I "mistakely" hit CTRl-W-W, so it deletes a line, I do it again, and then I do escape, and press 'i'

15:09 And then it freezes

15:09 pjb3: compojure is like sinatra

15:10 * durka42 tries this

15:10 sgtarr: I'm using vim 7.2.79

15:10 jackdempsey: nice, ok

15:10 durka42: sgtarr: OS?

15:10 jackdempsey: any benchmarks on it?

15:10 durka42: i'm on a mac

15:10 sgtarr: durka42: linux (ubuntu 9.04)

15:11 durka42: i can test it there

15:11 * durka42 has a virtual machine that i need to update

15:11 sgtarr: durka42: ok, great

15:11 durka42: also, kotarak wrote vimclojure and he is here sometimes

15:11 he is also using macvim :)

15:12 pjb3: jackdempsey: Check out stu halloway's book, he has a clojure version of ant that he explains in the book

15:12 duck1123: has anyone here managed to launch a clojure repl from within a java program

15:12 sgtarr: durka42: noted :)

15:12 jackdempsey: k cool thx paul

15:12 duck1123: I'm still trying to get a repl from within a maven plugin

15:13 sgtarr: anyone using the eclipse-dev plugin?

15:13 I tried it but it had some odd behavior, such as the cursor going all the way to the beginning of the line on every new line

15:14 duck1123: tried it, was inferior to slime, so i stayed with that

15:14 pjb3: jackdempsey: Have you done a lot of Java programming?

15:14 sgtarr: durka42: Slime runs within Emacs right?

15:14 durka42: yes

15:14 sgtarr: hm I'd rather not run another OS :)

15:14 durka42: hahaha

15:15 jackdempsey: pjb3: nah, been a long time

15:17 sgtarr: ,(+ 2 3)

15:17 clojurebot: 5

15:17 sgtarr: heh

15:17 ,(doc map)

15:17 clojurebot: "([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls]); Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments."

15:18 sgtarr: durka42: did you test inside the virtual machine?

15:21 durka42: sgtarr: i'm waiting for it to upgrade from 8.04 to 9.04

15:22 so it will be a while

15:24 sgtarr: also what versions of vimclojure and clojure are you using?

15:27 Chouser: seths: you may want 'reduce'

15:28 sgtarr: durka42: Both latest frmo svn

15:28 from*

15:33 It happens too often to make VimClojure useful before it's fixed :/

15:33 durka42: do you get anything in the console?

15:34 sgtarr: ^WW then ESC then 'i' and it freezes

15:34 durka42: you mean the ng server?

15:34 durka42: yeah

15:34 sgtarr: stop pressing ^WW :)

15:35 sgtarr: durka42: Impossible, it'll definitely happen at some point even if I really tried :)

15:35 It's like avoiding vim going "beep"

15:35 * sgtarr turns off his beeps for that reason

15:35 sgtarr: durka42: basically, I need to change between REPL and the source a lot :/

15:36 hi kotarak, we were just talking about VimClojure

15:36 kotarak: Hi. Only good things, I hope. :)

15:36 sgtarr: I am experiencing a crash upon ^WW in the REPL, do you have a sec? :)

15:36 durka42: and i was failing to help :)

15:36 kotarak: unfortunately not :p

15:36 kotarak: Erm. But only a sec. I might have to drop out suddenly.

15:37 sgtarr: To reproduce: 1) I go to REPL, and while in insert mode, I hit ^WW, the lines then are removed and I am reminded that it is still in insert mode. 2) I hit ESC, and then 'i' again. 3) VIM freezes

15:37 Clojure from svn, VimClojure from svn tonight

15:37 (I'm running Vim 7.2.79 on Ubuntu 9.04)

15:37 durka42: do you mean vimclojure from hg? or are you downloading an obsolete version from somewhere

15:37 kotarak: Ok. Just a sec.

15:38 VC was never in SVN, only HG.

15:38 sgtarr: actually, I am not using from svn, sorry. It's the latest one from vim.org scripts

15:39 Only the clojure / clojure-contrib are from svn, on my system.

15:39 durka42: you could try latest VC from bitbucket

15:39 kotarak: Hmmm... No freeze here.

15:39 sgtarr: kotarak: do you clear the lines all the way to the top using ^WW ?

15:40 kotarak: it doesn't always happen here, but about 75% of the time

15:40 kotarak: Ok. Let me see.

15:41 No. Works all the time.

15:41 I'm on 7.2.148.

15:41 sgtarr: kotarak: Oh, it only freezes if you do 'i' followed by enter

15:41 durka42: kotarak: sgtarr is on ubuntu 9.04

15:41 kotarak: That's clear.

15:41 seths: Chouser: very cool

15:41 durka42: because VC is looking for the Clojure=>

15:41 kotarak: It looks for 'Clojure=>'

15:42 * durka42 reproduces the crash

15:42 * kotarak should make that more robust.

15:43 durka42: dammit, now i have to kill vim >:o

15:43 sgtarr: kotarak: for some reason, I reproduce it quite quickly again and again when switching between source and the REPL

15:43 kotarak: most of the time "Clojure=>" is actually visible

15:43 kotarak: At the moment it works well, if you treat it right. But it's not very robust.

15:43 Hmm..

15:43 That should not happen.

15:44 sgtarr: kotarak: Ok, I reproduced it again like this: I ^WW'd only to realize that I was in insert mode, making me do "ESC" instinctively. So to rectify I do 'i' and then enter to make the REPL work again. Freeze.

15:45 kotarak: No. No Enter. Just make undo to fix the prompt.

15:45 Without prompt it will freeze.

15:45 sgtarr: I see...

15:45 kotarak: Hitting enter will not produce a new prompt.

15:45 seths: Chouser: I owe you a beer, reduce worked perfectly

15:46 sgtarr: kotarak: It's just my instinct makes me press Enter, and since i am typing very very fast, I sometimes make mistakes, I'm used to the vi "beep" sound.

15:46 kotarak: Say I'm coding in this for an hour, I am 100% sure I'm going to screw it up at least once :)

15:46 * sgtarr knowing himself, that is

15:47 kotarak: Vim is not really made to provide a repl-like thing.

15:47 This whole buffer wrapper is a big hack!

15:47 s/wrapper/repl/

15:47 sgtarr: kotarak: It's extremely useful though... is there a way to use a REPL from the outside? and still be able to eval code from within vim ?

15:47 kotarak: You can start your own Repl.

15:47 durka42: kotarak: it's a very useful hack :)

15:47 kotarak: Start the nailgun-server from there.

15:48 And there you go.

15:48 You can work in the Repl while using the same process for VC.

15:48 sgtarr: kotarak: Oh I see, so then I just do \ef ?

15:49 kotarak: Yes.

15:49 sgtarr: That's neat

15:49 kotarak: Have to drop out now.

15:49 sgtarr: Did you also code nailgun?

15:49 kotarak: Sorry

15:49 no

15:49 sgtarr: Later, thanks

15:49 kotarak: 3-party

16:23 jtal: anyone have a good link to debugging clojure code?

16:27 duck1123: http://github.com/GeorgeJahad/cljdb/tree/master

16:27 for emacs though, and I haven't gotten it working yet

16:28 jtal: oh I use some java debugger for debugging?

16:30 duck1123: it's all JVM underneath, so java debuggers should work

16:30 jtal: ok, I'll look into jdb

16:41 duck1123: I'm making progress. I'm actually able to see the repl prompt in my mvn goal now. Still not respoonding to input however

16:42 replaca: jtal: Others have reported good success using jswat, though I couldn't get it working in the 5min I tried :). I blamed it on some historical artifact of the way I seem to have java set up on my system.

16:43 jtal: cool ill check it out too

17:14 DTrejo: Can someone tell me why this does not work? http://mibbit.com/pb/SRsipN

17:15 thanks

17:15 durka42: DTrejo: define "does not work"?

17:16 oh, because lazy-cat does not return a vector

17:16 you want (nth fibs 10)

17:16 or convert fibs to a vector first

17:16 DTrejo: oh, so

17:17 how could I convert it?

17:17 *how would I convert it?

17:18 durka42: not sure you can convert it while keeping it lazy

17:18 but you can always use nth

17:19 DTrejo: I guess I need to look up "nth" I'm just learning clojure now, so I haven't heard of it

17:19 durka42: it's for indexing into collections

17:19 as in, the nth element

17:19 arohner: ,(doc nth)

17:19 clojurebot: "([coll index] [coll index not-found]); Returns the value at the index. get returns nil if index out of bounds, nth throws an exception unless not-found is supplied. nth also works for strings, Java arrays, regex Matchers and Lists, and, in O(n) time, for sequences."

17:20 DTrejo: thanks durka42 and arohner

17:20 arohner: the functions doc and find-doc are your friends

17:20 oh, source is useful too

17:22 DTrejo: I've been using the clojure eclipse plugin, is that a bad idea to use to learn?

17:23 mrsolo: it wasn't very good when i checked it out few weeks ago

17:23 DTrejo: yeah I don't love it either

17:23 mrsolo: i am using emacs + slime right now

17:23 DTrejo: would you recommend anything?

17:23 oh ok, I do have clojurebox installed

17:23 arohner: if you know emacs, slime is definitely the way to go

17:24 DTrejo: (I don't know emacs)

17:24 mrsolo: there is a plug in for netbean

17:24 i heard that one is better

17:24 compares to eclipse that is

17:24 duck1123: I found the eclipse plugin to be rather limited

17:24 but maybe I'm just spoiled by slime

17:25 mrsolo: it is limited missing few features but eclipse/netbean are bunch stronger on java side compares to emacs..so..

17:25 DTrejo: http://clojure.bighugh.com/

17:26 hmm alright

17:26 enclojure is made in close partnership with rich hickey right?

17:26 duck1123: I'm noticing that emacs seems a little slow to respond for me when coding java right now with JDE installed

17:27 perhaps it's my disgust with this java code clouding my opinion however

17:28 DTrejo: thanks for the help and advice guys, I'm off

17:59 jackdempsey: sigh

17:59 and now i remember why i hated java :-)

17:59 (*#$#(*@#R classpath...

17:59 lemme type this out....maybe i'll realize the answer in doing so

17:59 trying to build vimclojure

18:00 have everything set

18:00 rc/vimclojure-2.1.1/build.xml:66: Could not find clojure.lang.Compile. Make sure you have it in your classpath

18:00 hiredman: is clojure in your classpath?

18:01 jackdempsey: yeah so i've done this:

18:01 CLASSPATH=/Users/jack/Library/Java:/opt/jars/clojure-contrib.jar:/opt/jars/clojure.jar

18:01 and looking at ant diagnostics

18:01 they're in there as well

18:01 and i can load up clojure just fine

18:02 hiredman: did you do the thing with the properties file?

18:02 jackdempsey: yep it has the lines specified

18:02 clojure.jar = /opt/jars/clojure.jar and others

18:04 this loads

18:04 java -cp /opt/jars/clojure.jar clojure.lang.Repl

18:04 as does java clojure.lang.Repl

18:04 and given that the latter works, i would have thought the classpath stuff was ok

18:05 i could easily be doing something boneheaded..havne't run ant in forever

18:06 hiredman: I haven't built vimclojure in a while

18:06 jackdempsey: grabbing the latest java update for leopard....doesn't seem like that would be related to this tho

18:06 yeah i mean, at this point i almost odn't really care about it

18:06 just want to figure out whats wrong as i need to get used to this :-)

18:09 hiredman: ant runs fine for me

18:09 :/

18:09 jackdempsey: heh

18:10 i saw something about building clojure-contrib AOT

18:10 hiredman: vimclojure's author is in here fairly regular like

18:10 jackdempsey: cool

18:10 hmm

18:10 damn

18:10 thought clean then a rebuild would do it

18:11 hiredman: ~seen kotarak

18:11 clojurebot: kotarak was last seen quiting IRC, 141 minutes ago

18:11 jackdempsey: oh yea saw him before

18:11 hiredman: just missed him

18:11 jackdempsey: i mean doesn't the fact that i can do

18:11 java clojure.lang.Repl

18:11 mean clojure.jar is in CLASSPATH

18:11 hiredman: yeah

18:11 jackdempsey: does ant run in some environment where thats not set or something

18:12 hiredman: on a side note it's clojure.main these days

18:12 jackdempsey: yea saw that somewhere

18:12 interestingly enough

18:12 that doesn't work

18:12 maybe my clojure is too old?

18:12 hiredman: Hmmmm

18:12 possible, where did you get it?

18:12 jackdempsey: svn a while ago

18:13 hiredman: clojure.main has been around for a while

18:13 jackdempsey: heh maybe its really old then

18:13 hiredman: jackdempsey: I would grap the 1.0 zip

18:14 http://code.google.com/p/clojure/downloads/list

18:14 jackdempsey: ah

18:14 new error now

18:14 hehe


18:14 java.io.FileNotFoundException: Could not locate clojure/contrib/pprint__init.class or clojure/contrib/pprint.clj on classpath:

18:14 k i've seen that error

18:14 lemme see

18:14 hiredman: ok

18:14 that is an issue with not compiling clojure-contrib

18:15 jackdempsey: yeah so i just tried that the way it was specified somewhere on line

18:15 ant -Dclojure.jar=../clojure/clojure.jar

18:15 hiredman: the latest vimclojure depends on pprint and pprint depends on AOT

18:15 jackdempsey: and get a nice

18:15 [java] java.lang.Exception: Name conflict, can't def memoize because namespace: clojure.contrib.memoize refers to:#'clojure.core/memoize (memoize.clj:19)

18:15 so i'll get that 1.0 zip i think :-)

18:15 hiredman: hmmmm

18:15 jackdempsey: (appreciate the help btw)

18:15 the clojure.jar i just built was from svn

18:15 easily could be f'ed

18:17 k got zip.....different structure than i expected :-)

18:17 hiredman: it's source + jar

18:18 jackdempsey: ah it unzpped to top level

18:18 heh sigh k brb

18:18 there we go

18:19 so i can drop that jar into place

18:19 and rebuild clojure-contrib?

18:19 hiredman: might be a good idea

18:21 jackdempsey: hmm can't find lazy cons for some reason

18:21 [java] java.lang.NoClassDefFoundError: clojure/lang/LazyCons

18:21 hiredman: well

18:21 I think you need a new contrib now

18:21 lazy-cons was chopped a few months before 1.0

18:22 so if something is looking for it, it is old

18:22 ~contrib

18:22 clojurebot: contrib is http://code.google.com/p/clojure-contrib/

18:22 hiredman: unfortunately there are no prebuilt releases for contrib

18:22 jackdempsey: k think this worked

18:23 hmm yea i got contrib earlier today

18:23 hiredman: from where?

18:23 jackdempsey: that url

18:24 so contrib built

18:24 back to vimclojure now :-)

18:25 hiredman: in my svn checkout of contrib there is no mention of LazyCons except in clojurescript, but that is all written in javascript so it doesn't compile and you would not see an exception about it

18:26 jackdempsey: oh, you know, i think it wasn't google code

18:26 as downloads is blank

18:26 yeah vimclojure still blows up with java.io.FileNotFoundException: Could not locate clojure/contrib/pprint__init.class or clojure/contrib/pprint.clj on classpath: (util.clj:23)

18:26 which means contrib didnt' build correctly either huh

18:26 hiredman: well

18:26 jackdempsey: or it was the old one as you're saying

18:26 hiredman: back when LazyCons existed there was no pprint

18:26 jackdempsey: so build clojure-contrib from source?

18:27 hmm

18:27 heheh

18:27 hiredman: yeah

18:28 jackdempsey: yea that source had an svn info of the old repo

18:28 so clojure-contrib needs that -D flag for the AOT as well as vimclojure right?

18:29 hiredman: yeah, contrib needs to know where clojure is to AOT compile

18:29 jackdempsey: yea seeing that now

18:29 nice error message

18:29 k co contrib is good

18:30 trying vim again

18:30 shit

18:30 hehe

18:30 still that pprint error

18:30 well

18:30 lemme just fiddle for a sec, i have much better understanding of this all now

18:30 clojurebot: for is a loop...in Java

18:31 jackdempsey: should be able to get it

18:32 yeah

18:32 got it

18:32 one of those

18:32 been looking at this forever, forgot to copy contrib to /opt/jars

18:32 built just fine

18:32 phew

18:32 hiredman: excellent

18:32 jackdempsey: they need a feature in irc

18:32 * jackdempsey sends hiredman a beer

18:33 * hiredman sets his laptop to recieve a beer

18:34 jackdempsey: hehehe

18:34 now that this yak shaving is done

18:34 i forget what i was trying to do

18:34 :-d

18:34 :-D

18:35 oh yes, compojure

18:35 hiredman: ~shave that yak!

18:35 clojurebot: fastest sheers on IRC

18:35 jackdempsey: hehehe

19:03 hiredman: ,(doc alter)

19:03 clojurebot: "([ref fun & args]); Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref args) and returns the in-transaction-value of ref."

19:03 hiredman: ,(doc ref-set)

19:03 clojurebot: "([ref val]); Must be called in a transaction. Sets the value of ref. Returns val."

21:30 qrush: hey folks

21:30 is the official repo at github now?

21:31 anyone?

21:32 arohner: I don't think it's official because rhickey hasn't announced it

21:32 but it's probably in-sync with svn

21:33 qrush: I'd love to feature it for github rebase

21:33 but i'd rather not if it's not official

21:37 :/

21:51 Chouser: I think it's official

21:52 I've not seen an announcement except here, but there's a rev pushed there that's not in googlecode svn (I think)

21:52 qrush: well it's not like it can hurt right? any pr is good pr :)

21:52 arohner: Chouser: how is it official without an announcement? :-)

21:53 Chouser: well, it's got newer rhickey code than svn -- what more do you want?

21:54 arohner: that makes it de-facto

21:54 :-)

21:54 Chouser: ah, ok.

21:58 blbrown_win2: I have a computer science 101 question; I want to create an object called Lock that can only be "enabled" one time, and the 'get' method only returns if the Lock has been enabled or not, you can't change the state again. It is kind of a readonly object. Is this how Locks are used. I am not using anything threading.

22:00 I think I will call it readonlystate

22:32 replaca: blbrown_win2: this isn't a lock (locks are grabbed by a thread, held for a time, and then released)

22:33 blbrown_win2: and locks have no value associated with them

22:33 qrush: /whois replaca

22:33 bah

22:33 sorry :|

22:33 * qrush kicks limechat

22:34 replaca: blbrown_win2: interestingly, Rich Hickey is in the process of building exactly what you're asking for right now and was asking for name proposals on Friday

22:34 qrush: a lot of poeple have wanted to know that, but noone has gotten a satisfactory answer :-)

22:34 qrush: haha

22:35 i'm really just looking for anyone with information on the transition to github ;]

22:36 replaca: blbrown_win2: if it's not carrying an explicit value, what you're talking about is usually called an Event and they can be reset (for example, C# has ManualResetEvent and AutoResetEvent)

22:36 qrush: I know about as much as anyone besides Rich

22:36 Chouser: qrush: there's not much information to be had, I believe.

22:37 replaca: qrush: (as do Chouser, etc.)

22:37 qrush: it's in process, but not done yet. Rich is being very methodical

22:37 qrush: :/ well, i don't think it'll hurt to broaden its exposure. I won't say it's 'official'

22:37 replaca: which is a "good thing"

22:38 hiredman: replaca: I think a future is more like what he is asking about then a promise

22:38 replaca: qrush: I would say that it will probably be official within the week, but I don't know that for sure

22:38 qrush: alright :)

22:39 well, i'm going to do no harm except for bringing more attention to it

22:39 i don't think that should cause any issues.

22:40 replaca: hiredman: could be, but it sounded a little more random than that. In any case, I don't think he's listening anymore, so I'm probably talking to air. (as often happens...)

22:40 hiredman: yeah

22:40 replaca: qrush: but be careful, it looks like it's happening, but Rich hasn't committed to it and may still change his mind

22:41 qrush: :/

22:41 replaca: qrush: consider it "still under investigation"

22:41 qrush: well i'm not going to call it the 'official' repo

22:41 replaca: but personally I think it will happen

22:41 qrush: and, if Rich changes his mind, the repo will go away

22:41 qrush: i'm just going to point out what features the languages it has and encourage people to fork

22:42 replaca: qrush: Why fork?

22:42 qrush: ...because that's how people contribute on github?

22:42 clojurebot: github is git://github.com/kevinoneill/clojure.git

22:42 replaca: unless you want to create your own version or fix bugs and send patches

22:42 hiredman: forking is fun for consenting adults

22:43 clojurebot: forget github

22:43 clojurebot: I forgot github

22:43 qrush: replaca: I'm not talking about creating their own version of the language/project...this is more about watching and contributing :)

22:43 replaca: qrush: yeah, but clojure is really a set of projects. More folks will probably find value in building on top of clojure

22:43 hiredman: ~github is <reply>http://github.com/richhickey/clojure/tree/master

22:43 clojurebot: In Ordnung

22:44 replaca: clojure-contrib, compojure, ring, incanter, .... tons of interesting stuff

22:44 hiredman: replaca: someone could fork 1.0 an maintain a bugfix branch

22:44 replaca: that's where I think more of the action will be

22:44 hiredman: you know, cloud source it :P

22:45 replaca: sure, nothing *wrong* with anyone forking it and there will probably be some useful things happening there (though I'd rather see bug fixes go back into the official 1.0 branch)

22:46 Chouser: I wrote a patch -- previously I would have just attached the patch to a googlecode issue. The github procedure I think is to fork the clojure repo, push a commit to it, and send rhickey a pull request.

22:46 replaca: I just think that there are a lot of ways to contribute

22:46 Chouser: yes, by all means fork to create patches and fork if you want to do something special with the language itself

22:46 qrush: Chouser: That's one way...

22:47 rails only accepts patches

22:47 it's really up to the project maintainers

22:48 Chouser: but rhickey hasn't pulled it yet, so I may be off base

Logging service provided by n01se.net