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

extproc_parrot

1 view
Skip to first unread message

Jeff Horwitz

unread,
Aug 5, 2003, 1:56:46 PM8/5/03
to perl6-i...@perl.org
after many days of swimming through source code, i've successfully built a
library that lets you embed parrot in oracle. this was important to me
because for extproc_perl (embeds perl in oracle) to have a future with
perl 6, i had to embed parrot. what makes this even cooler is that now we
can embed other languages like python (via pirate or equivalent), BASIC
(sick, i know, but that should be possible now), and whatever other
languages are targeted to parrot.

the library itself is just a proof-of-concept, hacked up from existing
extproc_perl code, but it works:

# hello.pasm
# Sets S31 to "Hello, name", where name is the first argument to parrot
# S31 is retrieved by Oracle as the function's return value

main: set S0, "Hello, "
set S1, P0[1]
concat S0, S1
set S31, S0

SQL> select parrot('hello','Jeff') from dual;

PARROT('HELLO','JEFF')
----------------------
Hello, Jeff

hopefully this can jumpstart some discussion on embedding, since there's
an actual application that can make use of it. i'll post the code once i
put together a working Makefile.

Tupshin Harper

unread,
Aug 5, 2003, 2:40:49 PM8/5/03
to Jeff Horwitz, perl6-i...@perl.org
Jeff Horwitz wrote:

>after many days of swimming through source code, i've successfully built a
>library that lets you embed parrot in oracle. this was important to me
>because for extproc_perl (embeds perl in oracle) to have a future with
>perl 6, i had to embed parrot. what makes this even cooler is that now we
>can embed other languages like python (via pirate or equivalent), BASIC
>(sick, i know, but that should be possible now), and whatever other
>languages are targeted to parrot.
>
>

There's something sublimely satisfying about being able to embed bf in
Oracle. Thank you. ;-)

-Tupshin

0 new messages