#clojure log - Apr 28 2008

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

9:26 asbjxrn: How can I tell which functions are defined in a library?

9:26 Hi, btw. :)

9:28 rhickey: (keys (ns-publics (find-ns 'clojure)))

9:30 asbjxrn: Thanks.

9:32 Hmm. 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.

9:33 But even if I call (zip-filter/xml-> I get a "No such var" error

9:34 rhickey: I only see xml-zip

9:35 oh, wait, zip-filter is Chouser's lib?

9:35 asbjxrn: Yup. The Contrib one.

9:35 * rhickey was looking at zip

9:35 rhickey: he usually checks in, will have to wait for him on that one

9:36 asbjxrn: No problem.

9:37 Ah. I see, he changes namespace to zip-filter-xml halfway down the file.

9:37 rhickey: tricky

9:40 asbjxrn: It is.

9:42 His "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

9:43 rhickey: I don't think 'use' is his

9:44 asbjxrn: Ah, well, _the_ "use" function then :)

9:44 rhickey: might be something to bring up on the group

9:47 asbjxrn: I guess what I was looking for was "refer". There was some talk about a "provide" functionality, wasn't there?

9:47 rhickey: yes, that's in the same contrib lib as use, I think

9:54 asbjxrn: More 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.)

9:56 rhickey: I 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

9:57 I've already promised support for something like use/provide

10:06 asbjxrn: I 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:08 jteo: that implies rhickey will keep breaking things.

10:08 rhickey: I 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:08 jteo: breaking things?

10:08 asbjxrn: jteo, not really.

10:09 jteo: i refer to the...*ahem* continous evolution of Linux.

10:09 rhickey: Clojure is so tiny

10:10 in comparison

10:10 asbjxrn: Most things are :)

10:12 jteo: ;)

10:12 asbjxrn: You got a point, by "offloading" stuff to the jvm/java libraries clojure itself can stay small.

10:13 jteo: afterall, why reinvent the wheel?

10:36 rhickey: cgrand: made else form optional in if-let

10:46 cgrand: rhickey: thanks! Would you accept a patch that add {:= [...]} destructuring or are you (or chouser) already working on it?

11:03 rhickey: cgrand: 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:06 hoeck: cgrand: what does {:= [..]} destructure on?

11:07 rhickey: hoeck: http://n01se.net/chouser/clojure-log/2008-04-24.html

13:03 Chouser: ah, he left. Yeah, I change namespaces half-way through.

13:03 I haven't tried to use the lib and "use" things yet.

13:04 I guess if I want two namespaces, I should provide two separate files?

14:09 cgrand: I've missed refs implements IFn too! neat...

14:10 rhickey_: don't count on that

Logging service provided by n01se.net