Hi,
Take a look at this interesting product: http://p2js.gelicon.biz/en
It's build upon FPC source and has GPL license. It looks interesting. Perhaps we can use this to boost FPC's pas2js tool?
Regards,

Mailing lists / fpc-pascal / 2015-06
6 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi,
Take a look at this interesting product: http://p2js.gelicon.biz/en
It's build upon FPC source and has GPL license. It looks interesting. Perhaps we can use this to boost FPC's pas2js tool?
Regards,
Bee wroteHi, Take a look at this interesting product: http://p2js.gelicon.biz/en It's build upon FPC source and has GPL license. It looks interesting. Perhaps we can use this to boost FPC's pas2js tool?
I have already looked into it and took some ideas from it. Halfway july, I will implement those ideas.
Michael.
The interesting part of this product is it tries to compile all the FPC RTL into Javascript as well. Unlike Smart Pascal. So we don't just have Pascal to Javascript translator but also with all the useful RTL.
Btw, it seems that it targets only Windows platform. I failed when I tried to compile it on Ubuntu Linux using FPC 2.6.4 Is there a way to compile it on Linux, Michael? Can you do that?
Thank you.
On Sun, Jun 7, 2015 at 12:43 AM, Michael Van Canneyt <
Bee wroteThe interesting part of this product is it tries to compile all the FPC RTL into Javascript as well. Unlike Smart Pascal. So we don't just have Pascal to Javascript translator but also with all the useful RTL.
As far as I can see, this is not correct. The rtl units have been hand-crafted. Many of them contain assembler code, and this is simply impossible to translate.
Btw, it seems that it targets only Windows platform. I failed when I tried to compile it on Ubuntu Linux using FPC 2.6.4 Is there a way to compile it on Linux, Michael? Can you do that?
I have asked Florian to take a look at integrating it back in the compiler (that is be. I myself will take some ideas from it and see how far it gets me in the external tool. The var param support was bugging me, and they use an interesting technique for it with closures.
Michael.
On Sun, Jun 7, 2015 at 2:28 PM, Michael Van Canneyt wrote:
As far as I can see, this is not correct. The rtl units have been
hand-crafted. Many of them contain assembler code, and this is simply impossible to translate.
Ah, I see. Then how p2js provide its RTL? Is it also hand-crafted? That's a lot of works!
I have asked Florian to take a look at integrating it back in the compiler
I hope this will help pas2js to become an advance pascal to javascript compiler. This will help us creating a full web application using pascal from end to end. And also because I simply hate to learn JavaScript. It's a mess. :D
By the way, it seems almost impossible to compile p2js on linux or osx. p2js was written to only target Windows, although it's using FPC. This is very unfortunate. :(
Bee wroteI hope this will help pas2js to become an advance pascal to javascript compiler. This will help us creating a full web application using pascal from end to end. And also because I simply hate to learn JavaScript. It's a mess. :D
Learning Javascript is getting rather easy if you take a crash course in Lisp beforehand. It looks like Java or C, but it works like Lisp.
HTH,
Marc