At the risk of being attacked as an enemy of all that is good, I have to confess to being less than riveted by the Olympics, so far. So I have made far more productive use of my time in seeking to recreate the computing experience of 30 years ago – by working some more on BINSIC – Binsic Is Not Sinclair Instruction Code, my reimplementation of Sinclair ZX81BASIC.
I have finally got PLOT and UNPLOT to work – not on the same screen as ordinary output, but on a separate graphics console.
As the above – from Conway’s Game of Life – shows, this has all the sophistication and élan of the original ZX81 experience!
It’s just in the Git repo now (at Github under mcmenaminadrian) but an executable JAR will follow shortly.
IF ... THEN ... ELSE GOTO GOSUB ... RETURN LET FOR ... TO ... STEP ... NEXT DIM A(x, y, z) (and array derefencing) CLS PRINT
Still one or two difficult areas to get through and I have had to make one compromise – unlike on the ZX80 one cannot have a variable and an array with the same letter designation – just too difficult to implement on Java/Groovy.
I have a new software project now … BINSIC … Binsic Is Not Sinclair Instruction Code.
Instead Binsic is my attempt to reimplement Sinclair’s ZX80/ZX81 BASIC (with a few pieces that were deeply frustrating through their absence all those years ago) as domain specific language using Groovy.
I have spent a fair bit of yesterday and today on this and have not got very far as yet … not even enough to pin up a few dozen lines of code on GitHub.
I have been spending my time trying to get the PRINT command to work. And, well, it doesn’t. I can print some things, but generally only by imposing constraints on the language that were not there in BASIC and so are self-defeating.
And I haven’t even begun to think seriously about how I can tackle the line number problem.
As I write this, in the next room my two daughters are playing with their Wii, with the eldest using her Andorid phone to provide incidental music. It’s a not untypical Saturday morning scene in millions of homes I imagine.
In here I am contemplating one of the legacies of my teenage years – the desire to write a computer program for no other reason than I enjoy it.
The immediate problem I face with the current piece of code is user interface related and that does make me wonder if one of the reasons kids have lost interest in programming is (alongside the awful way they are taught about computers) the sheer hideousness of UI code.
Back in the days of Sinclair (or BBC) BASIC things could be made to appear on the screen by simply specifying their cartesian co-ordinates and issuing a PLOT command or similar.
So, I could get back from my A level maths class and plot the graphs of the functions we’d been discussing in a few lines of code. I could write, and graphically represent, the behaviour of heat quanta in a molecular grid with just a few hours work.
Now I would have to set aside a day to do the graph from scratch or use somebody else’s code. The heat quanta representation boggles the mind.
I can understand why the makers of the Raspberry Pi seem to be recreating the BBC Micro environment alongside the electronics: all this UI code just gets in the way of helping kids build useful software.