On Tuesday, 13 May 2014 at 17:16:18 UTC, Etienne wrote:
I've been reading on Emscripten and LDC and how they would be
nice together, and came across this nice little library:
http://www.leaningtech.com/duetto/examples/
It's a C++ server/client framework that compiles to JS through
clang => LLVM bytecode => ASM.js.
I'd like to point out that asm.js is a very fast subset of the
javascript language that allows almost native speeds (3x
slowdown vs C only) which enables games to be run in the
browser without external dependencies.
This had me thinking of forking the Emscripten project in order
to support the druntime / phobos library & give it access to
the browser DOM interface, as to allow javascript web
applications to be written fully in D (to produce interfaces
like openUI5 and more).
This would have multiple advantages:
- Suitable for huge front-end development frameworks using safe
typing and contractual programming
- Opens the door to petaFLOPS of distributed CPU power based
simply on website visitation without affecting user experience
- Allows Javascript proprietary code to be harder to
de-obfuscate or reverse engineer
- FAST Browser-based database engines and full runtime
capabilities can be developed (and added as browser extensions
for persistence) to be actively used by the server with a
simple interface
And most of all, it simplifies web development.
I'm not going to instantly call for a project to be started,
but I'd love to hear some why do's and why don'ts b/c I don't
like to rely on my point of view alone.
I don't like technologies that originate from one company for
various reasons, and I hate JS. But then again, what can we do?
JS is everywhere. I wouldn't mind "compiling" to JS as long as I
can develop in a proper language like D.
On the other hand, all those JS solutions show that JS is shit
and nobody is happy with it, everyone hates it and there's no way
of fixing it. Maybe it's time to start a revolution and get rid
of JS. Maybe something along the lines of an abstract
interface-like language that compiles to native code via C, and
the concrete code can be written in any language.