Re: [fpc-devel] First pas2js public release

2017-12-20 Thread Michael Van Canneyt



On Wed, 20 Dec 2017, Michael Schnell wrote:


On 20.12.2017 11:36, Michael Van Canneyt wrote:


You program both separately, this is natural.

Obviously !

But this is not necessarily the end of what might be provided by (e.g.) 
Lazarus.


As I wrote in another reply: 
I will never spend time on that, because I consider it a misguided approach,

but if people want to: it's a free world :)

Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] First pas2js public release

2017-12-20 Thread Michael Van Canneyt



On Wed, 20 Dec 2017, el es wrote:


Hi,

On 20/12/17 10:36, Michael Van Canneyt wrote:



On Tue, 19 Dec 2017, Lukasz Sokol wrote:


On 18/12/17 08:59, Michael Schnell wrote:

Great !

Thanks a lot to all who  enabled this fantastic enhancement to the
fpc system !

I have been dreaming of being able to "simply run" Lazarus projects
(and legacy Delphi-) ) in a server and have the GUI displayed in a
browser.

This seems to get in reach right now :) :)  :) .  (OK, splitting the
project in a server and a browser part and communication between the
parts will not be automatically done in very near future, but who
knows )



^ I think I should have underlined this ^^^
because my entire response was triggered by this line...



[...]


You program both separately, this is natural.


But as you see from the underlined, not for everybody :)



I know. 
But I believe such people are completely on the wrong track.
I will never spend time on such an approach. 
Don't let me stop you from trying, though :)


Michael.___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] First pas2js public release

2017-12-20 Thread Michael Schnell

On 20.12.2017 11:36, Michael Van Canneyt wrote:


You program both separately, this is natural.

Obviously !

But this is not necessarily the end of what might be provided by (e.g.) 
Lazarus.


-Michael

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] First pas2js public release

2017-12-20 Thread Michael Schnell

On 19.12.2017 10:40, Lukasz Sokol wrote:
If I Understand This Correctly, pas2js treated program would run in a 
browser, client side only ? And does not care what the server is, 
because it does not run on server ?

That is of course correct and it is why I offered the sentence in brackets.

Right now it's completely up to the application programmer to do the two 
parts of the application and to mange the communication between them.


But it would be a viable task for Lazarus (ow whomever) to provide a 
"standard" Methodology / Library / IDE integration to allow for 
splitting a "normal" application in such parts.


I understand that Microsoft (quite promising but finally rather 
unsuccessfully) had this in mind with Silverlight (C# running seamlessly 
in a browser).


-Michael

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] First pas2js public release

2017-12-20 Thread el es
Hi,

On 20/12/17 10:36, Michael Van Canneyt wrote:
> 
> 
> On Tue, 19 Dec 2017, Lukasz Sokol wrote:
> 
>> On 18/12/17 08:59, Michael Schnell wrote:
>>> Great !
>>>
>>> Thanks a lot to all who  enabled this fantastic enhancement to the
>>> fpc system !
>>>
>>> I have been dreaming of being able to "simply run" Lazarus projects
>>> (and legacy Delphi-) ) in a server and have the GUI displayed in a
>>> browser.
>>>
>>> This seems to get in reach right now :) :)  :) .  (OK, splitting the
>>> project in a server and a browser part and communication between the
>>> parts will not be automatically done in very near future, but who
>>> knows )
>>>

^ I think I should have underlined this ^^^
because my entire response was triggered by this line...



[...]

> You program both separately, this is natural.

But as you see from the underlined, not for everybody :)

> 
> 
>> For communication between the browser end and the server end,
>> there are ways covered (AJAX ?) not much different than the usual
>> (js in browser <-> java/php/perl/python/server side js in server

> 
> Yes. Normal Ajax works, see the demos.
> 
> But we went a step further. TDataset and REST works out of the box. See also 
> the demos.
> 
> Michael.

Can't wait to try it out... but the holidays are likely to get in the way ;)

-L.



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] TStringStream changes

2017-12-20 Thread Ondrej Pokorny

On 21.07.2017 19:16, Michael Van Canneyt wrote:

TStringStream now observes encoding.


Are these changes going to be merged to fixes_3_0? What first stable 
version it is going to appear in?


As it turned out, Lazarus sources are affected by this change too, so we 
need to get the correct {$IF FPC_FULLVERSION >= 30x0x}.


Thanks
Ondrej
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] First pas2js public release

2017-12-20 Thread Michael Van Canneyt



On Tue, 19 Dec 2017, Lukasz Sokol wrote:


On 18/12/17 08:59, Michael Schnell wrote:

Great !

Thanks a lot to all who  enabled this fantastic enhancement to the
fpc system !

I have been dreaming of being able to "simply run" Lazarus projects
(and legacy Delphi-) ) in a server and have the GUI displayed in a
browser.

This seems to get in reach right now :) :)  :) .  (OK, splitting the
project in a server and a browser part and communication between the
parts will not be automatically done in very near future, but who
knows )



If I Understand This Correctly,

pas2js treated program would run in a browser, client side only ?
And does not care what the server is, because it does not run on server ?


Yes.

(Note that you could write a Node.js program using pas2js, so you would have
a pas2js program on the server, and one on the browser)



For 'server' side you then write 'as usual' e.g. cgi or other way available
(server-native binary)


Yes.



(Nothing stops really the server-side-native binary (e.g. written in Pascal)
from sending a pas2js transpiled program to the browser as a part of a 'html 
page'/script,


You could do so.

But I don't think you should.

but the line of separation is pretty clear here : this is like doing Graeme's favorite GUI to non-gui portion separation ';) 
but still YOU are doing the separation manually - you need to write BOTH portions separately)


Yes. HTTP is client server.

You program both separately, this is natural.


For communication between the browser end and the server end, there are ways covered 
(AJAX ?) not much different than the usual (js in browser <-> java/php/perl/python/server side js in server)

LAMP stack does.


Yes. Normal Ajax works, see the demos.

But we went a step further. TDataset and REST works out of the box. See also 
the demos.

Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] First pas2js public release

2017-12-20 Thread Mattias Gaertner
On Tue, 19 Dec 2017 09:40:48 +
Lukasz Sokol  wrote:

>[...]
> pas2js treated program would run in a browser, client side only ?
> And does not care what the server is, because it does not run on server ?

Yes, in fact it does not need a server. A browser only needs some
HTML and the pas2js generated js, which could be on your local disk.
See here:
http://wiki.freepascal.org/pas2js#for_the_browser

Note that with Node.js you can run pas2js programs on the server too.

 
> For 'server' side you then write 'as usual' e.g. cgi or other way available
> (server-native binary)
> 
> (Nothing stops really the server-side-native binary (e.g. written in Pascal)
>  from sending a pas2js transpiled program to the browser as a part of a 'html 
> page'/script,
>  but the line of separation is pretty clear here : this is like doing 
> Graeme's favorite GUI to non-gui portion separation ';) 
>  but still YOU are doing the separation manually - you need to write BOTH 
> portions separately)
> 
> For communication between the browser end and the server end, there are ways 
> covered 
> (AJAX ?) not much different than the usual (js in browser <-> 
> java/php/perl/python/server side js in server) LAMP stack does.

Yes, see the demoxhr.lpr example in:
https://svn.freepascal.org/svn/projects/pas2js/trunk/demo/rtl/


Mattias
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] First pas2js public release

2017-12-20 Thread Lukasz Sokol
On 18/12/17 08:59, Michael Schnell wrote:
> Great !
> 
> Thanks a lot to all who  enabled this fantastic enhancement to the
> fpc system !
> 
> I have been dreaming of being able to "simply run" Lazarus projects
> (and legacy Delphi-) ) in a server and have the GUI displayed in a
> browser.
> 
> This seems to get in reach right now :) :)  :) .  (OK, splitting the
> project in a server and a browser part and communication between the
> parts will not be automatically done in very near future, but who
> knows )
> 

If I Understand This Correctly,

pas2js treated program would run in a browser, client side only ?
And does not care what the server is, because it does not run on server ?

For 'server' side you then write 'as usual' e.g. cgi or other way available
(server-native binary)

(Nothing stops really the server-side-native binary (e.g. written in Pascal)
 from sending a pas2js transpiled program to the browser as a part of a 'html 
page'/script,
 but the line of separation is pretty clear here : this is like doing Graeme's 
favorite GUI to non-gui portion separation ';) 
 but still YOU are doing the separation manually - you need to write BOTH 
portions separately)

For communication between the browser end and the server end, there are ways 
covered 
(AJAX ?) not much different than the usual (js in browser <-> 
java/php/perl/python/server side js in server)
LAMP stack does.

(I sincerely hope I understand this right).

-L.

> -Michael ___ fpc-devel
> maillist  -  fpc-devel@lists.freepascal.org 
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel