* * *

Author Topic: Smart Pascal compiler released free to the public  (Read 9520 times)

Phil

  • Hero Member
  • *****
  • Posts: 2142
Re: Smart Pascal compiler released free to the public
« Reply #15 on: July 17, 2017, 11:56:36 pm »
What happened to this? Any possibility to make FPC compile to javascript+html5?

I don't know anything about Smart Pascal, but FPC trunk does have the fppas2js converter that's in active development. You could take a look at that.

I'm not sure where something like this would be useful in Web development, quite honestly. The idea of "recompiling" a desktop app into JS and putting it up on the Web doesn't really make sense, from the UI perspective and everything else.

Maybe it would be useful if you needed to write quite a lot of JS and so you did it in Pascal instead.

Almost all modern Web apps integrate with existing Javascript libraries. I don't really see how the Pascal code would work with these. Seems like you would need a Pascal "interface" to the JS libraries.



Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 626
    • Burdjia
Re: Smart Pascal compiler released free to the public
« Reply #16 on: July 18, 2017, 09:41:26 am »
What happened to this?

I've download the latest "SMS command line compiler" and it doesn't work (generates empty .js files) and nobody seems to reproduce the bug (I suspect there's something in the SMS IDE that is needed by the compiler and they forgot to include in the "command line compiler" version).  I didn't use it since last year.

What happened to this? Any possibility to make FPC compile to javascript+html5?

I don't know anything about Smart Pascal, but FPC trunk does have the fppas2js converter that's in active development. You could take a look at that.
I should test this. Is it stable enough?

Almost all modern Web apps integrate with existing Javascript libraries. I don't really see how the Pascal code would work with these. Seems like you would need a Pascal "interface" to the JS libraries.
SMS's interface system is quite nice.  It uses "EXTERNAL" keyword in a similar way FPC and Delphi does with DLL and .so files.
« Last Edit: July 18, 2017, 09:43:17 am by Ñuño_Martínez »

Thaddy

  • Hero Member
  • *****
  • Posts: 3971
Re: Smart Pascal compiler released free to the public
« Reply #17 on: July 18, 2017, 09:58:02 am »
I should test this. Is it stable enough?
Yes. Some features not yet or missing, but updates flying around on almost a daily basis.
Note there is also a branch to compile to js by Florian. Status unknown to me atm.
And I am still working on a TCanvas implementation with underlying a html5 canvas. Christian Budde is doing something likewise I believe.
Currently I am focussng on an OpenVG TCanvas first, because I need that more.
« Last Edit: July 18, 2017, 10:02:36 am by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5529
Re: Smart Pascal compiler released free to the public
« Reply #18 on: July 18, 2017, 10:03:10 am »
What is the actual practical use? Is the intention to use it for new code only, or to recompile old desktop parts? If so, what about language limitations of the pas2js subset?

Thaddy

  • Hero Member
  • *****
  • Posts: 3971
Re: Smart Pascal compiler released free to the public
« Reply #19 on: July 18, 2017, 10:11:29 am »
What is the actual practical use? Is the intention to use it for new code only, or to recompile old desktop parts? If so, what about language limitations of the pas2js subset?

The practical use is:
- Use a strongly typed, familiar language to generate js that has atm very performant ways to execute it,( including webasm, although some say otherwise (wrongly) )
- In the case of the canvas: choose an existing low-level class to render to browser within the current LCL structure/architecture.
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus