Today’s exercise was Pythagorean Triplet. I solved it both with a FOR loop and also with a LINQ query. The for loop was nine times faster. If you do it the most straightforward way it is O(N^3) which tanks your speed, but it can be easily brought back down to O(N^2).

I am leaning too hard on books and tutorials. I figure I should go back to my own stuff. For now I am trying to use the Forth subset code as a base to make an interpreter for a language I am more likely to want to use. I thought of just extending it, then I looked at how Forth does strings and decided against it. I did see some BNF for BASIC at https://rosettacode.org/wiki/BNF_Grammar. I think I will try that for a while. I may dump it if things don’t go well.

Right now I am just trying to get math expression parser going. It isn’t going well. Thinking I should switch to Lex/Yacc.