8 ms·
Assembly Language: Still Relevant Today
- gfody 11y agoNo mention of graphics programming or signal processing? High level syntax just gets in the way when you're trying to pack six pixels into two registers just right. Assembly language is still pretty much the right tool for the job.
- vox_mollis 11y agoOr security, for that matter. Reversing, malware analysis, black-box auditing, &c require, at minimum, the ability to read assembly. The article is begging the question. I'm unaware of anyone who thinks assembly is not relevant.
- LogicFailsMe 11y agoTalk to a data scientist.
- nickpsecurity 11y agoThere's a ton of people who don't need assembly. Including security engineers that work in C with tools like Astree or Frama-C. Then, tools such as CompCert compiler can handle the rest. ;) Blackbox and reversing, though, certainly need or benefit from assembly. Depending one what one is analysing.
- andrewflnr 11y agoIf students count, the other day I heard some griping about how they had to learn assembly even though "we're never going to use it".
- Everlag 11y agoTo be fair, students are mostly learning MIPS32. It's a 'language' great for teaching concepts while preserving the students' sanity. The fact that I have to run an emulator of an effectively dead-for-consumer use architecture to write labs hurts student satisfaction. You can't even be cheeky and use interesting, assembly dominated elements like SIMD. The true masochists continue to x86 in the higher level courses.
- fancyketchup 11y agoWhat about all the consumer routers than run on MIPS cores?
- radialbrain 11y agoSome places are starting to use ARM Thumb which is both reasonably sane and actually usable!
- gaius 11y agoMIPS is alive and well. There is a huge world of software outside of websites, you know.
- 11y ago
- tikhonj 11y agoThere's a big difference between "assembly is not relevant for anyone" and "assembly is not relevant for everyone". I suspect few people hold the former view and a bunch hold the latter, but shortened both sound the same.
- noir_lord 11y agoThis is pretty much it, the last time I touched assembly was to write some string routines for Delphi 5 as the included ones where horribly slow, that was 16 years ago. Since these days I'm a web developer I'm at a level in the stack where using Assembly would be alien and frankly I doubt I could anyway without some serious study.
- pjmlp 11y agoOr writing compilers, OS drivers, to add two more.
- eva1984 11y agoThere are a lot of engineers out there work on higher abstractions. If the task is to write a map reduce or spark job, for sure, most of the time I don't think you need to know what happens with your application at assembly level.
- blt 11y agoTangent: I wish more (any?) high-level languages were capable of expressing self-modifying code safely. A lot of values are variable at compile time but constant within a significant block of computation at runtime. If compilers were designed to emit self-modifying code, they could propagate constants through the block and replace register/register instructions with register/immediate instructions, freeing up registers for other variables. This is the promise of JIT compilers but in practice the popular jit-compiled languages have too many other performance issues to be popular for serious CPU-bound work. Plus the jitter has to do a lot of analysis at runtime. It would be cool if you could mark a block of C code with `#pragma jit`, making the compiler emit a binary that contains some compiler IR and a peephole optimizer to make the code as tight as possible given the conditions at runtime.
- gfody 11y agoI can't think of any language that has this as a feature. But there are some nice libraries for assembling machine code at runtime - there was one I used called "softwire" that seems to have disappeared. I just found this one on github: https://github.com/kobalicek/asmjit https://github.com/kobalicek/asmjit
- ChrisLomont 11y agoC# (Microsoft stack, probably other stack, probably other .NET languages) lets you generate or input C# code at runtime, compile it, and run it through the jitter as desired. It's nearly trivial to do it. The Regex classes for example create code at runtime to do compiled regular expressions, but I think they do it with emitted IL instead of C# code directly. All the pieces are there.
- dx211 11y ago.Net provides a couple of different ways to dynamically emit IL, but that's not quite the same as being able to emit your own native machine instructions, though. I think the challenge would be that you'd need to work out a calling convention between the jitted code and the emitted native code, at which point you might as well stick the native code in its own library function and compile or assemble it with a native tool.
- 13of40 11y agoTwo or three years ago I was doing an informational interview, trying to move from a QA job to a developer job, and I mentioned to the guy that I used assembly code almost every day. He guffawed and said I was full of it, but it was true -- firing up a debugger and stepping through assembly might be pathological on the desktop these days, but when you're investigating a failure on a back-end datacenter machine that's running some interim build that's impossible to find matching symbols or source for, probably over a KVM...
- otoburb 11y agoDid you get a chance to prove it in the interview?
- 13of40 11y agoHell no. I was a dead man walking in that interview. When I was trying to transition from test to dev, half the people I interviewed with didn't even ask me technical questions. I had one interviewer show up half an hour late, spend the next 25 minutes trying to convince me to stay in test, then (literally) give me five minutes to whiteboard a linked-list problem in C++, and his feedback to the hiring manager was that I was lacking coding skills. I eventually got into a dev position, but it was it was an utterly medieval process. I wish I was kidding, but my take on the whole get-a-dev-job scene right now is that you have to be (a) young, (b) skinny, and (c) the same race as the hiring manager and interviewers (I shit you not). After that comes coding.
- swolchok 11y agoI don't think it's unreasonable to differentiate between reading assembly produced by a compiler and handwriting assembly. I do the former several times a month and the latter almost never.
- gaius 11y agoIt's never reasonable to laugh at someone you're interviewing. Too many so-called engineers treat an interviewee just as a captive audience to brag about their own skills.
- hoodoof 11y agoI can heartily recommend this book for beginners http://www.amazon.com/Assembly-Language-Step-Step-Programming/dp/0470497025 http://www.amazon.com/Assembly-Language-Step-Step-Programmin...
- matt_d 11y agoFor more (in the x86-64 specific context), see also http://tinyurl.com/x86-64-assembly http://tinyurl.com/x86-64-assembly
- yeureka 11y agoI know a developer that earns well above 1500£ per day writing and maintaining x86 assembly embedded in C++ for finance applications. That is higher than the going rate for Haskell in finance afaik. So yes, still relevant.
- marssaxman 11y agoHuh. Too bad it's finance. Is there anyone in a non-parasitic industry still paying that kind of money for assembly coding? Maybe I should get back into it. I always loved the low-level world, anyway.
- jackweirdy 11y agoFurthermore, is any non-parasitic industry paying that kind of money for any coding?
- sonthonax 11y agoFurther furthermore, is any non-parasitic industry paying that kind of money for anything?
- nickpsecurity 11y agoHeads of co-ops or well-run businesses (eg Costco)?
- sonthonax 11y agoI have difficulty believing that beyond the rare exception, those who earn over £1500 a day are nothing more than rent seekers who's staying power is more political than based on work and skill.
- nickpsecurity 11y agoOh I agree there.
- asveikau 11y agoWhen I was at Microsoft, at least among several of the better developers, when debugging an issue, many would just ignore source code and enter a bunch of "u" (disassemble) commands into windbg. This is IMHO a great habit if you're writing C or C++. In many cases it ensures less distance between you and a bad pointer dereference. Your code, my code, source code, or none - doesn't matter. Just look at the faulting address and see what it expects. From a certain vantage point, in these languages, if you aren't seeing assembly from time to time, you're not seeing reality. Consequently, I kind of chuckle when I hear people say they can't debug optimized builds.
- mettamage 11y agoI'm a bit surprised by the title of the article. The content was a fun and interesting read. When I read the title I thought to myself: "of course assembly is still relevant!" Which group of people or school of thought would say that assembly isn't relevant? I'm genuinely curious.
- ksherlock 11y agoThe group of people chasing the javascript framework of the week, writing text editors in javascript.
- nickpsecurity 11y ago"writing text editors in javascript" Just 5-10 years ago, that might have been considered a joke. Now I wonder if you're referring to a specific project. And if it's already deployed as a Droplet. ;)
- unimpressive 11y agohttps://en.wikipedia.org/wiki/Atom_%28text_editor%29 https://en.wikipedia.org/wiki/Atom_%28text_editor%29
- nickpsecurity 11y agoUnreal...
- chris_wot 11y agohttps://blog.mozilla.org/blog/2014/03/12/mozilla-and-epic-preview-unreal-engine-4-running-in-firefox/ https://blog.mozilla.org/blog/2014/03/12/mozilla-and-epic-pr...
- nickpsecurity 11y agoOh I've seen plenty of JS stuff. That was the most incredible one I knew of. But a friggin text editor given all platforms have several good ones? And with less bugs & MB than a browser. I mean, come on...
- kabdib 11y agoAn article I wrote a while back, largely about how assembly is not dead: http://www.dadhacker.com/blog/?p=1911 http://www.dadhacker.com/blog/?p=1911 That project was using a CPU costing less than twenty cents to control the power of a consumer product. Code space mattered a lot, and doing the project entirely in a high-level language would have doubled the part cost. When you're talking quantities in the tens of millions, saving ten or twenty cents on the cost of goods is a Big Deal.
- Nano2rad 11y agoAssembly Language is for understanding the processor.It is still relevant for that.
- deleted 11y ago[deleted]