Re: simultaneous conditions in junctions

2009-04-02 Thread Richard Hainsworth
Larry Wall wrote: On Wed, Apr 01, 2009 at 08:40:12AM -0700, Dave Whipp wrote: That said, the semantics of a chained relop really should work correctly for this. If you only reference a junction once in an expression, then it should behave as such: {a Yes, that is the intent. I consi

Re: simultaneous conditions in junctions

2009-04-01 Thread Martin D Kealey
On Wed, 1 Apr 2009, John Macdonald wrote: > If I understand correctly, (which is by no means assured) a function > call with a junction as an argument generally acts as if it were > autothreaded. So: > > $x = any(1,2,3); > $y = f($x); > > should work like: > > $y = any( f(1),

Re: simultaneous conditions in junctions

2009-04-01 Thread Larry Wall
On Wed, Apr 01, 2009 at 08:40:12AM -0700, Dave Whipp wrote: > That said, the semantics of a chained relop really should work correctly > for this. If you only reference a junction once in an expression, then > it should behave as such: {a

Re: simultaneous conditions in junctions

2009-04-01 Thread TSa
HaloO, John Macdonald wrote: Unless autothreading is also implied by conditionals, $y and $z would have significantly different results; $y === any(undef,undef,undef) while $z === any(1,2,3). This is why I'm opting for statical analysis of auto-threaded conditionals. But, if autothreading

Re: simultaneous conditions in junctions

2009-04-01 Thread Dave Whipp
Richard Hainsworth wrote: Thinking about Jon Lang's -1|+1 example in another way, I wondered about simultaneous conditions. Consider $x = any (1,2,5,6) How do we compose a conditional that asks if any of this set of eigenstates are simultaneously both > 2 and < 5? Clearly the desired answer

Re: simultaneous conditions in junctions

2009-04-01 Thread John Macdonald
On Wed, Apr 01, 2009 at 09:44:43AM -0400, Mark J. Reed wrote: > The idea is that junctions should usually be invisible to the code, > and autothreading handles them behind the scenes. [ ... ] If I understand correctly, (which is by no means assured) a function call with a junction as an argument

Re: simultaneous conditions in junctions

2009-04-01 Thread Mark J. Reed
The idea is that junctions should usually be invisible to the code, and autothreading handles them behind the scenes. Once you start using the eigenstates as a collection, you're breaking the model and not gaining anything over just using a regular collection type. But the "behind the scenes"

Re: simultaneous conditions in junctions

2009-04-01 Thread Jon Lang
On Wed, Apr 1, 2009 at 12:58 AM, Richard Hainsworth wrote: > Thinking about Jon Lang's -1|+1 example in another way, I wondered about > simultaneous conditions. > > Consider > > $x = any (1,2,5,6) > > How do we compose a conditional that asks if any of this set of eigenstates > are simultaneously

Re: simultaneous conditions in junctions

2009-04-01 Thread Carl Mäsak
Richard (>): > Consider > > $x = any (1,2,5,6) > > How do we compose a conditional that asks if any of this set of eigenstates > are simultaneously both > 2 and < 5? > Clearly the desired answer for $x is False, but > > my $x = any(1,2,5,6); say ?( 2 < $x < 5); # true > > Is there some combination