Jeff Epler's blog

10 September 2015, 13:02 UTC

Super Formula Guilloché Patterns in javascript/svg

I made this little graphical toy last month. I had intended to put a few finishing touches on it before blogging about it, but instead it has languished.

Enter a few numbers, press "update" and get a geometric pattern.

Requires a browser that supports svg, which must be most of them by now. I tested on Firefox and Chrome.

(Updated to actually link to the toy)


1 September 2015, 14:39 UTC

DragonBoard™ 410c with rt-preempt failure

I was excited to obtain a DragonBoard, an affordable 64-bit ARM single-board computer, but unfortunately it hasn't lived up to my hopes.

First of all, it shipped with one terrible problem, making it useless for headless development: The onboard wireless doesn't receive multicast traffic, including ARP requests! And their kernel doesn't provide many modular drivers, so adding any old USB wireless dongle doesn't work until you rebuild the kernel. As of this writing, there is no useful workaround.

And that's when I hit the second show-stopper problem. I planned to build kernels for this thing anyway, because the goal is to run LinuxCNC on it with rt-preempt realtime. So I stuck in a large capacity micro-sd card, obtained the kernel source, built it, and rebooted with my new kernel.

(incidentally, testing kernels is a PITA. You have two choices: one, flash the one and only boot area with your new and untested kernel and hope for the best; two, tether to a PC (losing USB keyboard and mouse on the dragonboard!) and use fastboot every time you boot. ugh)

.. but the new kernel just didn't work. It scrolled kernel messages, but got stuck partway through booting. dmesg implicated the wireless card. This one at least has a workaround: cherry-pick a certain commit from their kernel git. As I understand it, this bug is triggered by using the compiler on the dragonboard, and not encountered with the linaro cross-compiler running on a traditional x86 desktop.

Anyway, having found out about this I was briefly celebratory. I booted with my own kernel and had a working USB dongle. Unfortunately, that celebration was short-lived. The USB dongle hasn't been terribly reliable either, particularly under high CPU load.

I soldiered on and patched the linaro 4.0 kernel with the 4.0-rt5 patchset. There were a few minor conflicts which I believe I resolved correctly. Unfortunately, the LinuxCNC latency-test readily encounters latencies above 15ms (15000us). LinuxCNC really would like sub-100us max latencies.

I briefly enabled tracers, and have traces that seem to implicate a variety of subsystems: networking, usb, and video *all* figure. More experienced developers than I will have to be the ones to sort out RT on 64-bit ARM.


5 August 2015, 13:13 UTC

Proven Delights (and what are proofs anyway)

I won a copy of the book Hacker's Delight from John Regehr for my entry in his nibble sort contest earlier this year.

In that thread I had heard about the CBMC Bounded Model Checking software, and it gave me the idea to combine the two: a project to take implementations of the algorithms from Hacker's Delight and prove the algorithms' properties with CBMC.

I have a modest start on github, which I am calling "Proven Delights":

read more…

4 March 2015, 19:45 UTC

Hide non-linux titles in humble bundle sales

Like many people over the age of 30, I remember when the Humble Bundle consistently offered Linux versions of almost everything in their bundles.

Those days are long gone, and now it's necessary to scrub over the "DRM FREE!" button of every title to find out whether it's on Linux.

But with this userscript (tested only on firefox with greasemonkey), titles that are not available on Linux are automatically greyed out and need trouble you no more.

If you're like me, and the number of times you boot a Windows machine to play video games is way under twice a year, remember to vote with your wallet: before checking out, open "choose where your money goes" and "developers", then slide the slider for all non-linux titles right down to zero.


28 February 2015, 21:32 UTC

Hazelnut Coffee and Hazelnut-Sunflower-Chocolate Butter

This weekend I made good on my threats to try my hand at a homemade hazelnut butter and hazelnut coffee. I've only had one cup of coffee and a few spoonfuls of the butter, but I like how both turned out.

Toast 1½ cups hazelnuts in a cast iron skillet. Roll in a pillowcase or dishtowel to remove most of the dark skin (if the skin is stubborn, you didn't roast enough—return to the skillet). Place in food processor.

Process until hazelnut pieces are coffee-ground sized but still powdery. Remove ½ cup or so for hazelnut coffee; store in airtight container in refrigerator.

Add 1½ cups toasted sunflower seeds, 1 cup dark chocolate chips and ½ tsp salt to food processor. Process until it forms into a ball. Store in airtight container. I expect this to keep as long as any other preservative-free nut butter. Originally I stored my nut butter in the fridge, but the next morning it was too stiff to spread well. It's clearly much better to store it at room temperature, as long as it's used up quickly.

This butter is not as smooth, oily, or sweet as the commercial product you may be thinking of; it's more like Justin's Chocolate Hazelnut Butter.

Hazelnut coffee

Combine 1 part hazelnut powder with 5 parts coffee grounds and then follow normal coffee-making process (I use an aeropress and then add a liberal splash of heavy cream). I assume that it will work to store this combined with ground coffee for at least a few days depending how picky you are about the freshness of your coffee beans.

Both recipes will benefit from some tweaking to your own personal preference, but as a proof of concept both of these ideas are obvious winners.


19 February 2015, 19:31 UTC

Cheating at incremental games using angularjs

I don't know a thing about javascript frameworks, but I like to cheat at incremental games. So it's frustrating when a game is made with some framework that seems to leave everything inaccessible. (I think this is more about the framework trying to be hygenic than anti-cheating)

So I was happy to learn enough about angularjs to cheat at my favorite incremental game of the moment, Swarm Simulator.

var sc = angular.element(document.querySelector('.ng-scope')).scope()
sc.env.isDebugEnabled = 1 = new Decimal(1000)'mutagen')._addCount(new Decimal(1e100))


13 January 2015, 15:43 UTC

Maria Island

We spent one of our last days at Maria Island, just off the east coast of Tasmania. It was a beautiful, uninhabited island, with tons of amazing scenery. I've narrowed down our pictures to a few of the best.

read more…

2 January 2015, 13:55 UTC

One year in a Prius

We got our 2013 Prius just about a year ago, and I ran TRIP A without resetting it for that whole first year. Here are the final numbers:

For everyone not still suffering under the tyrrany of imperial measures, 44.4mpg is around 5.3l/100km and the distance driven is about 12000km.

That means ...

  • 260 hours total driving time
  • 43 minutes driving time per day
  • 21 average miles a day (33km)
  • 170 gallons of fuel (640l)
  • 2/3 gallon per hour of driving (2.4l/hour)

Getting at 44.4mpg instead of the EPA combined fuel economy of 50mpg means using 20 extra gallons of fuel over the course of the year, 13% more than predicted.

Overall we're happy with the Prius. It's much roomier than the car it replaced and it has better fuel economy. However, I'm a bit sad we didn't get closer to the EPA fuel economy.

The main thing lowering the fuel economy is short winter drives. My drive to and from work is just 2.5 miles per direction, and I often drive a similar distance to and from lunch. In winter, that's too little distance for the car to warm up to the point that it enters the fuel-saving EV mode while stopped at lights. (this kind of driving is even classified as "severe operating conditions" by Toyota: "Repeated trips of less than 5 miles in temperatures below 32 degrees Fahrenheit")

Our summertime fuel economy (also the time of year when we make long driving trips on the highway) is closer to 48mpg.


17 December 2014, 17:37 UTC

First Half of Tasmania

9 December 2014, 23:14 UTC

Uptime on digitalocean

12 November 2014, 0:42 UTC

Great Ocean Road

24 October 2014, 15:40 UTC

LinuxCNC at TXRX Labs

14 October 2014, 13:47 UTC

Sprint recompression of JPEG files

10 October 2014, 1:30 UTC

Halls Gap Zoo

20 August 2014, 14:04 UTC

Kingfisher Cruise

All older entries
Website Copyright © 2004-2014 Jeff Epler