This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abcdefghijklmnopqrstuvwxyz0123456789.+-_/ | |
a## | |
# | |
#### | |
# # | |
# # | |
#### | |
b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> | |
#include<ctype.h> | |
#include<math.h> | |
typedef char c; typedef size_t s; typedef double f; typedef struct A{f s; struct A*r;}A; static const A y={0},r={0}; | |
#define D(f) A f(A x,A y) | |
#define M(f) A f(A x) | |
#define i(...) for(s i=0;i<n;++i){__VA_ARGS__;} | |
#define j(...) for(s j=0;j<m;++j){__VA_ARGS__;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# s0‿o1 𝔽_associativeReduce 𝕩: 𝔽´¨ on paths in 𝕩 of s steps with stride (=𝕩)↑o1 | |
# | |
# example: | |
# m ≡ 4‿(¯1‿1) +_associativeReduce x | |
# +-------+ +-------------+ | |
# | . . . | | . . . . . . | | |
# | y . . | | . . . d . . | | |
# +-------+ | . . c . . . | | |
# | . b . . . . | | |
# y ≡ +´a‿b‿c‿d | a . . . . . | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [as, bs, x, y] = hex_circle(r) | |
%% a,b represents a complex number in the form a + b * zeta, where zeta is the principal third root of unity. | |
%% therefore, abs(a + b * zeta) = a^2 - a*b + b^2, which gives the DDA equations | |
a = round(r); | |
b = 0; | |
as = [a]; | |
bs = [b]; | |
%% initialize DDA | |
e = a^2 - r; | |
da = 2 * a + 1 - b; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n ← 6 | |
k ← 4 | |
d ← ↕n | |
poly ← (0.5×d+1)≍¨(-0.5×d-1) | |
limits ← ⌈{a‿b‿c: (2×a)÷˜-b-√(טb)-4×a×c}¨ poly ∾⌜ -10⋆k-1‿0 | |
values ← poly {+´𝕨×(ט𝕩)‿𝕩}¨ {a‿b:<a+↕b-a}˘limits # the numbers to be tested | |
perm ← (n-1) ∾˘˜ (≍↕0){∾˝(0∾˘1+𝕩)⊸⊏˘⍒˘=⌜˜↕𝕨}´-⟜↕n-1 # distinct cycles of number class | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <assert.h> | |
#include <string.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#define ENSURE(p) ({__typeof(p) _p = p; assert(_p); _p; }) | |
typedef struct { | |
size_t dot; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; syntax M68k | |
Font_height equ 10 | |
Font_width equ 8 | |
font: | |
dcb.b Font_height*(32-0),$55; | |
; spc | |
dc.b %00000000 | |
dc.b %00000000 | |
dc.b %00000000 | |
dc.b %00000000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "core:os" | |
import "core:strings" | |
import "core:fmt" | |
import "core:slice" | |
import "core:strconv" | |
import "core:time" | |
State :: enum u8 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "core:fmt" | |
import "core:math" | |
import "core:mem" | |
import "core:os" | |
import "core:slice" | |
import "core:unicode" | |
import "core:strconv" | |
import "core:strings" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "core:os" | |
import "core:fmt" | |
import "core:slice" | |
import "core:mem" | |
import "core:strings" | |
import "core:strconv" | |
mix :: proc (numbers: []int, mix: int) -> (result: int) { |
NewerOlder