Recent Blog Posts

Ruby on Guix

August 30, 2015

I’ve been working with Ruby professionally for over 3 years now and I’ve grown frustrated with two of its most popular development tools: RVM and Bundler. For those that may not know, RVM is the Ruby version manager and it allows unprivileged users to download, compile, install, and manage many versions of Ruby instead of being stuck with the one that is installed globally by your distro’s package manager. Bundler is the tool that allows developers to keep a version controlled “Gemfile” that specifies all of the project’s dependencies and provides utilities to install and update those gems. These tools are crucial because Ruby developers often work with many applications that use different versions of Ruby and/or different versions of gems such as Rails. Traditional GNU/Linux distributions install packages to the global /usr directory, limiting users to a single version of Ruby and associated gems, if they are packaged at all. Traditional package management fails to meet the needs of a lot of users, so many niche package managers have been developed to supplement them.

read more ➔

Rendering HTML with SXML and GNU Guile

April 10, 2015

GNU Guile provides modules for working with XML documents called SXML. SXML provides an elegant way of writing XML documents as s-expressions that can be easily manipulated in Scheme. Here’s an example:

read more ➔

Reproducible Development Environments with GNU Guix

November 08, 2014

If you’re a software developer, then you probably know very well that setting up a project’s development environment for the first time can be a real pain. Installing all of the necessary dependencies using your system’s package manager can be very tedious. To "solve" this problem, we have resorted to inventing new package managers and dependency bundlers for pretty much every programming language. Ruby has rubygems and bundler, Python has pip and virtualenv, PHP has composer, node.js has npm, and so on. Wouldn’t it be nice to instead have a single package manager that can handle it all? Enter GNU Guix, a purely functional package manager and GNU/Linux distribution. Using Guix, you can easily create a development environment for any software project using the guix environment tool.

read more ➔

Guile-2D is now named “Sly”

August 11, 2014

Guile-2D has been the working title for my game engine written in Guile Scheme for over a year now. The name has become limiting since I realized that it wouldn’t be much extra work to support 3D graphics. After much indecision, I’ve finally decided on an official name: Sly. I think it’s a great name. It’s short, easy to type, and slyness is one of the definitions of “guile”.

read more ➔

Live Asset Reloading with guile-2d

May 04, 2014

Guile-2d provides a dynamic environment in which a developer can build a game incrementally as it runs via the Guile REPL. It’s nice to be able to hot-swap code and have the running game reflect the changes made, but what about the game data files? If an image file or other game asset is modified, it would be nice if the game engine took notice and reloaded it automatically. This is what guile-2d’s live asset reloading feature does.

read more ➔

Functional Reactive Programming in Scheme with guile-2d

March 09, 2014

Last month, the GNU Guile project celebrated the 3rd anniversary of its 2.0 release with a hacker potluck. Guilers were encouraged to bring a tasty hack to the mailing list to share with everyone. My dish was a simple functional reactive programming library.

read more ➔

A Cooperative REPL Server for Guile 2.0.10

January 24, 2014

The next release of GNU Guile, 2.0.10, is to be released “real soon now”. My contribution to this release is the new (system repl coop-server) module. This module introduces a useful variant of the REPL server that I’ve named the “cooperative” REPL server. It is cooperative because it can be integrated with single-threaded programs without the thread synchronization issues present in the ordinary REPL server.

read more ➔

Syncing Required Packages in Emacs

December 30, 2013

I use Emacs on several different computers. To keep my configuration consistent across all of them, I do what many people do and made the ~/.emacs.d directory a git repository. I don’t like to keep copies of all of the Elisp extensions that I use, such as paredit and geiser, in this repository. Instead, I prefer to use package.el (introduced in Emacs 24) with the MELPA repository. This saves me from having to manually keep all of the extensions I use up-to-date, but requires another method to keep useful packages in sync between computers.

read more ➔

Jump to Jasmine Specs with Rinari

December 17, 2013

I use the rinari Emacs mode to assist me when working on rails projects. One of rinari’s most useful features is the ability to quickly jump from one file to another related file. I use this feature almost exclusively for jumping between a ruby class file and its associated rspec file, but lately I’ve been spending most of my time writing javascript. At VHL, we use jasmine for our unit testing framework and the jasmine ruby gem to integrate it with our rails projects. Rinari doesn’t have any built-in jump settings for jasmine test files, so I wrote this quick hack to make it work:

read more ➔

First GNU Guile Patch and More Guix Packages

November 22, 2013

I have spent some of the last month working on contributing to GNU Guile and now I can finally say that I have contributed code to the project. Guile has several hash table implementations: a Guile native one, SRFI-69, and R6RS. SRFI-69 contains a handy procedure, alist->hash-table, which allows for a sort of hash literal-like syntax:

read more ➔

My First GNU Guix Patch

October 16, 2013

Over the weekend, I decided to try out GNU Guix: A fully functional package manager based on Nix and a distribution of the GNU system. I’m a big proponent of GNU Guile, thus I was excited to see a DSL for package management written with Guile.

read more ➔

GNU 30th Anniversary Hackathon

September 30, 2013

I spent my weekend at MIT at the GNU 30th anniversary hackathon. I had never participated in a hackathon before and was excited to see what it was like. Developers from many GNU and non-GNU projects were there to hack and help others get involved, and RMS was there to give the keynote speech.

read more ➔

Guile-2D 0.1 Release

September 27, 2013

To celebrate the GNU Project’s 30th anniversary, I have decided to make the very first release of my 2D game development framework for GNU Guile. GNU Guile is a Scheme implementation, and has the honor of being the official extension language of the GNU project. Guile-2D is a layer above SDL, OpenGL, FreeImage, and FTGL that provides abstractions for common 2D game programming requirements such as sprites, tilesets, animations, scripting, and collision detection.

read more ➔

Liberating a Thinkpad X220

September 22, 2013

I had been looking for a suitable replacement to my old, slow Compaq laptop that I purchased during my freshman year of college when I had very little money. What I liked about my old laptop was that it played well with free software. I had no trouble getting all of my hardware to work out-of-the-box with fully free GNU/Linux distributions such as Trisquel, and I wanted any future laptops of mine to play nicely, too.

read more ➔

Font Rendering in OpenGL with Pango and Cairo

August 17, 2013

I am working towards a 0.1 release of my game development framework for GNU Guile, guile-2d. One of the few remaining blockers on my to-do list is font rendering. A reddit user, Madsy9, pointed me in the right direction with this comment. There are two libraries needed to perform nice font rendering with proper internationalization support: Pango, “a library for laying out and rendering of text, with an emphasis on internationalization,” and Cairo, “a 2D graphics library with support for multiple output devices.”

read more ➔

The Little Schemer

August 11, 2013

Yesterday, I took a trip to the MIT Press Bookstore and picked up a copy of The Little Schemer. I’ve only spent a few hours reading and coding along with it, but I’ve had a lot of fun. The following is a mini-review based on my experience thus far.

read more ➔

AngularJS Post-mortem

August 08, 2013

AngularJS is the new popular client-side Javascript application framework developed by Google. We have recently adopted it at Vista Higher Learning for building our latest features that require a lot client-side logic. Now that I have a few applications under my belt, it’s time to talk about my experience.

read more ➔

guile-2d - A 2D Game Development Framework for GNU Guile

August 07, 2013

This is the very first devlog entry for my pet project, guile-2d. As the title suggests, guile-2d is a 2D game development framework for GNU Guile, a Scheme implementation that has the honor of being the official extension language of the GNU project. Guile is a language with a growing number of features, but it still lacks a large assortment of libraries. I like to do 2D game programming, and I saw a niche that needed to be filled. Python has Pygame, Lua has Love, but there’s no fun and accessible game programming library for Guile. Guile-2d is working to correct that.

read more ➔

StumpWM on Debian Wheezy

July 20, 2013

Everyone that’s ever talked to me about software development knows that I am in love with Emacs. Emacs has a wonderful keyboard driven interface and is almost infinitely customizable via Emacs Lisp. I’ve done a lot of programming in Emacs from my not-so-great laptop lately. My laptop has a rather poor 1280x800 resolution and low performing integrated graphics chip. Until today, I was running the GNOME 3 desktop environment on it. Unlike most people (or perhaps just a loud minority), I like GNOME 3. However, I wanted something that was both less graphics intensive and more keyboard driven than GNOME Shell and Mutter.

read more ➔

Maine!

July 15, 2013

Every summer, my friends and I go to Maine for a week. We stay in the Rockland area in an old house on a blueberry field. This year we hiked a mountain in Camden, hiked Mt. Katahdin, and went to the Rockland Blues Festival.

read more ➔

Find Me on Diaspora

June 30, 2013

With all of the recent news about the NSA’s widespread spying, I have decided to ween myself off of proprietary, centralized web services. Facebook, Google, and other such corporations hold onto massive amounts of our data that we’ve willingly given to them via status messages, “like” buttons, searches, and emails. Using and contributing to free (as in freedom), decentralized (like email) web services is a really great way to re-establish control of our data. These services rely on many small, interconnected nodes to operate, rather than a monolithic website that is under the control of one entity. If the distinction between centralized and decentralized isn’t clear, consider how email functions. There are many email providers to choose from. Users can communicate with others that choose to use a different email provider. This is how web services should work, but unfortunately very few work this way now.

read more ➔

My First Real FOSS Contribution

June 15, 2013

I spend a lot of my free time writing code. I usually work on my own personal projects that never really go anywhere. So, I decided to take a detour from my normal hacking routine and contribute to an existing free software project. My contribution was accepted awhile ago now, but I wasn’t blogging then so I’m rambling about it now.

read more ➔

Hello, world!

June 08, 2013

Hey! I have a shiny new website. I just purchased a cheap VPS from Digital Ocean and registered the dthompson.us domain for this site. Instead of the going the Wordpress route (or using similar blogging software), I’ve decided to use a static site generator called Pelican after seeing that the Linux kernel website was using it. I’m going to use this site to host this blog, my resume, and information about my software projects.

read more ➔