- From: Dan Connolly <connolly@w3.org>
- Date: Tue, 07 Feb 2006 09:58:32 -0600
- To: Jos De Roo <jos.deroo@agfa.com>
- Cc: www-archive@w3.org
On Mon, 2006-02-06 at 10:57 -0600, Dan Connolly wrote:
[...]
> http://eulersharp.sourceforge.net/2006/02swap/euler.js
>
> but I can't read the code.
>
> I'd really like to get a version of that code with unit
> tests that explain what it's doing.
>
> I'd even like to work on it, though I'm not sure where
> to find the time.
>
> I see this a few times:
>
> s.head.charAt(0) == '?'
>
> is that testing whether the head is a variable? Please
> factor that out as a isVar(s.head) test. DRY.
I see that's done; thanks.
> what datastructures are you passing around? what's a
> query? a lstep? That's where I'd like to see unit tests.
Thanks for explaining over the phone...
rules = {
"a":[
{head:{head:"a", body:[{head:":Socrates", body:[]}, {head:":Man", body:[]}]}, body:[]},
{head:{head:"a", body:[{head:"?WHO", body:[]}, {head:":Mortal", body:[]}]}, body:[{head:"a", body:[{head:"?WHO", body:[]}, {head:":Man", body:[]}]}]}
]
}
goals = [{head:{}, body:[{head:"a", body:[{head:"?WHO", body:[]}, {head:"?WHAT", body:[]}]}]}]
--
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541 0875 0F91 96DE 6E52 C29E
Received on Tuesday, 7 February 2006 15:58:37 UTC