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

2005-04-29 Thread Leopold Toetsch
Nick Glencross <[EMAIL PROTECTED]> wrote: > Guys, > This isn't a highly critical segfault I imagine, although it might be of > interest to someone. > I discovered 'make fulltest' this evening. One of the debuginfo tests > (#7) fails as follows with r7942 on i386 Linux: > [EMAIL PROTECTED] parro

Pugs documentation & comments

2005-04-29 Thread Stuart Cook
As a newcomer to the Pugs project, I figured I would try to first read the code and understand what it does. Unfortunately, without a handy architectural overview or a reference to all the various custom types, that can be pretty tricky. Thus I'm interested in adding documentation and comments to

object/method tailcalls ?

2005-04-29 Thread Patrick R. Michaud
Is it (yet?) possible to use tailcalls from/to object methods? I looked through the various pod files and couldn't find anything, and I remember seeing some discussion about tailcalls in general a couple of months ago but didn't stumble across the answers in the archives. I'd appreciate any gentle

Re: Sun Fortress and Perl 6

2005-04-29 Thread Thomas Sandlaß
Autrijus Tang wrote: 1. Type variables as role parameters > [..] Curiously, A12 and S12 already allows something like that: role List[Type $t] { method first() returns ::($t); method rest() returns List[::($t)]; method cons(::($t) $x) returns List[::($t)]; method

unary and infix ops summary and todo

2005-04-29 Thread Leopold Toetsch
1) we now have a rather complete set of opcodes that return a new result PMC, all prefixed by "n_", e.g. n_add Px, Py, 1 n_abs Px, Py These opcodes can/should be used by HLLs like Python, which have the semantics of immutable scalars and newly created result PMCs. 2) Tests for all these opc

Re: [svn:parrot] rev 7942 - in trunk: compilers/pge dynclasses runtime/parrot/dynext

2005-04-29 Thread Leopold Toetsch
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Author: boemmels > Date: Thu Apr 28 14:29:39 2005 > New Revision: 7942 > Modified: >trunk/compilers/pge/ (props changed) >trunk/dynclasses/ (props changed) >trunk/runtime/parrot/dynext/ (props changed) > Log: > Ignore some generated

Re: object/method tailcalls ?

2005-04-29 Thread Leopold Toetsch
Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > Is it (yet?) possible to use tailcalls from/to object methods? Well, there is a C opcode in ops/object.ops. But I don't know, if it works correctly. $ find t -name '*.t' | xargs grep tailcall t/pmc/sub.t:tailcall P0 t/pmc/sub.t:tailcall P0

Re: Pugs documentation & comments

2005-04-29 Thread Stevan Little
Stuart, I have been planning on doing much the same thing to try and increase my understanding of Haskell (although my free time is fairly limited lately). Autrijus had recommended beginning with src/Eval.hs and using the Haddock tool (http://haskell.org/haddock/). You are welcome to start rig

RE: parrot and refcounting semantics

2005-04-29 Thread Butler, Gerald
Isn't there something like: { my $s does LEAVE { destroy $s } = new CoolClass; # ... do stuff that may throw ... } Or something like that? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Martin D Kealey Sent:

Re: Sun Fortress and Perl 6

2005-04-29 Thread Aaron Sherman
On Wed, 2005-04-27 at 09:46, Matt wrote: > On Wed, 27 Apr 2005 03:32:12 -0400, Autrijus Tang <[EMAIL PROTECTED]> > wrote: > > 3. Labels applies to blocks, not statements [...] > I've missed out on some Perl6 stuff, so excuse me as this was probably > already discussed. > > Does that mean this

Re: Sun Fortress and Perl 6

2005-04-29 Thread Aaron Sherman
On Wed, 2005-04-27 at 03:32, Autrijus Tang wrote: > (via http://lambda-the-ultimate.org/node/view/673 ) LtU is a great site, BTW, I highly recommend it to anyone interested in languages. > There are a few things in that spec, though, that makes me wonder > if Perl 6 should have it too: [...]

Re: parrot and refcounting semantics

2005-04-29 Thread Larry Wall
On Fri, Apr 29, 2005 at 08:14:38AM -0400, Butler, Gerald wrote: : : Isn't there something like: : : { : my $s does LEAVE { destroy $s } = new CoolClass; : # ... do stuff that may throw ... : } : : Or something like that? Yes,it's my $s will leave { d

Re: Sun Fortress and Perl 6

2005-04-29 Thread Autrijus Tang
On Fri, Apr 29, 2005 at 08:33:56AM -0400, Aaron Sherman wrote: > > Currently per S09, Perl 6 collection types all have uniform types, > > so one has to use the `List of Any` or `Array of Any` return type > > instead. That seriously hinders inference and typechecking; however, > > I wonder if it is

Re: Quickcheck of context of index expressions

2005-04-29 Thread Larry Wall
On Tue, Apr 26, 2005 at 03:33:44AM +0800, Autrijus Tang wrote: : Another quick check on expression context for indexed expressions. : Please sanity-check the return value of want() below: : : @x[0] = want(); # scalar context Good. : @x[want()] = $_; # scalar context : @x[want()] =

Re: Quickcheck of context of index expressions

2005-04-29 Thread Larry Wall
On Tue, Apr 26, 2005 at 03:56:37AM +0800, Autrijus Tang wrote: : On Tue, Apr 26, 2005 at 03:33:44AM +0800, Autrijus Tang wrote: : > Another quick check on expression context for indexed expressions. : > Please sanity-check the return value of want() below: : > : > @x[0] = want(); # scalar cont

Re: Quickcheck of context of index expressions

2005-04-29 Thread Autrijus Tang
On Fri, Apr 29, 2005 at 06:22:57AM -0700, Larry Wall wrote: > : @x[want()] = $_; # scalar context > : @x[want()] = @_; # scalar context > > Maybe "unknown" context, which defaults to list. I think allowing unknown LHS index expression to default to scalar context is a bit more useful h

Re: parrot and refcounting semantics

2005-04-29 Thread Leopold Toetsch
Gerald Butler <[EMAIL PROTECTED]> wrote: > Isn't there something like: > { > my $s does LEAVE { destroy $s } = new CoolClass; > # ... do stuff that may throw ... > } > Or something like that? Not currently. There used to be a C opcode, but I've deleted it

DYNSUPER bust for dynamic PMCs

2005-04-29 Thread Nicholas Clark
pmc2c.pl says: =item C Calls the overridden implementation of the current method in the nearest superclass, using the static type of C. =item C As above, but uses the actual dynamic type of C. but for a dynamic class, if I try to use it I get errors such as: perl5null.pmc: In function `Parro

Re: unary and infix ops summary and todo

2005-04-29 Thread jerry gay
On 4/29/05, Leopold Toetsch <[EMAIL PROTECTED]> wrote: > 3) Proposal: PIR syntax enhancement > > .pragma n_operators > ... > Px = Py + 1 > ... > [EOF] > > Within this pragma (valid inside and until end of file) the shortcuts > '+', '-', ... should translate to "n_add", "n_sub", ... > Th

Re: Quickcheck of context of index expressions

2005-04-29 Thread Autrijus Tang
On Fri, Apr 29, 2005 at 06:22:57AM -0700, Larry Wall wrote: > : @x[want()] = $_; # scalar context > : @x[want()] = @_; # scalar context > > Maybe "unknown" context, which defaults to list. > > : @x[0,] = want(); # list context > : @x[want(),] = $_; # list context > : @x[wan

S04 -- closure traits clarification

2005-04-29 Thread David Christensen
Greetings, In trying to hack closure trait support into pugs, I have some questions about closure traits, variable with "will" traits and introspection. (Apologies if some of this has been discussed on the list before -- I'm just going off of the synopses, which if definite clarification on so

Re: DYNSUPER bust for dynamic PMCs

2005-04-29 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote: > pmc2c.pl says: >=item C > As above, but uses the actual dynamic type of C. > but for a dynamic class, if I try to use it I get errors such as: > perl5null.pmc: In function `Parrot_Perl5NULL_set_pointer_keyed_int': > perl5null.pmc:24: `enum_class_Perl5

Re: unary and infix ops summary and todo

2005-04-29 Thread Leopold Toetsch
Jerry Gay <[EMAIL PROTECTED]> wrote: > On 4/29/05, Leopold Toetsch <[EMAIL PROTECTED]> wrote: >> 3) Proposal: PIR syntax enhancement >> >> .pragma n_operators >> ... >> Px = Py + 1 >> ... >> [EOF] >> >> Within this pragma (valid inside and until end of file) the shortcuts >> '+', '-', ...

Re: S04 -- closure traits clarification

2005-04-29 Thread Luke Palmer
David Christensen writes: > Greetings, > > In trying to hack closure trait support into pugs, I have some > questions about closure traits, variable with "will" traits and > introspection. (Apologies if some of this has been discussed on the > list before -- I'm just going off of the synopses,

Re: Junctions of classes, roles, etc.

2005-04-29 Thread David Storrs
On Thu, Apr 28, 2005 at 03:28:41PM +0200, Ingo Blechschmidt wrote: > so we had junctions of Code references some days ago, what's with > junctions of Class and Role objects? :) Could we see some code that shows why this is a good idea? My initial reaction is horror; I can very easily see huge n

Re: Sun Fortress and Perl 6

2005-04-29 Thread Aaron Sherman
On Fri, 2005-04-29 at 08:54, Autrijus Tang wrote: > On Fri, Apr 29, 2005 at 08:33:56AM -0400, Aaron Sherman wrote: > > > Currently per S09, Perl 6 collection types all have uniform types, > > > so one has to use the `List of Any` or `Array of Any` return type > > > instead. That seriously hinders

Re: Sun Fortress and Perl 6

2005-04-29 Thread Autrijus Tang
On Fri, Apr 29, 2005 at 02:35:26PM -0400, Aaron Sherman wrote: > > Sure, but Parrot is not the compiler, it's just something I need to > > target. Hierarchical signature checking should probably not be done in > > the VM level. > > How do other languages call P6 subroutines and methods? Parrot ha

Re: parrot and refcounting semantics

2005-04-29 Thread Dan Sugalski
At 3:05 PM +0200 4/29/05, Leopold Toetsch wrote: Gerald Butler <[EMAIL PROTECTED]> wrote: Isn't there something like: { my $s does LEAVE { destroy $s } = new CoolClass; # ... do stuff that may throw ... } Or something like that? Not currently. The

Re: parrot and refcounting semantics

2005-04-29 Thread Dan Sugalski
At 12:37 AM -0400 4/29/05, Uri Guttman wrote: > "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

Re: parrot and refcounting semantics

2005-04-29 Thread Dan Sugalski
At 10:55 PM -0400 4/28/05, Bob Rogers wrote: From: Robin Redeker <[EMAIL PROTECTED]> Date: Thu, 28 Apr 2005 00:12:50 +0200 Refcounting does this with a little overhead, but in a fast and deterministic O(1) way. This is the first half of an apples-to-oranges comparison, and so is mislead

ANN: JavaScript TestSimple 0.03

2005-04-29 Thread David Wheeler
Hi All, I've released TestSimple 0.03, the port of Test::Simple/::More/::Builder to JavaScript. You can find the details here: http://www.justatheory.com/computers/programming/javascript/ test_simple-0.03.html The most significant change in this version is the addition of control over

Re: ANN: JavaScript TestSimple 0.02

2005-04-29 Thread David Wheeler
On Apr 19, 2005, at 6:07 PM, Adam Kennedy wrote: Consider the idea of creating a Document that doesn't actually exist in a window and is thus not seen. (I believe this is possible). Yes, I think that this is what I'll do for the harness. Your tests can write out to this document, and the harness c

Re: Junctions of classes, roles, etc.

2005-04-29 Thread Brent 'Dax' Royal-Gordon
David Storrs <[EMAIL PROTECTED]> wrote: > On Thu, Apr 28, 2005 at 03:28:41PM +0200, Ingo Blechschmidt wrote: > > so we had junctions of Code references some days ago, what's with > > junctions of Class and Role objects? :) > > Could we see some code that shows why this is a good idea? My initial

Re: parrot and refcounting semantics

2005-04-29 Thread Bob Rogers
From: Dan Sugalski <[EMAIL PROTECTED]> Date: Fri, 29 Apr 2005 15:23:47 -0400 At 10:55 PM -0400 4/28/05, Bob Rogers wrote: >From: Robin Redeker <[EMAIL PROTECTED]> >Date: Thu, 28 Apr 2005 00:12:50 +0200 >Refcounting does this with a little overhead, but in a fast and

Re: DYNSUPER bust for dynamic PMCs

2005-04-29 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote: >=item C Another note: we might as well create a C vtable call as well. We need some such (and an opcode) anyway for HLL objects. How could/should that beast look like? $ python >>> help(super) class super(object) | super(type) -> unbound super object