Skip to content

Instantly share code, notes, and snippets.

View lukechampine's full-sized avatar

Luke Champine lukechampine

View GitHub Profile
@lukechampine
lukechampine / fac.hoon
Last active November 10, 2025 23:26
Evolution of a Hoon Programmer
:: Hoonlet
::
|= n=@
?: =(n 0)
1
(mul n $(n (dec n)))
::
:: Commie Hoontard
:: (...daydreaming of his very own Type 59...)
::
@lukechampine
lukechampine / fractran.hoon
Created May 13, 2020 05:08
A FRACTRAN interpreter in Hoon
|= n=@
=<
|^
(fib-dec (interp fib-prog (fib-enc n)))
++ fib-prog
:~ 17^65
133^34
17^19
23^17
2.233^69
@lukechampine
lukechampine / bnt.go
Last active October 2, 2023 03:22
BNT renderer
package main
import (
"fmt"
)
func main() {
fmt.Println(renderBNT(19))
}
@lukechampine
lukechampine / dead-arms.txt
Created October 26, 2023 22:39
Dead Hoon linter
Dead arms detected by running the above script on urbit/urbit tip, against a corpus
of ~300k lines of Hoon (including urbit/urbit itself and various community repos):
urbit/pkg/autoprop/sur/sole.hoon:
+sole-gen
urbit/pkg/autoprop/lib/ethereum.hoon:
+address-to-checksum
+batch-read-request
+encode-atoms
+light-json-request
@lukechampine
lukechampine / vanity.go
Created January 2, 2024 16:04
Vanity Go import server
package main
import (
"flag"
"html/template"
"log"
"net/http"
"strings"
)
@lukechampine
lukechampine / main.go
Last active July 2, 2025 03:45
og-sweep: Sweep v033x and siag keys
package main
import (
"flag"
"fmt"
"log"
"os"
"go.sia.tech/core/types"
"go.sia.tech/walletd/v2/api"