11. November 2017

Turn Websites into APIs

There are times in a programmer’s life when he needs an API to an intranet service and the only existing interface is a website built in the 90s. It feels wrong and a little dirty. But it may be the only option. It will save the business. Against better judgment, you decide to try web scraping their site.


30. July 2017

Improvised Remote Control

One negative thing about Sweden is that one is not allowed to have a TV receiver (of any kind, and especially not broken one) without paying a special fee of around €245 per year. An alternative that enables playing couch co-op in the living room is to get a projector or large display that lacks a TV tuner/decoder.

We recently got such a display from Philips and found that the speakers are not quite powerful enough for a living room. So we connected it to a (somewhat retro) Philips AS9400/00 midisystem. The only problem was that the remote control has gone missing. So it was time to improvise.


08. April 2017

Linting Scheme with r6lint

I find it useful while working in Python, JavaScript or C to have Emacs show me the location of code errors. For Python there is Pylint and for JavaScript one can use JSHint and a few others. And of course with C there was the original lint, but today the compilers themselves generate quite good warnings. These linters are easily integrated with Emacs via Flycheck, which highlights errors in the code. Finding that they produce too many errors when fed Scheme code, I decided to make my own linter, r6lint.


29. January 2017

Structure of the ARM A64 instruction set

Earlier this year I bought a Raspberry Pi 3 to have as an AArch64 development machine. The fastest way to get familiar with an instruction set is to write a disassembler for it and I’ve made one for 64-bit ARM in R6RS Scheme as part of the machine-code project. The instruction set is called ARM A64, instructions are always 32 bits wide and they have a neat structure which is pretty fast to decode in software.