RetroBASIC 3.0 is out. In addition to a bunch of obscure bug fixes and a couple of minor features, the big change is that it now includes a basic line editor that allows you to interactively create, edit, LOAD, SAVE and LIST files. This is my first attempt at a line editor and I expect problems, so let me know about any of the rough edges you find!
This is also my first major release using GitHub’s CI system to produce builds on other platforms, namely Linux for x86 and aarch, and Windows x86/64. I have no way to directly test these, so I rely on the CI system to tell me if it worked. I would love if some of the Linux and Windows users reading this could give it a whirl?
I’ve also continued to update the reference manual, which is quite extensive now and is useful even as a stand-alone reference for the BASIC language as it includes variations and notes on dozens of different dialects.
Hi Maury, I hope you don’t object, but I pointed Claude code at a copy of your repo and had it do a code review. After that I pointed a different instance of Claude at the code review and had the second instance write regression tests with instructions to prefer writing in BASIC. I tried a couple of the regression tests and at least one of them (#02) does produce a segmentation fault. So I committed the whole thing and made a PR which you can look at–or not, if you don’t prefer to use cutting edge software technology on this retro software. Completely up to you.
The PR is here and if you or anyone else just wants to browse the regression test it wrote you can look here at the commit:. The AI written code review is in the commit in review.md. It seems to me that after I told the bot to prefer writing in basic and it wrote some tests in C that the ones written in C are probably not important because they are hard to trigger from BASIC programs.
Overall, I was impressed with the code quality. The fact is that Claude typically finds crashing bugs in almost any handwritten C program that it hasn’t previously reviewed.
scruss, I seem to recall you were on the Mac? Or am I misremembering? In any event it seems to be building OK on the CI for Mac, linux and windows so now I’m a bit confused. Can you post the exact error so I can see the file/line?
I have no concerns about how the sausage is made. I’ll have a look at the PR now!
And I did… there’s some leftover debugging cruft (#1 and “file.txt”), a number of typos/brainfarts (->string instead of ->number) and so forth. These are all excellent suggestions and I’m doing the merge now.
It also raises the question about string memory management. That is a very good question. The current logic is “Does it work? Yes? Moving on…” I’ll put some thought into that.
And a question for you: given how useful that was, would you mind running it on RetroFOCAL as well? There’s a repo for that as well.
This was on Linux. I’d previously built and reported on a Mac too. I’ll respond with an issue in your repo, because nobody needs gcc warnings in a general forum.
(Even if they are vaguely historically interesting, where the C compiler now warns that you may need four bytes allocated per formatted digit in a sprintf())
strange that it didn’t pick up on the format overflow warning that gcc noted in src/retrobasic.c, line 1432:
warning: ‘%02d’ directive writing between 2 and 8 bytes into a region of size between 2 and 5 [-Wformat-overflow=]
1432 | sprintf(buff, "%02d%02d%02d", h, m, s);
| ^~~~~~~~~~~~~~
Not many people will be running this in locales where numeral characters are wider than a byte (LANG=ar_SA.UTF-8 is one), but the compiler can’t assume that.
Interesting issue - of course Unicode didn’t even exist in the retro-basic days…
The AIs are far from perfect.It wasn’t until the inflection point around last November that they were really even useful. But they sure are now. At least Claude is.