Sanko Robinson

Human.

/ /
· ·

2026

C++ Exception Unwinding
1

I've put it off for months but now have unit tests that sorta kinda demonstrates it. [Edit: I have no roadmap or timeline but] I'll need to come back to this before I try to wrap the C++ based SFML with Affix.

sanko/Alien-xmake0.08
**Full Changelog**: https://github.com/sanko/Alien-Xmake/compare/0.07...0.08
sanko/Affix.pmv1.0.5
Allow users to define types in Affix::Wrap
sanko/Affix.pmAffix::Build and Affix::Wrap
Based on infix v0.1.3
Chapter 34: The Zero-Dependency Image Processor

For our next trick, we'll tackle the most common headache in the C ecosystem: Dependency Hell. Usually, if you want to manipulate images, you need libpng, libjpeg, zlib, and headers for all of them installed on your system. If your user is on a different OS, your script fails. To avoid that, let's use Affix::Build to compile the famous stb single-header libraries.

sanko/Alien-xmake0.06
**Full Changelog**: https://github.com/sanko/Alien-Xmake/compare/0.05...0.06
Chapter 33: SIMD Vectors for Number Crunching

Standard Perl scalars are designed for flexibility, not raw math throughput. When you need to process millions of coordinates, pixels, or audio samples, you want SIMD (Single Instruction, Multiple Data).

Chapter 31: Wrapping C++ Classes by Hacking Vtables

In Chapter 30, we wrapped C++ classes using extern "C" helper functions in a shim. That is the 'Right Way.' But what if you are stuck with a pre-compiled C++ library and can't recompile it? What if you're just super bored? Let's say you have an object pointer, but no C functions to pass it to.

Chapter 30: Wrapping C++ Classes with C Shims

C++ libraries are notoriously difficult for FFI systems to bind. Unlike C, which uses standard symbol names, C++ "mangles" function names (for example, turning Warrior::attack() into _ZN7Warrior6attackEv) to support features like overloading. Furthermore, C++ methods require a hidden this pointer to know which object instance they are acting upon.

Chapter 29: An Affix Module Factory

While runtime wrapping is convenient, it has a startup cost (parsing headers every time). For a distributable CPAN module, you want the parsing to happen once (on your machine), generating a pure Perl module that users can load instantly.

Chapter 28: Instant Runtime Wrappers

The fastest way to use Affix::Wrap is Runtime Wrapping. In this workflow, you parse the headers and bind the functions immediately when your script starts. This is ideal for rapid prototyping, internal scripts, or testing, as you don't need to generate a separate .pm file.

Chapter 27: Automated Introspection with Affix::Wrap

Writing affix signatures manually is great for control, but it becomes tedious when wrapping a library with hundreds of functions and structs. Instead of staring at a .h file and manually translating C types to Affix types, let Affix::Wrap automate it!

2025

Chapter 26: The "Kitchen Sink" Polyglot Library

Sometimes, the best tool for the job involves three different tools. You might have legacy math models in Fortran, performance-critical loops in Assembly, and a clean C API to orchestrate them.

Chapter 24: The Instant C++ Library

Throughout this cookbook, you've seen me use Affix::Build to generate shared libraries on the fly from C. However, building shared libraries isn't a concept limited to just C so neither are the capabilities of Affix::Build.

Chapter 21: Perl Callbacks in C Structs (vtables)

In C, OOP is often simulated using structs containing function pointers. This pattern is commonly known as a vtable and allows a library to call different implementations of a function depending on the object it's holding. With Affix, you can populate these fields with Perl subroutines, effectively creating a Perl class that C can call into.

sanko/infixv0.1.3
This release contains real-world usage fixes since I'm using it in Affix.pm and not just experime...
Perl-SDL3/SDL3.pmInitial public release
This is the first public release of SDL3.pm, a pure Perl wrapper for SDL3.
sanko/Affix.pmUnion and lvalue pointer fixes
**Full Changelog**: https://github.com/sanko/Affix.pm/compare/v1.0.0...v1.0.1
sanko/Affix.pmStable enough
**Full Changelog**: https://github.com/sanko/Affix.pm/compare/v0.12.0...v1.0.0
Packed Trampolines

We have nearly reached the end of the current roadmap. infix is fast, secure, and portable. But optimization is an addiction, and I am already looking at the next bottleneck. The new direct marshalling API wins the benchmark races because it removes the intermediate step of packing C values into a buffer. Double indirection is slower than pulling them straight from the source SV*s.

Language Specific Trampolines

This is an explanation and expansion of discussion #26 now that I've started actually implemented and designed my idea.

sanko/infixPolish
Really sanding down the rough edges this time around. This release includes significant ergonomic...
System calls via FFI

I've had this idea for a while now and might put effort into it next. I understand that this would be a massive task but the first 30% of it is already accomplished by infix existing in its current state.

sanko/infixInitial Public Release
## [0.1.0] - 2025-10-27
Coercion of arguments into a solid block of memory
1

Shower thought time... Internally, would it be faster to coerce args that would end up on the stack into a single block of malloc'd memory? Currently, our trampolines must perform a double-indirection to put data on the stack:

2023