Pas2js poll What do you need? lazarus / 76-Pas2JS ---------------------------------------------------------------------- mattias · 2020-06-03 09:44 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 · 2020-06-04 11:15 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. ---------------------------------------------------------------------- PascalDragon · 2020-06-04 12:09 Quote from: Ñuño_Martínez on June 04, 2020, 01:15:14 pmWhat 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 · 2020-06-04 18:23 I've tried several times and never succeeded.   I'll try again when version 2.0 is out. ---------------------------------------------------------------------- lainz · 2020-06-05 00:04 That pas2js comes preinstalled and preconfigured in Lazarus. ---------------------------------------------------------------------- bee · 2020-06-05 01:42 Quote from: Ñuño_Martínez on June 04, 2020, 01:15:14 pmWhat 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. ---------------------------------------------------------------------- PascalDragon · 2020-06-05 07:11 Quote from: Ñuño_Martínez on June 04, 2020, 08:23:35 pmI'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 · 2020-06-05 17:46 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. ---------------------------------------------------------------------- DonAlfredo · 2020-06-05 17:58 @ps lol.jpg looks good Sharing would be appreciated (by me) ... could also save me another 2 weeks ... ---------------------------------------------------------------------- Ñuño_Martínez · 2020-06-06 10:43 I'll ask again when I have time or need to use it. Thanks.