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.
Professional help might be necessary.
I just want to amplify this point. As I was reading this, the LLMisms kept jumping out at me and each one felt like the author looking at me and deciding that my time spent reading this prose wasn't actually worth anything to them.
OP: I want YOUR thoughts, not the next token predictions of a gigantic pile of matrix multiplications. I want your awkward sentences, grammar mistakes, half-baked thoughts, self-doubt, silly jokes. I don't want this pile of grandiose mechanical slop completely devoid of humanity.
> 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?
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?
Imagine someone honestly interested in learning about category theory but not yet knowing where to start. Projects like this only serve to muddy the waters obscuring paths to actual learning and giving the impression that the subject is a joke.
I was exploring this as a means to solving the open source, or rather the github conundrum, the problem of sharing code socially is that we need a canonical source, and this is sociologically driven than performance driven, and as it turns out, have devastating consequences for FOSS funding. I wanted to explore sharing code "interchangeably" in some sense to avoid this problem, but ultimately this seems unsolveable, even with exploration by Unison etc.
1. Yon's documentation mentions "Homotopy type theory:"
> the runnable HoTT fragment is refl/pair/fst/snd
These are basic features of martin-lof type theory, not homotopy type theory. The documentation makes no reference of an interval type, which is generally the way to go for decidable type-checking in HoTT without univalence as an opaque axiom.
Pi types are mentioned, but Yon does not have dependent types. From what I can tell, they are polymorphic, maybe even just simply-typed (except for identity types under Pi). See here in the repo: https://github.com/yon-language/yon/blob/523e363a4a00e8da1410a2521b1d7d1309d360ce/frontend/ast.ml#L37
The datatype Ty only refers to other Ty's. Thus, it is not dependent. Terms cannot appear in types. Pi is explicitly indexed by a type defining its domain and codomain. A pi type is not a pi type if its codomain cannot depend on its domain.
2. Normalization can fail in Yon.
Yon's docs say that its universe of propositions has booleans (https://yon-lang.org/book/heyting-core?_highlight=prop). It also says its logic is intuitionistic (AKA, constructive). However, it also says the logical connectives on booleans are CLASSICAL. This implies law of excluded middle, which is NOT constructive without careful sandboxing (e.g., Linear logic). Yon dangerously allows propositions to be lifted to booleans. If I am interpreting correctly (docs are very vague), this means propositions can be lifted to terms. This causes an obvious failure of normalization due to assumed proof irrelevance (otherwise Prop would not be distinguished) (also see Coquand's paper on this https://arxiv.org/abs/1911.08174).
3. Yon's type definitional equality does not actually reduce types.
See here. This is the function used by the type-checker to check if types are equal. https://github.com/yon-language/yon/blob/523e363a4a00e8da141...
No reduction actually occurs, conveniently because none of the types actually contain terms (that is, it is simply typed). Yon claims to be dependently-typed. See this in the repo: https://github.com/yon-language/yon/blob/523e363a4a00e8da1410a2521b1d7d1309d360ce/frontend/ast.ml#L21
> Types in Yon Core kernel — the small dependent type theory used for the operational semantics.
Suppose I'm reading the source code wrong. Conveniently, the comment one line below reveals, once again, that the "type theory" is simply-typed:
> * T, U ::= Type_n universe of level n
> * | Pi(x:T). U dependent function
Pi types eliminate into a FIXED type that does not depend on x. This means there is also no purpose for having a universe hierarchy.
To confirm, I scoured the docs a bit for any examples using Pi types or Sigma types. I searched the docs, and could not find any, besides this example:
> world W { Code is X }> place Account in W { balance number }
> fun takes_sub(s: { a : Account where Pi(x: Account). Pi(y: Account). Id(Account, x, y) }): number { return 0 }
> fun main(): number { return 0 }
Notably, the identity is the only constructor for Ty indexed by a term. That is, Pi types can ONLY eliminate into the identity. What if I want my Pi type to eliminate into anything else living in Prop? e.g., an existential like \forall (x : Nat), \exists (y : Nat), x < y. Unfortunately impossible in Yon.
This project is clearly produced by AI, and clearly dangerously incorrect. Do not use this for anything serious.
So if you want to define a world, I expect you to tell me how to supply objects + morphisms + the composition law + the site structure. I don't know what a "semantic site" is, just what a "site" is. You'd need to define it. Anyway, we then get to our first examples of declaring worlds:
world Currency { Code is EUR, USD }
world Status { State is on, off }
This maybe gives me the first bit of data we need for a site. Definitely not the rest. Then we hit this world Sub subset of Currency
Two issues with this. One is stylistic. Why on earth would you call it a "subset"? It's not a set! "subworld" is the obvious choice... But the real issue is that like the initial definition, this doesn't tell me how to build `Sub`. I need to know which objects and morphisms of Currency to include into the category Sub? What's the site structure?So now I think, "OK, maybe you just declare part of the structure and fill it in later, before you actually use it..."
But then your example disproves that notion! You have
world Shop { Code is X }
place Account in Shop {
balance number
owner String
}
with no mention of Account when you declared Shop, I'm still not sure what Code or X are, and then you give what is seemingly supposed to be some working code fun main(): number {
be a holds new Account { balance 40 owner "ada" }
be _p holds String.print(a.owner)
return a.balance + 2
}
So your motivating example really kills off the interest from your two main communities that would use this thing: 1) category theorists have no idea what you're talking about, because nothing here looks like categories - there are no morphisms, no site structure 2) computer/software folks look at your example and think "why on earth would I learn topos theory to do something that sure looks like OOP"I think a "topos inspired programming language" would be kind of cool if you could pull it off, but I think you really need to figure out how to sell it in the docs to at least one of the two communities above.
Actually, that's in chapter 12; 11 is the standard library. Maybe the LLM got confused because the chapters are 0-indexed.
I was curious about that topic but it seems over my head. I don't think it works outside of mathematics? In programming, one can have two objects that are identical in both structure and value but have different identities. It's why lisp has eq, eql, equal, etc. How'd you get around that other than adding an identity property?
Also:
> A handle, what your variables actually hold for strings, sections, lists, trees, is that slot index, carried as an f64
Why does the handle need floating point?
> 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?
Please, I beg everyone, stop posting AI slop.
It's such a weird mixture of poetry and math that it's hard to tell what's going on. I suspect the author does not speak English as a first language (or at all?) and has used an LLM to generate this stuff.
The more I try to understand, the more it appears that they are a hash table (hash-addressed-structure to be pedantic), but with way more complicated backing than a hash table.
I don’t know if Yon does this (the documentation is gibberish) but it’s possible to use f64 NaNs to hold convenient metadata. I had a professor who wrote a bespoke teaching language (roughly based on Scheme) that did that.
Various priors inoculate me from feeling some of the rejection expressed in other comments. I knew Sammy Eilenberg, perhaps the most famous mathematician to work at Columbia University. He hired me. With friends, I ran into him one night out in NYC, and in his 70's we all stayed out past dawn. His late career focused on topos theory, and everyone in the building politely rolled their eyes. Those are working mathematicians having an understandable reaction; most reactions to topos theory here are simply uninformed. The evolution of programming languages has lead from the lambda calculus to many forms of category theory. Topos theory would not be a surprise.
The Leech lattice? Could be a brilliant idea. Compare Lenstra's elliptic curve factorization algorithm. Sometimes famous landmarks in mathematics have remarkable properties; mining them for algorithmic advantage is no different than mining asteroids for rare metals.
The involvement of AI is most problematic. Mathematics fears being swamped by mediocre AI-authored papers, but the truth is "publish or perish" has long lead to mathematics being swamped by mediocre papers. Bad artists are losing jobs, but good artists are working faster.
I welcome a new era of programming language design, where AI makes rapid prototyping a reality. We just have to take sharing this work with a grain of salt. Stop reading when you lose interest, but welcome the churn!
Nope, and I actually learned about application of category theory to programming language in university.
I tried to get an idea about the main points, and then stumbled over
> a thing is what you can observe of it. > > [...] > > Content addressing is extensionality made physical (chapter 11): two values indistinguishable by observation are not merely equal, they are the same slot
That only works in a category because you have enough (a countably or uncountably infinite number) functions that you can compose and "test" so you don't need (or don't care) about the "value" itself.
But on a real computer that doesn't work, because you can't go beyond a countable number, and even then you run into the halting problem pretty soon. So equality in this model is not computable. Which is sort of bad if you want to somehow store values "in the same slot" just based on observability. It might work for string literals, and even for concatenated strings, but not in general.
Picking some random lattice (a lattice is a partially ordered structure with some extra conditions) as a base of addressing doesn't help...
So yes, crackpot AI slop. The words sort of make sense, but there's nothing solid behind it, and as soon as you look at details it falls apart.
Can't help I've just been a HN lurker so far :)
What LLMs are doing now is allowing people to take prototypes and to publish them with an entire 200 page book no one (not even the author) has read, and a polished-looking website filled with marketing verbiage and a cute logo.
What would be interesting to me would be to see the process of rapidly refining the design, but I keep checking back on these "Here's my exciting new 400kLOC LLM language project I made in 3 weeks" and they all seem to die very shortly after the splashy announcements a few weeks later, as the author seemingly lost interest.
Which is not surprising because that's the way it always went with little languages -- writing a language has always been a marathon, not a sprint. It's just before, a 200 page book was an indicator of author dedication. Now, a 200 page book is just more bytes for digital kindling.
Understanding is important for readers. Demonstrating understanding is important for writers of both technical documentation and internet comments, and of critical importance in the era of AI.
The comment you're replying to explicitly says "This language looks interesting, but I don’t understand the concepts." so I'm not sure what you're trying to say. Their note about physics/metaphysics was about "someone [they] knew", not TFA.
The Topos of Programming
A topos-oriented programming language.
Native via MLIR & LLVMNo garbage collectorAGPL
The heap
Yon allocates into xleech2, a content-addressed heap whose geometry is the Leech lattice Λ24: exactly 196,560 slots per heap. Allocation hashes the bytes; identical content returns the existing slot, so same content ⇔ same slot. Equality of arbitrarily large values is one number comparison: O(1) structural equality, by construction.
String.equal: ~17 ns at 1 char and at 32,768 chars. Three orders of magnitude of size, the same per-comparison time.Benchmarks
hello.yon
fun main(): number { be greeting holds "ciao, mondo" // interned on the heap be _ holds String.print(greeting) return 0 }
$ yonc hello.yon -o hello && ./hellociao, mondo
Every string literal is a section of the builtin String place, interned on that same heap, so two equal strings are one slot, however they were built.
The paradigm
In Topos-Oriented Programming a world is a category, a place is an object in it, and a value is a section: immutable, identified by its content. All behaviour lives in arrows. Identity is the exception, requested only where you need it. Logic is internal: truth is the subobject classifier Ω, and unknown is a citizen of the Heyting core, not an error. From the Yoneda lemma, a thing is determined by its relations; the type checker, optimizer, and allocator act on that.
Read “Topos-Oriented Programming”
Execution model
Identity is explicit. Concurrency is the process. Failure is a value. The interface to a place is its arrows. Four mechanisms common elsewhere are absent:
Slots are stable for the life of the process; the heap grows with distinct content only.
The unit of concurrency is the process. Spaces talk over a shared-memory wire.
Failure is data: a place, a declaration, or a process exit, never a thrown stack.
Arrows are the interface: a place’s presheaf of observations.