#clojure logs

2008-04-28

09:26asbjxrnHow can I tell which functions are defined in a library?
09:26asbjxrnHi, btw. :)
09:28rhickey(keys (ns-publics (find-ns 'clojure)))
09:30asbjxrnThanks.
09:32asbjxrnHmm. I'm just playing with the zip-filter library. It has some examples at the bottom which refers to functions not exported(?) from the library.
09:33asbjxrnBut even if I call (zip-filter/xml-> I get a "No such var" error
09:34rhickeyI only see xml-zip
09:35rhickeyoh, wait, zip-filter is Chouser's lib?
09:35asbjxrnYup. The Contrib one.
09:35rhickeyhe usually checks in, will have to wait for him on that one
09:36asbjxrnNo problem.
09:37asbjxrnAh. I see, he changes namespace to zip-filter-xml halfway down the file.
09:37rhickeytricky
09:40asbjxrnIt is.
09:42asbjxrnHis "use" assumes that a namespace is in its own file, so (use 'zip-filter-xml) fails since those functions are actually in zip-filter.clj
09:43rhickeyI don't think 'use' is his
09:44asbjxrnAh, well, _the_ "use" function then :)
09:44rhickeymight be something to bring up on the group
09:47asbjxrnI guess what I was looking for was "refer". There was some talk about a "provide" functionality, wasn't there?
09:47rhickeyyes, that's in the same contrib lib as use, I think
09:54asbjxrnMore of a future plans/visions question: How much of a "dictator" do you plan to be? So far I guess there is a pretty clear division between clojure proper and the contrib libraries. (I don't think a certain level of dictatorship is a bad thing, don't misunderstand me.)
09:56rhickeyI think you have to have a dictator for the core language, else it becomes a mess. OTOH, I plan to incorporate stuff from contrib once it is baked and I get time to understand it
09:57rhickeyI've already promised support for something like use/provide
10:06asbjxrnI guess if it takes off in a big way and you run out of time to keep up with everything, some users will naturally become qualified/involved enough that they could become lieutenants. (Isn't that what the Linux guys call the second in commands?)
10:08jteothat implies rhickey will keep breaking things.
10:08rhickeyI hope to keep the core small. That's part of the power of it, and greatly helps reliability. Libraries OTOH are another question, and I look forward to seeing what people feel they need
10:08rhickeyjteo: breaking things?
10:08asbjxrnjteo, not really.
10:09jteoi refer to the...*ahem* continous evolution of Linux.
10:09rhickeyClojure is so tiny
10:10rhickeyin comparison
10:10asbjxrnMost things are :)
10:12jteo;)
10:12asbjxrnYou got a point, by "offloading" stuff to the jvm/java libraries clojure itself can stay small.
10:13jteoafterall, why reinvent the wheel?
10:36rhickeycgrand: made else form optional in if-let
10:46cgrandrhickey: thanks! Would you accept a patch that add {:= [...]} destructuring or are you (or chouser) already working on it?
11:03rhickeycgrand: when I thought more about := I realized there is a problem with strings that are not valid symbols, decided to hold off for now
11:06hoeckcgrand: what does {:= [..]} destructure on?
11:07rhickeyhoeck: http://n01se.net/chouser/clojure-log/2008-04-24.html
13:03Chouserah, he left. Yeah, I change namespaces half-way through.
13:03ChouserI haven't tried to use the lib and "use" things yet.
13:04ChouserI guess if I want two namespaces, I should provide two separate files?
14:09cgrandI've missed refs implements IFn too! neat...
14:10rhickey_don't count on that