Mattias Gaertner wrote:
On Tue, 16 Jul 2013 19:19:34 +0000
Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> wrote:

[...]asm.js has strictly numeric types,

yes

so you can't write a conventional "Hello, World!" in it.

There are javascript libraries implementing strings via arrays.

Yes, but asm.js is usually used as an intermediate language akin to Java bytecodes. cf Emscripten etc.

If you want to do that, then you have to write it in a suitable high-level language: I suggested Javascript, but I can see how that could be confusing so let's just accept /anything/ here.

Now if something like that can't, ultimately, be run from a shell or a makefile it's going to be problematic for an FPC port.

When I google for "asm.js command line tool" then the first hit is the
SpiderMonkey engine. Do you mean that?

As I understand it, SpiderMonkey is for embedding Javascript in a (GUI-based) program, rather than for executing a Javascript or asm.js program from the command line (or from a makefile etc.) and getting text output.

For example, this (via Google) https://github.com/benjcooley/asm-js-firefox-test/blob/master/compile-hello-world.sh shows a "Hello, World" in C++ being compiled using Emscripten, but the target is an HTML file rather than something that could be run from a shell or makefile.

[Later] Something like Rhino Shell might do the job. Possibly others.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to