• 7 Posts
  • 263 Comments
Joined 2 years ago
cake
Cake day: June 18th, 2023

help-circle

  • I wholeheartedly agree: In my job, I develop mathematical models which are implemented in Fortran/C/C++, but all the models have a Python interface. In practice, we use Python as a “front end”. That is: when running the models to generate plots or tables, or whatever, that is done through Python, because plotting and file handling is quick and easy in Python.

    I also do quite a bit of prototyping in Python, where I quickly want to throw something together to check if the general concept works.

    We had one model that was actually implemented in Python, and it took less than a year before it was re-implemented in C++, because nobody other than the original dev could really use it or maintain it. It became painfully clear how much of a burden python can be once you have a code base over a certain size.



  • I have next to no experience with TypeScript, but want to make a case in defence of Python: Python does not pretend to have any kind of type safety, and more or less actively encourages duck typing.

    Now, you can like or dislike duck typing, but for the kind of quick and dirty scripting or proof of concept prototyping that I think Python excels at, duck typing can help you get the job done much more efficiently.

    In my opinion, it’s much more frustrating to work with a language that pretends to be type safe while not being so.

    Because of this, I regularly turn off the type checking on my python linter, because it’s throwing warnings about “invalid types”, due to incomplete or outdated docs, when I know for a fact that the function in question works with whatever type I’m giving it. There is really no such thing as an “invalid type” in Python, because it’s a language that does not intend to be type-safe.


  • True, I did a quick calculation and the probability of knowing someone killed or severely injured is

    • 12.5% if you know 10 people
    • 23.5% if you know 20 people
    • 33.5% if you know 30 people
    • 41.5% if you know 40 people
    • 49% if you know 50 people

    So around ⅓ Russians know at least one person that’s been killed or wounded, and around 10-20% of Russians have someone in their inner circle of friends and family (10-20 closest) that have been killed for wounded.

    For this last number to reach 50%, the number of killed+wounded needs to reach about 5% of the fighting age population (≈2.5 million).

    Of course, the above assumes that casualties are randomly distributed in the population. In reality it’s likely that fewer people know someone killed or wounded, and that those that know someone likely know more, because of the casualties being disproportionately effecting more rural regions of the country.


  • Thank you for the kind response!

    I was kind of considering that you might have meant the question that way (“why does nature obey whatever underlying law there is”), but as you say, it quickly takes us into philosophical territory.

    If I were to give my honest opinion on that as a scientist, I would say that we can never know what the true, underlying guiding principles of the universe are, or even if there are any at all. We can only ever measure the laws of the universe indirectly through observations. This precludes us from ever being 100% certain about the true underlying principles that guide what we’re observing, or even if there are any.

    As an example, there’s a hypothesis (can’t recall what it’s called) which postulates that the entire universe is in an unstable state. If that hypothesis is correct, the laws of nature as we know them could in fact change abruptly, with the change propagating at the speed of light. This change could amount to stuff like changing fundamental constants, which would pretty much break the universe as we know it.



  • I have to be honest: It does confuse be a bit how they’re able to get away with this. There’s this uproar now about the wealth tax (1), which I partly understand, because if your business isn’t turning a profit, and you’re forced to pay taxes based on the value of the shares, you have a problem. However, some people are apparently capable of buying houses, boats and cars, as well as living a lavish lifestyle, while still having a “zero” in their income. My guy, how are you buying food and houses without having a taxable income?

    I think the wealth tax is a good place to start, but as of now it seems to me like it isn’t specific enough. We need some way to ensure that

    • If you want to buy something, you need either income or a loan.
    • If you want to pay your loans you need income.
    • If you have income, it is taxed.

    so that we can ensure that the money these people are getting from somewhere is appropriately taxed, while avoiding hurting people that own a company with millions in assets (e.g. in equipment), but aren’t cashing out anything from the company (e.g. aren’t buying expensive shit for themselves). Of course, “benefits” like getting a house, meals, or a yacht as a “gift” from your company should be taxed appropriately.

    (1) For non-Norwegians: We’ve recently introduced a tax based on your current wealth, rather than income





  • Exactly this… I’ve been called out before for saying that someone (who was french) “looked french”, with the implication that it was racist of me to imply that people from different countries typically have subtly different features.

    Of course, you can’t always tell where someone is from based on how they look, act, or speak, but pretending that there aren’t certain phenotypes that are more common some places than others is just ignoring what we can observe. It’s not always easy to pinpoint exactly what it is, but people generally have an idea of what a “typical southern/western/eastern/northern european”, looks like (or any other area of the world for that matter), and often that intuition will be correct. This is not racism, it’s simply the fact that after seeing a bunch of people from some country or region, you build a pattern for what phenotypes are typical in that region. Racism is when you decide to assign more worth to some phenotype or ethnicity than another, which is a whole different thing.

    Basically, recognising that people are in fact different is not racism. Determining someones worth or quality of character based on differences in phenotype is.


  • That depends on what level you’re working at: If you hire a company to do electrical work as a part of your construction project, you’ll typically rely on that company to provide paperwork confirming that everything is in order. As your company does not have the qualifications to do the certification (hence why you are hiring a subcontractor), you cannot be expected to cross-check the work.

    If the building catches fire due to an electrical failure, it’s the subcontractor that signed off on the paper whose held liable, not the company that delivered the end-product.

    Similarly, if I buy a product and receive a certificate that it holds some standard, I’m permitted to assume the certificate is valid and re-sell the product, unless there’s some express reason I should have understood that something is wrong.


  • To that I would answer that things don’t “obey the laws of physics” in any greater sense than that the “laws” of physics are principles that we’ve formulated based on how we’ve observed that nature behaves.

    We have exactly zero proof that there is some inherent property of nature that always and forever will prevent heat from moving from cold to hot, even though that would violate the second law of thermodynamics. It’s just that we have never observed a process that violates the second law (people have tried very hard to break this one), and have a decent explanation for why we’re not able to break it.

    If some process is developed or observed that violates the “laws of physics”, that just means we need to figure out where the “laws” are wrong, and revise them, which is how science moves forwards!

    So short answer: Things obey the laws of physics, because whenever we observe something that breaks the laws, we revise the laws to allow for the newly observed behaviour.

    This is what makes science fundamentally different from most belief systems: The only core principle is that anything can at any time be disproven, and everything we think we know is potentially wrong. By truly internalising that core belief, there’s no amount of proof that can turn your worldview upside down, because your core principle is that everything you think you know is potentially wrong, only being a more or less good approximation to the true underlying nature of the universe, which we can never really know anything about.


  • I would argue that the Higgs mechanism is just that: A mechanism for explaining where mass comes from. You could explain charge in a similar way by saying “because the particles are made of a certain amount of up or down quarks”.

    Neither of these explanations answer the underlying question “but why does the Higgs mechanism give things mass?” or “but why do up/down quarks give things charge?”.

    My point is that, at some stage, you get to the point of “the Higgs boson has mass because it’s an intrinsic property of the Higgs boson”, which is tantamount to “they just do”.


  • To be fair, if the lead is added by a middle man selling to the company, then the company isn’t making any more money.

    I can definitely see a situation where that’s the case. It would be comparable to buying something off someone, you look at it and it looks like everything is in order, after you sell it on it turns out the stuff was stolen.

    I’m not 100% sure, but I don’t think you can be held accountable in such a situation unless it’s proven that you either knew or should have known that you were selling stolen goods.



  • Unironically, magnetism is similar to charge, which is similar to mass.

    You (probably) wouldn’t ask “But why does an atom weigh anything?” or “why do opposite charges attract?” All these things are just intrinsic properties of matter: they just have them.

    So the answer to questions regarding why anything has mass/charge/magnetic moment really come down to “they just do.”

    Now, if you want to talk about how and why magnets work at a macroscopic scale, we can have a long and interesting chat about long range ordering and phase transitions, but I’ll leave that for now :)