Results 1 to 9 of 9

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

  1. #1
    Join Date
    Jan 2007
    Posts
    15,683

    Default 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. #2
    Join Date
    Oct 2012
    Location
    Washington State
    Posts
    527

    Default

    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.

  3. #3
    Join Date
    Jun 2011
    Posts
    57

    Default

    Quote 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.

  4. #4
    Join Date
    Dec 2011
    Posts
    2,197

    Default

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

  5. #5
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,801

    Default

    Quote 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.

  6. #6
    Join Date
    Jul 2009
    Posts
    221

    Default

    Quote 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.

  7. #7
    Join Date
    Jun 2011
    Posts
    57

    Default

    Quote 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

  8. #8
    Join Date
    Mar 2012
    Posts
    135

    Default

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

  9. #9
    Join Date
    May 2013
    Posts
    56

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •