Other articles


  1. Poking around at POSIX message queues in Linux

    Published: Sun 10 May 2020

    In posts.

    I was recently reviewing some code introduced usage of POSIX message queues into some tests. I hadn't used them before, and nothing in the code base already used them, so I needed to familiarize myself with them a bit.

    One annoyance of working with POSIX message queues on Linux is that there doesn't seem to be a ubiquitous command-line tool for manipulating them. Their predecessor, sys v message queues, have ipcmk read more

  2. Interposing internal libc calls

    Published: Tue 05 May 2020

    In posts.

    Calls within libc are generally pre-linked. As a result, they can't be interposed using LD_PRELOAD. This makes it tricky to use LD_PRELOAD to intercept, e.g., all calls to write, but there are some workarounds.

    Doubling all writes to standard output

    Suppose we want to use LD_PRELOAD to force any output to stdout read more

  3. Patching glibc to make its syscalls interposable

    Published: Mon 04 May 2020

    In posts.

    Suppose we have a program, call_write.c, that writes some strings to stdout:

    $ cat ./call_write.c
    #define _GNU_SOURCE
    
    #include <unistd.h>
    #include <sys/syscall.h>
    #include <stdio.h>
    #include <string.h>
    
    int main(int argc, char **argv) {
        const char* msg = "syscall\n";
        syscall(SYS_write, STDOUT_FILENO, msg, strlen(msg));
    
        msg = "write …
    read more
  4. Guinea Pig Guinea Pig

    Published: Sat 06 July 2013

    In posts.

    Guinea Pig Guinea Pig

    Guinea Pig Guinea Pig is an HTML5 game made for the 2013 Global Game Jam. You play a (further) miniaturized, super-powered, Guinea Pig. Your job is to weaken (with your eye-lasers, of course) and collect the germs infecting the patient's arteries, while contending with the rhythmic blood flow.

    Made with …

    read more
  5. Dance Ave

    Published: Sat 06 July 2013

    In posts.

    I got an interesting request a few months ago--to implement the telephony back-end for a real life dancing game to be played at the 2013 Three Rivers Arts Festival.

    Dance Ave

    Dance Ave is a physical game where players try to reach all of several stations positioned around an area. Players may …

    read more
  6. In-Repository Documentation

    Published: Wed 04 July 2012

    In posts.

    Introduction

    Two popular places to keep documentation for programming projects are:

    1. In README files in the code repository.
    2. In a separate wiki.

    In this article, I propose that a compelling way to manage documentation is to combine the two: to write the documentation as markdown files in the code repository …

    read more

social