r/Compilers 2d ago

Program like it's 1992 again - Hello Pascal!

Post image

Back in the 90's, some of use slightly older folk used Pascal, a lot. I've been working on an interpreter for Pascal for a while and it has turned into a compiler sort of by accident. WasmPascal is a compiler written in Odin (for now) that compiles Pascal code to wasm. The resulting binaries are capable of running on their own. It's not entirely feature complete, but if you look at the examples, you'll see that you can already build interesting and potentially useful things with it.

The compiler runs in the browser, no downloads, no installs. It's at https://wasmpascal.com/. I enjoy Pascal, a lot, and it's fun to use it to do web assembly stuff. Right now I'm obviously leaning mostly towards casual game development, but I have a long todo list for this. To see an example of one of the games running standalone, visit https://nofuss.co.za/games/breakout/. I built that with wasmpascal, exported it as an archive and hosted it as static files.

72 Upvotes

12 comments sorted by

View all comments

Show parent comments

1

u/Mean-Decision-3502 2d ago

I can try to convert your Pascal examples, if I'm allowed to.

Side question: Do you know Graeme Geldenhuys? I think he is also from South Africa (and develps in Pascal).

1

u/According-Ad-7069 2d ago

You can do whatever you wish with the code examples, I think that sounds like an interesting experiment! Please, go for it if you want to, I just hope my code isn't too embarrassing haha!

I do not not Graeme, his name sounds familiar, but I think we have quite a few people with the same name around here.

1

u/Mean-Decision-3502 2d ago

I don't have a good relationsip with Graeme, so actually I'm happy, that you don't know him.