GordyBlog

Yet another blogging experiment…

Fun With Clojure Macros

It all started innocently enough. I had a deftype that was implementing several protocols. I had written all of the protocol functions inside the body of the deftype. And even though each function, by itself, wasn’t overly large, the entire blob of code was getting out of hand.

Here is a tiny little example with some made-up protocols and a type that embedded the protocol implementation inside the deftype. In the actual code there were many more methods that needed to be implemented.

(defprotocol Proto1
  (p11 [this])
  (p12 [this foo bar]))
(defprotocol Proto2
  (p21 [this])
  (p22 [this baz bin]))
(deftype MyType [item1 item2 item3 item4]
  Proto1
  (p11 [this] ...)
  (p12 [this foo bar] ...)
  Proto2
  (p21 [this] ...)
  (p22 [this baz bin] ...))

Mounting External Drives - Ubuntu 14.04 and Chromebook

OK, this post is part of my continuing experiments with an ASUS C200 Chromebook. I have installed Ubuntu 14.04 using crouton.

I had created two partitions on a Micro SD Card, one as Fat32 (EsFat actually) and the other as ext4.

The FAT32 partition mounts at /media/removeable/share and the ext4 partition mounts at /media/removeable/gordy. I tried storing various projects on the ext4 partition but when I tried to build from that partition I would get a permissions error.

Chromebook Performance Test - C720 vs C200

My buddy at work just got a new Acer C720-3404 Chromebook. I have the ASUS C200MA-EDU-4GB Chromebook. We decided to do a real-world performance comparison with a sample task that we have to perform all of the time.

Running Chrooted Desktop in Background

I made a post yesterday that covered the steps required to install Ubuntu on an ASUS C200 Chromebook. One thing I noticed was that, while you are running Ubuntu, it ties up your terminal window and makes it unavailable for doing other tasks.

Org-Octopress Notes

I’ve been trying to sort-out the details of what is required to be able to maintain a GitHub pages site via Octopress / org-octopress from multiple computers. The slight complicating factor is that the location of the git repository for the site is different on the two computers that I am using.

Fixing Scrolling on ASUS C200MA-EDU-4GB

One thing that really bugged me with my new ASUS C22MA Chromebook was the way that track-pad scrolling worked. By default it is exactly the opposite of my MacBook Pro.

Using a Chromebook as a Development Machine

Introduction

I have been interested in seeing if would be possible to set-up a Chromebook so that some serious development work with it. It’s a given that you won’t be running any virtual machines on a Chromebook. But at this point I think you can do pretty much any thing else you might need to do.

SBCL and Slime on Ubuntu 14.04

This post describes how to install and configure Steel Bank Common Lisp (SBCL) with SLIME (Superior Lisp Interaction Mode) that is installed via Quicklisp on Ubuntu 14.04 LTS (Trusty Tahr).