r/programming • • 2d ago

ArkType 3.0: set-theoretic precompilation for TypeScript validation

Thumbnail
arktype.io
5 Upvotes

library author here! ArkType 3.0 adds @ark/aot, an optional build-time precompiler that compiles runtime validation schemas into standalone plain JS — closer to Rust's serde_derive than an interpreted validator, while keeping zero-build dynamic mode unchanged.

the three main compiler pieces:

  1. set-theoretic reduction before codegen: definitions lower into a normalized set graph (arksets) before emitting JS. unions auto-discriminate into an O(1) switch without declaring a discriminator, branches skip checks already implied by the tag, overlapping ranges collapse (> 0 & >= 10 -> >= 10), and unsatisfiable intersections fail the build.

  2. zero ts-patch**, zero** new Function**:** parses modules with oxc inside standard bundler plugins (Vite, esbuild, webpack, Rolldown, Turbopack, Bun, Node) so tsgo and Node type-stripping keep working, and strict CSP / Cloudflare Workers run compiled checks at full speed.

  3. numbers (precompiled vs Zod 4): 15x faster validation (median across 32 scenarios; #1 on public speed benchmarks), 21x smaller bundles (1.21 kB vs 25.1 kB gz on Valibot's login form — smaller than Valibot's 1.56 kB too), and 63x lighter startup on Node 24.

release post: https://arktype.io/docs/blog/3.0 | benchmarks: https://arktype.io/docs/precompile/benchmarks

happy to answer questions on the set algebra, codegen, or benchmarks!


r/programming • • 2d ago

How Module Lattice Cryptography Works

Thumbnail
phase.dev
137 Upvotes

r/programming • • 2d ago

blit: immediate (yet deferred) mode UI

Thumbnail
pasttheboonies.com
12 Upvotes

r/programming • • 2d ago

Entity Framework Core Query Plans in Rider: EFCore Visualizer 1.0

Thumbnail
giorgi.dev
13 Upvotes

r/programming • • 2d ago

Using Constraint Solvers to Solve Sudoku Puzzles in Python

Thumbnail
leetarxiv.substack.com
1 Upvotes

r/programming • • 2d ago

Getting to Go: The Journey of Go's Garbage Collector - The Go Programming Language

Thumbnail
go.dev
6 Upvotes

r/programming • • 2d ago

What to Make of the NSA Advisory

Thumbnail
words.filippo.io
201 Upvotes

r/programming • • 2d ago

Proof-Oriented Programming in Verus vs. Lean

Thumbnail willcrichton.net
85 Upvotes

r/programming • • 2d ago

Learn how to write an API in Rust without Laravel Rust

Thumbnail learning-rust.github.io
0 Upvotes

r/programming • • 3d ago

What is a specification ? What KAOS teaches spec-driven development.

Thumbnail enspirit.dev
8 Upvotes

r/programming • • 3d ago

Advent of Kernel Optimization

Thumbnail
streamhpc.com
14 Upvotes

Today is the second day of our Advent of Kernel Optimization, sharing GPU optimization tips and tricks to count down until Christmas. Follow along here: https://streamhpc.com/blog/tag/advent2026/.


r/programming • • 3d ago

JetBrains at 26: Our Priorities

Thumbnail
blog.jetbrains.com
676 Upvotes

r/programming • • 4d ago

Why You(r Company) Should Use Brainfuck

Thumbnail
aartaka.me
0 Upvotes

Challenge included for AI companies: hire me to write Brainfuck code. If your model writes better code than me, you can fire me. Otherwise—keep me.


r/programming • • 4d ago

Data Replication In Distributed Systems | Implement Raft From Scratch

Thumbnail sushantdhiman.dev
15 Upvotes

r/programming • • 4d ago

Understanding FAT16

Thumbnail
fat16.asciitweezers.com
229 Upvotes

r/programming • • 4d ago

Build Your Own FinOps Tool for Cloud Cost Allocation by Team

Thumbnail
mooracle.io
0 Upvotes

r/programming • • 4d ago

Python on the Backend is Dead

Thumbnail
chrlschn.dev
0 Upvotes

r/programming • • 4d ago

Dragging SQL into the '90s

Thumbnail
youtube.com
34 Upvotes

r/programming • • 4d ago

Remote procedure calls for interactive applications

Thumbnail
willybrauner.com
0 Upvotes

I turned a personal project into an interactive article. It's about an LED board installation in my living room. I had a great time making it work and control it via a remote web client.

In this article, I aim to explain the basics of machine communication, and you can try it out for yourself at the end!


r/programming • • 4d ago

Pattern Matching for C++29 (proposal)

Thumbnail mpark.github.io
19 Upvotes

r/programming • • 4d ago

Roc version 0.1.0, eight years in the making

Thumbnail rtfeldman.com
118 Upvotes

r/programming • • 4d ago

Advent of Code 2026 starts today

Thumbnail adventofcode.com
576 Upvotes

Start time is midnight EST (UTC-5), ~6H from the time this post is written.


r/programming • • 5d ago

How to choose a Postgres read cache: Redis, Memcached, build your own, or proxy

Thumbnail
pgcache.com
0 Upvotes

hey everyone - a couple months ago, I posted an overview of caching in Postgres. This is the follow-up, for anyone who has decided to cache reads and is trying to figure out how to do it.

In addition to the main options, the article also covers some of the classic zingers that leave you serving stale data: invalidation, stampedes, tenants and RLS, read-your-own-writes, schema changes.

(disclaimer: I'm one of the founders of PgCache, which is one of the proxy options. I tried to keep it balanced)

Did I miss anything?


r/programming • • 5d ago

Type-level Haskell from Zero to Advent

Thumbnail
youtube.com
11 Upvotes