Skip to content

Instantly share code, notes, and snippets.

Self Types for better languages

This post intends to promote self types as a safer, simpler, and faster alternative to inductive types and dependent pattern matching at the core of programming languages.

In summary, it should go through the problems that self types try to solve, the problems that they introduce, and then a concrete solution proposed at the end, with a syntax-directed, bidirectional type system with decidable checking.

SYNTAX at the Syntax section.

The problem

@karpathy
karpathy / microgpt.py
Last active August 13, 2026 09:41
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
@leo
leo / client.ts
Last active September 3, 2025 17:03
Running the RONIN client with a local database
import { Database } from "bun:sqlite";
import ronin from 'ronin';
import { Transaction, type Model } from 'blade-compiler';
import * as rawModels from './schema';
const database = new Database('db.sqlite');
const models = Object.values(rawModels) as unknown as Array<Model>;
const { get } = ronin({
fetch: (async (request: Request): Promise<Response> => {

During the past days, this great article by Sam Pruden has been making the rounds around the gamedev community. While the article provides an in-depth analysis, its a bit easy to miss the point and exert the wrong conclusions from it. As such, and in many cases, users unfamiliar with Godot internals have used it points such as following:

  • Godot C# support is inefficient
  • Godot API and binding system is designed around GDScript
  • Godot is not production ready

In this brief article, I will shed a bit more light about how the Godot binding system works and some detail on the Godot

@eonist
eonist / My_favorite_ai_coding_prompts.md
Last active July 3, 2026 09:23
My_favorite_ai_coding_prompts.md

The art of prompt coding 🦾

Visitors GitHub Gist stars

Apps used: Cursor.so / github copilot chat / Amazon Q / codeium

img

⚠️️ Before you disregard the idea of prompt coding ⚠️️ Don't! Because everyone will be prompt-coding soon enough.

@veekaybee
veekaybee / normcore-llm.md
Last active August 12, 2026 03:10
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@shirakaba
shirakaba / Creating an Expo app in 2023.md
Created July 12, 2023 08:08
Creating an Expo app in 2023

Creating an Expo app in 2023

12th July, 2023. I'm going to try creating an iOS app called Paranovel, using Expo. My environment for mobile app dev (Xcode, Ruby, etc.) should be in reasonably good shape already as I frequently develop with React Native and NativeScript.

Creating the app

Go to https://docs.expo.dev, and see the Quick Start: npx create-expo-app paranovel

This runs with no problem, then I get this macOS system popup:

@cfm
cfm / README.md
Last active May 11, 2025 22:22
Adapting the twelve-factor methodology for "Qubes-native" multi-VM applications: a preliminary sketch

Adapting the twelve-factor methodology for "Qubes-native" multi-VM applications: a preliminary sketch[^1]

Introduction

Virtualization is the conceptual technology on which modern services (server applications) are built. Whether an application happens to run on a fully- or para-virtualized VM[^2] or is containerized—or even runs on a “bare-metal” physical server after all—most modern services are designed in isolated, replicated, disposable components on commodity hardware.[^3] The [“twelve-factor methodology”][wiggins] (2011) is an influential articulation of the principles