This file contains hidden or 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
| /** | |
| * vertex.js — single-file library combining: | |
| * | |
| * 1. VQuery — DOM layer (hn.js-inspired, jQuery surface-compatible) | |
| * 2. Reconciler — Fiber-based React clone (pomb.us architecture + hooks) | |
| * 3. template — Mustache template engine + component loader (Vertex.template) | |
| * 4. Router — Backbone-style hash router (class-based + singleton) | |
| * 5. Glue — useHash hook, unified Vertex namespace | |
| * | |
| * jQuery compatibility: if jQuery / $ already exist on the page they are |
This file contains hidden or 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
| """ | |
| 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 |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <ctype.h> | |
| #include <openssl/sha.h> | |
| #define TARGET_PREFIX "20250327" | |
| #define MAX_WORDS 256 | |
| #define MAX_TEXT 2048 | |
| #define MAX_ATTEMPTS (1ULL << 32) // 2^32 attempts (~4.3B, enough for 8-char prefix) |

