frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

John Carmack on the Goose Language: multiple data stacks and relative references

https://twitter.com/ID_AA_Carmack/status/2113704269274636568
70•bobbydigitales•1h ago

Comments

bobbydigitales•1h ago
"That looks really neat! The automatic analysis and use of multiple data stacks and resizable fields takes it from "lots of work can be done this way" to "basically everything can be".

The relative references and built in binary structure validation also enable direct memory mapping of data structures and immediate use of network data. "Parsing" file and network data is often 100x slower than it needs to be." - John Carmack

mi_lk•1h ago
Obviously the guy is replying to something that you can't see without logging in twitter. And without context this means little
andsoitis•1h ago
> Obviously the guy is replying to something that you can't see without logging in twitter.

I could follow the link and read the thread and I don't have an X account.

You can also check out the language's website by googling "goose programming language", which should lead you to: https://aardappel.github.io/goose/index.html

mi_lk•1h ago
the rest of the thread yes but not the thread before
cosmotic•1h ago
The link to the github works. Everything else opens google play store page for twitter for me.
celsoazevedo•26m ago
The Twitter/X link doesn't show the full thread without a login. It also doesn't tell you that something is missing, so I guess it's normal for people to think they're seeing everything.

What X shows me: https://celsoazevedo.com/files/2026/x.webp

With a login/nitter: https://celsoazevedo.com/files/2026/nitter.webp

stefanos82•1h ago
Here you go https://xcopy.uk/ID_AA_Carmack/status/2113704269274636568
frangonf•1h ago
https://xxcancel.com/ID_AA_Carmack/status/211370426927463656...
AnEro•57m ago
Such a cool idea! I've been toying around making a few libraries to force languages to do that direct io zero-read mapping to data structures. Ofcourse this looks way better and infinity less hacky, but it is a fun and trippy experience to find someone working in the same direction as you independently.
Aardappel•52m ago
Btw I made the language, AMA. repo: https://github.com/aardappel/goose
vanderZwan•44m ago
If you had no other obligations and todos getting in the way, what's the first thing you'd rewrite in Goose yourself?

(And why isn't it Amiga E?)

Aardappel•11m ago
Most of my current Goose projects are games, not surprisingly, but I have some language/tooling ideas as well.

As for Amiga E, I am very proud of having made it way back when obviously, but it doesn't stack up against my more modern languages (Goose and Lobster), so I think I'll leave it be :)

fancyfredbot•35m ago
What happens if the memory is freed in a different order to allocation? Does the language disallow that? Or does it get allowed but mean the stack can't shrink?

How are you deciding how many stacks to use?

Aardappel•30m ago
The compiler automatically optimally allocates all arrays currently in scope that are able to grow to "stacks" (address spaced reserved areas).

The programmer choose what to store where, so you typically store things in arrays by lifetime. Goose gives you many more tools to do that, it can store entire variable sized trees of an enum type in a single array.

You try to avoid having to deallocate in mixed/random order, but if you absolutely must, you can turn arrays into pools, basically.

geoffbp•51m ago
No relation to https://goose-docs.ai/ I guess?
ebiederm•18m ago
I seem to remember the ML guys went down this route. I believe they called it regions.

From what little I read in the literature I seem to recall that there were enough programs with quite a bit more memory usage that they decided this approach was a dead end.

Does anyone know anymore details?

Aardappel•14m ago
Yes, ML Kit region inference is probably the closest prior art to Goose.

Back then though, they couldn't lean on large 64-bit address spaces like Goose can. They implemented all of this with a chain of blocks of memory instead, and tracked most of it at runtime that Goose now does at compile time.

https://github.com/aardappel/goose/blob/master/docs/design/p...

fancyfredbot•4m ago
Thanks!

I'm a bit confused about how you could decide the number of stacks at compile time. I can see you could see how many arrays are lexically in scope but as soon as my code put s one dynamic array inside another the total number of dynamic arrays it's only discoverable at runtime?

AnEro•33m ago
You noted AI creating a large amount of this code base with yourself directing it. Do you have a process that keeps you sane while doing this over such a large codebase?(especially for a brand new concept and implementation) [Obviously congrats and can't wait to read through to have deeper questions!]
Aardappel•21m ago
A big part of this making it base the code of this new compiler on my previous compiler for the Lobster Programming Language. I had it go thru that codebase, distill an elaborate code style guide from it, and used that to make it write the new code pass by pass in that style. That made me feel "at home" as if it is my code, easier to review etc, and easier to know we're going in the right direction by seeing similar structure to my past compiler work.

Once the initial compiler was there it became easier, as Fable is rather good of working within the context of what is already there.

ksec•32m ago
First, Congrats on the release!

Do you know if Goose is the first time something like this has been done?

Aardappel•27m ago
In this particular combination, most certainly.

There is lots of prior art on the individual parts of the design, e.g. "regions" and various stack languages etc, see: https://github.com/aardappel/goose/blob/master/docs/design/p...

Part of this is that 64-bit address spaces make this design practical, and almost all languages in use today were designed with the limitations of 32-bit in mind. Once you can assign arrays huge amounts of address space, you don't have to realloc, which gets you stable pointers, and a lot of the other Goose features.

amelius•28m ago
Is this like forcing the escape analysis of the compiler to be perfect, by making it explicit in the programming language?

I'm wondering what kind of architectural corners this forces the programmer into ... have you found any so far?

Aardappel•25m ago
Yes, the compiler guarantees references to data structures can't escape. I believe it does that "perfectly" :)

It certainly requires the programmer to rethink how they structure their data, as you have to think of where it is going to be stored, and how to store it in a way such that it will have similar lifetimes to what it is stored with, to get the most out of the language.

koolba•22m ago
What does this mean (from your link):

> Nested data stays inline. A string, an array of strings, a record with variable-size fields and an array of those records are each one contiguous block with no pointer in it. A record that is 160 bytes and an allocation in C++ is 29 bytes and none in Goose.

I’m having trouble parsing that last sentence.

lynndotpy•18m ago
I parsed it as "A record that is ((160 bytes and an allocation) in C++) is ((29 bytes and none) in Goose)."

So, I read it as, "C++ uses 160 bytes and an allocation, when Goose requires 29 bytes and no allocation".

Aardappel•18m ago
It means that to do variable sized things like vectors and strings, C++ often ends up having to allocate their contents dynamically. Which results in data structures with lots of 64-bit pointers over multiple allocations.

Even Rust's "enum" feature, which can store different sized things all in the same space, does that at the cost of the smallest variant being just as big as the biggest.

Goose can do all of that not only inline (no pointers), but with variable size, meaning small items take less space. It's like a serialized data representation, but iterable. It makes for big space savings vs these languages.

koolba•14m ago
These AI generated docs would make more sense if you instruct it to not include numbers unless they form a complete example.
eslaught•5m ago
As far as I can tell, you're essentially creating a new stack for every dynamically-sized variable (because otherwise nothing would be able to grow by bump allocation without moving). But this means you're creating a separate virtual memory allocation for each of these objects, which (I presume?) then rounds the size up to the OS's minimum page size (4KiB or similar).

Doesn't that waste a lot of space? Or is there something I'm missing?

Also it would seem to force every allocation to go through the OS kernel to allocate unless there's some trick to avoid that.

lemming•12m ago
Do you consider Goose to be a replacement for Lobster, or do they fill different niches?
Aardappel•4m ago
I think they have slightly different places on the "speed vs ease of use" pareto frontier.

With Goose, the core design favors speed over everything else. Though not only was I able to make that safe, it is fairly pleasant to use. But it remains a low level systems language that requires you to think hard about data organization.

Lobster is a waaay more high level language made to be pleasant to use first, fast second. Surprisingly though, it can get pretty close in speed to C++/Rust nowadays too, but still a lot slower than Goose.

nextaccountic•9m ago
> Threads that share nothing. A worker is compiled as a separate program with its own memory, and flat values cross typed queues as a memcpy. Data races, locks, atomics and memory orderings do not exist in the language.

how to perform this copy without atomics?

do the workers run as threads or processes?

also you claim it's faster than rust and c++. but for certain kinds of software it's certainly (and substantially) slower, right?

No Signs of AI Payoff Outside the Tech Sector

https://www.apollo.com/wealth/insights-news/insights/daily-spark/no-signs-of-ai-payoff-outside-th...
163•the-mitr•1h ago•115 comments

The Goose Programming Language

https://aardappel.github.io/goose/
74•andsoitis•1h ago•26 comments

Roku developer repositories moved from GitHub to GitLab

https://blog.roku.com/developer/gitlab-move
200•cxr•4h ago•136 comments

Listen and read USA nuclear forces Emergency Action Messages, heard on 11175 kHz

https://missileer.watch
37•liotier•1h ago•18 comments

John Carmack on the Goose Language: multiple data stacks and relative references

https://twitter.com/ID_AA_Carmack/status/2113704269274636568
72•bobbydigitales•1h ago•34 comments

Dream-1

https://dreamlabs.ai/research/dream-1/
95•GaggiX•2h ago•54 comments

The St. Helena 5 pence coin shows Jonathan, a roughly 190 year old tortoise

https://de.numista.com/9866
68•schleck8•4h ago•14 comments

FreeDNS

https://freedns.afraid.org/
200•esher•5h ago•54 comments

Neural chip decodes interactions between brain regions

https://actu.epfl.ch/news/neural-chip-decodes-interactions-between-brain-r-2/
69•giuliomagnifico•4h ago•18 comments

Danish Government silently drops plan to dump MS Office

https://www.computerworld.dk/art/297226/digitaliseringsministeriet-har-i-al-stilhed-droppet-stort...
112•lowkeyokay•2h ago•55 comments

I don't understand quantum physics (2018)

https://www.southampton.ac.uk/~doug/quantum_physics/index.html
238•rramadass•10h ago•179 comments

OBS Studio 33

https://github.com/obsproject/obs-studio/releases/tag/33.0.0
416•pentagrama•15h ago•148 comments

Node2Shell evolves to HTTP2Shell, blast radius affects many HTTP libs and apps

https://www.aikido.dev/blog/python-packages-vulnerable-node2shell-brotli-cve-2026-111497
240•theanonymousone•12h ago•122 comments

Symbolic Learning in Python and Julia

https://github.com/astroautomata/PySR
28•alex_hirner•4d ago•4 comments

Zac-OS-9: The classic Platinum desktop, reborn for modern PCs

https://sourceforge.net/projects/zac-os-9/
26•felixding•2d ago•14 comments

Physicists trap a single antimatter particle for a month

https://www.scientificamerican.com/article/physicists-trap-a-single-antimatter-particle-for-a-month/
253•mooreds•3d ago•74 comments

GPU-unlock: FP/BF16 instruction issue rate on Nvidia 3000's cards

https://github.com/Zagitta/gpu-unlock
138•fragebogen•10h ago•50 comments

TornadoVM 7 Enables GPU-Native Workloads from Java Applications

https://www.infoq.com/news/2026/10/tornadovm-7-gpu/
79•pjmlp•2d ago•13 comments

Why is AI generated language so hard to understand?

https://arxiv.org/abs/2610.29162
87•canjobear•2h ago•74 comments

PHP Foundation 'under-funded' with one full-time staff member, director says

https://www.reuters.com/technology/php-foundation-under-funded-with-one-full-time-staff-member-di...
75•firesteelrain•1h ago•28 comments

Local Wikipedia: Wikipedia, but only for things a half hour walk from you

https://edjefferson.com/localwiki/
1516•sohkamyung•1d ago•240 comments

Twelve years of distributed SQLite

https://philipotoole.com/twelve-years-of-distributed-sqlite/
347•otoolep•19h ago•54 comments

Apple Music 404 Not Found

https://music.apple.com/this-url-doesnt-exist
904•frizlab•1d ago•265 comments

Oai-math-revised: a community hub for revising OpenAI's math write-ups

https://terrytao.wordpress.com/2026/10/24/oai-math-revised-a-community-hub-for-revising-openais-m...
21•tokepi•5h ago•16 comments

Cecilia Berdichevsky, Clementina expert (1961)

https://en.wikipedia.org/wiki/Cecilia_Berdichevsky
23•fedecaccia•3d ago•1 comments

Tiling Noise – Procedural GPU Patterns

https://catlikecoding.com/godot/procedural-gpu-patterns/09-tiling-noise/
55•ibobev•3d ago•1 comments

How close can pure functional programming get to C?

https://rtfeldman.com/fp-vs-c
237•stmonty•17h ago•74 comments

Bringing uv and ty together

https://astral.sh/blog/uv-ty-integration
279•Ravencentric•3d ago•92 comments

A practical guide to AI image generation, from diffusion to agents

https://danielball.com/notes/ai_image_generation.html
231•westsmith•4d ago•72 comments

Dessa: Conversation Model trained only on speech

https://block.xyz/dessa
492•dsr12•1d ago•185 comments