Cool thoughts. Glad Bryan is bringing set theory to the issue. :-)

The only red flag I'll raise is that if stringification gets changed, I'll
want to change the behavior for pdl-from-string. Right now, the word Empty
is ignored, but if Empty is going to start carrying dimensions, maybe it
should be recognized and properly converted.

Thoughts?

David
On Jan 4, 2012 4:44 AM, "Bryan Jurish" <[email protected]> wrote:

> On 2012-01-03 23:08, Craig DeForest wrote:
> > On Jan 3, 2012, at 2:48 PM, Chris Marshall wrote:
> >> On Tue, Jan 3, 2012 at 4:08 PM, Craig DeForest
> >> <[email protected]> wrote:
> >>> The threading engine needs to be thought about if full support is
> >>> implemented for generic empty PDLs.  In particular, I believe
> >>> empty dimensions should fail to match anything other than empty
> >>> dimensions -- so, e.g., if $a is 2x0 and $b is 2x1, then "$a*$b"
> >>> should throw an error, which it doesn't currently...
> >>>
> >>
> >> Hmm, that seems to special case the empty piddle rather that
> >> following the standard rule that dims of size 1 match anything for
> >> threading.  I don't know if that breaks something but having an
> >> explicit error that is not required means that coding always has to
> >> check for that case.
> >
> > Well, maybe it *is* doing the right thing then.  I can't think of
> > anything that is less surprising than generating a 2x0 output (though
> > that is pretty surprising).
> >
>
> Hmm... I can't seem to come up with a concrete use case right now, but I
> think the implicit threading case could potentially happen, and would
> tend to rank the "implicit threading" rule over the the "size matching"
> rule, i.e. a 2x0 piddle is the right thing to return, odd though it is.
>  My intuition is that size-0 dimensions should be annihilators for
> structure-matching operations, where the implicit-threading rules for
> size-1 dimensions causes these to act as identity elements.  There's no
> contradiction if seen this way, since 1*0 = 0*1 = 0 fulfills both
> criteria, so we would get something like a semiring with glue() as the
> "+" operation and threading as "*".
>
> Thanks to both of you for taking the time to dig into this issue, and
> for your PDL maintainence work in general!
>
> marmosets,
>        Bryan
>
> --
> Bryan Jurish                           "There is *always* one more bug."
> [email protected]         -Lubarsky's Law of Cybernetic Entomology
>
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to