Skip to content

Instantly share code, notes, and snippets.

@wuggen
wuggen / hmrcici16bi.md
Last active May 14, 2023 17:46
Design document for my 8-bit ISA for _Turing Complete_

The How Many Registers Can I Cram Into 16-Bit Instructions architecture

Overview

The How Many Registers Can I Cram Into 16-Bit Instructions architecture (provisional name; the answer seems to be 16, incidentally) is an 8-bit instruction set architecture designed for the game Turing Complete. It is a Harvard architecture — code and data are in separate memory spaces, and program memory is immutable at runtime. It uses fixed-width 16-bit instructions and operates on 8-bit data words. Both program and data memory are byte-addressed, with 8-bit addresses, meaning the maximum size for both program and data

@wuggen
wuggen / decay_stack.rs
Created May 28, 2022 02:35
birth-muffins-death's programming challenge :3
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DecayStack {
stack: Vec<StackEntry>,
current_decay: i32,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
struct StackEntry {
value: i32,
decay: i32,

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@wuggen
wuggen / page_checker.js
Last active May 22, 2019 14:26
Tumblr XKit script to yell at me if I go through too many dashboard pages
(function() {
var MIN = 5;
var INTERVAL = 5;
var MSGS = [
"That's five pages, buddy.",
"You gonna quit now or what?",
"I hope you know what you're doing here...",
"This is your periodic reminder that YET ANOTHER five pages have gone by."
];