• 0 Posts
  • 562 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle






  • I would argue they don’t know what that means really. Assembly is pretty much a mapping of words to machine code. It’s just a way to make machine code easier to read. It doesn’t actually change how it works.

    A compiler re-arranges and modifies things so what you write isn’t the same as the final program that is created. With assembly it is. It’s not really an abstraction, but a translation. It doesn’t move you further from the machine, it only makes it so you’re speaking the same language.


  • If you want some modern day fun with this, try the Zachtronics programming games; TIS-100, Shenzhen I/O, and Exapunks.

    Or, my personal favorite I only discovered somewhat recently, try Turing Complete. You start by designing all your logic gates from just a negate gate IIRC. You eventually build up an ALU and everything else you need and then create your own computer. Then you define your own assembly language and have to write programs in your assembly language that run on the computer you’ve designed to complete different tasks. It’s a highly underrated game, although it takes a certain type of person to enjoy.


  • This is pedantic, but assembly languages get “assembled” to machine code. This is somewhat similar to higher level languages being “compiled,” which eventually becomes assembly which gets assembled. The major reason why these are different is because a compiler changes the structure of the code. Assembly is a direct mapping to instructions. It just converts the text into machine code directly, which is why it’s easy to go from machine code to assembly but decompiling doesn’t give you identical results to the original source code.

    Also, binary and hexadecimal are just different ways to view the same binary data and aren’t different things. There is only “machine code” which is a type of binary data but you can view binary with any arbitrary base, though obviously powers of 2 work better.



  • Cethin@lemmy.ziptoProgrammer Humor@programming.devCOMEFROM
    link
    fedilink
    English
    arrow-up
    5
    ·
    11 days ago

    A function will be called by code and go to that point in code. To implement functions, you store necessary things to memory and goto the function definition. To implement that with comefrom you’d have to have a list of all the places that need to call the function as comefroms before the function definition. It’d be a mess to read. We almost never care where we are coming from. We care where we’re going to. We want to say “call function foo” not “foo takes control at line x.”




  • It’s an extremely unlikely situation, and the same thing can happen with an ICE. An ICE is, in fact, much more likely to experience mechanical failure. For either the solution is the same: you have to get towed.

    Luckily if it’s just needing a charge there are other options than a fast charge station. You can go to an RV park and get a faster than a regular outlet charge, or go somewhere with a regular power outlet and ask if you can use it. Either of those could require spending the night, depending on how much you need, but it is very unlikely to be required and they are possible.


  • Oh, the charging station. Charging port I think would mean the port it plugs into on your car. Yeah, I guess that could be an issue, but it’s not really something that needs to be considered by a consumer. The fact that you’re much less likely to have mechanical issues I think more than makes up for the rare case of vandalism, which can happen to any piece of the infrastructure, for gas and electric.





  • Cethin@lemmy.ziptoxkcd@lemmy.worldxkcd #2948: Electric vs Gas
    link
    fedilink
    English
    arrow-up
    38
    arrow-down
    6
    ·
    edit-2
    12 days ago

    The reason why you may be able to diagnose an ICE by sound is because they’re complex. That’s not a positive. An electric motor has just a few moving parts. If it goes bad you don’t really need to work to figure it out and fix it.

    The rest of the arguments can be made, but as you imply they’re disingenuous. The sound one is just not a benefit at all.