Google 그룹스는 더 이상 새로운 유즈넷 게시물 또는 구독을 지원하지 않습니다. 과거의 콘텐츠는 계속 볼 수 있습니다.

Accessing parrot functions/PMCs with Pugs

조회수 0회
읽지 않은 첫 메시지로 건너뛰기

Christian Renz

읽지 않음,
2005. 10. 22. 오전 3:40:3505. 10. 22.
받는사람 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

읽지 않음,
2005. 10. 22. 오전 9:55:1105. 10. 22.
받는사람 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

읽지 않음,
2005. 10. 24. 오전 5:47:2305. 10. 24.
받는사람 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개