Lexical closures with END blocks warn, but Just Work

I was just impressed by the awesomeness of Perl. More testing revealed to me that "use 5.018" does not invoke "use warnings", which dampened my enthusiasm a little. But Perl is still pretty awesome. Here's the situation.

I write lots of Prima GUI applications. In this one (a presentation if you can believe that), I wanted a timer so I could see how long my talk was going. I had just run through part of my lecture and meant to check my time before closing (the clock is discretely placed in a separate window), but forgot to check before quitting the talk. Frustrated, I decided that I wanted my program to print the talk duration when it was finished.

My normal approach would have been to declare a file-scope lexical that gets initialized at startup, and refer to that in my END block. But instead, I decided to embed the END block within the initialization function itself.

What?! CUDA::Minimal... works?

I wrote CUDA::Minimal back in late 2010/early 2011 and used it in some of my research before defending my Ph. D. dissertation in May of 2011. At my postdoc I didn't use parallel anything, so CUDA::Minimal languished. When I picked it back up, it didn't even compile on a modern version of Perl. It was disheartening, to say the least.

But now, once again, it works (as long as you're not using Perl v5.16)!!!

Am I pandering to the smoke testers?

I have a quick sanity check I'd like to throw out there.

I've been working all week on Alien::TinyCC, and I made some great progress. My initial distribution wasn't properly checking that the build steps completed successfully, so I wasn't getting any useful information back from the smoke testers. Once I fixed that, I started to get some useful feedback. Mostly.

XS::TCC, another tinycc-based jit compiler

Without knowing it, both Steffen Mueller and I released modules this morning related to using the Tiny C Compiler for compiling C code at runtime! I have tried to make a fuss about mine (as evidenced by my blog entry this morning), but neither of us were aware of the other. Hopefully we can combine forces. Steffen, of course, knows an aweful lot more about typemaps and the available typemaps module ecosystem than do I. I plan to contribute the energy and enthusiasm! :-)

C::TinyCompiler, a just-in-time C compiler for Perl

There are many things you might do to speed up your Perl code. After profiling and benchmarking, you revise the slow spots, or maybe try a different algorithm. If you still need more speed, you may use Inline::C, or use PDL if you are doing numerics, or even write your own XS code. Reini Urban has even tried to create a Perl Backend that rewrites your Perl code as C code, and has even worked on a port of Perl5 to Potion.

But let's face it. Sometimes it would just be easier if you could write your code in C, and interpolate a string into it. Wouldn't it be nice if there was a C equivalent of Perl's string eval?

Well, in Perl, now there is.