Technical Articles
I Built the World's Largest Translated Cuneiform Corpus using AI Jun 9, 2023
TL;DR I used a custom-trained Large Language Model (T5) to create the world’s largest online corpus of translated cuneiform texts. It’s called the AICC (AI Cuneiform Corpus) and contains 130,000 AI translated texts from the CDLI and ORACC projects.
How I Re-implemented PyTorch for WebGPU May 19, 2023
TL;DR I’ve been working on a WebGPU optimized inference and autograd library called webgpu-torch with an API that matches PyTorch. The goal is to run neural networks in the browser at speeds comparable to a Linux workstation. Many kernels have been implemented and its design is easily extensible. It’s available on NPM now and works in both the browser and Node.js!
Generating SVG Images with ChatGPT Apr 3, 2023
TL;DR I used ChatGPT, with varying levels of success, to generate SVG images. With enough patience and prompting, you can get it to draw basic shapes and simple scenes about as well as a five year old can. (Which, hey, let’s face is, is good enough a lot of the time.)
F# Advent - Functional Motor Control Dec 8, 2020
TL;DR I implemented a proportional-integral feedback controller to control the speed of a DC motor using a gyroscope. I wrote it in F# using a functional programming style. The work was easily ported to run on Wilderness Labs’ Meadow IoT hardware.
.NET Vector Performance Oct 15, 2019
TL;DR I wanted to know what the fastest vector types were on .NET. Turns out, performance varies wildly across platforms.
System.Numerics.Vector4
and friends give good performance overall, especially for .NET Core apps, while homemade vector types do not get auto-vectorized. AvoidVector<T>
like the plague. Oh, and iPhone 11s are stupid fast.Containing Null with C# 8 Nullable References Dec 17, 2018
C# 8’s nullable reference types are designed to help rid your apps of the dreaded
NullReferenceException
. This article walks you through the common errors that you will encounter while updating your app and offers a few of my opinions on how to fix them. It’s a long and windy road to update to nullable references, but you will come out at the end more confident in your code and with fewer bugs.C# Code Prediction with a Neural Network Jul 20, 2018
TL;DR I used Python to create a neural network that implements an F# function to predict C# code. The network was compiled to a CoreML model and runs on iOS to be used in my app Continuous to provide keyboard suggestions.
"Hotdog or Not" Using Azure Custom Vision, CoreML, and Xamarin Sep 27, 2017
TL;DR I used Microsoft’s Custom Vision service to train a CoreML model and wrote an iOS app in Xamarin to execute it in less than two hours. It has a loose tie-in with a popular television show. Code on GitHub. You can hear James and I discuss this on Merge Conflict.
Fashionable REPL Prompts Feb 27, 2017
I was writing a new language the other day and I thought, “this puppy needs a REPL”!
Drone Builder - A Story of Drones, React, and F# Sep 14, 2015
Drone Builder is a site I created to play with different DIY drone (multicopter) designs. I wrote it using F# and React.
Coding in Your Head May 28, 2015
I’m terrible at coding interviews - some busy bee dusts off a tricky algorithm that they studied in college and asks you to (1) originate it from a poorly stated problem and (2) live code it in front of them.
Many Levels of App Store Rejection May 25, 2015
Submitting apps to the App Store is filled with many wonderful opportunities to be rejected. Let’s count them!
Building and Running .NET's CoreCLR on OS X Feb 9, 2015
What you heard is true, Microsoft has open sourced the CLR and it runs on more than just Windows. They didn’t just dump some ZIP file on an FTP; no, we have another fully functioning, easy to compile, and easy to contribute to CLR hosted on everyone’s favorite file share. Microsoft has even gone so far as to setup a two way mirror with GitHub so that their internal systems stay in sync with what we see. Color me impressed.
My Xamarin Studio F# Wishlist Jul 11, 2014
I am writing a large iOS and OS X app in F# and am totally digging the honeymoon phase. Not only is F# a crazy powerful language, but it has a great interactive code executer built right into the IDE. In all, it’s a wonderful development experience.
Automated UI Testing with Cucumber and Calabash Jan 17, 2014
There comes a day in every developer’s life when they have to admit that they just aren’t good testers. We don’t think to hit buttons in strange combinations, we test features in isolation, we don’t re-test for regressions, and we simply don’t do it often enough.
Buttons Considered Harmful Oct 30, 2013
I realized that my favorite apps on the iPhone are the ones that minimize the number of buttons in their UI.
Easy Layout - a DSL for NSLayoutConstraint Mar 18, 2013
Layout has changed in iOS 6. We no longer are supposed to calculate
RectangleF
s and set springs and struts (AutoresizingMask
), we are to use this very advanced constraint solving system. I wrote a library to make writing constraint-based UIs easier.Await in the Land of iOS - Scripting Users Mar 13, 2013
TL;DR I show how to use the
await
keyword in C# to build an interactive help system.Await in the Land of iOS - Drag-n-drop Mar 13, 2013
Today is a big day, Xamarin has released (in alpha) support for the await keyword in C#.
iCircuit Code Reuse, Part Cinq Feb 5, 2013
I have toiled away with the new Windows 8 OS, the new Visual Studio 2012, and the new Office 13/365 to present you, dear reader, with this fine set of charts:
Mobile Network Performance while Touring Seattle Dec 5, 2012
I recently journeyed around Seattle to get a sense of the impact motion has on the network performance of mobile applications.
Programmatic Panning and Zooming with a UIScrollView Nov 27, 2012
Let’s say you have a zoomable and scrollable UIScrollView all setup in your app. Great! Good job. But how do you programmatically zoom in on something particular? (For example, you may want to pan and zoom into an object that was double tapped.)
iCircuit Code Reuse, the Fourth Edition Sep 18, 2012
Hell has indeed frozen over and I have released the Android version of iCircuit! iCircuit is now on 4 platforms!
Speakers I can't wait to see at Lang.NEXT 2012 Mar 16, 2012
The speaker list for Lang.NEXT 2012 has been released, and I found myself trying to decide which speakers to go see. There are a lot of fine choices so I thought I had better get organized!
A Two-year-old Bug Found by Microsoft Jan 20, 2012
I submitted the Windows Phone 7 version of iCircuit to Microsoft a few days ago and was shocked (shocked!) that it failed certification by their testers.
iCircuit Code Reuse Part Trois Jan 13, 2012
I have recently finished porting iCircuit to Microsoft Windows Phone 7 (WP7) and wanted to see how I performed on the code reuse front.
My Great Wumpus Hunt Jun 18, 2011
There is a bug in iCircuit that is tarting to feel like my white whale, my wumpus. I know all about the bug: I know why it’s happening, I know all its symptoms, and I know at least one way to squish it.
Quantifying reflection's slowdown in sqlite-net Nov 14, 2010
Yesterday I posted R64 of sqlite-net which included some performance upgrades thanks to Joe Feser.
INotifyCollectionChanged for cleaner more reusable code Nov 13, 2010
My last post briefly described the work I did to port iCircuit to Windows Phone 7. In it, I described how the UI was broken into two large chunks: the graphical circuit editor and the “chrome”.
Interfaces + caches = Cross Platform Nov 9, 2010
iCircuit is a mobile app that lets you experiment with circuits on your iOS devices. Well, soon, it will also let you do it on your WinPhone7.
Knuth’s Solution to the Permutation Problem Apr 14, 2006
Dr. Donald Knuth considered the problem of generating all permutations of an n-tuple whose integral elements were less than some number m in Section 7.2.1.1 of The Art of Computer Programming. Let’s look at his Algorithm M and consider how it can be used to solve permutation problems. To demonstrate the power of the solution, we’ll use C# and investigate the most idiomatic solution in that language.