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 ZX81 BASIC.
I have finally got
UNPLOT to work – not on the same screen as ordinary output, but on a separate graphics console.
It’s just in the Git repo now (at Github under mcmenaminadrian) but an executable JAR will follow shortly.
BINSIC – my reimplementation of ZX80 or ZX81 (Timex Sinclair 1000 or 1500 for US readers) BASIC is now available for download in binary form – look at the page on the site: Binsic Is Not Sinclair Instruction Code.
It comes with Conway’s Game of Life for the authentic black and white text based feel too.
(Source code is also available here)
BINSIC – Binsic Is Not Sinclair Instruction Code – my effort to re-implement Sinclair ZX80/ZX81 BASIC as a domain specific language via Groovy (and eventually a runnable Java JAR file), is making more progress.
Right now it supports:
IF ... THEN ... ELSE
GOSUB ... RETURN
FOR ... TO ... STEP ... NEXT
DIM A(x, y, z) (and array derefencing)
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.
But, it’s getting there…
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.
In the meantime, if you know about Groovy and DSLs, you could help me enormously by having a look at this question I have posted on StackOverflow.
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.
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.
- Lesser-spotted Raspberry Pi FINALLY dished up (go.theregister.com)
- First Batch Of £16 Raspberry Pi PCs Arrives (itproportal.com)
- Raspberry Pi Arrives, With a School Debut In Leeds (hardware.slashdot.org)
- In Depth: Raspberry Pi: everything you need to know (techradar.com)
- Raspberry Pi, A Low-Cost Mini PC to Get Kids Interested in Programming (laughingsquid.com)