frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Yon – a topos-oriented language with a content-addressed lattice heap

https://yon-lang.org/
25•amenn•2d ago
Hello everyone. In the last two years I spent, as a dev, part of my free time stretching the limits of my knowledge. Not being a mathematician myself, I discovered that formalizing concepts in mathematical language could nonetheless be useful to improve symbolic reasoning about the concepts themselves. I made use of both books and AI, and I followed the development of the latter, mainly with a critical eye. I have several open projects, and from some observations and explorations on one of them I started asking myself what the current limits of reasoning, of logic, of mathematics itself are. So I explored categories, and topoi, above all starting from Mazzola's theory of music. I asked myself whether this could influence type theory in programming, and I ran some experiments. Out of this came this programming language, Yon, inspired by Yoneda and by morphisms. From another project I drew observations on the Leech lattice; from yet another, some experiments with mmap and coordinate-based allocation in a structure that would be advantageous, again, in a topological sense. The language certainly has mistakes here and there and I wrote the documentation in a hurry; the work took 3 weeks in total. It compiles to LLVM for performance reasons, and for now I preferred to avoid a VM and a GC. It contains unusual data structures that turn out to be performant. It's worth a look, and I hope it will win some converts, and that someone will want to help me with its development. I'd love for it to bring fresh stimuli to programming and maybe open a few new frontiers. A few concrete details, for those who want to look under the hood. The compiler is a real pipeline, not an interpreter: an OCaml frontend takes .yon source into a custom MLIR dialect I called "topos", where the categorical constructs live as first-class operations; its lowering passes take everything down to LLVM IR and from there to a native executable. A single command, yonc, drives the whole chain, and you can stop at any intermediate stage to see what a categorical construct actually becomes on its way to silicon. The runtime is where the Leech lattice observations ended up. The heap is content-addressed over Λ₂₄: every value is mapped to a lattice point and canonicalized under the Conway group Co₀ (via libmmgroup), so the same content always lives at the same address. That buys three things I would now find hard to give up: equality is a single machine comparison no matter how big the value is (string equality benches flat at ~17 ns up to 32,768-character strings, because it compares handles, never bytes); deduplication is global and automatic, with no interning logic in user code; and giving up the GC stopped being a renunciation, since cells are immutable and content-addressed, so there is nothing to trace and nothing to move. Concurrency I kept deliberately simple-minded: no threads, no shared mutable state. A program splits into isolated "Spaces" (separate processes, isolation enforced by the MMU) that talk over shared-memory channels with explicit failure semantics. About what is verified and what is just hope: the ground truth is a regression suite of 112 examples plus a cross-Space scenario suite, with exit codes identical on Linux x86-64 and macOS Apple Silicon (Intel Macs: untested). The book on the site, 21 chapters plus appendices, had every snippet compiled and run before being written down. The benchmarks appendix declares its environment and method; I tried not to publish any number without one. The limits of 1.0 are written down as well, in a baseline document that lists every fixed pool (256 heaps per chain, 64 Spaces, 16 concurrent RPC sessions, and so on), with the rationale that a hard limit that fails loudly is a specification, while a soft limit that degrades silently is a bug. For the license I went with the GCC model: compiler and toolchain are AGPLv3, the runtime is AGPLv3 with an explicit linking exception, so the language itself stays free, and the programs you write in it are entirely yours, under any license you choose.

Site + book: https://yon-lang.org Repo: https://github.com/yon-language/yon (tag v1.0.0)

Happy to answer anything: the topos dialect, why a lattice rather than a hash, what the categorical constructs lower to, what broke along the way.

Comments

mccoyb•1h ago
I'm not sure where or how to convey this, because I've seen several of these languages designed with AI, documentation created using AI, etc -- posted on Hacker News in the last months or so, and I've responded to each one with roughly the same feedback (and I'm assuming good faith: that the intent is that the poster wishes to grow as a language designer).

Your audience, or whoever you aim your work at, should be treated with respect. Otherwise, why should they give you the time of day? Why would you expect them to respond positively to effort alone when effort (in code and in shit prose) is extremely cheap right now? Their time is not cheap ...

When I read the documentation, and it is extremely clear that you haven't taken the time to clarify your ideas, when much of it is LLM prose, when much of the content introduces highfalutin ideas without motivation, blending categorical concepts (which, by the way, should never be mixed with vague prose claims about the language), violating my reader context model, preventing me from understanding what problem exactly your language design is solving (where is that problem stated clearly?), it is a waste of my time.

> The work took 3 weeks in total ... it's worth a look, and I hope it will win some converts, and that someone will want to help me with its development.

You've gone too fast, too much is vague, nothing is clear.

I'd delete everything, start over, and try and explain just one of the ideas clearly. Seriously. This sounds harsh, but it's honestly the correct approach to something as subtle and nuanced as programming language design.

jrmg•1h ago
Just a comment: this sounds a lot like when someone I knew mildly succumbed to AI psychosis, and thought he, with Gemini, had made some physics/metaphysics breakthrough. If you’re losing sleep and feeling distressed or euphoric, maybe lay off for a few days, no matter how hard that is. Talk to friends and/or family about unimportant things. Get outside for a while. Go back to old hobbies (reading, hiking, just going to coffee shops or thrift stores - whatever) and then reassess.

This language looks interesting, but I don’t understand the concepts. Does this stuff make sense to other people?

The heap is content-addressed over Λ₂₄: every value is mapped to a lattice point and canonicalized under the Conway group Co₀ (via libmmgroup), so the same content always lives at the same address.

What is ‘Λ₂₄’? What is a ‘lattice point’?

giving up the GC stopped being a renunciation, since cells are immutable and content-addressed, so there is nothing to trace and nothing to move

This kind of sounds like you’re saying that there’s nothing to free, which implies that nothing takes up memory, which I presume is not the case. Do you mean everything is immutable and content-addressed (like Git)? Doesn’t stuff still need to be freed somehow when the programs done with it, otherwise memory will grow for ever?

wavemode•59m ago
> No garbage collector

> Slots are stable for the life of the process; the heap grows with distinct content only.

So how is a program supposed to handle lots of unique content? Like a web server handling user requests?

skrebbel•29m ago
I apologize, you’re absolutely right!
cjs_ac•57m ago
The documentation is a work of art. Every time I try to work out what just one of the unexplained ideas is, it just introduces new unexplained ideas. I don't know where these ideas came from, how they fit together, or why putting them together is useful. I certainly don't know why I would want to write a program in this language, as opposed to any other language I already know.
skrebbel•31m ago
Sibling comment suggests maybe it’s AI psychosis and that would clarify a lot.
esafak•39m ago
Could you name a few languages you had in mind while developing this, their respective problems, and how your language improves them, feature by feature?

> Yon allocates into xleech2, a content-addressed heap whose geometry is the Leech lattice Λ24: exactly 196,560 slots per heap.

What is the computational complexity of memory allocation into this Leech lattice? What applications did you have in mind where making allocation a maths problem in order to save time on comparisons makes sense? What is going to happen when a program exhausts your little heap?

iterateoften•16m ago
I noticed since 5.5 GPT has been adding "lattice" to a lot of things. Not sure if it is the new Gremlins.
drob518•14m ago
The buzzwords are strong in this one.

LLMs are eroding my software engineering career and I don't know what to do

https://human-in-the-loop.bearblog.dev/llms-are-eroding-my-software-engineering-career-and-i-dont...
293•poisonfountain•1h ago•210 comments

Anthropic, please ship an official Claude Desktop for Linux

https://github.com/anthropics/claude-code/issues/65697
116•predkambrij•1h ago•50 comments

The 29th International Obfuscated C Code Contest (IOCCC) 2025 Winners

https://www.ioccc.org/2025/
270•matt_d•8h ago•64 comments

Yon – a topos-oriented language with a content-addressed lattice heap

https://yon-lang.org/
26•amenn•2d ago•10 comments

Win16 Memory Management

http://www.os2museum.com/wp/win16-memory-management/
88•supermatou•2d ago•44 comments

Speculative KV coding: losslessly compressing KV cache by up to ~4×

https://fergusfinn.com/blog/kv-entropy-coder/
99•kkm•2d ago•15 comments

Show HN: Kyushu – A self-hostable WASM sandbox for JavaScript workers

https://kyushu.dev/
18•le_chuck•7h ago•14 comments

Show HN: Lathe – Use LLMs to learn a new domain, not skip past it

https://github.com/devenjarvis/lathe
20•devenjarvis•3h ago•1 comments

My Software North Star

https://kristoff.it/blog/north-star/
141•kristoff_it•3d ago•79 comments

How Long Does It Take for a QQuickItem to Become Visible?

https://www.kdab.com/how-long-does-it-take-for-an-item-to-become-visible/
12•jandeboevrie•2d ago•0 comments

Public Domain Image Archive

https://pdimagearchive.org/
174•davidbarker•14h ago•26 comments

9 Mothers (YC P26) Is Hiring

https://9mothers.com/careers
1•ukd1•2h ago

Field of clones: How horse replicas came to dominate polo

https://knowablemagazine.org/content/article/technology/2026/cloned-polo-horses
122•gscott•12h ago•54 comments

Ntsc-rs – open-source video emulation of analog TV and VHS artifacts

https://ntsc.rs/
372•gregsadetsky•19h ago•112 comments

Valve P2P networking broken for more than 2 months

https://github.com/ValveSoftware/GameNetworkingSockets/issues/398
217•babuskov•11h ago•103 comments

The Secret Life of Circuits with lcamtuf / Michał Zalewski (Audio Interview)

https://theamphour.com/725-the-secret-life-of-circuits-with-lcamtuf-michal-zalewski/
25•ChrisGammell•3d ago•4 comments

Symbolica 2.0: Programmable Symbols for Python and Rust

https://symbolica.io/posts/symbolica_2_0_release/
108•mmastrac•1d ago•10 comments

Tokenomics: Quantifying Where Tokens Are Used in Agentic Software Engineering

https://arxiv.org/abs/2601.14470
132•Anon84•13h ago•57 comments

Warren's Abstract Machine: A Tutorial Reconstruction

https://github.com/a-yiorgos/wambook
27•nextos•1d ago•4 comments

The best relationships are all-encompassing.

https://andys.blog/the-best-relationships/
11•andytratt•2h ago•3 comments

Netlify CTO Dana Lawson: Writing code is no longer the job

https://thenewstack.io/netlify-agent-experience-engineers/
7•Brajeshwar•31m ago•5 comments

Harness engineering: Leveraging Codex in an agent-first world

https://openai.com/index/harness-engineering/
251•pramodbiligiri•1d ago•165 comments

Biohub releases a world model of protein biology

https://biohub.org/news/world-model-of-protein-biology/
114•gmays•3d ago•17 comments

How Liminalism Became the Defining Aesthetic of Our Time

https://hyperallergic.com/how-liminalism-became-the-defining-aesthetic-of-our-time/
110•zeech•12h ago•62 comments

Moving beyond fork() + exec()

https://lwn.net/SubscriberLink/1076018/16f01bbbb8e0d1f0/
324•jwilk•1d ago•311 comments

Introducing Boron Buckyballs: Theory that B80 cages can’t be made is disproved

https://cen.acs.org/materials/nanomaterials/buckyballs-boron-buckminster-fullerene-nanomaterials/...
105•crescit_eundo•2d ago•29 comments

Efficient and Training-Free Single-Image Diffusion Models

https://arxiv.org/abs/2606.04299
20•yorwba•5h ago•0 comments

Arithmetic Without Numbers – How LLMs Do Math

https://alvaro-videla.com/llm-arithmetic-internals/article_interactive/article.html
59•old_sound•2d ago•16 comments

Nvidia is proposing a beast of a CPU system for Windows PCs

https://twitter.com/lemire/status/2062880075117113739
309•tosh•1d ago•501 comments

Scientists ejected from diabetes conference for distributing journal reprints

https://arstechnica.com/science/2026/06/scientists-ejected-from-diabetes-conference-for-distribut...
234•BerislavLopac•4h ago•158 comments