Skip to content

Instantly share code, notes, and snippets.

View Stef-Gijsberts's full-sized avatar
👋

Stef Gijsberts Stef-Gijsberts

👋
View GitHub Profile
@Stef-Gijsberts
Stef-Gijsberts / parser-combinator.zig
Last active May 28, 2023 00:18
A stub for a parser combinator in zig
// (Use zig 0.11)
//
// Idea for further exploration: remove inferable arguments from all functions.
// For example the types in the 'map' function. Or the type in the 'match'
// function. I think this is doable, but it produces a lot of code and is a bit
// error-prone. So maybe I'll do it at the end, after expanding the parser.
const std = @import("std");
const testing = std.testing;
@Stef-Gijsberts
Stef-Gijsberts / hsgn.md
Last active March 11, 2025 14:47
A notation for games of Settlers of Catan

EDIT (April 24th 2023): I created another notation, which I think it better. Its description is a bit more formal, but it's just as usable, by both humans and computers.

HSGN: Human Settlers Game Notation

As far as I'm aware, at the time of writing (August 2022) the only prior work on an open and public notation for Settlers is SGN: Settlers-Game-Notation by dnmfarrell.

HSGN is not meant to compete with SGN. The goal of HSGN differs from the goal of SGN. SGN is a notation for computers. HSGN however, is designed as a notation that humans can easily read and write.

I developed this notation to annotate live games with pen and paper, for post-game review.

@Stef-Gijsberts
Stef-Gijsberts / transpose.py
Last active March 20, 2022 21:59
Transpose a file with chords
#!/usr/bin/env python3
"""
Copyright (c) 2022 Stef Gijsberts
This code is licensed under the MIT license.
This program transposes files with chords.
- It reads from standard input and writes to standard output.
@Stef-Gijsberts
Stef-Gijsberts / init.lua
Last active December 30, 2023 23:08
neovim config
-- INSTALLING PACKER ON LINUX:
-- git clone --depth 1 https://github.com/wbthomason/packer.nvim\
-- ~/.local/share/nvim/site/pack/packer/start/packer.nvim
vim.keymap.set("n", " ", "<Nop>", { silent = true, remap = false })
vim.g.mapleader = " "
vim.g.maplocalleader = ","
vim.wo.relativenumber = true
vim.wo.number = true