The personal website of Daniel Brice, PhD.

Made with Jekyll and hosted on GitHub Pages.

I’ll be using this space to muse about Math and coding and games, mostly.

• ## Sets, Classes, and Wabbits

Set theory is a bit of a trickster. Some of its ideas go back to Plato (forms) and Aristotle (categorical syllogisms), but sets don’t quite capture the objects of these disciplines. Rather, the objects of those disciplines are captured more closely by the concept of classes (as in classifications). Sets vs. classes? What’s the difference? Why split hares? This blog post will go into how Set Theory fails to capture our intuitive notions around classification.

more...
• ## Haskell GoF - Abstract Factory

The beginning of a series wherein we show how to implement selected design patterns from Design Patterns: Elements of Reusable Object-Oriented Software. This week, we take a look at the venerable Abstract Factory pattern.

more...
• ## Of function instances and abstract syntax

Some Haskell classes class Myclass a admit an instance for functions instance Myclass a => Myclass (x -> a) based on the instance for a. All of these instances have a few things in common: (1) they implement the class methods in a straightforward way as mymethod f = \x -> mymethod (f x), and (2) they are polarizing among Haskell practitioners. The sequel is a case study of why I find such instances compelling and useful.

more...
• ## Proving My Point

A coworker of mine has been kind enough to spend his scant spare time guiding a small group of future Haskellers through Hutton’s Programming in Haskell, assigning weekly problems and judging the solutions submitted along the way. What follows here today1 is my smart-ass solution to my colleague’s Problem 1.

more...
• ## Simple Linear Regression in One Pass

I recently had to implement linear regression for a hobby project. As I’d never learned how to calculate it, this was a great opportunity to learn. As I dug in, I saw that I’d need to be making two passes over my data. Let’s see if we can fix that.

more...