Remix.run Logo
whatever1 3 hours ago

Why do we bother with programming languages today? Why not have the LLMs just write assembly code and skip the human readable part? We are not reviewing it anymore anyway.

strbean 3 hours ago | parent | next [-]

A lot of really good reasons:

1) Higher level code is easier for LLMs to review and iterate upon. The more the intent is clear from the code, the easier it is for humans and LLMs to work with.

2) LLMs get stuck or fail to solve a problem sometimes. It is preferable to have artifacts that humans can grok without the massive extra effort of parsing out assembly code.

3) Assembly code varies massively across targets. We want provable, deterministic transformation from the intent (specified in a higher level language) to the target assembly language. LLMs can't reliably output many artifacts for different platforms that behave the same.

4) Hopefully, we are still reviewing the code output by LLMs to some extent.

_flux 2 hours ago | parent | next [-]

In addition LLMs also make bugs, and debugging assembler is more difficult, wasting more tokens, thus more money.

A very big practical reason is also that assembler code would eat context like no other.

jcgrillo 3 hours ago | parent | prev [-]

I'd add to that

1.5) Having a compiler in the loop that does things like enforcing type constraints (and in the case if Rust in particular, therefore memory safety guarantees) is really useful both for humans and LLMs.

Almondsetat 2 hours ago | parent | prev | next [-]

Feel free to post a project of yours where you gave a bunch of prompts to an LLM and it produced a working application written in assembly without you having to check for anything

vjsrinivas 3 hours ago | parent | prev | next [-]

Is this a serious question or are you just trolling?

hellohello2 3 hours ago | parent | prev | next [-]

I get what you mean but I think if anything AI pairs extremely well with strongly typed languages that are at times cumbersome for humans, but decrease the latency at which AI can get feedback on its code. In my (very) limited experience Rust is an excellent target for AI codegen.

wrathofmonads an hour ago | parent [-]

Clojure is a strongly typed language. A Clojure REPL capturing immutable, inspectable state is a philosophically richer feedback substrate than it gets credit for. Spec can express constraints that static types cannot - things that would require dependent or refinement types in a static system (and the enormous complexity that comes with them) you can just write as a predicate. The tradeoff is that specs are only checked when you actually exercise the code path, whereas a type error is total and upfront. But that's exactly the point - an agent working surgically on a specific path is exercising it, so the totality of static checking matters less. If we're not vibe-coding, a dynamic, strongly-typed, immutability-friendly language like Clojure could be both token-efficient and capable of richer reasoning than a static type system allows.

bee_rider 3 hours ago | parent | prev | next [-]

This is a Rust to CUDA converter so I guess it is for codes where the programmer wants it to function properly (Rust) and have good performance (CUDA).

It’s just a matter of different workflows for different users and application.

ModernMech 2 hours ago | parent | prev | next [-]

I'll bite:

Programming languages are tools for thinking. It's not clear that assembly code has the right abstractions to encourage the kind of thinking that programming large systems requires. After all, human intelligence found assembly insufficient and went on to invent better languages for thinking, why should artificial intelligence, trained on human intelligence, be any different? Maybe AI in the future will have its own languages for thinking, but assembly is likely not that.

regenschutz 3 hours ago | parent | prev | next [-]

I mean, AI is not good at writing x86-64 assembly code. Last time I tried (with both Claude and ChatGPT), the AI failed to even create basic programs other than Hello World.

OtomotO 3 hours ago | parent | prev [-]

Because when this idiotic hypemachinery finally dies an agonising, painful death, some of us still want to work with computers