RSSAmplifier

Blog

Geoffrey Thomas (geofft)

ldpreload.comRSS feed ↗19 posts

Latest posts

9 Reasons Python Sucks

This is a list of reasons why I think Python is a terrible programming language. Naturally, none of them apply to other programming languages. It's impossible to determine at compile time whether a Python program can terminate. While strings in Python 3 are significantly better than strings in Python 2 …

Finding a kernel regression in half an hour with git bisect run

The git bisect command helps you identify the first commit in a range that broke something. You give it a good commit and a bad one, and it will do a binary search between the two to find the first bad commit. At each step, you say either git bisect …

Hostnames and usernames to reserve

If you're setting up a service where people can register their own usernames to be used as a hostname ( username.example.com ), email address ( username@example.com ), or URL path ( example.com/username ) within your domain, there are some common names you should avoid letting the general public register. Many …

Smashing the heap by overflowing the stack

I ran across something strange while learning about Rust's stack overflow and segmentation fault handling. First, some backstory: in the past, Rust (and Go) used segmented stacks, also known as split stacks . This is a scheme that allows you to start each thread with a small amount of stack space …

signalfd is useless

UNIX (well, POSIX) signals are probably one of the worst parts of the UNIX API, and that’s a relatively high bar. A signal can be sent to your program at any point when it’s running, and you have to deal with it somehow. Traditionally, there are three ways …

Testing NSS modules in glibc

The Name Service Switch (NSS) is the feature of many C libraries, including the standard Linux one (GNU libc) and the standard Solaris one, that allows name lookup routines to be implemented via plugins. "Name lookup" here refers to things like usernames, host names, etc. When you run ls -l …

A proposal for /usr/bin/python between Python 2 and 3

I just got back from PyCon, where a few debian-python team members met to discuss some goals for Python packaging in Debian over the next release cycle. One item of interest is moving away from installing Python 2 by default (expecting it to be desupported in 2020 ), which raises questions …

SSH ControlMaster and ControlPath

One of my favorite SSH tricks is using the ControlMaster and ControlPath options for speeding up connections. The idea is simple: if you're already logged into a server and you need to log in again, just reuse the connection you already have instead of redoing the entire connection handshake. In …

Creating tiny Debian packages and repositories for testing

For those of you who do a lot of Debian upgrade path testing… I got annoyed at equivs not supporting Breaks: lines at all ([Debian bug 571638](http://bugs.debian.org/571638)), so I wrote a small shell script to spit out the minimal debhelper 7 rules file -using package …

Using Google ClientLogin

The answer to this was much less obvious than I expected it to be, so I figured I’d blog it. If you’re using Google’s ClientLogin API for turning a username and a password into an auth token, what do you do with the token? The result of …

Be My Escape

My a cappella group is singing Relient K’s “Be My Escape” this semester. In discussion at rehearsal after we received the music, it was pointed out that the words are about as fundamental to how cool the song is as the music (and the music is pretty amazing), but …

The Quota Corollary to Parkinson’s Law

Parkinson’s Law , the famous quote from his 1955 essay, claims, “Work expands so as to fill the time available for its completion.” It seems there is an analogous principle for disk space: Date: Mon, 10 Sep 2007 23:05:25 -0400 (EDT) To: accounts@mit.edu Subject: AFS quota …

Testing C code from the command line: gccrun

I wrote a little utility the other day before I found myself in need of it: it takes its argument, compiles it as the body of a C program, and runs it. This is way more convenient than you’d think at first glance: it turns out that, for one- …

Software I want (other people) to try

I find myself recommending software I’ve heard of but never tried with the desire to get other people to spend effort on making them work and letting me know if they’re worthwhile. I’m generally clear about that that’s what I’m doing, but still, it feels …

Per-computer colored prompts in bash

I use my Athena account from many computers, often multiple computers at once via SSH, and it’s useful to keep track of which terminal is showing a prompt from which computer. One reasonably easy way to accomplish that is to color the prompt as a function of which computer …

Stupid tricks at the userspace/kernelspace boundary, part 1

Basically every operating system structures execution into two logical parts, userspace and kernelspace . The former is where the application’s own code executes, and the latter is where the OS kernel services requests from applications that require privileged access of various kinds — reading and writing data on disk, getting more …

HTTPS and the clustered trusted third party

Rather than going into an in-depth rant about SSL/TLS/HTTPS and everything I hate about them, let me just discuss two problems I’ve run into recently. As a bit of background, SSL/TLS addresses the issue that Internet connections are completely unauthenticated, and anyone who can intercept your …

Installing Ubuntu Lucid via debian-installer over wireless

I’m a huge fan of installing Debian and Ubuntu systems with debian-installer . Unlike debootstrap , which just installs a set of base packages into a directory, debian-installer does a number of nice things such as offering to do partitioning, setting /etc/fstab correctly, generating locales, installing a bootloader, etc. etc …

Free software and reusability

The rising popularity of the Free Software Movement and the open source philosophy have perhaps yielded an incomplete understanding of them in popular culture, that “open source” means merely “the code is public”. This is far from complete, and not just in an ideological sense but in a practical one …