Updated: A day (wasted?) with Groovy

Update: After staying up late (after 2am after the clocks went forward), I found various bugs – I don’t know if these reflect underlying changes in the language or the JVM in the interim but it seems to work now (see GIF of the Game of Life below). Working on getting the jar done too so it becomes easier for others…

There has been a small revival of interest in the wonders of 8 bit computing lately and I thought now would be a good time to revivify the BINSIC project. But has all proved to be a highly frustrating waste of time.

BINSIC – BINSIC Is Not Sinclair Instruction Code – was my 2012 project to build a DSL in Groovy that would allow users of modern computers to write and run ZX80/81 BASIC. I wrote it to explore whether it was really easier to make instructive programs that explored basic mathematical and scientific problems back then.

The first problem I had was that Groovy (and this behaviour wasn’t advertised as far as I could see) simply would not run code written in block capitals. So a DSL was essentially out and I had to write something that was more (much more) like an interpreter.

But it worked, mostly, and I had some fun with it, turned it into a jar file and forgot about it.

Unfortunately the machine hosting the jar file is gone and I never got around to trying to rebuild it – until today. And now I find the code from 2012 just won’t work.

If I try to run that code I get this:

Why code that ran a few years ago won’t run now is a mystery, but replacing the empty element in the list will get it to run – a bit – and this gets me something from the Game of Life I wrote in BASIC:

But again something that worked well 8 years ago now breaks the system:

On top of all that I seem unable to build a jar file on the command line, unable to install Eclipse and unable to get NetBeans, which will let me install a Groovy plugin but not use it, to work properly.