For real? That would be bad ass.

Has anyone attempted it yet? Results? :-)
On Friday, June 21, 2013 4:13:52 AM UTC-4, fari...@gmail.com wrote:

It is possible to compile go to LLVM byte code with llgo:

This means it is possible to compile go to asm.js.
On Wednesday, 8 May 2013 21:50:20 UTC+8, Ian Davis wrote:

Latest demo of Emscripten and asm.js is UnrealEngine which is over a
million lines of C++:

Threading is done with web workers apparently but I have no idea if that
was added by hand or if it is automatic from the LLVM bitcode conversion.

Would be nice to see Go -> LLVM -> Emscripten -> asm.js with some
concurrency as a proof of concept

On Thursday, 21 February 2013 09:38:27 UTC, Archos wrote:

I'd contacted with the designers and these are the answers:

"It's too low-level for languages like CoffeeScript. It works best for
languages at a lower level of abstraction like C or C++. Implementing CS at
this level would require writing your own garbage collector and JavaScript
runtime. Which would be pretty silly since you're implementing on top of
JavaScript, which already provides those things.

That said, we intend for asm.js to grow to support higher-level
constructs like garbage-collected data, making it suitable for mid-level
(but still statically typed) languages like Java and C#. But it would
probably still end up being pretty silly to implement a language like
CoffeeScript -- which maps directly onto JS -- this way. You'd almost
certainly get worse performance than the existing CoffeeScript compiler

Then it would be awesome that it could be suitable for languages Go and Rust.

"The sticking point there is concurrency. But it's definitely worth exploring."

El martes, 19 de febrero de 2013 13:57:41 UTC, Archos escribió:
That's right, asm.js is a low-level target language for languages like
C and C++. It's not designed for compiling languages like CoffeeScript or

El martes, 19 de febrero de 2013 10:20:28 UTC, Niklas Schnelle escribió:
As far as I know asm.js is specifically designed to make code
generated by Emscripten easier to optimize while being still Javascript,
excutable by any JS engine.
So an asm.js aware engine can execute it as fast as Java or C# while
it still runs on every browser. Emscripten is based on LLVM and compiles
LLVM bitcode to JS/asm.js there is a Go compiler targeting LLVM
bitcode (llgo) under heavy development. When that is ready it should be
pretty simple
to use Emscripten on it's output.
So in a way work on that is already under way and much better than
targeting asm.js directly since LLVM bitcode can also be used in Chrome's
upcoming Native Client or compiled to many differen CPU architectures.
On Tuesday, February 19, 2013 11:11:32 AM UTC+1, Archos wrote:

It's easy since there is already a compiler that translates over
85-90% of Go's specification. Fork it to target asmjs.


Note that Go2js project is in stand by since I've no time for it.

El martes, 19 de febrero de 2013 05:54:51 UTC, Philipp Schumann
Just stumbled upon this:


Could be neat for compiling Go code (except syscalls etc. of course)
to JS without dealing with all kinds of JS messyness...

Any takers? ;)
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts


Follow ups

Related Discussions



site design / logo © 2022 Grokbase