Skip to content

Instantly share code, notes, and snippets.

let activekeys = {}
let pending = []
let buffer = ""
let lasttime = 0
let MaxDT = 5000
let MinDT = 16
window.addEventListener('load', main)
function parselog(s){
/*
Commas separate simultanous actions
Bichord Keyboard
Algorithm flow chart
1. serialize key actions
2. map physical keys to virtual keys
3. interpret chord sequence
4. translate chord sequence
// lifecycle globals
let data = {}, temp = {},
data0 = {}, temp0 = {},
ref = {}, items = {}, env = {}
data0.buttonCount = 10
data0.buttonCodes = fill(10, null)
env.DataVersion = "000"
Global Structured Variable Wrappers
Each different wrapper contains different variables based on
their use in the app's lifecycle:
data - Global saved state
temp - Global unsaved state, may be reset during runtime
ref - Runtime objects, not reset unlike temp

Multifile Archive Syntax

File names start with 4 equal signs, then an optional space. Optionally, they can have equal signs at the end of the line. You escape a line by adding an extra equals to all lines that begin with 4 equals signs. An empty filename is used for comments

testMultidoc()
function writeMultidoc(x){
  let s = ""

if("" in x){

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
/* CSS */
#cc{
border: 2px solid #008;
}
body{
window.addEventListener("load", main)
let env = {
holdtime: 65,
}
function main(){
test()
console.log("Test");
@derekmc
derekmc / fib.c
Last active March 14, 2025 18:21
#include <stdio.h>
#include <math.h>
double fib(int n){
double a = 1;
double b = 1;
while(--n > 0){
b += a;
a = b - a;
}
to draw voxels, iterate over dimensions
in the order of the most perpedicular to the
camera view vector, ie, the smallest magnitude
dot product.
Recursive voxel space
voxel subdivisions: 4x4x4 = 64 subcubes
grid layer size 128x128x128 (64 cubes from viewer in any direction)
<h1> Demo App Title </h1>
<p> This is a demo app </p>
<script>
setTimeout(change1, 3000)
function change1(){