First post, and I'm flogging something. Sorry about that. Hopefully this is an appropriate spot?
A short bit of background: I spent the majority of my career working in various IT-related roles, including supporting the installation and day-to-day operations of very large cluster/supercomputers. Programming has always been a part of my life, both professionally and in my spare time, but it's never been my forte. I ended up doing systems support-related tasks because that was where my strengths led me.
I've also always had a fascination with and desire to write a compiler. I just didn't have the time, nor, to be frank, the talent. I did take a compiler design class many years ago in college, so I'm not a total novice.
Four months or so back, I decided to see if AI had reached the point where it could take on a task of this size and complexity. The short answer was: kind of. I tried a number of different AIs at that point but ended up doing the bulk of the work with Google's Gemini 2.5 Pro, as the others I tried stopped being effective around 3,000 lines of code. Fast forward a couple of months, and I reached the point where Gemini stopped being effective. That happened in the 23,000 lines of code range. So I took a break from the project, knowing that if I waited, there would likely be advances that made continuing possible. The release of OpenAI's GPT-5, in conjunction with their Codex ended up what I was waiting for.
While I am not a great programmer, I do, as I said, have a background in compilers and several decades of programming experience, which was a huge help. For instance, I occasionally had to explain how to properly implement back-patching or reject an AI's kludgy solution in favor of explaining a better approach. In short, this wasn't a task for a novice, even with the latest AI's. AI is a powerful tool and a productivity multiplier, but it isn't capable of taking on a large complex task and carrying it to completion at the moment. At least that is my experience. There is still the need for a lot of hand holding and knowledgeable advice.
Why a Pascal bytecode compiler and VM? Because I've always had a soft spot for Pascal. Borland's Turbo Pascal was what I used in the early part of my career when I was still primarily a programmer. Does the world need a Pascal bytecode compiler and VM? Probably not. But that was really secondary to my primary goals, which were to fill some time and see just how capable LLMs/AIs had become.
The source code is all available at...
https://github.com/emkey1/pscal
And it is completely free to use for anything, though I'd like to be given some sort of credit on the off chance somebody repurposes the VM, for instance. While it was written with AI, I was, for better or worse, the architect and overall 'project lead'.
The 1.0 release is at...
github.com
And should compile on MacOS or Linux, though I do the bulk of my development and testing on my Mac.
A short bit of background: I spent the majority of my career working in various IT-related roles, including supporting the installation and day-to-day operations of very large cluster/supercomputers. Programming has always been a part of my life, both professionally and in my spare time, but it's never been my forte. I ended up doing systems support-related tasks because that was where my strengths led me.
I've also always had a fascination with and desire to write a compiler. I just didn't have the time, nor, to be frank, the talent. I did take a compiler design class many years ago in college, so I'm not a total novice.
Four months or so back, I decided to see if AI had reached the point where it could take on a task of this size and complexity. The short answer was: kind of. I tried a number of different AIs at that point but ended up doing the bulk of the work with Google's Gemini 2.5 Pro, as the others I tried stopped being effective around 3,000 lines of code. Fast forward a couple of months, and I reached the point where Gemini stopped being effective. That happened in the 23,000 lines of code range. So I took a break from the project, knowing that if I waited, there would likely be advances that made continuing possible. The release of OpenAI's GPT-5, in conjunction with their Codex ended up what I was waiting for.
While I am not a great programmer, I do, as I said, have a background in compilers and several decades of programming experience, which was a huge help. For instance, I occasionally had to explain how to properly implement back-patching or reject an AI's kludgy solution in favor of explaining a better approach. In short, this wasn't a task for a novice, even with the latest AI's. AI is a powerful tool and a productivity multiplier, but it isn't capable of taking on a large complex task and carrying it to completion at the moment. At least that is my experience. There is still the need for a lot of hand holding and knowledgeable advice.
Why a Pascal bytecode compiler and VM? Because I've always had a soft spot for Pascal. Borland's Turbo Pascal was what I used in the early part of my career when I was still primarily a programmer. Does the world need a Pascal bytecode compiler and VM? Probably not. But that was really secondary to my primary goals, which were to fill some time and see just how capable LLMs/AIs had become.
The source code is all available at...
https://github.com/emkey1/pscal
And it is completely free to use for anything, though I'd like to be given some sort of credit on the off chance somebody repurposes the VM, for instance. While it was written with AI, I was, for better or worse, the architect and overall 'project lead'.
The 1.0 release is at...
Release Release 1.0 · emkey1/pscal
Initial Release. I've tested everything I can think of, but there are probably still some bugs. I've spent almost no time looking at the Interpreter portion of the code and will likely remove it b...
And should compile on MacOS or Linux, though I do the bulk of my development and testing on my Mac.