News for hackers. Stuff that matters.
Re:The Art of 64-bit Assembly by amelius on Saturday August 01, 2026 @12:01PM (#49135549)
Is anyone still writing assembly in the age of LLMs? Asking seriously because most assembly is just doing one very simple thing very fast and because it's so simple conceptually, an LLM can easily code it without errors.
Re:The Art of 64-bit Assembly by emptybits on Saturday August 01, 2026 @12:14PM (#49135659)
I'm not being flippant but I think part of your answer is in the first two words of the title.

IME while LLMs may help delivery utility in a finished work, humans often value the absorption, mastery, style, or constraint of performing a mundane activity hands-on and brains-on.

Re:The Art of 64-bit Assembly by eat on Saturday August 01, 2026 @12:14PM (#49135669)
You could've also asked if people still wrote assembly in the age of compilers, and the answer would be the same. Sometimes we want/need to control or understand what is emitted by the tool.

However, I want to point out the obvious fact that people are still playing the piano in the age of the self-playing piano. Humans are experiential creatures, and we enjoy a wide range of activities for their own sake that may have nothing to do with efficiency of output.

Re:The Art of 64-bit Assembly by sousousou on Saturday August 01, 2026 @12:06PM (#49135597)
Yep. In my experience, LLMs easily go in circles with even simple assembly, creating fixes that result in 2x slower code and then fixing those with even slower code. They are pretty great as a reference or finding needle in the haystack bugs though!
Re:The Art of 64-bit Assembly by ndesaulniers on Saturday August 01, 2026 @12:58PM (#49136131)
I was able to use Claude to translate a few thousand lines of assembler from one syntax+toolchain to another. Process was definitely iterative; had to keep adding a few rules along the lines of "don't do this...here's the equivalent pattern." But in the end it did a good job and saved me a ton of time. Allowed me to move a ton of unit tests off a hand rolled broken+bad assembler to a modern production toolchain.
Re:The Art of 64-bit Assembly by derefr on Saturday August 01, 2026 @02:33PM (#49137072)
Is that with or without the LLM being able to assemble + profile its hypotheses itself? Because “optimize this code to execute in fewer CPU cycles under the test harness” seems like one of those perfect self-contained problems for LLMs (their equivalent of an “embarrassingly parallel problem”: an “embarrassingly-easily-explored solution space with embarrassingly-easily-measured objective success criteria.”)

Sure, they might make all sorts of dumb hypotheses at first, but as long as the results of those stay in their context, they do seem to eventually “run out of ways to be stupid.” (Which is to say, LLMs seem to experience in-context learning even via self-directed trial-and-error, if given a sufficiently-large number of iterations and no way to cheat.)

Re:The Art of 64-bit Assembly by rescbr on Saturday August 01, 2026 @04:09PM (#49137917)
This is definitely not my experience with GLM-5.2. It is writing pretty good ARM SIMD code.

It also is an excellent radare2/rizin/ghidra driver as well. Maybe it's because its ~cyber~ capabilities (pretty much linked with assembly-level knowledge) aren't guardrailed off?

Re:The Art of 64-bit Assembly by mdp2021 on Saturday August 01, 2026 @12:11PM (#49135640)
> Is anyone still writing assembly in the age of LLMs ...

Yes. Its "simplicity" is exactly why we pick and assemble piece by hand - we imagine the leanest way.

LLMs are (not just in Assembly, but especially) very precious as a natural language manual.

> an LLM can easily code it without errors

One day it will probably also be able to have sex, and yet we think we will not pass on the experience - unless, like some kind of coding, it will be a "strictly professional only for money" operation (like in Monty Python's Argument sketch).

Edit: as esteemed emptybits wrote above, rephrasing: it's /the Art of/ Assembly.

Re:The Art of 64-bit Assembly by alain94040 on Saturday August 01, 2026 @01:40PM (#49136586)
> Yes. Its "simplicity" is exactly why we pick and assemble piece by hand - we imagine the leanest way

Professionally, assembly is the last thing I would let an LLM generate for me. That's because if you need to write something in assembly, it's because it's critical: operating system context switch, interrupt handler, that kind of thing. You don't want to be 99% correct, you need that code to be 100% good.

I can imagine some other professional scenarios that I'm less familiar with, where you want to write a tight numeric loop of NEON64 assembly and let the LLM do it, because it's frankly a pain to do by hand, and you can test it to some degree of confidence.

Re:The Art of 64-bit Assembly by Keyframe on Saturday August 01, 2026 @12:16PM (#49135680)
an LLM can easily code it without errors

can't tell if sarcasm or not. Just in case it's not.. in that case why don't we all vibe everything in assembly? No need for abstractions anymore since that's a human concept. LLM can do it without errors, as you say, and we'll reap the benefits of speed!

Re:The Art of 64-bit Assembly by mdp2021 on Saturday August 01, 2026 @12:21PM (#49135737)
> why don't we all vibe everything in assembly

I really loved this retort, but we have to reply: from that cone of perspective, it would be probably better to "vibecode" in C and not hope that the LLM does a better job than the compiler (for efficiency, not for absence of bugs as per the original). (Edit: for clarity: some compilers of low level languages are specialized in ASM optimization - the LLM will hardly beat them.)

Re:The Art of 64-bit Assembly by fragmede on Saturday August 01, 2026 @12:23PM (#49135760)
Because it's not portable. The world we find ourselves in is at least x86 and ARM, and assembly for one isn't good for the other. LLVM has a hardware agnostic intermediate representation (IR) that one could use though.
Re:The Art of 64-bit Assembly by Keyframe on Saturday August 01, 2026 @02:13PM (#49136861)
you're not thinking vibe enough. Your prompts are now the program, that's your abstraction. Ideally, if it would work, LLM would be the one then producing each platform's output. Maybe even compiling from higher languages to gather some compiler optimization hints and then doing full salvo of asm. Ideally.
Re:The Art of 64-bit Assembly by slashdave on Saturday August 01, 2026 @12:49PM (#49136026)
Except for some odd corner cases, it is very hard for a good engineer to beat compilers these days (they are very good now). Not to mention, tuning depends on the platform, and often the exact model of chip.
Re:The Art of 64-bit Assembly by Keyframe on Saturday August 01, 2026 @02:15PM (#49136873)
* it is very hard for a good engineer to beat compilers these days (they are very good now).*

I keep hearing this for the last 20 odd years, yet I see evidence to the contrary each and every day. It is hard and honest work though.

Re:The Art of 64-bit Assembly by okanat on Saturday August 01, 2026 @06:51PM (#49139335)
A good engineer isn't a godlike entity who knows all. They know when to bring in assembly and when to be satisfied with C / C++ / Rust compilers and steer the compiler.

Assembly has unique advantages like guaranteed execution duration for cryptography or exact optimization of hot-loop computation.

99% of the even performance-sensive code doesn't need assembly and compilers beat good engineers in this category since API surface is big and complicated. For 1% very hot code or very sensitive code due to execution duration / predictability / throughput, humans usually code better than compilers. This is due to specialization and limited DoF problems that can be solved and optimized to hell.

Re:The Art of 64-bit Assembly by slashdave on Monday August 03, 2026 @12:52AM (#49151343)
Indeed. Compilers do have to make compromises, and it is not possible from code alone to understand the tradeoffs.
Re:The Art of 64-bit Assembly by zero-sharp on Saturday August 01, 2026 @01:07PM (#49136230)
there were two lead developers from FFMPEG on Lex Fridman's youtube channel who talked about performance gain from assembly. They claimed the opposite

https://www.youtube.com/watch?v=IUo0UwZOaRw

Re:The Art of 64-bit Assembly by slashdave on Saturday August 01, 2026 @01:53PM (#49136700)
Yeah, a corner case (streaming) and good developers working very hard.

The original SSE (SIMD) extensions were actually written with this use case in mind. When they first came out, the compilers were awful. They've since caught up.

Re:The Art of 64-bit Assembly by rurban on Sunday August 02, 2026 @01:55PM (#49146693)
Certainly not. Every hand-optimized tight loop or lookup beats every compiler still. Compilers are extremely stupid, and esp. the language designers.
Re:The Art of 64-bit Assembly by WalterBright on Saturday August 01, 2026 @12:19PM (#49135721)
I do now and then, for bits of code that is not expressible in the language. Things like special instructions, or special fixups.
Re:The Art of 64-bit Assembly by breckinloggins on Saturday August 01, 2026 @12:49PM (#49136020)
Yes. And for the same reason I still write in C or Common Lisp - by hand - in the age of LLMs.

It’s a hobby.

Re:The Art of 64-bit Assembly by sureglymop on Saturday August 01, 2026 @12:56PM (#49136106)
Yes. Mostly for learning purposes and for fun. Also, there are things you must drop down to assembly level in order to achieve. Implementing coroutines, a JIT compiler, etc. It's fun to learn about these.
Re:The Art of 64-bit Assembly by sitzkrieg on Saturday August 01, 2026 @01:17PM (#49136348)
yes, i write c and asm professionally for small hard real-time mcus. llms give me wrong code nonstop in what little i have tried in my field. not a force multiplier
Re:The Art of 64-bit Assembly by stevekemp on Saturday August 01, 2026 @02:21PM (#49136957)
I wrote a lisp compiler recently, and that involved generating assembly language.

My output is linux/amd64 assembly language which is compiled by nasm. I don't link to glibc, so I had to implement my "print int", "print string", and similar primitives in raw assembly.

I successfully implemented a stop&copy garbage collector, and other interfaces to the OS such as reading command-line arguments, environmental variables, and so on. All in assembly. Though my compiler is written in golang the runtime, and all supporting functions have to be in assembly to make sure that the binaries it produced are static.

(I wrote a lisp interpreter which can be compiled, and which can be used to run itself, so I got an indirect REPL.)

Re:The Art of 64-bit Assembly by amelius on Saturday August 01, 2026 @04:00PM (#49137846)
An efficient concurrent garbage collector would be something I would buy a book for. (In fact I have one GC book on my bookshelf).

But assembly? I'm not sure, honestly. Architectures change, and you can easily converge to good code by talking to an LLM.

May I ask why you didn't use LLVM as a target?

Re:The Art of 64-bit Assembly by stevekemp on Sunday August 02, 2026 @03:10AM (#49141895)
I wanted something standalone I could implement and understand from the ground-up, that's why I did everything myself, rather than using LLVM.

In the future I might try to repeat the process with QBE, or similar, but LLVM is a big dependency and a bit of a moving target too.

I'm only writing toy languages for fun, and for local problem solving. I have no delusions of grandeur and expect that for every compiler/language I come up with I'll have one user at the most, possibly two.

Re:The Art of 64-bit Assembly by root-parent on Saturday August 01, 2026 @02:25PM (#49137002)
>> an LLM can easily code it without errors.

An LLM knowns nothing of the taste of ginger.

Re:The Art of 64-bit Assembly by bigstrat2003 on Sunday August 02, 2026 @12:45AM (#49141190)
I write all my code by hand for one simple reason: LLMs suck at programming, and I am both better and faster than they are. When that changes (not bloody likely), I'll consider changing my approach. Until then, I'm going to be over here kicking ass the way I've been doing for years.
Re:The Art of 64-bit Assembly by simondotau on Monday August 03, 2026 @02:53AM (#49152093)
What do you think about Linus Torvalds' recent opinion about LLMs?

  There are other questions around AI (like what the
  economy of it will actually look like in the end),
  but "is it useful" is no longer one of those
  questions. Anybody who doubts that clearly hasn't
  actually used it.
  
  And no, AI isn't perfect. But Christ, anybody who
  points to the problems at AI had better be looking
  in the mirror and pointing at themselves at the
  same time.
https://lore.kernel.org/all/CAHk-%3Dwi4zC%2BZe8e%2Bp3tMv8TtG...