2008-04-28
| 09:26 | asbjxrn | How can I tell which functions are defined in a library? |
| 09:26 | asbjxrn | Hi, btw. :) |
| 09:28 | rhickey | (keys (ns-publics (find-ns 'clojure))) |
| 09:30 | asbjxrn | Thanks. |
| 09:32 | asbjxrn | 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. |
| 09:33 | asbjxrn | But even if I call (zip-filter/xml-> I get a "No such var" error |
| 09:34 | rhickey | I only see xml-zip |
| 09:35 | rhickey | oh, wait, zip-filter is Chouser's lib? |
| 09:35 | asbjxrn | Yup. The Contrib one. |
| 09:35 | rhickey | he usually checks in, will have to wait for him on that one |
| 09:36 | asbjxrn | No problem. |
| 09:37 | asbjxrn | Ah. I see, he changes namespace to zip-filter-xml halfway down the file. |
| 09:37 | rhickey | tricky |
| 09:40 | asbjxrn | It is. |
| 09:42 | asbjxrn | 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 |
| 09:43 | rhickey | I don't think 'use' is his |
| 09:44 | asbjxrn | Ah, well, _the_ "use" function then :) |
| 09:44 | rhickey | might be something to bring up on the group |
| 09:47 | asbjxrn | I guess what I was looking for was "refer". There was some talk about a "provide" functionality, wasn't there? |
| 09:47 | rhickey | yes, that's in the same contrib lib as use, I think |
| 09: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.) |
| 09: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 |
| 09:57 | rhickey | 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 | rhickey | 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 | rhickey | 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 | Chouser | I haven't tried to use the lib and "use" things yet. |
| 13:04 | Chouser | 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 |