INPUT "Did you ever experience BASIC (true/false)"; answer?
IF answer? THEN
    PRINT "Great; you are in for a treat!"
ELSE
    PRINT "Oh noes; try today?"
END IF

I have pretty fond memories of my Amstrad CPC 6128 and its Locomotive BASIC 1.1. The experience was quite unique as the computer was ready to take commands in a couple of seconds, and those commands you typed had an immediate effect on the screen. Changing colors, drawing, playing sounds… were all at your fingertips, which was pretty exciting for a young boy. I can’t tell exactly how old I was at the time, but probably not more than 6 or 7. This, combined with my father’s own knowledge (which came primarily from the machine’s user manual), is how I got hooked into coding and how I ended up doing what I do today.

This same experience repeated later with the QBASIC integrated environment that shipped with MS-DOS 6.22, although I didn’t play much with that: by that time, my father had alterady moved on to Clipper and I was having fun with Borland SideKick Plus as the “IDE”.

Anyway… fast-forward to 2020. I now have kids of my own and, having shown QuickBASIC 4.5 to the oldest (who is 7) via DosBox on a Raspberry Pi… I could sense similar excitement. I just had to type a bunch of PRINT and COLOR commands to get her to want to try stuff on her own. So I thought… this is cool, but it’s awkward to be confined to an old environment. Let me try to build a similar experience using newer technologies.

At first, I took Python and wrote a trivial API and REPL to simulate those basic commands… but this hack became limiting by its own hackiness very quickly. Should I write a real language parser then? Should I?

Of course the correct answer to that is should not, but I did it anyway. How hard could it be? I had not written a full-blown parser since the compilers course in University (which was pretty awesome by the way), and having something of my own would let me tweak it at will to showcase different stuff to my kids. Plus… I needed to distract my mind during these strange times.

So here we are. I give you “E. and D.’s BASIC”. Or, rather, EndBASIC.

This first release of EndBASIC is extremely simple: the language is very limited and you really cannot do anything fancy with it. The goal here was to lay out the foundations to build new features upon what-I-think-is a solid core—which, by the way, comes with extensive testing and works on Linux, macOS, and even Windows. (Tests? For a fun project? Of course! They are a must. How do you think I will be iterate on this otherwise?)

For context, the original prototype had many more features than what’s included in 0.1.0, but I yanked them out of the tree to focus on solidifying the language interpreter. Adding those extra features should be relatively simple from here on, and I’ll be doing that soon. Things you can expect are a REPL interface with a bunch of screen manipulation commands and an in-line editor.

Obviously, due to the nature of this project, I do not expect a ton of usage or interest, but it has been super fun to build so far. And it has been an excuse to continue playing with Rust 😁

With that, head on to the project’s page for more details: https://www.endbasic.dev/