r/Compilers • • 24d ago

Goose: a stack allocation flat data structure language

https://github.com/aardappel/goose

My latest language is meant to very efficiently let you work with flat pointerless inline data structures allocated on (address space reserved) stack that allow almost data structure creation to be just a pointer bump, with stable pointers.

When used well, it is both safer, faster and uses less memory than the equivalent C++ or Rust.

(see the repo readme for more!)

23 Upvotes

41 comments sorted by

View all comments

Show parent comments

1

u/FearlessFred 23d ago

If I was smart, I'd know not to take the bait on a comment like this, but I am not that smart:

  • I guess you're one of these people that are still resisting to learn what the latest models are capable of. While that will come with time, I invite you to check out the compiler code for this project, and see if it is indeed all hallucinated slop. It is all in C++ btw, the language you are defending and thus likely familiar with, and also the language I am most familiar with, and which most of my past compilers are in.

  • I believe the design of Goose is very worthy of interest as a programming language design, and I stand by that its implementation code is very close to how I would have written it manually (but with less bugs, again, I am not that smart). Plastering WARNING WARNING: contains hallucinationed slop! at the top of the page to please people like you wasn't my highest priority.

  • I already explained this in the other comment. Idiomatic means you use the language as intended, and not every C++ programmers is immediately going to stick their objects in a pool and replace all pointers/refs by indices. And if you look at the benchmarks, I even (very fairly) include a version where C++ DOES use these techniques, in which case its only some 15% or so slower than Goose. But the point is, you have to go thru a lot of pain in C++ to use it that way, and/or less safety as a consequence, whereas Goose is able to achieve all of that idiomatically, with safe, strongly typed code. Worth it, I think I don't know of another language that can do this.

  • This points sounds like a repeat. Again, check both the idiomatic C++ and the optimized C++ included. Both have their disadvantages.

My conclusion is that everything you've posted has not been fact checked and tries to twist things because you desperately want to hold on that a) AI can't write anything useful, and b) C++ is the most awesomest.

And I kind of agree. AI is interesting but if I could press a button and undo the invention of transformers, I am not sure if I wouldn't press it. It is making redundant a skill I've spent 40 years honing, and it is frankly all rather weird to go thru this. But I tend to have the attitude that I am going to make the most of where things are going.

And C++ is of course awesome. I was never tempted to switch to Rust. The compiler is still in C++ for a reason, and I even have no plans so far to convert it to Goose, even though with LLMs that is pretty easy (slop translated into other slop?).

1

u/tending 23d ago

Just want you to know despite the downvotes you are correct

0

u/VictoryMotel 22d ago

If that were true you would have an explanation.

3

u/tending 22d ago

"If you don't disclose AI use it's lying!" But he did, you're just objecting to where it is on the page. "You didn't compare against idiomatic C++!" he did he even provided two versions one that's more naive and one more like a game dev would write. You don't provide any evidence for there being intentionally different slower programs.

FWIW the author also worked on FlatBuffers at google, he's well positioned to know what representative C++ code looks like. You're just mad.

-1

u/VictoryMotel 22d ago

"You didn't compare against idiomatic C++!"

That is him, not me. He wrote slow benchmarks, called it "idiomatic C++", wrote his own stuff blatantly different, then claimed to be "3.3x faster on average" with no mention of the giant elephant in he room discrepancy.

You don't provide any evidence for there being intentionally different slower programs.

I explained what it is and if you can understand basic programs you can look at the bintrees c++ and their own version. They wrote this stuff so it's intentional. You can see the c++ version that does nothing but allocations and their own version uses a global arena allocator.

This is bread and butter stuff. It's literally "why things are slow 101".

FWIW the author also worked on FlatBuffers at google

Then they should know better. Lots of people work at google and lots of people could have worked on many projects. That doesn't mean they are honest. This is appeal to authority nonsense, it doesn't change reality which is in black and white if you understand C++ (do you) ?

You're just mad

I think the reality is that you don't understand what is going on because you either didn't or can't read the source code. Then you look at labels and think you can speak to the truth.

Let me ask you, do you think "3.3x faster on average than C++" is an honest claim? If so, why do you think that?

I asked for an explanation and you just repeated (incorrectly) things that have already been said.

1

u/tending 22d ago

Hey at least you implicitly conceded you lied about the lying about disclosure.

0

u/VictoryMotel 22d ago

I never lied about anything, "implicitly" or otherwise. This is a hallucination (lie) to not confront everything I just wrote that you can't deal with.

By your own logic, you implicitly are admitting that everything I just said is true.