Re: [Lazarus] Firefox OS

2013-07-18 Thread Reimar Grabowski
On Wed, 17 Jul 2013 09:44:35 +0200 Sven Barth pascaldra...@googlemail.com wrote: On Tue, 16 Jul 2013 19:19:34 + Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: Yes, but asm.js is usually used as an intermediate language akin to Java bytecodes. cf Emscripten etc.

Re: [Lazarus] Firefox OS

2013-07-17 Thread Kostas Michalopoulos
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. It's going to be particularly problematic for the various tests that are run automatically to test the compiler's correctness: it's all very well saying that in the

Re: [Lazarus] Firefox OS

2013-07-17 Thread Sven Barth
Am 16.07.2013 23:34, schrieb Mark Morgan Lloyd: Mattias Gaertner wrote: On Tue, 16 Jul 2013 19:19:34 + 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

Re: [Lazarus] Firefox OS

2013-07-17 Thread Michael Schnell
On 07/16/2013 06:07 PM, Jy V wrote: I guess the main library entry points are located in mozjs.dll so the wrapper fpcjs may need some search and replace replace, Ah, this is what I guessed: The command-line java script interpreter does use parts of the normal Firefox distribution. -Michael

Re: [Lazarus] Firefox OS

2013-07-17 Thread Mark Morgan Lloyd
Sven Barth wrote: [Later] Something like Rhino Shell might do the job. Possibly others. Such as ejscript. Please read the tutorial of emscripten as it explains how to run a JS/asm.js program on the command line: https://github.com/kripken/emscripten/wiki/Tutorial Looks pretty good. So it

Re: [Lazarus] Firefox OS

2013-07-16 Thread Sven Barth
Am 16.07.2013 01:57, schrieb Jy V: I do agree with Sven, the way to go is http://goldparser.org/ the same technique has been used for project llvm_pascal http://code.google.com/p/llvm-pascal/ Why would I want to use a parser generator if we have a fully

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Schnell
On 07/15/2013 10:47 PM, Mark Morgan Lloyd wrote: asm.js does seem to have a lot going for it. So I suppose a fair question is to what extent custom-drawn LCLs for Android and Firefox OS could share code, and whether this abstraction could be useful for other targets e.g. framebuffer or naked

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Schnell
On 07/15/2013 09:24 PM, Sven Barth wrote: I would keep out LLVM and emscripten and just directly generate asm.js code which is then simply compatible to the libraries provided by the emscripten project. That of course is advantageous, as it can be done in Pascal, as the fpc is used to and

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Schnell
On 07/15/2013 10:19 PM, Sven Barth wrote: Why would I want to use a parser generator if we have a fully working multi-backend compiler available?! +1 Either stay with the current (excellent) Parser, or switch to a major standard such as LLVM or gcc ! -Michael --

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Schnell
On 07/16/2013 10:44 AM, Michael Schnell wrote: http://asmjs.org/spec/latest/#introduction looks really interesting as a target arch for fpc. Should we switch to the fpc-devel mailing list on that issue ? -Michael -- ___ Lazarus mailing list

Re: [Lazarus] Firefox OS

2013-07-16 Thread Sven Barth
Am 16.07.2013 10:44, schrieb Michael Schnell: On 07/15/2013 10:47 PM, Mark Morgan Lloyd wrote: asm.js does seem to have a lot going for it. So I suppose a fair question is to what extent custom-drawn LCLs for Android and Firefox OS could share code, and whether this abstraction could be useful

Re: [Lazarus] Firefox OS

2013-07-16 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 07/16/2013 10:44 AM, Michael Schnell wrote: http://asmjs.org/spec/latest/#introduction looks really interesting as a target arch for fpc. Should we switch to the fpc-devel mailing list on that issue ? I think an important issue is whether asm.js can be translated

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Van Canneyt
On Tue, 16 Jul 2013, Michael Schnell wrote: On 07/15/2013 10:47 PM, Mark Morgan Lloyd wrote: asm.js does seem to have a lot going for it. So I suppose a fair question is to what extent custom-drawn LCLs for Android and Firefox OS could share code, and whether this abstraction could be

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Schnell
On 07/16/2013 12:23 PM, Sven Barth wrote: show how you can execute it on the command line as well. Do you start Firefox, a part of same (or whatever) with some command line arguments to do this ? -Michael -- ___ Lazarus mailing list

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Schnell
On 07/16/2013 12:11 PM, Sven Barth wrote: Ehm... you do know that the Android GUI is not based on any HTML? It's a Java based system... While I learned this only after I phrased this message, OTOH HTML5 also is a Java based system and thus the thought might not be _completely_ wrong.

Re: [Lazarus] Firefox OS

2013-07-16 Thread Sven Barth
Am 16.07.2013 12:58 schrieb Michael Schnell mschn...@lumino.de: On 07/16/2013 12:11 PM, Sven Barth wrote: Ehm... you do know that the Android GUI is not based on any HTML? It's a Java based system... While I learned this only after I phrased this message, OTOH HTML5 also is a Java based

Re: [Lazarus] Firefox OS

2013-07-16 Thread Reinier Olislagers
On 16-7-2013 12:56, Michael Schnell wrote: On 07/16/2013 12:11 PM, Sven Barth wrote: Ehm... you do know that the Android GUI is not based on any HTML? It's a Java based system... While I learned this only after I phrased this message, OTOH HTML5 also is a Java based system and thus the

Re: [Lazarus] Firefox OS

2013-07-16 Thread Sven Barth
Am 16.07.2013 12:54 schrieb Michael Schnell mschn...@lumino.de: On 07/16/2013 12:23 PM, Sven Barth wrote: show how you can execute it on the command line as well. Do you start Firefox, a part of same (or whatever) with some command line arguments to do this ? If you want a GUI you'll need

Re: [Lazarus] Firefox OS

2013-07-16 Thread Sven Barth
Am 16.07.2013 12:13, schrieb Mark Morgan Lloyd: Michael Schnell wrote: On 07/16/2013 10:44 AM, Michael Schnell wrote: http://asmjs.org/spec/latest/#introduction looks really interesting as a target arch for fpc. Should we switch to the fpc-devel mailing list on that issue ? I think an

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Van Canneyt
On Tue, 16 Jul 2013, Michael Schnell wrote: On 07/16/2013 12:11 PM, Sven Barth wrote: Ehm... you do know that the Android GUI is not based on any HTML? It's a Java based system... While I learned this only after I phrased this message, OTOH HTML5 also is a Java based system and thus the

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Schnell
On 07/16/2013 01:09 PM, Sven Barth wrote: but otherwise a JS command line interpreter is sufficient. That was what I tried to ask. I never heard of any JS command line interpreter. Is there one provided by Mozilla ? -Michael -- ___ Lazarus

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Schnell
On 07/16/2013 01:09 PM, Sven Barth wrote: JS command line interpreter OK, I did find Rhino. https://developer.mozilla.org/en-US/docs/Rhino -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Schnell
On 07/16/2013 01:07 PM, Sven Barth wrote: HTML5 has *nothing* to do with Java. Sorry for again typing faster than thinking. :-( -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Schnell
On 07/16/2013 01:25 PM, Michael Van Canneyt wrote: Where do you get your information ? I was just being confused and apologize for wasted bandwidth :-( . -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Firefox OS

2013-07-16 Thread Michael Schnell
I Do know that confusing Java and Java-Script is similar to confusing a HedgeHog and a Pig, But things like that happen in my advanced age :-( . -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Firefox OS

2013-07-16 Thread Reimar Grabowski
On Tue, 16 Jul 2013 12:53:02 + Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: So can anybody provide step-by-step instructions for writing a Hello, World! in Javascript, compiling it to asm.js, and running that from a (Linux) shell? Even better, converting the asm.js to native

Re: [Lazarus] Firefox OS

2013-07-16 Thread Jy V
Hello Mark, So can anybody provide step-by-step instructions for writing a Hello, World! in Javascript, compiling it to asm.js, and running that from a (Linux) shell? Even better, converting the asm.js to native code so it can be run without a wrapper? asm.js is just a subset of JavaScript.

Re: [Lazarus] Firefox OS

2013-07-16 Thread Reimar Grabowski
On Tue, 16 Jul 2013 15:33:50 + Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: So can anybody provide step-by-step instructions for writing a Hello, World! in Javascript, compiling it to asm.js, and running that from a (Linux) shell? Nothing gets compiled from JS to asm.js

Re: [Lazarus] Firefox OS

2013-07-16 Thread Mark Morgan Lloyd
Reimar Grabowski wrote: On Tue, 16 Jul 2013 15:33:50 + Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: So can anybody provide step-by-step instructions for writing a Hello, World! in Javascript, compiling it to asm.js, and running that from a (Linux) shell? Nothing gets compiled

Re: [Lazarus] Firefox OS

2013-07-16 Thread Mattias Gaertner
On Tue, 16 Jul 2013 19:19:34 + 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. If you want to do that, then you

Re: [Lazarus] Firefox OS

2013-07-16 Thread Mark Morgan Lloyd
Mattias Gaertner wrote: On Tue, 16 Jul 2013 19:19:34 + 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,

[Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
I read the Firefox OS is gaining support by cell phone manufactures and distributors (e.g. Deutsche Telekom). While Android support seems to be a hot topic here, what about the upcoming Firefox OS. I suppose this is Java-based in a similar way as Android, and maybe a unified support for

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Van Canneyt
On Mon, 15 Jul 2013, Michael Schnell wrote: I read the Firefox OS is gaining support by cell phone manufactures and distributors (e.g. Deutsche Telekom). While Android support seems to be a hot topic here, what about the upcoming Firefox OS. I suppose this is Java-based in a similar way

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
On 07/15/2013 10:12 AM, Michael Van Canneyt wrote: I really should get my Pascal-to-Javascript translator project on track :( How far has this advanced yet ? -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
On 07/15/2013 10:12 AM, Michael Van Canneyt wrote: As far as I know, it is Javascript. Not Java. As Firefox is a very fast Javascript interpreter this does make sense. But it supposedly makes it completely incompatible with Android from ground up (this might be on purpose). But can an OS

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Van Canneyt
On Mon, 15 Jul 2013, Michael Schnell wrote: On 07/15/2013 10:12 AM, Michael Van Canneyt wrote: I really should get my Pascal-to-Javascript translator project on track :( How far has this advanced yet ? I have the AST trees ready, it's just a matter of writing the conversion step between

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
On 07/15/2013 10:25 AM, Michael Van Canneyt wrote: but needs time. As all things. Understood;-) . (Great project nonetheless...) -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Firefox OS

2013-07-15 Thread Felipe Monteiro de Carvalho
On Mon, Jul 15, 2013 at 10:02 AM, Michael Schnell mschn...@lumino.de wrote: I read the Firefox OS is gaining support by cell phone manufactures and distributors (e.g. Deutsche Telekom). There is also Bada and WebOS ... in my opinion there are too many mobile OS, for me personally I think it is

Re: [Lazarus] Firefox OS

2013-07-15 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 07/15/2013 10:12 AM, Michael Van Canneyt wrote: As far as I know, it is Javascript. Not Java. As Firefox is a very fast Javascript interpreter this does make sense. But it supposedly makes it completely incompatible with Android from ground up (this might be on

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
On 07/15/2013 10:45 AM, Felipe Monteiro de Carvalho wrote: There is also Bada and WebOS ... and Windows 8 phone, and ... But besides iOS and Android, I only see Firefox OS as a candidate for decent growth. Lets wait and see... -Michael -- ___

Re: [Lazarus] Firefox OS

2013-07-15 Thread Reinier Olislagers
On 15-7-2013 10:19, Michael Schnell wrote: On 07/15/2013 10:12 AM, Michael Van Canneyt wrote: As far as I know, it is Javascript. Not Java. As Firefox is a very fast Javascript interpreter this does make sense. But it supposedly makes it completely incompatible with Android from ground up

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
On 07/15/2013 11:03 AM, Mark Morgan Lloyd wrote: Michael Schnell wrote: But can an OS completely done in Jacascript be a valid alternate foundation for cell phone and Tablet designs ? A lot of people who should know better think that the GUI is the OS. That is why I put quotes around OS. In

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
On 07/15/2013 11:23 AM, Reinier Olislagers wrote: However, as long as there is overwhelming market share for iOS+Android, supporting those does seem to be the easiest way. Yep, but - as always - being prepared is not a bad thing. In fact with Android having a market share of some 70 %, it

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Van Canneyt
On Mon, 15 Jul 2013, Michael Schnell wrote: On 07/15/2013 11:23 AM, Reinier Olislagers wrote: However, as long as there is overwhelming market share for iOS+Android, supporting those does seem to be the easiest way. Yep, but - as always - being prepared is not a bad thing. In fact with

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
On 07/15/2013 11:58 AM, Michael Van Canneyt wrote: Delphi XE5 - scheduled for release in september is supposed to contain Android support. They already delayed this several times, so I don't hold my breath. In fact this would be the first support for Linux after Kylix death. (Of course

Re: [Lazarus] Firefox OS

2013-07-15 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 07/15/2013 11:03 AM, Mark Morgan Lloyd wrote: Michael Schnell wrote: But can an OS completely done in Jacascript be a valid alternate foundation for cell phone and Tablet designs ? A lot of people who should know better think that the GUI is the OS. That is why I

Re: [Lazarus] Firefox OS

2013-07-15 Thread Reinier Olislagers
On 15-7-2013 10:45, Felipe Monteiro de Carvalho wrote: On Mon, Jul 15, 2013 at 10:02 AM, Michael Schnell mschn...@lumino.de wrote: I read the Firefox OS is gaining support by cell phone manufactures and distributors (e.g. Deutsche Telekom). There is also Bada and WebOS ... in my opinion

Re: [Lazarus] Firefox OS

2013-07-15 Thread Kostas Michalopoulos
Since Firefox (and i assume Firefox OS) uses the new asm.js subset of javascript (a js subset that looks like assembly which can be converted to native code, something like a js-based portable LLVM bitcode), couldn't FPC generate asm.js code instead of x86 assembly/machine code? Obviously that

Re: [Lazarus] Firefox OS

2013-07-15 Thread Reinier Olislagers
On 15-7-2013 12:49, Kostas Michalopoulos wrote: Since Firefox (and i assume Firefox OS) uses the new asm.js subset of javascript (a js subset that looks like assembly which can be converted to native code, something like a js-based portable LLVM bitcode), couldn't FPC generate asm.js code

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
On 07/15/2013 11:20 AM, Reinier Olislagers wrote: Firefox OS used to run on top of Android I don't think that this is the way it is meant to be installed on devices by - say - Deutsche Telekom. Why would they wont to install anything on top of Android, when they have Android anyway ? and

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
On 07/15/2013 12:49 PM, Kostas Michalopoulos wrote: Since Firefox (and i assume Firefox OS) uses the new asm.js subset of javascript (a js subset that looks like assembly which can be converted to native code, something like a js-based portable LLVM bitcode), couldn't FPC generate asm.js code

Re: [Lazarus] Firefox OS

2013-07-15 Thread Marc Santhoff
Am Montag, den 15.07.2013, 13:18 +0200 schrieb Michael Schnell: On 07/15/2013 11:20 AM, Reinier Olislagers wrote: Firefox OS used to run on top of Android I don't think that this is the way it is meant to be installed on devices by - say - Deutsche Telekom. Why would they wont to install

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
On 07/15/2013 01:39 PM, Marc Santhoff wrote: Regarding news about Intelligence Agencies around the world Firefox OS will for sure have it's cusomers. Especially in Europe and even more in Germany. (awaiting the news that the said Agency succeeded in turning down Mozilla org. ) -Michael --

Re: [Lazarus] Firefox OS

2013-07-15 Thread Marc Santhoff
Am Montag, den 15.07.2013, 13:23 +0200 schrieb Michael Schnell: On 07/15/2013 12:49 PM, Kostas Michalopoulos wrote: Obviously that wouldn't solve the GUI issue (one will still need to implement a HTML-based (or whatever) LCL backend, but i think with canvas nowadays that is possible).

Re: [Lazarus] Firefox OS

2013-07-15 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 07/15/2013 12:49 PM, Kostas Michalopoulos wrote: Since Firefox (and i assume Firefox OS) uses the new asm.js subset of javascript (a js subset that looks like assembly which can be converted to native code, something like a js-based portable LLVM bitcode), couldn't

Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
On 07/15/2013 03:15 PM, Mark Morgan Lloyd wrote: Perhaps comparable with the custom-drawn Android LCL. That is what I was thinking of. -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Firefox OS

2013-07-15 Thread Marco van de Voort
On Mon, Jul 15, 2013 at 10:02:54AM +0200, Michael Schnell wrote: While Android support seems to be a hot topic here, If that is *hot*, I think the level for firefox OS is proportionately already. -- ___ Lazarus mailing list

Re: [Lazarus] Firefox OS

2013-07-15 Thread Sven Barth
On 15.07.2013 11:41, Mark Morgan Lloyd wrote: OTOH, Michael's Pascal-to-Javascript translator project comes handy in that case. But do we really want to go there? The FPC and Lazarus projects are stretched enough as it is, without having to get involved in Javascript language issues. A JS

Re: [Lazarus] Firefox OS

2013-07-15 Thread Sven Barth
On 15.07.2013 13:01, Reinier Olislagers wrote: On 15-7-2013 12:49, Kostas Michalopoulos wrote: Since Firefox (and i assume Firefox OS) uses the new asm.js subset of javascript (a js subset that looks like assembly which can be converted to native code, something like a js-based portable LLVM

Re: [Lazarus] Firefox OS

2013-07-15 Thread Jy V
I would keep out LLVM and emscripten and just directly generate asm.js code which is then simply compatible to the libraries provided by the emscripten project. I do agree with Sven, the way to go is http://goldparser.org/ the same technique has been used for project llvm_pascal

Re: [Lazarus] Firefox OS

2013-07-15 Thread Sven Barth
On 15.07.2013 21:42, Jy V wrote: I would keep out LLVM and emscripten and just directly generate asm.js code which is then simply compatible to the libraries provided by the emscripten project. I do agree with Sven, the way to go is http://goldparser.org/ the same technique has

Re: [Lazarus] Firefox OS

2013-07-15 Thread Mark Morgan Lloyd
Sven Barth wrote: On 15.07.2013 11:41, Mark Morgan Lloyd wrote: OTOH, Michael's Pascal-to-Javascript translator project comes handy in that case. But do we really want to go there? The FPC and Lazarus projects are stretched enough as it is, without having to get involved in Javascript

Re: [Lazarus] Firefox OS

2013-07-15 Thread Jy V
I do agree with Sven, the way to go is http://goldparser.org/ the same technique has been used for project llvm_pascal http://code.google.com/p/llvm-**pascal/http://code.google.com/p/llvm-pascal/ Why would I want to use a parser generator if we have a fully working multi-backend compiler