Re: parrot and refcounting semantics

2005-04-28 Thread Uri Guttman
> "RR" == Robin Redeker <[EMAIL PROTECTED]> writes: RR> I don't think circular references are used that much. This is RR> maybe something a programmer still has to think a little bit RR> about. And if it means, that timely destruction maybe becomes RR> slow only for the sake of collec

Re: parrot and refcounting semantics

2005-04-28 Thread Martin D Kealey
On Thu, 28 Apr 2005, Luke Palmer wrote: > Or, with the "block hooks" that I keep claiming makes timely destruction > almost never needed, it is: > > { > my $s = new CoolClass; > # ... do stuff that may throw ... > LEAVE { destroy $s } > } > > This destroys properly a

Re: parrot and refcounting semantics

2005-04-28 Thread Bob Rogers
From: Robin Redeker <[EMAIL PROTECTED]> Date: Thu, 28 Apr 2005 00:12:50 +0200 On Wed, Apr 27, 2005 at 12:33:30PM -0600, Luke Palmer wrote: > I agree with Dan completely here. People make such a big fuss over > timely destruction when they don't realize that they don't really need

Re: verbose diagnostics

2005-04-28 Thread Michael G Schwern
On Thu, Apr 28, 2005 at 10:08:00PM -0400, James E Keenan wrote: > Fergal Daly wrote: > >Where is TEST_VERBOSE documented? I see HARNESS_VERBOSE in > > > >http://search.cpan.org/~petdance/Test-Harness-2.48/lib/Test/Harness.pm > > http://search.cpan.org/grep?release=Test-Harness-2.48&string=TEST_VER

Re: verbose diagnostics

2005-04-28 Thread James E Keenan
Fergal Daly wrote: Where is TEST_VERBOSE documented? I see HARNESS_VERBOSE in http://search.cpan.org/~petdance/Test-Harness-2.48/lib/Test/Harness.pm F http://search.cpan.org/grep?release=Test-Harness-2.48&string=TEST_VERBOSE&n=1 HTH jimk

Re: parrot and refcounting semantics

2005-04-28 Thread Martin D Kealey
On Thu, 28 Apr 2005, Robin Redeker wrote: > I don't think circular references are used that much. Circular references are useful any time you need to be able to iterate over a collection, and also have to identify which collection a given object is in. This may even be implicit from other require

[perl #35144] Core dump with computed-goto core

2005-04-28 Thread via RT
# New Ticket Created by Nick Glencross # Please include the string: [perl #35144] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=35144 > Guys, This isn't a highly critical segfault I imagine, although it might be of inte

Re: parrot and refcounting semantics

2005-04-28 Thread Dave Mitchell
On Thu, Apr 28, 2005 at 05:57:10PM +0200, Robin Redeker wrote: > Just because refcounting is error-prone it doesn't mean that a garbage > collector is better (and less error-prone). I'm one of the maintainers of the perl5 core. perl5 is very mature, with relatively few new features being added, an

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: [FYI] experimental.ops: die

2005-04-28 Thread Leopold Toetsch
Leopold Toetsch wrote: We already have a C opcode. I've now included the functionality of C inside C. Please use this code now instead of C: .include "except_severity.pasm" die_hard .EXCEPT_DOOMED, 0# die die_hard .EXCEPT_DOOMED, 77 # die 77 The C opcode is doomed and will die. Or due

Re: parrot and refcounting semantics

2005-04-28 Thread Dan Sugalski
At 7:24 PM +0200 4/28/05, Robin Redeker wrote: I just wanted to correct my small example: On Thu, Apr 28, 2005 at 05:00:53PM +0200, Robin Redeker wrote: > Robin Redeker writes: And with explicit resource handling (without timely destruction) it may be: { my $s = new CoolClass; ...

Re: parrot and refcounting semantics

2005-04-28 Thread Dan Sugalski
At 11:48 AM -0600 4/28/05, Luke Palmer wrote: Robin Redeker writes: This should actually be, to prevent the resource from leaking: { my $s = new CoolClass; eval { ... do stuff that may throws ... }; destroy $s; } Or, with the "block hooks" that I keep

Re: parrot and refcounting semantics

2005-04-28 Thread Luke Palmer
Robin Redeker writes: > This should actually be, to prevent the resource from leaking: > > { > my $s = new CoolClass; > eval { > ... do stuff that may throws ... > }; > destroy $s; > } Or, with the "block hooks" that I keep claiming makes timely destruction

Re: parrot and refcounting semantics

2005-04-28 Thread Robin Redeker
I just wanted to correct my small example: On Thu, Apr 28, 2005 at 05:00:53PM +0200, Robin Redeker wrote: > > Robin Redeker writes: > And with explicit resource handling (without timely destruction) it may be: > >{ > my $s = new CoolClass; > ... > destroy $s; >} This shoul

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: verbose diagnostics

2005-04-28 Thread Michael G Schwern
On Thu, Apr 28, 2005 at 02:44:30PM +0100, Adrian Howard wrote: > > On 28 Apr 2005, at 14:23, Paul Johnson wrote: > > >Using Test::More, I would like to send some diagnostics to be seen only > >when the harness is running in verbose mode. > [snip] > > diag "some verbose diagnostics" if $ENV

Re: parrot and refcounting semantics

2005-04-28 Thread Dan Sugalski
At 12:12 AM +0200 4/28/05, Robin Redeker wrote: On Wed, Apr 27, 2005 at 12:33:30PM -0600, Luke Palmer wrote: Dan Sugalski writes: > Also, with all this stuff, people are going to find timely destruction > is less useful than they might want, what with threads and > continuations, which'll screw

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: parrot and refcounting semantics

2005-04-28 Thread MrJoltCola
At 01:10 PM 4/28/2005, Dan Sugalski wrote: At 5:57 PM +0200 4/28/05, Robin Redeker wrote: On Wed, Apr 27, 2005 at 03:43:32PM -0400, Dan Sugalski wrote: At 5:40 PM +0200 4/27/05, Robin Redeker wrote: The expense is non-trivial as well. Yeah, it's all little tiny bits of time, but that adds up. I

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

Re: parrot and refcounting semantics

2005-04-28 Thread Dan Sugalski
At 5:57 PM +0200 4/28/05, Robin Redeker wrote: On Wed, Apr 27, 2005 at 03:43:32PM -0400, Dan Sugalski wrote: At 5:40 PM +0200 4/27/05, Robin Redeker wrote: >Just for the curious me: What was the design decision behind the GC >solution? Was refcounting that bad? Refcounting gives a more global >

Re: parrot and refcounting semantics

2005-04-28 Thread Robin Redeker
On Wed, Apr 27, 2005 at 03:43:32PM -0400, Dan Sugalski wrote: > At 5:40 PM +0200 4/27/05, Robin Redeker wrote: > >Just for the curious me: What was the design decision behind the GC > >solution? Was refcounting that bad? Refcounting gives a more global > >speed hit indeed, but it's more determinist

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

[FYI] experimental.ops: die

2005-04-28 Thread Leopold Toetsch
We already have a C opcode. I've now included the functionality of C inside C. Please use this code now instead of C: .include "except_severity.pasm" die_hard .EXCEPT_DOOMED, 0# die die_hard .EXCEPT_DOOMED, 77 # die 77 The C opcode is doomed and will die. Thanks, leo

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 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: 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: [RFC] unary operations

2005-04-28 Thread Leopold Toetsch
Leopold Toetsch <[EMAIL PROTECTED]> wrote: I've implemented this part now: > For Python, Lisp and probably more HLLs the same is of course needed for > unary opcodes: >abs Px, Py # use existing abs, Px exists >Px = n_abs Py# create new abs result PMC > This is of cours

Re: parrot and refcounting semantics

2005-04-28 Thread Robin Redeker
On Wed, Apr 27, 2005 at 03:59:05PM -0600, Luke Palmer wrote: > Robin Redeker writes: > > On Wed, Apr 27, 2005 at 12:33:30PM -0600, Luke Palmer wrote: > > > I think, more importantly, they don't understand what they're > > > getting in return for giving [refcounting] up. > > > > Could you point out

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: verbose diagnostics

2005-04-28 Thread Paul Johnson
On Thu, Apr 28, 2005 at 02:44:30PM +0100, Adrian Howard wrote: > On 28 Apr 2005, at 14:23, Paul Johnson wrote: > > >Using Test::More, I would like to send some diagnostics to be seen only > >when the harness is running in verbose mode. > [snip] > > diag "some verbose diagnostics" if $ENV{T

Re: verbose diagnostics

2005-04-28 Thread Fergal Daly
Where is TEST_VERBOSE documented? I see HARNESS_VERBOSE in http://search.cpan.org/~petdance/Test-Harness-2.48/lib/Test/Harness.pm F On 4/28/05, Adrian Howard <[EMAIL PROTECTED]> wrote: > > On 28 Apr 2005, at 14:23, Paul Johnson wrote: > > > Using Test::More, I would like to send some diagnosti

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&

Fwd: [agile-testing] ANNOUNCE: New version of Perl port of Fit.

2005-04-28 Thread Adrian Howard
Since it seems to have been announced everywhere but here, I thought folks might be interested in this. Adrian Begin forwarded message: From: Tony Byrne <[EMAIL PROTECTED]> Date: 28 April 2005 09:52:09 BST To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: [agile-testing] ANN

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

Re: verbose diagnostics

2005-04-28 Thread Adrian Howard
On 28 Apr 2005, at 14:23, Paul Johnson wrote: Using Test::More, I would like to send some diagnostics to be seen only when the harness is running in verbose mode. [snip] diag "some verbose diagnostics" if $ENV{TEST_VERBOSE}; ? Adrian

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()

verbose diagnostics

2005-04-28 Thread Paul Johnson
Using Test::More, I would like to send some diagnostics to be seen only when the harness is running in verbose mode. There doesn't seem to be a way of doing this. The best I could come up with is: sub vdiag { pass("@_") } but this has little to recommend it. Thoughts? -- Paul Johnson - [EM

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*

Memory game v0.2

2005-04-28 Thread BÁRTHÁZI András
Hi, I've checked in v0.2 with some improvements: - Image is just clickable if it isn't flipped - Number of turns and successful flips shown - A "Congratulations" message at the end - Hints for the pictures with And send me your photo (85x75 pixel) and name (ASCII please), and I'll include it

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: NULL deference in real_exception

2005-04-28 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote: > (gdb) p interpreter->exceptions > $5 = (struct parrot_exception_t *) 0x0 > what should have initialised that? An exception structure is created per entering a run-loop, see: src/inter_runc.c:runops(). You can either create your own exception setup/hand

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

NULL deference in real_exception

2005-04-28 Thread Nicholas Clark
In exceptions.c, real_exception has: { STRING *msg; Parrot_exception *the_exception = interpreter->exceptions; ... /* * FIXME classify errors */ the_exception->severity = EXCEPT_error; which goes BOOM: Program received signal EXC_BAD_ACCESS, Could not access memory.

Re: [RFC] assign Px, Py

2005-04-28 Thread Leopold Toetsch
Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> wrote: > Just to de-Warnock this thread: > Leopold Toetsch <[EMAIL PROTECTED]> wrote: >> 3) PIR syntax >> >> It was already discussed a few times that we might change PIR syntax: >> >> current: >> >>Px = Pyset Px, Py alias Px an

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

Re: parrot and refcounting semantics

2005-04-28 Thread Luke Palmer
Robin Redeker writes: > On Wed, Apr 27, 2005 at 12:33:30PM -0600, Luke Palmer wrote: > > I think, more importantly, they don't understand what they're > > getting in return for giving [refcounting] up. > > Could you point out what i get? > > I use TD is to handle resources: filehandles, database

Re: parrot and refcounting semantics

2005-04-28 Thread Robin Redeker
On Wed, Apr 27, 2005 at 12:33:30PM -0600, Luke Palmer wrote: > Dan Sugalski writes: > > Also, with all this stuff, people are going to find timely destruction > > is less useful than they might want, what with threads and > > continuations, which'll screw *everything* up, as they are wont to do. >

Re: parrot and refcounting semantics

2005-04-28 Thread Luke Palmer
Dan Sugalski writes: > Also, with all this stuff, people are going to find timely destruction > is less useful than they might want, what with threads and > continuations, which'll screw *everything* up, as they are wont to do. > I know I've been making heavy use of continuations myself, and this i