Skip to content

Instantly share code, notes, and snippets.

@0x2000580D
0x2000580D / vstates.md
Last active February 17, 2026 00:45
voltage-states and voltage-states-sram on Apple Silicon

voltage-states and voltage-states-sram on Apple Silicon

If you're calculating average frequency or voltage for a compute unit on Apple Silicon, probably dealing with state residency data from the IOReport, you'll need to have a frequency/voltage table that corresponds with the unit you're analyzing. Y'know, pstates, vstates, that good shit.

State tables are stored for various thingies in the IORegistry, you'll find them in the PMGR. There are two types of properties that store this information:

  • voltage-statesN, most likely corresponds with Core Rails (for the actual processing parts of a compute unit). The frequency values are given as raw values from the system registers.
  • voltage-statesN-sram, most likely corresponds with SRAM Rails (for the literal static ram, L1, L2 caches of a compute unit). Frequency is precalculated, readable, and SRAM volatges are higher (stability stuff).

Here N is the number/identifier making it unique to whatever the vstates correspond to. For example:

@iam-veeramalla
iam-veeramalla / openclaw_with_ollama.md
Created February 15, 2026 11:26
openclaw with ollama (Zero cost AI Assistant)

OpenClaw configuration with Ollama

Install OpenClaw

curl -fsSL https://openclaw.ai/install.sh | bash

Install Ollama

curl -fsSL https://ollama.com/install.sh | sh

@karpathy
karpathy / microgpt.py
Last active February 17, 2026 00:44
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp

Other posts

What is an "arena" in memory allocation?

I first leanred about "arena" when I was trying to understand the internal of [glibc malloc][glibc-alloc] around 2010, but I [later realized][trend] the concept is narrowly defined [in][arena1] [other][arena2] [context][arena3]. This blog post explains the difference in definition and the limitations in the so-called "arena allocators" we use today.

Background: why is malloc needed?

@weshoke
weshoke / codebase-analyzer.py
Created February 8, 2026 21:34
dspy.RLM analyzing a code base with a rules file
#!/usr/bin/env python3
"""
Codebase analyzer using Recursive Language Models (RLM) via DSPy.
Based on: https://kmad.ai/Recursive-Language-Models-Security-Audit
Usage:
python analyze-codebase.py --mode security --output report.md
python analyze-codebase.py --mode documentation --exclude tests,vendor
python analyze-codebase.py --mode quality --max-iterations 50
@niw
niw / EpaperNFCProtocol-ja.md
Last active February 17, 2026 00:43
400x300 4-Color e-Paper NFC Protocol

NFC で書き換えられる 400x300 4色電子ペーパーのプロトコル

いま巷で話題の NFC で書き換えできる名札サイズの電子ペーパーのプロトコルを調べました。

1. 前提

  • 画面サイズ: 400 x 300
  • 色インデックス (2bit):
    • 0 = Black
  • 1 = White
@olehs
olehs / tft35a-overlay.dts
Last active February 17, 2026 00:33
Orange Pi PC Waveshare 35a LCD Device Tree Overlay
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun8i-h3";
fragment@0 {
target = <&spi0>;
__overlay__ {