[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

Howto install the asm.js?

JT

2/14/2015 2:13:00 PM

I just been aware of the existence of asm.js

I have a couple of questions.

1. Are you running the actual source language in the browser and it is directly translated into asm.js?

2. If not what tool is used to translate my python, c code into asm.js?

3. What happen if system calls invoked in the source code?

4. Is it implemented as a module to the browser? What about server side scripts?

5. If the translation is direct in browser how do one get the translated js code?

6. If the c code, python code use a graphic library what happen then?



9 Answers

JT

2/14/2015 3:14:00 PM

0

Den lördag 14 februari 2015 kl. 15:13:18 UTC+1 skrev jonas.t...@gmail.com:
> I just been aware of the existence of asm.js
>
> I have a couple of questions.
>
> 1. Are you running the actual source language in the browser and it is directly translated into asm.js?
>
> 2. If not what tool is used to translate my python, c code into asm.js?
>
> 3. What happen if system calls invoked in the source code?
>
> 4. Is it implemented as a module to the browser? What about server side scripts?
>
> 5. If the translation is direct in browser how do one get the translated js code?
>
> 6. If the c code, python code use a graphic library what happen then?

I still do not get how it work, if it do not have the libraries of every language and their compilers which seems impossible.

Does it translate the source code into javascript? Is it the same javascript engine that interpretate ordinary javascript?

If not what differ?

Michael Haufe (\"TNO\")

2/14/2015 9:58:00 PM

0

On Saturday, February 14, 2015 at 9:13:39 AM UTC-6, jonas.t...@gmail.com wrote:
> Den lördag 14 februari 2015 kl. 15:13:18 UTC+1 skrev jonas.t...@gmail.com:
> > I just been aware of the existence of asm.js
> >
> > I have a couple of questions.
> >
> > 1. Are you running the actual source language in the browser and it is directly translated into asm.js?
> >
> > 2. If not what tool is used to translate my python, c code into asm.js?
> >
> > 3. What happen if system calls invoked in the source code?
> >
> > 4. Is it implemented as a module to the browser? What about server side scripts?
> >
> > 5. If the translation is direct in browser how do one get the translated js code?
> >
> > 6. If the c code, python code use a graphic library what happen then?
>
> I still do not get how it work, if it do not have the libraries of every language and their compilers which seems impossible.
>
> Does it translate the source code into javascript? Is it the same javascript engine that interpretate ordinary javascript?
>
> If not what differ?

Look at the FAQ:

<http://asmjs.org/fa...

See some instances:

<https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile...

You could of course build your own asm.js compiler as well if you have the desire to do so.

Currently Firefox has the fasted implementation of asm.js style code:

<http://arewefastyet.com/#machine=28&view=breakdown&suite=asmj...

JT

2/15/2015 12:11:00 PM

0

Den lördag 14 februari 2015 kl. 22:57:46 UTC+1 skrev Michael Haufe (TNO):
> On Saturday, February 14, 2015 at 9:13:39 AM UTC-6, jonas.t...@gmail.com wrote:
> > Den lördag 14 februari 2015 kl. 15:13:18 UTC+1 skrev jonas.t...@gmail..com:
> > > I just been aware of the existence of asm.js
> > >
> > > I have a couple of questions.
> > >
> > > 1. Are you running the actual source language in the browser and it is directly translated into asm.js?
> > >
> > > 2. If not what tool is used to translate my python, c code into asm.js?
> > >
> > > 3. What happen if system calls invoked in the source code?
> > >
> > > 4. Is it implemented as a module to the browser? What about server side scripts?
> > >
> > > 5. If the translation is direct in browser how do one get the translated js code?
> > >
> > > 6. If the c code, python code use a graphic library what happen then?
> >
> > I still do not get how it work, if it do not have the libraries of every language and their compilers which seems impossible.
> >
> > Does it translate the source code into javascript? Is it the same javascript engine that interpretate ordinary javascript?
> >
> > If not what differ?
>
> Look at the FAQ:
>
> <http://asmjs.org/fa...
>
> See some instances:
>
> <https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile...
>
> You could of course build your own asm.js compiler as well if you have the desire to do so.
>
> Currently Firefox has the fasted implementation of asm.js style code:
>
> <http://arewefastyet.com/#machine=28&view=breakdown&suite=asmj...

Sometimes i have a bit of hard time to pick up the core idea of new concepts, could you please point me to a code snippet in c or python with "inclusion tag?" for running it in Firefox. Hello world would do.

JT

2/15/2015 12:14:00 PM

0

Den söndag 15 februari 2015 kl. 13:11:12 UTC+1 skrev jonas.t...@gmail.com:
> Den lördag 14 februari 2015 kl. 22:57:46 UTC+1 skrev Michael Haufe (TNO):
> > On Saturday, February 14, 2015 at 9:13:39 AM UTC-6, jonas.t...@gmail.com wrote:
> > > Den lördag 14 februari 2015 kl. 15:13:18 UTC+1 skrev jonas.t...@gmail.com:
> > > > I just been aware of the existence of asm.js
> > > >
> > > > I have a couple of questions.
> > > >
> > > > 1. Are you running the actual source language in the browser and it is directly translated into asm.js?
> > > >
> > > > 2. If not what tool is used to translate my python, c code into asm..js?
> > > >
> > > > 3. What happen if system calls invoked in the source code?
> > > >
> > > > 4. Is it implemented as a module to the browser? What about server side scripts?
> > > >
> > > > 5. If the translation is direct in browser how do one get the translated js code?
> > > >
> > > > 6. If the c code, python code use a graphic library what happen then?
> > >
> > > I still do not get how it work, if it do not have the libraries of every language and their compilers which seems impossible.
> > >
> > > Does it translate the source code into javascript? Is it the same javascript engine that interpretate ordinary javascript?
> > >
> > > If not what differ?
> >
> > Look at the FAQ:
> >
> > <http://asmjs.org/fa...
> >
> > See some instances:
> >
> > <https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile...
> >
> > You could of course build your own asm.js compiler as well if you have the desire to do so.
> >
> > Currently Firefox has the fasted implementation of asm.js style code:
> >
> > <http://arewefastyet.com/#machine=28&view=breakdown&suite=asmj...
>
> Sometimes i have a bit of hard time to pick up the core idea of new concepts, could you please point me to a code snippet in c or python with "inclusion tag?" for running it in Firefox. Hello world would do.

I just do not get it, do Firefox has one module for c to javascript, one for python to javascript and so on??????

So for each translated source language a new converting interpretator is created+

JT

2/15/2015 12:19:00 PM

0

Den söndag 15 februari 2015 kl. 13:13:41 UTC+1 skrev jonas.t...@gmail.com:
> Den söndag 15 februari 2015 kl. 13:11:12 UTC+1 skrev jonas.t...@gmail.com:
> > Den lördag 14 februari 2015 kl. 22:57:46 UTC+1 skrev Michael Haufe (TNO):
> > > On Saturday, February 14, 2015 at 9:13:39 AM UTC-6, jonas.t...@gmail.com wrote:
> > > > Den lördag 14 februari 2015 kl. 15:13:18 UTC+1 skrev jonas.t...@gmail.com:
> > > > > I just been aware of the existence of asm.js
> > > > >
> > > > > I have a couple of questions.
> > > > >
> > > > > 1. Are you running the actual source language in the browser and it is directly translated into asm.js?
> > > > >
> > > > > 2. If not what tool is used to translate my python, c code into asm.js?
> > > > >
> > > > > 3. What happen if system calls invoked in the source code?
> > > > >
> > > > > 4. Is it implemented as a module to the browser? What about server side scripts?
> > > > >
> > > > > 5. If the translation is direct in browser how do one get the translated js code?
> > > > >
> > > > > 6. If the c code, python code use a graphic library what happen then?
> > > >
> > > > I still do not get how it work, if it do not have the libraries of every language and their compilers which seems impossible.
> > > >
> > > > Does it translate the source code into javascript? Is it the same javascript engine that interpretate ordinary javascript?
> > > >
> > > > If not what differ?
> > >
> > > Look at the FAQ:
> > >
> > > <http://asmjs.org/fa...
> > >
> > > See some instances:
> > >
> > > <https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile...
> > >
> > > You could of course build your own asm.js compiler as well if you have the desire to do so.
> > >
> > > Currently Firefox has the fasted implementation of asm.js style code:
> > >
> > > <http://arewefastyet.com/#machine=28&view=breakdown&suite=asmj...
> >
> > Sometimes i have a bit of hard time to pick up the core idea of new concepts, could you please point me to a code snippet in c or python with "inclusion tag?" for running it in Firefox. Hello world would do.
>
> I just do not get it, do Firefox has one module for c to javascript, one for python to javascript and so on??????
>
> So for each translated source language a new converting interpretator is created+

So when converting standard c language only commands within
#include <stdlib.h>
#include <time.h>

Anything require graphic libraries won't work?
How they managed to get graphic engines like unreal to translate?

JT

2/15/2015 1:33:00 PM

0

Den söndag 15 februari 2015 kl. 13:18:57 UTC+1 skrev jonas.t...@gmail.com:
> Den söndag 15 februari 2015 kl. 13:13:41 UTC+1 skrev jonas.t...@gmail.com:
> > Den söndag 15 februari 2015 kl. 13:11:12 UTC+1 skrev jonas.t...@gmail..com:
> > > Den lördag 14 februari 2015 kl. 22:57:46 UTC+1 skrev Michael Haufe (TNO):
> > > > On Saturday, February 14, 2015 at 9:13:39 AM UTC-6, jonas.t...@gmail.com wrote:
> > > > > Den lördag 14 februari 2015 kl. 15:13:18 UTC+1 skrev jonas.t...@gmail.com:
> > > > > > I just been aware of the existence of asm.js
> > > > > >
> > > > > > I have a couple of questions.
> > > > > >
> > > > > > 1. Are you running the actual source language in the browser and it is directly translated into asm.js?
> > > > > >
> > > > > > 2. If not what tool is used to translate my python, c code into asm.js?
> > > > > >
> > > > > > 3. What happen if system calls invoked in the source code?
> > > > > >
> > > > > > 4. Is it implemented as a module to the browser? What about server side scripts?
> > > > > >
> > > > > > 5. If the translation is direct in browser how do one get the translated js code?
> > > > > >
> > > > > > 6. If the c code, python code use a graphic library what happen then?
> > > > >
> > > > > I still do not get how it work, if it do not have the libraries of every language and their compilers which seems impossible.
> > > > >
> > > > > Does it translate the source code into javascript? Is it the same javascript engine that interpretate ordinary javascript?
> > > > >
> > > > > If not what differ?
> > > >
> > > > Look at the FAQ:
> > > >
> > > > <http://asmjs.org/fa...
> > > >
> > > > See some instances:
> > > >
> > > > <https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile...
> > > >
> > > > You could of course build your own asm.js compiler as well if you have the desire to do so.
> > > >
> > > > Currently Firefox has the fasted implementation of asm.js style code:
> > > >
> > > > <http://arewefastyet.com/#machine=28&view=breakdown&suite=asmj...
> > >
> > > Sometimes i have a bit of hard time to pick up the core idea of new concepts, could you please point me to a code snippet in c or python with "inclusion tag?" for running it in Firefox. Hello world would do.
> >
> > I just do not get it, do Firefox has one module for c to javascript, one for python to javascript and so on??????
> >
> > So for each translated source language a new converting interpretator is created+
>
> So when converting standard c language only commands within
> #include <stdlib.h>
> #include <time.h>
>
> Anything require graphic libraries won't work?
> How they managed to get graphic engines like unreal to translate?

I think i found the answer i was looking for the code do not run native and compiled to javascript by module in browser.
Not like <C code> </C cod> at all.

You need a tool specific for each language translation, for c/c++ Ecmscripten doing the translation beforehand into a module that ams.js will decode.

As i understand it that actual code coming out from compilation is more like assembler or bytecode and not readable. Without some very deep googles.
I will download ECMSCRIPTEN and find out.


JT

2/15/2015 1:39:00 PM

0

Den söndag 15 februari 2015 kl. 14:33:40 UTC+1 skrev jonas.t...@gmail.com:
> Den söndag 15 februari 2015 kl. 13:18:57 UTC+1 skrev jonas.t...@gmail.com:
> > Den söndag 15 februari 2015 kl. 13:13:41 UTC+1 skrev jonas.t...@gmail..com:
> > > Den söndag 15 februari 2015 kl. 13:11:12 UTC+1 skrev jonas.t...@gmail.com:
> > > > Den lördag 14 februari 2015 kl. 22:57:46 UTC+1 skrev Michael Haufe (TNO):
> > > > > On Saturday, February 14, 2015 at 9:13:39 AM UTC-6, jonas.t...@gmail.com wrote:
> > > > > > Den lördag 14 februari 2015 kl. 15:13:18 UTC+1 skrev jonas.t....@gmail.com:
> > > > > > > I just been aware of the existence of asm.js
> > > > > > >
> > > > > > > I have a couple of questions.
> > > > > > >
> > > > > > > 1. Are you running the actual source language in the browser and it is directly translated into asm.js?
> > > > > > >
> > > > > > > 2. If not what tool is used to translate my python, c code into asm.js?
> > > > > > >
> > > > > > > 3. What happen if system calls invoked in the source code?
> > > > > > >
> > > > > > > 4. Is it implemented as a module to the browser? What about server side scripts?
> > > > > > >
> > > > > > > 5. If the translation is direct in browser how do one get the translated js code?
> > > > > > >
> > > > > > > 6. If the c code, python code use a graphic library what happen then?
> > > > > >
> > > > > > I still do not get how it work, if it do not have the libraries of every language and their compilers which seems impossible.
> > > > > >
> > > > > > Does it translate the source code into javascript? Is it the same javascript engine that interpretate ordinary javascript?
> > > > > >
> > > > > > If not what differ?
> > > > >
> > > > > Look at the FAQ:
> > > > >
> > > > > <http://asmjs.org/fa...
> > > > >
> > > > > See some instances:
> > > > >
> > > > > <https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile...
> > > > >
> > > > > You could of course build your own asm.js compiler as well if you have the desire to do so.
> > > > >
> > > > > Currently Firefox has the fasted implementation of asm.js style code:
> > > > >
> > > > > <http://arewefastyet.com/#machine=28&view=breakdown&suite=asmj...
> > > >
> > > > Sometimes i have a bit of hard time to pick up the core idea of new concepts, could you please point me to a code snippet in c or python with "inclusion tag?" for running it in Firefox. Hello world would do.
> > >
> > > I just do not get it, do Firefox has one module for c to javascript, one for python to javascript and so on??????
> > >
> > > So for each translated source language a new converting interpretator is created+
> >
> > So when converting standard c language only commands within
> > #include <stdlib.h>
> > #include <time.h>
> >
> > Anything require graphic libraries won't work?
> > How they managed to get graphic engines like unreal to translate?
>
> I think i found the answer i was looking for the code do not run native and compiled to javascript by module in browser.
> Not like <C code> </C cod> at all.
>
> You need a tool specific for each language translation, for c/c++ Ecmscripten doing the translation beforehand into a module that ams.js will decode.
>
> As i understand it that actual code coming out from compilation is more like assembler or bytecode and not readable. Without some very deep googles.
> I will download ECMSCRIPTEN and find out.

One final question do i have to have c/c++ installed, how can other wise ecmscripten invoke libraries?

JT

2/15/2015 5:41:00 PM

0

Den söndag 15 februari 2015 kl. 14:39:09 UTC+1 skrev jonas.t...@gmail.com:
> Den söndag 15 februari 2015 kl. 14:33:40 UTC+1 skrev jonas.t...@gmail.com:
> > Den söndag 15 februari 2015 kl. 13:18:57 UTC+1 skrev jonas.t...@gmail..com:
> > > Den söndag 15 februari 2015 kl. 13:13:41 UTC+1 skrev jonas.t...@gmail.com:
> > > > Den söndag 15 februari 2015 kl. 13:11:12 UTC+1 skrev jonas.t...@gmail.com:
> > > > > Den lördag 14 februari 2015 kl. 22:57:46 UTC+1 skrev Michael Haufe (TNO):
> > > > > > On Saturday, February 14, 2015 at 9:13:39 AM UTC-6, jonas.t...@gmail.com wrote:
> > > > > > > Den lördag 14 februari 2015 kl. 15:13:18 UTC+1 skrev jonas.t...@gmail.com:
> > > > > > > > I just been aware of the existence of asm.js
> > > > > > > >
> > > > > > > > I have a couple of questions.
> > > > > > > >
> > > > > > > > 1. Are you running the actual source language in the browser and it is directly translated into asm.js?
> > > > > > > >
> > > > > > > > 2. If not what tool is used to translate my python, c code into asm.js?
> > > > > > > >
> > > > > > > > 3. What happen if system calls invoked in the source code?
> > > > > > > >
> > > > > > > > 4. Is it implemented as a module to the browser? What about server side scripts?
> > > > > > > >
> > > > > > > > 5. If the translation is direct in browser how do one get the translated js code?
> > > > > > > >
> > > > > > > > 6. If the c code, python code use a graphic library what happen then?
> > > > > > >
> > > > > > > I still do not get how it work, if it do not have the libraries of every language and their compilers which seems impossible.
> > > > > > >
> > > > > > > Does it translate the source code into javascript? Is it the same javascript engine that interpretate ordinary javascript?
> > > > > > >
> > > > > > > If not what differ?
> > > > > >
> > > > > > Look at the FAQ:
> > > > > >
> > > > > > <http://asmjs.org/fa...
> > > > > >
> > > > > > See some instances:
> > > > > >
> > > > > > <https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile...
> > > > > >
> > > > > > You could of course build your own asm.js compiler as well if you have the desire to do so.
> > > > > >
> > > > > > Currently Firefox has the fasted implementation of asm.js style code:
> > > > > >
> > > > > > <http://arewefastyet.com/#machine=28&view=breakdown&suite=asmj...
> > > > >
> > > > > Sometimes i have a bit of hard time to pick up the core idea of new concepts, could you please point me to a code snippet in c or python with "inclusion tag?" for running it in Firefox. Hello world would do.
> > > >
> > > > I just do not get it, do Firefox has one module for c to javascript, one for python to javascript and so on??????
> > > >
> > > > So for each translated source language a new converting interpretator is created+
> > >
> > > So when converting standard c language only commands within
> > > #include <stdlib.h>
> > > #include <time.h>
> > >
> > > Anything require graphic libraries won't work?
> > > How they managed to get graphic engines like unreal to translate?
> >
> > I think i found the answer i was looking for the code do not run native and compiled to javascript by module in browser.
> > Not like <C code> </C cod> at all.
> >
> > You need a tool specific for each language translation, for c/c++ Ecmscripten doing the translation beforehand into a module that ams.js will decode.
> >
> > As i understand it that actual code coming out from compilation is more like assembler or bytecode and not readable. Without some very deep googles.
> > I will download ECMSCRIPTEN and find out.
>
> One final question do i have to have c/c++ installed, how can other wise ecmscripten invoke libraries?

But howto say there will not be JIT compilers downloadable as extensions making other programming languages sourcecode compiled and able to run from within tags.

Michael Haufe (\"TNO\")

2/15/2015 8:20:00 PM

0

On Sunday, February 15, 2015 at 7:39:09 AM UTC-6, jonas.t...@gmail.com wrote:
> Den söndag 15 februari 2015 kl. 14:33:40 UTC+1 skrev jonas.t...@gmail.com:
> > Den söndag 15 februari 2015 kl. 13:18:57 UTC+1 skrev jonas.t...@gmail..com:
> > > Den söndag 15 februari 2015 kl. 13:13:41 UTC+1 skrev jonas.t...@gmail.com:
> > > > Den söndag 15 februari 2015 kl. 13:11:12 UTC+1 skrev jonas.t...@gmail.com:
> > > > > Den lördag 14 februari 2015 kl. 22:57:46 UTC+1 skrev Michael Haufe (TNO):
> > > > > > On Saturday, February 14, 2015 at 9:13:39 AM UTC-6, jonas.t...@gmail.com wrote:
> > > > > > > Den lördag 14 februari 2015 kl. 15:13:18 UTC+1 skrev jonas.t...@gmail.com:
> > > > > > > > I just been aware of the existence of asm.js
> > > > > > > >
> > > > > > > > I have a couple of questions.
> > > > > > > >
> > > > > > > > 1. Are you running the actual source language in the browser and it is directly translated into asm.js?
> > > > > > > >
> > > > > > > > 2. If not what tool is used to translate my python, c code into asm.js?
> > > > > > > >
> > > > > > > > 3. What happen if system calls invoked in the source code?
> > > > > > > >
> > > > > > > > 4. Is it implemented as a module to the browser? What about server side scripts?
> > > > > > > >
> > > > > > > > 5. If the translation is direct in browser how do one get the translated js code?
> > > > > > > >
> > > > > > > > 6. If the c code, python code use a graphic library what happen then?
> > > > > > >
> > > > > > > I still do not get how it work, if it do not have the libraries of every language and their compilers which seems impossible.
> > > > > > >
> > > > > > > Does it translate the source code into javascript? Is it the same javascript engine that interpretate ordinary javascript?
> > > > > > >
> > > > > > > If not what differ?
> > > > > >
> > > > > > Look at the FAQ:
> > > > > >
> > > > > > <http://asmjs.org/fa...
> > > > > >
> > > > > > See some instances:
> > > > > >
> > > > > > <https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile...
> > > > > >
> > > > > > You could of course build your own asm.js compiler as well if you have the desire to do so.
> > > > > >
> > > > > > Currently Firefox has the fasted implementation of asm.js style code:
> > > > > >
> > > > > > <http://arewefastyet.com/#machine=28&view=breakdown&suite=asmj...
> > > > >
> > > > > Sometimes i have a bit of hard time to pick up the core idea of new concepts, could you please point me to a code snippet in c or python with "inclusion tag?" for running it in Firefox. Hello world would do.
> > > >
> > > > I just do not get it, do Firefox has one module for c to javascript, one for python to javascript and so on??????
> > > >
> > > > So for each translated source language a new converting interpretator is created+
> > >
> > > So when converting standard c language only commands within
> > > #include <stdlib.h>
> > > #include <time.h>
> > >
> > > Anything require graphic libraries won't work?
> > > How they managed to get graphic engines like unreal to translate?
> >
> > I think i found the answer i was looking for the code do not run native and compiled to javascript by module in browser.
> > Not like <C code> </C cod> at all.
> >
> > You need a tool specific for each language translation, for c/c++ Ecmscripten doing the translation beforehand into a module that ams.js will decode.
> >
> > As i understand it that actual code coming out from compilation is more like assembler or bytecode and not readable. Without some very deep googles.
> > I will download ECMSCRIPTEN and find out.
>
> One final question do i have to have c/c++ installed, how can other wise ecmscripten invoke libraries?

Have you tried looking through the Emscripten tutorial yet?

<https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-cod...

I haven't and don't use it myself as I write my own compiler (for different languages), and they don't necessarily target asm.js specifically at this stage