Skip to content

Instantly share code, notes, and snippets.

@nicklanng
nicklanng / main.go
Created February 20, 2018 21:58
adpcm
package main
// useful links
// http://wavefilegem.com/how_wave_files_work.html
// https://wiki.multimedia.cx/index.php/Microsoft_ADPCM
// https://github.com/bovarysme/adpcm/blob/master/status.go
import (
"bytes"
"encoding/binary"
package lib
import (
"math"
)
const (
QuadTreeCapacity = 32
QuadTreeMaxDepth = 12
)
@nicklanng
nicklanng / my_test.go
Created February 20, 2019 14:00
Interfaces vs Function Composition
package my_test
import "testing"
type AnInterface interface {
Update() int
}
type ImplementsInterface struct {
}
package main
import (
"fmt"
"image"
"image/color"
"image/png"
"math"
"os"

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@nicklanng
nicklanng / spheretree.go
Last active October 18, 2022 19:44
My first attempt at implementing John Ratcliffe's Sphere Trees in go
package main
import (
"fmt"
"github.com/faiface/pixel"
"github.com/faiface/pixel/imdraw"
"github.com/faiface/pixel/pixelgl"
"github.com/faiface/pixel/text"
"golang.org/x/image/colornames"
"golang.org/x/image/font/basicfont"