Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

embedding

6 views
Skip to first unread message

Isaac Freeman

unread,
Jan 12, 2007, 12:52:16 PM1/12/07
to perl6-i...@perl.org
Hello,

I am looking to embed parrot in a project of mine, sort of as a
configuration/scripting engine. I've looked at embed.h, and it does
show how to start an interpreter, and how to make it run code, but I
don't see any mechanism for communication between the embedding
program and the scripts being run by the interpreter... Is this simply
not implemented? If not, are there plans to? I would love to help
implement this if it would be accepted in the main source tree. If
this is already implemented, can someone please give me some pointers
as to how one uses it?

Thanks

--
James "Isaac" Freeman
(919) 749-3561
memotype (at) gmail.com

Jeff Horwitz

unread,
Jan 12, 2007, 1:08:09 PM1/12/07
to Isaac Freeman, perl6-i...@perl.org
On Fri, 12 Jan 2007, Isaac Freeman wrote:

> Hello,
>
> I am looking to embed parrot in a project of mine, sort of as a
> configuration/scripting engine. I've looked at embed.h, and it does
> show how to start an interpreter, and how to make it run code, but I
> don't see any mechanism for communication between the embedding
> program and the scripts being run by the interpreter... Is this simply
> not implemented? If not, are there plans to? I would love to help
> implement this if it would be accepted in the main source tree. If
> this is already implemented, can someone please give me some pointers
> as to how one uses it?
>

it's been over a year since i've worked on it, but mod_parrot should give
you some ideas of how to accomplish this. it embeds parrot inside
apache in order to eventually provide HLL layers like mod_perl6, PHP, etc.
what was nice about it was that it WORKED! check it out at
http://www.smashing.org/mod_parrot/

here are some of the more interesting things it does:

* calls parrot subroutines from the embedding process
* calls embedder C functions from parrot
* shares data between parrot and the embedder

i seriously doubt it compiles against the latest parrot, but enough beer
might convince me to come out of hiatus and fix that... ;-)

if you dive into the code and need more details, feel free to contact me
off-list.

-jeff

0 new messages