164
submitted 2 months ago by sebastiancarlos to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] AllNewTypeFace@leminal.space 50 points 2 months ago

“Hand-written assembly” is not more powerful than any other Turing-complete language (including Perl and Python), just more painfully slow and prone to human error to write. (Perhaps if you have a special case requiring speed (such as the processing being done in a tight loop in a financial trading app and the results needing to beat rival trading systems by milliseconds or something equally esoteric), it’d make sense, but in that case, a modern compiler (for, say, C/C++/Rust or similar) would yield comparable results, and if a lot is riding on those milliseconds, you’d eschew code and build a FPGA that pulls the data out of memory buffers in hardware or similar.)

So these days, the only use case for hand-writing assembly language (other than low-level OS/firmware programming or compiler development) is performative Feats Of Strength, where the challenge is the point. And in that case, you’d be trying to do something heroically challenging, like writing an Atari 2600 demake of Baldur’s Gate or something.

[-] stingpie@lemmy.world 22 points 2 months ago

Hand written assembly is much more powerful than a turing-complete high level language because it lets you fuck up everything. Rust and python are way too wimpy to allow a user to destroy their computer.

[-] vext01 2 points 2 months ago

On the other hand you can't really have UB in code written in asm.

Just throwing that out there!

[-] rain_worl@lemmy.world 0 points 3 weeks ago

could have instruction undefined behavior (eg, integer overflow wrap/saturate/trap/explode), and is different on different computers

[-] xigoi 2 points 2 months ago* (last edited 2 months ago)
import os
os.system("rm -rf /*")
[-] lars 1 points 2 months ago

& pour les français :

import os
os.system("rm -fr /*")
this post was submitted on 11 Aug 2024
164 points (86.0% liked)

Programmer Humor

32361 readers
1566 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS