A brief intro to programming for the C64

Recently we visited some relatives in Denmark, together with my family. By pure coincidence, as we were walking through Elgiganten, I spotted and immediately bought the C64 reborn. You can check out one good review here.

It comes with a few games and a BASIC interpreter, so not much can be done other than playing games and writing some BASIC code. Some software can be downloaded and used from commodore.software. But, in this post, we will take it further by extending it with programs we will write ourselves.

Continue reading “A brief intro to programming for the C64”

Writing your second program with Budge-TP (complexity and abstraction)

In a previous blog post, we showed and implemented a formal system that was able to represent numbers and the addition operator.

In this blog post, we will show an implementation of a subset formal system of Peano’s axioms that will also be able to represent numbers and the addition operator.

Finally, we will compare both systems.

Continue reading “Writing your second program with Budge-TP (complexity and abstraction)”

Teaching my kids programming & math

For these exercises, all you need is some creativity and pen & paper.

The crucial bit is to come up with some exercises in order to get their attention. Find what they enjoy playing with, and gamify it. If they like pets, make commands to e.g. feed a pet. If they want toy soldiers games, make commands for e.g. moving and attacking.

Continue reading “Teaching my kids programming & math”

Recursion from first principles

Recursion is one of the things that makes computation happen – whether you’re doing something on your computer, smart TV, or smartphone.

For example, here’s a definition of the addition function represented in first-order logic:

\forall y, add(0, y, y) \\ \forall x, y, z, add(x, y, z) \to add(S(x), y, S(z))

Or, the more commonly known variant:

\begin{aligned} 0+y &= y \\ S(x)+y &= S(x+y) \end{aligned}

In this blog post, we will generalize recursive functions.

Continue reading “Recursion from first principles”