[HN Gopher] Assembly Language is Number 8
       ___________________________________________________________________
        
       Assembly Language is Number 8
        
       Author : ingve
       Score  : 31 points
       Date   : 2021-11-27 15:56 UTC (7 hours ago)
        
 (HTM) web link (smist08.wordpress.com)
 (TXT) w3m dump (smist08.wordpress.com)
        
       | Someone wrote:
       | FTA: "Tiobe regularly produces a list of the most popular
       | programming languages"
       | 
       | No, they use a nonsensical method to produce some numbers that
       | get them attention.
       | 
       | For example, this month's list sees C go down from a score of
       | 16.21% to 10.72%, so it dropped a third in score, in one month
       | time. Assembly more than doubled from 1.17% to 2.52%, Fortran
       | almost tripled from 0.4% to 1.19%.
       | 
       | You don't even have to see the numbers to question the
       | methodology (https://www.tiobe.com/tiobe-index/programming-
       | languages-defi...). Part of the score is determined by the number
       | of hits for the programming language's name on various Amazon
       | sites and eBay, and they only exclude IMDb.com and Imgur.com
       | because they do not give a result count on searches, Instagram
       | because it doesn't have a search field, and a few sites because
       | they judge them to be porn sites.
        
         | ncmncm wrote:
         | The real question is why TIOBE numbers keep showing up _here_.
         | Who is up-voting these absurd things?
        
           | akkartik wrote:
           | _unvote_
        
         | Buttons840 wrote:
         | You're wrong about the numbers. In Oct 2021, C's score was
         | %11.16.
         | 
         | The change numbers you refer to are over the last year, not the
         | last month.
         | 
         | https://www.tiobe.com/tiobe-index/c/
        
       | tyingq wrote:
       | Guessing maybe a boost from queries where the end user was really
       | looking for WASM.
       | 
       | > _The search query that is used is "<language> programming"_
       | 
       | Google trends, if anything, shows a slight decline for that
       | search term.
        
       | ZiiS wrote:
       | If your methodology tells you VB is more popular then JavaScript
       | you just delete your research and start from scratch.
        
         | yjftsjthsd-h wrote:
         | Don't be absurd... You need to keep the first round for post-
         | mortem analysis to try and figure out what went wrong and how
         | to compensate for it.
        
         | wongarsu wrote:
         | I don't find it _that_ ridiculous to suggest that more people
         | write Excel macros than websites and SaaS services. The world
         | runs on Excel after all
        
       | djmips wrote:
       | I have this hypothesis that Assembly language will continue to
       | gain popularity as the breakneck pace of ever faster processors
       | cools off. People will still want to go faster and assembly
       | language will be looked on as one avenue for that.
        
       | account-5 wrote:
       | Always wanted to learn assembly until I realised it's a different
       | language per device/system.
       | 
       | Where would you even start?
        
         | __s wrote:
         | Start with the system you're on
         | 
         | Or, pull out an emulator & go with a system where people may've
         | been more prone to develop in assembly (eg 6502 & then try make
         | a rom that'll run in an NES emulator)
         | 
         | For the most part once you learn one assembly language you've
         | learnt them all. After load/store/registers/arithmetic/jumps
         | the rest is just details (ofc, if you're programming assembly
         | beyond a hobby, the devil is in the details for performance)
        
         | teddyh wrote:
         | What did you even think that assembly language _was_ , if not a
         | machine-specific language? What you wanted to learn does not
         | currently exist; the closest modern analog might be (at the
         | moment) WebAssembly.
        
           | account-5 wrote:
           | Haha, this was before I'd ever learned any programming. When
           | I'd learned a little programming assembly seemed too
           | complicated. Now I think I'd like to give it a go. But still
           | it's where do you begin, I always struggle with that.
        
           | [deleted]
        
         | MeinBlutIstBlau wrote:
         | [0]: https://www.amazon.com/Introduction-Intel-Assembly-
         | Language-...
         | 
         | Ray Sefarth Introduction to 64 Bit Intel Assembly Language
         | Programming for Linux was what we used in my architecture
         | class. I thought it was good coming from only knowing Java at
         | the time.
         | 
         | That class alone laid the world flat for me in regards to the
         | "totality" of software development. Literally everything comes
         | down to the 1's and 0's running through millions of transistors
         | or whatever they are in the CPU. You are literally sending
         | electric pulses through a rock and getting it to talk :)
        
         | jazzyjackson wrote:
         | i've always been intimidated by assembly (did a lot of arduino
         | programming so i had exposure to AVR assembly but it was always
         | very clever code to e.g. bitbang serial) - never saw the use of
         | learning x86 assembly given that i'll never beat a compiler,
         | but then at a vintage computer festival I heard from multiple
         | people that they genuinely _enjoyed_ writing 6502 assembly.
         | 
         | The 6502 chip is used in the NES, Atari, Commodore, Apple II
         | and other popular vintage machines and is still used in
         | embedded applications including medical implants (i.e.
         | pacemakers)
         | 
         | I started working through this book on making games for the NES
         | and found its explanation of the code samples enlightening.
         | Once I get my bearings I plan to start programming my old Apple
         | IIe.
         | 
         | https://famicom.party/book/
         | 
         | discussed earlier this month:
         | 
         | https://news.ycombinator.com/item?id=29069095
        
         | ncmncm wrote:
         | With what you have. Learn the one you want to program. ARM
         | microcontrollers are available for $2 with a microUSB socket.
         | You can look at compiler output (e g. On Godbolt) to see how
         | things are done. There are lots of tutorials online for getting
         | started programming microcontrollers to talk to LED strings and
         | motion sensors.
        
         | CalChris wrote:
         | Start with the Godbolt Compiler Explorer ( _godbolt.org_ ).
         | 
         | Start by looking at the assembly generated for something you
         | understand and learn to read assembly from that. For example,
         | this is an absolute function:
         | 
         | https://godbolt.org/z/356P1j56W
         | 
         | Try taking out that -O3 and see what happens. Just edit it out
         | and hit return. Oh, you may have to Google _sxtb_ but I think
         | you might be able to guess what it means. You 'll probably end
         | up looking up instructions in the ISA manual. I do that all the
         | time, even for instructions I 'know'. This is the A64 manpage
         | for sxtb.
         | 
         | https://developer.arm.com/documentation/dui0801/g/A64-Genera...
         | 
         | I read a thousand times more assembly than I write, and I write
         | assembly. BTW, Godbolt should be taught in 61C type courses. I
         | just checked and it isn't.
        
           | b3morales wrote:
           | Godbolt is great, but you may as well just do it locally. For
           | example, for clang or gcc, pass `-S` to output asm and `-g`
           | for debug information, which will embed comments in the
           | output to point back to the original source lines that
           | generated that result.
           | 
           | Other compilers should have similar options -- this is what
           | Godbolt is doing under the hood.
        
             | CalChris wrote:
             | Of course you can do it locally. But you can _share_ a
             | Godbolt link.
             | 
             | If you are asking or explaining something on StackExchange,
             | Godbolt is the standard. You can document implementation
             | decisions with Godbolt links in source code (LLVM 13 has 8
             | of them). You can share them on the Discord LLVM channels
             | or in github reviews.
             | 
             | You can examine how the assembly changes by release and
             | optimization level with Godbolt. You compare GCC vs LLVM vs
             | Intel vs ... You can look at how other targets work, arm64
             | vs x86_64 vs ....
        
         | qsort wrote:
         | I would start with a simple one. Don't pick older ISAs because
         | they go wild with addressing modes.
         | 
         | ARM32 or MIPS are good first picks imo.
        
           | AnimalMuppet wrote:
           | 68000 is pretty clean, too.
        
       | wly_cdgr wrote:
       | I have no idea if this has any relationship with reality but it
       | wouldn't surprise me if it does. Assembly has some things that
       | languages like Python and Javascript don't and can't by design:
       | smallness, stability, a relative lack of bullshit garbage and
       | bullshit garbage peddlers
        
       ___________________________________________________________________
       (page generated 2021-11-27 23:01 UTC)