Re: Threading in Parrot vs Perl

2005-04-28 Thread Sam Vilain
Rod Adams wrote: I would be dismayed if autothreading used threads to accomplish it's goals. Simple iteration in a single interpreter should be more than sufficient. For sure. No point in doing 10_000 cycles to set up a scratch area for a single boolean test that might take 10 cycles. A software

Re: Adding Complexity

2005-04-28 Thread Luke Palmer
Ingo Blechschmidt writes: > Hi, > > Luke Palmer wrote: > >> ...which makes me wonder if it'd be good|cool|whatever to not only > >> have lazy lists, but also lazy *values*...: :)) > > > > Then every expression that referenced lazy values would be lazy in > > terms > > of them. And once you want

Re: Adding Complexity

2005-04-28 Thread Ingo Blechschmidt
Hi, Luke Palmer wrote: >> ...which makes me wonder if it'd be good|cool|whatever to not only >> have lazy lists, but also lazy *values*...: :)) > > Then every expression that referenced lazy values would be lazy in > terms > of them. And once you want to print X digits of the lazy answer, you >

Re: Threading in Parrot vs Perl

2005-04-28 Thread Uri Guttman
> "RA" == Rod Adams <[EMAIL PROTECTED]> writes: RA> I would be dismayed if autothreading used threads to accomplish it's RA> goals. Simple iteration in a single interpreter should be more than RA> sufficient. how autothreading is implemented is distinct from the language feature. a simp

Re: use English

2005-04-28 Thread Aaron Sherman
On Thu, 2005-04-28 at 13:52, gcomnz wrote: > Aaron Sherman wrote: > > > As a side note, I'd like to suggest that "English" is just rubbing > > people's noses in the fact that they're not allowed to program in their > > native tongue. "Names" might be less in-your-face. > > Why are we even having

Re: Threading in Parrot vs Perl

2005-04-28 Thread Aaron Sherman
On Thu, 2005-04-28 at 13:55, Rod Adams wrote: > I would be dismayed if autothreading used threads to accomplish it's > goals. Simple iteration in a single interpreter should be more than > sufficient. Sorry, I misunderstood. Thanks for the clarification. -- Aaron Sherman <[EMAIL PROTECTED]> S

Re: Threading in Parrot vs Perl

2005-04-28 Thread Rod Adams
Aaron Sherman wrote: On Thu, 2005-04-28 at 10:00, Luke Palmer wrote: Aaron Sherman writes: Well, more to the point, autothreading of junctions will hit the wall of Parrot duping the interpreter. That's probably not something you want to suffer just to resolve a junction, is it? Wh

Re: use English

2005-04-28 Thread gcomnz
Aaron Sherman wrote: > As a side note, I'd like to suggest that "English" is just rubbing > people's noses in the fact that they're not allowed to program in their > native tongue. "Names" might be less in-your-face. Why are we even having to say use English or Names or whatever? Why not just ma

Re: Threading in Parrot vs Perl

2005-04-28 Thread Jonathan Scott Duff
On Thu, Apr 28, 2005 at 12:46:53PM -0400, Aaron Sherman wrote: > On Thu, 2005-04-28 at 10:00, Luke Palmer wrote: > > Aaron Sherman writes: > > > > Well, more to the point, autothreading of junctions will hit the wall of > > > Parrot duping the interpreter. That's probably not something you want to

Re: is rw basically a null-op on objects/references?

2005-04-28 Thread Juerd
Thomas Sandlaß skribis 2005-04-28 18:09 (+0200): > >I still want <->, by the way. > Me too. And I guess <- naturally completes the set. Although it would complete the set, in the months since I first started wanting <->, I have not been able to come up with a good reason to want write-only bindin

Threading in Parrot vs Perl

2005-04-28 Thread Aaron Sherman
On Thu, 2005-04-28 at 10:00, Luke Palmer wrote: > Aaron Sherman writes: > > Well, more to the point, autothreading of junctions will hit the wall of > > Parrot duping the interpreter. That's probably not something you want to > > suffer just to resolve a junction, is it? > > What? Why will it do

Re: Malfunction Junction, what's your function?

2005-04-28 Thread Thomas Sandlaß
Joshua Gatcomb wrote: ... FAQs such as union, difference, intersection of lists are FAQs for a reason. ... it would be nice to have a real simple easy answer for p6. And indeed it could be: use Sets; my @a is Set = (1,2,3); my @b is Set = (2,3,4); say @a + @b; # (1,2,3,4) say @a / @b; # (2,3) e

Re: is rw basically a null-op on objects/references?

2005-04-28 Thread Thomas Sandlaß
Juerd wrote: Ingo Blechschmidt skribis 2005-04-28 14:30 (+0200): does the following work as expected? for %hash.pairs -> $pair { # Note: No "is rw"! $pair.value = ...; # Modifies %hash } Yes, because a pair is an object (reference), and it's not the .value that you're passing ro. I come

Re: Malfunction Junction, what's your function?

2005-04-28 Thread Joshua Gatcomb
On 4/28/05, Thomas Sandlaß <[EMAIL PROTECTED]> wrote: > I wrote: > > permute( @x_chars ) »{ $^a eq $^b ?? $^a :: ''}« permute( @y_chars ) > > Permutation is the wrong thing here, sorry. It's just: I want to preface again that I have only recently started giving the language aspect of p6 serious f

Re: Malfunction Junction, what's your function?

2005-04-28 Thread Thomas Sandlaß
I wrote: permute( @x_chars ) »{ $^a eq $^b ?? $^a :: ''}« permute( @y_chars ) Permutation is the wrong thing here, sorry. It's just: ( @x_chars »xx« @y_chars.elems ) # or was that .size? »{ $^a eq $^b ?? $^a :: ''}« ( @y_chars xx @x_chars.elems ) # note: no hypering e.g. and give »{...}«

Re: use English

2005-04-28 Thread Luke Palmer
Aaron Sherman writes: > On Wed, 2005-04-27 at 14:38, Luke Palmer wrote: > > > There's still a lot of premature optimization going on [...] > > I'm surely guilty of one of them. I feel like the autothreading > > semantics of junctions will be way to expensive without the compiler > > knowing wheth

Re: Adding Complexity

2005-04-28 Thread Luke Palmer
Ingo Blechschmidt writes: > Hi, > > > Essentially lazy lists are suspended closures. But I dought that > > arithmetic between them is defined such that pi + pi would leazily > > calculate 6.28... > > ...which makes me wonder if it'd be good|cool|whatever to not only have > lazy lists, but also la

Re: Junctions of classes, roles, etc.

2005-04-28 Thread Thomas Sandlaß
Aaron Sherman wrote: Now, I'm not saying that that's the way it MUST be, just that that seems to be the way that junctions would work in that situation. I know, and I'm very confused about all these pseudo procedural uses of junctions. And others seem to share my state of affairs. If we decide tha

Re: Adding Complexity

2005-04-28 Thread Ingo Blechschmidt
Ingo Blechschmidt wrote: > And: > my @ones = gather { take 1 while 1 }; > my $ones = join "", @ones; # does not burn out! > say length $ones; # Inf s/length/chars/ of course. --Ingo -- Linux, the choice of a GNU | God said: tar xvjf universe.tar.gz - and generation on a dual AMD

Re: Adding Complexity

2005-04-28 Thread Ingo Blechschmidt
Hi, > Essentially lazy lists are suspended closures. But I dought that > arithmetic between them is defined such that pi + pi would leazily > calculate 6.28... ...which makes me wonder if it'd be good|cool|whatever to not only have lazy lists, but also lazy *values*...: :)) my $pi = calc_pi_laz

Re: Adding Complexity

2005-04-28 Thread Mark Reed
> Jonathan Lang wrote: >> > When you take the square root of a number, you actually get one of two >> > possible answers (for instance, sqrt(1) actually gives either a 1 or a >> > -1). Not quite. It¹s true that there are two possible square roots of any given number, but sqrt(1) is defined as th

Re: Adding Complexity

2005-04-28 Thread Thomas Sandlaß
Jonathan Lang wrote: When you take the square root of a number, you actually get one of two possible answers (for instance, sqrt(1) actually gives either a 1 or a -1). sqrt() is a function that maps its input domain into its output range. As such multiple return values are at least not part of the

Re: Junctions of classes, roles, etc.

2005-04-28 Thread Aaron Sherman
On Thu, 2005-04-28 at 09:51, Thomas Sandlaß wrote: > Ingo Blechschmidt wrote: > > Hi, > > > > so we had junctions of Code references some days ago, what's with > > junctions of Class and Role objects? :) > > I like them! In the type lattice A|B is the lub (lowest upper bound) > of A and B. And A&

Re: Junctions of classes, roles, etc.

2005-04-28 Thread Thomas Sandlaß
Ingo Blechschmidt wrote: Hi, so we had junctions of Code references some days ago, what's with junctions of Class and Role objects? :) I like them! In the type lattice A|B is the lub (lowest upper bound) of A and B. And A&B is the glb (greatest lower bound) of A and B. Both are cases of multiple in

Junctions of classes, roles, etc.

2005-04-28 Thread Ingo Blechschmidt
Hi, so we had junctions of Code references some days ago, what's with junctions of Class and Role objects? :) role A { method foo() { 42 } } role B { method foo() { 23 } } class Test does A|B {} my Test $test .= new; my $ret = $test.foo; # 42|23? role A {} role B { method foo()

Re: is rw basically a null-op on objects/references?

2005-04-28 Thread Juerd
Juerd skribis 2005-04-28 14:47 (+0200): > Yes, because a pair is an object (reference), and it's not the .value > that you're passing ro. An example of what would go wrong: for %hash.pairs>>.value -> $value { $value = ...; } But this will work: for %hash.pairs>>.value {

Re: [S29] pick on other things than junctions

2005-04-28 Thread Ingo Blechschmidt
Ingo Blechschmidt web.de> writes: > > then it has a better chance of working, presuming someone has the > > gumption to write .pick on hashes, which doesn't look entirely trivial > > to do right. > > I'm sure I overlooked something, but the following > seems to be correct and is not *that*

Re: is rw basically a null-op on objects/references?

2005-04-28 Thread Juerd
Ingo Blechschmidt skribis 2005-04-28 14:30 (+0200): > does the following work as expected? > for %hash.pairs -> $pair { # Note: No "is rw"! > $pair.value = ...; # Modifies %hash > } Yes, because a pair is an object (reference), and it's not the .value that you're passing ro. I still

is rw basically a null-op on objects/references?

2005-04-28 Thread Ingo Blechschmidt
Hi, does the following work as expected? for %hash.pairs -> $pair { # Note: No "is rw"! $pair.value = ...; # Modifies %hash } Or is it necessary to declare $pair as is rw? (The snippet does not modify $pair, but $pair.value.) --Ingo -- Linux, the choice of a GNU | The next stat

Re: use English

2005-04-28 Thread Aaron Sherman
On Wed, 2005-04-27 at 14:38, Luke Palmer wrote: > There's still a lot of premature optimization going on [...] > I'm surely guilty of one of them. I feel like the autothreading > semantics of junctions will be way to expensive without the compiler > knowing whether there a junction in a particula

Re: use English

2005-04-28 Thread Graham Barr
On Apr 27, 2005, at 6:39 AM, Aaron Sherman wrote: On Tue, 2005-04-26 at 10:48, Luke Palmer wrote: Aaron Sherman writes: The reasons I don't "use English" in P5: * Variable access is slower Hmm, looks to me like $INPUT_RECORD_SEPARATOR is faster. (Actually they're the same: on each run a di