Skip to content
gwern-emacs logo

gwern-emacs Skill

gwern-emacs

The Bitter Lesson: *General methods leveraging compute beat specialized methods.*

plurigrid/asi0installs67stars

SKILL.md

Full skill instructions

gwern-emacs Skill

Gwern's empirical rationality meets xenodium's Emacs philosophy

Core Synthesis

Gwern ConceptEmacs IntegrationGay.jl Stream
Spaced Repetitionorg-drill, org-fcStream 2 #E6F463
Self-Experimentationorg-capture, sqlite-modeStream 4 #5713C0
Bitter Lessonchatgpt-shell scalingStream 3 #63B6F0
Scaling Hypothesisagent-shell hierarchiesStream 2 #E6F463
Tool AIacp.el + MCP serversStream 4 #5713C0

Spaced Repetition in Emacs

(use-package org-fc
  :custom
  (org-fc-directories '("~/​org/​flashcards/"))
  :config
  ;; Gwern-style forgetting curve with Gay.jl colors
  (defun gwern/​org-fc-colorize-by-interval ()
    "Color cards by retention interval using stream 2 colors."
    (let* ((interval (org-fc-card-interval))
           (index (min 6 (floor (/ interval 7))))  ; Week-based indexing
           (colors ["#E6F463" "#73A0E1" "#D87E0E" 
                    "#D72676" "#D13FD6" "#7FD971" "#5BCCB1"]))
      (overlay-put (make-overlay (point) (line-end-position))
                   'face `(:background ,(aref colors index))))))

Self-Experimentation Protocol

Org-Capture for n=1 Studies

(add-to-list 'org-capture-templates
  '("e" "Self-Experiment" entry
    (file+headline "~/​org/​experiments.org" "Active")
    "* %^{Experiment} :experiment:
:PROPERTIES:
:HYPOTHESIS: %^{Hypothesis}
:START_DATE: %U
:BLINDING: %^{Blinding method}
:MEASURE: %^{Primary measure}
:GAY_SEED: %(format \"%x\" (random (expt 2 64)))
:END:
** Protocol
%?
** Data Log
| Date | Measure | Notes |
|------+---------+-------|
** Analysis
** Conclusion"
    :jump-to-captured t))

sqlite-mode-extras for Experiment Data

(defun gwern/​experiment-db (experiment-name)
  "Open or create SQLite DB for experiment tracking."
  (let ((db-path (expand-file-name 
                  (format "experiments/%s.db" experiment-name)
                  org-directory)))
    (unless (file-exists-p db-path)
      (with-temp-buffer
        (sqlite-mode-open db-path)
        (sqlite-mode-extras-execute
         "CREATE TABLE observations (
            id INTEGER PRIMARY KEY,
            timestamp TEXT DEFAULT CURRENT_TIMESTAMP,
            measure REAL,
            condition TEXT,
            notes TEXT,
            gay_color TEXT
          )")))
    (sqlite-mode-open db-path)))

Bitter Lesson → chatgpt-shell

The Bitter Lesson: General methods leveraging compute beat specialized methods.

Scaling-Aware Model Selection

(defun gwern/​bitter-lesson-model-select ()
  "Select model based on task complexity using scaling heuristics.
   
   Simple tasks → small models (efficiency)
   Complex tasks → largest available (Bitter Lesson)"
  (interactive)
  (let* ((task-complexity (read-number "Task complexity (1-10): "))
         (model (cond
                 ((< task-complexity 3) "gpt-4o-mini")
                 ((< task-complexity 6) "gpt-4o")
                 ((< task-complexity 8) "claude-3-5-sonnet")
                 (t "o1-preview")))
         (bitter-color (if (>= task-complexity 6) "#63B6F0" "#D1E598")))
    (setq chatgpt-shell-model-version model)
    (message "Bitter Lesson applied: %s (complexity %d)" model task-complexity)))

Compute Budget Tracking

(defvar gwern/​compute-budget nil
  "Track API costs as empirical data on scaling returns.")

(defun gwern/​log-api-call (model tokens cost)
  "Log API call for meta-analysis of scaling efficiency."
  (push (list :time (current-time)
              :model model
              :tokens tokens
              :cost cost
              :gay-color (gay-color-at gay-seed-default 
                                       (mod (sxhash model) 1000)))
        gwern/​compute-budget))

Tool AI → acp.el Integration

Gwern's Tool AI concept: AI as augmentation, not replacement.

;; Tool AI philosophy in agent configuration
(acp-define-agent "gwern-tool-ai"
  :system-prompt "You are a Tool AI assistant. Your role is to:
1. Augment human decision-making, not replace it
2. Provide information and analysis on request
3. Never take autonomous actions without explicit approval
4. Flag uncertainty and limitations clearly
5. Support empirical self-experimentation"
  
  :tools '((:name "search-gwern"
            :description "Search gwern.net for relevant content"
            :parameters ((:name "query" :type "string")))
           (:name "log-observation"
            :description "Log self-experiment observation"
            :parameters ((:name "experiment" :type "string")
                        (:name "measure" :type "number")
                        (:name "notes" :type "string")))
           (:name "gay-color"
            :description "Get deterministic color for concept"
            :parameters ((:name "concept" :type "string")))))

dwim-shell-command for Gwern-Style Analysis

(dwim-shell-command-define
 :name "Gwern: N-gram analysis"
 :command "python3 -c \"
import sys
from collections import Counter
text = open('<<f>>').read()
ngrams = [text[i:i+3] for i in range(len(text)-2)]
for ng, count in Counter(ngrams).most_common(20):
    print(f'{count:>5} {ng!r}')
\""
 :utils "python3"
 :documentation "Character n-gram analysis for text patterns")

(dwim-shell-command-define
 :name "Gwern: Effect size"
 :command "python3 -c \"
import sys, numpy as np
a = np.array([float(x) for x in input('Control: ').split()])
b = np.array([float(x) for x in input('Treatment: ').split()])
pooled_std = np.sqrt((a.var() + b.var()) / 2)
cohens_d = (b.mean() - a.mean()) / pooled_std
print(f'Cohen\\'s d: {cohens_d:.3f}')
print('Effect: ' + ('small' if abs(cohens_d)<0.5 else 'medium' if abs(cohens_d)<0.8 else 'large'))
\""
 :utils "python3"
 :documentation "Calculate effect size for self-experiments")

Gay.jl Color Integration

Each Gwern concept has a deterministic color stream:

(defvar gwern/​concept-colors
  '((spaced-rep . (:stream 2 :seed #x15de8b98c900de7 :color "#E6F463"))
    (self-experiment . (:stream 4 :seed #x334251d97027eb15 :color "#5713C0"))
    (bitter-lesson . (:stream 3 :seed #xb8976e5c302871c9 :color "#63B6F0"))
    (scaling . (:stream 2 :seed nil :color "#E6F463"))
    (tool-ai . (:stream 4 :seed nil :color "#5713C0"))
    (daydreaming . (:stream 5 :seed nil :color "#532FA6")))
  "Gwern concepts mapped to Gay.jl color streams.")

(defun gwern/​concept-face (concept)
  "Get face for Gwern concept."
  (let ((color (plist-get (alist-get concept gwern/​concept-colors) :color)))
    `(:background ,color :foreground ,(if (> (gwern/​color-luminance color) 0.5)
                                          "black" "white"))))

Transient Menu

(transient-define-prefix gwern-transient ()
  "Gwern methodology commands."
  ["Experimentation"
   ("e" "New experiment" gwern/​new-experiment)
   ("d" "Log data point" gwern/​log-observation)
   ("a" "Analyze experiment" gwern/​analyze-experiment)]
  ["Spaced Rep"
   ("r" "Review due cards" org-fc-review)
   ("s" "Schedule stats" org-fc-stats)]
  ["Scaling"
   ("m" "Model select (Bitter Lesson)" gwern/​bitter-lesson-model-select)
   ("c" "Compute budget" gwern/​show-compute-budget)]
  ["Tool AI"
   ("t" "Tool AI agent" (lambda () (interactive) (agent-shell "gwern-tool-ai")))
   ("g" "ChatGPT shell" chatgpt-shell)])

(global-set-key (kbd "C-c w") 'gwern-transient)

Neighbor Skills

  • xenodium-elisp: Core Emacs infrastructure (chatgpt-shell, acp.el, dwim-shell-command)
  • gay-mcp: Deterministic color streams for concept tracking
  • compression-progress: Schmidhuber's curiosity → Gwern's information-theoretic approach
  • self-validation-loop: Empirical validation of predictions
  • duckdb-temporal-versioning: Time-travel queries for experiment history

Resources


Autopoietic Marginalia

The interaction IS the skill improving itself.

Every use of this skill is an opportunity for worlding:

  • MEMORY (-1): Record what was learned
  • REMEMBERING (0): Connect patterns to other skills
  • WORLDING (+1): Evolve the skill based on use

Add Interaction Exemplars here as the skill is used.

More skills from plurigrid

cargo logo
plurigrid/asi

cargo

Rust package manager (36 subcommands).

67 0
View

Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma...

67 0
View

**Status**: 🌳 Production Ready (upstream in StringZilla v3+) **Type**: High-Performance String Operations / SIMD-Accelerated Text Processing **Principle**: Zero-copy views, SIMD/SWAR acceleration, deterministic hashing **Frame**: Cross-language interoperability (C, C++, Python, Rust, Go, Swift, ...

67 0
View
conformal-ga logo
plurigrid/asi

conformal-ga

Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations

67 0
View

Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.

67 0
View
zig-systems logo
plurigrid/asi

zig-systems

Systems programming and performance optimization using Zig. Provides low-level abstractions, memory-safe compiled code, and performance benchmarking. Use for system-level operations, optimization, and interoperability with C/POSIX APIs.

67 0
View
soliton-detection logo
plurigrid/asi

soliton-detection

Topological soliton detection and agency bridge with anyonic fusion algebra for concept composition

67 0
View
paypal-mcp logo
plurigrid/asi

paypal-mcp

PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.

67 0
View
unison logo
plurigrid/asi

unison

Unison language - content-addressed functional programming with abilities for effects, distributed computing, and structural types. Use for pure functional code, effect management, distributed systems, and refactoring-safe codebases.

67 0
View
tasks-acset logo
plurigrid/asi

tasks-acset

Google Tasks management via TasksACSet. Transforms task operations into GF(3)-typed Interactions, routes to triadic queues, detects saturation for task-zero-as-condensed-state.

67 0
View
c logo
plurigrid/asi

c

World C Skill

67 0
View
syrup logo
plurigrid/asi

syrup

Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.

67 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View