Blog Archives

Wrapping a C shared library with Perl and XS

Posted on March 18, 2017. Filed under: Uncategorized | Tags: , , , , , , |

Wrapping a C shared library with Perl and XS This tutorial shows how to wrap a C shared library using XS and Perl (including creating a trivial test shared library). Also posted to PerlMonks where the discussion references InlineX::C2XS.

Read Full Post | Make a Comment ( Comments Off on Wrapping a C shared library with Perl and XS )

Callback Functions Between C and Perl

Posted on February 27, 2017. Filed under: Uncategorized | Tags: , , |

Callback Functions Between C and Perl Everything you ever want to do with xs is documented somewhere in perlxs, perlguts, perlapi, perlxstypemap, and perlcall. Figuring out where it’s documented, and how it relates to everything else, is the hard part.

Read Full Post | Make a Comment ( Comments Off on Callback Functions Between C and Perl )

Send in a Perl aref to C, get back a Perl array (and using the generated XS)

Posted on January 27, 2017. Filed under: Uncategorized | Tags: , , , , |

Send in a Perl aref to C, get back a Perl array (and using the generated XS) This will show you how to pass a Perl array reference (aref) into a C function, convert the aref into a C array, work on it, then push it back onto the stack so the C function returns […]

Read Full Post | Make a Comment ( Comments Off on Send in a Perl aref to C, get back a Perl array (and using the generated XS) )

C::Blocks Advent Calendar 2016

Posted on December 3, 2016. Filed under: Uncategorized | Tags: , , , , , , |

C::Blocks Advent Calendar Perl is great, but sometimes I find myself reaching for C to do some of my computational heavy lifting. There are many tools that help you interface Perl and C. This module differs from most others out there by providing a way of inserting your C code directly where you want it […]

Read Full Post | Make a Comment ( Comments Off on C::Blocks Advent Calendar 2016 )

Write Perl XS modules in Swift

Posted on October 28, 2016. Filed under: Uncategorized | Tags: , , , |

github.com/my-mail-ru/swiftperl swiftperl is designed to provide an easy and smooth interoperability between Swift and Perl languages. The primary goal is to write XS modules for Perl entirely in Swift, though running Perl interpreter in Swift environment is also possible.

Read Full Post | Make a Comment ( Comments Off on Write Perl XS modules in Swift )

Getting started with Perl XS and Inline::C

Posted on August 18, 2016. Filed under: Uncategorized | Tags: , , , , |

Getting started with Perl XS and Inline::C There’s a good list of references at the end!

Read Full Post | Make a Comment ( Comments Off on Getting started with Perl XS and Inline::C )

perl XS – passing array to C and getting it back

Posted on August 18, 2016. Filed under: Uncategorized | Tags: , , , , |

perl XS – passing array to C and getting it back I’ve never really learned how to write XS – I just use the XS file that Inline::C creates.

Read Full Post | Make a Comment ( Comments Off on perl XS – passing array to C and getting it back )

Fast tr/// using FFI::TinyCC, FFI::Platypus and Alien::TinyCC

Posted on May 3, 2016. Filed under: Uncategorized | Tags: , , , , |

Re^2: Remove double bracket and singe quotes

Read Full Post | Make a Comment ( Comments Off on Fast tr/// using FFI::TinyCC, FFI::Platypus and Alien::TinyCC )

Next Entries »

Liked it here?
Why not try sites on the blogroll...