On Tue, 12 Aug 2003, Michal Wallace wrote:
> I wound up getting a couple C books today. I'm
> trying to see what I can do about wrapping
> PyObject as a PMC...
What's the secret to making parrot recognize
a new PMC? I've got my .pmc file but I'm
not sure what to do next. The article about
making
Michal Wallace <[EMAIL PROTECTED]> wrote:
>class Clown:
>pass
> I have a lexical variable "Clown" pointing at
> a parrotclass pmc.
> However, when I go to instantiate Clown, I do
> this:
First parrot objects aren't that finished, that you can instantiate an
object...
>bozo = Cl
Sean O'Rourke:
# >* make parrotclass handle "invoke"
# > this strikes me as the most efficient,
# > but I'm not really confident with C
# > so I'm hesitant to try it
#
# This seems to me like the way to go, except you might
# subclass parrotclass to pythonclass (since this lack-
"K Stol" <[EMAIL PROTECTED]> writes:
> > What's the secret to making parrot recognize
> > a new PMC? I've got my .pmc file but I'm
> > not sure what to do next. The article about
> > making PMC's on perl.com is WAY out of date.
> >
>
> 1. create your PMC class, add it to the classes/ directory
>
On Tue, 12 Aug 2003, Leopold Toetsch wrote:
> > ... So I'm trying to decide between two
> > approaches:
>
> 3) wait until classes and objects are done ;-)
4) simulate an object system with closures :)
I wound up getting a couple C books today. I'm
trying to see what I can do about wrapping
PyO
- Original Message -
From: "Sean O'Rourke" <[EMAIL PROTECTED]>
To: "Michal Wallace" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, August 11, 2003 6:43 AM
Subject: Re: pirate status / need help with instances
> Michal Wallace <
- Original Message -
From: "Sean O'Rourke" <[EMAIL PROTECTED]>
To: "K Stol" <[EMAIL PROTECTED]>
Cc: "Michal Wallace" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, August 11, 2003 7:36 AM
Subject: Re: pirate status / need
- Original Message -
From: "Michal Wallace" <[EMAIL PROTECTED]>
To: "Leopold Toetsch" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, August 12, 2003 5:46 AM
Subject: Re: pirate status / need help with instances
> On Tue, 12 Aug 2003
Michal Wallace <[EMAIL PROTECTED]> writes:
> Py-pirate can now handle:
Cool...
>* make parrotclass handle "invoke"
> this strikes me as the most efficient,
> but I'm not really confident with C
> so I'm hesitant to try it
This seems to me like the way to go, except you might
--- Brent Dax <[EMAIL PROTECTED]> wrote:
> Sean O'Rourke:
> # >* make parrotclass handle "invoke"
> # > this strikes me as the most efficient,
> # > but I'm not really confident with C
> # > so I'm hesitant to try it
> #
> # This seems to me like the way to go,
> # except you m
"K Stol" <[EMAIL PROTECTED]> writes:
> invoke is defined in core.ops, and the return value
> of the PMC implementation should be an address,
> because this result is used in the GOTO macro. So,
> only an address can be returned.
Sorry, I mean "return" in the parrot sense, i.e. place
on top of the
Just wrapping up an all-night coding spree...
Py-pirate can now handle:
- functions (closures, recursion, etc)
- global variables
- tuples (but they turn into lists)
- dictionaries (create, setitem, getitem, print)
- list comprehensions
- raise (strings only)
- try...except (
"K Stol" <[EMAIL PROTECTED]> writes:
> I may be wrong, but where should the class be stored?
> The newclass op has an out-parameter where the newly
> created class is stored. Invoke doesn't have
> that. (right?)
Presumably it would just return the new object like an
ordinary function call.
/s
Michal Wallace <[EMAIL PROTECTED]> wrote:
> What's the secret to making parrot recognize
> a new PMC? I've got my .pmc file but I'm
> not sure what to do next.
Additionally to the static approach, you could try dynclasses/README.
> Sincerely,
>
> Michal J Wallace
leo
On Mon, 11 Aug 2003, Brent Dax wrote:
> Sean O'Rourke:
> # >* make parrotclass handle "invoke"
> # > this strikes me as the most efficient,
> # > but I'm not really confident with C
> # > so I'm hesitant to try it
> #
> # This seems to me like the way to go, except you might
>
15 matches
Mail list logo