Skip to content

Instantly share code, notes, and snippets.

View Gravifer's full-sized avatar

Tci Gravifer Fang Gravifer

View GitHub Profile
@Gravifer
Gravifer / latency.txt
Created November 11, 2026 20:24 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012 except when noted)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@Gravifer
Gravifer / ATTRIBUTION.md
Last active September 16, 2026 08:41
Hosigoi — a permission-authorized Codex pet v2 derived from Yelu by lilstrawberry
@Gravifer
Gravifer / SKILL.md
Created August 20, 2026 06:31
skills/codex-thread-history-search
name codex-thread-history-search
description Search earlier turns in Codex Desktop tasks with read-only history access and tool-side filtering. Use when recovering prior decisions, commands, procedures, or context from the current or another Codex task without loading whole histories into the model context.

Codex Thread History Search

Recover relevant evidence from persisted Codex task history while keeping model-context use proportional to the answer.

Boundaries

@Gravifer
Gravifer / gravifer-tokyo.omp.json
Last active September 11, 2026 11:18
Git & Jujutsu aware oh-my-posh theme, based on the built-in "tokyo"
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"palette": {
"jujutsu-change-id": "#e3e50a",
"jujutsu-change-id-rest": "darken(p:jujutsu-change-id, 35)"
},
"blocks": [
{
"alignment": "left",
"leading_diamond": "<#7eb8da>\u250f</>",
@Gravifer
Gravifer / sakura-auto.css
Created July 25, 2026 20:45
Bearblog sakura with auto dark
@import url("https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/fira_code.css");
:root {
color-scheme: light;
--width: 720px;
--font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
--font-secondary: Verdana, sans-serif;
--font-scale: 1.2em;
--background-color: #f9f9f9;
--heading-color: #4a4a4a;
@Gravifer
Gravifer / twit-idea.md
Last active July 25, 2026 19:11
A twit idea: directory convention for Git worktrees

A twit idea

@Gravifer
Gravifer / AGENTS.md
Created July 22, 2026 04:59
User scoped agent instruction file on Windows

This machine, and especially this user, has near up-to-date pwsh v7 installed; it should be the shell that you do most work in, not cmd or git bash. There are common utilities like locally cargo install built ripgrep available; but don't impromptedly install new ones globally, no matter user scoped or machine scoped. But you can update existing tools, just make sure that you acknowledge/notify the user when you do it.

The user has a complex pwsh profile. When you don't expect to find it necessary, start pwsh with -nop -noni -nol; helps you to avoid a lot of churn.

Prefer Python for complex or stateful tasks.

For a persistent session, start it with interactive=True, then reuse the same tool with task_id= to send input and read output in one step. Use wait_for_pattern to wait for a prompt. TaskOutput remains available as a fallback for listing/monitoring tasks. Send 'exit' to close the session.

PowerShell quick reference:

@Gravifer
Gravifer / range-syntax-survey.md
Created July 22, 2026 04:27
Range syntax survey

Julia Compilation Latency After the Package-Image Bump

A compact survey and local case study, current through 22 July 2026.

Bottom line

The impression that Julia's compile-time experience has plateaued over the last two to three years is substantially justified—with one qualification. Julia 1.9 and 1.10 greatly improved the reuse and loading of code that package authors anticipated. They did not make arbitrary new application specializations compile

@Gravifer
Gravifer / autodiff-survey.md
Last active July 22, 2026 09:05
Autodiff survey

Modern Autodiff Architectures

Comparative report and research outlook — evidence and probes current through 22 July 2026

Executive summary

Automatic differentiation (AD) is no longer one architecture. Modern systems differentiate at several levels: PyTorch records eager tensor operations and can later stage a joint forward/backward graph; Zygote rewrites typed Julia SSA; JAX interprets a small primitive language and transposes a linearized Jaxpr;

@Gravifer
Gravifer / ClaudeCode_Notify.ps1
Last active July 11, 2026 17:46
Use Windows Powershell 5.1 + WinRT to let Claude Code CLI notify with toasts
$AppId = 'ClaudeCode.Notify'
$RegPath = "HKCU:\Software\Classes\AppUserModelId\$AppId"
New-Item -Path $RegPath -Force
New-ItemProperty -Path $RegPath -Name DisplayName -Value 'Claude Code' -PropertyType ExpandString -Force
New-ItemProperty -Path $RegPath -Name IconUri -Value $pngPath -PropertyType ExpandString -Force