Announcement

Collapse
No announcement yet.

Duetto Clang C++ For The HTML5 Web Is Now In Beta

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Duetto Clang C++ For The HTML5 Web Is Now In Beta

    Phoronix: Duetto Clang C++ For The HTML5 Web Is Now In Beta

    Several months ago I wrote about the Duetto C++ compiler that is based upon LLVM's Clang and looks to take C++ programming to the HTML5 web. We hadn't heard anything out of the project since then, but today they're announcing their first public beta...

    http://www.phoronix.com/vr.php?view=MTQ3NTI

  • #2
    What the Duetto developers claim differentiates them from EmScripten is that it's "a C++ compiler with a C++ mindset." Duetto compiles standard C++11 code to JavaScript and can handle HTML5 features like WebGL without any middle layer.
    Seeing that C++11 from LLVM/Clang is already merging for WebKit2 and making LLVM the compiler defacto for Apple's WebKit 2 I find this all a waste of work.

    Comment


    • #3
      Originally posted by Marc Driftmeyer View Post
      Seeing that C++11 from LLVM/Clang is already merging for WebKit2 and making LLVM the compiler defacto for Apple's WebKit 2 I find this all a waste of work.
      Can you explain what you mean? I don't understand why this would be a wasted effort.

      Comment


      • #4
        Alessandro Pignotti is also the developer of Lightspark, the open source Flash player.

        Comment


        • #5
          Originally posted by Marc Driftmeyer View Post
          Seeing that C++11 from LLVM/Clang is already merging for WebKit2 and making LLVM the compiler defacto for Apple's WebKit 2 I find this all a waste of work.
          That no sense made.

          Comment


          • #6
            Originally posted by RealNC View Post
            That no sense made.
            Agreed. Outputting HTML5 and creating a web browser are two very different tasks, and I still don't understand why Apple's use of LLVM matters much to that.

            But I don't understand the point of Duetto either. I used GWT to compile Java to Javascript for a project a few months back, and ended wondering why I didn't just learn and use Javascript in the first place. C++ makes even less sense; after compiling to Javascript it won't be any faster, it's harder to use, and I'm not aware of any C++ libraries for writing web apps.

            Comment


            • #7
              Originally posted by Cyborg16 View Post
              Agreed. Outputting HTML5 and creating a web browser are two very different tasks, and I still don't understand why Apple's use of LLVM matters much to that.

              But I don't understand the point of Duetto either. I used GWT to compile Java to Javascript for a project a few months back, and ended wondering why I didn't just learn and use Javascript in the first place. C++ makes even less sense; after compiling to Javascript it won't be any faster, it's harder to use, and I'm not aware of any C++ libraries for writing web apps.
              I read up on Enscripten, and it translates OGL calls to WebGL and translates SDL calls to HTML canvas calls. I imagine Duetto will do something similar.

              As for why bother using a C++-to-JS compiler, games are the only application I can think of, and I think it makes sense to head in that direction.

              Pro's:
              * No installation required for playing web games
              * Downloading updates just require you to hit F5
              * You can still compile natively to platforms that require it

              Con's:
              * Massive performance loss compared to native
              * Compiling to JS, and the browser interpreting the JS adds one more layer of complexity, increasing the chance of something going wrong

              Ugly:
              * Instead of supporting your application on platforms, you're supporting your application on web browsers

              Comment


              • #8
                How do you release something in one months? does it means that will require many singular months to release?

                Comment


                • #9
                  Okay, lets take c++ which was designed to be compiled directly to machine code and compile it to javascript, which is high level interpreted (now actually JIT compiled) language. Then let browser to execute it. This is not the way things should be made. Just add some form of low level language (like LLVM IR) to HTML standard and compile everything to it. This would be faster and simpler.

                  Comment

                  Working...
                  X