Recent

Author Topic: Pas2js poll What do you need?  (Read 3098 times)

mattias

  • Administrator
  • Full Member
  • *
  • Posts: 184
    • http://www.lazarus.freepascal.org
Pas2js poll What do you need?
« on: June 03, 2020, 11:44:00 am »
Hello,

We're getting closer to releasing version 2.0 of the pas2js compiler.
The major highlights of that release will be:
- Attributes
- Generics
- Async/Await support
- Better exception interception
- Class constructors

We'd again like to know what you would like to see next in pas2js:

Please fill in your preference here:

https://forms.gle/VfLbgxd8fQrU2hia8

Most items will be clear, but maybe asm [annotations] and library support
need some small explanation:

- Asm annotations are hints to the compiler, you can tell the compiler what
   variables your asm code uses, so the compiler won't optimize them away.

- Library support is for NodeJS, VS Code, Atom and Electron plugin development, as well as
   developing W3 WebComponents

Mattias

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Pas2js poll What do you need?
« Reply #1 on: June 04, 2020, 01:15:14 pm »
What I want/need about pas2js is to install it as an stand alone program.  I mean, no need to use Lazarus to use it, as I can do with FPC. There are many reasons, for example to install in to a server and use it to translate from Pascal to ECMAscript on the fly or use makefile to build sites.

It would be wonderful.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Pas2js poll What do you need?
« Reply #2 on: June 04, 2020, 02:09:30 pm »
What I want/need about pas2js is to install it as an stand alone program.  I mean, no need to use Lazarus to use it, as I can do with FPC. There are many reasons, for example to install in to a server and use it to translate from Pascal to ECMAscript on the fly or use makefile to build sites.

But you can already do that? pas2js is a command line binary just like fpc and you can call it with similar arguments (in fact Lazarus uses that as well).

Also there is compileserver which is a variant of the simpleserver example that does exactly what you mentioned: it automatically compiles the Pascal code to JS code when requested.

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Pas2js poll What do you need?
« Reply #3 on: June 04, 2020, 08:23:35 pm »
I've tried several times and never succeeded. %)  I'll try again when version 2.0 is out.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Pas2js poll What do you need?
« Reply #4 on: June 05, 2020, 02:04:45 am »
That pas2js comes preinstalled and preconfigured in Lazarus.

bee

  • Sr. Member
  • ****
  • Posts: 393
Re: Pas2js poll What do you need?
« Reply #5 on: June 05, 2020, 03:42:32 am »
What I want/need about pas2js is to install it as an stand alone program.
I have no Lazarus installed on my machine. I have been using pas2js since the beginning (pre v1.0) as a stand alone command line program. In fact, Lazarus integration was added later. So, it’s strange that you can’t use pas2js from the command line.
-Bee-

A long time pascal lover.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Pas2js poll What do you need?
« Reply #6 on: June 05, 2020, 09:11:32 am »
I've tried several times and never succeeded. %)  I'll try again when version 2.0 is out.

You should probably ask here then if you have problems. So far I personally have encountered none.

ps

  • Full Member
  • ***
  • Posts: 136
    • CSS
Re: Pas2js poll What do you need?
« Reply #7 on: June 05, 2020, 07:46:18 pm »
Really nice Job!

Please make it https://developers.google.com/closure/compiler compatible. Base support is easy: https://bugs.freepascal.org/view.php?id=37114

It's bug tracker watched? I found crazy bug something like:
 SetLength(Dynarray[1].InnerDynArray, 10);
 SetLength(Dynarray[2].InnerDynArray, 20);
 SetLength(Dynarray[3].InnerDynArray, 30);
 SetLength(Dynarray[4].InnerDynArray, 40); <- all DynArray[1..4] will be same as DynArray[4] with InnerDynArray set to length 40 and with same data.

BTW: Migration from my LCL desktop app based on my lib (css) to ps2js took me only 2 weeks.
Small simple CSS/box model implementation: https://github.com/pst2d/csscontrols/tree/dev

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Pas2js poll What do you need?
« Reply #8 on: June 05, 2020, 07:58:01 pm »
@ps
lol.jpg looks good
Sharing would be appreciated (by me) ... could also save me another 2 weeks ...  ;)

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Pas2js poll What do you need?
« Reply #9 on: June 06, 2020, 12:43:03 pm »
I'll ask again when I have time or need to use it. Thanks. :)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

 

TinyPortal © 2005-2018