[Lazarus] Proud to announce..

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Proud to announce..

Free Pascal - Lazarus mailing list

Hello !

If anyone still doubted that Object Pascal is the best programming language,
running on the most platforms:

It is with considerable pride that I can announce a new major milestone has
been reached in Free Pascal's pas2js story:

The pas2js compiler runs now embedded in the browser itself.

A picture says more than a thousand words, see attachment.

See it in action for yourself:

https://idefix.freepascal.org/~michael/webcompiler/webcompiler.html

How does it work ?
1. Enter the source of your program.
2. Load the necessary units on the 'load units' tab.
   (The "Load default units" button is a good start)
3. Hit "Compile" !
4. Observe the output of the compiler in the tab "Compiler output"
5. If all went well, the 'Run' button is now active...
6. Press the 'Run' button !

The program will be loaded & run in an IFrame at the bottom of the page.

Obviously, this is only a demo, and there is ample room for improvement
(specifying additional options, viewing generated source code, improving gui)
and you don't have all units available: only the ones in 'rtl' have been
made available. (it's just a matter of uploading them)

But it works. No server interaction other than loading the extra needed
unit sources is necessary: all is done in the browser.

All code is committed in SVN, demo/webcompiler.

Last but not least:
Once more I want to thank Mattias Gaertner for his incredible work on the
compiler, without whose solid foundations I would not have been able to do this
!

Enjoy, and stay tuned for more wonderful features & cutting edge technology
from the people that bring you Free Pascal & Lazarus !

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

webcompiler.png (84K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Proud to announce..

Free Pascal - Lazarus mailing list
On Tue, Dec 4, 2018 at 7:01 PM Michael Van Canneyt via lazarus <[hidden email]> wrote:
Hello !

If anyone still doubted that Object Pascal is the best programming language,
running on the most platforms:

It is with considerable pride that I can announce a new major milestone has
been reached in Free Pascal's pas2js story:

The pas2js compiler runs now embedded in the browser itself.

A picture says more than a thousand words, see attachment.

See it in action for yourself:

https://idefix.freepascal.org/~michael/webcompiler/webcompiler.html

How does it work ?
1. Enter the source of your program.
2. Load the necessary units on the 'load units' tab.
   (The "Load default units" button is a good start)
3. Hit "Compile" !
4. Observe the output of the compiler in the tab "Compiler output"
5. If all went well, the 'Run' button is now active...
6. Press the 'Run' button !

The program will be loaded & run in an IFrame at the bottom of the page.

Obviously, this is only a demo, and there is ample room for improvement
(specifying additional options, viewing generated source code, improving gui)
and you don't have all units available: only the ones in 'rtl' have been
made available. (it's just a matter of uploading them)

But it works. No server interaction other than loading the extra needed
unit sources is necessary: all is done in the browser.

All code is committed in SVN, demo/webcompiler.

Last but not least:
Once more I want to thank Mattias Gaertner for his incredible work on the
compiler, without whose solid foundations I would not have been able to do this
!

Enjoy, and stay tuned for more wonderful features & cutting edge technology
from the people that bring you Free Pascal & Lazarus !

Michael.

Awesome news! Thanks for this incredible work. ☺

Can we use it for online tests to report bugs via Mantis? (something like JSFiddle)

Anyway, thanks a lot for sharing it!

--
Silvio Clécio

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Proud to announce..

Free Pascal - Lazarus mailing list


On Tue, 4 Dec 2018, silvioprog via lazarus wrote:

> Awesome news! Thanks for this incredible work. ☺
>
> Can we use it for online tests to report bugs via Mantis? (something like
> JSFiddle)

An interesting concept, I like it.

This is something we can and should indeed think about.

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Proud to announce..

Free Pascal - Lazarus mailing list
On Tue, Dec 4, 2018 at 7:26 PM Michael Van Canneyt via lazarus <[hidden email]> wrote:
On Tue, 4 Dec 2018, silvioprog via lazarus wrote:

> Awesome news! Thanks for this incredible work. ☺
>
> Can we use it for online tests to report bugs via Mantis? (something like
> JSFiddle)

An interesting concept, I like it.

This is something we can and should indeed think about.

Some ideias:

1. a clean highlighted source editor allowing:
  1.1 to link the CDN of the common JS/CSS libraries (jQuery.js, Vue.js, Bootstrap, Modernizr...);
  1.2 to save the code and share its link (shortened?);
  1.3 to download the generated codes/logs (compressed?);
  1.4 code hinting (like Lazarus' identifier completion. This feature was recently added to JSFiddle);
  1.5 code minify and/or uglify (allowing to copy the single generated line).
2. an easy-to-remember link:
  2.1 a long link idea: https://pas2js.freepascal.org/<OUR-MANTIS-USER>/<CODE-TO-SHARE> (ex: https://pas2js.freepascal.org/michael/Q8KVC)
  2.2 a short link (*very* optional, but useful 🙂)
3. extra:
  3.1 allows the user to manage codes (something like https://pastebin.com);
  3.2 allows reviews/corrections from other users (something like a fork + share).

Just some naive ideas and maybe hard to be implemented, but useful. 😅

--
Silvio Clécio

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Proud to announce..

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
> See it in action for yourself:
>
> https://idefix.freepascal.org/~michael/webcompiler/webcompiler.html

Good work! A little bug, though:
1. Directly press Compile, it will be an error
2. Go to Load units tab, press Load default units
3. Press Compile again, Compiler Output will always contain "Fatal:
Compilation aborted" until refreshed and correct steps are done (i.e. Load
default units before Compile)




--
Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Proud to announce..

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
  I see that you converted FPC project to JS and inserted it into the
webpage. Is it correct?

It is achievement, yes...


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Proud to announce..

Free Pascal - Lazarus mailing list


On Wed, 5 Dec 2018, AlexeyT via lazarus wrote:

>  I see that you converted FPC project to JS and inserted it into the
> webpage. Is it correct?

It is. But this was a goal from day 1 of the project.

I expect the lazarus team to have lazarus running in the browser this time
next year. ;)

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Proud to announce..

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list


On Tue, 4 Dec 2018, leledumbo via lazarus wrote:

>> See it in action for yourself:
>>
>> https://idefix.freepascal.org/~michael/webcompiler/webcompiler.html
>
> Good work! A little bug, though:
> 1. Directly press Compile, it will be an error
> 2. Go to Load units tab, press Load default units
> 3. Press Compile again, Compiler Output will always contain "Fatal:
> Compilation aborted" until refreshed and correct steps are done (i.e. Load
> default units before Compile)


Seems like the reset is not working correctly after an error occurred.

We'll have to check that.

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Proud to announce..

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Tue, Dec 4, 2018 at 11:01 PM Michael Van Canneyt via lazarus
<[hidden email]> wrote:

> The pas2js compiler runs now embedded in the browser itself.

Amazing...

Bart
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Proud to announce..

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
This is impressive. Yes. Thanks!

Juha
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus