Attached: proxy.duckduckgo.com.png (350x350, 79K)
Why do people hate it?
Jose Wilson
Adrian Price
AutiSM, ironically
Brody Green
why?
it's really fast if you know what you're doing
Ryder Ramirez
I meant why people hate it
Nathaniel Brooks
Because it's not portable, way way more autsitic than c, and you can end up shooting yourself in the foot way worse.
Unless you really really know what you are doing, a compiler will do a better job than you.
Also, it has no use outside of optimizing shit and doing really low level stuff.
Adrian Sanders
I'm just trying to understand tho :(
Camden Hall
are you quoting Bjarne?
And yes, optimizing is a blast with .asm
Caleb Barnes
Don't do it user, learning it is mostly a waste of time. This is my last warning.
Even assembly books say that it produces shit non-reusable and non-readable code that will only work once.
Here's a link:
jagregory.com
Juan Murphy
that's a little too late isn't it?
i've been doing this for years
Tyler Ward
Why did you do it user? What do you use it for? Can you code a website with it?
Jaxson Hall
It's useful for reverse engineering
Bentley Russell
The only machine code I've enjoyed hand rolling was out of the Art of Programming books where you can freely go crazy with self mutating code. So if you have a target architecture, and you get ultimate freedom to directly manipulate it without an OS in the way it can be awesome but in real life it's much less fun, even hand optimizing for the EVM to save on 'gas' was painful and tedious.
Josiah Diaz
I love it.
Learning i8086 asm right now.
github.com/Mark-Weston/8086
then I'll move on to ATmega328P and make something like arduboy.
Adam Adams
Optimization, mostly.
Maybe...
Can you?
Please tell me more
Oh...
Jason Hall
>Useful
Many different uses these days actually as I alluded here For one, any 'smart contracts'. Need to save 'gas'? Crack open a Don Knuth authored book and rewrite all the algorithms to do so.
Need to target an obscure router or GSM stack with some kind of China CPU and you don't trust the OS? Nuke the OS and have your hand rolled assembly manually control memory. Need HFT and the compiler optimizations aren't good enough? Manually rewrite.
Want to manipulate some proprietary bullshit in order to make it do what you want but you don't want to rewrite the entire program? Link together a bunch of jump commands ie: ROP (Return Oriented Programming). They used ROP for the Spectre attacks IIRC
Hunter Young
because they don't undrtstand what it's for
Levi Smith
If you're interested in this, CMU has a course for you explaining all the benefits of hand manipulating 'optimized' compiler asm
scs.hosted.panopto.com
Watch those lectures and get the book too if you want, libgen.io may have it but I bought the 'international print version' for like $30 off Amazon shipped from Malaysia. Get the 3rd version/64bit version. A whole shitload of optimizations you can do once you understand the so called memory mountain, the principal of locality (caches), ect.
Chase Jones
it's pointless these days because gcc will generate faster ASM than you 99% of the time
Jaxson Young
Well isn't it obvious, you have a binary you want to know what it does, so disassemble and read out the asm
Asher Foster
Not entirely true, same goes for LLVM
There's many scenarios where the preference is not to trust compiler optimization for many different reasons. There's also WebASM
Jason Hughes
Learning Assembly language is the only way you can make your own compiler and OS from scratch, two tasks every self-respecting programmer should strive to achieve in his lifetime.
Christian Jenkins
>There's many scenarios where the preference is not to trust compiler optimization for many different reasons
no there isn't in current year show me fucking examples
that's not to say it's not worth learning the basics of assembly and to understand what the compiler generates but writing manual ASM from scratch is a total waste of time
Lucas Cruz
>waste of time
You don't write from scratch, you manipulate what the compiler has done because often it will take the 'safe' approach and in some situations, you don't want safe, such as a highly optimized matching engine. Everybody knows this it's Compsci Architecture class 101. Not to mention rewriting the entire ASM for obfuscation reasons, for example CodeSurfer by Grammatech. If it (codesurfer) has access to source code, it can instrument the build process, and obtain disassembly that is high quality enough to support rewriting. Using it's scheme API you can modify the CFG (control flow graph) of each procedure directly, serialize the rewritten parts out as nasm, and even relink with the object files you don't have source for. It works with any build system, and supports gcc / as / ld and cl / link. Anybody trying to reverse engineer your binary you can leave literal traps for them.
Daniel Brooks
Depending on the CPU, it is quite fun.
It won't land you a super job, but will entertain you if your actual job is drab as fuck.
William Young
Apply to NCC Group or Optiv (whatever they are called these days) if you know even the basic of assembly, guaranteed job. Also apply to any Fintech outfit doing HFT or custom compiler work like Jane Street or Two Sigma or hedge funds in NYC.
Sebastian Myers
>you manipulate what the compiler has done because often it will take the 'safe' approach and in some situations
show me one(1) example
>Anybody trying to reverse engineer your binary you can leave literal traps for them.
LARP: the post lmao
Jeremiah Howard
Do your own homework
See It's filled with examples on why you would want to do this, so is the Art of Programming series.
Brayden Peterson
because it kills the brainlet
Ethan Roberts
it's tedious, not particularly difficult
don't flatter yourself too much embedded code monkey is pretty much a blue collar job
Benjamin Martin
I asked for a single fucking example of a scenario, not even code just describe it, should be easy enough given all the experience you pretend to have
Gabriel Collins
This thread is already filled with examples, go through each post.
Jacob Wright
>not portable
What are macros and flat binary output.
>way way more autsitic than c
Wanting to understand how things work under the hood and find ways to make efficient code isn't autism.
>and you can end up shooting yourself in the foot way worse
This isn't the 1980's anymore where you're going to be interacting with the hardware at all - unless you're making your own toy OS or one of those odd people who do DOS programming in [current year].
>Also, it has no use outside of optimizing shit and doing really low level stuff
>Also it has no use outside of these really useful stuff every developer should be doing
K
Bentley Price
No portability of any kind
Joseph Miller
This is flat out incorrect when you use macros and/or flat binary output. Pretty much the sky's the limit when it comes to modern assemblers.
Landon Rivera
Macros? Such as?
Jack Robinson
Well for Nasm there's the NasmX project. But the idea is you can always make your own to do whatever you want.
Adrian Gomez
I thought nasm itself was portable
Brandon Hughes
Assembly is never faster since the complexity of modern day programs are far outside what humans can optimize. If you inline assemble asm into your code, whatever I guess. It's incredibly niche at best.
Nathan Phillips
It is but NasmX is just a bunch of resources and tools for Nasm to make it more palatable for some people.
Brayden Thompson
>This is flat out incorrect when you use macros
At what point does this not just become something like C
Justin Young
Spectre involves reading secret information, not arbitrary code execution. You can exploit Spectre with high level languages.
Ryan Reyes
Utterly pointless unless you’re doing something that specifically requires it. C was invented so you wouldn’t have to use it. I don’t think people hate it as much as they rightly don’t even think of it.
Levi Turner
>it's really fast
Myth.
Austin Kelly
>what is emulator
Thomas Price
Not joking here, there are only 3 possible reasons someone would "hate" it:
1) They are making assumptions, like picturing some faggot trying to program desktop applications in assembly and then basing their entire view of it on that sort of thing
2) Tribal mentality, where they can't handle being ok with things existing that they don't personally use. So if they don't use it then it must be bad.
3) They don't really understand what assembly even is.
It's practically just human readable(ish) mappings into binary. You'd have to be a real moron to think we'd somehow be better off without it.
So yeah, any reason someone could ever have to hate it is either identical or reducible to one of the above 3 reasons.
Jason Torres
most assemblers are very poor quality. some architectures have only the shittiest assemblers. try to find an ez80 assembler with features on par with ca65
Benjamin Kelly
You can, and do, do it in C or C++
Brandon Richardson
>put a micro controller emulator on a micro controller
surely the fast assembly code will compensate right