Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Java looking at Webassembly

Java looking at Webassembly

Scheduled Pinned Locked Moved The Lounge
javaquestionannouncement
9 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maze3
    wrote on last edited by
    #1

    Ill preface this with that the following is nothing new and language X was gonna be the Y, but here goes. Java is supposed to be this language where you can deploy anywhere, except it's you still need to compile for a platform and ship the bytecode file. (please feel free to correct any ignorance) So when a few articles came out on Webassembly last week with the mozilla documentation release of 1.0, and history repeating. "It will run anywhere" that some runtime has been written for it just as java runtime is required writing for the platform that you want to run it on. I feel like I am missing something not knowing enough on how C and Assembler works that we can't just compile to those languages and ship? Oh, no, if not already done, someone is going to make an OS in webassemply aren't they?

    C L C D M 6 Replies Last reply
    0
    • M maze3

      Ill preface this with that the following is nothing new and language X was gonna be the Y, but here goes. Java is supposed to be this language where you can deploy anywhere, except it's you still need to compile for a platform and ship the bytecode file. (please feel free to correct any ignorance) So when a few articles came out on Webassembly last week with the mozilla documentation release of 1.0, and history repeating. "It will run anywhere" that some runtime has been written for it just as java runtime is required writing for the platform that you want to run it on. I feel like I am missing something not knowing enough on how C and Assembler works that we can't just compile to those languages and ship? Oh, no, if not already done, someone is going to make an OS in webassemply aren't they?

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      Quote:

      I feel like I am missing something not knowing enough on how C and Assembler works that we can't just compile to those languages and ship?

      Correct. However you neeed the various compiling tools and, above all, you have to recompile for all the different platforms every time.

      1 Reply Last reply
      0
      • M maze3

        Ill preface this with that the following is nothing new and language X was gonna be the Y, but here goes. Java is supposed to be this language where you can deploy anywhere, except it's you still need to compile for a platform and ship the bytecode file. (please feel free to correct any ignorance) So when a few articles came out on Webassembly last week with the mozilla documentation release of 1.0, and history repeating. "It will run anywhere" that some runtime has been written for it just as java runtime is required writing for the platform that you want to run it on. I feel like I am missing something not knowing enough on how C and Assembler works that we can't just compile to those languages and ship? Oh, no, if not already done, someone is going to make an OS in webassemply aren't they?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        maze3 wrote:

        "It will run anywhere" that some runtime has been written for it just as java runtime is required writing for the platform that you want to run it on.

        It's unavoidable. Computers only run machine code, which is inherently non-portable. If you make a translation layer, well then that still only works on platforms that have had that ported to them. C is nowhere closer to a solution, and assembly is non-portable. There is no solution of the kind that you want.

        1 Reply Last reply
        0
        • M maze3

          Ill preface this with that the following is nothing new and language X was gonna be the Y, but here goes. Java is supposed to be this language where you can deploy anywhere, except it's you still need to compile for a platform and ship the bytecode file. (please feel free to correct any ignorance) So when a few articles came out on Webassembly last week with the mozilla documentation release of 1.0, and history repeating. "It will run anywhere" that some runtime has been written for it just as java runtime is required writing for the platform that you want to run it on. I feel like I am missing something not knowing enough on how C and Assembler works that we can't just compile to those languages and ship? Oh, no, if not already done, someone is going to make an OS in webassemply aren't they?

          C Offline
          C Offline
          Chris Maunder
          wrote on last edited by
          #4

          I hate to break it to you, but you're getting old. The obvious sign is that you look at the latest shiny thing and think "yeah, we already tried that". However, in this case WebAssembly is a little different from Java in that, at the time, hardware and systems weren't up to the task. For Java to work everywhere you had to ensure all your users had the correct version of Java installed. Even if you got over that, Java itself was slow, a memory hog, and the UI was always so clunky and dated. It was a terrible user experience for everyone. Fast forward and we're in a world where the vast majority of users have browsers that auto-update, so versioning is not as big a deal. Bandwidth is a little better than 20 years ago, as is CPU power, so downloads and execution time are not the issues they were. We're also in a world where we already consume many of our apps online, whereas 20 years ago it was a bit of an ask to assume people would be happy and able to download Java apps and run them on thin clients (I remember sitting in on a very painful demo in 1996). Basically: instead of trying to convince everyone to move in the direction of the solution Sun was providing (a solution to a problem people didn't think they had), we're now looking for solutions to problems we know very well that we have: We're executing applications on thin clients served from remote mainframes and everything is in place, the market is here, it's part of our daily life, and it's all based on JavaScript. Because JavaScript was the only language everyone hated the least and managed to keep its head down long enough to survive. But it's slow. Not as slow as Java was, but to get to the next step we need something better than a scripting engine to run our apps. Hence WebAssembly. I hope it works. I truly do. I never, ever want to know how to code in raw WebAssembly - that's what compilers are for - but I want to know I can code in whatever language I want to and it will be compiled into a language that will run as fast as possible on every device my users will be using.

          cheers Chris Maunder

          T 1 Reply Last reply
          0
          • M maze3

            Ill preface this with that the following is nothing new and language X was gonna be the Y, but here goes. Java is supposed to be this language where you can deploy anywhere, except it's you still need to compile for a platform and ship the bytecode file. (please feel free to correct any ignorance) So when a few articles came out on Webassembly last week with the mozilla documentation release of 1.0, and history repeating. "It will run anywhere" that some runtime has been written for it just as java runtime is required writing for the platform that you want to run it on. I feel like I am missing something not knowing enough on how C and Assembler works that we can't just compile to those languages and ship? Oh, no, if not already done, someone is going to make an OS in webassemply aren't they?

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            maze3 wrote:

            Java is supposed to be this language where you can deploy anywhere, except it's you still need to compile for a platform and ship the bytecode file. (please feel free to correct any ignorance)

            The gist is there, but you only need to compile once, and not for a specific platform since the JVM acts as the buffer between the bytecode and the hardware.

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

            T 1 Reply Last reply
            0
            • M maze3

              Ill preface this with that the following is nothing new and language X was gonna be the Y, but here goes. Java is supposed to be this language where you can deploy anywhere, except it's you still need to compile for a platform and ship the bytecode file. (please feel free to correct any ignorance) So when a few articles came out on Webassembly last week with the mozilla documentation release of 1.0, and history repeating. "It will run anywhere" that some runtime has been written for it just as java runtime is required writing for the platform that you want to run it on. I feel like I am missing something not knowing enough on how C and Assembler works that we can't just compile to those languages and ship? Oh, no, if not already done, someone is going to make an OS in webassemply aren't they?

              M Offline
              M Offline
              MadMyche
              wrote on last edited by
              #6

              In the browser realm, I see the main difference being that Java was installed to the OS, and was a plugin for the browser; as opposed to Web Assembly as being a part of the browser and installed with it. Then there is the licensing and such not

              Director of Transmogrification Services Shinobi of Query Language Master of Yoda Conditional

              1 Reply Last reply
              0
              • M maze3

                Ill preface this with that the following is nothing new and language X was gonna be the Y, but here goes. Java is supposed to be this language where you can deploy anywhere, except it's you still need to compile for a platform and ship the bytecode file. (please feel free to correct any ignorance) So when a few articles came out on Webassembly last week with the mozilla documentation release of 1.0, and history repeating. "It will run anywhere" that some runtime has been written for it just as java runtime is required writing for the platform that you want to run it on. I feel like I am missing something not knowing enough on how C and Assembler works that we can't just compile to those languages and ship? Oh, no, if not already done, someone is going to make an OS in webassemply aren't they?

                T Offline
                T Offline
                TheGreatAndPowerfulOz
                wrote on last edited by
                #7

                Think of WebAssembly as a universal machine language and our modern browsers as the compatible CPUs that will run that universal machine language.

                #SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

                1 Reply Last reply
                0
                • D David Crow

                  maze3 wrote:

                  Java is supposed to be this language where you can deploy anywhere, except it's you still need to compile for a platform and ship the bytecode file. (please feel free to correct any ignorance)

                  The gist is there, but you only need to compile once, and not for a specific platform since the JVM acts as the buffer between the bytecode and the hardware.

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                  T Offline
                  T Offline
                  TheGreatAndPowerfulOz
                  wrote on last edited by
                  #8

                  So long as you have the right version of Java installed on the target machine. :) :-\

                  #SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

                  1 Reply Last reply
                  0
                  • C Chris Maunder

                    I hate to break it to you, but you're getting old. The obvious sign is that you look at the latest shiny thing and think "yeah, we already tried that". However, in this case WebAssembly is a little different from Java in that, at the time, hardware and systems weren't up to the task. For Java to work everywhere you had to ensure all your users had the correct version of Java installed. Even if you got over that, Java itself was slow, a memory hog, and the UI was always so clunky and dated. It was a terrible user experience for everyone. Fast forward and we're in a world where the vast majority of users have browsers that auto-update, so versioning is not as big a deal. Bandwidth is a little better than 20 years ago, as is CPU power, so downloads and execution time are not the issues they were. We're also in a world where we already consume many of our apps online, whereas 20 years ago it was a bit of an ask to assume people would be happy and able to download Java apps and run them on thin clients (I remember sitting in on a very painful demo in 1996). Basically: instead of trying to convince everyone to move in the direction of the solution Sun was providing (a solution to a problem people didn't think they had), we're now looking for solutions to problems we know very well that we have: We're executing applications on thin clients served from remote mainframes and everything is in place, the market is here, it's part of our daily life, and it's all based on JavaScript. Because JavaScript was the only language everyone hated the least and managed to keep its head down long enough to survive. But it's slow. Not as slow as Java was, but to get to the next step we need something better than a scripting engine to run our apps. Hence WebAssembly. I hope it works. I truly do. I never, ever want to know how to code in raw WebAssembly - that's what compilers are for - but I want to know I can code in whatever language I want to and it will be compiled into a language that will run as fast as possible on every device my users will be using.

                    cheers Chris Maunder

                    T Offline
                    T Offline
                    TheGreatAndPowerfulOz
                    wrote on last edited by
                    #9

                    TLDR; WebAssembly is a universal "machine language" that runs within modern browsers that act as the CPUs that will run that universal "machine language".

                    #SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups