The personal website of Daniel Brice.

Made with Jekyll and hosted on GitHub Pages.

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

• ## Scala Try is Broken

Scala’s Try class is broken. Not “broken” in the sense that it doesn’t fulfill its purpose: its purpose is to sandbox Throwables in an algebraic sum construct and provide a monadic interface over the sandbox. It does that just fine. Try is broken in the sense that one of its methods, _.toOption can return malformed Option values, violating our trust in the semantics of the Option class and leading to potential instability down the call stack.

more...
• ## Automatic Differentiation Revisited

Branium and the Santa Monica Haskell Users Group were kind enough to give me a chance to present about automatic differentiation for an evening, a topic we’ve visited before. This gave me a chance to improve my existing implementation and even add symbolic differentiation capabilities.

more...
• ## Why does trig-sub even exist?

I was writing an exam for my students, and I wanted to give them a trig sub integral that wasn’t too difficult (there’s this infinitesimal sweet spot between ridiculously too difficult and utterly trivial). I noticed something about virtually every single trig sub integral that I imagined or ran into – almost all of them could be solved without any trig.

Case in point: consider $$\int \frac{x^3}{\sqrt{x^2 + 1}} \, dx$$

more...
• ## Local Hoogle Daemon

Has it really been two months?! It’s like the quarter starts and I get sucked into a black hole, never to be heard from again. I’m starting to pick up Real World Haskell again, and I needed reliable documentation without relying on an internet connection, so I spun up a local Hoogle server as a systemd service.

more...
• ## Opening .url Files Like a Pro

I go back and forth between Linux, Windows, and OS X, and I end up getting a lot of proprietary files in my Dropbox. It’s been bugging me for a long time that there’s no xdg handler for Windows .url files in Linux, so I finally strung one together.

more...