pbpp -
A very simple program for pretty-printing text-encoded
protocol messages (the textual representation of
Google'sProtocol Buffers).
I wrote this for use at Google and the company graciously
allowed me to open source the code.
Paredit Refcard (Latex source) -
An updated version of the
Paredit Cheat Sheet
from the emacs wiki.
This is not exactly software, but the original was only
available as a bitmapped image file (and fairly low
resolution, at that) so I recreated it in
LaTeX. In
the process, I cleaned up and/or expanded some of the
examples. I'd love to credit the original author, but
unfortunately no one seems to know who that is. A
PDF version
is also available.
A simple unit testing framework for C -
A variation on a theme I saw once: using C preprocessor macros to
implement a minimal unit testing framework. One can see it in use
for some of the string utilities linked below.
Various C string utilities -
Semi-portable versions of
strcspn()
(tests) and
strspn(),
strcasestr(),
strlcat() and
strlcpy(),
strndup(),
strsep(),
strcasecmp() and
strncasecmp()
(tests),
strnlen()
(tests) and
substr().
I wrote most of these functions over time to address portability
issues (they didn't exist on systems I was using at the time) or
as purely academic exercises. Please note: there is a version
of strlcpy() similar to the one here and attributed to
me on a site maintained by the late Jan Wolter. That copy has a
bug (a conditional if (--size <= 0) { ... } against
a variable of type size_t that is clearly incorrect
since size_t is unsigned. It is easily correct by
changing the conditional to if (size-- == 0) { ... }).
I wrote to Jan asking that he either update or remove that
version, but he did not and unfortunately he passed away in 2014.
Please use this one instead. On a personal note, I was extremely
sad about Jan's passing: he was a wonderful person.
Implementations of bidirectional search in undirected, unweighted
graphs in both Common Lisp and
Go.
spliton.lisp -
A function in Common Lisp to split a string into tokens separated
by any of a set of delimiters (specified in a second string). Used
as a component of the HTTP server serving this site.
uptoinit -
Specific to BSD Unix. Starting with the current process, use
the kvm(2) interface to trace parent processes through
the proc table until we encounter init(8). In other
words, follow a single path in the process tree from a leaf to the
root. I wrote this for administrative purposes: to find incoming
TELNET connections, back when I still ran a
telnetd.
trampoline -
A Unix daemon for proxying incoming TCP connections. I wrote this
for proxying connections to a Plan 9 machine through a Unix host.
usrv -
Serve a program over a Unix domain socket: when a new connection
is accepted on a given socket name, fork and execute the given
program with its standard input, output and error bound to the new
socket.
talkto -
The inverse of usrv: open a file and
read from and write to it; this an be used as a client for programs
served by usrv. Relies on modern systems treating open(2)
on a Unix domain socket as an implicit connect(2).
xfilter -
A Unix filter in the vein of xargs(1), except that for
each line (or NUL-delimited string), pass as an argument to a given
program and arguments, and print if the program returns success.
d20 -
A six function integer calculator (including exponentiation and
square roots) that can include randomized values via dice factors.
Dice are specified using the standard "d" notation (e.g. 3d6).
spliton -
Break the standard input stream into lines delimited by some
seperator string (default is space).
field -
Extract fields from lines; uses syntax similar to awk(1)
to specify fields. Note that this is in Plan 9 C; I wrote it for
the Harvey operating system, which started without an awk port. On
Unix, I build it with
plan9port. It also has a
man page. An older
perl script that did much the same thing is
also available. There is also a
version
that I wrote in Go for the
u-root project.
44ripd -
A specialized RIPv2 receiver that maintains routes and IPENCAP
tunnels for the AMPRNet IPv4 network (44/8): the Amateur Radio
TCP/IP network. This is an AMPRNet RIP daemon, similar to ampr-ripd
or rip44d, but compatible with BSD Unix. I run it on a Ubiquity
EdgeRouter Lite running OpenBSD.
Projects I Maintain or Participate On
While everything listed above was written by me, I also maintain or
have ported various Open Source projects, and there are other collaborative
efforts that I participate in.
The Harvey Operating System -
Harvey is a modern take on the Plan 9 operating system. I am a core
team member.
BSVC: A Microprocessor
Simulation Framework - This is a framework for simulating
microprocessors and simple computers with attached peripherals such
as timers and UARTs. Originally written by Bradford Mott, he
graciously allowed me to take over maintenance and relicense under
the GPL version 2.1 in 2015. It comes with an MC68k simulator and
assembler; the frontend uses Tcl/Tk.
Xinu for 68K -
An independent port of the PDP-11 version of Comer's Xinu operating
system to the 68K. Can run under BSVC.
libprint -
A modernized, stand-alone version of the Plan 9-style formatting
printing routines from Byron's clone of the 'rc' shell.