HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
bneb
lattice
C++2026–2026
bneb / lattice · Archived

lattice

ARCHIVED — split into 6 standalone repos. See README for links.

3Distinct people
5Mentions
0Explicit recommenders
128GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

ARCHIVED — split into 6 standalone repos. See README for links.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by 3-hour interval5 dated mentions

Observed mentions: 2026-07-01 17:05:29 UTC to 2026-07-04 18:57:02 UTC.

012026-07-01 15:00:00 UTC to 2026-07-01 18:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 1, 15:002026-07-01 18:00:00 UTC to 2026-07-01 21:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-07-01 21:00:00 UTC to 2026-07-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-02 00:00:00 UTC to 2026-07-02 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-02 03:00:00 UTC to 2026-07-02 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-02 06:00:00 UTC to 2026-07-02 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-02 09:00:00 UTC to 2026-07-02 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-02 12:00:00 UTC to 2026-07-02 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-02 15:00:00 UTC to 2026-07-02 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-02 18:00:00 UTC to 2026-07-02 21:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-07-02 21:00:00 UTC to 2026-07-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-03 00:00:00 UTC to 2026-07-03 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-03 03:00:00 UTC to 2026-07-03 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJul 3, 03:002026-07-03 06:00:00 UTC to 2026-07-03 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-03 09:00:00 UTC to 2026-07-03 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-03 12:00:00 UTC to 2026-07-03 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-03 15:00:00 UTC to 2026-07-03 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-03 18:00:00 UTC to 2026-07-03 21:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-07-03 21:00:00 UTC to 2026-07-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-04 00:00:00 UTC to 2026-07-04 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-04 03:00:00 UTC to 2026-07-04 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-04 06:00:00 UTC to 2026-07-04 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-04 09:00:00 UTC to 2026-07-04 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-04 12:00:00 UTC to 2026-07-04 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-04 15:00:00 UTC to 2026-07-04 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-04 18:00:00 UTC to 2026-07-04 21:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 4, 18:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jul 1, 15:002026-07-01 15:00:00 UTC2026-07-01 18:00:00 UTC101
Jul 1, 18:002026-07-01 18:00:00 UTC2026-07-01 21:00:00 UTC101
Jul 1, 21:002026-07-01 21:00:00 UTC2026-07-02 00:00:00 UTC000
Jul 2, 00:002026-07-02 00:00:00 UTC2026-07-02 03:00:00 UTC000
Jul 2, 03:002026-07-02 03:00:00 UTC2026-07-02 06:00:00 UTC000
Jul 2, 06:002026-07-02 06:00:00 UTC2026-07-02 09:00:00 UTC000
Jul 2, 09:002026-07-02 09:00:00 UTC2026-07-02 12:00:00 UTC000
Jul 2, 12:002026-07-02 12:00:00 UTC2026-07-02 15:00:00 UTC000
Jul 2, 15:002026-07-02 15:00:00 UTC2026-07-02 18:00:00 UTC000
Jul 2, 18:002026-07-02 18:00:00 UTC2026-07-02 21:00:00 UTC101
Jul 2, 21:002026-07-02 21:00:00 UTC2026-07-03 00:00:00 UTC000
Jul 3, 00:002026-07-03 00:00:00 UTC2026-07-03 03:00:00 UTC000
Jul 3, 03:002026-07-03 03:00:00 UTC2026-07-03 06:00:00 UTC000
Jul 3, 06:002026-07-03 06:00:00 UTC2026-07-03 09:00:00 UTC000
Jul 3, 09:002026-07-03 09:00:00 UTC2026-07-03 12:00:00 UTC000
Jul 3, 12:002026-07-03 12:00:00 UTC2026-07-03 15:00:00 UTC000
Jul 3, 15:002026-07-03 15:00:00 UTC2026-07-03 18:00:00 UTC000
Jul 3, 18:002026-07-03 18:00:00 UTC2026-07-03 21:00:00 UTC101
Jul 3, 21:002026-07-03 21:00:00 UTC2026-07-04 00:00:00 UTC000
Jul 4, 00:002026-07-04 00:00:00 UTC2026-07-04 03:00:00 UTC000
Jul 4, 03:002026-07-04 03:00:00 UTC2026-07-04 06:00:00 UTC000
Jul 4, 06:002026-07-04 06:00:00 UTC2026-07-04 09:00:00 UTC000
Jul 4, 09:002026-07-04 09:00:00 UTC2026-07-04 12:00:00 UTC000
Jul 4, 12:002026-07-04 12:00:00 UTC2026-07-04 15:00:00 UTC000
Jul 4, 15:002026-07-04 15:00:00 UTC2026-07-04 18:00:00 UTC000
Jul 4, 18:002026-07-04 18:00:00 UTC2026-07-04 21:00:00 UTC101

What Hacker News says

5 sources
Agree with your overall point. I made some changes to extend the current paradigm a bit: https://github.com/bneb/lattice/blob/main/docs/tutorial/09-c... --- Invariants aren't always inferred automatically. When they aren't, they can be made explicit for Z3 to check. At the moment, bubble sort with array-content invariants is fully provable: fn bubble_sort(arr: Ptr<i32>, n: i64) requires n > 0 ensures forall i in 0..(n-1) => arr[i] <= arr[i+1] { for i in 0..n { invariant forall k in 0..(i-1) => arr[k] <= arr[k+1]; // bubble pass } } Z3 proves the base case (vacuously true at i=0) and the inductive step for each iteration. Both loops have fixed trip counts regardless of data, so the frame axioms are concrete. At concrete sizes the compiler unrolls the loop: for i in 0..4 produces 8 Z3 check
Read the rest
s (4 iterations × 2), all proven at compile time, outputting Z3: 8/8 checks proven (100%), 0 deferred to runtime. And insertion sort is partially provable: This starts with the same `forall` invariant structure. After the base case, the outer for-loop inductive step is wired but the inner while-loop's trip count depends on the data which can't be determined statically for which indices were modified, so the frame axioms can't fully constrain the array state. This would require splitting on the case for the while condition, which is future work, and wasn't part of my v1.0.0 plans.
In Show HN: Salt – a systems language with Z3 theorem proving in the compiler
I was confused by the matrix multiply example since it doesn't show requires clauses. So I looked at what is presumably the source I'm supposed to look at: https://github.com/bneb/lattice/blob/main/basalt/src/kernels... There's a comment saying every function in that file has requires clauses, but... They don't? Also, the actual implementation of matrix multiply is manually tiled, while the website boasts about automatic loop tiling. It's hard to know what to trust here.
In Show HN: Salt – a systems language with Z3 theorem proving in the compiler
This looks pretty impressive but it’s all AI-generated (or written in a similar style) and therefore the documentation is lacking. There is a language specification [1][2] but it lacks coherence. I think the way to improve it would be to try to teach this language to people and get feedback from them. That is, it needs beta testers. It looks like there’s no community of users yet? [1] https://github.com/bneb/lattice/blob/main/docs/SPEC.md [2] https://github.com/bneb/lattice/blob/main/SYNTAX.md
In Show HN: Salt – a systems language with Z3 theorem proving in the compiler
Salt is a systems programming language that embeds the Z3 SMT solver in the compiler. You add `requires` and `ensures` clauses to functions, and the compiler proves them at compile time. When Z3 succeeds, the check is elided (zero instructions emitted). When it fails, you get a counterexample. When it times out (100ms limit per obligation), the check is skipped and counted. It compiles through MLIR to LLVM and targets KeuOS, a microkernel with an ECS (Entity Component System) architecture. Both are MIT-licensed. --- How it works Call `safe_div(x, 7)` and Z3 proves `7 != 0`. Check elided. Call `safe_div(x, 0)` and the compiler stops. The key difference from Rust/Zig/C: the compiler calls Z3 during normal compilation. No separate verification tool, no annotation language, no proof assistant. The contract syntax is part of the language. ---
Read the rest
What's real - Compiler: 1,752 unit tests passing, clippy clean. Compiles through MLIR to LLVM IR. x86-64 and ARM64 backends. - Kernel: 14/14 QEMU e2e tests pass. TCP stack (connect/send/recv/close), ICMP, deterministic builds. NetD (network daemon) runs as a Ring 3 process on SPSC shared memory rings. - ECS architecture: 13 entity syscalls (402-413). Entity lifecycle (spawn/exit/wait), memory regions as entities (map/brk/alloc), I/O routing via capabilities, socket entity tracking, performance counters, world persistence diagnostics. - Shell: Inline `ecs`, `ps_ecs`, `free_ecs` commands query ECS World without spawning child processes. - Benchmarks: Salt vs C (`clang -O3`) on 21 algorithm benchmarks. Salt at parity or faster on 19/21. Allocation-heavy workloads (hashmap, LRU, buffered writer) see 2-10x wins from arena allocation. Compute-bound (matmul, sieve, fib) at 0.9-1.0x of C. - LSP: VS Code extension ships with semantic tokens, go-to-def, find-refs, Z3 hover. --- What's not done (research-quality, not production) - The standard library is incomplete. Many things you'd expect are missing. - Z3 handles integer arithmetic, bit-vectors, and reals. String and quantifier support is partial. Contracts outside Z3's reach are compile-time checked where possible, silently skipped otherwise. - Error messages from the Z3 pass can be opaque. - The kernel targets QEMU (x86-64). Tested on AWS bare metal instances, not local 'bare metal' yet. - One nights-and-weekends developer. --- Why this exists The goal was to find out whether formal verification could be a compiler feature rather than a separate toolchain. The benchmarks say the compiler is fast enough (Lettuce compiles in under a second with contracts enabled). The kernel contracts catch real bugs. But the language hasn't been used by anyone outside the project, and that's the test that matters. --- Links - Source: https://github.com/bneb/lattice) - Tutorial: https://github.com/bneb/lattice/blob/main/docs/tutorial/your... - Architecture: https://github.com/bneb/lattice/blob/main/docs/ARCH.md - Benchmarks: https://github.com/bneb/lattice/blob/main/benchmarks/BENCHMA...
In Show HN: Salt – a systems language with Z3 theorem proving in the compiler

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.