System Sleuthing - Using ptrace to Print Backtraces

strace is one of my all time favorite command line utilities; not a day goes by when I don't reach for it for something. It's an extremely versatile tool; you can use it to inspect what a program's doing, how a program is doing something, or get an idea of the kinds of things a program is doing to explain why it's running as slowly as it is. I could go on and on about strace, but fortunately I don't have to; Julia Evans has written a number of lovely posts about it if you'd like to learn more.

Read More...
Posted on 2014-06-18

Favorite Vim Options: directory

I was thinking about Vim configuration recently, and I wanted to point out one of my favorite Vim options. Have you ever been working in a Git repository and run a git status, only to encounter a series of swap files in the output? How about having an automated deploy refuse to run because it found an unstaged file in the working directory (you guessed it; a Vim swap file)? In a response to this annoyance, I've had colleagues recommend disabling Vim's swap file feature entirely! I'd like to propose an alternative: my friend, the directory option.

Read More...
Posted on 2014-06-03

Oh My Glob

My recent posts on the inner workings of perl have made me reflect on some of the more advanced, lesser-known parts of the Perl language. One of these features that I'd like to talk about today is the typeglob.

Read More...
Posted on 2013-11-18

Perl 5 Internals - Part Four

The first three installments of this series covered Perl's core data types: scalars, arrays, and hashes. This final installment will cover something a bit different: the optree. Those of you who are familiar with compiler concepts are no doubt familiar with the notion of an abstract syntax tree (known as an AST for short). The optree is perl's take on the AST: it's something similar to, but not entirely the same as, an AST. Before we begin looking at the optree, I recommend reviewing the "Subroutines" and "Compiled code" sections of perlguts, as well as looking at perlcall. It is by no means required, but it might make digesting this content a little easier.

Read More...
Posted on 2013-10-02

Perl 5 Internals - Part Three

In the previous post, we talked about some of the optimizations that perl performs when conducting string and array operations. This time, we'll be diving into how perl implements hashes. But first, a brief clarification...

Read More...
Posted on 2013-09-11