#clojure logs

2008-08-01

07:23rhickeyCould someone verify I did the right change in pom.xml to match the latest build.xml?
07:25cemerickI'm afraid I don't know a damn thing about maven. More of an ivy fellow, myself. :-)
07:26rhickeyme neither
07:26cemerickrhickey: 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:27rhickeycemerick: given what input?
07:28cemerickgiven any input that doesn't satisfy isa? in the methodTable -- i.e. :default will never be returned by .getFn
07:28cemerickor, the :default fn
07:29rhickeyah
07:29cemerickI stumbled across this while trying to use contrib/test-is, which uses some multimethods in its 'is' macro.
07:30cemerick...and the compiler was ditching because it wasn't finding the :default method impl
07:33rhickeycemerick: fixed - thanks
07:35cemerickrhickey: no, thank you :-)
07:36cemerickrhickey: random Q: do you have much of a notion of a "roadmap" in mind, in terms of releases and such?
07:39rhickeygetting 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:39cemerickSounds good
07:40cemerickdo you have a test plan in mind leading up to that and afterwards?
07:41rhickeywhat 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:42rhickeyalso a community supplied example suite
07:46cemerickThe 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:46cemerick...which might be able to double as the example suite?
07:46rhickeyalso on my todo - JavaDoc for the Clojure Java library, and docs for Clojure hosting/interop scenarios
07:47rhickeycemerick: not sure if tests could do both, but would for sure be a start
07:48rhickeyaround 400 functions in Clojure namespaces
07:49cemerickyeah, 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:49rhickeytesting the Java...
07:51cemerickyeah 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:52rhickeycemerick: yes, the Clojure tests would shake out the Java pretty well
07:54rhickeyOne concern I have about the Wiki is it being broken, accidentally or maliciously
07:55cemerickyeah, 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:01rhickeywe could develop a convention for posting tests to the group with a public domain comment
08:02rhickey;Written by John Doe and released to the public domain, as explained at
08:02rhickey;http://creativecommons.org/licenses/publicdomain
08:03cemerickrhickey: 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:04rhickeyI'll add any submitted tests to a test.clj in SVN
08:11cemerickwell, OK -- I figured you wouldn't want to take on more work
08:34rhickeyI'm happy to try the wiki approach
08:38rhickeyit would allow for easier tweaking/enhancement of tests by everyone
09:03drewrIs there a name for this pattern? (apply foo (apply bar args))
09:04drewrISTR there being a function which does a double APPLY.
09:05rhickeydrewr: not as far as I know
09:09Chouseryou'd want lots of separate wiki pages so people don't step on each others changes.
09:09Chouserand you'd want the test to be run at the moment of submission or something to prevent typos from generating false negatives
09:10rhickeyChouser: hmmm... how would you pull the test suite to run it?
09:11ChouserI guess the wiki pages for tests could have a common prefix or something.
09:12rhickeyugh
09:12ChouserI'm not exactly championing the idea here -- I'm trying to think through how it would work.
09:13rhickeyI understand
09:13ChouserI 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:14rhickeythe Clojure wiki seems to have per-section edit granularity, but it could be an illusion
09:15Chouserhaving a clojure-test svn repo would solve the authentication/licensing issue and would be easy to pull.
09:15rhickeyAny SF project needs membership maintenance
09:16rhickey:)
09:17Chouserheh
09:17Chouserwell, if the wiki lets people add sections simultaneously, you could have one section per test...
09:20rhickeypublic 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:21Chousertest-czar sounds like a lousy job though. you don't want it.
09:21rhickeyyeah, if I was into tests, Clojure would have them
09:21Chouserheh
09:22ChouserI'm deeply into the idea of tests, but ...
09:36rhickeyjava.util.concurrent.ConcurrentMap
09:42Chousercool
10:04cemerickI 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:34albinowriting 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:18Chouserit's be easier to write the test in clojure than in english
11:18Chouserbut reading the docs for the functions would point you in the right direction.
11:24albinowell test specifications are usually written in a human language
13:52drewrAgain, I feel like I'm missing something obvious. What's the clojure FUNCALL equivalent?
13:53rhickeydrewr: thosecaps are killing me
13:53drewrHaha, well in this case I'm actually referring to a CL function. :-)
13:53rhickeyno need for funcall in Clojure, because first arg is evaluated, also, vars implement IFn
13:53rhickeyLisp-1 and all
13:55rhickeyso just remove the funcall from CL code and it should work
13:55drewrOK, I figured it was something like that. I guess my code has a different problem.
13:55drewrrhickey: BTW, I sent in my CA a couple days ago.
13:56rhickeyCool, thanks!
14:37drewrIs (not (not-any?)) the shortest way to implement any? ?
14:38rhickeywhat is any?
14:38drewrIf any (pred x) are true in coll.
14:38rhickey(doc some)
14:39rhickeyreturns the true value found
14:39rhickeyso not technically a ? predicate
14:40drewrOK.
14:45albinodrewr: you pulling that from python? any(x % 2 == 0 for x in range(10))
14:46drewralbino: Yeah, I guess that's why my brain wanted to call it that. :-)
14:47rhickeyany? would be the logical name if it returned true/false
14:48albinoI do appreciate all() and any() in python, even if they can be written as calls to reduce()
14:48rhickeyCL's wordsmiths distinguished some from any/notany
14:49rhickeyalbino: python's reduce can bail early, for any()?
14:49drewrI had to use (some #(identity %) [....]) to get a single value.
14:49albinorhickey: I don't think so
14:50rhickeydrewr: (some #{x} [...])
14:51rhickeyuntil we get find/member
14:53drewrRemind me how the reader interprets #{}.
14:54rhickeyit'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:55rhickeyuser=> (some #{2 4} [3 4 5 6])
14:55rhickey4
14:57rhickeyyou can't use a set unless you are looking for values in the set
14:58rhickeyjust covers your identity case earlier
18:18Chouserlooks like I lost my connection there for a while -- no logs for that part. :-/
18:20dkfum.. you didn't miss anything