This file contains 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
<base target=_blank><style>*{box-sizing:border-box;padding:0;margin:0}:root{color:#a1a1aa;background:#09090b;font:1.2rem Crimson Text,serif}::selection{color:#fafafa;background:#3f3f46}strong,output{font-weight:normal;color:#fafafa}output{font-family:Courier New,monospace}body{width:90%;max-width:550px;margin:120px auto}p,svg{margin-bottom:12px}p:has(~hr){font-size:1.2rem}hr{width:50px;height:1px;background:#27272a;border:0;margin:50px 0}hr~*{line-height:1.7}hr~p{text-indent:24px;margin-bottom:24px}a{color:#fafafa;text-decoration:underline dotted #71717a}aside{position:fixed;bottom:20px;left:0;width:100%;pointer-events:none}#A{width:-moz-max-content;width:max-content;max-width:90%;padding:12px 16px;margin:0 auto;font:0.74rem Inter,Arial,sans-serif;line-height:1.6;color:#a1a1aa;background-color:#18181b;border:1px solid #27272a;opacity:var(--o,0);transform:translateY(calc(20px*(1 - var(--o))))}/* fonttools subset CrimsonText-Regular.ttf --unicodes="U+0020,U+0027,U+002C-002E,U+0030-0039,U+0041-005A,U+0061-007A,U |
This file contains 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
// TODO: | |
// - Better error checking | |
// - Better code structure | |
// - Detect function boundary (skip CC or multi-byte nops) | |
use std::array; | |
use std::cell::Cell; | |
use std::fmt; | |
use std::fs::File; | |
use std::io::{self, BufReader, Read, Seek, SeekFrom, Write}; |
This file contains 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
// Brotli bootstrapping based on WOFF2 font | |
// Kang Seonghoon, 2024-03-01, public domain | |
// Based on my earlier work for JS1024: https://js1024.fun/demos/2022/18 | |
// Only vaguely tested, YMMV | |
import { argv, stderr } from 'node:process'; | |
import fs from 'node:fs'; | |
import zlib from 'node:zlib'; | |
const generateBrotliParams = function* () { |
This file contains 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
# derived from https://github.com/crozone/ReedSolomonCCSDS | |
# should be more performant alternative to https://github.com/kplabs-pl/reed-solomon-ccsds | |
from dataclasses import dataclass | |
from typing import Optional, List | |
ALPHA_TO = [ | |
0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x87,0x89,0x95,0xad,0xdd,0x3d,0x7a,0xf4, | |
0x6f,0xde,0x3b,0x76,0xec,0x5f,0xbe,0xfb,0x71,0xe2,0x43,0x86,0x8b,0x91,0xa5,0xcd, | |
0x1d,0x3a,0x74,0xe8,0x57,0xae,0xdb,0x31,0x62,0xc4,0x0f,0x1e,0x3c,0x78,0xf0,0x67, |
This file contains 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
# This script builds a custom Zig distribution into a Python wheel. | |
# | |
# The "custom" distribution refers to any directory resulting from | |
# zig-bootstrap that doesn't make into public nightly or stable releases. | |
# The existing ziglang/zig-pypi doesn't work with such cases, hence | |
# this script. It still makes use of a large portion of make_wheels.py, | |
# so should be put into the same directory in order to function. | |
# | |
# This script is derived from make_wheels.py from zig-pypi (commit | |
# 5b30070bc), and thus distributed under the same license (MIT/Expat). |
This file contains 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] | |
name = "async-zip-problem" | |
version = "0.1.0" | |
edition = "2021" | |
[[bin]] | |
name = "async-zip-problem" | |
path = "main.rs" | |
[dependencies] |
This file contains 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
// _ | |
// ___ __ _ _ _ _| | | |
// / _ \ / _` | | | |__ | by Kang Seonghoon (@senokay, mearie.org) | |
// \__ | (_| | |_| |_| | 2022-07-13, for JS1024 2022 | |
// |___/ \__, | .__/|__/ Public Domain (CC0 1.0) | |
// |_|\___| | |
// | |
// This is a simple typing game where you have lots of short English words to | |
// quickly type before a timer runs out. Perhaps most surprisingly, the game | |
// seems to have an access to lots of real English words (1,903 to be exact). |
This file contains 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
#define J40_CONFIRM_THAT_THIS_IS_EXPERIMENTAL_AND_POTENTIALLY_UNSAFE | |
#define J40_IMPLEMENTATION | |
#include "j40.h" | |
#ifdef __GNUC__ // stb_image_write issues too many warnings | |
#pragma GCC diagnostic push | |
#pragma GCC diagnostic ignored "-Wsign-conversion" | |
#pragma GCC diagnostic ignored "-Wconversion" | |
#endif | |
#define STB_IMAGE_WRITE_IMPLEMENTATION |
This file contains 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
<!doctype html> | |
<meta http-equiv=refresh content=2> | |
<canvas id=canvas width=2000 height=2000></canvas> | |
<script> | |
function draw(s) { | |
try { | |
const ctx = canvas.getContext('2d'); | |
ctx.scale(1.5, 1.5); | |
ctx.translate(500, 500); | |
ctx.scale(1, -1); |
This file contains 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
// really inefficient MicroW8 quine | |
// 2022-03-01 Kang Seonghoon, public domain | |
import "env.memory" memory(4); | |
import "env.printString" fn printString(i32); | |
export fn upd() { | |
if 0!64 > 0 { | |
return; |
NewerOlder