Blitz Compiler (Alpha 1)

All aspects of programming on the Commander X16.
paulscottrobson
Posts: 305
Joined: Tue Sep 22, 2020 6:43 pm

Re: Blitz Compiler (Alpha 1)

Post by paulscottrobson »

I think there's a problem with your system somewhere. The zip file release.zip does contain a cat.py but it's not empty , I checked it a couple of times.
void_null

Re: Blitz Compiler (Alpha 1)

Post by void_null »

Well, I have said already (either here or in another thread) that I've been having all sorts of problems with programs not functioning. As I said, the creation kit for both versions of Skyrim is completely missing some of its files, and completely re-installing doesn't fix the issue. In fact, I've never been able to use it. I've also had problems with other programs for Skyrim not functioning, ranging from patchers to conversion tools. I have no clue what could be wrong with this thing. I bought it off the shelf at a best buy. I have had people tell me I got scammed, but they never knew of my technically issues. I only found out about the creation kit issue recently, after I tried to use a third party program to let me compile scripts since I couldn't do it in the creation kit for some mysterious reason. That program is how I found out that my CK was missing files it should have. And yes, the problems extend beyond just not being able to compile scripts; honestly hardly any of its functions work. I've even had the thing generate empty esp files, completely disregarding all the changes I made with it. I've been having to make things though xEdit. I've never been able to find someone who ever heard of that happening.

That said, I haven't been having problems with the emulator (though I noticed I can't seem to run any programs I download from this site now, I didn't have this problem on the previous board). The only major issue I've noticed is that the save function in codex doesn't work; the saved program won't run, and re-opening it I find half the code is missing. Of course, codex is still unfinished, so I've never thought much of it. I've had no issues at all using just the rest of emulator and what it comes with. I've even written a few of my own basic programs, though they're sorta limited since pretty much the only commands I actually know are the handful David has shown on his channel. Its actually the reason why the blitz thing peaked my interest, even though I haven't actually written anything that would require it. The biggest program I've made is one that lets me see what's in RAM. Come to think of it, maybe I should share my 'ramdump' program, even if it is ultra simplistic.
paulscottrobson
Posts: 305
Joined: Tue Sep 22, 2020 6:43 pm

Re: Blitz Compiler (Alpha 1)

Post by paulscottrobson »

Wonder if your filesystem has got corrupted somehow. Or maybe the HDD/SSD is on the way out ? I'd do some low level scans on the file system, and check the status of the hardware.

If you unzip that release.zip and the cat.py is empty, then there's something very broken.
void_null

Re: Blitz Compiler (Alpha 1)

Post by void_null »

paulscottrobson wrote: Mon May 08, 2023 11:04 am Wonder if your filesystem has got corrupted somehow. Or maybe the HDD/SSD is on the way out ? I'd do some low level scans on the file system, and check the status of the hardware.

If you unzip that release.zip and the cat.py is empty, then there's something very broken.
I got this computer in 2019, so its not all that old. Then again, computers seem to live shorter and shorter with every passing year (just a few days ago I saw a video from a guy claiming his computer went out on him after only five years, and it was apparently experiencing issues long before that).

Either way, I'd have no idea how to test my own machine. In the past I would just take it to a local computer shop, but that business is long gone (the guy who ran it decided to switch to only fixing business computers, I haven't heard anything about him since). It would really suck if this thing's going out; I wouldn't have the money to replace it. In fact, I was contemplating adding more RAM to it a few weeks ago, using parts salvaged from a broken computer my father bought but never used due to his passing. And no, they don't teach computer repairs at college anymore. I did look into it, but they apparently stopped offering it years prior and my professor thought it was weird I was looking into it, seriously. No idea why; ever since that shop closed down we haven't had a computer repair store here in years.

And no, I have no clue if I have an HDD or SDD in this thing. I do have an HDD as an external drive (I bought it to get my skyrim mods off my computer, they were taking up over half the storage space!). I specifically requested an HDD since I was planning to use it as an archive, and I do know the thing makes this wonderful spinning noise when I plug it in.

edit: That said, I decided to properly extract the thing (first time I only extracted the 'release' part, and yes you can do that apparently). Opening this cat.py, it does have data in it now. Guess you need to fully extract things. Lesson learned. Of course, the thing still doesn't work: running the emulator within the release folder dos"$" shows no programs. It claims to find something when I tell it to load 'test.bas', but it just hangs up and never loads. It only shows that it takes up data from $8001 to $0bba. That sounds like a pretty big file.
paulscottrobson
Posts: 305
Joined: Tue Sep 22, 2020 6:43 pm

Re: Blitz Compiler (Alpha 1)

Post by paulscottrobson »

Open up a command prompt window and run compile.bat ; the emulator should run briefly (this is compiling), then run run.bat, the emulator should start running the balls demo.
void_null

Re: Blitz Compiler (Alpha 1)

Post by void_null »

paulscottrobson wrote: Mon May 08, 2023 4:07 pm Open up a command prompt window and run compile.bat ; the emulator should run briefly (this is compiling), then run run.bat, the emulator should start running the balls demo.
Honestly, I don't know how to do that either (yeah, such is modern programming classes, I can make websites and cheap CLI calculators through python or c++, but I literally can do absolutely nothing else, in fact the command prompt was never brought up in my entire degree). I do know you can download modules for python through the command prompt, which weirded me out at first (yeah, I'm only used to newer computers). Of course, I can never remember the command to type in I do this so rarely, but eh. The only reason I've done it as much as I have is that a surprising percentage of python modules can only be downloaded through this method. Don't ask me why that is. Its 2023 and most python modules don't come in a file of any sort you can just put on your desktop. What the crap?

On a side note, its actually been quite a few months since I've coded anything in python. Its just so limited compared to basic (at least with basic you can draw graphics). There is the pygame module for it, but honestly programs written in that run worse than basic programs on the emulator, seriously! The last python program I ever tried to make was a card game that 'drew' its graphics using just the print command. I got it to display and even got the menus to work, but the project stalled after it came time to make an AI and I just couldn't figure out where to begin. I even tried to look into making a deep learning program, but I was told you need at least a master's degree to know how to do that, and I only got an associate's. Let's just say there's a good reason why I'm looking at a far simpler machine, with an arguably superior language to python. Of course, I realize basic is limited, but even THAT is better than freaking python. And yes, I do know making an AI wouldn't be any easier on this thing, in fact I doubt it could even run such a program. At least you can draw graphics, and have things like flipping and rotating sprites, or palette swapping, and other features modern computers simply don't have.
User avatar
TediusTimmy
Posts: 15
Joined: Tue Apr 25, 2023 3:54 am

Re: Blitz Compiler (Alpha 1)

Post by TediusTimmy »

If you were to survey the developers on this forum, you would probably find that most of them use a Unix-derived toolchain that is command line -centric (even if they never open the command line). I, personally, use Cygwin on Windows (while I despise make, I haven't found anything better).

As for graphics in C++: all the issues. Everything is platform-dependent, though some things are more independent than others. Pick a library and then fight through the fact that C++ doesn't have package management.

That said, I really like OneLoneCoder/javid9x's Pixel Game Engine. It'll have you displaying sprites with your GPU in no time. Here is his GitHub: https://github.com/OneLoneCoder/olcPixelGameEngine . His YouTube channel has him demonstrating how to use it with projects that interest him: https://www.youtube.com/@javidx9. That said, he is a Visual Studio user and it will be easiest to use in Visual Studio (the Community Version is free for personal use). While the engine continues to become more complicated as he adds new features, it is still a very simple and clean way to get into programming with graphics in modern C++.

Finally, to touch on deep learning: if you want to actually write deep learning code (code that "does" the deep learning), you probably need to do the research that would get you a masters or a doctorate. If you want to just use deep learning that someone else programmed: python and scikit-learn are your friends. Python is the language of machine learning.

Sorry, this is a little off topic.
void_null

Re: Blitz Compiler (Alpha 1)

Post by void_null »

Honestly, I mostly code in python. I did recently make a program in c++, though I had to refresh myself to do so. I only did it because I needed the program to work on my mother's computer, and obviously she doesn't have python installed. Though the main reason I focused so much on python is because pygame was the only way I knew to draw graphics. I still tried to make that card game in python, just because its what I was used to. In hindsight, it wasn't really necessary; since I was only using base python I could've easily coded the same thing in c++. Not sure that would've given any real advantage though, other than maybe the 'screen' drawing a bit faster. Though come to think of it, I could have probably have used pygame for thing since speed wouldn't really matter being a turn based game. Still doesn't help me with making an AI can play a game like Magic the Gathering, or Hearthstone (originally I planned for thing to be like MtG but with Hearthstone's mana system, but as development continued the game ended up shifting more towards Hearthstone due to technical limitations, such as the screen size). Looking into making an AI for the thing, I was told that really nobody knew how to do it. Its apparently a famous problem. I tried just analyzing how I play, but I couldn't think of anyway to translate that into a bunch of if-then statements.

Either way, this is all off-topic. I have been contemplating trying to return to the project, though I still have no idea how to make an AI for the thing. A particular problem is combat. I just couldn't think of anyway to have it determine what it should do other than to work out every possible configuration, which from my math would've been more my RAM could handle (I have flooded my own RAM before making programs, fortunately that does no harm to a modern system but it does still make the program crash). Designing the thing, I only learned why games like Hearthstone are designed the way they are. The only digital card game I know of that was made by an amateur like me (am I an amateur when I have a 2-year degree? I don't have a certificate in game development) is that Elements game, which has this stupid simple AI and ultra simplistic mechanics. The game borderline plays itself. Making my own, I can see why the developer made the decisions that he did. Not that it really helps me much. Oh well. This is off-topic though, so we probably shouldn't continue this discussion here.
Martin Schmalenbach
Posts: 140
Joined: Tue Jul 21, 2020 10:08 pm

Re: Blitz Compiler (Alpha 1)

Post by Martin Schmalenbach »

paulscottrobson wrote: Sun May 07, 2023 7:58 am All help testing the X16's new Blitz-style BASIC compiler welcome. Currently Alpha 1, so very early days :)
Wow!

I’ve just ported over the core of my pascal subset compiler - written in TechBASIC on my iPad. There are no extensions to it for any X16 specific functions and features. Yet. On my iPad it is super fast. Not so much on the X16, so I’d love to see how it improves in speed when Blitzed!

What do I run it on? I have VICE on several of my Macs plus I have one of the first batch of dev boards that were sold last month, so I can run it on real hardware!

Cheers

Martin
User avatar
ahenry3068
Posts: 1136
Joined: Tue Apr 04, 2023 9:57 pm

Re: Blitz Compiler (Alpha 1)

Post by ahenry3068 »

Has there been any more progress on bringing in the X16 extensions ?
Post Reply