The first programming language I learned was BASIC. Not Visual Basic, kids. We're talking old fashioned Beginner's All-Purpose Symbolic Instruction Code, with line numbers and everything. When I was working on the first Stupid Python Trick (Hunt the Wumpus), I realized that the original Dartmouth BASIC isn't that complicated a language. So I decided to write my own BASIC interpreter in Python
It's not exactly Dartmouth BASIC, but it's reasonably close. The link above points to a zip folder with three files in it. First is basic.py, which is a cmd based BASIC interpreter, including features for writing programs. I guess you could call it an IDE, but that would sort of be stretching it. The second file is wumpus.bsc, which is the original Hunt the Wumpus program, with slight modifications to fit with Ichabod BASIC. The third file is BF.bsc, which is a brainfuck
interpreter. It just seemed perfectly silly to run a brainfuck interpreter in a BASIC interpreter in a Python interpreter. Note that BF.bsc uses integers instead of symbols for all of the commands.WARNING
: Ichabod BASIC uses eval and exec, so read over any third party BASIC programs before running them to make sure there isn't any embedded Python code.