Skip to content

Instantly share code, notes, and snippets.

@rikchilvers
rikchilvers / main.zig
Last active August 5, 2021 07:54
This works when run but crashes when tested. UAF? Zig bug?
const std = @import("std");
const testing = std.testing;
const print = std.debug.print;
const Node = struct {
const Self = @This();
data: u8,
children: ?std.StringHashMap(*Self) = null,

Keybase proof

I hereby claim:

  • I am rikchilvers on github.
  • I am rikchilvers (https://keybase.io/rikchilvers) on keybase.
  • I have a public key ASAPY8dugJuIjFXAxfEf7tbRF16xfYR59W_QoTUV4m3URQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am rikchilvers on github.
  • I am rikchilvers (https://keybase.io/rikchilvers) on keybase.
  • I have a public key whose fingerprint is 73FF F13E 8555 1CF1 774D 63C7 E25B 456C 2619 E591

To claim this, I am signing this object:

@rikchilvers
rikchilvers / main.lua
Created August 30, 2012 15:19
Tile-based scrolling in LÖVE
function love.conf( t )
t.screen.width = 100
t.screen.height = 100
end
function love.load( )
tiles = {}
for i = 0, 15 do -- we're going to have a 4x4 grid (16 tiles, counting from 0)
tiles[i] = i -- we'll just have each tile as a number to make it easy see what's going on