Qt GUI Toolkit Ported to JavaScript via Emscripten
badassjs.com
badassjs.com
It's the sort of things I would love as a developer (Hey ! Portability! Less code to write ! awesome mature toolkits !) and I would never want as an user ( Hey ! It's the same as old Qt apps, except five time slower !).
Is everyone today equipped with at least 4-core 3GHz i7s or what?
Text Edit demo is barely responsive on my Athlon 64 X2 4600+ in recent Google Chrome beta (25.0.1364.84) on up-to-date debian wheezy. To the point it's unusable, unfortunately.
I admire the project, it must have been a great fun to build it and it is impressive achievement. Really!
I still hope it may be optimized more, so it will be truly responsive. Even then it doesn't mean it's the right way to go. Web developers, please, do not write your websites as Qt apps to compile them later with emscripten-qt!
Native Client approach is a lot more promising, despite not being welcomed well in the industry.
Canvas (and webGL notably) support is there, but its super flaky and hard to make fast.
JS might be the first 'architecture' for which standard C's pointer arithmetic and casting restrictions get put to truly good use.
Plus all the messy porting of C libs to different platforms go away (you just need one SDL-to-canvas wrapper instead of 5 different implementations). It allows for a concentration of effort.
Also its portability is not an inherent property of JS, it is because of the history.
Not necessarily saying this approach (Qt to JS) is the way for GUI apps, but this + hardware accelerated rendering could be interesting.
...but the problem is that relatively few business GUI applications do nothing. The front end has no purpose other than to trigger some kind of backend action, or update some database, or read some data from some source and display it.
...and that backend, non-QT code, which talks to system libraries, is never ever ever going to compile to javascript.
So other than tech-demo, what's the use case for this?
To answer your question, I'm not sure what is the use for this, since you know, it does not compile to coffeescript /sarcasm. But in all seriousness, I did not post this to advocate it's use, but because I found it somewhat strange.
I'm not dissing this project; I think the c++ to javascript compiler is really neat.
I just don't think I've ever seen any real QT applications that would compile and run with it; they all talk to databases or system services, which isn't supported.
I hope we can look forward to getting rid of pointless apps that are forced on you just to read a web page though. That's really, really annoying.
My experience in web development projects makes me every day more convinced that the only thing the browser is good for, is documents.
It takes longer for commercial codebases to be ported, pass all the stages of productization, and be officially launched. My prediction is for a few such projects to show up later this year.
With that said, there are some uses of emscripten that are not demos. For example emscripten was used to port the crunch decoder to JS in gl-matrix, and that might well be used in non-demos. Also there are educational sites using compiled languages like repl.it as another commenter mentioned. I've also seen a few other practical uses, e.g. of sql.js in sqlfiddle.
I know you Mozilla guys don't have time to maintain ports, but are you doing anything to encourage open source devs to actually use and maintain this stuff? I'm working on an emscripten port of a game myself that I do want to actually maintain and improve upon, but I get the impression that I am in the minority.
I used to have time to maintain at least sql.js, ammo.js and box2d.js, but recently work on asm.js and some porting projects has monopolized my efforts I'm afraid. My hope is people that use it will maintain those.
> but are you doing anything to encourage open source devs to actually use and maintain this stuff?
Do you mean ports like sql.js and ammo.js that I began, or new ports people make?
I don't know how to encourage people to work on my ports - either they do or they don't ;) I ask for help and mention the projects, but it's up to people to be interested of course.
Regarding other people's ports, I definitely try to support them as much as possible. Fixing bugs that those ports encounter is always high priority for me.
> I'm working on an emscripten port of a game myself that I do want to actually maintain and improve upon, but I get the impression that I am in the minority.
There are a few serious/long-running ports, like jsmess and nebula3. But most ports are more short-term: they accomplish the goal, and then not much is left to do.
There are also commercial emscripten ports, but most commercial work by nature is secret until it launches.