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

Accessing parrot functions/PMCs with Pugs

0 views
Skip to first unread message

Christian Renz

unread,
Oct 22, 2005, 3:40:35 AM10/22/05
to perl6-c...@perl.org
Hi all,

I recently got my feet wet with Pugs. So far, it's been fun
:-). However, I couldn't find any information on how to access
functions defined in parrot, or even how to use classes defined as
PMCs in parrot. Is this possible already?

Greetings,
Christian

--
cr...@web42.com - http://www.web42.com/crenz/ - http://christian.web42.com/

"The computer should be doing the hard work. That's what it's paid to
do, after all." -- Larry Wall

Autrijus Tang

unread,
Oct 22, 2005, 9:55:11 AM10/22/05
to Christian Renz, perl6-c...@perl.org
Christian Renz wrote:
> I recently got my feet wet with Pugs. So far, it's been fun
> :-).

Cool!

> However, I couldn't find any information on how to access
> functions defined in parrot, or even how to use classes defined as
> PMCs in parrot. Is this possible already?

If Pugs is linked with Parrot (env PUGS_EMBED=parrot perl Makefile.PL),
this should work (may require blead parrot as 0.3.0 has a nasty bug in
its C embedding interface):

eval("print 1", :lang<pir>)

as well as this syntax:

require_parrot 'foo.pir';

We don't currently have a way to bind Parrot symbols as Pugs symbols.
Feel free to write up tests in t/ -- maybe t/embed/ -- on how you think
it should behave. Alternately, come to irc.freenode.net #perl6 and
chat a bit on how you plan to use it; posting p6c is fine too.

Thanks,
/Autrijus/

PS. I just sent you a committer bit; welcome aboard, and remember to check in
your name to AUTHORS under the subversion repo http://svn.openfoundry.org/pugs/
:-)

Christian Renz

unread,
Oct 24, 2005, 5:47:23 AM10/24/05
to perl6-c...@perl.org
> eval("print 1", :lang<pir>)
> require_parrot 'foo.pir';

Would it also be possible to somehow 'link' it with a parrot bytecode
file?

Regards,
Christian

--
cr...@web42.com - http://christian.web42.com - http://www.web42.com/crenz/

0 new messages