Skip to content

Instantly share code, notes, and snippets.

View 5HT's full-sized avatar
🌐
I'm very skeptical that person without empathy can create beautiful mathematics.

Magnus Ericsson 5HT

🌐
I'm very skeptical that person without empathy can create beautiful mathematics.
View GitHub Profile
CLI tools and GUI applications are simply Real Bodies that contain one or more special records:
Record | Type | Name | Purpose
9 | RT_PROG | Executable Program Record | Contains the actual machine code (native binary for the CPU). Subtype indicates CPU architecture.
7 / 8 | Function / Execution Fusen | Menu entries, launch parameters, icons, etc.
1 | TAD main | Documentation, help text, or resources in TAD format
0 | Link records | Virtual Bodies pointing to other objects
#define RT_PROG 9 /* 実行プログラムレコード – Executable Program Record */
#define OBJ_EXEC 0x8000 /* 実行可能ファイル – executable Real Body flag */
@5HT
5HT / gist:17759f2983a92df4eaf8656e3770e7de
Created September 8, 2026 17:40
BTRON on NetBSD/FreeBSD/OpenBSD
# BTRON POSIX Port – Minimal Changes for NetBSD / OpenBSD / FreeBSD
**Repository:** https://github.com/bitedits/btron
**Target command:** `make run-posix`
**Analysis date:** 2026-09-08
## Goal
Make the POSIX-hosted desktop (`btron-posix`) build and run successfully out of the box on:
@5HT
5HT / gist:1e22d04520043d6e266bdc72579192e9
Created September 8, 2026 16:30
Artur Wyszynski Haiku OpenGL Kit
Artur Wyszynski
Haiku OpenGL Kit
Maxim: Tell us about yourself ?
Artur: I'm a 27 years old, working as a game developer in GameLion Studios, long time BeOS user and almost 2-3 years Haiku developer :)
Maxim: What is current OpenGL state in Haiku ?
Artur: OpenGL state in Haiku OpenGL Kit is so simple that even Windows GL API beat us in that manner it was designed 10-12 years ago, without current GPU's multi-threading rendering etc. My plan if nobody beats me is to implement TTM memory menager in kernel, then port DRM on kernel side, provide a simple test cases which shows that it works and then rewrite from scratch Haiku OpenGL kit but as a base use Apple's OpenGL framework. It's mature, well designed and great :)
For example, current implementation of OpenGL Kit doesn't allow you to have more contexts, and for example, current engines uses multiple threads in their engines and in current design you can't divide application to use multiple context, for example one to render, one to process, one to physics e
@5HT
5HT / gist:cfc0e8aed909a7827bd81cb88426828b
Created September 7, 2026 13:50
btron-msys2-mingw64.txt
maxim@QUADSTELLAR MINGW64 ~
$ cd //wsl.localhost/Ubuntu-22.04/home/maxim/depot/bitedits/btron
maxim@QUADSTELLAR MINGW64 //wsl.localhost/Ubuntu-22.04/home/maxim/depot/bitedits/btron
$ make run-qemu
cc -O2 -Wall -Wextra -std=c99 -Iinclude -Iinclude/drivers -Isrc/kernel -Isrc/cores -IC:/msys64/mingw64/include/SDL2 -Dmain=SDL_main -DBTRON_TARGET=1 -DBTRON_QEMU_TARGET -c src/cores/core_virtio.c -o src/cores/core_virtio.qemu.o
cc -O2 -Wall -Wextra -std=c99 -Iinclude -Iinclude/drivers -Isrc/kernel -Isrc/cores -IC:/msys64/mingw64/include/SDL2 -Dmain=SDL_main -DBTRON_TARGET=1 -DBTRON_QEMU_TARGET -c src/drivers/virtio/virtio.c -o src/drivers/virtio/virtio.qemu.o
cc -O2 -Wall -Wextra -std=c99 -Iinclude -Iinclude/drivers -Isrc/kernel -Isrc/cores -IC:/msys64/mingw64/include/SDL2 -Dmain=SDL_main -DBTRON_TARGET=1 -DBTRON_QEMU_TARGET -c src/cores/core_init.c -o src/cores/core_init.qemu.o
cc -O2 -Wall -Wextra -std=c99 -Iinclude -Iinclude/drivers -Isrc/kernel -Isrc/cores -IC:/msys64/mingw64/include/SDL2 -Dmain=SDL_main -DBTRO
tonpa@Sky-M4 rtp % node signal.js
Starting GStreamer mixer...
Signaling & web server running at http://localhost:8888
DEBUG: GStreamer MCU C process started
Client connected: peer_wkeik8aid
Client peer_wkeik8aid is ready, notifying GStreamer
DEBUG: Setting up webrtcbin for peer: peer_wkeik8aid
Forwarding SDP Offer to client peer_wkeik8aid
Received SDP Answer from client peer_wkeik8aid
Forwarding ICE candidate to client peer_wkeik8aid
tonpa@Sky-M4 cd % kubectl get all --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
erp-services pod/nitro-portal-f5bd7d6ff-mrd8s 0/1 ImagePullBackOff 0 5m8s
erp-services pod/nitro-portal-f5bd7d6ff-qsc9g 0/1 ImagePullBackOff 0 5m8s
erp-telemetry pod/grafana-68f7cf4799-hr5sg 1/1 Running 0 5m8s
erp-telemetry pod/prometheus-0 1/1 Running 0 5m9s
kube-system pod/coredns-589f44dc88-2qdph 1/1 Running 0 4h27m
kube-system pod/coredns-589f44dc88-jb4s6 1/1 Running 0 4h27m
kube-system pod/etcd-desktop-control-plane 1/1 Running 0 4h27m
kube-system pod/kindnet-7z72q
Загальна картина: Чи може одна мова керувати всією математикою?
Уявіть, що вам доручено створити єдину мову програмування для кодування всього Всесвіту. Вона має обчислювати планетарні орбіти, писати прості програми, описувати квантову механіку та доводити кожну математичну теорему, коли-небудь задуману.
Десятиліттями математики та вчені-інформатики намагалися знайти цю «єдину універсальну мову».
Дехто вважав, що відповіддю є теорія множин. Інші вважали, що відповіддю є теорія гомотопічних типів (мова, заснована на геометрії).
У цій статті «Архітектура математики» робиться сміливе твердження: жодна окрема мова не може зробити все. Спроба створити монолітну мову — це як спроба створити швейцарський армійський ніж, який також є газонокосаркою, калькулятором і космічним кораблем. Він стає занадто важким і ламається під власною вагою.
Натомість у статті пропонується «Решітка мов» — мережа менших, вузькоспеціалізованих мов, які з'єднані автоматичними перекладачами (так званими «функторами»).
The Big Picture: Can One Language Rule All of Math?
Imagine you are tasked with building a single programming language to code the entire universe. It has to calculate planetary orbits, write simple apps, describe quantum mechanics, and prove every mathematical theorem ever conceived.
For decades, mathematicians and computer scientists have tried to find this "one universal language."
Some thought Set Theory was the answer.
Others thought Homotopy Type Theory (a language based on geometry) was the answer.
This paper, Architecture of Mathematics, makes a bold claim: No single language can do it all. Trying to build a monolithic language is like trying to build a Swiss Army knife that is also a lawnmower, a calculator, and a spaceship. It becomes too heavy and breaks under its own weight.
Instead, the paper proposes a Lattice of Languages—a network of smaller, highly specialized languages that are connected by automatic translators (called "functors").
This file has been truncated, but you can view the full file.
Checking: 2-quot₃
When trying to typecheck
λ (A : U), λ (R : Π (x₂₈₈₃₇₇ : A), Π (x₂₈₈₃₇₈ : A), U), λ (Q : Π (x : A), Π (y : A), Π (x₂₈₈₃₇₅ : R¯ A R x y), Π (x₂₈₈₃₇₆ : R¯ A R x y), U), λ (x : A), λ (y : A), λ (r1 : R¯ A R x y), λ (r2 : R¯ A R x y), λ (q : Q x y r1 r2), <i> <j> hcomp (2-quot A R Q) ((∂ i) ∨ (∂ j)) (λ (k : I), [(i = 0) → 2-quot₁ A R Q x, (i = 1) → (2-quot-path A R Q x y r2) @ (j ∨ k), (j = 0) → ι₂ (TotalSpokes A R Q) (PreHIT A R Q) (LHS_Stage2 A R Q) (RHS_Stage2 A R Q) (map_quot_pre A R Q (((trans-filler-p (quot A R) (quot₁ A R x) (quot₁ A R y) (quot₁ A R x) r1 (<i> r2 @ -i)) @ k) @ i)), (j = 1) → (2-quot-path A R Q x y r2) @ i]) ((resp (TotalSpokes A R Q) (PreHIT A R Q) (LHS_Stage2 A R Q) (RHS_Stage2 A R Q) ((x, (y, (r1, (r2, q)))), loop @ i)) @ j)
Against type
Π (A : U), Π (R : Π (x₂₈₈₃₅₉ : A), Π (x₂₈₈₃₆₀ : A), U), Π (Q : Π (x : A), Π (y : A), Π (x₂₈₈₃₅₇ : PathP (<x₉₅> coequ (Σ (x : A), Σ (y : A), R x y) A (λ (p : Σ (x : A), Σ (y : A), R x y), p.1) (λ (p : Σ (x : A), Σ (y : A), R x y), p.2
@5HT
5HT / client.txt
Created March 22, 2026 03:27
Zen Crypted Client Developer
Zen Crypted Backend Developer
=============================
Statement of Work – Client Developer (Swift / iOS / ASN.1)
*Project*: Development and enhancement of secure military-grade iOS chat client
*Position*: iOS Developer (Swift, security-focused)
*Project context*: The client is based on the open-source Chat X.509 for iOS, a server-less proof-of-concept using multicast UDP + X.509 certs for local encrypted messaging. The goal is to evolve it into a full client for the custom Elixir server (TCP/QUIC + ASN.1/DER protocol), with end-to-end X.509 CMS encryption and military-grade security.
Scope of Work (main deliverables):