Re: Compilation of Pike with Emscripten ?

Chris Angelico <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <CAPTjJmogmOAz3Vdk3o0PvrKYr5+gwxLCUf4_fkbY+pDHz3ih+w@mail.gmail.com>
On Tue, Oct 7, 2014 at 12:44 AM, Olivier Auverlot
<[email protected]> wrote:
> With Emscripten, it's possible to compile a C code and to translate it into javascript. Do you think that's is possible with Pike ? The main problem is the nature of the executed code. Chromebook are using differents architectures (Intel and ARM) and it's needed to use an interpreter of byte codes. Pike uses bytecode or native code ?
>

Pike compiles to native code where available. As long as it's aware
that it can't compile to native on this platform, it should fall back
on straight-forward interpretation of its own internal bytecode. If
necessary, you can force it to avoid machine code:

make CONFIGUREARGS=--without-machine-code

I've no idea how performance will be, running a language interpreter
under JavaScript! But more importantly, I've no idea how many external
C-level libraries you'll have available. This could be a *very*
interesting port, though. I get people asking me every now and then
when I'll port my MUD client (Gypsum) to a mobile platform; and if
Pike's available for any of them, that could make Gypsum available.
(Though I doubt you'll have GTK for Emscripten. Oh well.)

Good luck!

ChrisA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.