On Debian/Ubuntu, command-not-found
tells you what package to install when
you try to run a program you don't have. I find this helpful, but it takes a
long time to maintain its index for lookups. This post tells the meandering
story of how I first optimized command-not-found
, then replaced it with a
script that doesn't use an index at all.
Website Updates
LogCabin 1.1
| raft logcabinAnnouncing the release of LogCabin 1.1! This is the second stable release of the LogCabin coordination service, which includes a C++ implementation of the Raft consensus algorithm.
LogCabin 1.0
| raft logcabinLogCabin 1.0 is out! This is the first stable release of the LogCabin coordination service, which includes a C++ implementation of the Raft consensus algorithm. If you're new to these, I recently spoke about Raft and a little about LogCabin at the Sourcegraph Hacker Meetup in San Francisco; watch the video for a visual walk-through of how Raft works.
LogCabin. appendEntry(6, "Preparing for 1.0")
|
raft
logcabin
This is the sixth in a series of blog posts detailing the ongoing development of LogCabin. This entry describes progress towards the upcoming 1.0.0 release of LogCabin, a useful new command-line client to access LogCabin, and several other improvements.
LevelDB with Transactions on Node.js
This post surveys the libraries available in Node.js for LevelDB, shows that support for transactions is missing, and lays out a path to get there. In short, we need the Node bindings for LevelDB to expose snapshots, then we can build transactions with snapshot isolation on top without much trouble.
LogCabin. appendEntry(5, "Cluster Clock, etc")
|
raft
logcabin
This is the fifth in a series of blog posts detailing the ongoing development of LogCabin. This entry describes a new cluster-wide monotonic clock used for client session expiry, a new tool to dump out the contents of a LogCabin server's log and snapshot, a couple of performance improvements, and several changes around how server IDs and addresses are assigned and used.
LogCabin. appendEntry(4, "SegmentedLog")
|
raft
logcabin
This is the fourth in a series of blog posts detailing the ongoing development of LogCabin. This entry describes LogCabin's new storage module and several other recent improvements.
Stanford.edu Email Account Deleted
| low-techNow that I've graduated, Stanford has deleted my university email account,
ongaro@stanford.edu
. If you tried to send to that address and received an
autoreply, please resend your email to the same username at cs.stanford.edu
instead, which should remain valid for life. (Yes, I had a very similar
post for my Rice email account a few years
ago.)
LogCabin. appendEntry(3, "Server Stats")
|
raft
logcabin
This is the third in a series of blog posts detailing the ongoing development of LogCabin. This entry describes a new tool to extract information from LogCabin servers and a tricky bug that occurred when unregistering handlers from the event loop.
LogCabin. appendEntry(2, "Timeouts")
|
raft
logcabin
This is the second in a series of blog posts detailing the ongoing development of LogCabin. This entry describes the battle of adding timeouts to the client library API. Timeouts are useful for implementing leases in client applications. For example, a client might want to assert its lease but give up after few seconds, and in case of a timeout, it might need to crash or stop other processes from doing things that may no longer be safe.
LogCabin. appendEntry(1, "Hello, world!")
|
raft
logcabin
This is the first in a series of blog posts detailing the ongoing development of LogCabin. This first entry catches up on the developments from when I started working with Scale Computing in November, so it's longer than most of the future updates will be.
The theme of this entry is getting started in a new environment. Up until now, I'd done nearly all of the development of LogCabin on my laptop and on the RAMCloud cluster. Running it somewhere new uncovered a bunch of implicit assumptions baked-in about the environment, so it exposed a new set of issues and bugs. This is fairly inevitable when it comes to low-level systems code, and there's a lot of value in working through it. LogCabin is significantly easier to run now than it was before, and it should be easier for the rest of you to install on your systems, too.
Grad School
| raft logcabinWell, I spent the last five years getting my Ph.D. in Stanford's Computer Science department. I won't do that justice here, but I'll fill in the story briefly so that subsequent posts make sense. I was part of Professor John Ousterhout's group, which is primarily focused on RAMCloud, a large-scale in-memory distributed storage system.
Tips for Running PowerPoint in CrossOver Office
I use Linux exclusively but run Microsoft PowerPoint for some presentations. I won't go into the details of why here, but I wanted to record and share a few tips I use for getting it to run well. Your mileage may vary, obviously.
Manual Window Placement in i3 (Part 2)
This is the second part of a series on making the i3 window manager work the way I want. I left off last time with the goal of changing the way windows are placed as they are created, and I had a couple of pointers from the i3 hacking howto for where to start looking. This post covers how I've set up my test environment.
Manual Window Placement in i3 (Part 1)
I've been using tiling window managers for the past couple of years. I started with awesome, then Notion (a fork of Ion; Ion is no longer maintained), and now I'm in the process of moving to i3. For those of you that aren't familiar with it, the screenshots all look the same. They all behave differently, though, and I guess you just have to find one that fits your mental model.
When you open a new window in most tiling window managers, your existing windows get rearranged or resized to make room for it. This is kind of one main idea, actually, and it works reasonably well when opening your second or third window. Beyond two or three, depending on the screen size and applications, it starts to suck.
Is It Worth the Time?
| low-techToday's XKCD starts to answer: how much time should I spend making a routine task faster?
Bullets in Inkscape
Inkscape is a good open-source drawing program for vector graphics. I'm currently using it to make a research poster, but unfortunately, Inkscape doesn't do bullets. This post discusses your options if you want to use bullets in your Inkscape drawing and introduces a simple Inkscape extension that makes this much easier.
Color GDB Prompt
To add color to your GDB prompt, place the following in your ~/.gdbinit
file:
set prompt \033[0;33m(gdb)\033[0m\040
This makes it easier to find your place visually.
Leveraging Web Technologies for Local Programs
SQLite Database in Git
I store nearly all files of even moderate importance in Git (including this blog post). These are usually plain-text files, but sometimes it's necessary to put binary files under version control. Unfortunately, those are typically difficult to diff and merge, but I recently discovered some features of Git that make this less painful. This blog post focuses on SQLite database files, but at least some of it applies to other binary file types.
rlwrap: readline Wrapper Program
Dealing with a basic command-line prompt in a loop can be painful, so many programs, such as shells, interactive programming languages and debuggers, provide a more featureful prompt. For example, pressing the up and down arrows in a good prompt will flip through previously entered input lines. Programs will often make use of the GNU readline library for this functionality.
If you need to use a program that only has a basic prompt, you may be able to wrap it with the program rlwrap to get some more advanced features. From the man page:
rlwrap runs the specified command, intercepting user input in order to provide readline's line editing, persistent history and completion.
[...]
There are many options to add (programmable) completion, handle multi-line input, colour and re-write prompts. If you don't need them (and you probably don't), you can skip the rest of this manpage.
For example, I recently used rlwrap with jdb, the Java debugger, and Ikarus, a Scheme compiler.
The Cost of Exceptions of C++
Most people seem to have an opinion as to whether exceptions in C++ are slow or fast, but very few people have put any useful numbers out there. Here's a lower bound.
Book Log
| low-techRice.edu Email Account Deleted
| low-techRice has deleted my undergraduate email account, diego.ongaro@rice.edu , since I am no longer a student there. If you tried to send to that address and received a bounce notification, please resend your email to the same username at alumni.rice.edu instead.
Twin Peaks iPhone Panorama
I went up to Twin Peaks in San Francisco with Jay a few weeks ago. It was a nice view but kind of a worst-case scenario for a photo: my iPhone camera (VGA), poor lighting as the sun was setting, and stong winds.
That day I took a bunch of overlapping shots with my phone. Then I used the GIMP's automatic white balance correction on each of them. Next I stitched them together with Hugin, and finally I edited the stitched image with the GIMP. The following mediocre image is the result (click for the full 1534x652 image):
Xfce Stopwatch Plugin
| xfceI needed an excuse to try Mike's Vala bindings for Xfce, so I created a new little plugin for the panel, the xfce4-stopwatch-plugin.
In the original release announcement on July 28th, I wrote:
This is the first release of the stopwatch panel plugin, which you can use to time yourself on different tasks. It's stable and usable, but quite minimal still.
The functionality is best summarized with this image from the web site:
Lighttpd Fails to Bind to Localhost
I installed the web server lighttpd
on my laptop to test some configuration settings. As I didn't want to expose
the server on the network, I uncommented
server.bind = "localhost"
from
/etc/lighttpd/lighttpd.conf
.
Then, restarting lighttpd failed with the following error:
getaddrinfo failed: Name or service not known ' localhost '
Chef Roger's Knife List
| low-techCgit Hacking
Last week I hacked a couple new features into
cgit, a web interface for
Git, since it's the one I [previously used] on ongardie.net. I added
https://
URLs for the Atom feed and also syntax highlighting
when viewing files.
Tabs in Vim
Version 7 of Vim introduced tabs to the editor, and these are a few of my tab-related tips.
Overlooked Python Built-Ins
So, I just realized that I re-implemented two built-in Python functions on a small project I'm working on for ETSZONE. I just didn't know that these existed, so I'm writing about them here in case you've overlooked them too.
Extract Unique Lines From a File
Off-Brand Q-tips
| low-techTo start off this blog, I'm writing about things you stick in your ear. I suspect I'll end up writing about techier subjects soon enough. Nevertheless, it's probably worthwhile to attempt to set a precedent of, at least occasionally, writing about something low-tech.