marc walter

Elm example for rendering a small gantt chart

2020-04-02

I wrote an answer on stackoverflow about rendering a gantt chart in elm, which positions tasks inside a calendar-like grid, so one can easily see if a task can only be started if all tasks that it depends on were done.

I started with this simple data structure:

type alias Task =
    { id : TaskId
    , dependsOn : List TaskId
    , color : Color
    }

In order to render it, it will be transformed into a list of DrawableTask. Each drawable task contains the information, where in the grid it will be rendered.
For simplicity, I decided that each task has a length of one, but adding a length field will not be hard.

type alias DrawableTask =
    { id : TaskId, col : Int, row : Int, color : Color }

In the end, it looks like this:

In case the iframe does not load open it directly.

read more

Configure CircleCI to build and sign an Android app

2019-07-11

For the TonUINO Android app I wanted to setup a CI system that also creates github releases.

The initial configuration worked (and is triggered after I push a vX.Y.Z tag to the repository) at first, but unfortunately an Android app must be signed before it can be deployed to and executed on an actual device.

So this is how I set up signing on CircleCI in addition to compilation, test execution and creating apk releases.

read more

TonUINO NFC Tools Android App

2019-05-16 (Last updated on 2019-11-06)

I wrote an Android app for the FOSS TonUINO DIY music box. The box uses NFC tags to play different music files (or in my case audio books) while being usable by small children.
With it one can easily read the contents of the NFC tags that TonUINO uses and change the values as needed or copy them.

It needs an Android device with enabled NFC (and support for NXP MIFARE Classic or MIFARE Ultralight (since v0.6)) and then the necessary data may be written by pressing one button.

I released the code on Github and the app on Google Play and F-Droid.

read more

Updating code for Elm 0.19

2018-09-02

This site contains a couple of examples in the Elm language. Recently, the version Elm 0.19 was released which introduced quite a few breaking changes.
But fortunately upgrading was made easy thanks to the official upgrade docs and the tool elm-upgrade.

I updated the following posts for Elm 0.19:

Note: Upgrading each post took between 15 and 90 minutes.