Comment by asim
23 days ago
At this stage to me Go is the new C compiler. Quite honestly I spent 10 years or more writing Go code. At times 18 hours a day. And now with AI, I get models to write my Go code. I STILL want it to be Go code. Is that strange? No because I understand the performance and safety of Go. But I rarely write it directly anymore. Probably not at all in 6-9 months. Yet I still occasionally look at the code to see what the output looks like.
So yea hopefully a nice new addition but only my prompts now matter. So need to make sure they pickup on the new API.
This is mostly why I have come back to Go.
I am using local LLMs and Go has a bunch of strengths where smaller contexts are concerned; less complicated flow of control being one of them.
not a lot of overloading complexity, very verbose with a small total language structure too helps.
Yes. It's that thing — the fact that a language helps you read what a single function does really easily, but in so doing makes the entire codebase quite dense, is not optimal for us, but is good for them.
And the things that we do to manage this, that are symbolic or based on visceral real-world analogy, are good for us and bad for them.
Go is kind of in the middle, in the way that many vaguely Wirth-like and CSP-like languages possibly are, I guess.
Truly the argument can be made either way.
If you code in Go, the code is more high level, prettier, simpler.
If you code in Rust, the code is more robust, efficient, faster.
Both are important for LLM, why can't we have a high level, simple language that is also robust, efficient and fast? =)
Efficient code means code with a large amount of embedded assumptions. Code that's more generic is almost always less efficient.
Go is about as far as you can "go" to the efficiency end without becoming Rust. It's a low-overhead language (like C) but with a GC that ensures memory safety. If you want to manage memory yourself and still prove safety it gets very complicated, as we see in Rust.
OCaml fits your bill. Super fast compile times and also very fast runtime.
It always feels like OCaml is on the verge of becoming the perfect language.
Expressive and type safety of a functional language, without the odd semantics of Haskell, where laziness can make performance difficult to predict and purity can make simple things like IO difficult to understand.
Does it still lack easy to use concurrency primitives?
1 reply →
> Both are important for LLM, why can't we have a high level, simple language that is also robust, efficient and fast? =)
I think many variants from Rust can be stripped to make it simple, especially in type system, which is way more complicated than go.
I dont think we need simpler types for agentic coding though. We need compiler speed. I guess those are probably related to some degree though.
1 reply →
If I want simplicity and maintainability, I’d pick Kotlin over Go. If I want speed, I’m picking Rust over Go. Why would I ever pick Go? It’s the best at nothing.
It's surely better than Kotlin in simplicity and maintainability. It also doesn't tie you to the JVM.
What if you want a single language that's pretty fast while simple and maintainable?
8 replies →
Goose?
Swift
> At times 18 hours a day
I hope you're not still doing this, it's nothing to brag about.
As long as you do it because you want to and not because you're forced to for work or something who cares? Whatever gives people energy
Sleep deprivation does not give you energy.
3 replies →
No not a brag. I haven't done this in a long time. It's really unhealthy but I was trying to get a startup off the ground and became obsessed. Don't recommend it.
Did you succeed?
I still prefer Go over the alternatives because I'm reviewing the code carefully and trying to make it all look as good as if I'd written it very carefully by hand.
The few times I've needed a language without a GC and used Rust and C as target languages, I've reviewed the code less and enjoyed it less.
Go is lovely. Best language to generate backend services with.
JVM and .NET platforms.
JIT and AOT compilers, REPL development, bleeding edge GC implementations, Java, Scala, Kotlin, Clojure, C#, F# to chose from, and modern IDEs inspired by Smalltalk/Lisp Machines experience, batteries included backed and frontend development frameworks.
> generate
3 replies →
As I do more agentic coding, I am starting to feel strongly that I need to set aside a project -- and time -- for strictly hand-coding, using AI (if at all) only to explain things, never to write any code.
First, I like programming and don't want to stop doing it just because a machine can do it too. Second, I'm pretty sure atrophied coding skills will make me worse at directing the machines, thus worse at what seems to be "the job" these days.
That's exactly how i do all my personal projects. No agents, AI just for planning/research/debugging and occasionally for small bits of code i am not super interested in. For example I'm currently working in Go, but need to use a C library, and don't know C much at all. So when i get stuck with the C interop parts, sometimes i let the AI write bits of C for me, or let it write scripts for cross-compiling or other stuff i just find to be a pain. But I'm doing all the writing and logic myself.
Agents make it too easy to gloss over too much. They're great at work where i care about productivity but I've zero interest at home where the point is learning and having fun
>First, I like programming and don't want to stop doing it just because a machine can do it too. Second, I'm pretty sure atrophied coding skills will make me worse at directing the machines, thus worse at what seems to be "the job" these days.
In theory wouldn’t atrophied coding skills not matter if models are sufficiently good at coding? I mean isn’t whats left just design and architecture and testing?
Sure, if LLMs are producing shit code you need to have an understanding of what it should do instead. But I think that day is already gone.
Its hard to think of a skill that you’d need to build with an LLM that requires writing meaningful amounts of code by oneself. From my end all the complexity is business logic and system design.
> In theory wouldn’t atrophied coding skills not matter if models are sufficiently good at coding? I mean isn’t whats left just design and architecture and testing?
No, because good understanding of design comes from programming experience. Atrophied skills mean you lose touch with the actual nuts and bolts of what you are building.
This is also the worst kind of lock-in you can imagine, by outsourcing all of your understanding of a codebase and your skills you are now completely at the mercy of LLM providers. Even if you switch to open weight models you're at the mercy of graphics cards producers and scalpers.
> Sure, if LLMs are producing shit code you need to have an understanding of what it should do instead. But I think that day is already gone.
Maybe your standards are too low. By my standard, they still produce shit code and require lots of iterations to get reasonable designs (I often end up just rewriting the bits that are obviously wrong rather than trying to figure out how to "prompt engineer" the right output).
They do often produce passable code but my experience is the longer you spend reading the code the more things you find wrong with it, almost like an uncanny valley.
At least that's my experience with Opus and Fable. Maybe it's too old-fashioned at this point to complain about code quality, but I find it very strange how many people have started proclaiming that their code quality is good.
3 replies →
> In theory wouldn’t atrophied coding skills not matter if models are sufficiently good at coding?
I am begging HN users to understand that some people enjoy writing software themselves
2 replies →
If it helps, imagine they were talking about something like drawing or painting or stitching or sculpting instead of coding.
You don't expect everyone to stop wanting to do those just because they can be automated more or less effectively, right?
1 reply →
Only in the same sense that painting skills not matter
I still catch Claude writing some shit code sometimes
Do it! I have the same feeling and the hardest part is picking something that you are interested in. I have just kept the idea of "thinking of ideas" on my mind for a few days once I finish something. I usually come up with a few ideas if I'm always considering any little thing for a project. It has been fun and I have learned a few things along the way - more than I feel I do letting AI write most of the code.
I haven't actually tried it yet, but I think it'd be good to write a dsl for whatever you're doing. Then have ai make an interpreter to run it. Sort of as a way to stay... interested? Engaged?
This is sort of the deal with any language. I’m using go for personal projects and dotnet for paid projects.
Why? Because I don’t give time to wait for code to compile on my time and I don’t have time for people to learn a new language for review at work.
Life is good! Would recommend that split.
People are sleeping on Go as a LLM language of choice. Everyone trying to rewrite in rust which is fine and rust is fine. However its compile times are several orders of magnitude greater than Go. You can have LLMs write and compile 20 apps in the time one rust app compiles. I've got a Go personal project that would take hours for rust to compile, I can't imagine making the same velocity in Rust. Though I do see the workplace appeal of bringing back the xkcd "compiling" meme.
However it kind of makes me feel like my professional life was wasted and I don't really know what kind of future I have. One of Go's main points was you can pick it up in a weekend. What career moat do people like us have?
My only issue with it is that you can't ship a wasm go app in under 2mb. With rust you can make it under 100kb.
isn't that one of TinyGo's raison d'etre's? I've never tried wasm, but executables are typically a magnitude smaller than go's (assuming your go code is compatible with tinygo, of course)
Jeez, and I thought 100 KB was absurd.
2 replies →
I would rather have LLM directly generate machine code, and best of all, macro Assemblers are blazing fast for decades.
One of the best techniques for using LLM coding is to let it write programs that frontload and automate work in a repeatable and testable manner rather than letting it only do free form turns.
Letting it generate machine code directly would be the opposite of that.
1 reply →
This is like saying that a strong man would rather dig a hole with his bare hands than use a shovel. Structured programming languages are force multipliers, it makes absolutely zero sense to forego them just so you can vibe assembly directly.
4 replies →
You can't PGO that code, though. Also, I'm not sure it can generate architecture specific optimized (-march, -mtune) code as well.
Considering it just pulls and remixes blocks, this is a very tall order for today's LLMs, and maybe a couple of generations as well.
Calling GCC/clang at the back and emitting ASM is both cheating and has no advantages whatsoever as well.
6 replies →
Use a working Go program as the prompt+oracle for cross-language port or direct generation.
2 replies →
>> to me Go is the new C compiler
In what sense? Go has a GC and binary sizes are relatively pretty huge. Its closer to Java and C# than C.
Which are your favorite models for writing Go? Any models for editing/improving written documentation?