6 ms·
> Assembler is like Shakespearean English. It’s dated. A shrinking number of people can deal with it. But it’s also elegant and highly functional. What is con
by rnestler 9y ago
> Assembler is like Shakespearean English. It’s dated. A shrinking number of people can deal with it. But it’s also elegant and highly functional.
What is considered elegant and functional about assembly?
- TheSoftwareGuy 9y agoI've always thought the formatting kind of lends itself to a little bit of visual elegance. Since its always 1 instruction per line, various instruction fields tend to line up nicely. But yeah I don't see how it is elegant in any way that's useful
- zmonx 9y agoAlthough it may appear a bit surprising at first, assembly language is homoiconic in the sense that you can easily reason about the program code within the language: It is easy to reason about bytes in assembler language, and compiled assembler code is just a sequence of bytes. This is similar to high-level languages like Lisp and Prolog, whose code is readily represented by built-in data structures in the respective language. A fun fact about this is that extremely low-level (like assembly) and extremely high-level (like Prolog) languages are homoiconic, but there is a large gap "in the middle" (like Java, C), where there are many languages that lack this property.
- DonHopkins 9y ago6502 assembly is one of the sharpest smoothest most beautiful assembly languages, because all the opcodes are three letters long, so it doesn't have a jagged serrated right edge like most other assembly languages. Much less friction!
- whataretensors 9y ago> Assembler is like Shakespearean English. Author has no idea what assembler is.
- anta40 9y agoProbably he's not a programmer?
- coldacid 9y agoYeah, it's more like the individual phonemes that make up each word of every statement.
- archgoon 9y agoThat, or instructions for controlling tongue positions and vocal chords.
- Izkata 9y agoAh, but with how English has shifted over the centuries, the necessary domain knowledge has slowly been disappearing. Shakespeare's plays now and then [0] are slightly different (and back then, dirtier) because of it. (Jump to 2:30 for an explanation and example, then at 7:58 is the dirty pun that doesn't exist in modern pronunciation.) [0] https://www.youtube.com/watch?v=gPlpphT7n9s https://www.youtube.com/watch?v=gPlpphT7n9s
- jacquesm 9y agoIt's about as elegant as a mechanical watch is versus an electronic one, it has a ton of moving parts and it is a tricky thing to maintain. It's functional in that it gets the job done, I highly doubt they meant functional in the functional programming sense of the word.
- saidajigumi 9y agoAn age ago, I wrote a fast interrupt handler in assembler that was, under its somewhat severe operating constraints, "elegant and functional." That was about a page of code, commented in two-column format, a sort of side-by-side tutorial. There were more lines of comments than lines of code. Even with that, the junior engineers (familiar with assembly!) were completely flummoxed by it. Domain knowledge encoded in assembly rapidly becomes highly obfuscated, even when written in a literate programming style. I simply cannot imagine calling large-scale enterprise business logic written in assembly "elegant and functional" for any reason. Even the best written, best documented assembly obfuscates so much meaning .
- tschwimmer 9y agoThe Shakespeare analogy is perhaps more apt than the writer imagined. A popular version of Shakespeare’s plays have the original text on the left hand pages and commentary and definitions on the right. This is what I imagined what your interrupt handler looked like.
- monocasa 9y ago> Tao of Programming 8.3 > There was once a programmer who wrote software for personal computers. "Look at how well off I am here," he said to a mainframe programmer who came to visit. "I have my own operating system and file storage device. I do not have to share my resources with anyone. The software is self-consistent and easy-to-use. Why do you not quit your present job and join me here?" > The mainframe programmer then began to describe his system to his friend, saying, "The mainframe sits like an ancient Sage meditating in the midst of the Data Center. Its disk drives lie end-to- end like a great ocean of machinery. The software is as multifaceted as a diamond, and as convoluted as a primeval jungle. The programs, each unique, move through the system like a swift-flowing river. That is why I am happy where I am." > The personal computer programmer, upon hearing this, fell silent. But the two programmers remained friends until the end of their days. And I have heard cool things about mainframe assembly programs (at least on z/TPF). Like a system to do code upgrades without hardly any downtime by pausing the VM, doing brain surgery on it, then resuming it.
- agumonkey 9y agoThe more I study functional programming the more I see a mapping between structures (reduce/fold,...) and assembly. Assembly requires you to be very very careful, but if you're used to that you can encode these patterns in short ways. But it's a lost art nowadays.
- gbacon 9y agoThat's opposed to the view often put forward by FP advocates. Tell us more.
- agumonkey 9y agoOld cpus had a simpler arch (68000 ancestor or something like that), often with two registers A,B serving as accumulator,next pair for reduce/fold like processes. To me it's clearly a reflection of mathematical structures, which are also the root of FP. With time register sets grew, ISA grew, this got muddied by usage.
- magissima 9y agoFor that matter, I take issue with the idea that Shakespearean English is any more elegant or functional than contemporary English. I would consider the poorly standardized spelling and, to an extent, grammar, to be pretty damn inelegant!
- anfilt 9y agoNot the exact description I would give assembler. However, I would agree that it can be very elegant and efficient. Although, not all assembly code is like that. Further, you depend on the device it written for to still be around. However, I don't see a problem with assembly so that fact they are just converting to just convert it. Seems a bit frivolous. If they are having trouble hiring assembler programmers that's kinda a different issue. However, one nice thing is that any can program in assembler and well tend be good programmers. They know what they are doing. So by switching languages they open themselves up to worse programmers. However, Java why? If they are coding in assembly wouldn't C make more sense?
- protomyth 9y agoI actually liked programming IBM/370 assembler. It wasn't half bad once you got past EBCDIC. It was certainly better than the x86. It also was pretty much eternal. I think I still have my banana book somewhere. https://i.pinimg.com/originals/fb/85/89/fb85890d32df071cf842026e9d459803.jpg https://i.pinimg.com/originals/fb/85/89/fb85890d32df071cf842... http://cbttape.org/~jmorrison/s370asm/html/tut-REFSUM-001.html http://cbttape.org/~jmorrison/s370asm/html/tut-REFSUM-001.ht...
- chx 9y agoThis is not just S/370 assembler, the real ancient parts are IBM 7074. See for example https://books.google.ca/books?id=3iEDAAAAMBAJ&pg=PA88&lpg=PA88&dq=%22IBM+7074%22+%22irs%22&source=bl&ots=A_DZmgVBL7&sig=2cAXb5oG_JypmSU_jCa5fqbPqaY&hl=en&sa=X&ved=0ahUKEwjpvuvM2qbZAhVGwWMKHdbXA0YQ6AEINjAD#v=onepage&q=%22IBM%207074%22%20%22irs%22&f=false https://books.google.ca/books?id=3iEDAAAAMBAJ&pg=PA88&lpg=PA... but I read some protocol docs that some of the data is still encoded as it was in the 7074.