#clojure logs

2008-09-04

00:00Myomaby the way I don't intend to hack it so maybe this is slightly off topic ..
00:01arohnerone thing that helped me was to read the stack trace
00:02arohnerdo something that will cause a stack trace, and then read the stack trace
00:02arohneri.e. (foo 1)
00:02arohnerand then start at something that looks interesting, like Repl.main or eval()
00:03arohnerand then go over to Repl.java and follow the code
10:40Chouserah! I just now got the point about a partial refer of 'clojure and then a later full default refer.
10:52rhickeyChouser: ok, so now what about defns?
10:53Chousermakes sense to me
10:53rhickeyI can work with your patch as-is, but I think I'm locked out of checkins on SF today
10:54Chousergah
10:54ChouserI didn't hear a whole lot of objection to moving the repo to google code.
10:54rhickeythis kind of thing has been pretty rare on SF, I wonder how Google Code compares?
10:55Chouserthat is one of the benefits of a distributed vcs (git or hg instead of svn) -- the "central" server isn't all that important anymore.
10:55rhickeyhttp://code.google.com/p/clojure/ is in the wings
10:56rhickeyChouser: I'm not sure that's true - where do I put my stuff so you can get it?
10:56ChouserSince I'm using git-svn, I have a complete history of the clojure repo locally. I could look into importing that to google if you want.
10:56rhickeywhere's the canonic version, etc
10:57Chousersure, there's still value in a generally available canonical server. But routing around damage is much easier.
10:57rhickeyChouser: I'll have to move to EPL before I put it up
10:57Chouseroh, that's right. ok.
10:58rhickeyChouser: I think DVCS is neat, but maybe not a good fit for the benevolent dictator model :)
11:02Chouserheh, well, I don't think that matters much. We're all using dvcs anyway, even if you aren't.
11:02rhickeyright
11:02Chouserok maybe not "all".
11:04Chouserbut with dvcs if you're in a situation like this where the central server's down, you can continue to do checkins, and all your data and meta-data can be synced up later -- either with the same central server or a new one (in the case of the old one going away forever).
11:04Chouserof course the tool integration is not as deep yet.
11:05ChouserYou'll be using dvcs eventually, so I don't really feel I need to convince you right now. :-)
11:06rhickeyChouser: I understand, but not having that forces a 'working head' mentality that multiple local working copies doesn't, plus far less merging (i.e. none for me)
11:07rhickeyI've used Mercurial for personal things, much more of a hassle than SVN built into IntelliJ
11:07cemerickI guess I'll have to get over my google code aversion issues ;-)
11:08rhickeyI routinely work on Clojure on 3 different machines in different locations, and when I move I need to check in - the result is lots of working checkins
11:09rhickeycemerick: what are your issues with google code?
11:10cemerickrhickey: nothing substantive, really. I think we had this discussion before, though. I don't trust google on a variety of levels, but that's my problem more than anything else.
11:11rhickeyI'd love to hear from someone re: uptime etc
11:11cemerickI don't actually think google code provides much more than svn + trac (if you were to host such things on your own, although I'm sure there are trac hosts floating about). Given their resources, I was pretty disappointed in it.
11:12ChouserI'm happy to know that there are various dvcs copies of the clojure repo around -- my own, github, hg mirrors, etc. If google (or sf.net for that matter) loses all the data, we'll be able to reconstitute it with very little fuss.
11:13rhickeyRight now Clojure doesn't even have trac, and I'm not interested in hosting anything. So the issue tracking is something I'm looking for from google code
11:13Chouserreally? You're giving in on issue tracking?
11:13rhickeyChouser: I fully acknowledge the superiority of DVCS in the large
11:13rhickeyChouser: I didn't say anyone else could enter issues
11:13Chouserhehe
11:14rhickeyWell, I'm still trying for 'no known bugs'
11:15cemerickrhickey: personally, I'd much prefer something like assembla, but this is your baby :-)
11:15rhickeyBut I keep a todo list that's not web based and is private - keeping it online will let people know where things are going
11:20albinorhickey: the reason you don't want an issue tracker is for the perception of no known bugs?
11:21rhickeyalbino: no, I fix bugs as they are reported, rather than put them on a list
11:22rhickeycemerick: assembla looks neat, have you used them?
11:23cemerickrhickey: only in passing -- we host all of our stuff in-house (our svn and project mgmt stuff reside on the only server we don't lease or have colo'd somewhere). Friends of mine have used it heavily, and have very good things to say.
11:24cemerickI presume you'd be able to get them to set you up with a full-featured account, given that it's an open source project.
11:29ozzileeDoes anyone know if it would be possible for multiple versions of a java library to be loaded at the same time, cordoned off in different namespaces perhaps?
11:30rhickeycemerick: I didn't see that offered, but did see this: http://blog.assembla.com/assemblablog/tabid/12618/bid/5430/An-explosion-ate-our-servers-how-cool-is-that.aspx
11:30cemerickozzilee: you would need to use different classloaders -- same as in regular java
11:31ozzileecemerick: Hmm. Ok thanks.
11:32cemerickrhickey: hrm, unapologetically in startup mode, I suppose
11:32rhickeycemerick: right
12:17jgracindefault target jvm version on Java 6 is 1.4, right?
12:17jgracinin javac, I mean
12:19jgracinnope.
15:17jgracinrhickey: the documentation on reader forms claims that symbols beginning or ending with : are reserved by Clojure. Surely, you didn't mean keyword literals, did you? Am I understanding something incorrectly?
15:18rhickeyif it begins with : it's not a symbol. "reserved by Clojure" means its interpretation is reserved, i.e. it can't be used generally as a symbol
15:19jgracinoh, ok.
15:20jgracinwhat is the equivalent of keywordp in CL? how do I check whether something is a keyword?
15:21rhickeykeyword?
15:21Chouser(keyword? :foo) ==> true
15:21jgracinaieee! :-) how stupid can I get...
15:21jgracinthanks
15:22rhickeyfind-doc is your friend: (find-doc "keyword")
15:22jgracincool! I didn't know about that one.
15:29wlrwill it always be the case that recompiling anything (not just macro(s)) in a :use'd ns requires recompiling a :use'ing ns for the :use'ing ns to see the new effects?
15:31rhickeywlr: depends on what you are trying to 'see', new definitions of existing fns are seen without any recompiling
15:31rhickeygetting refers to new names requires re-using (probably by just re-evaluating the defns form)
15:33wlrrhickey: that's what i thought but i swear i had to do a recompile after having changed a function in a a:use'd ns.
15:34rhickeywlr: shouldn't be
16:22wlrrhickey: just for the record, i mistakenly compared old output with (duh!) old output leading to the faulty conclusion that the change in the :use'd ns wasn't visible.
16:22wlrembarassing!
16:22rhickeywlr: np, glad it works
18:17rapidoping
20:04joubertHi,
20:04rhickeyhi
20:06joubertI'm trying to determine whether the parameter to a function is a map.
20:07joubertThere is (vector?) but I am unable to find an equivalent for maps
20:07joubert(according to the API docs anyway)
20:07joubertnot sure whether it is in the code base?
20:08joubertI guess I should look, thinking about it now
20:08jouberthmmm, nevermind
20:08rhickey(map? m)
20:09joubertthanks, Rich. what about a predicate for lists?
20:11rhickey(instance? clojure.lang.IPersistentList x)
20:11joubertok, great.
20:19joubertbtw, I see that (map?) is on the main api doc page, but not on the page for data structures where the other map forms are documented.
20:20rhickeynot every function will appear in the descriptive docs
20:21joubertoh ok; but will in api main?
20:21rhickeythere's also find-doc at the repl to help you find things that are only in the SVN and not in the API reference
20:21rhickeyAPI docs document the release
22:10arohnerlocal variables are not vars, right?
22:21DrewRYou mean those defined by let?
22:21arohneryes
22:21DrewRI think they're Vars.
22:21DrewRThey're immutable.
22:22DrewRI'm not sure how to tell though.
22:22DrewRuser> (let [x 3] (class x))
22:22DrewRjava.lang.Integer
22:23arohnerwell, (let [foo 5] (var foo)) doesn't complain
22:30arbschtI don't think they're Vars
22:30arbschtlocal bindings are not variable, and Vars are mutable
22:33arbschtarohner: that form should complain. maybe you have defined foo globally previously?
22:34arohnerarbscht: ah, you're right
22:34arohnerI had previously defined it
22:34arohnerafter unmapping, Caused by: java.lang.Exception: Unable to resolve var: foo in this context
22:34DrewRVars are mutable?
22:35DrewRHow so?
22:35arohnerusing set!
22:36arbschtVars exist for the purpose of thread-local mutability :)
22:37DrewRAh, you're right. I just never use them that way.
23:11mbeaujust wondering where I should look in the source code to understand how the '.' operator works?
23:19arohnermbeau: this is kind of throwing you off the deep end, but clojure/src/jvm/clojure/lang/Compiler.java
23:19arohnersearch for DOT
23:19arohnera lot of Compiler.java has to do with parsing the source, and it's kind of hard to escape that
23:21mbeauarohner: thanks, that's where I was looking around, but as you warn it is pretty tough to see what is going on
23:23mbeauok, actually I see that HostExpr is a good place to start
23:28mbeaureally, the thing I'm curious about is how the (.foo ...) syntax is implemented
23:35mbeauyikes
23:38arohnermbeau: ?