On Wed, Apr 20, 2005 at 04:50:38PM -0400, Matt Creenan wrote: > To expand on this... > > How will you be able to access shared libraries with native code, such as > DLLs on windows? Is there a way to do this proposed for Perl6 yet? If > so, is it possible in PUGS?
It is possible in Pugs's Haskell backend by using the experimental, unspecced (and will probably be changed) eval_haskell() primitive to natively call Win32 DLLs. Alternatively, you can write modules using the experimental, unspecced (and will probably be changed) syntax: module SHA1-0.0.1; inline Haskell => ' import qualified SHA1 sha1 :: String -> String sha1 = SHA1.sha1 '; Inline::C support is also trivial, by translating the C signatures into Haskell FFI calls, and adding them to Pugs.External.C. In Pugs's IMC backend, I expect the same syntax to still hold; I have started investigating interop with Parrot/Tcl, and it does seem feasible. Bringing the topic back to perl6-language, I'd like to inquire how eval and inlining other languages works. Here's some thoughts: eval('printf("Hello!")', :language<C>); eval(:C('printf("Hello!")')); inline C => '...'; inline C => =<foo.c>; If there is some consensus on this, I'd like to change Pugs's existing `eval_perl5()` and `inline` syntax to agree with it. Thanks, /Autrijus/
Description: PGP signature