Software! Math! Data! The blog of R. Sean Bowman
The blog of R. Sean Bowman
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.

Read more...


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!)

Read more...


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!

Read more...



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?

Read more...


February 11 2016

In a previous article, we saw how to compute the (zeroth) persistent homology of a filtered simplicial complex. But how do we obtain such a complex, anyway? Scientists and others who work with data often start with a bunch of points in a high dimensional space. What are some good ways to turn that information into a filtered simplicial complex we can compute the persistent homology from?

Read more...