• @kickeriekuh@discuss.tchncs.de
      link
      fedilink
      Deutsch
      122 days ago

      Kia domaĝo. La unua programlingvo kiun mi lernis estis Python. Ĝi multe helpis min kompreni programadon kaj lerni aliajn programlingvojn. Simile estas kun Esperanto. Ĝi helpis min lerni la francan kaj faciligis la lernadon de alia gramatikaĵo.

      Ho, kaj mi ankoraŭ povas paroli Esperanton.

    • @Wiz@midwest.social
      link
      fedilink
      English
      222 days ago

      Mi pensas ke, vi volis tajpi, “Python (aŭ Pitono) malfeliĉigas min.”

      • Mal : Opposite
      • Feliĉ- : Happy
      • Ig : Makes (Transitive verb)
      • As : Present tense.

      “Mi malfeliĉas.” : I’m sad.

      “Pitono malfeliĉigas ĉiujn.” (Python makes everyone sad.)

  • I Cast Fist
    link
    fedilink
    1922 days ago

    Java, verbose? laughs in Pascal

    Python being Esperanto? Yeah, no, because Python is actually being used

  • @Lysergid@lemmy.ml
    link
    fedilink
    1822 days ago

    Can anyone actually tell what exactly complicated in Java? Verbose, maybe it was at some point but I find it very straightforward and easy.

    • @dejected_warp_core@lemmy.world
      link
      fedilink
      5
      edit-2
      22 days ago

      Java itself is kind of blissful in how restricted and straightforward it is.

      Java programs, however, tend to be very large and sprawling code-bases built on even bigger mountains of shared libraries. This is a product of the language’s simplicity, the design decisions present in the standard library, and how the Java community chooses to solve problems as a group (e.g. “dependency injection”). This presents a big learning challenge to people encountering Java projects on the job: there’s a huge amount of stuff to take in. Were Java a spoken language it would be as if everyone talked in a highly formal and elaborate prose all the time.

      People tend to conflate these two learning tasks (language vs practice), lumping it all together as “Java is complicated.”

      $0.02: Java is the only technology stack where I have encountered a logging plugin designed to filter out common libraries in stack traces. The call depth on J2EE architecture is so incredibly deep at times, this is almost essential to make sense of errors in any reasonable amount of time. JavaScript, Python, PHP, Go, Rust, ASP, C++, C#, every other language and framework I have used professionally has had a much shallower call stack by comparison. IMO, this is a direct consequence of the sheer volume of code present in professional Java solutions, and the complexity that Java engineers must learn to handle.

      Some articles showing the knock-on effects of this phenomenon:

    • @beveradb@lemm.ee
      link
      fedilink
      322 days ago

      Char count for same functionality is still at least double in java vs python. It just feels like a chore to me. jetbrains helped, but still python is just so light

      • @Lysergid@lemmy.ml
        link
        fedilink
        7
        edit-2
        22 days ago

        Char count is poor complexity metric. Perl is better than Python with your logic as it is more condensed.

    • @houseofleft@slrpnk.net
      link
      fedilink
      English
      822 days ago

      I think a lot of it is “ceremony”, so it’s pretty common in java to:

      • create a get method for every object variable
      • create a set method for every object variable

      Then add on top that you have the increased code of type annotations PLUS the increased code of having to check if a value is null all the time because all types are nullable.

      None of that is hugely complicated compared to sone of the concepts in say Rust, but it does lead to a codebase with a lot more lines of code than you’d see in other similar languages.

      • @houseofleft@slrpnk.net
        link
        fedilink
        English
        422 days ago

        Before someone says it, I know a lot of this stuff doesn’t need to be done. I’m just giving it as examples for why Java has the rep it does.

        • @WhyJiffie@sh.itjust.works
          link
          fedilink
          English
          222 days ago

          i still don’t understand. is it easier in python or JS to make getters and setters? with python my experience has been the opposite, with the decorator based solution in mind.
          or if the problem is that they exist, as an option to be used, why is that a problem? they can be implemented in any other language, and it can be useful.

          then yeah, you should check for nulls. just like for None’s in python, or if you have the correct type at all, because if it’s entirely different but ends up having a function or variable with the same name then who knows what happens.
          then in javascript besides null, you also have undefined and NaN!

        • @WhyJiffie@sh.itjust.works
          link
          fedilink
          English
          322 days ago

          i still don’t understand. is it easier in python or JS to make getters and setters? with python my experience has been the opposite, with the decorator based solution in mind.
          or if the problem is that they exist, as an option to be used, why is that a problem? they can be implemented in any other language, and it can be useful.

          then yeah, you should check for nulls. just like for None’s in python, or if you have the correct type at all, because if it’s entirely different but ends up having a function or variable with the same name then who knows what happens.
          then in javascript besides null, you also have undefined and NaN!

          • @houseofleft@slrpnk.net
            link
            fedilink
            English
            122 days ago

            It’s not easier to do getters or setters but especially in python there’s a big culture of just not having getters or setters and accessing object variables directly. Which makes code bases smaller.

            Same with the types (although most languages for instance doesn’t consider None a valid value for an int type) Javascript has sooo many dynamic options, but I don’t see people checking much.

            I think it boils down to, java has a lot of ceremony, which is designed to improve stability. I think this makes code bases more complex, and gives it the reputation it has.

    • @frezik@midwest.social
      link
      fedilink
      12
      edit-2
      22 days ago

      Its standard library reads like someone’s Object Oriented Programming 101 final project, and they probably got a B- for it. Everything works and follows OO principles, but they didn’t stop to think about how it’s actually going to be used.

      Let’s try to read a file line-by-line:

      BufferedReader reader = new BufferedReader(new FileReader("sample.txt"));
      String line = reader.readLine();
      

      We’re having to instantiate two objects (FileReader and then BufferedReader) just to get an object that has a readLine() method. Why? Can’t BufferedReader take a file name on its own and work it out? Or FileReader just provides readLine() itself?

      Not only that, but being parsimonious with what we import would result in:

      import java.io.BufferedReader;
      import java.io.FileReader;
      

      But we’re much more likely to be lazy and import everything with import java.io.*;. Which is sloppy, but I understand.

      I can see what they were thinking when separating these concerns, but it resulted in more complexity than necessary.

      There’s a concept of “Huffman Coding” in language design. The term itself comes from data compression, but it can be generalized to mean that things you do often in a programming language should be short and easy. The above is not good Huffman Coding.

      • @Lysergid@lemmy.ml
        link
        fedilink
        4
        edit-2
        22 days ago

        Library built this way because it supposed to be flexible and provide ground for complex usecases. It can only be flexible if your API works with simple abstractions which you can then compose. It’s not driven by “I need this specific utility for this specific scenario”. That would be zoo you have in JS where you have 10 ways to iterate over array and 9 of them wrong for your scenario.

        Java’s OO is great because they design library with SRP in mind making sure there is few but good ways to do things.

        BufferedReader cannot accept file name because it makes arbitrary reader… well buffered. It’s not BufferedFileReader, even that would accept something like Path or File, not string, because File can be remote file, should Reader now know all possible local and remote protocols and path formats? What else it must do?

        Having it designed the way it is, allows Java to have utilities for various scenarios. Your scenario covered by standard lib too. See Files.readAllLines which, surprise-surprise, built on top of BufferedReader.

        • @vzq@lemmy.blahaj.zone
          link
          fedilink
          122 days ago

          Library built this way because it supposed to be flexible and provide ground for complex usecases.

          It’s definitely that, and not the fact that it was written in the first half of the nineties when everyone and their mother was all in on OOP/OOD to the detriment of usability.

        • @frezik@midwest.social
          link
          fedilink
          422 days ago

          BufferedReader cannot accept file name because it makes arbitrary reader… well buffered. It’s not BufferedFileReader, even that would accept something like Path or File, not string, because File can be remote file, should Reader now know all possible local and remote protocols and path formats? What else it must do?

          You’re just describing the problem. Yes, I see where they’re going with this. It’s still a usability nightmare. I can’t think of another language that makes you jump through hoops like this on IO, and they get along fine without it.

          • @PlexSheep@infosec.pub
            link
            fedilink
            222 days ago

            I agree with you. It’s a neat design idea to make things a bit more maintainable perhaps, but it’s just annoying to program with.

  • @CanadaPlus@lemmy.sdf.org
    link
    fedilink
    18
    edit-2
    23 days ago

    Гарантийный без ошибки памятей!

    I unironically think it would be hilarious to write a borrow-checked version of Адрес. (The Soviet version of C - or rather C is a version of it, given that Адрес was first compiled in '55)

      • @CanadaPlus@lemmy.sdf.org
        link
        fedilink
        1
        edit-2
        22 days ago

        Not surprised. The Russian Wikipedia page on it is just a stub. The English one is actually longer.

        I can’t find any online introductions to it or compilers for it either, in English or написал по-Русски. Or Ukrainian for that matter, assuming I’d know it if I see it, although the Wikipedia page is longer.

  • @ZILtoid1991@lemmy.world
    link
    fedilink
    1322 days ago

    This is highly inaccurate:

    D: Esperanto. Highly derivative of C (Latin), designed by people previously writing compilers. It’s not being taken seriously as such.

    Russian is nowadays being speaken by right-wing authoritarians instead, and any programmer that is auth-right is either coding in C/C++, or a Javascript/Python dev pretending to be a C/C++ dev to “gatekeep” nulangs (sic).

  • @BatmanAoD@programming.dev
    link
    fedilink
    1323 days ago

    Surprised nobody has complained so far about the Rust comparison. I guess any objection would appear to prove the point, or at least reinforce the “evangelist” stereotype.

  • @vga@sopuli.xyz
    link
    fedilink
    39
    edit-2
    22 days ago

    PHP is Russian. Used to be huge, caused lots of problems, now slowly dwindling away. Its supporters keep saying how it’s still better than the competition.

  • nifty
    link
    fedilink
    88
    edit-2
    23 days ago

    Is this post sane-washing Russia? What’s left about Russia under Putin? Overall funny, though

          • @chaogomu@lemmy.world
            link
            fedilink
            1423 days ago

            Tried a bunch, but tried wrong.

            The Lenin model of communism is inherently flawed for one simple reason. An Authoritarian Communism is an Impossibility. It cannot exist by pure definition.

            The true ideal communism is a stateless utopia.

            So yeah, the Lenin model is flawed to the point of uselessness. Or worse because any authoritarian government is going to kill its own citizens, while also being a low grade threat to neighboring countries.

            No. The only path to true communism is via democracy. And there are countries that are moving in that direction.

            • anti-idpol action
              link
              fedilink
              3
              edit-2
              22 days ago

              The party was meant to just be the organizer of the workers, not the ruler. The degeneration took off only after Lenin’s death and the 4th Congress of the Comintern, which was dominated by Troika. that’s why Mayakovsky was a devout Bolshevik until Stalinzation advanced and started scrapping several progressive conquests of October, leading to his suicide at the refusal to prop up the Stalinist degeneracy.

              Also Lenin was, for instance, not a big fan of the many experimental artistic movements that flourished after the Revolution, but did not suppress them, unlike Stalin.

              He also regretted banning other parties (but which was necessitated by every single one of them taking up arms against Sovnarkom) and before his death wanted to offer Trotsky a post of Commisar of Internal Affairs in a desperate bid to curtail the bureaucracy, but Trotsky, unfortunately, refused.

              • @chaogomu@lemmy.world
                link
                fedilink
                222 days ago

                Lenin betrayed the revolution. You mention the banning of the political parties. While it’s true that they “took up arms against Sovnarkom”, you’re leaving out the part where Lenin used Sovnarkom to coup the newly elected government because his party didn’t win.

                Again, Lenin was flat out wrong. But I don’t think he ever actually cared about Russia ever reaching the true Marxist communist utopia. Lenin cared about power first and foremost.

                He built up that dictatorship, and then handed it over to a monster.

          • @Bluetreefrog@lemmy.world
            link
            fedilink
            English
            722 days ago

            Is it was so great, why did most of the conquered nations run west as fast as they could as soon as they could? Must have been because the USSR was so ‘progressive’.

              • @Kusimulkku@lemm.ee
                link
                fedilink
                1
                edit-2
                22 days ago

                The Soviet people voted overwhelmingly in favor of retaining the Soviet Union, albiet with reforms, in a referendum that was ignored when the leaders of the USSR’s constituent republics agreed behind closed doors to dissolve the nation.

                The referendum (the only one they ever had) with it being in 1991 it was already a much different Soviet Union than we usually think and very late in its life as an effort to somehow keep it together, even though in a pretty different form. The wording makes it so that there was very little reason to oppose it unless you were a hardline independence advocate (so you might not respect their authority anyway or don’t want to give them credibility etc) since independence or no, it was promising more independence, human rights, freedom and so on. And in some countries that was tied to “let’s become independent at the same time but also keep in this new federation or what have you”. So it wasn’t even a “should we keep Soviet Union or not” but rather “should we make the union different, better”, which again, not much reason to oppose it no matter what you thought. Keeping it as it had been was the hardliner approach of keeping the older style Soviet Union and that wasn’t very popular.

                And the new treaty was never signed because communist hardliners tried a coup to reverse the course. The attempt backfired horribly and just lead to even swifter dissolution. But I’d say it was already heading towards that anyway with people seeking to break away from Moscow and the whole system in a turmoil over reforms (to some too radical and to some not radical enough). In hindsight it feels like they would’ve needed a miracle to keep it together in any recognizable form.

                • @Bluetreefrog@lemmy.world
                  link
                  fedilink
                  English
                  322 days ago

                  Not to mention that the vote was boycotted by Armenia, Estonia, Georgia, Latvia, Lithuania, and Moldova.

                  They were sooooo keen to return to the Russian embrace (/s).

          • @frezik@midwest.social
            link
            fedilink
            3
            edit-2
            22 days ago

            Progressive at first, but then sorta forgot about it.

            At the start, women were given rights that suffragists in the UK or USA could only dream of. Then it stopped. By the 1960s, women in the USSR found that they were still expected to do all the same old household chores while also holding a job outside the home. Meanwhile, western feminism had developed a strong second wave, and later a third (arguably more since, but that gets complicated). Those waves dealt with increasingly abstract issues in the patriarchy, including the problem of household chores.

            This simply didn’t happen in the USSR. Developing one would have required greater freedom of speech than anyone had in that country.

            • @SSJMarx@lemm.ee
              link
              fedilink
              English
              122 days ago

              Pretty much everyone post-Stalin fumbled the bag. The fact that the USSR lasted as long as it did once the leadership was essentially asleep at the wheel is a testament to how robust its foundations were.

          • @explodicle@sh.itjust.works
            link
            fedilink
            English
            722 days ago

            I thought the political compass was itself just a popular perspective? It’s is a gross oversimplification of the ideas involved. Find me two leftists who even agree on what’s the farthest left.

          • @frezik@midwest.social
            link
            fedilink
            4
            edit-2
            22 days ago

            I’m not sure it is. Like, yes, it does exist in the Left/Right, Auth/Lib political compass, but that’s just a model. The stance has some inherent contradictions.

            And so does Right/Lib, for that matter. “Fiscally conservative/socially liberal” is a nonsense position, and those taking it tend to just be conservative in practice.

  • @Juice@midwest.social
    link
    fedilink
    54
    edit-2
    23 days ago

    Why is everyone down on Rust? Seriously. I don’t know it but I’ve considered learning it and it appeals to me and people literally scoff when I mention it. Saw it referred to as a meme language on Lemmy, which is built in Rust. What am I missing?

    • @fl42v@lemmy.ml
      link
      fedilink
      2322 days ago

      I think ppl just got pissed with the fanboys unironically asking to RIIR everything. The language itself is comfy AF, tho

    • Cause it’s a C++ replacement when said audience never asked for one. It’s great but it’s still waaaayy too early, people need to slowly get comfortable with it.

    • @uis@lemm.ee
      link
      fedilink
      1522 days ago

      For me “The Critical Flaw” of rust is its compiler. And requirent of 12 GB of disk space to compile just the frontend of compiler. Even GCC will all frontends(C, C++, Ada, Fortran, Modula-2, JIT) requires less space.

      But joke is probably about “rewrite in rust” culture.

    • @Feyd@programming.dev
      link
      fedilink
      3122 days ago

      I think rust has good ideas and may even become the default systems language in the mid-term. I find it irritating that there is a very vocal subset of rust proponents that tend to insist that every project in every language needs to be rewritten in rust immediately. I suspect that is also why other people are down on rust.

    • @affiliate@lemmy.world
      link
      fedilink
      522 days ago

      i think it’s mainly people being cranky and set in their ways. they got used to working around all the footguns/bad design decisions of the C/C++ specifications and really don’t want to feel like it was all for nothing. they’re comfortable with C/C++, and rust is new and uncomfortable. i think for some people, being a C/C++ developer is also a big part of their identity, and it might be uncomfortable to let that go.

      i also think there’s a historical precedent for this kind of thing: when a new way of doing things emerges, many of the people who grew up doing it the old way get upset about it and refuse to accept that the new way might be an improvement.

      • @Juice@midwest.social
        link
        fedilink
        522 days ago

        Is Rust as close to the metal as C? Seems like there would still be a need for C. I could see Rust replacing Java as something that’s so ceremonial and verbose, but from my limited perspective as a sometimes java dev, having only the most glancing experience with C, it seems like C would be hard to replace because of what it is. Buy I honestly don’t know much about Rust either, I just think JS is so finicky and unpredictable whereas web assembly seems extremely fast and stable.

        • @frezik@midwest.social
          link
          fedilink
          2
          edit-2
          22 days ago

          It’s slightly less close to the metal as C. Array bounds checks are always going to cost you something, for example. However, if you look at the speed of numeric computation in C, Rust, and Go, they’re all in the same order of magnitude performance compared to things like Python or JavaScript (not including things like PyPi, which is C with extra steps).

          • @Juice@midwest.social
            link
            fedilink
            222 days ago

            Wow thanks so much for breaking that down for me! The discussions I’ve been having here and the information devs are sharing is really kicking me off the fence about learning Rust

            • @frezik@midwest.social
              link
              fedilink
              2
              edit-2
              22 days ago

              Eh, I’d still go for it. I find the Rust compiler tends to amplify my impostor syndrome–it tells you all the ways you are objectively being stupid. I know that’s not really selling it, but it’s doing that stuff for a reason. I’m especially hopeful that it becomes the standard way to do things with microcontrollers; that’s about the only place I write C/C++ at all.

        • Thinker
          link
          fedilink
          222 days ago

          I mean, the simple proof is that Rust has been growing by leaps and bounds in the embedded world, which is the closest to bare metal you get. It’s also being used in the Linux kernel and Windows, and there are several projects building new kernels in pure Rust. So yeah, it’s safe to say that it’s as close to the metal as C.

          Also, the comparison to Java is understandable if you’ve only been exposed to Rust by the memes, but it doesn’t hold up in practice. Rust has a lot more syntax than C (although that’s not saying much), but it’s one of the most expressive languages on the market today.

        • @themoken@startrek.website
          link
          fedilink
          5
          edit-2
          22 days ago

          Rust can create native binaries but I wouldn’t call it close to the metal like C. It’s certainly possible to bootstrap from assembly to Rust but, unlike C, every operation doesn’t have a direct analog to an assembly operation. For example Rust needs to be able to dynamically allocate memory for all of its syntax to be intact.

          • Ephera
            link
            fedilink
            722 days ago

            For example Rust needs to be able to dynamically allocate memory for all of its syntax to be intact.

            Hmm, you got an example of what you mean?

            Rust can be used without allocations, as is for example commonly done with embedded.
            That does mean, you can’t use dynamically sized types, like String, Vec and PathBuf, but I wouldn’t consider those part of the syntax, they’re rather in the std lib…

            • @themoken@startrek.website
              link
              fedilink
              222 days ago

              So you’re right that this is a bit arbitrary because the line between the standard lib and the language is blurry, but someone writing Rust is going to expect Vec to work, it doesn’t even require an extra “use” to get it.

              Perhaps a better core example would be operator overloading (or really any place using traits). When looking at “a + b” in Rust you have to be aware that, depending on the types involved, that could mean anything.

              Anyway, I love Rust, it just doesn’t have the 1:1 relationship with the assembly output that C basically still has.

    • DessalinesOP
      link
      fedilink
      1422 days ago

      I don’t think many ppl are down on rust… it’s won developer’s most favorite to use for like 5+ years now in a row on stackoverflow.

    • @Sl00k@programming.dev
      link
      fedilink
      English
      15
      edit-2
      23 days ago

      Imo it’s bc it’s the new kid on the block. Yes it’s 10 years old but barely becoming common use in production and government mandates are only speeding that up. In actuality it’s a great language and has been hyped for a few years by people who actually use it. Python went through the same thing in the 2010s where devs really tried clowning on it, now it’s used everywhere.