• 0 Posts
  • 115 Comments
Joined 2 years ago
cake
Cake day: June 11th, 2023

help-circle








  • The other day I ordered a burger and they put tomatoes on it even though I asked them not to. I was about to complain, but decided to take a bite anyway and…huh. The tomato had no flavour whatsoever. I used to not like the taste of tomatoes but how could I object to this?

    So what does this mean? Are my taste buds not functioning like they used to? But I spent lunch looking it up and apparently, there is a fair consensus that tomatoes, along with a host of other fruits and vegetables, really are blander today than when I was a kid. For something I never liked, this kind of works out but…


  • I suppose it depends on the language? For the most part I think you’re right. Exceptions are only used (if at all) in situations where a program diverges unexpectedly from its normal flow. But take a language like Python. They’re just everywhere. Even your plain old for loop ends on an exception, and that’s just business as usual.


  • I’ve been playing around with the disabled GIL build and though I use threads fairly extensively in my projects, it’s been smooth sailing so far. I feel like my GUI scripts might be a bit more responsive now? (I tend to farm out user events to dedicated threads, so this is entirely possible.)

    But overall, everything is stable and awesome! I’m so excited! This has been a long time coming for Python.


  • My most common use case is probably looking up stuff that may or may not be in a dict.

    if (val := dct.get(key)) is not None:
        # do stuff with val
    

    I guess that’s pretty similar to what you were doing?

    Sometimes I also use it in some crazy list comprehension thing when I get backed into a corner, though it’s hard to think of an example off the top of my head? It usually happens when I’m in a rush and desperate to get something working, but it has an uncanny way of being just the thing you need at that point.



  • It’s been a long time since I got my astronomy degree, but your version is what I recall also. Whatever small rotational perturbation in the initial gas becomes more pronounced as it coalesces in on itself and defines the plane of the star system. Planets form within this plane after it is defined, and they all travel in the same direction around the star.

    Regarding galaxies, the most common spiral ones like our own Milky Way follow the same principle at a larger scale. But there are also elliptical galaxies, not to mention irregular ones. In an elliptical galaxy, there is a more random movement of stars in a cloud around its core. So they look more 3D I guess, to go back to what the OP was asking about. I seem to recall the most accepted explanation for how these form is from the aftermath of a collision between 2 spirals? So presumably, when our galaxy collides with Andromeda in several billion years time, the resulting combined galaxy may emerge as an elliptical?



  • Sometimes people will say “That person’s name!” or “Those group of people!” in anger. “That Donald Trump! How dare he claim immigrants are eating pets?” to give you a current example.

    When spoken of a family member or mutual acquaintance with a chuckle, it means more like “That person has some strange quirk but what can you do? We still love him.”

    For example, you might hear “That dog! Always chasing his own tail.” So I think this is likely what you were getting from that conversation? It’s certainly not a criticism of your use of the word “people”.




  • There were breaking changes between C and C++ (and some divergent evolution since the initial split) as well as breaking changes between different releases of C++ itself. I am not saying these never happened, but the powers that be controlling the standard have worked hard to minimize these for better or worse.

    If I took one of my earliest ANSI C programs from the 80s and ran it through a C++23 compiler, I would probably need to remove a bunch of register statements and maybe check if an assumption of 16-bit int is going to land me in some trouble, but otherwise, I think it would build as long as it’s not linking in any 3rd party libraries.


  • I think the thing with C++ is they have tried to maintain backward compatibility from Day 1. You can take a C++ program from the 80s (or heck, even a straight up C program), and there’s a good chance it will compile as-is, which is rather astonishing considering modern C++ feels like a different language.

    But I think this is what leads to a lot of the complexity as it stands? By contrast, I started Python in the Python 2 era, and when they switched to 3, I was like “Wow, did they just break hello world?” It’s a different philosophy and has its trade-offs. By reinventing itself, it can get rid of the legacy cruft that never worked well or required hacky workarounds, but old code will not simply run under the new interpreter. You have to hope your migration tools are up to the task.