Sign in Join

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

Mailing lists / lazarus / 2026-02

Live pascal

4 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Michael Van Canneyt

Hello,

Pascal was designed for teaching. I'm sure everyone knows this.

The chairman of the Free Pascal & Lazarus foundation (and me) take this to heart: we would very much like to reintroduce pascal in schools. While it is not certain that we will achieve success, we still try to improve the teaching experience for pascal.

Some languages allow you to test the language on a website. No need to install anything.

We can make the same possible for Pascal.

To this end, I've been working on a project for some time now:

https://live.freepascal.org/

A live editor for pascal, allowing you to run pascal in the browser. It uses pas2js for 'compiling' and lazarus' JCF (compiled to wasm) for formatting the code. You can also pick files from your local computer.

It features a JIT compiler: if you don't do anything for 3 seconds or more, it will compile in the background and annotate the code in the gutter with errors/warnings etc.

You can embed the editor in an existing page and control it from the enveloping page:

https://live.freepascal.org/test-embed.html

The idea is to enable a self-paced tutorial:

https://live.freepascal.org/tutorial-sample.html

But also to have specific assignments:

http://live.freepascal.org/?assignment=assignments/hello-world.json

The latter would be useful for a teacher.

The page tries to verify the results, and gives hints (all pre-configurable).

I know that some people are trying to put together a tutorial. It is my hope that they will consider integrating this in their tutorial.

On the server, it is just a set of static files, so no heavy load. Unzip, and you are ready to go.

I will be committing the code for this in a repo once I've cleaned up a bit.

Some embryonal ideas for improvements:
- Step-by-step tutorial mode with manifest
- Tutorial progress persistence
- Submit results to teacher endpoint (will need server support)
- Multi-file tabbed editor
- Read-only code regions for scaffolded exercises
- Inline hover annotations / code docs (AKA: code insight, the pascal LSP compiled to wasm should enable this)
- Welcome overlay
- Contextual "what next?" guidance
- Quick-insert code snippets
- Unit catalog grouped by domain
- Resizable split panes (draggable divider)
- Separate console panel from DOM output
- Resizable output iframe + presets
- Use FPC itself to output wasm.

Other suggestions for improvements are welcome.
Contributions as well, obviously.

The page is an initial version, so be kind in your judgment :-)

Michael.

Reply by email

Carlos Gonzaga
to Michael Van Canneyt

Congratulations Michael, on the great work.

In reality, what FPC lacks is precisely wider publicity. I know non-profit organizations don't have the same impact as a commercial one, but it's a good start.

Already spreading the word here, as always doing my part.

Em seg., 23 de fev. de 2026 ?s 06:50, Michael Van Canneyt via lazarus <

Show quoted text 85 lines
escreveu: Hello, Pascal was designed for teaching. I'm sure everyone knows this. The chairman of the Free Pascal & Lazarus foundation (and me) take this to heart: we would very much like to reintroduce pascal in schools. While it is not certain that we will achieve success, we still try to improve the teaching experience for pascal. Some languages allow you to test the language on a website. No need to install anything. We can make the same possible for Pascal. To this end, I've been working on a project for some time now: https://live.freepascal.org/ A live editor for pascal, allowing you to run pascal in the browser. It uses pas2js for 'compiling' and lazarus' JCF (compiled to wasm) for formatting the code. You can also pick files from your local computer. It features a JIT compiler: if you don't do anything for 3 seconds or more, it will compile in the background and annotate the code in the gutter with errors/warnings etc. You can embed the editor in an existing page and control it from the enveloping page: https://live.freepascal.org/test-embed.html The idea is to enable a self-paced tutorial: https://live.freepascal.org/tutorial-sample.html But also to have specific assignments: http://live.freepascal.org/?assignment=assignments/hello-world.json The latter would be useful for a teacher. The page tries to verify the results, and gives hints (all pre-configurable). I know that some people are trying to put together a tutorial. It is my hope that they will consider integrating this in their tutorial. On the server, it is just a set of static files, so no heavy load. Unzip, and you are ready to go. I will be committing the code for this in a repo once I've cleaned up a bit. Some embryonal ideas for improvements: - Step-by-step tutorial mode with manifest - Tutorial progress persistence - Submit results to teacher endpoint (will need server support) - Multi-file tabbed editor - Read-only code regions for scaffolded exercises - Inline hover annotations / code docs (AKA: code insight, the pascal LSP compiled to wasm should enable this) - Welcome overlay - Contextual "what next?" guidance - Quick-insert code snippets - Unit catalog grouped by domain - Resizable split panes (draggable divider) - Separate console panel from DOM output - Resizable output iframe + presets - Use FPC itself to output wasm. Other suggestions for improvements are welcome. Contributions as well, obviously. The page is an initial version, so be kind in your judgment :-) Michael. -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus
Carlos Gonzaga -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20260223/4f82f0b6/attachment.htm>

Reply by email

Kostas Michalopoulos
to Michael Van Canneyt: Pascal was designed for teaching. I'm sure everyone knows this. The chairman of the Free…
Michael Van Canneyt wrote 7 lines
To this end, I've been working on a project for some time now: https://live.freepascal.org/ A live editor for pascal, allowing you to run pascal in the browser. It uses pas2js for 'compiling' and lazarus' JCF (compiled to wasm) for formatting the code. You can also pick files from your local computer.

It looks neat, though there are some minor issues IMO:

1. The `Info` lines should be hidden by default because they generate a lot of noise in the output that is meaningless for the users (and can confuse people who just want to experiment with the language in the page).

2. I think more easily accessible shortcuts, preferably using only the left hand (e.g. Alt+R to run) would be better.

3. If you try to press Run without Compile first you get a cryptic `No source available` error message which makes no sense as there is source visible on screen (personally i know what this probably means but it still is a weird message when the 3/4th of the window contains a source code editor). IMO if you press Run without Compile then the code should be compiled first automatically instead of expecting the user to do it first by hand.

4. IMO the output should be on a panel at the bottom right corner on the page, not at a separate "tab" as this requires the user to switch back and forth.

5. With a narrow view (which could be some mobile device), the compiler messages disappear completely. IMO for narrow views the program output should be below the code editor (using a bit less than half the available height) and the messages should be invisible unless the user compiles and there is some issue (error, warning) in which case the first error (if any) or the first warning (if no errors) should be visible at the bottom of the screen (with a red background or whatever) and if the user clicks/taps on it, it should pop up the full error panel (replacing the program output panel temporarily until the user either closes it explicitly, or compiles and runs the program successfully and it produces some output).

6. I think the current examples should be preformatted (or auto-formatted when they're loaded) as currently it feels a bit sloppy that you can load an example, press 'format' and see the example code change as if the example authors didn't care about using the 'correct' formatting that the editor suggests (yes that is up to personal preference but IMO such a tool should be consistent).

Reply by email

Christo Crause
to Kostas Michalopoulos

On Tue, Feb 24, 2026 at 3:20?PM Kostas Michalopoulos via lazarus <

Show quoted text 10 lines
wrote: 3. If you try to press Run without Compile first you get a cryptic `No source available` error message which makes no sense as there is source visible on screen (personally i know what this probably means but it still is a weird message when the 3/4th of the window contains a source code editor). IMO if you press Run without Compile then the code should be compiled first automatically instead of expecting the user to do it first by hand.

Similarly if you compile an example, then load another example and click run, you get the output of the previously compiled program. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20260224/771ccca8/attachment.htm>

Reply by email