Glico (Weighted Rock Paper Scissors)


Tags: , , and

This still isn’t the blog post I said I was going to write about now, but I figured some game theory would make a good post at the moment, especially when a lot of people I know are working at home with kids who need entertaining. Here’s some stuff about a traditional Japanese kids’ game called Glico, a form of weighted Rock Paper Scissors (RPS).

D in the Browser with Emscripten, LDC and bindbc-sdl (translation)


Tags: , and

Here’s a tutorial about using Emscripten to run D code in a normal web browser. It’s uses a different approach from the Dscripten game demo and the dscripten-tools toolchain that’s based on it.

LDC has recently gained support for compiling directly to WebAssembly, but (unlike the Emscripten approach) that doesn’t automatically get you libraries.

You can find the complete working code on Github. ./ starts a shell in a Docker image that contains the development environment. dub build --build=release generates the HTML and JavaScript assets and puts them into the dist/ directory.

This tutorial is translated from a Japanese post by outlandkarasu, who deserves all the credit for figuring this stuff out.

Making a Compile-time Brainfuck Compiler in D (translation)


Tags: , and

NB: This post is just a translation (with some extra comments by me). Credit goes to the original and the C code generator that inspired it.

Omoide Kaeru



Today is the fifth anniversary of the 2011 Japanese Tohoku earthquake disaster. When disasters happen, news sources tend to focus on dramatic statistics like the number of deaths or the number of homes destroyed, and not so much on the very long process of recovery. In the 21st century, though, it’s much easier to find videos on the internet produced by the disaster victims themselves. Unfortunately, as in the Japanese disaster, language barriers can stop the messages reaching far beyond the disaster area.

So I thought I’d translate one of the videos. It’s about Omoide Kaeru, a non-profit organisation that’s been restoring and returning items found washed up after the tsunami hit Sendai. The video mostly talks about photos, but the group has also been handling personal documents like certificates.

By the way, the original video is from 2013, but Omoide Kaeru is still working in 2016.