(2023-04-21) Why VTL/VTL-2 is still relevant
--------------------------------------------
I won't write anything too long this time since I really wanna go to sleep.
But...
The more I study this language, the more I realize how elegant it is. In
fact, it's far more elegant than anything you can write a VTL interpreter
in. Just think about it: every program statement is numbered, and every
program statement assigns something to something. All flow control, I/O,
system calls - everything happens via assignments. And all of it maps onto
the machine memory even nicer than Forth. Two bytes for the line number, one
byte for line length, and the line itself. And then the next line with the
same structure, and the next... With no additional delimiters and other
overhead. Yet these "system variables" also give the programs a potential
for self-modification and advanced memory control, the features not every
dialect of BASIC of the time had, especially if we're talking about Tiny
BASIC which everyone compares the VTL-2 to the most. Yet even the tiniest
implementation of Tiny BASIC was much heavier than the 768 bytes of VTL-2
(on Altairs).
If there is a single thing I don't like in VTL-2, it's infix expressions.
Despite strictly left-to-right precedence and all the operators and
variables deliberately taking a single byte, they are still harder to parse
and execute than the prefix notation like in Lisp or RPN like in Forth or
dc. If I were to create an even more minimalist language myself, I'd
definitely make expressions RPN-like. The only advantage the LTR infix
approach has is that it doesn't require a significant whitespace or other
delimiter to separate the operands. But once again, matching parentheses and
keeping track of what we expect now - an operand or an operator - is a real
bitch when it comes to keeping things simple.
Nevertheless, I plan to create my own public domain VTL-2 implementation in
upcoming days, and keep it under 300 SLOC of ANSI C89. And then run all the
example programs from the manual ([1]). What do I plan to do with it next?
Just wait for some time and you'll find out.
--- Luxferre ---
[1]:
https://deramp.com/downloads/altair/software/roms/
orginal_roms/VTL-2%20Manual.pdf