unary and infix ops summary and todo

2005-04-30 Thread Bob Rogers
From: Leopold Toetsch <[EMAIL PROTECTED]> Date: Fri, 29 Apr 2005 11:18:25 +0200 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 . . . 2) Tests for all these opcodes are very welc

Re: parrot and refcounting semantics

2005-04-30 Thread Robin Redeker
On Sat, Apr 30, 2005 at 05:02:54PM -0400, Dan Sugalski wrote: > destroy. There's a vtable method that's called by the GC system when > an object is no longer reachable from the root set. Actually, not when, but some (indefinite) time after that has happened, right? > > And if so, what > >would t

Re: parrot and refcounting semantics

2005-04-30 Thread Robin Redeker
Hi! Just a small question: On Thu, Apr 28, 2005 at 04:37:21PM -0400, Dan Sugalski wrote: > If you don't have the destroy, and don't tag the object as needing > expedited cleanup, then the finalizer *will* still be called. You > just don't have any control over when its called. > Will there be

Re: object/method tailcalls ?

2005-04-30 Thread Patrick R. Michaud
On Sat, Apr 30, 2005 at 10:40:12AM +0200, Leopold Toetsch wrote: > Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > > > I'd appreciate any gentle nudges towards the appropriate documentation, > > source file, or answer. Thanks! > > I've now created a test for it in t/pmc/object-meths.t: > > .s

Re: object/method tailcalls ?

2005-04-30 Thread Bob Rogers
From: Leopold Toetsch <[EMAIL PROTECTED]> Date: Sat, 30 Apr 2005 10:40:12 +0200 Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > I'd appreciate any gentle nudges towards the appropriate documentation, > source file, or answer. Thanks! I've now created a test for it in t/pmc/obj

Re: parrot and refcounting semantics

2005-04-30 Thread Dan Sugalski
At 9:19 AM +0200 4/30/05, Leopold Toetsch wrote: Dan Sugalski <[EMAIL PROTECTED]> wrote: > ... We should probably make it 'safe' by forcing the destroyed PMC to be an Undef after destruction, in case something was still referring to it. That sounds sane. Or maybe be: convert to an Undef and put

Re: New language: Parrot Common Lisp

2005-04-30 Thread Cory Spencer
On Fri, 22 Apr 2005, Matt Diephouse wrote: -> (defun (square x) (* x x)) T -> (square 2) *** ERROR: SQUARE is not a function name A quick follow-up - I've just checked in code implementing some primitive macros, so if you wanted to give (defun ...) a go again, you should find that it works now. (

Re: parrot and refcounting semantics

2005-04-30 Thread Dan Sugalski
At 7:50 PM +0200 4/30/05, Robin Redeker wrote: Hi! Just a small question: On Thu, Apr 28, 2005 at 04:37:21PM -0400, Dan Sugalski wrote: If you don't have the destroy, and don't tag the object as needing expedited cleanup, then the finalizer *will* still be called. You just don't have any control

Re: parrot and refcounting semantics

2005-04-30 Thread chromatic
On Sat, 2005-04-30 at 09:19 +0200, Leopold Toetsch wrote: > BTW shouldn't we really separate C and C? The latter > would be overridable by user code, the former frees allocate memory. I think that's wise and I thought that was the plan. Certainly for *Struct PMCs I don't care when Parrot release

Re: parrot and refcounting semantics

2005-04-30 Thread Dan Sugalski
At 11:12 PM -0400 4/29/05, Bob Rogers wrote: 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]> >I'm astounded. Do neither of you ever design data structures with >

Re: object/method tailcalls ?

2005-04-30 Thread Leopold Toetsch
Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > I'd appreciate any gentle nudges towards the appropriate documentation, > source file, or answer. Thanks! I've now created a test for it in t/pmc/object-meths.t: .sub go method ... P2 = self tailcallmethod "go" .end Works. B

Re: Sun Fortress and Perl 6

2005-04-30 Thread Aaron Sherman
On Sat, 2005-04-30 at 08:41 +0200, Leopold Toetsch wrote: > Well, I presume that this could cover just the static case, which with > the absence of types in Perl5/Ponie, would make it impossible to call > multisubs. I suppose then, that languages like Ponie or Python will end up needing builtin o

[perl #34121] [NEW] imc http server

2005-04-30 Thread Bernhard Schmalhofer via RT
> [leo - Mo 14. Feb 2005, 02:59:47]: > > Markus Amslser <[EMAIL PROTECTED]> wrote: > > Now it's getting funny. I have written a tiny webserver in imc, that can > > serve the parrot html documentation. > > Great, thanks. Some remarks: > - served line endings should by "\r\n": lynx doesn't work wit

Re: Sun Fortress and Perl 6

2005-04-30 Thread Autrijus Tang
On Sat, Apr 30, 2005 at 08:41:52AM +0200, Leopold Toetsch wrote: > Anyway Parrots MMD system depends on types. *If* the Perl6 compiler defines > above array as > > cl = subclass "FixedFloatArray", "num_Array_shape_3_3_3" Yes, that is what I am planning to emit for hierarchical and other subtype

Re: Sun Fortress and Perl 6

2005-04-30 Thread Leopold Toetsch
Autrijus Tang <[EMAIL PROTECTED]> wrote: > my sub get_book () of Hash of Array of Recipe {...} > my num @nums = Array of num.new(:shape(3;3;3)); > Does Parrot's MMD carry this type information natively? Neither of above. But: multi sub foo(Int $a, Num $b) { ... } aka .sub foo @MUL

Re: parrot and refcounting semantics

2005-04-30 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > ... For the most part, refcount O(n) time is > proportional to the total number of objects created, while tracing > O(n) time is proportional to the number of live objects. Not quite. Refcount is O(work) or O(ptr-assign), which can be quite different. Pyt

Re: parrot and refcounting semantics

2005-04-30 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: >>Not currently. There used to be a C opcode, but I've deleted >>it, because I thought it's too dangerous. > We really need to put it back in -- I knew it was dangerous, but it > was necessary. Yeah. > ... We should probably make it 'safe' by forcing the