Software! Math! Data! The blog of R. Sean Bowman
The blog of R. Sean Bowman

## Gulp, a plugin, and opinions

April 18 2016

I wanted a link checker for my site my new static site, and I couldn’t find one that used metalsmith or gulp. The closest thing I found was some code on stackoverflow, but even it had some problems. So, using that answer as a template, I wrote my own very simple but functional link checker. But is it even worth adding Gulp to the toolbelt? Spoiler: no. Gulp is crap, `make` does everything I need and more, and is easier and better. I stopped using Gulp.

## Closures, Environments, and Errors

April 02 2016

This post my self-flagellation for spending quite a bit of time tracking down a problem with some code I was writing. The error was tricky, but I should have known better, and afterward I made the connection with some other tricky bits I knew about in different languages. Let’s look at the problem, which involves environments and closures (and probably other stuff, too!)

March 27 2016

A few days ago I was motivated to write a program in Haskell to test whether three numbers form a Pythagorean triple. There is an obvious solution, of course, but it’s always nice to shove monads in to problems that don’t need them. In this case, though, I found that the resulting solution did more than I had originally planned: if you pass the `pTriples` function a list of numbers, it will return a list of each Pythagorean triple that can be made from numbers in the list (without replacement). Cool!

## Metalsmith, the static site engine

March 18 2016

I switched my site to use metalsmith, a node based static site generator. This is the obligatory post about how, why, tips and tricks, and so on.

## Amortized Vector Append

March 04 2016

The C++ standard says that `vector::push_back` should run in amortized constant time. With a simple implementation where the vector is stored as an array which doubles in size when needed and each element is copied on every doubling, does this satisfy the time complexity requirement?