Getting started with Perl XS and Inline::C

Getting started with Perl XS and Inline::C

There’s a good list of references at the end!

perl XS – passing array to C and getting it back

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.

Getting to Travis and GitHub Pages Quickly

Getting to Travis and GitHub Pages Quickly

Often, when I’m working locally I like to bounce right over to a GitHub repository url to check something. I ended up writing a bit of code to make this easier. While I was at it, I decided it would be nice to have the same thing for Travis URLs. So, I’ve released this as part of Git::Helpers.

Links:

Git::Helpers

The best ever explanation of Decorators in Python

The best ever explanation of Decorators in Python

I have checked like a dozen explanations for Python Decorators. Some of them are good. But this Stack Overflow answer just beats them all. Such an awesome answer. It is a bit long as it has built the theory step by step.

The first video that has intuitively explained quaternions to me

The first video that has intuitively explained quaternions to me

Saw this video the other day that, for the first time, explained how quaternions work in a way that I understood. Highly recommended, as I know that for a lot of people they’re a magical black box.

Links:

Humane Rigging 03 – 3D Bouncy Ball 05 – Quaternion Rotation

Teach Makefile.PL to use cpanm

Teach Makefile.PL to use cpanm

When writing perl modules, more often than not a few dependencies creep in … which makes it a wee bit awkward when developing the module, because I then have to somehow install these dependencies, and I would rather not get them all over the place but neatly in the module directory so that I have at least a semblance of a stable development environment.

So here goes my solution: A little postamble method for my Makefile.PL.

Perl’s Pegex Module: a great way to parse files by creating grammars

Perl’s Pegex Module: a great way to parse files by creating grammars

We recently came across Pegex and found it to be an interesting module for parsing text data. Instead of using regular expressions directly, the user can write a grammar for the data to be parsed. The data can be automatically converted to a native Perl object or, if the user desires, it’s possible to use actions to handle the grammar while parsing using a Pegex::Receiver class.

Feedback on my way to organize Emacs settings

Feedback on my way to organize Emacs settings

I was reviewing my emacs dot files organization, which at the moment I did it served me well, but I want to know if there are any other better ways to organize your dot files.

Mine just loads a bunch of .el files stored in the inits/ directory in the order the prefixed number in file name states. It also uses use-package to better management.

Name generation in Java

The four main methods of name generation. Fully documented & implemented in Java

SQL joins and Venn diagrams

Here’s a couple of articles on using Venn diagrams to explain SQL joins.

For…

A Visual Explanation of SQL Joins – Jeff Atwood (coding horror)

Since SQL joins appear to be set-based, the use of Venn diagrams to explain them seems, at first blush, to be a natural fit. However, I found that Venn diagrams didn’t quite match the SQL join syntax reality in my testing.

I love the concept, though, so let’s see if we can make it work.

And against…

Say NO to Venn Diagrams When Explaining JOINs

In recent times, there have been a couple of tremendously popular blog posts explaining JOINs using Venn Diagrams. After all, relational algebra and SQL are set oriented theories and languages, so it only makes sense to illustrate set operations like JOINs using Venn Diagrams. Right?