MHN
Add a comment on Hacker News →
39 comments
  1. Love the idea but it looks like pure claude output. Not sure I want to trust that tbh

    1. I don't particularly mind that, but a brand-new project does need to do something to establish trust.

      1. [deleted]

    2. TBF gopherbot does a lot of the maintenance of go itself

    3. The development speed suggests it is. 3 weeks ago nothing, then 1029 commits the week after. Zero issues.

      1. This project helped unearth an actual bug in the Golang compiler: https://github.com/golang/go/issues/83209Pretty damn good milestone for a side project / ai slop or not

    4. The clankers have become darn good at writing code. And the product is a compiler, so its output is deterministic and testable.

      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.

      1. a compiler is only deterministic with respect to itself. It should output identical binaries for identical input, but it's fully expected not to be the sme binary as another compiler. Testable... well 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,

        1. > A compiler is only deterministic with respect to itself.

          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.

          1. >You can compare how its output behaves compared to that of the ‘official’ compiler.

            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.

        2. > a compiler is only deterministic with respect to itself.

          The Go (gc) compiler is deterministic with itself as an explicit design criteria, but that isn't generally true. Most compilers (at least beyond toy compilers) are non-deterministic by default. There are a number of advantages to forgoing determinism in compilers.

        3. How would we measure/compare this for a human-written compiler?

          I mean, the whole point of this project is to produce smaller, faster binaries.

          I guess we could fuzz-test the resulting binaries from each compiler. But that will just prove that we haven't found a problem, not that a problem doesn't exist.

          I don't really see how the compiler being AI-written is changing anything here?

      2. [deleted]

      3. Hm, yes and no for me. Code is getting better but architecture-wise and with bigger slices it still fucks up majorly. I always implement a small chunk and review it. One-shotting is not an option. The code clearly shows it. So I don't use "one shotted" apps. Not sure if op did it like that, but it makes me cautious. Vibecoded stuff is full of security issues.

        Just a general thing for me

      4. Testable doesn’t equal tested. Is there a test suite publicly available that can prove 1) full spec compliance and 2) absence of compilation bugs at least across the three main target architectures (windows, darwin, linux)? I’m not sure who would trust the output otherwise, except for toy projects.

        1. [deleted]

        2. While valid, you might notice in that list of requirements, nowhere is a human actually required - the steps you're outlining are all highly mechanical.

          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.

          1. > erm Clause, invent me a spec for the Go language, no human input plz

            1. Santa's giving you a Go spec for Christmas.

  2. > Go, lowered to machine code

    Doesn't the go compiler produce machine code?

    1. Further, the primary reason to use Go is to get the most sophisticated runtime known to man...

      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.

      1. Nah, Go runtime still needs to learn a few tricks from JVM and CLR implementations.

      2. Uhhh, it might be a good runtime, but most sophisticated? Seemingly the guiding principle for much Go development was to be a simple implementation for the designers.

        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.

    2. Slop phrasing

      1. Slop, disguised in sloppy excitement

  3. Well, Go language has a spec so alternative implementation is of course very welcome. We will see how well it fares with real world code and keeping up-to-date with official compiler. Perhaps in 5 years it will be an alternative to Google's compiler. For now its way to young for even side projects.

  4. How does it compare to tinygo or llgo? Both of which also use LLVM,

    1. I'd also be quite interested in comparison to tinygo

  5. For a moment I thought the produer of my rainjacket ventured into software... even the logo looks kind of similar.

  6. I like the idea, but it didn't build when I tried it out:

    https://github.com/Gaurav-Gosain/marmot/issues/3

    1. Looks like a missing dependency on your system?

      https://marmot.gaurav.zip/docs/install#requirements

      The "MLIR" thing mentioned in the error (shown in your bug report) seems to be this: https://mlir.llvm.org

      As a wild arse guess, does your installation of LLVM not include some "MLIR" module or capability?

      ie could you add it then try again?

  7. There's a funny view that whenever a programming language pops up and it is not based on LLVM, it's backwards, implementors are uneducated, stupid and not willing to learn "the only way".

    In the case of Go such view is particularly mistaken, because Ken T, Rob P
    et al wrote probably more compilers and linkers for different architectures than any other group of coders on this planet, so they have good judgment in this area. Especially when it comes to tradeoffs between compiling speed, simplicity and speed of the resulting code.

    So as the result we have Go compiler/linker tools and runtime with certain tradeoffs, distanced from the LLVM, and LLVM itself with good results and lot of its own problems, like very slow linker. This proves that no tool is ideal.

    I think, a very good approach then is to let anyone use the tools of their choosing, without falling into the trap "X is the only way".

  8. Ok, the issue with alternative compiler isn't that individual features fail but when multiple features interact with each other in combination and fail or randomly gets really slow, and this only has fairly trivial benchmarks currently.

    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.

    1. Seems like that depends on the program. For a program that doesn't lean on GC or concurrency all that much, smaller, faster binaries might be worth it?

      (Not that I'll be using this right away.)

      1. The main problem with that is that TinyGo already exists and compiles to embedded systems with LLVM, and smaller binary came with the territory, so there really isn't a niche left for Marmot imo.

        Go could really use better vectorization for hot loop performance though.

        1. Unfortunately, TinyGo doesn't support the entire standard library that comes with Go, so _if_ this is something Marmot does then it sounds like a win.

          https://tinygo.org/docs/reference/lang-support/stdlib/

        2. There is no reason why you can't mix and match good approaches yourself with AI

    2. I'm surprised the author (or, more pessimistically, the LLM) didn't bootstrap into the actual Go runtime.

  9. I never understand AI language dev. Why spend your tokens generating a language that you yourself will not even use but maybe your bot will. Why not just get your bot to write a different language with the required output that you need. It always feels like making a compiler used to get huge accolades that these AI devs still want to claim without the effort or immense amount of experience and knowledge required.

  10. [deleted]

  11. on the opposite spectrum, gno is a go interpreter

    1. It's some crypto bullshit so probably useless when you want simple scripting API for your app.

      Most promising Go interpreter was https://mvm.sh/ but unfortunately seems abandoned.

  12. [dead]

  13. i give it a go