• 0 Posts
  • 65 Comments
Joined 10 months ago
cake
Cake day: August 4th, 2023

help-circle
  • modeler@lemmy.worldtoProgrammer HumorSwitching to OCaml bois
    link
    fedilink
    arrow-up
    12
    arrow-down
    1
    ·
    2 days ago

    I don’t think that the anti-oop collective is attacking polymorphism or overloading - both are important in functional programming. And let’s add encapsulation and implementation hiding to this list.

    The argument is that OOP makes the wrong abstractions. Inheritance (as OOP models it) is quite rare on business entities. The other major example cited is that an algorithm written in the OOP style ends up distributing its code across the different classes, and therefore

    1. It is difficult to understand: the developer has to open two, three or more different classes to view the whole algorithm
    2. It is inefficient: because the algorithm is distributed over many classes and instances, as the algorithm runs, there are a lot of unnecessary calls (eg one method on one instance has to iterate over many instances of its children, and each child has to iterate over its children) and data has to pass through these function calls.

    Instead of this, the functional programmer says, you should write the algorithm as a function (or several functions) in one place, so it’s the function that walks the object structure. The navigation is done using tools like apply or map rather than a loop in a method on the parent instance.

    A key insight in this approach is that the way an algorithm walks the data structure is the responsibility of the algorithm rather than a responsibility that is shared across many classes and subclasses.

    In general, I think this is a valid point - when you are writing algorithms over the whole dataset. OOP does have some counterpoints encapsulating behaviour on just that object for example validating the object’s private members, or data processing for that object and its immediate children or peers.


  • I’m going to suggest food items that we still take from nature and eat with minimal preparation:

    • Honey
    • Fish like salmon, trout, grouper
    • Shellfish (eg oysters)

    We have evidence of shellfish and fish being eaten for a very long time - at least the middle stone age at 140kya - in middens which are 10s of thousands of years old.

    Honey is likely to have been a food source - a treat even - even before humans left Africa (so before 100kya) but sadly this would be invisible in the archeological record




  • modeler@lemmy.worldtoScience Memes@mander.xyzCalculus made easy
    link
    fedilink
    English
    arrow-up
    18
    ·
    edit-2
    1 month ago

    I must not use jargon.

    Jargon is the mind-killer.

    Jargon is the little-death that brings total confusion. I will face the jargon. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the jargon has gone there will be clarity. Only sense will remain.



  • Sorry for taking a long time to reply.

    with plain old binary fission cell division, how do you get both to divide at the same time, and give each cell one of the new organelles?

    An excellent question! Luckily it was answered in the paper. The researchers actually had a high resolution soft x-ray movie of cell division (ok, an exaggeration, they had a few micrographs showing the sequence). In the sequence, it showed how the organelles (including the novel N2 fixation one) undergoing division and each ‘child’ organelle ending up in different halves.

    Cell division is controlled in the cell by an amazing process:

    • 2 centres are created on opposite sides of the cell
    • Structures like tethers are built that connect each centre to each of the organelles (the nucleus, mitochondria and the N2 fixators). These are called microtubules
    • The microtubules then start shortening, pulling the organelles in two directions, separating them.

    The x-ray micrographs show that the N2 fixators are already integrated into this mitosis mechanism - my guess is that the N2 fixators already ‘understand’ the parent cell’s mitosis signaling.

    The authors also say that the organelles have lost a number of genes for essential cellular functions, relying on the parent cell to provide those capabilities. By comparison, mitochondria have only 37 genes left, and chloroplasts weren’t known for having any DNA when I was at school, but are now known to have about 110 genes.

    In other words, a lot of evolution has already occurred and they are well on the way to being ‘proper’ organelles.




  • “DI frameworks” are Satan’s farts. Classpath-scanning nonsense that turns compile-time errors into runtime errors. Not only is your Ctr still coupled to your Svc, but both are now coupled to Spring.

    Let’s qualify this: DI frameworks that use configuration files to specify the dependencies are Satan’s farts. You can use the DI pattern but do the injection in source code to get full compile-time type checking and all the benefits of a fully packaged JAR or similar binary. The root of the evil is having text files as part of the packaging, and not having the tooling to treat those files as part of the source code at build time.


  • This is a brilliant idea - not just because it solves the problem of too many homeopaths but because of the way homeopathy ‘works’.

    Homeopathy is the idea that “like treats like” (the homeo is latin for “the same”). So typically the homeopath looks at the symptoms of the disease, finds some poison that causes the same symptoms, then dilutes the hell out of it.

    In this case, what are the symptoms that homeopathy causes? Dumbness. So the ground up homeopath pills would be ideal for treating homeopath users and practitioners. And the Gwyneth Paltrow crowd. So many birds with one stone!


  • As I was discussing this with my partner we summarised this as:

    Humans have always had the capacity for violence and murder; as populations grew, acts of violence could be larger, both in terms of number of combatants and also length of time of continuous fighting. This is a progression of:

    • Small bands of people skirmishing with neighbours to
    • Towns sending small raiding bands to
    • Cities fielding an army for a summer campaign to
    • Empires furnishing professional armies and sending them on multi-year campaigns, to
    • Nation states using advanced logistics to maintain millions of soldiers in the field for years at a time.

    Somewhere between city-states and full modern nation states, there have been full on campaigns of genocide. But genocide can be thought here definitionally as only possible with some significant number of people.

    Unfortunately there is a deep dark part of the human psyche that has always been with us.


  • I hear what you’re saying, but there’s a counterpoint to this.

    In prehistoric times, population densities were low. In mesolithic times (hunter gatherers) there were simply no concentration of people large enough to wipe out or to do the killing. Nothing could be called genocide at this time.

    In neolithic times (the first farmers) violence was definitely a part of life. Some early towns do show signs that they were destroyed. But again, population densities are low enough that the scale of violence would not be enough to call ‘genocide’. It’s a town burnt down with everyone murdered, not a ‘people’ - whatever that might mean at this time. This is not about egalitarianism - it’s population density.

    However as we move to the bronze age, there are definitely signs that large scale events occur that might fit into the modern concept of genocide but archeological evidence is severely lacking. The main line I would argue is that the male lines of the neolithic farmers in Europe are hammered and almost completely replaced with the Yamnaya Y chromosomes across a huge expanse - from the east european plains to the Iberian peninsula. Genetic continuity with the neolithic farmers is maintained though indicating that male newcomers were having children with local women, and very few male locals had children. During this event the culture changed hugely - burial patterns, material goods, etc.

    I don’t know if we can call this genocide - at least the full modern concept - because these changes took centuries to roll out across the expanse of Europe, but they speak to local conquests and, at the very least, the newcomers prevented local males from having their own families. At worst you can imagine a constant expansion of this new culture taking control of new areas, killing the men, taking local women as concubines and eradicating their gods, customs and ways of living. Quite a lot of genocidal checklist items ticked off there.

    By the mid to later bronze age, genicide is definitely a widespread thing, recorded in many texts.




  • Elon sounds like he’s experienced, skilled and is approaching things from a theoretical or ethical or other grand point of view. He used to impress me with his approach on building an electric car company with full self-driving vehicles in the 2010’s. I wasn’t a full believer, but I thought he was competent and wanted Tesla to succeed.

    Then he went and bought Twitter. As a software engineer all my life, and in the startup scene, and having worked in a failed social media platform, I have some experience. Everything he’s said about Twitter is crap and everything he’s done is stupid. And the results speak for themselves.

    I’ve seen people say that Elon sounds great about things they don’t know too much about. But when the topic comes to things they do understand, Elon clearly is wrong.

    He started his career with hundreds of millions of dollars, and he bet it all on a couple of businesses be bought (he was never a founder, always a purchaser).

    Basically he’s been lucky twice (Paypal and Tesla), but each of these won 10-100x on his initial stake.