RSSAmplifier

Blog

Ryan Kavanagh's /dev/brain

Recent content on Ryan Kavanagh's /dev/brain

/RSS feed ↗88 posts

Latest posts

(untitled)

Contact

The easiest way to reach me is by email. If you need to reach me concerning please write to research or teaching Ryan Kavanagh <kavanagh.ryan@uqam.ca> Debian or FOSS Ryan Kavanagh <rak@debian.org> any other matter Ryan Kavanagh <rak@rak.ac> N.B. Pour des raisons de confidentialité, les étudiants de l’UQAM doivent m’écrire à mon adresse UQAM en utilisant leur adresse UQAM. Tout courriel qui ne…

Imprimer sous Linux avec les imprimantes Kyocera de l&#39;UQAM

Voici le troisième article dans ma série d&rsquo;articles sur la configuration d&rsquo;imprimantes universitaires sous Linux. Cette fois-ci, je regroupe les démarches pour configurer une imprimante à l&rsquo;UQAM sous Linux. Trouvez le nom de l&rsquo;imprimante réseau en utilisant la commande smbclient -L Fresque.adm.gst.uqam.ca -U CODE_MS -W UQAM, en remplaçant CODE_MS par votre code MS. La…

Battery charge start and stop threshold on OpenBSD

I often use my laptops as portable desktops: they are plugged into AC power and an external monitor/keyboard 95% of time. Unfortunately, continuous charging is hard on the battery. To mitigate this, ThinkPads have customizable start and stop charging thresholds, such that the battery will only start charging if its level falls below the start threshold, and it will stop charging as soon as it…

Routable network addresses with OpenIKED and systemd-networkd

I&rsquo;ve been using OpenIKED for some time now to configure my VPN. One of its features is that it can dynamically assign addresses on the internal network to clients, and clients can assign these addresses and routes to interfaces. However, these interfaces must exist before iked can start. Some months ago I switched my Debian laptop&rsquo;s configuration from the traditional ifupdown to…

(untitled)

(untitled)

(untitled)

Writing BASIC-8 on the TSS/8

I recently discovered SDF&rsquo;s PiDP-8. You can access it over SSH and watch the blinkenlights over its twitch stream. It runs TSS/8, a time-sharing operating system written in 1967 by Adrian van de Goor while a grad student here at CMU. I&rsquo;ve been having fun tinkering with it, and I just wrote my first BASIC program1 since high school. It plots the graph of some user-specified univariate…

Static Comments in Hugo

I switched from Jekyll to Hugo last week for a variety of reasons. One thing that was missing was a port of the &ldquo;jekyll-static-comments&rdquo; plugin that I used to use. I liked it because it saved readers from being tracked by Disqus or other comments solutions, and it required no javascript. To comment, users would email me their comment following a template attached to the bottom of each…

(untitled)

(untitled)

(untitled)

Ryan Kavanagh&#39;s free software projects

I contribute to various free software projects and maintain various pieces of free software. Many of the entries on this page are only of archaeological interest. You are more likely to find my recent work in a Git repository here: https://git.rak.ac https://github.com/ryanakca Projects Debian I maintain several packages in Debian, the universal operating system. Details can be found on my…

(untitled)

(untitled)

(untitled)

(untitled)

(untitled)

(untitled)

(untitled)

Charter Rights &mdash; If You Can Afford Them

Dear Canadians, It turns out that your Charter rights only apply if you can afford them. Section 6(1) of the Canadian Charter of Rights and Freedoms states: Every citizen of Canada has the right to enter, remain in and leave Canada. This is one of the few rights not subject to the Charter&rsquo;s &ldquo;notwithstanding&rdquo; clause: Parliament or the legislature of a province may expressly…

Configuring OpenIKED VPNs for StrongSwan Clients

A few weeks ago I configured a road warrior VPN setup. The remote end is on a VPS running OpenBSD and OpenIKED, the VPN is an IKEv2 VPN using x509 authentication, and the local end is StrongSwan. I also configured an IKEv2 VPN between my VPSs. Here are the notes for how to do so. In all cases, to use x509 authentication, you will need to generate a bunch of certificates and keys:

Creating LVM-backed schroots

I use sbuild to build my Debian packages under a clean environment. To save time I prefer to store my clean chroots on LVM volumes and use snapshotting, instead of extracting the chroots from tarballs every time. I rarely need to create new schroots and I can never remember the steps. To help future me remember (and to help whoever else needs to create an LVM-backed schroot), I&rsquo;ve decided to…

Usenet in 2020

I was reading the message backlog in com on SDF this morning and noticed that cfenollosa is on a nostalgia trip through Usenet and looking for active newsgroups. I still occasionally fire up Gnus and read Usenet articles. Unfortunately, the vast majority of them are spam (though Gnus does a good job of tackling that), followed by link postings. That said there are still some small newsgroups with…

On using multiple Kerberos realms and AFS

Several people have asked me over the past months how to simultaneously authenticate against multiple Kerberos realms and how to hook this up with AFS. To help with this, I&rsquo;ve decided to write it all up once and for all. For the sake of example, I&rsquo;m going to assume that you want to authenticate against the realms ANDREW.CMU.EDU and CS.CMU.EDU using the username gandalf. The first step…

On email tracking

A few years ago, I took out a subscription to The New Yorker for a few months. They continued sending me newsletter e-mails long after I cancelled my subscription. I reprioritized my time and started ignoring these emails too. Not too long ago, they sent me an e-mail, writing: We noticed that you haven’t opened a newsletter from The New Yorker in a while. Do you still want e-mails from us?

On mathematical folklore

Every math student at some point runs across "folklore" results. Paul Taylor gives an entertaining description of what "folklore" means in a comment on Andrej Bauer’s blog: This result is folklore, which is a technical term for a method of publication in category theory. It means that someone sketched it on the back of an envelope, mimeographed it (whatever that means) and showed it to three…

Why I study (natural) languages

Though I study programming languages for a living, I also study natural (human) languages for fun. I think that it is generally useful for PhD students (and researchers and authors in general) to study a new language. In this post, I will give two arguments to support this claim. Sense of Productivity Research is incredibly frustrating: I often spend days bashing my head against against a problem…

On input validation and accessibility

I use a custom keyboard layout based on the Programmer Dvorak layout, where numeric keys are accessed using shift. Accessing number keys via shift is also present on, e.g., the bépo layout. Over the past several months, I&rsquo;ve noticed that more and more websites use validation that prevents me from entering numeric values. This is because the validation is performed ath the keycode level, and…

How not to check email address validity

I recently had to fill in a form on the USPS website requesting me to reconfirm my email preferences. They were kind enough to prepopulate all of the fields with my account data. However, when I went to submit the form, it complained with &ldquo;You must enter a valid email address&rdquo;. I thought this was odd, because they had already accepted my email address in the past, and besides, the…

Configuring the CMU SCS-Public printer on Linux

A year ago, I wrote a post on Configuring CMU SCS printers on Linux. SCS Computing Facilities is rolling out a new single-queue print system, where you fetch your job from the queue to a particular printer using your ID card. They don&rsquo;t provide instructions for configuring this on unfacilitized hosts, so here&rsquo;s what worked for me. Edit 3: They&rsquo;ve added instructions, copied…

Implementing popen and pclose in SML

Though Standard ML provides the OS.Process.system function to execute an arbitrary command using the default system shell, and the Posix.Process structure for fork and the exec variants, it doesn&rsquo;t (as far as I know) provide a mechanism to run a process and capture that process&rsquo;s standard out. I learned from my officemate that I was essentially looking for an SML implementation of…

Presheaf categories are Cartesian closed

\(\gdef{\Hom}{\mathsf{Hom}}\) \(\gdef{\C}{\mathbf{C}}\) \(\gdef{\hC}{\hat\C}\) As I&rsquo;ve been working through &ldquo;Sheaves in Geometry and Logic&rdquo;, I&rsquo;ve been skimming proofs and attempting to rederive them. I normally end up with a better understanding of the material, but sometimes I get stuck. Here&rsquo;s one case where I&rsquo;ve gotten stuck: can anybody tell me why the…

Configuring CMU SCS printers on Linux

Edit: Please see these instructions for printing to the centralised SCS-Public print queue. Unless your Linux host was &ldquo;facilitized&rdquo; (i.e., unless you&rsquo;re still running the stock Linux install provided by the CMU help desk), you&rsquo;re probably scratching your head as to how to add SCS printers to your Linux host. Here&rsquo;s how. (NOTE: You should only add SCS printers if you…

Specifying a custom MTA path in caff

I recently had to sign someone&rsquo;s GPG key. I&rsquo;ve long used the caff tool from the signing-party package to help me with this. Unfortunately, I&rsquo;m using a new laptop and hadn&rsquo;t yet configured caff on it. Moreover, caff uses the system MTA by default, normally found at /usr/sbin/sendmail, and I hadn&rsquo;t yet properly configured it to send mail to the outside world. Since I…

The Yoneda Lemma

I had never before realised the immense usefulness of the Yoneda lemma. In the past few sections of Mac Lane&rsquo;s and Moerdijk&rsquo;s &ldquo;Sheaves in Geometry and Logic&rdquo;, it&rsquo;s been used both as a proof tool and as a heuristic for finding the right definition of a functor (in this case, the exponential functor in a presheaf category). Here is a direct proof that does not require…

On terminal objects and colimits

I&rsquo;m currently working through Mac Lane&rsquo;s and Moerdijk&rsquo;s &ldquo;Sheaves in Geometry and Logic&rdquo;, and came upon the following two sentences in a proof (p. 43): Note that when \(P = Hom(-, C) = \mathbf{y}C\) is representable the corresponding category of elements \(\int P\) has a terminal object—the element \(1 : C \to C\) of \(P(C)\). Therefore the colimit of the composite \(A…

Brouwer: Unreliability of the Logical Principles

This is the second post in my series of reading summaries. See the first one for more information on the series. Mark van Atten, Göran Sundholm. “L.E.J. Brouwer&rsquo;s &lsquo;Unreliability of the logical principles&rsquo;. A new translation, with an introduction". November, 2015. arXiv:1511.01113v1 [math.HO]. The intro provides historical context for the paper, both in terms of Brouwer&rsquo;s…

Kushner: Markov&#39;s Constructive Mathematical Analysis

I’ve recently gotten into the habit of condensings readings I do in the course of research down to a single page in a 9cm x 14cm notebook. I’ve decided to share these summaries and notes here, as a backup in case I loose my notebook. I’m transcribing them here exactly as in my notebook, abbreviations and all. I would be interested in hearing from you if ever you think I’ve completely missed the…

Blog Cleanup and Kubuntu Gutsy Gibbon Markups

I&rsquo;ve been cleaning up my website and blog after having neglected it for several years. I briefly considered switching from Jekyll to Hakyll (you may recall that I switched from Wordpress to Jekyll in 2010) due to the annoying Ruby dependency. But I discovered that installing Hakyll would result in an even more annoyingly large dependency: $ sudo apt-get install --no-install-recommends…

(untitled)

Setting up full-disk encryption in OpenBSD 5.3

I recently decided to try out a snapshot of OpenBSD 5.3, intrigued by the notice that softraid(4) RAID1 and crypto volumes are now bootable on i386 and amd64 (full disk encryption). I&rsquo;ve always used an encrypted LVM (as setup by the alternate CD) with a fully encrypted root on my netbook and laptop when running Debian/Kubuntu and never noticed much a performance hit. Unfortunately, I&rsquo;m…

Search RCS and CVS &#34;,v&#34; files with rcsgrep

A few years ago I was doing research comparing how large software distributions handled shared object libraries, and studied Debian, FreeBSD, and Ubuntu. Extracting data about Debian packages was easy thanks to Peter Palfrader&rsquo;s snapshot.debian.org service, which provides a machine-usable interface to Debian&rsquo;s package history. FreeBSD&rsquo;s data is equally accessible, albeit in a…

Viewing man pages by path on OpenBSD

When writing man pages, I often find myself wanting to preview my man page as I write it. On systems with man-db, which means most Debian-derived distributions, Fedora, Arch, SuSE, etc., I usually do this by suspending my editor and running man /path/to/foo.1 However, OpenBSD doesn&rsquo;t use man-db and the above will abort with man: no entry for /path/to/foo.1 in the manual. Hence the following…

Fixing mutt header cache

Every now and then I have to kill mutt, which if done at the wrong time, can leave the header cache in an open state. Then attempting to restart mutt will cause it to hang at the "Selecting INBOX" stage. If mutt is compiled with support for the Tokyo Cabinet header cache backend (as it appears to be in Debian), a quick fix for this issue is to repair the header cache database using the Tokyo…

mutt-fetchbug&#58; fetch BTS bug reports from mutt

I&rsquo;ve been a longtime mutt user, but have gotten somewhat annoyed of having to open a new terminal when I want to read or reply to a Debian bug with mutt (using &lsquo;bts show 123456&rsquo;). How nice it would be to be able to fetch a bug report from within mutt! And so, ladies and gentlemen, I present to you mutt-fetchbug. It&rsquo;s extensively based on Zack&rsquo;s mutt-notmuch script (a…

New Kubuntu Wiki Theme

The Kubuntu Wiki has a new wiki theme based off of the Ubuntu Light wiki theme found on the Ubuntu Wiki. If you want to make this theme your default theme, head to your preferences page and set your preferred theme to kubuntu-light. Thanks to all involved in making this theme a reality!

Holiday MOTD

Since it's the holiday season, I thought I'd greet my server's users with a colourful MOTD. Feel free to use it by appending it to your current MOTD. You can do so with the command sudo sh -c "curl /blog/2010-12-06-holiday-motd/holiday-motd >> /etc/motd" on normal UNIX stations, sudo sh -c "curl /blog/2010-12-06-holiday-motd/holiday-motd >> /etc/motd.tail" on Debian/Ubuntu systems. It'll end up…

Numbering paragraphs in LaTeX

Recently, I was asked to write an essay and to number its paragraphs. I couldn&rsquo;t find anything premade, so I worked something up using the ledmac package. It isn&rsquo;t perfect (you need to restart it after using the quote environment, etc.) but it did the trick for a simple essay. In case anybody else is looking to do something similar, here&rsquo;s how I did it: \documentclass{article}…