*delurk*

Dan Sugalski's Perl internals talk
(http://dev.perl.org/perl6/talks/tpc5-internals/perl%206%20internals.html),
contains the following:

Extensions (cont)

    * Inline, or something like it, is probably going to be the standard
      for extending perl
    * XS, when you have to resort to it, will be far less nasty than it
      is now 

So it looks like there will be an analogue of Inline, and it will be
part of the Perl6 core. Woo, and moreover yay!

It looks like it also will be possible to dynamically reconfigure the
Perl6 parser so it accepts C, which will then be compiled to Parrot
bytecode as normal.  This seems to mostly obviate the point of using C,
but it's an option. This is with the Real Official Perl6 Compiler
Thingy: what about extending Pugs?

The Pugs FAQ says:

  Can Pugs work with Haskell libraries?

  Pugs can be compiled with hs-plugins support, which allows it to use
  Haskell libraries. It is also capable of dynamically loading Haskell
  modules. Aside from this, inline Haskell can be evaluated using
  eval('...', :lang<haskell>).

  In addition, at the basic level, you can statically link Haskell
  libraries into Pugs primitives, by modifying a few lines in Prim.hs.

  Can Pugs work with C libraries?

  Not yet. However, HaskellDirect seems to provide an easy way to
  interface with C, CORBA and COM libraries, especially when combined
  with hs-plugins described above.

So it sounds like you should be able to write some code that takes your
C, generates IDL for it, feeds that to HaskellDirect to create a Haskell
wrapper library, then links that into your Perl6.

HTH,

Miles

-- 
All concepts are Kan extensions.
  -- Saunders Mac Lane

Reply via email to