Scala Maybe

I wrote a Maybe (a lazy Option[T]) that I can use in Scala. Scala Maybe … because I wanted a lazy variant of Option[+T]. I had a use case in mind at the time, but, since then; I’ve taken another approach. Since writing this, I’ve found an explanation of Monads that “groks” with me and multiple other places where “lazy is better” and I preffer (my) Maybe[T] over Option[T].

Pushing (from GoGS) with `post-receive` (to a mirror)

I have a GoGS server for my work. I want to back it up off-site to our GitLab instance. According to a document I read this should be possible using post-receive hooks. Follow me on this magical adventure to git-enlightenment. I’m doing all of this by editing my post-receive hook and then force-pushing a nonsense commit to kick git. Pre-Work Digging around in the GoGS repository settings turned up a panel to edit the hooks.

MultiBranch Mercurial JenkinsFile

WARNING; this configuration doesn’t seem to delete old builds. Ever, see; I’ve worked around it by putting the following blurb near the top of my JenkinsFile // // properties ( [ [ $class: 'BuildDiscarderProperty', strategy: [ $class: 'LogRotator', artifactDaysToKeepStr: '14', artifactNumToKeepStr: '3', daysToKeepStr: '14', numToKeepStr: '3' ] ] ] ) This is just a “victory dance” sort of post about setting up a multi-branch build, for a Mercurial project, from a JenkinsFile.

AIY and Pi4j (Voice V1) GPIO Reference

I’m trying to use a Google AIY Voice V1 with Pi4J. I had a bit of trouble finding the pins, so I’m posting this here in case anyone else is looking. Basically; there are three numbers for the pins. The AIY SDK uses one number, the header has a different number, and (after experimentation I’ve determined that) the Pi4J API uses a different layout. Anyway, this table shows the RaspiPin for the Button and LED interfaces.

(GZ3)Doom (1993) VR is totally worth it

Someone has ported Doom (1993) to VR and it is as vomit-inducing-awesome in VR as you would expect. WARNING; The nausea won’t stop when you pull the headset off. Your body will need a bit longer to get used to non-VR. During this “cool off” I kept experiencing VR-sickness building. Anyway; downloading it from the releases page unzip it and copy in a DOOM.WAD (Doom95 in my case) start SteamVR (and turn on your Vive and controllers) launch it with the .
WiFi on a headless Raspberry Pi

WiFi on a headless Raspberry Pi

Login to your pi’s terminal, and run the following two commands. sudo su wpa_passphrase YOUR_SSID You’ll then be asked to enter the passphrase and confirm the passphrase. If they match; you’ll see a blurb that’s a config file fragment. Good. Now (still as su) repeat the last step, but pipe-append the output to the supplicant file. wpa_passphrase YOUR_SSID >> /etc/wpa_supplicant/wpa_supplicant.conf You won’t see the instructions this time - but that’s okay.

Marshalling Gits

This is a quick post-mortem on the three methods I examined for nesting some of our Git repos. In the end, I ran out of time and felt that the diversity of a CS team means that special handling would not produce a time saving benefit for me. submodule Git’s (somewhat) anointed solution is “submodules” and comes built in. Google’s CORGI project (et al) use it. trial I created two shared repositories and a third master repository.

Git Copy PY Script

I found a set of git tasks was taking non-trivial time to checkout and push between repositories. I couldn’t find docs for a (working) git command sequence1 that pushed branches from one remote to another; so I wrote a python script to checkout a branch to local then push it. Once I was sure that it was running; I could reallocate my attention to something more deserving of my talents.

Scala Extractors

Scala’s extractors and unapply() represent a concept that I haven’t grok’ed until now. Most demonstrations seem to be too long or use the same types everywhere. Here are my thoughts on the concept; val a: C = ??? val i: I = ??? i match { case a(f: O) => ??? } This will try to call the below method class C { def unapply(i: I): Option[O] = ??? } There’s some more flexibility;


I made a semi-cache coherent container which provides an Entity-Component-System. These are the bones of contemporary game-engines. This post is a bit crude; I keep thinking about it then adding features to Whippet instead of writing this up. Whippet on GitHub Google built CORGI which isn’t (yet?) trying to act cache coherent. It also is more than trivial to build, and suffers from NIH for me. Actually; that last bit isn’t likely to be a problem for most, but I didn’t like their license.