This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. At the time of writing, we are actually in the season of Christmas, not Advent. I hope you'll forgive these late posts. :-)
Yesterday I used C::Blocks to play around with Perl's C API and mess with keywords. Today I will focus on a couple of neat C tricks that can help clean up the C-end of your library API.
This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Yesterday I compared C::Blocks to other TinyCC-based Perl libraries. Today I will focus on a fun diversion: hacking on the parser with a bit of C::Blocks code.
I must admit that some of yesterday's results have me a bit depressed. I've put a lot of work into this library, and I am really surprised and worried about the performance cliffs I illustrated yesterday. Today, though, we're going to have some fun.
This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Yesterday I explained how to use C::Blocks in multithreaded Perl code. Today I will compare C::Blocks to other TinyCC-based Perl libraries.
This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Yesterday I dug into the details of writing a type that can be used with C::Blocks. Today I explain how to use C::Blocks in multithreaded Perl code.
This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Yesterday I illustrated C::Blocks::Object::Magic
while writing a simple class that had APIs in both Perl and C. Today I dig into one of the keys of yesterday's example: writing a type that can be used with C::Blocks.
This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Yesterday I showed one way to build a (mildly) complex data structure, including handling pointers and managing memory. Today I will explain how to tightly control access to pointers using classes and C::Blocks::Object::Magic
.
This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Yesterday I illustrated the many ways you generate or modify C source code. Today I discuss basic facilities for handling pointers and building C data structures.
This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Over the last few days I have illustrated how to use C::Blocks to write procedural code, how to get data across the Perl/C divide, including using types to do that concisely, and how to write code that is shared across modules and scripts. Yesterday I provided some benchmarks that I hope give a sense for the performance of C::Blocks, and start to indicate the circumstances when it might be useful. Today I am going to illustrate the many ways you can generate and/or modify your C code using C::Blocks including source filters, interpolation blocks, and the good old string eval.
This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Yesterday I showed how to declare and share C functions, which I think is C::Blocks’ killer feature. Today I will show some simple benchmarks that illustrate the performance of C::Blocks-compiled code.
Sorry that this Fifth Advent entry is being posted on the Seventh day of December! I got some really weird benchmark results and it took a while to really dig through them and figure out what was going on. I’ll have to work double-time for the next few days to get caught back up!
This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Yesterday I showed how to get information across the boundary between Perl and C with minimal boiler plate. Today I explain how to declare and use C functions. I also explain the killer feature of C::Blocks: declaring C functions and other things within a module that can be use
d throughout your code.
This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Yesterday I showed how to get information across the boundary between Perl and C. Today I show how to do that for a number of types, including packed arrays, with minimal boiler-plate.
This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. On the first day I demonstrated how to weave procedural C code into your Perl code. Today I will show how to get data across the boundary between Perl and C.
In the tradition of the Perl Advent Calendar, I have decided to write an Advent Calendar for C::Blocks, which is in pre-Beta. My plan is to release a new treat each day about the C::Blocks library. Today we will begin with the basics: what it is and how it works.