Re: Formal Parameters To While Block

2005-04-30 Thread Luke Palmer
Autrijus Tang writes: > On Tue, Apr 26, 2005 at 09:37:51AM -0600, Luke Palmer wrote: > > Joshua Gatcomb writes: > > > The solution is formal parameters. The trouble is I > > > can't seem to find a good example in S04 that matches > > > what I am trying to do. > > > > > > while $ref() -> @array {

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: Junctions of classes, roles, etc.

2005-04-30 Thread Brent 'Dax' Royal-Gordon
Aaron Sherman <[EMAIL PROTECTED]> wrote: > On Sat, 2005-04-30 at 22:24 +0800, Autrijus Tang wrote: > > On Sat, Apr 30, 2005 at 09:13:26AM -0500, Abhijit Mahabal wrote: > > > I do not see how any auto-threading occurs in that code. It is completely > > > innocuous in that sense, and I don't think th

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: Formal Parameters To While Block

2005-04-30 Thread Autrijus Tang
On Tue, Apr 26, 2005 at 09:37:51AM -0600, Luke Palmer wrote: > Joshua Gatcomb writes: > > The solution is formal parameters. The trouble is I > > can't seem to find a good example in S04 that matches > > what I am trying to do. > > > > while $ref() -> @array { ... } > > We're thinking at the mom

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: Junctions of classes, roles, etc.

2005-04-30 Thread Abhijit Mahabal
On Sat, 30 Apr 2005, Aaron Sherman wrote: On Sat, 2005-04-30 at 22:24 +0800, Autrijus Tang wrote: On Sat, Apr 30, 2005 at 09:13:26AM -0500, Abhijit Mahabal wrote: I do not see how any auto-threading occurs in that code. It is completely innocuous in that sense, and I don't think that is what horrif

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: Junctions of classes, roles, etc.

2005-04-30 Thread Aaron Sherman
On Sat, 2005-04-30 at 22:24 +0800, Autrijus Tang wrote: > On Sat, Apr 30, 2005 at 09:13:26AM -0500, Abhijit Mahabal wrote: > > I do not see how any auto-threading occurs in that code. It is completely > > innocuous in that sense, and I don't think that is what horrified David. > > What was troubl

Re: Formal Parameters To While Block

2005-04-30 Thread Luke Palmer
Aaron Sherman writes: > On Tue, 2005-04-26 at 09:37 -0600, Luke Palmer wrote: > > > We're thinking at the moment that `while` will probably look like this: > > > > sub statement: (&cond is lazy, &block) { > [...] > > Just curious, why a sub and not a macro? Didn't need a macro. statement:

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: Junctions of classes, roles, etc.

2005-04-30 Thread Autrijus Tang
On Sat, Apr 30, 2005 at 09:13:26AM -0500, Abhijit Mahabal wrote: > I do not see how any auto-threading occurs in that code. It is completely > innocuous in that sense, and I don't think that is what horrified David. > What was troublesome was, I think: > my Str|Int $x; > $x.foo(); # r

Re: Junctions of classes, roles, etc.

2005-04-30 Thread Abhijit Mahabal
On Fri, 29 Apr 2005, Brent 'Dax' Royal-Gordon wrote: 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

Re: Pugs documentation & comments

2005-04-30 Thread Stuart Cook
On 4/29/05, Stevan Little <[EMAIL PROTECTED]> wrote: > Autrijus had recommended beginning with src/Eval.hs and using the > Haddock tool (http://haskell.org/haddock/). You are welcome to start > right there. I've made some headway in understanding Eval.hs, but it seems to rely pretty heavily on AST

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: Formal Parameters To While Block

2005-04-30 Thread Aaron Sherman
On Tue, 2005-04-26 at 09:37 -0600, Luke Palmer wrote: > We're thinking at the moment that `while` will probably look like this: > > sub statement: (&cond is lazy, &block) { [...] Just curious, why a sub and not a macro? > That does pose a problem with: > > given $foo { > until

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