#clojure logs

2009-06-14

09:07baw_heid/join #clojure
09:12baw_heidtopic
09:17duck1123When a repl is started (via 'clojure.main') is it just using the standard input an outputs?
09:19duck1123I'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:04Chouserrhickey: I
12:04Chouserrhickey: I sent you a push request. my first ever! :-)
12:11ChousukeChouser: you mean a pull request? :/
12:19Chouserbah
12:19Chousersee?
12:19Chouseryes, pull request.
12:43jtalcan someone tell me whats wrong with this function? http://kivasti.com/prime.html
12:43jtalI think it must be something simple
12:44hiredmanjtal: what kind of exception do you get?
12:44jtaljava.lang.ClassCastException: java.lang.Boolean (NO_SOURCE_FILE:0)
12:44hiredmanactually
12:44sethsI'm looking at the implementation of (distinct) and don't understand the usage of :as
12:44hiredmanto start off, you have too man parens
12:44hiredmanmany
12:45jtalaround the if's ?
12:45seths(excerpt) (fn [[f :as xs] seen]
12:45hiredman~destructuring
12:45sethsI understand it's an anonymous function with two arguments
12:45clojurebotdestructuring is http://clojure.org/special_forms#let
12:45hiredmanseths: check out that url
12:46sethsok, thx
12:46hiredmanjtal: the body of the function does not need to be inside a set of parens
12:46hiredmanyou have something like (defn foo [x] (code here))
12:46hiredmanshould be (defn foo [x] code here)
12:47jtalok, are there others I dont need?
12:47hiredmanwhat is happening is the code is returning a boolean, then because of those extra parens the boolean is being called as a function
12:47hiredmanwhich it isn't
12:47jtalahh
12:48hiredmanhard to say, your style is a little off which makes it hard to read
12:48jtalsame error, I must have more extras
12:49hiredmanhttp://paste.lisp.org/display/81021
12:49jtalis that really easier for you to read? :>
12:50jtalI cant ever match up the closing parens that way
12:50hiredmanget a better editor then
12:50jtalwell, I can do it when the cursor is over them
12:50jtal(also, there is nothing better than vim) :>
12:51hiredmanjtal: I doubt it is the same exception
12:51jtaloh, sorry
12:51jtalidiot...I'm editing the version I'm showing you not the one I'm loading
12:52hiredmanyou do have another extra set of parens, but not around anything that returns a boolean
12:53jtalhooray
12:54jtalthanks
12:54hiredmansure
13:40sethsI am struggling to understand how to appropriately use immutable data structures
13:41sethsI keep wanting to do something like this:
13:41seths(def hm (hash-map))
13:41seths(def hm (assoc hm 'foo 42))
13:41sethsI'm pretty sure that's missing the point
13:42sethsI'm using (map) to build a hash-map, but subsequent calls into my code can't see return values from prior calls
13:44sethsI looked at (distinct), but that doesn't do quite what I want
13:53Chouserseths: 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:54Chouserbut 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:10sethsgreat, thanks Cho
14:11jackdempseyhey pjb3 yt?
14:12jackdempseywas hoping to continue discussion re: clojure from #rubynation
14:12jackdempseyanyone else of course is welcome.....i was asking Paul my standard question anytime i look at a new tech
14:13jackdempseywhat problem/task best lets Clojure shine
14:13jackdempseyand whats something you really wouldn't want to do with clojure :-)
14:13jackdempsey(when people say concurrency i think a lot of the time people imagine something closer to erlang when thats not really the case)
14:14itistodayjackdempsey: i think clojure is good for server-side coding
14:14itistodayjackdempsey: and not so great for making GUIs yet
14:14jackdempseyk
14:14itistodaybut that's not really the fault of clojure
14:14itistodaymore of a problem java's always had
14:14jackdempseyso if you had something like, a web framework, with potentially thousands of requests coming at your code per second
14:15jackdempseyits well suited to handle that sort of thing (it seems?)
14:15itistodayi would think so
14:15itistodayplenty of java stuff that does that
14:15jackdempseyi mean i guess a good part of that is actually the jvm at that point
14:15jackdempseyyeah
14:16itistodayi think clojure may also be good for running simulations, especially where concurrency is required
14:16itistodayreally, any sub-system type stuff
14:17itistodayfor example, I used to work on autonomous cars, and they had a communications system written in java
14:17itistodaythat would be used for the various nodes to communicate with each other
14:17jackdempseyk gotcha
14:18itistodaygotta go
14:18jackdempseycool, thx!
14:26hoeckjackdempsey: the list of things I would not use clojure for are more or less restricted by the runtime (jvm)
14:26jackdempseygotcha
14:26hoeckjackdempsey: stuff like window-managers, devicedrivers
14:26jackdempseyyea
14:30sethsChouser: 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:30seths(let [hm (hash-map)] (map (fn [k v] (assoc hm k v)) ["a" "b" "a"] [1 2 3]))
14:30seths({"a" 1} {"b" 2} {"a" 3})
14:31sethsI think i get why, but not how to get past that
14:31seths(I don't need zipmap, but this would be better than the code above right? (zipmap ["a" "b" "a"] [1 2 3])
15:03pjb3jackdempsey: hey
15:03jackdempseyhey man
15:03jackdempseywatching clojure.blip.tv........rich really does a great job with his talks
15:04jackdempseymakes me want to go learn clojure every time i watch one :-)
15:04pjb3Yeah, me too :)
15:04jackdempseyreminds me a bit of git even......smart people love it, seems really powerful, learning curve seems a bit steep at first :-)
15:04pjb3We have to write some sort of clojure library and call it cilantro :)
15:04pjb3Nah, the learning curve isn't that bad
15:04jackdempseyglad he goes into concurrency a bit (and is right), its often spoken about the wrong way
15:05jackdempseyyeah? ok cool
15:05durka42cilantro?
15:05jackdempseyhahah totally
15:05pjb3You'll learn to love the parentheses
15:05jackdempseyhahah
15:05pjb3durka42: inside joke
15:05jackdempseysomeone must be working on a lib packaging system right?
15:05pjb3not sure
15:05durka42i think technomancy is working on something
15:05jackdempseycool
15:06jackdempseyis there a need for something small/easily approached by a novice, that would benefit the community?
15:06durka42yeah, corkscrew
15:06jackdempseyk cool
15:06durka42jackdempsey: what are you interested in? :)
15:06jackdempseyi'm mostly a web programmer
15:06jackdempseydo a lot with ruby these days
15:07jackdempseybut, 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:07jackdempseythat and something i'm working on right now could benefit from a highly efficient concurrent system
15:07jackdempseyas far as linguistic analysis
15:07jackdempseyi guess i can just leverage whatever java's done
15:08jackdempseywhich is a big win
15:08pjb3yeah, that java integration is pretty nice
15:09sgtarrHi all. I am new to Clojure and installed VimClojure. I am having problems with the REPL taking 100% CPU and freezing Vim.
15:09jackdempseyi think i need a "blog in 15 mins" type app to build in clojure
15:09jackdempseyyikes
15:09durka42sgtarr: when you give it input? or just when it tries to start up?
15:09durka42jackdempsey: look at compojure
15:09jackdempseyok
15:09sgtarrTo 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:09sgtarrAnd then it freezes
15:09pjb3compojure is like sinatra
15:10sgtarrI'm using vim 7.2.79
15:10jackdempseynice, ok
15:10durka42sgtarr: OS?
15:10jackdempseyany benchmarks on it?
15:10durka42i'm on a mac
15:10sgtarrdurka42: linux (ubuntu 9.04)
15:11durka42i can test it there
15:11sgtarrdurka42: ok, great
15:11durka42also, kotarak wrote vimclojure and he is here sometimes
15:11durka42he is also using macvim :)
15:12pjb3jackdempsey: Check out stu halloway's book, he has a clojure version of ant that he explains in the book
15:12duck1123has anyone here managed to launch a clojure repl from within a java program
15:12sgtarrdurka42: noted :)
15:12jackdempseyk cool thx paul
15:12duck1123I'm still trying to get a repl from within a maven plugin
15:13sgtarranyone using the eclipse-dev plugin?
15:13sgtarrI 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:14duck1123tried it, was inferior to slime, so i stayed with that
15:14pjb3jackdempsey: Have you done a lot of Java programming?
15:14sgtarrdurka42: Slime runs within Emacs right?
15:14durka42yes
15:14sgtarrhm I'd rather not run another OS :)
15:14durka42hahaha
15:15jackdempseypjb3: nah, been a long time
15:17sgtarr,(+ 2 3)
15:17clojurebot5
15:17sgtarrheh
15:17sgtarr,(doc map)
15:17clojurebot"([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:18sgtarrdurka42: did you test inside the virtual machine?
15:21durka42sgtarr: i'm waiting for it to upgrade from 8.04 to 9.04
15:22durka42so it will be a while
15:24durka42sgtarr: also what versions of vimclojure and clojure are you using?
15:27Chouserseths: you may want 'reduce'
15:28sgtarrdurka42: Both latest frmo svn
15:28sgtarrfrom*
15:33sgtarrIt happens too often to make VimClojure useful before it's fixed :/
15:33durka42do you get anything in the console?
15:34sgtarr^WW then ESC then 'i' and it freezes
15:34sgtarrdurka42: you mean the ng server?
15:34durka42yeah
15:34durka42sgtarr: stop pressing ^WW :)
15:35sgtarrdurka42: Impossible, it'll definitely happen at some point even if I really tried :)
15:35sgtarrIt's like avoiding vim going "beep"
15:35sgtarrdurka42: basically, I need to change between REPL and the source a lot :/
15:36sgtarrhi kotarak, we were just talking about VimClojure
15:36kotarakHi. Only good things, I hope. :)
15:36sgtarrI am experiencing a crash upon ^WW in the REPL, do you have a sec? :)
15:36durka42and i was failing to help :)
15:36durka42kotarak: unfortunately not :p
15:36kotarakErm. But only a sec. I might have to drop out suddenly.
15:37sgtarrTo 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:37sgtarrClojure from svn, VimClojure from svn tonight
15:37sgtarr(I'm running Vim 7.2.79 on Ubuntu 9.04)
15:37durka42do you mean vimclojure from hg? or are you downloading an obsolete version from somewhere
15:37kotarakOk. Just a sec.
15:38kotarakVC was never in SVN, only HG.
15:38sgtarractually, I am not using from svn, sorry. It's the latest one from vim.org scripts
15:39sgtarrOnly the clojure / clojure-contrib are from svn, on my system.
15:39durka42you could try latest VC from bitbucket
15:39kotarakHmmm... No freeze here.
15:39sgtarrkotarak: do you clear the lines all the way to the top using ^WW ?
15:40sgtarrkotarak: it doesn't always happen here, but about 75% of the time
15:40kotarakOk. Let me see.
15:41kotarakNo. Works all the time.
15:41kotarakI'm on 7.2.148.
15:41sgtarrkotarak: Oh, it only freezes if you do 'i' followed by enter
15:41durka42kotarak: sgtarr is on ubuntu 9.04
15:41kotarakThat's clear.
15:41sethsChouser: very cool
15:41durka42because VC is looking for the Clojure=>
15:41kotarakIt looks for 'Clojure=>'
15:43durka42dammit, now i have to kill vim >:o
15:43sgtarrkotarak: for some reason, I reproduce it quite quickly again and again when switching between source and the REPL
15:43sgtarrkotarak: most of the time "Clojure=>" is actually visible
15:43kotarakAt the moment it works well, if you treat it right. But it's not very robust.
15:43kotarakHmm..
15:43kotarakThat should not happen.
15:44sgtarrkotarak: 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:45kotarakNo. No Enter. Just make undo to fix the prompt.
15:45kotarakWithout prompt it will freeze.
15:45sgtarrI see...
15:45kotarakHitting enter will not produce a new prompt.
15:45sethsChouser: I owe you a beer, reduce worked perfectly
15:46sgtarrkotarak: 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:46sgtarrkotarak: Say I'm coding in this for an hour, I am 100% sure I'm going to screw it up at least once :)
15:47kotarakVim is not really made to provide a repl-like thing.
15:47kotarakThis whole buffer wrapper is a big hack!
15:47kotaraks/wrapper/repl/
15:47sgtarrkotarak: 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:47kotarakYou can start your own Repl.
15:47durka42kotarak: it's a very useful hack :)
15:47kotarakStart the nailgun-server from there.
15:48kotarakAnd there you go.
15:48kotarakYou can work in the Repl while using the same process for VC.
15:48sgtarrkotarak: Oh I see, so then I just do \ef ?
15:49kotarakYes.
15:49sgtarrThat's neat
15:49kotarakHave to drop out now.
15:49sgtarrDid you also code nailgun?
15:49kotarakSorry
15:49kotarakno
15:49sgtarrLater, thanks
15:49kotarak3-party
16:23jtalanyone have a good link to debugging clojure code?
16:27duck1123http://github.com/GeorgeJahad/cljdb/tree/master
16:27duck1123for emacs though, and I haven't gotten it working yet
16:28jtaloh I use some java debugger for debugging?
16:30duck1123it's all JVM underneath, so java debuggers should work
16:30jtalok, I'll look into jdb
16:41duck1123I'm making progress. I'm actually able to see the repl prompt in my mvn goal now. Still not respoonding to input however
16:42replacajtal: 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:43jtalcool ill check it out too
17:14DTrejoCan someone tell me why this does not work? http://mibbit.com/pb/SRsipN
17:15DTrejothanks
17:15durka42DTrejo: define "does not work"?
17:16durka42oh, because lazy-cat does not return a vector
17:16durka42you want (nth fibs 10)
17:16durka42or convert fibs to a vector first
17:16DTrejooh, so
17:17DTrejohow could I convert it?
17:17DTrejo*how would I convert it?
17:18durka42not sure you can convert it while keeping it lazy
17:18durka42but you can always use nth
17:19DTrejoI guess I need to look up "nth" I'm just learning clojure now, so I haven't heard of it
17:19durka42it's for indexing into collections
17:19durka42as in, the nth element
17:19arohner,(doc nth)
17:19clojurebot"([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:20DTrejothanks durka42 and arohner
17:20arohnerthe functions doc and find-doc are your friends
17:20arohneroh, source is useful too
17:22DTrejoI've been using the clojure eclipse plugin, is that a bad idea to use to learn?
17:23mrsoloit wasn't very good when i checked it out few weeks ago
17:23DTrejoyeah I don't love it either
17:23mrsoloi am using emacs + slime right now
17:23DTrejowould you recommend anything?
17:23DTrejooh ok, I do have clojurebox installed
17:23arohnerif you know emacs, slime is definitely the way to go
17:24DTrejo(I don't know emacs)
17:24mrsolothere is a plug in for netbean
17:24mrsoloi heard that one is better
17:24mrsolocompares to eclipse that is
17:24duck1123I found the eclipse plugin to be rather limited
17:24duck1123but maybe I'm just spoiled by slime
17:25mrsoloit is limited missing few features but eclipse/netbean are bunch stronger on java side compares to emacs..so..
17:25DTrejohttp://clojure.bighugh.com/
17:26DTrejohmm alright
17:26DTrejoenclojure is made in close partnership with rich hickey right?
17:26duck1123I'm noticing that emacs seems a little slow to respond for me when coding java right now with JDE installed
17:27duck1123perhaps it's my disgust with this java code clouding my opinion however
17:28DTrejothanks for the help and advice guys, I'm off
17:59jackdempseysigh
17:59jackdempseyand now i remember why i hated java :-)
17:59jackdempsey(*#$#(*@#R classpath...
17:59jackdempseylemme type this out....maybe i'll realize the answer in doing so
17:59jackdempseytrying to build vimclojure
18:00jackdempseyhave everything set
18:00jackdempseyrc/vimclojure-2.1.1/build.xml:66: Could not find clojure.lang.Compile. Make sure you have it in your classpath
18:00hiredmanis clojure in your classpath?
18:01jackdempseyyeah so i've done this:
18:01jackdempseyCLASSPATH=/Users/jack/Library/Java:/opt/jars/clojure-contrib.jar:/opt/jars/clojure.jar
18:01jackdempseyand looking at ant diagnostics
18:01jackdempseythey're in there as well
18:01jackdempseyand i can load up clojure just fine
18:02hiredmandid you do the thing with the properties file?
18:02jackdempseyyep it has the lines specified
18:02jackdempseyclojure.jar = /opt/jars/clojure.jar and others
18:04jackdempseythis loads
18:04jackdempseyjava -cp /opt/jars/clojure.jar clojure.lang.Repl
18:04jackdempseyas does java clojure.lang.Repl
18:04jackdempseyand given that the latter works, i would have thought the classpath stuff was ok
18:05jackdempseyi could easily be doing something boneheaded..havne't run ant in forever
18:06hiredmanI haven't built vimclojure in a while
18:06jackdempseygrabbing the latest java update for leopard....doesn't seem like that would be related to this tho
18:06jackdempseyyeah i mean, at this point i almost odn't really care about it
18:06jackdempseyjust want to figure out whats wrong as i need to get used to this :-)
18:09hiredmanant runs fine for me
18:09hiredman:/
18:09jackdempseyheh
18:10jackdempseyi saw something about building clojure-contrib AOT
18:10hiredmanvimclojure's author is in here fairly regular like
18:10jackdempseycool
18:10jackdempseyhmm
18:10jackdempseydamn
18:10jackdempseythought clean then a rebuild would do it
18:11hiredman~seen kotarak
18:11clojurebotkotarak was last seen quiting IRC, 141 minutes ago
18:11jackdempseyoh yea saw him before
18:11hiredmanjust missed him
18:11jackdempseyi mean doesn't the fact that i can do
18:11jackdempseyjava clojure.lang.Repl
18:11jackdempseymean clojure.jar is in CLASSPATH
18:11hiredmanyeah
18:11jackdempseydoes ant run in some environment where thats not set or something
18:12hiredmanon a side note it's clojure.main these days
18:12jackdempseyyea saw that somewhere
18:12jackdempseyinterestingly enough
18:12jackdempseythat doesn't work
18:12jackdempseymaybe my clojure is too old?
18:12hiredmanHmmmm
18:12hiredmanpossible, where did you get it?
18:12jackdempseysvn a while ago
18:13hiredmanclojure.main has been around for a while
18:13jackdempseyheh maybe its really old then
18:13hiredmanjackdempsey: I would grap the 1.0 zip
18:14hiredmanhttp://code.google.com/p/clojure/downloads/list
18:14jackdempseyah
18:14jackdempseynew error now
18:14jackdempseyhehe
18:14jackdempseyBUILD FAILED
18:14jackdempseyjava.io.FileNotFoundException: Could not locate clojure/contrib/pprint__init.class or clojure/contrib/pprint.clj on classpath:
18:14jackdempseyk i've seen that error
18:14jackdempseylemme see
18:14hiredmanok
18:14hiredmanthat is an issue with not compiling clojure-contrib
18:15jackdempseyyeah so i just tried that the way it was specified somewhere on line
18:15jackdempseyant -Dclojure.jar=../clojure/clojure.jar
18:15hiredmanthe latest vimclojure depends on pprint and pprint depends on AOT
18:15jackdempseyand get a nice
18:15jackdempsey[java] java.lang.Exception: Name conflict, can't def memoize because namespace: clojure.contrib.memoize refers to:#'clojure.core/memoize (memoize.clj:19)
18:15jackdempseyso i'll get that 1.0 zip i think :-)
18:15hiredmanhmmmm
18:15jackdempsey(appreciate the help btw)
18:15jackdempseythe clojure.jar i just built was from svn
18:15jackdempseyeasily could be f'ed
18:17jackdempseyk got zip.....different structure than i expected :-)
18:17hiredmanit's source + jar
18:18jackdempseyah it unzpped to top level
18:18jackdempseyheh sigh k brb
18:18jackdempseythere we go
18:19jackdempseyso i can drop that jar into place
18:19jackdempseyand rebuild clojure-contrib?
18:19hiredmanmight be a good idea
18:21jackdempseyhmm can't find lazy cons for some reason
18:21jackdempsey[java] java.lang.NoClassDefFoundError: clojure/lang/LazyCons
18:21hiredmanwell
18:21hiredmanI think you need a new contrib now
18:21hiredmanlazy-cons was chopped a few months before 1.0
18:22hiredmanso if something is looking for it, it is old
18:22hiredman~contrib
18:22clojurebotcontrib is http://code.google.com/p/clojure-contrib/
18:22hiredmanunfortunately there are no prebuilt releases for contrib
18:22jackdempseyk think this worked
18:23jackdempseyhmm yea i got contrib earlier today
18:23hiredmanfrom where?
18:23jackdempseythat url
18:24jackdempseyso contrib built
18:24jackdempseyback to vimclojure now :-)
18:25hiredmanin 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:26jackdempseyoh, you know, i think it wasn't google code
18:26jackdempseyas downloads is blank
18:26jackdempseyyeah 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:26jackdempseywhich means contrib didnt' build correctly either huh
18:26hiredmanwell
18:26jackdempseyor it was the old one as you're saying
18:26hiredmanback when LazyCons existed there was no pprint
18:26jackdempseyso build clojure-contrib from source?
18:27jackdempseyhmm
18:27jackdempseyheheh
18:27hiredmanyeah
18:28jackdempseyyea that source had an svn info of the old repo
18:28jackdempseyso clojure-contrib needs that -D flag for the AOT as well as vimclojure right?
18:29hiredmanyeah, contrib needs to know where clojure is to AOT compile
18:29jackdempseyyea seeing that now
18:29jackdempseynice error message
18:29jackdempseyk co contrib is good
18:30jackdempseytrying vim again
18:30jackdempseyshit
18:30jackdempseyhehe
18:30jackdempseystill that pprint error
18:30jackdempseywell
18:30jackdempseylemme just fiddle for a sec, i have much better understanding of this all now
18:30clojurebotfor is a loop...in Java
18:31jackdempseyshould be able to get it
18:32jackdempseyyeah
18:32jackdempseygot it
18:32jackdempseyone of those
18:32jackdempseybeen looking at this forever, forgot to copy contrib to /opt/jars
18:32jackdempseybuilt just fine
18:32jackdempseyphew
18:32hiredmanexcellent
18:32jackdempseythey need a feature in irc
18:34jackdempseyhehehe
18:34jackdempseynow that this yak shaving is done
18:34jackdempseyi forget what i was trying to do
18:34jackdempsey:-d
18:34jackdempsey:-D
18:35jackdempseyoh yes, compojure
18:35hiredman~shave that yak!
18:35clojurebotfastest sheers on IRC
18:35jackdempseyhehehe
19:03hiredman,(doc alter)
19:03clojurebot"([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:03hiredman,(doc ref-set)
19:03clojurebot"([ref val]); Must be called in a transaction. Sets the value of ref. Returns val."
21:30qrushhey folks
21:30qrushis the official repo at github now?
21:31qrushanyone?
21:32arohnerI don't think it's official because rhickey hasn't announced it
21:32arohnerbut it's probably in-sync with svn
21:33qrushI'd love to feature it for github rebase
21:33qrushbut i'd rather not if it's not official
21:37qrush:/
21:51ChouserI think it's official
21:52ChouserI've not seen an announcement except here, but there's a rev pushed there that's not in googlecode svn (I think)
21:52qrushwell it's not like it can hurt right? any pr is good pr :)
21:52arohnerChouser: how is it official without an announcement? :-)
21:53Chouserwell, it's got newer rhickey code than svn -- what more do you want?
21:54arohnerthat makes it de-facto
21:54arohner:-)
21:54Chouserah, ok.
21:58blbrown_win2I 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:00blbrown_win2I think I will call it readonlystate
22:32replacablbrown_win2: this isn't a lock (locks are grabbed by a thread, held for a time, and then released)
22:33replacablbrown_win2: and locks have no value associated with them
22:33qrush /whois replaca
22:33qrushbah
22:33qrushsorry :|
22:34replacablbrown_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:34replacaqrush: a lot of poeple have wanted to know that, but noone has gotten a satisfactory answer :-)
22:34qrushhaha
22:35qrushi'm really just looking for anyone with information on the transition to github ;]
22:36replacablbrown_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:36replacaqrush: I know about as much as anyone besides Rich
22:36Chouserqrush: there's not much information to be had, I believe.
22:37replacaqrush: (as do Chouser, etc.)
22:37replacaqrush: it's in process, but not done yet. Rich is being very methodical
22:37qrush:/ well, i don't think it'll hurt to broaden its exposure. I won't say it's 'official'
22:37replacawhich is a "good thing"
22:38hiredmanreplaca: I think a future is more like what he is asking about then a promise
22:38replacaqrush: I would say that it will probably be official within the week, but I don't know that for sure
22:38qrushalright :)
22:39qrushwell, i'm going to do no harm except for bringing more attention to it
22:39qrushi don't think that should cause any issues.
22:40replacahiredman: 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:40hiredmanyeah
22:40replacaqrush: but be careful, it looks like it's happening, but Rich hasn't committed to it and may still change his mind
22:41qrush:/
22:41replacaqrush: consider it "still under investigation"
22:41qrushwell i'm not going to call it the 'official' repo
22:41replacabut personally I think it will happen
22:41replacaqrush: and, if Rich changes his mind, the repo will go away
22:41qrushi'm just going to point out what features the languages it has and encourage people to fork
22:42replacaqrush: Why fork?
22:42qrush...because that's how people contribute on github?
22:42clojurebotgithub is git://github.com/kevinoneill/clojure.git
22:42replacaunless you want to create your own version or fix bugs and send patches
22:42hiredmanforking is fun for consenting adults
22:43hiredmanclojurebot: forget github
22:43clojurebotI forgot github
22:43qrushreplaca: I'm not talking about creating their own version of the language/project...this is more about watching and contributing :)
22:43replacaqrush: yeah, but clojure is really a set of projects. More folks will probably find value in building on top of clojure
22:43hiredman~github is <reply>http://github.com/richhickey/clojure/tree/master
22:43clojurebotIn Ordnung
22:44replacaclojure-contrib, compojure, ring, incanter, .... tons of interesting stuff
22:44hiredmanreplaca: someone could fork 1.0 an maintain a bugfix branch
22:44replacathat's where I think more of the action will be
22:44hiredmanyou know, cloud source it :P
22:45replacasure, 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:46ChouserI 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:46replacaI just think that there are a lot of ways to contribute
22:46replacaChouser: yes, by all means fork to create patches and fork if you want to do something special with the language itself
22:46qrushChouser: That's one way...
22:47qrushrails only accepts patches
22:47qrushit's really up to the project maintainers
22:48Chouserbut rhickey hasn't pulled it yet, so I may be off base