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: 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: [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: 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: 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: 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

[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: [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: 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

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