Since its inception, Microsoft Excel has changed how people organize, analyze, and visualize their data, providing a basis for decision-making for the flying billionaires heads up in the clouds who don’t give a fuck for life offtheline

    • nalyd@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      16
      arrow-down
      6
      ·
      1 year ago

      That’s not really what people mean when they’re talking about interpreted versus compiled languages. Java’s compilation step produces an intermediate language that still has to be interpreted before it’s executed.

      It turns Java code into something that can be interpreted faster, but not into something your processor directly understands. The key here is that it doesn’t produce an output that can be fed directly to the processor without additional work at runtime.

      • Phrodo_00@lemmy.world
        link
        fedilink
        English
        arrow-up
        8
        arrow-down
        1
        ·
        edit-2
        1 year ago

        If you go that detailed, then the jvm is JIT compiler, not an interpreter, so Java code still mostly runs natively on the processor. Java is quite fast achieving pretty close performance to C++, the only noticeable problems are on desktop because of the slow jvm startup and slow GUI libraries compared to native ones.

        • nalyd@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          3
          ·
          1 year ago

          I think you’re missing that all interpreters have a compilation step that produces machine code, that’s a requirement to produce programs.

          Java’s JIT compiler is the final compilation step of Java’s interpreting path running in a separate thread that turns the intermediate language to machine code. To be very clear though, the output of the standard javac compiler is not machine code that a processor understands. This is what makes Java not a compiled language. It depends on additional processes at runtime to turn the code you wrote into something a processor understands.

          On the performance front, well written Java is fast enough as long as you have sufficient resources for the overhead of JVM and as long as you don’t have strict latency requirements. That makes it good for a pretty wide variety of computing tasks, but, also not a good choice for a lot of others.

          • wolf@lemmy.zip
            link
            fedilink
            English
            arrow-up
            6
            ·
            1 year ago

            Factual errors:

            • Interpreters neither need nor usually have a compilation step
            • Even processors are nowadays virtual machines, modern hardware only understands microcode AFAIK

            Words which have a common understanding in the current compiler construction world, which you define in IMHO a non standard way

            • Compiler is commonly used to refer to tools which translate higher level languages (e.g. Java, C, Python, JavaScript) to a machine representation (e.g. JVM, Arm64, x86_64, MIPS…)
            • Even in academia Java is referred to as compiled/interpreted language (at the same time)

            Factual errors about Java:

            • We have ahead of time compilers for a very long time now (GraalVM etc)
            • There are chips which implement the JVM in hardware
            • nalyd@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              2
              ·
              1 year ago

              I originally had words about ahead of time compilers like GraalVM but got tired of looking at my own wall of text so I trimmed it down and left compiler to mean ahead of time compulers, which I see caused confusion, you’re right on those points.

              I know the JVM hardware exists also, but, it’s specialty hardware even at the enterprise level. You could technically make an ASIC that executes QBASIC at hardware but I’m not sure I’d believe that makes it a compiled language since it would be neither wide spread nor the original use case for it. That’s kind of a philosophical argument though

              I think my use of compilers in interpretation may also be confusing, interpreters have an execution step, which at some point translates to a machine representation of your code. It’s referred to as execution, but, it feels a lot like a compile+execute step

          • Aceticon@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            1
            ·
            edit-2
            1 year ago

            I think you’re used to modern interpreted languages and are unaware of how the runtimes of interpreted languages used to work.

            Something like Basic (to use a properly old example) was constantly interpreting source code during the entire run.

            If I’m not mistaken Python was the first major interpreted language which by default interpreted the code into a binary format and then just ran the binary (and, if I remember it correctly, that wasn’t the case in its first version). By this point Java already JIT compilation in its VM for a while.

            I think you’re committing the error of comparing modern interpreted languages with how Java worked 2 decades ago.

          • Phrodo_00@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            1
            ·
            1 year ago

            all interpreters have a compilation step that produces machine code

            Very much not a thing. JIT interpreters are actually not that common. Most interpreters parse code to an AST in memory and then run execute said AST, without any compilation to machine code.

            the output of the standard javac compiler is not machine code that a processor understands. This is what makes Java not a compiled language.

            Listen to yourself the output of the compiler makes it not a compiled language. Java is a compiled language, and jvm bytecode can be compiled (see graalvm), or interpreted (and when interpreted it can be JITd)

    • Captain Aggravated@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      4
      ·
      1 year ago

      Eh…Java source code compiles into bytecode which runs in a virtual machine. Compare this to a language like C which compiles to native machine code. Java still gets interpreted.

      • qaz@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        arrow-down
        1
        ·
        1 year ago

        The bytecode is turned into native code before execution

        • Aatube@kbin.socialOP
          link
          fedilink
          arrow-up
          1
          arrow-down
          2
          ·
          edit-2
          1 year ago

          That’s not how it works. If that really was how it worked there’d be no point even having bytecode; you’d just straight up get the native code. Unless you’re talking about JIT, but your wording seems to be implying that all the bytecode turns into native code at once.

          • qaz@lemmy.world
            link
            fedilink
            English
            arrow-up
            4
            ·
            edit-2
            1 year ago

            I was referring to JIT but there are also other options like GraalVM for AOT compilation.

        • 31337@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Yeah, in my personal experience (with numerical compute-heavy code), normal python code, ran in the normal python interpreter, is much slower than the equivalent normal Java code with the normal Java VM (like 50x). Then C/Fortran is ~2x faster than Java (with gcc + optimization flags).

          I think Java is a good middle-ground between coding speed and execution speed. Sadly, it seems to be dying. And JavaFX is shit for trying emulate full-stack web-dev. The fucking ancient Swing is even better.

          Scala and Kotlin are OK, but I think they are making the mistake of feature-creep that causes large projects with many people to contain multiple programming paradigms that only some of the team can grok well, instead of a restricted OOP Java codebase that encourages Gang of Four style code. Though, I guess GoF-style code resulted in that crazy complicated “enterprise” Java shit.

          • Aceticon@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            edit-2
            1 year ago

            Last I checked Java was alive and well in the server-side for things like middleware and backend, especially because the whole development ecosystem is incredibly mature and significantly more stable and well integrated with corporate-category systems than pretty much anything else (good luck managing a single reliable transaction across, say, 2 different databases in 2 different sites and 1 MQ system with Python).

            Absolutelly, it’s been mostly limping in a half-dead state on the UI ever since day 1 and even Google using it with Android didn’t exactly help (because Google’s architectural design of the entire Android framework is, well, shit, and has become worse over time).

            It also lost it’s proeminence in dynamic web page generation at around the early 00s to actual templating languages (such as PHP) with a much lower learning curve and later to Python.

            The ecosystem for Java is rock-solid and in widespread use in corporate multi-tier architectures that require reliable operation (were, for example, it’s native multi-threading synchronisation support and core libraries make a huge difference) and integration with professional backend systems, but for the rest, not so much (I did both that stuff and Android, and the latter is like the amateur-hour of Java ecosystems in comparison with the former).