Whilst messing about with my own programming language, I've been getting it to display output in the browser, which all looks very retro because it's text only.
So I decided that it would be nice to prettify things a little bit, without going to very much trouble. It would also be nice to be able to do things like clear the screen, or move the cursor around. But I didn't want to invent my own protocol, I thought that it would be much better to just use an existing thing.
For that reason, I thought it might be handy just to use ANSI escape sequences. Whilst that would still look all very retro (use of these codes goes way back to the 1970s), it would bring some new capabilities to the table, like colour and very simple graphics. It should even allow very basic animations. Of course, this isn't what I have designed H2D2 for; but it's a nice way to test the language.
But with my version, it doesn't matter where the output comes from, the code just deals with drawing it onto the page. It means that the library can deal with any text containing ANSI escape codes. It even allows more than one 'console' to appear on the same webpage. I have also included support for extended colour codes, meaning that RGB values can be used. It's possible to turn scrolling on or off, and you can keep appending more text when you like.
Anyway, it worked a treat when I plugged it back into my H2D2 demo. Here's some hurriedly hacked together example output:
OK, so you're probably getting bored of mandelbrots by now. Sorry. But there have been more improvements to DALIS, mainly in the area of string handling; namely there is some. I can now assign string variables and do string comparisons and concatenations. This means that I can output some pretty html with colour and everything :-) Just take a look that this bad boy:
How very retro. But it is like DALIS has jumped from the world of the ASCII character terminals of the 70s to the microcomputers of the 80s. OK, in case you're interested I'm mapping a 9 bit colour palette to the equivalent html colour values. But I'll try not to post any more mandelbrot images for a while, honest.