Hacker News
Marmot, an Alternative Go Compiler
RamblingCTO
|next
[-]
skybrian
|root
|parent
|next
[-]
tgv
|root
|parent
|next
|previous
[-]
netvarun
|root
|parent
[-]
christophberger
|root
|parent
|previous
[-]
Edited to add: If you mean that the site and code look bot-written but you miss a disclosure that clarifies the bots' involvement, I tend to agree.
Avshalom
|root
|parent
|next
[-]
Someone
|root
|parent
[-]
You can compare how its output behaves compared to that of the ‘official’ compiler.
> It should output identical binaries for identical input
Not necessarily, and it’s surprisingly hard to make that happen in modern compilers. Outputs may contain timestamps, file paths, padding inside constant structs may be different, multi-threading in compiler or linker may reorder objects (https://en.wikipedia.org/wiki/Reproducible_builds).
> Reflections on Trusting Trust and the underhanded c contest, trusting google not to write backdoors into your binary is a little different than trusting anyone with a claude subscription
If you compile this compiler multiple times, sometimes with the ‘official’ go compiler, I don’t think that will be a problem. Having non-hidden back doors that are hard to find due to the size of the code, however, can be a problem.
nijave
|root
|parent
[-]
Sure but that's a fairly hard problem. Even fairly straight forward things can have millions of combinations of inputs/state. It may be tractable to cover normal program behaviour but a compiler could do something screwy like use a syscall wrong such that it, say, deletes the wrong file with certain inputs.
taklimakan
|root
|parent
|previous
[-]
XorNot
|root
|parent
[-]
The biggest problem with a project being rapidly Claude'd is it simply doesn't have the actual time needed for the design to settle and prove out, at this point.
rendaw
|next
|previous
[-]
Doesn't the go compiler produce machine code?
onlyrealcuzzo
|root
|parent
|next
[-]
If you want to skirt that, Go is not a particularly great language.
And if you're skirting it, you are almost certainly getting something worse in the process.
If it could be done better, Go would do it better. It's not built by morons.
3eb7988a1663
|root
|parent
[-]
One of the deliberate trade-offs made is to compile fast, rather than do more sophisticated analyses that might eek out incrementally better machine code.
sva_
|next
|previous
[-]
YuechenLi
|next
|previous
[-]
The bigger issue is that Marmot implements it's own Go runtime as well, including GC, channels, and goroutine scheduler, and you can immediately see from their own benchmark that Marmot's performance falling off a cliff whenever there is allocation pressure. And an alternative Go with a bad GC and concurrency primitive isn't really worth using since that's Go's main value proposition, no matter how fast you can vectorize the loops.
skybrian
|root
|parent
[-]
(Not that I'll be using this right away.)