Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / pas2js / 2020-02

Pas2js Build String

10 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt
to cbsistem
cbsistem wrote
I need to compile a string in memory and get the JavaScript output string.

TStringStream ?

If you check the implementation you'll see some methods to convert binary arrays to strings.

Michael.

Reply by email

cbsistem
to Michael Van Canneyt

the intention is to use pas2js with vscode together with other Javascript frameworks and with typescript.

to be able to write a project being part in JavaScript, part in TypeScript, part in pascal.

Use the best in each one.

There are many good ORMs in typescript and JavaScript and now a Pascal programmer can use his preferred language.

the project can make use of pascal, taking advantage of libs Javascript / typescript.

At first I thought about making a http server in pascal so that it would be consumed by vscode, compile the pascal string and return the javascript, leaving it up to vscode (javascript) what to do with this transpiled string.

-----
Cristiano Barbosa

Reply by email

Michael Van Canneyt
to cbsistem
cbsistem wrote
the intention is to use pas2js with vscode together with other Javascript frameworks and with typescript.

Did you see the VSCode plugin of TMS Web core ?

Show quoted text 8 lines
to be able to write a project being part in JavaScript, part in TypeScript, part in pascal. Use the best in each one. There are many good ORMs in typescript and JavaScript and now a Pascal programmer can use his preferred language.

Can you name a few, I'm interested ?

Show quoted text 7 lines
the project can make use of pascal, taking advantage of libs Javascript / typescript. At first I thought about making a http server in pascal so that it would be consumed by vscode, compile the pascal string and return the javascript, leaving it up to vscode (javascript) what to do with this transpiled string.

Did you look at the compileserver ? It does exactly that. You can start it with an npm task in vscode.

Michael.

Reply by email

cbsistem
to Michael Van Canneyt

plugin tms webcore dinsponible to download ? not found.

TypeORM (firebird not suported)
CamintJs (firebird suported)

other NestJs (TypeORM)

on windows, I tried to use the nodemon with vscode, but when executing a compilation task there is an error.

Pas2Js integrated with vscode working with other JS framework would attract many developers.

-----
Cristiano Barbosa

Reply by email

Michael Van Canneyt
to cbsistem
cbsistem wrote
plugin tms webcore dinsponible to download ? not found.

You need a license.

TypeORM (firebird not suported) CamintJs (firebird suported)

This is for nodejs, I think ? This is not browser-side ?

other NestJs (TypeORM) on windows, I tried to use the nodemon with vscode, but when executing a compilation task there is an error.

I have succesfully compiled with pas2js from within vscode ?

Pas2Js integrated with vscode working with other JS framework would attract many developers.

Agreed. But here I count on other people to do the work: a) No time for an extra target.
b) I'm an Atom user.

I will do external class definitions for whatever framework seems useful, but I will not attempt vs code integration.

Michael.

Reply by email

cbsistem
to Michael Van Canneyt

https://github.com/szyjava/neurosync
https://github.com/Rekord/rekord

https://github.com/waitaction/websql-orm

http://alasql.org good

I have succesfully compiled with pas2js from within vscode

tested Windows ??

b) I'm an Atom user.

ATOM executed in remote Browser ??
VS CODE executed remote using browser.

vs code is the environment most used by web developers. has thousands of plugins. Supports all languages.

DWScript was the first compiler, but for being alone, without debugging, without an editor, without documentation. You are creating lost work.

I would not like this to happen with pas2js.

if pas2js were supported it could be a choice / alternative for a typewriter.

-----
Cristiano Barbosa

Reply by email

Michael Van Canneyt
to cbsistem
cbsistem wrote 6 lines

Thank you.

> I have succesfully compiled with pas2js from within vscode tested Windows ??

No, MacOS.

> b) I'm an Atom user. ATOM executed in remote Browser ??

No. Native.

VS CODE executed remote using browser.

Yes, I know it can be done.
Personally, I don't see the point of that for daily work.

vs code is the environment most used by web developers. has thousands of plugins. Supports all languages.

I know. Still, I prefer & use atom myself.

Show quoted text 8 lines
DWScript was the first compiler, but for being alone, without debugging, without an editor, without documentation. You are creating lost work. I would not like this to happen with pas2js. if pas2js were supported it could be a choice / alternative for a typewriter.

Typescript, you mean ?

You concern is valid. But as I said:
I count on the community to do something for VSCode. I have work enough with Free Pascal and pas2js themselves.

Michael.

Reply by email

cbsistem
to Michael Van Canneyt
Typescript, you mean ?

yes

Personally, I don't see the point of that for daily work.

When you're just a programmer it doesn't make much sense. Now think of 10 home office programmers. Or you have just hired 1 more home office, it already logs into a configured environment. Or make a playground.

This methodology is used by web developers.

check http://www.qooxdoo.org/current/playground/#Hello%20World-ria

-----
Cristiano Barbosa

Reply by email