• 0 Posts
  • 26 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle
  • You can always combine integer operations in smaller chunks to simulate something that’s too big to fit in a register. Python even does this transparently for you, so your integers can be as big as you want.

    The fundamental problem that led to requiring 64-bit was when we needed to start addressing more than 4 GB of RAM. It’s kind of similar to the problem of the Internet, where 4 billion unique IP addresses falls rather short of what we need. IPv6 has a host of improvements, but the massively improved address space is what gets talked about the most since that’s what is desperately needed.

    Going back to RAM though, it’s sort of interesting that at the lowest levels of accessing memory, it is done in chunks that are larger than 8 bits, and that’s been the case for a long time now. CPUs have to provide the illusion that an 8-bit byte is the smallest addressible unit of memory since software would break badly were this not the case, but it’s somewhat amusing to me that we still shouldn’t really need more than 32 bits to address RAM at the lowest levels even with the 16 GB I have in my laptop right now. I’ve worked with 32-bit microcontrollers where the byte size is > 8 bits, and yeah, you can have plenty of addressible memory in there if you wanted.



  • I started in C and switch to C++. It’s easy to think that the latter sort of picked up where the former left off, and that since the advent of C++11, it’s unfathomably further ahead. But C continues to develop and occasionally gets some new feature of its own. One example I can think of is the restrict key word that allows for certain optimizations. Afaik it’s not included in the C++ standard to date, though most compilers support it some non-standard way because of its usefulness. (With Rust, the language design itself obviates the need for such a key word, which is pretty cool.)

    Another feature added to C was the ability to initialize a struct with something like FooBar fb = {.foo=1, .bar=2};. I’ve seen modern C code that gives you something close to key word args like in Python using structs. As of C++20, they sort of added this but with the restriction that the named fields have to come in the same order as they were originally defined in the struct, which is a bit annoying.

    Over all though, C++ is way ahead of C in almost every respect.

    If you want to see something really trippy, though, have a look at all the crazy stuff that’s happened to FORTRAN. Yes, it’s still around and had a major revision in 2018.







  • tunetardis@lemmy.catoProgrammer Humor@lemmy.mlTrue Story
    link
    fedilink
    arrow-up
    12
    ·
    edit-2
    3 months ago

    There is an issue with templated code where the implementation does have to be in the header as well, though that is not the case here. C++20 introduced modules which I guess were meant to sort out this mess, but it has been a rocky road getting them to be supported by compilers.






  • I treat self-checkout as a game with 2 goals:

    1. Make it through the process without getting any help.
    2. Do it as fast as a trained cashier.

    In a good season, my batting average for #1 might be .300, which would not be bad were the game baseball. As far as #2 is concerned, I have never come close. It’s like I throw 30 mph pitches. Things get real when I’m trying to look up bananas or something and the helper comes up behind me. “It’s 4198. Here, let me do it.” Thanks, I already lost #2 and you just made me lose #1…again.



  • Ok, so we’re onto capacitors and fuel cells now. Here we go with my mental image of those.

    On the pros side, capacitors can charge/discharge in an instant, have nearly perfect energy recovery (almost everything you put in comes back out), and have almost limitless charging cycles with no memory effects or any of that nonsense. On the cons side, even a supercapacitor can’t match battery tech for energy storage density and they tend to be not so great for long-term electrical storage.

    Fuel cells are sort of the opposite. Once you’ve sorted out the challenges in producing/storing/transporting hydrogen (these are all non-trivial but not necessarily deal-breakers either?), you’re looking at essentially limitless storage duration since it’s, well, a fuel. Like you can stockpile it for next year. The energy density is enviably high, though with pure hydrogen, you’re doing better by weight than by volume. In any case though, it’s looking pretty good compared to batteries.

    But pulling the energy out of them in a timely manner is a major pain. You need either a chemical or thermal catalyst to speed it along for most applications. And the chemical of choice is platinum, which is not exactly abundant. If you wanted a fuel cell in every car, is there even enough on Earth for that? I’m not so sure.

    Also, I have read impurities in the fuel can really mess up this type of fuel cell. The thermal type is purportedly more forgiving in this respect, though I picture thermal fuel cells as these hulking things that would work best as stationary power plants? Well, maybe they would be a good fit for large ships? It’s hard to picture some giant container vessel plying the oceans on battery power, at any rate.



  • Ok, I am interested in anyone with specific knowledge on this topic indicating whether the first order mental image I have of battery tech is correct?

    The way I understand it is that the highest energy density batteries are your non-rechargeable lithium cells like watch batteries. Rechargeable lithium-ion cells have perhaps half the capacity due to the fact that they need to add measures that prevent these dendrites, as mentioned in the article, from forming. So the Holy Grail here is to develop a rechargeable technology that prevents the dendrite problem without sacrificing capacity so that you can get the best of both worlds? And that is what they are working on here with the solid state design. Am I close to the mark?


  • I’ve been reading up on this a bit. Apparently, the Vulcan Centaur is the ULA’s new rocket which replaces Russian RD-180 engines with BE-4s they sourced from Blue Origin. Blue Origin themselves are working on their New Glenn rocket which will use these engines. It’s interesting that the ULA (United Launch Alliance: Boeing and Lockheed’s rocket company) got to try them out first.

    It’s also interesting that they are powered by methane. If I’m not mistaken, this is the first successful launch of a methane rocket? SpaceX’s Starship also uses methane engines. Apparently, they have a number of advantages over the more traditional kerosene. For example, they don’t leave any residue that can gunk up the works and affect reusability. I am not an expert on any of this, however, so feel free to correct me.