It’s been a long slog, but the quest is over. I now have a functional-enough GW-BASIC to C# code translator. Using adventure.bas as a guide, I implemented enough features to produce a working version of it reimagined in C#. The…

## Know your (large) numbers

As a child, I was fascinated by large numbers. I recall being unbelievably excited when my dad gave me a clipping of a newspaper trivia column which listed the names of numbers from a million up to decillion. While most…

## BASIC solutions: statements

My last post showcased what I thought was a complete GW-BASIC expression parsing solution. Hence, I pushed forward with a new project to implement statement parsing. This went fine for a bit, but I quickly encountered overly complicated situations. Without…

## BASIC solutions: expressions

Previously, I showed the beginnings of a GW-BASIC expression parser. As of now, the parser is essentially feature complete! I fixed the unary minus bug and went on to implement all the remaining features — mainly relational, logical, and functional…

## BASIC complications: expressions

My GW-BASIC saga continues. I’m on the third rewrite now of this “simple” translation app. I keep encountering problems that ultimately challenge core design decisions I made early on. Given the time scale and the fact that this is a…

## BASIC complications: parser combinators

When I wrote about creating a GW-BASIC translator, I admit I didn’t fully grasp what I was getting myself into. Even a simple language like BASIC has a relatively involved syntax, which makes parsing a challenge (doubly so because I…

## More four fours

Astute readers may have noticed in my previous post about the four fours that I neglected to include exponents in the set of supported mathematical operations. Well, that is fixed now. Perhaps these imagined readers also noticed that my recursive…

## Four fours

Back in elementary school, I became aware of the four fours puzzle. It is a seemingly simple mathematical exercise where you must generate all the integers from 1 to 100 using arithmetic expressions and the digit 4 exactly four times.…

## Cancellation confusion and Task.Run

Code that heavily relies on Task.Run tends to have issues. In my experience, this is a clear sign that the asynchronous model within the codebase is spotty at best. Indeed, a “really async” design would not generally rely on Task.Run…

## Back to (GW-)basics

My foray into programming began with GW-BASIC on a Tandy 1000, an 8-bit IBM PC clone. In those days, one had only a few avenues of learning for coding knowledge: physical books and more experienced friends (who had probably read…