• lad@programming.dev
        link
        fedilink
        English
        arrow-up
        18
        ·
        4 days ago

        I think, the point is Haskell is more CS theoretical than practical language and anyone who uses it (or any other FP) has never written a single line of production code (the last statement is even in the meme)

    • Rusty Shackleford@programming.dev
      link
      fedilink
      English
      arrow-up
      9
      ·
      4 days ago

      Personally, I love that series. I guess whoever made this meme thinks people who watch the show are trying to implement their code examples in production.

    • yogurtwrong@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      3 days ago

      Imperative stoneagers getting an old MacBook from somewhere and going “huh, I guess its UNIX” is probably true though

  • palordrolap@fedia.io
    link
    fedilink
    arrow-up
    22
    ·
    4 days ago

    history | grep -E '(sed|grep|awk|perl)' | wc -l 107

    Dang. That’s out of 1000. I need to up my game. Also three of those seds are part of something with a -basedir and don’t count.

    So yeah, about 10% of my commands are iterating shell pipe things for poops and giggles, I guess.

    … and this got me going down the rabbit hole of writing a filter for my history to pull out the first command on the line. This is non-trivial because of potential preceding variable assignments. Most used commands are currently apt and man and ls. I think apt is a Spiders Georg situation because the system is fairly fresh and I keep finding things that I haven’t installed yet. Also I went through a patch of trying to parse its output.

    … oh, er… unga bunga.

    • flying_sheep@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      3 days ago

      I just use nushell’s builtins instead of wrangling with IFS and bash idiosyncrasies. It’s been years since I’ve corrupted data by parsing text wrong.

      But even if someone doesn’t want that: apart from using it in legacy scripts, grep is just a strictly less useful ripgrep these days, no?

      • dantel@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        2 days ago

        The imperative stoneager feels like the most favored one, there are no real negatives listed there. All that’s listed are things they usually pride themselves on.

      • ulterno@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 days ago

        Yeah, that Mac offended me.
        My imperative programming journey was a few months on a handed down P2 followed by 3 years of pen and paper.

  • potatoguy@lemmy.eco.br
    link
    fedilink
    arrow-up
    28
    ·
    4 days ago

    Hear me out:

    Mixing OOP and functional code to abstract the shit out of everything making 5k loc in around 500 loc in java. You can do magic using this trick.

    • passepartout@feddit.orgOP
      link
      fedilink
      arrow-up
      26
      ·
      4 days ago

      Functional programming in Java is kind of an afterthought and it shows. That’s one of the reasons why Scala was created!

      • Custodian6718@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        2 days ago

        I mean Yeah it is an afterthought in the Sense of that Java was Originally an oop Language but fp in Java was added on very sensibly imo. I use functional Programming in Java a Lot and try to make Everything immutable where I can and honestly coding like that feels clean and very practical.

        • marcos@lemmy.world
          link
          fedilink
          arrow-up
          15
          ·
          4 days ago

          Just let C++ die already, and stop pretending it’s a reasonable thing to compare other languages with.

          If you can’t do it in C, you are better in Java, Python, Haskell, whatever.

      • potatoguy@lemmy.eco.br
        link
        fedilink
        arrow-up
        10
        ·
        4 days ago

        Yeah, Scala is the GOAT, but while I can’t use, why not final everything, use 300 streams and pass Suppliers around?

        (I’m building a lot of libraries at work)

        • silasmariner@programming.dev
          link
          fedilink
          arrow-up
          4
          ·
          4 days ago

          Do people still use vavr? When I wasn’t allowed to use scala that made up for a fair few shortcomings but it’s probably less relevant than it used to be

          • potatoguy@lemmy.eco.br
            link
            fedilink
            arrow-up
            4
            ·
            edit-2
            4 days ago

            I didn’t know about vavr, I think a lot of things from it were added since Java 17, but this Try<T> seems cool.

            Edit: Either would be nice too. I’m going to test some of those things, thanks for the recommendation!

            • silasmariner@programming.dev
              link
              fedilink
              arrow-up
              4
              ·
              4 days ago

              Very pleased to have been of help! I love scala but Java really isn’t too bad (streams API is fine except that you need to explicitly move in and out, rather than getting to do the cool scala thing of just using methods in the phenomenal collections library) and I don’t like dunking on it, but it really does need a few helper libs. Tuples, either and try I think vavr has. Java seems to have covered most other stuff now. But been a half decade since I’ve written more than 10 lines at a time so hasn’t come up for a while. Sorry. Reminiscing. Sunday night blues.

  • freohr@lemmy.world
    link
    fedilink
    arrow-up
    14
    ·
    4 days ago

    Uses neovim with gruvbox theme on arch

    Damn, why are you calling me out personally? Though I use it to write python scripts and LaTeX, not rust…