This is an automated archive made by the Lemmit Bot.

The original was posted on /r/programminglanguages by /u/JohnRobbinsAVL on 2024-09-16 18:10:30+00:00.


Like many of subscribers here, Robert Nystrom’s incredible Crafting Interpreters book inspired and fired up my huge interest in programming languages. Tiny BASIC, first proposed by Dennis Allison in the first issue of Dr. Dobb’s Journal of Computer Calisthenics & Orthodontics in January 1976, seemed like a good project. The result is Tiny Basic in Python: (tbp for short). Now you can program like your grandparents did in 1976!

Compared to many of the amazing, advanced posts on this subreddit, tbp is at an elementary level, but I thought it might help some people who, like me, are not working in programming languages or are not in academia. I’ve learned a lot reading other’s code so I hope tbp will help others learn.

Features:

  • Full support for all 12 statements, all 26 succulent variables (A…Z), and two functions of the original, including USR.
  • A full DEBUGGER built in with breakpoints, single stepping, call stack and variable display.
  • Loading and saving programs to/from disk.
  • A linter for Tiny BASIC programs.
  • Complete documentation with development notes (over 17,000 words!)
  • Full GitHub Actions CI implementation that work with branch protections for code and the documentation web site.
  • 290 individual unit tests with 99.88% coverage across macOS, Windows, and Linux.

The README for tbp has a GIF showing off tbp’s functionality, including using the built in debugger to cheat at a game. Not that I advocate cheating, but it made a good demo!

Special thanks to Dr. Tom Pittman who has posted a lot of the documentation for his 1976 commercial version of Tiny BASIC, which was a treasure trove of help.

Any feedback here or in the repository is greatly appreciated. Thank you in advance for taking the time! I think there are enough comments in the code to guide you through the project. If not, the insane number of unit tests will help you understand what’s going on. Otherwise, please reach out as I’m happy to help.

Also, I wrote notes and retrospectives you might find interesting in the project documentation: , especially the parts where I talked about where I screwed up.