2008-08-01
| 07:23 | rhickey | Could someone verify I did the right change in pom.xml to match the latest build.xml? |
| 07:25 | cemerick | I'm afraid I don't know a damn thing about maven. More of an ivy fellow, myself. :-) |
| 07:26 | rhickey | me neither |
| 07:26 | cemerick | rhickey: I think there's a bug in MultiFn.findAndCacheBestMethod -- it's tossing an exception at line 115, which prevents .getFn from returning any default method. |
| 07:27 | rhickey | cemerick: given what input? |
| 07:28 | cemerick | given any input that doesn't satisfy isa? in the methodTable -- i.e. :default will never be returned by .getFn |
| 07:28 | cemerick | or, the :default fn |
| 07:29 | rhickey | ah |
| 07:29 | cemerick | I stumbled across this while trying to use contrib/test-is, which uses some multimethods in its 'is' macro. |
| 07:30 | cemerick | ...and the compiler was ditching because it wasn't finding the :default method impl |
| 07:33 | rhickey | cemerick: fixed - thanks |
| 07:35 | cemerick | rhickey: no, thank you :-) |
| 07:36 | cemerick | rhickey: random Q: do you have much of a notion of a "roadmap" in mind, in terms of releases and such? |
| 07:39 | rhickey | getting this inheritance stuff (multimethods), and directories/lib stuff in are two biggies for me. Just looking forward now to Oct, which marks 1 year of Clojure in the wild, I'd like to finesse what I have and maybe call it 1.0? |
| 07:39 | cemerick | Sounds good |
| 07:40 | cemerick | do you have a test plan in mind leading up to that and afterwards? |
| 07:41 | rhickey | what I would love is a community supplied test suite - I would happily run it before every checkin. Being written by others would be an essential second check on the logic and fn description accuracy |
| 07:42 | rhickey | also a community supplied example suite |
| 07:46 | cemerick | The former is pretty critical, I think -- though I don't think any existing code-contribution model would work (too many tests would need to come from too many people for there to be only a handful of test committers). Maybe we can set something up so that tests can be pulled from a wiki. |
| 07:46 | cemerick | ...which might be able to double as the example suite? |
| 07:46 | rhickey | also on my todo - JavaDoc for the Clojure Java library, and docs for Clojure hosting/interop scenarios |
| 07:47 | rhickey | cemerick: not sure if tests could do both, but would for sure be a start |
| 07:48 | rhickey | around 400 functions in Clojure namespaces |
| 07:49 | cemerick | yeah, a test wiki certainly wouldn't be polished as one would like for tutorial material, but there should be plenty of material for people to look at, and absorb idioms from |
| 07:49 | rhickey | testing the Java... |
| 07:51 | cemerick | yeah a wiki approach wouldn't work for the Java (although one would hope that clojure-based tests would exercise the Java bits thoroughly anyway) |
| 07:52 | rhickey | cemerick: yes, the Clojure tests would shake out the Java pretty well |
| 07:54 | rhickey | One concern I have about the Wiki is it being broken, accidentally or maliciously |
| 07:55 | cemerick | yeah, it's a tradeoff. Wiki's can always be rolled back, though. A test repo in svn is fine, but managing that would be a bear (assuming we want to be getting tests from as many people as possible) |
| 08:01 | rhickey | we could develop a convention for posting tests to the group with a public domain comment |
| 08:02 | rhickey | ;Written by John Doe and released to the public domain, as explained at |
| 08:02 | rhickey | ;http://creativecommons.org/licenses/publicdomain |
| 08:03 | cemerick | rhickey: sure -- but who's going to snip all of those submissions out and put them into a repo? I don't think we want to scrub the group every time we run a regression test. |
| 08:04 | rhickey | I'll add any submitted tests to a test.clj in SVN |
| 08:11 | cemerick | well, OK -- I figured you wouldn't want to take on more work |
| 08:34 | rhickey | I'm happy to try the wiki approach |
| 08:38 | rhickey | it would allow for easier tweaking/enhancement of tests by everyone |
| 09:03 | drewr | Is there a name for this pattern? (apply foo (apply bar args)) |
| 09:04 | drewr | ISTR there being a function which does a double APPLY. |
| 09:05 | rhickey | drewr: not as far as I know |
| 09:09 | Chouser | you'd want lots of separate wiki pages so people don't step on each others changes. |
| 09:09 | Chouser | and you'd want the test to be run at the moment of submission or something to prevent typos from generating false negatives |
| 09:10 | rhickey | Chouser: hmmm... how would you pull the test suite to run it? |
| 09:11 | Chouser | I guess the wiki pages for tests could have a common prefix or something. |
| 09:12 | rhickey | ugh |
| 09:12 | Chouser | I'm not exactly championing the idea here -- I'm trying to think through how it would work. |
| 09:13 | rhickey | I understand |
| 09:13 | Chouser | I think I might prefer another svn repo to a wiki. You'd have the same kind of thing -- lots of test files to reduce check-in conflicts. |
| 09:14 | rhickey | the Clojure wiki seems to have per-section edit granularity, but it could be an illusion |
| 09:15 | Chouser | having a clojure-test svn repo would solve the authentication/licensing issue and would be easy to pull. |
| 09:15 | rhickey | Any SF project needs membership maintenance |
| 09:16 | rhickey | :) |
| 09:17 | Chouser | heh |
| 09:17 | Chouser | well, if the wiki lets people add sections simultaneously, you could have one section per test... |
| 09:20 | rhickey | public domain submissions to a test.clj maintainer/guardian seems more solid. If I don't end up with a single test.clj I'll be disinclined to run them, and I don't see a way to validate submissions to a wiki |
| 09:21 | Chouser | test-czar sounds like a lousy job though. you don't want it. |
| 09:21 | rhickey | yeah, if I was into tests, Clojure would have them |
| 09:21 | Chouser | heh |
| 09:22 | Chouser | I'm deeply into the idea of tests, but ... |
| 09:36 | rhickey | java.util.concurrent.ConcurrentMap |
| 09:42 | Chouser | cool |
| 10:04 | cemerick | I was thinking of the test-wiki as being: one test per page, with an automated script to suck down every test and drop it into a local regression test suite. I was suggesting that simply because no one wants to be point-man on a test svn repo. |
| 10:34 | albino | writing tests seems like a good way to learn clojure, are you guys building a list of testcases in english that people could then pick up and write? |
| 11:18 | Chouser | it's be easier to write the test in clojure than in english |
| 11:18 | Chouser | but reading the docs for the functions would point you in the right direction. |
| 11:24 | albino | well test specifications are usually written in a human language |
| 13:52 | drewr | Again, I feel like I'm missing something obvious. What's the clojure FUNCALL equivalent? |
| 13:53 | rhickey | drewr: thosecaps are killing me |
| 13:53 | drewr | Haha, well in this case I'm actually referring to a CL function. :-) |
| 13:53 | rhickey | no need for funcall in Clojure, because first arg is evaluated, also, vars implement IFn |
| 13:53 | rhickey | Lisp-1 and all |
| 13:55 | rhickey | so just remove the funcall from CL code and it should work |
| 13:55 | drewr | OK, I figured it was something like that. I guess my code has a different problem. |
| 13:55 | drewr | rhickey: BTW, I sent in my CA a couple days ago. |
| 13:56 | rhickey | Cool, thanks! |
| 14:37 | drewr | Is (not (not-any?)) the shortest way to implement any? ? |
| 14:38 | rhickey | what is any? |
| 14:38 | drewr | If any (pred x) are true in coll. |
| 14:38 | rhickey | (doc some) |
| 14:39 | rhickey | returns the true value found |
| 14:39 | rhickey | so not technically a ? predicate |
| 14:40 | drewr | OK. |
| 14:45 | albino | drewr: you pulling that from python? any(x % 2 == 0 for x in range(10)) |
| 14:46 | drewr | albino: Yeah, I guess that's why my brain wanted to call it that. :-) |
| 14:47 | rhickey | any? would be the logical name if it returned true/false |
| 14:48 | albino | I do appreciate all() and any() in python, even if they can be written as calls to reduce() |
| 14:48 | rhickey | CL's wordsmiths distinguished some from any/notany |
| 14:49 | rhickey | albino: python's reduce can bail early, for any()? |
| 14:49 | drewr | I had to use (some #(identity %) [....]) to get a single value. |
| 14:49 | albino | rhickey: I don't think so |
| 14:50 | rhickey | drewr: (some #{x} [...]) |
| 14:51 | rhickey | until we get find/member |
| 14:53 | drewr | Remind me how the reader interprets #{}. |
| 14:54 | rhickey | it's a set, and sets are functions of their 'keys', so a set can be used as a predicate for some, as long as what you are looking for isn't false/nil |
| 14:55 | rhickey | user=> (some #{2 4} [3 4 5 6]) |
| 14:55 | rhickey | 4 |
| 14:57 | rhickey | you can't use a set unless you are looking for values in the set |
| 14:58 | rhickey | just covers your identity case earlier |
| 18:18 | Chouser | looks like I lost my connection there for a while -- no logs for that part. :-/ |
| 18:20 | dkf | um.. you didn't miss anything |