• 0 Posts
  • 9 Comments
Joined 1 year ago
cake
Cake day: August 2nd, 2023

help-circle

  • Nevoic@lemm.eeto196@lemmy.blahaj.zonerule problem
    link
    fedilink
    arrow-up
    2
    ·
    6 months ago

    we have to take Trump at his word

    No we don’t, I’ve never done this and I’m not going to start now. He’s already tried and failed to seize power as a sitting president. He’s proven he’s too incompetent to become a fascist dictator.

    I won’t go as far to say as it’s literally impossible, but the fact that so many liberals now believe in Trump’s ability to overthrow the government just as much as his own supporters is baffling. He’s not a reliable source of information. He’s not intelligent, and he’s not capable. He’s an old, pathetic moron that is on the verge of dying due to age, not some capable fascist mastermind.


  • Nevoic@lemm.eeto196@lemmy.blahaj.zonerule problem
    link
    fedilink
    arrow-up
    2
    ·
    6 months ago

    If the Democrats have any self-interest in holding power, they’ll actually try strategies to regain power. If they lose in 2024 by a percentage that is covered by the green party, they could conclude it’s easier to go left and get Green members rather than pull people from the Trump cult. I’d agree with these future Democrats, I think you’d have very, very little success pulling people from the Trump cult.

    Especially if the people who voted green in 2024 have previously voted Democrat, it showcases that these people are willing to go Democrat if certain material concessions are made.


  • Nevoic@lemm.eeto196@lemmy.blahaj.zonerule problem
    link
    fedilink
    arrow-up
    4
    ·
    6 months ago

    To continue on this, the spoiler effect is a shorterm strategic problem, not necessarily a long term one.

    There absolutely is a strategic difference between

    • 52% Republican

    • 48% Democrat

    and

    • 47% Republican

    • 43% Democrat

    • 10% Green

    The former tells Democrats their only option is to move right to resecure some Republican voters. The latter tells Democrats that they have the ability to also resecure votes from the left by making concessions that to Green Party politics.

    People who say these two situations are literally identical are being disingenuous or ignorant. Even if the same number of Democrats/Republicans voted in both, and the only difference is people who didn’t vote instead voted green, this results in actual differences in signals and potential future policies.

    tldr: voting third party is not identical to not voting, even strategically.



  • Nevoic@lemm.eeto196@lemmy.blahaj.zonedoes this code run rule
    link
    fedilink
    arrow-up
    9
    ·
    edit-2
    10 months ago

    Python’s disdain for the industry standard is wild. Every other language made in the last 20 years has proper filtering that doesn’t require collecting the results back into a list after filtering like Java (granted it’s even more verbose in Java but that’s a low bar).

    If Python had modern lambdas and filter was written in an inclusion or parametric polymorphic way, then you could write:

    new_results = results.filter(x -> x)
    

    Many languages have shorthands to refer to variables too, so it wouldn’t be impossible to see:

    new_results = results.filter(_)
    

    Of course in actual Python you’d instead see:

    new_results = list(filter(lambda x: x, results))
    

    which is arguably worse than

    new_results = [x for x in results if x]
    

  • Most people aren't practicing teachers, so it makes sense that not all explanations are the best. Trying to get an intuitional understanding of passing by reference or passing by value in imperative languages is arguably more important than understanding how map works, and yet I'd argue it's also harder to do.

    If you understand map (not just lists, but futures, IOs, Options, Maybes, etc.) then you understand Functors. Yes there are laws, but mathematical laws here are just encoding our intuition. Something like Iterator in Java may not have laws, but you would expect that calling .next() doesn't modify an SQL database, though it wouldn't be a technically invalid implementation if it did. The same is not true for Functors. If you map over a List and the act of mapping each int to its double modified a database then you wouldn't have a lawful functor. But that should make sense intuitionally without knowing the laws.

    People in OO land are more happy to say they "understand" something if they generally get what the abstraction is going for. Do you know all the methods for Iterator/Iterable in Java? Even if you didn't, you'd likely say you get the "point" of an Iterable. The bar for understanding things in the FP community is usually higher than just understanding the point of something.

    This doesn't mean FP is more complicated. Actually it kind of means it's simpler, because it's not unreasonable for people to totally understand what Functors are for all languages that implement them. The same is not true of Iterable/Iterator. There's no way you'd have more than just an intuition about what Iterable is in a language you don't know. I don't program in Agda or Idris, but I know Functor in those languages are the same as Functor in Scala and Haskell. Same with Monad, Monoids, etc.



  • I think the dislike for Functors/Monads/Monoids etc. is super overrated. I'm not a mathematician, but christ these are beautiful abstractions coming from a background in Java and OO programming.

    Functor instances are defined by one function. Once you learn the one main thing that Functors do (mapping), you'll understand them no matter the language. Monoids have 2, Monads have 2, etc. Yes all there are functions built in terms of the functions required in the typeclass definitions (or several typeclasses), but they don't need to be known to effectively use the abstractions.

    I was able to easily transfer most of my Haskell knowledge to Scala at my last job in the typelevel ecosystem because of HKTs like Functors, Monads, monad comprehensions, Monoids, etc. I was the go-to guy for FP-related questions despite most of my background being in Haskell and not Scala.

    Using an Iterable in Java will be different than an Iterable in any other language in at least some respects. Yes they will represent the same abstract idea, but you can't just 1:1 transfer knowledge between different Iterable implementations.

    I've programmed professionally in Java, Kotlin, Scala, Ruby, Python, JS/TS, and many more in hobbyist settings, and the cleanest transition was Haskell -> Scala (omitting language transitions on the same runtime, so Java -> Kotlin or JS -> TS).