Sign in Join

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

Mailing lists / fpc-pascal / 2026-02

Live pascal

52 messages · 15 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

Tomas Hajny
to Michael Van Canneyt

On 2026-02-23 10:50, Michael Van Canneyt via fpc-pascal wrote:

Hi Michael,

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

.
.

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

For start, it would be nice to get the following error fixed ( ;-) ) :

Failure: failed to compile program, please check error messages. Info: MainSrcFile /tmp/main.pp -> /tmp/main.pp
Info: Formatpath /tmp/main.pp -> tmp/main.pp
Info: Parsing tmp/main.pp ...
Info: ExpandFileNamePJ /tmp/main.pp Extract file name : main.pp Fatal: Read error "/tmp/main.pp"
Fatal: Compilation aborted

(Appears when trying to compile one of the provided examples)

Tomas

Reply by email

Guillermo Martínez Jiménez
to Michael Van Canneyt: Pascal was designed for teaching. I'm sure everyone knows this. The chairman of the Free…

Great! Bookmarked.

El Mon, 23 Feb 2026 10:50:31 +0100 (CET)
Michael Van Canneyt via fpc-pascal

Show quoted text 81 lines
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. _______________________________________________ fpc-pascal maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Michael Van Canneyt
to Tomas Hajny: . . For start, it would be nice to get the following error fixed ( ;-) ) : Failure:…
Tomas Hajny wrote 21 lines
On 2026-02-23 10:50, Michael Van Canneyt via fpc-pascal wrote: Hi Michael, > Pascal was designed for teaching. I'm sure everyone knows this. . . > The page is an initial version, so be kind in your judgment :-) For start, it would be nice to get the following error fixed ( ;-) ) : Failure: failed to compile program, please check error messages. Info: MainSrcFile /tmp/main.pp -> /tmp/main.pp Info: Formatpath /tmp/main.pp -> tmp/main.pp Info: Parsing tmp/main.pp ... Info: ExpandFileNamePJ /tmp/main.pp Extract file name : main.pp Fatal: Read error "/tmp/main.pp" Fatal: Compilation aborted (Appears when trying to compile one of the provided examples)

Which one ? I tried all, and they all worked ?

Maybe a sync error. That would be difficult to trace. I did tests in the browser with 3G throttling, and it still worked, so I'm a bit at loss to explain this.

Michael.

Reply by email

Michael Van Canneyt
to Adriaan van Os: The essence of it is to learn abstract thinking. And for that purpose, it is better to…
Adriaan van Os wrote 8 lines
Michael Van Canneyt via fpc-pascal wrote: > > Hello, > > Pascal was designed for teaching. I'm sure everyone knows this. The essence of it is to learn abstract thinking. And for that purpose, it is better to read the Wirth Report than to play around with a compiler .....

Ah, always refreshing to read encouraging comments.

Michael.

Reply by email

Tomas Hajny
to Michael Van Canneyt: Which one ? I tried all, and they all worked ? Maybe a sync error. That would be…
Michael Van Canneyt wrote
On Mon, 23 Feb 2026, Tomas Hajny via fpc-pascal wrote: > On 2026-02-23 10:50, Michael Van Canneyt via fpc-pascal wrote:

.
.

Show quoted text 19 lines
> For start, it would be nice to get the following error fixed ( ;-) ) : > > Failure: failed to compile program, please check error messages. > Info: MainSrcFile /tmp/main.pp -> /tmp/main.pp > Info: Formatpath /tmp/main.pp -> tmp/main.pp > Info: Parsing tmp/main.pp ... > Info: ExpandFileNamePJ /tmp/main.pp Extract file name : main.pp > Fatal: Read error "/tmp/main.pp" > Fatal: Compilation aborted > > (Appears when trying to compile one of the provided examples) Which one ? I tried all, and they all worked ? Maybe a sync error. That would be difficult to trace. I did tests in the browser with 3G throttling, and it still worked, so I'm a bit at loss to explain this.

I tried again now, the result is the same (64-bit Firefox running on MS Windows at the moment). It already happened with the first example loaded by default (i.e. "Hello World"), but I got the same when trying "String operations" demo as well. Attached you'll find export from the browser console - feel free to ask if there's anything else I could provide. I tried reloading the page using F5 key -> no difference.

Tomas

Reply by email

Michael Van Canneyt
to Hairy Pixels: On Feb 23, 2026 at 4:50:31 PM, Michael Van Canneyt via fpc-pascal < Compile/Run button…
Hairy Pixels wrote 10 lines
On Feb 23, 2026 at 4:50:31 PM, Michael Van Canneyt via fpc-pascal < > wrote: > To this end, I've been working on a project for some time now: > > https://live.freepascal.org/ > Compile/Run button is disabled and I see "Loading units 11/15...". macOS and Safari. Works on Chrome though so it's browser related.

I'm guessing the wasm is too complicated for safari. Any errors in the developer console ?

Michael.

Reply by email

Michael Van Canneyt
to Tomas Hajny: . . I tried again now, the result is the same (64-bit Firefox running on MS Windows at…
Tomas Hajny wrote 29 lines
On 2026-02-23 16:16, Michael Van Canneyt via fpc-pascal wrote: > On Mon, 23 Feb 2026, Tomas Hajny via fpc-pascal wrote: >> On 2026-02-23 10:50, Michael Van Canneyt via fpc-pascal wrote: . . >> For start, it would be nice to get the following error fixed ( ;-) ) : >> >> Failure: failed to compile program, please check error messages. >> Info: MainSrcFile /tmp/main.pp -> /tmp/main.pp >> Info: Formatpath /tmp/main.pp -> tmp/main.pp >> Info: Parsing tmp/main.pp ... >> Info: ExpandFileNamePJ /tmp/main.pp Extract file name : main.pp >> Fatal: Read error "/tmp/main.pp" >> Fatal: Compilation aborted >> >> (Appears when trying to compile one of the provided examples) > > Which one ? I tried all, and they all worked ? > > Maybe a sync error. That would be difficult to trace. I did tests in the > browser with 3G throttling, and it still worked, so I'm a bit at loss to > explain this. I tried again now, the result is the same (64-bit Firefox running on MS Windows at the moment). It already happened with the first example loaded by default (i.e. "Hello World"), but I got the same when trying "String operations" demo as well. Attached you'll find export from the browser console - feel free to ask if there's anything else I could provide. I tried reloading the page using F5 key -> no difference.

Well, it seems related to your browser:

"uncaught exception: out of memory 7"

Do you have some safety mechanisms in place ?

Michael.

Reply by email

Tomas Hajny
to Michael Van Canneyt: Well, it seems related to your browser: "uncaught exception: out of memory 7" Do you have…
Michael Van Canneyt wrote
On Mon, 23 Feb 2026, Tomas Hajny via fpc-pascal wrote:

.
.

Show quoted text 12 lines
> I tried again now, the result is the same (64-bit Firefox running on > MS Windows at the moment). It already happened with the first example > loaded by default (i.e. "Hello World"), but I got the same when trying > "String operations" demo as well. Attached you'll find export from the > browser console - feel free to ask if there's anything else I could > provide. I tried reloading the page using F5 key -> no difference. Well, it seems related to your browser: "uncaught exception: out of memory 7" Do you have some safety mechanisms in place ?

Like? I use uBlock Origin extension, but it didn't block anything on that page and I tried also reloading the page after disabling this extension. The default browser on this machine is MS Edge and potential GPO enforced security settings are more likely to be in place for that one - but it works there (as I realized now). If I open the page in an anonymous window of Firefox, it also shows the out of memory error in the browser console, but it breaks even before getting to the point of enabling the buttons, i.e. I see "Loading compiler..." and the buttons are disabled. I guess that there should be some mechanism for the page to demand more memory from the browser and it probably asks for less than what is necessary on both Firefox and Safari (whereas it works in Chrome derived browsers apparently). Interestingly, it works from Firefox running on a mobile phone (Android). So yes, it's likely related to the browser, but that doesn't necessarily mean that I could or should fix it on my side...

Tomas

Reply by email

Hairy Pixels
to Michael Van Canneyt: I'm guessing the wasm is too complicated for safari. Any errors in the developer console ?

On Feb 23, 2026 at 10:56:24 PM, Michael Van Canneyt via fpc-pascal <

Show quoted text 5 lines
wrote: I'm guessing the wasm is too complicated for safari. Any errors in the developer console ?

yeah seeing 4 things similar to this:

Failed to load resource: the server responded with a status of 404 (Not Found) and then: https://live.freepascal.org/wasmcompiler.js.map

which is indeed giveing a 404. If I open that in Chrome it gives a 404 too though. 🤷

Reply by email

Steve Litt
to Michael Van Canneyt: Pascal was designed for teaching. I'm sure everyone knows this. The chairman of the Free…

Michael Van Canneyt via fpc-pascal said on Mon, 23 Feb 2026 10:50:31 +0100 (CET)

Show quoted text 39 lines
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

Very cool! Next step: Make it more discoverable by placing an index.html or whatever index you need to place at
http://live.freepascal.org/?assignment=assignments or http://live.freepascal.org/assignments . A person unfamiliar with your website needs to be able to random access all assignments.

Once again, this is a great way to gently introduce Pascal and show that it's not some ancient difficult language. Congratulations on a job well done!

SteveT

Steve Litt

http://444domains.com

Reply by email

Steve Litt
to Michael Van Canneyt: Which one ? I tried all, and they all worked ? Maybe a sync error. That would be…

Michael Van Canneyt via fpc-pascal said on Mon, 23 Feb 2026 16:16:50 +0100 (CET)

Show quoted text 26 lines
On Mon, 23 Feb 2026, Tomas Hajny via fpc-pascal wrote: > On 2026-02-23 10:50, Michael Van Canneyt via fpc-pascal wrote: > > > Hi Michael, > >> Pascal was designed for teaching. I'm sure everyone knows this. > . > . >> The page is an initial version, so be kind in your judgment :-) > > For start, it would be nice to get the following error fixed ( ;-) ) > : > > Failure: failed to compile program, please check error messages. > Info: MainSrcFile /tmp/main.pp -> /tmp/main.pp > Info: Formatpath /tmp/main.pp -> tmp/main.pp > Info: Parsing tmp/main.pp ... > Info: ExpandFileNamePJ /tmp/main.pp Extract file name : main.pp > Fatal: Read error "/tmp/main.pp" > Fatal: Compilation aborted > > (Appears when trying to compile one of the provided examples) Which one ? I tried all, and they all worked ?

Program StringOps failed with following message:

============================
Info: Formatpath /tmp/main.pp -> tmp/main.pp
tmp/main.pp(14,26) Error: identifier not found "ReverseString" Fatal: Compilation aborted
============================

I commented out the line that called ReverseString and it succeeded.

Just in case it was a UTF-8 that looked like Ascii "ReverseString", I deleted and retyped "ReverseString", and it failed the same way.

Was this program supposed to define a function called ReverseString()?

SteveT

Steve Litt

http://444domains.com

Reply by email

Steve Litt
to Adriaan van Os: The essence of it is to learn abstract thinking. And for that purpose, it is better to…

Adriaan van Os via fpc-pascal said on Mon, 23 Feb 2026 15:38:24 +0000 (UTC)

Show quoted text 9 lines
Michael Van Canneyt via fpc-pascal wrote: > > Hello, > > Pascal was designed for teaching. I'm sure everyone knows this. The essence of it is to learn abstract thinking. And for that purpose, it is better to read the Wirth Report than to play around with a compiler .....

I couldn't disagree more. We must crawl before we can walk. I guarantee that reading any text by Wirth will bore 99% of all humans to the point where they'll quit in a half hour. Wirth was a lousy writer.

Live Pascal can get somebody excited enough to put up with Wirth.

SteveT

Steve Litt

http://444domains.com

Reply by email

Steve Litt
to Bart: On Mon, Feb 23, 2026 at 5:00 PM Hairy Pixels via fpc-pascal Same here with FF (147.0.4)…

Bart via fpc-pascal said on Mon, 23 Feb 2026 17:08:35 +0100

Show quoted text 7 lines
On Mon, Feb 23, 2026 at 5:00 PM Hairy Pixels via fpc-pascal wrote: > Compile/Run button is disabled and I see "Loading units 11/15...". > macOS and Safari. Works on Chrome though so it's browser related. Same here with FF (147.0.4) on Win11 (well, 13/15 instead of 11/15)

Here are my results using 64 bit Void Linux:

Chromium: Works

Firefox: Works

Vivaldi: Works

Eolie: Stalls at "Loading unit 13/15"

Otter Browser, Surf, Netsurf, stalls on "Loading Compiler"

Qutebrowser: Loads all units, but compile button inoperable (has an international "forbidden" sign as the mouse icon).

HTH,

SteveT

Steve Litt

http://444domains.com

Reply by email

Michael Van Canneyt
to Steve Litt: Michael Van Canneyt via fpc-pascal said on Mon, 23 Feb 2026 10:50:31 +0100 (CET) Very…
Steve Litt wrote 13 lines
> 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 Very cool! Next step: Make it more discoverable by placing an index.html or whatever index you need to place at http://live.freepascal.org/?assignment=assignments or http://live.freepascal.org/assignments . A person unfamiliar with your website needs to be able to random access all assignments.

I'm still working on a document that describes how it all works, and how you can use it. That will be placed in a separate page on the site, obviously.

Once again, this is a great way to gently introduce Pascal and show that it's not some ancient difficult language. Congratulations on a job well done!

Thank you!

Michael.

Reply by email

Michael Van Canneyt
to Steve Litt: Michael Van Canneyt via fpc-pascal said on Mon, 23 Feb 2026 16:16:50 +0100 (CET) Program…
Steve Litt wrote 19 lines
>> >> (Appears when trying to compile one of the provided examples) > > Which one ? I tried all, and they all worked ? Program StringOps failed with following message: ============================ Info: Formatpath /tmp/main.pp -> tmp/main.pp tmp/main.pp(14,26) Error: identifier not found "ReverseString" Fatal: Compilation aborted ============================ I commented out the line that called ReverseString and it succeeded. Just in case it was a UTF-8 that looked like Ascii "ReverseString", I deleted and retyped "ReverseString", and it failed the same way. Was this program supposed to define a function called ReverseString()?

No, I simply failed to put the correct example-manifest.json on the site, in which I deleted the line. (I silently cursed myself when I read your mail :/)

Should be OK now. I still need to put a cache-buster or no-cache header in place...

As said, it is a first version.
No doubt many fine-tuning changes and fixes will follow...

Michael.

Reply by email

Michael Van Canneyt
to Hairy Pixels: On Feb 23, 2026 at 10:56:24 PM, Michael Van Canneyt via fpc-pascal < yeah seeing 4…
Hairy Pixels wrote 14 lines
On Feb 23, 2026 at 10:56:24 PM, Michael Van Canneyt via fpc-pascal < > wrote: > I'm guessing the wasm is too complicated for safari. > Any errors in the developer console ? > yeah seeing 4 things similar to this: Failed to load resource: the server responded with a status of 404 (Not Found) and then: https://live.freepascal.org/wasmcompiler.js.map which is indeed giveing a 404. If I open that in Chrome it gives a 404 too though. 🤷

All 404s should be fixed. map files and favicon.ico - should have no influence on the working though.

Michael.

Reply by email

Johann Glaser
to Steve Litt: Michael Van Canneyt via fpc-pascal said on Mon, 23 Feb 2026 16:16:50 +0100 (CET) Program…

Hi!

Am Montag, dem 23.02.2026 um 11:27 -0500 schrieb Steve Litt via fpc- pascal:

Show quoted text 17 lines
> ... Program StringOps failed with following message: ============================ Info: Formatpath /tmp/main.pp -> tmp/main.pp tmp/main.pp(14,26) Error: identifier not found "ReverseString" Fatal: Compilation aborted ============================ I commented out the line that called ReverseString and it succeeded. Just in case it was a UTF-8 that looked like Ascii "ReverseString", I deleted and retyped "ReverseString", and it failed the same way. Was this program supposed to define a function called ReverseString()?

This function seems to be in StrUtils, not SysUtils, but that unit is not in the library. I couldn't get it to work either.

Bye
Hansi

Reply by email

Michael Van Canneyt
to Tomas Hajny: . . Like? I use uBlock Origin extension, but it didn't block anything on that page and I…
Tomas Hajny wrote 31 lines
On 2026-02-23 16:58, Michael Van Canneyt wrote: > On Mon, 23 Feb 2026, Tomas Hajny via fpc-pascal wrote: . . >> I tried again now, the result is the same (64-bit Firefox running on MS >> Windows at the moment). It already happened with the first example loaded >> by default (i.e. "Hello World"), but I got the same when trying "String >> operations" demo as well. Attached you'll find export from the browser >> console - feel free to ask if there's anything else I could provide. I >> tried reloading the page using F5 key -> no difference. > > Well, it seems related to your browser: > > "uncaught exception: out of memory 7" > > Do you have some safety mechanisms in place ? Like? I use uBlock Origin extension, but it didn't block anything on that page and I tried also reloading the page after disabling this extension. The default browser on this machine is MS Edge and potential GPO enforced security settings are more likely to be in place for that one - but it works there (as I realized now). If I open the page in an anonymous window of Firefox, it also shows the out of memory error in the browser console, but it breaks even before getting to the point of enabling the buttons, i.e. I see "Loading compiler..." and the buttons are disabled. I guess that there should be some mechanism for the page to demand more memory from the browser and it probably asks for less than what is necessary on both Firefox and Safari (whereas it works in Chrome derived browsers apparently). Interestingly, it works from Firefox running on a mobile phone (Android). So yes, it's likely related to the browser, but that doesn't necessarily mean that I could or should fix it on my side...

No, but without knowing the cause there is little I can do...

I use firefox only, and it has worked all through the development cycle. I also use uBlock origin. I was on a linux, though I don't see how that would matter.

The good news is: I can reproduce the issue in Safari: it fails with a 'out of memory' So I'll do some testing on safari. First web search is not making me optimistic, seems safari and wasm are not a happy couple.

Michael.

Reply by email

Michael Van Canneyt
to Johann Glaser: Hi! Am Montag, dem 23.02.2026 um 11:27 -0500 schrieb Steve Litt via fpc- pascal: This…
Johann Glaser wrote 24 lines
Hi! Am Montag, dem 23.02.2026 um 11:27 -0500 schrieb Steve Litt via fpc- pascal: >> > ... > Program StringOps failed with following message: > > ============================ > Info: Formatpath /tmp/main.pp -> tmp/main.pp > tmp/main.pp(14,26) Error: identifier not found "ReverseString" > Fatal: Compilation aborted > ============================ > > I commented out the line that called ReverseString and it succeeded. > > Just in case it was a UTF-8 that looked like Ascii "ReverseString", I > deleted and retyped "ReverseString", and it failed the same way. > > Was this program supposed to define a function called > ReverseString()? This function seems to be in StrUtils, not SysUtils, but that unit is not in the library. I couldn't get it to work either.

Yes, this is why I removed the function. I didn't want to add another file. But it is on my todo list to add more standard units, I want to make it server-configurable.

Michael.

Reply by email

Tomas Hajny
to Michael Van Canneyt: No, but without knowing the cause there is little I can do... I use firefox only, and it…

On 2026-02-23 21:26, Michael Van Canneyt via fpc-pascal wrote:

.
.

Show quoted text 11 lines
No, but without knowing the cause there is little I can do... I use firefox only, and it has worked all through the development cycle. I also use uBlock origin. I was on a linux, though I don't see how that would matter. The good news is: I can reproduce the issue in Safari: it fails with a 'out of memory' So I'll do some testing on safari. First web search is not making me optimistic, seems safari and wasm are not a happy couple.

I can confirm that Firefox running on Linux Debian runs the site without issues. It might be useful to mention, that the Firefox version on my Debian is 140.7.0esr (standard version included with the installed distribution - currently on Debian 12.12), whereas the latest MS Windows version is 147.0.4.

On my Linux machine, I can reproduce the issue with Seamonkey (installed from Debian repository available on
http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt). The information provided in the browser console is:

Will-change memory consumption is too high. Budget limit is the document surface area multiplied by 3 (1153920 px). Occurrences of will-change over the budget will be ignored.
live.freepascal.org
Instantiating of WebAssembly from pas2js.wasm failed wasm validation error: at offset 130: bad type
pas2jsworker.js:5350:17
p2js_loadfiles failed with code -4 , message: ZenFS is not defined wasmcompiler.js:3778:15

Maybe this helps?

Tomas

Reply by email

Michael Van Canneyt
to Tomas Hajny
Tomas Hajny wrote 27 lines
On 2026-02-23 21:26, Michael Van Canneyt via fpc-pascal wrote: . . > No, but without knowing the cause there is little I can do... > > I use firefox only, and it has worked all through the development cycle. > I also use uBlock origin. I was on a linux, though I don't see how that > would matter. > > The good news is: I can reproduce the issue in Safari: it fails with a 'out > of memory' > So I'll do some testing on safari. First web search is not making me > optimistic, seems safari and wasm are not a happy couple. I can confirm that Firefox running on Linux Debian runs the site without issues. It might be useful to mention, that the Firefox version on my Debian is 140.7.0esr (standard version included with the installed distribution - currently on Debian 12.12), whereas the latest MS Windows version is 147.0.4. On my Linux machine, I can reproduce the issue with Seamonkey (installed from Debian repository available on http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt). The information provided in the browser console is: Will-change memory consumption is too high. Budget limit is the document surface area multiplied by 3 (1153920 px). Occurrences of will-change over

Well, that is very limited. The memory is limited to 3Mb ? That's ridiculous, I ask of course it fails at once...

the budget will be ignored. live.freepascal.org Instantiating of WebAssembly from pas2js.wasm failed wasm validation error: at offset 130: bad type

That error means the wasm engine of the browser is too old.

Show quoted text 5 lines
pas2jsworker.js:5350:17 p2js_loadfiles failed with code -4 , message: ZenFS is not defined wasmcompiler.js:3778:15 Maybe this helps?

Yes, in the sense that it makes clear why it fails, but there is little I can do if memory is so limited.

Wasm is meanwhile quite established, if seamonkey does not support it: again, little I can do about that.

(pas2js can be compiled to Javascript, but this is quite slow)

I'll add a message to the page saying that a "recent standards"-compliant browser is needed.

Thanks for testing this !

Michael.

Reply by email

Ralf Quint
to Michael Van Canneyt: No, but without knowing the cause there is little I can do... I use firefox only, and it…
Michael Van Canneyt wrote 5 lines
I use firefox only, and it has worked all through the development cycle. I also use uBlock origin. I was on a linux, though I don't see how that would matter.

For me, with the default "Hello world" program loaded, it seems getting stuck at "Loading unit 3/15". That is on Windows 10, with Firefox 147.04

Just tried it on my Linux Mint 22 laptop, and there it works fine, same version of Firefox (147.04)

Both machines have 8GB of RAM (i7 and i5 respectively)

On my programming laptop (16GB RAM, i7), though a lot of tabs open in Firefox (also 147.04), it gets stuck at Loading units 7/15. This is also Windows 10.

hth,

Ralf

Reply by email

Tomas Hajny
to Michael Van Canneyt: Well, that is very limited. The memory is limited to 3Mb ? That's ridiculous, I ask of…

On 2026-02-23 22:10, Michael Van Canneyt via fpc-pascal wrote:

.
.

> Instantiating of WebAssembly from pas2js.wasm failed wasm validation > error: at offset 130: bad type That error means the wasm engine of the browser is too old.

OK - admittedly, that SeaMonkey corresponds to Firefox/128.0 engine, which is not exactly the latest... ;-) I just tried to check whether I could reproduce the issue on Linux as well.

.
.

Yes, in the sense that it makes clear why it fails, but there is little I can do if memory is so limited.

I have no idea if the memory limits may be somehow increased. But if not
- OK, so be it.

Show quoted text 9 lines
Wasm is meanwhile quite established, if seamonkey does not support it: again, little I can do about that. (pas2js can be compiled to Javascript, but this is quite slow) I'll add a message to the page saying that a "recent standards"-compliant browser is needed. Thanks for testing this !

OK - however, that doesn't clarify the case of the latest Firefox on MS Windows then...

Tomas

Reply by email

LacaK
to Tomas Hajny
Show quoted text 7 lines
> > > Thanks for testing this ! OK - however, that doesn't clarify the case of the latest Firefox on MS Windows then...

I am also on Windows 11 (16 GB RAM) + Firefox 140.7.1esr and I am stuck on "Loading units 5/15 ..." and in developer console I see: "uncaught exception: out of memory"

-Laco.

Reply by email

Michael Van Canneyt
to LacaK
LacaK wrote 11 lines
>> >> >> Thanks for testing this ! > > OK - however, that doesn't clarify the case of the latest Firefox on MS > Windows then... > I am also on Windows 11 (16 GB RAM) + Firefox 140.7.1esr and I am stuck on "Loading units 5/15 ..." and in developer console I see: "uncaught exception: out of memory"

Hm...

A pattern emerges: the memory issues are caused on windows in firefox. There must be some reason for this. I will investigate.

Michael.

Reply by email

Marco van de Voort
to Michael Van Canneyt

Op 24-2-2026 om 08:57 schreef Michael Van Canneyt via fpc-pascal:

Show quoted text 10 lines
> > I am also on Windows 11 (16 GB RAM) + Firefox 140.7.1esr and I am > stuck on "Loading units 5/15 ..." and in developer console I see: > "uncaught exception: out of memory" Hm... A pattern emerges: the memory issues are caused on windows in firefox. There must be some reason for this. I will investigate.

The hello world compiles and runs for me on Windows 11 (64GB RAM)  Firefox 147.0.4

(note also slightly newer firefox, 147 vs 140)

Reply by email

Tomas Hajny
to Marco van de Voort
Marco van de Voort wrote 15 lines
Op 24-2-2026 om 08:57 schreef Michael Van Canneyt via fpc-pascal: >> >> I am also on Windows 11 (16 GB RAM) + Firefox 140.7.1esr and I am >> stuck on "Loading units 5/15 ..." and in developer console I see: >> "uncaught exception: out of memory" > > Hm... > > A pattern emerges: the memory issues are caused on windows in firefox. > There must be some reason for this. I will investigate. > The hello world compiles and runs for me on Windows 11 (64GB RAM)  Firefox 147.0.4 (note also slightly newer firefox, 147 vs 140)

Then again, I have exactly the same new version of FF 147.0.4 on the Windows 11 machine as well (still ending up with "not enough memory"). Admittedly, I have quite a few browser tabs open. However, I have 32 GB RAM installed and only something like 40% of that used (equally before and after accessing the live.freepascal.org site).

Tomas

Reply by email

Martin Frb
to Michael Van Canneyt: Hm... A pattern emerges: the memory issues are caused on windows in firefox. There must…
Michael Van Canneyt wrote 20 lines
On Tue, 24 Feb 2026, LacaK via fpc-pascal wrote: >>> >>> >>> Thanks for testing this ! >> >> OK - however, that doesn't clarify the case of the latest Firefox on >> MS Windows then... >> > > I am also on Windows 11 (16 GB RAM) + Firefox 140.7.1esr and I am > stuck on "Loading units 5/15 ..." and in developer console I see: > "uncaught exception: out of memory" Hm... A pattern emerges: the memory issues are caused on windows in firefox. There must be some reason for this. I will investigate.

My Firefox (under win 10 / Europe still gets OS updates)

Loading the page adds 250 to 300MB (300 according to Taskmanager, approx // 250 according to FF about:memory compare measurements) Running "compiling world" adds another 50 to 100.
Repeated compiling does not further increase it (in task mgr)

And having Firefox idle seems to reduce memory usage (while the tab stays open) by most of it after a while.

Chrome  adds (task mgr) 100 MB to load the page and 100 to compile.

Reply by email

Martin Frb
to Martin Frb
Martin Frb wrote 16 lines
On 24/02/2026 08:57, Michael Van Canneyt via fpc-pascal wrote: > Hm... > > A pattern emerges: the memory issues are caused on windows in firefox. > There must be some reason for this. I will investigate. My Firefox (under win 10 / Europe still gets OS updates) Loading the page adds 250 to 300MB (300 according to Taskmanager, approx // 250 according to FF about:memory compare measurements) Running "compiling world" adds another 50 to 100. Repeated compiling does not further increase it (in task mgr) And having Firefox idle seems to reduce memory usage (while the tab stays open) by most of it after a while.

When I open the settings, and do "enable jit compiler" then it takes 5 seconds and gives me out of mem.

I did not see memory consumption raise during the 5 secs. So it likely was one sudden big alloc attempt.

After that compilation would not work : error empty string / file not found tmp/main

reloading the page and it works again, until I do enable jit again

Reply by email

Marco van de Voort
to Martin Frb

Op 24-2-2026 om 12:09 schreef Martin Frb via fpc-pascal:

Show quoted text 12 lines
When I open the settings, and do "enable jit compiler" then it takes 5 seconds and gives me out of mem. I did not see memory consumption raise during the 5 secs. So it likely was one sudden big alloc attempt. After that compilation would not work : error empty string / file not found tmp/main reloading the page and it works again, until I do enable jit again

I did this too, and when enabling jit a compile also fails after:

Info: MainSrcFile /tmp/main.pp -> /tmp/main.pp
Info: Formatpath /tmp/main.pp -> tmp/main.pp
Info: Parsing tmp/main.pp ...
Info: ExpandFileNamePJ /tmp/main.pp Extract file name : main.pp Fatal: Read error "/tmp/main.pp"
Fatal: Compilation aborted

Reply by email

Hairy Pixels
to Michael Van Canneyt: No, I simply failed to put the correct example-manifest.json on the site, in which I…

On Feb 24, 2026 at 1:52:01 AM, Michael Van Canneyt via fpc-pascal <

Show quoted text 12 lines
wrote: No, I simply failed to put the correct example-manifest.json on the site, in which I deleted the line. (I silently cursed myself when I read your mail :/) Should be OK now. I still need to put a cache-buster or no-cache header in place... As said, it is a first version. No doubt many fine-tuning changes and fixes will follow...

Cool Chrome works now but not Safari.

It says "p2js_loadfiles" failed with code "-4", message: ""Out of memory""

from line 4680 in wasmcompiler.js:

            console.log(aResult.initialCommand, " failed with code ",
aResult.errorCode, ", message: ", aResult.errorMessage);

Reply by email

Michael Van Canneyt
to Hairy Pixels
Hairy Pixels wrote 22 lines
On Feb 24, 2026 at 1:52:01 AM, Michael Van Canneyt via fpc-pascal < > wrote: > No, I simply failed to put the correct example-manifest.json on the site, > in which I deleted the line. (I silently cursed myself when I read your > mail :/) > > Should be OK now. I still need to put a cache-buster or no-cache header in > place... > > As said, it is a first version. > No doubt many fine-tuning changes and fixes will follow... > Cool Chrome works now but not Safari. It says "p2js_loadfiles" failed with code "-4", message: ""Out of memory"" from line 4680 in wasmcompiler.js: console.log(aResult.initialCommand, " failed with code ", aResult.errorCode, ", message: ", aResult.errorMessage);

I know, I am investigating this (using Safari). It is proving elusive.

Michael.

Reply by email

Jean SUZINEAU
to Michael Van Canneyt: Pascal was designed for teaching. I'm sure everyone knows this. The chairman of the Free…

Same for me.

It works fine on Firefox 147.0.4 (64 bits) on Lubuntu 25.10 with no message in the console

But it fails on Firefox 148.0 (64bits) on Windows 11 Pro Loading units 5/15...

Messages in console:
Erreur dans les liens source : request failed with status 404 URL de la ressource : null
URL du lien source : installHook.js.map
uncaught exception: out of memory | 10 | pas2jsworker.js:6382:16 (in function LoadFile)

Reply by email

Michael Van Canneyt
to Jean SUZINEAU
Jean SUZINEAU wrote 14 lines
Same for me. It works fine on Firefox 147.0.4 (64 bits) on Lubuntu 25.10 with no message in the console But it fails on Firefox 148.0 (64bits) on Windows 11 Pro Loading units 5/15... Messages in console: Erreur dans les liens source : request failed with status 404 URL de la ressource : null URL du lien source : installHook.js.map uncaught exception: out of memory | 10 | pas2jsworker.js:6382:16 (in function LoadFile)

Well, I have some fixes which *may* help for firefox. I need to put up a test page so people can test it.

I've given up on Safari, that browser needs to be euthanized. Even the smallest wasm program fails :/

Michael.

Reply by email

Bart
to Michael Van Canneyt
Show quoted text 6 lines
Well, I have some fixes which *may* help for firefox. I need to put up a test page so people can test it. I've given up on Safari, that browser needs to be euthanized. Even the smallest wasm program fails :/

On the forum, member ALLIGATOR says he hunted it down to a bug in FF: https://bugzilla.mozilla.org/show_bug.cgi?id=2019323

See the forum: https://forum.lazarus.freepascal.org/index.php/topic,73547.0.html

Bart

Reply by email

Michael Van Canneyt
to Bart
Bart wrote 14 lines
On Wed, Feb 25, 2026 at 10:53 AM Michael Van Canneyt via fpc-pascal wrote: > Well, I have some fixes which *may* help for firefox. > I need to put up a test page so people can test it. > > I've given up on Safari, that browser needs to be euthanized. > Even the smallest wasm program fails :/ > On the forum, member ALLIGATOR says he hunted it down to a bug in FF: https://bugzilla.mozilla.org/show_bug.cgi?id=2019323 See the forum: https://forum.lazarus.freepascal.org/index.php/topic,73547.0.html

Thank you, it has been very useful:

Since they mentioned the ZenFS fix for allocating too much memory, I updated ZenFS (an adventure in itself).

Can firefox users who experienced a fail please test this version:

https://live.freepascal.org/test-firefox

I tested whether it works in Safari, and the answer is YES! Which is a big relief...

If I get confirmation that the fix also works in Firefox, I will put the new version in place on the main page.

Some other goodies are also forthcoming :)

Michael.

Reply by email

LacaK
to Michael Van Canneyt

Hi Michael,
there is some progress in my use case: "Loading units 15/15..." and in console i see errors:
- Failed to create webassembly. Reason: pas2jsworker.js:5538:17
- Error: no WebAssembly compiler available
    ArrayOK https://live.freepascal.org/test-firefox/pas2jsworker.js:5388 pas2jsworker.js:5539:17
- Error: no WebAssembly compiler available pas2jsworker.js:5388:30

-Laco.

Show quoted text 43 lines
On Wed, 25 Feb 2026, Bart via fpc-pascal wrote: > On Wed, Feb 25, 2026 at 10:53 AM Michael Van Canneyt via fpc-pascal > wrote: > >> Well, I have some fixes which *may* help for firefox. >> I need to put up a test page so people can test it. >> >> I've given up on Safari, that browser needs to be euthanized. >> Even the smallest wasm program fails :/ >> > > On the forum, member ALLIGATOR says he hunted it down to a bug in FF: > https://bugzilla.mozilla.org/show_bug.cgi?id=2019323 > > See the forum: > https://forum.lazarus.freepascal.org/index.php/topic,73547.0.html Thank you, it has been very useful: Since they mentioned the ZenFS fix for allocating too much memory, I updated ZenFS (an adventure in itself). Can firefox users who experienced a fail please test this version: https://live.freepascal.org/test-firefox I tested whether it works in Safari, and the answer is YES! Which is a big relief... If I get confirmation that the fix also works in Firefox, I will put the new version in place on the main page. Some other goodies are also forthcoming :) Michael. _______________________________________________ fpc-pascal maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Tomas Hajny
to Michael Van Canneyt: Thank you, it has been very useful: Since they mentioned the ZenFS fix for allocating too…
Michael Van Canneyt wrote
On Wed, 25 Feb 2026, Bart via fpc-pascal wrote: > On Wed, Feb 25, 2026 at 10:53 AM Michael Van Canneyt via fpc-pascal > wrote:

.
.

Show quoted text 17 lines
Thank you, it has been very useful: Since they mentioned the ZenFS fix for allocating too much memory, I updated ZenFS (an adventure in itself). Can firefox users who experienced a fail please test this version: https://live.freepascal.org/test-firefox I tested whether it works in Safari, and the answer is YES! Which is a big relief... If I get confirmation that the fix also works in Firefox, I will put the new version in place on the main page. Some other goodies are also forthcoming :)

Yes, I can confirm that it works now with FF on MS Windows. :-)

Tomas

Reply by email

Michael Van Canneyt
to LacaK: there is some progress in my use case: "Loading units 15/15..." and in console i see…
LacaK wrote 8 lines
Hi Michael, there is some progress in my use case: "Loading units 15/15..." and in console i see errors: - Failed to create webassembly. Reason: pas2jsworker.js:5538:17 - Error: no WebAssembly compiler available     ArrayOK https://live.freepascal.org/test-firefox/pas2jsworker.js:5388 pas2jsworker.js:5539:17 - Error: no WebAssembly compiler available pas2jsworker.js:5388:30

As far as I can tell, it means your firefox has wasm disabled.

about:config

Check the javascript.options.wasm setting or wasm_baselinejit settings. They should be 'true'

Michael.

Reply by email

Michael Van Canneyt
to Tomas Hajny: . . Yes, I can confirm that it works now with FF on MS Windows. :-) Tomas
Tomas Hajny wrote 25 lines
On 2026-02-27 10:21, Michael Van Canneyt via fpc-pascal wrote: > On Wed, 25 Feb 2026, Bart via fpc-pascal wrote: >> On Wed, Feb 25, 2026 at 10:53 AM Michael Van Canneyt via fpc-pascal >> wrote: . . > Thank you, it has been very useful: > > Since they mentioned the ZenFS fix for allocating too much memory, I > updated ZenFS (an adventure in itself). > > Can firefox users who experienced a fail please test this version: > > https://live.freepascal.org/test-firefox > > I tested whether it works in Safari, and the answer is YES! > Which is a big relief... > > If I get confirmation that the fix also works in Firefox, I will put > the new > version in place on the main page. > > Some other goodies are also forthcoming :) Yes, I can confirm that it works now with FF on MS Windows. :-)

Great, I'll move the new version in place then.
Thanks for testing!

Michael.

Reply by email

LacaK
to Michael Van Canneyt: As far as I can tell, it means your firefox has wasm disabled. about:config Check the…
Show quoted text 20 lines
> Hi Michael, > there is some progress in my use case: "Loading units 15/15..." and > in console i see errors: > - Failed to create webassembly. Reason: pas2jsworker.js:5538:17 > - Error: no WebAssembly compiler available >     ArrayOK > https://live.freepascal.org/test-firefox/pas2jsworker.js:5388 > pas2jsworker.js:5539:17 > - Error: no WebAssembly compiler available pas2jsworker.js:5388:30 As far as I can tell, it means your firefox has wasm disabled. about:config Check the javascript.options.wasm setting or wasm_baselinejit settings. They should be 'true'

Yes there was: javascript.options.wasm_baselinejit=False, after I changed it to True it works as expected :-)
Thanks.
-Laco.

Reply by email

Michael Van Canneyt
to Bart
Bart wrote 8 lines
On Fri, Feb 27, 2026 at 10:30 AM Michael Van Canneyt via fpc-pascal wrote: > Can firefox users who experienced a fail please test this version: I can compile and run the "Hello World" program now (FF 148.0 on Win11). Did not test other examples yet.

I have updated the site. New features:

- Safari and Firefox on windows should now work.
(you may need to clear the browser cache)

- Code templates ('snippets') - has Ctrl-J shortcut (as in Lazarus, I believe)

- You can now configure your own examples and snippets.

- Help page at https://live.freepascal.org/help.html

- Embedding guide at https://live.freepascal.org/embed-guide.html

Both help pages are reachable from the main page.

I put the sources for the site online:

https://gitlab.com/freepascal.org/fpc/live-pascal

It uses a Creative Commons CC0 license, for those that are into licenses. (Gitlab forces you to put a license, and CC0 comes closest..)

I'll update with new some new features one by one. Suggestions always welcome.

Michael.

Reply by email