Leaflet

A reimplementation of Piki.

Leaflet was intended to be a replacement for Piki. The name comes from the first item encountered in Zork. To explain why Leaflet was written, I provide the following code sample from PIKI.BAS:

ELSEIF LEFT$(lin$, 4) = "int(" THEN
        Queen$ = LTRIM$(STR$(INT(VAL(Queen$(Fifi$(line$, 3), linenumber)))))

And the analogue in LEAFLET.BAS:

        cmd$ = LEFT$(lin$, INSTR(lin$, "(") - 1)
        paramfield$ = LTRIM$(RTRIM$(MID$(line$, INSTR(line$, cmd$) + 1 + LEN(cmd$))))
...
        CASE "int"
                Empress$ = PUB$(INT(VAL(Empress$(paramfield$))))

Empress and Queen are, as can be surmised, analogous functions. All of this mess could have been avoided with a proper token-oriented parser, but at the time it was still 2004 and I was still far too young to do this sort of thing correctly. In essence, though, Piki's code was full of structural flaws, most of which survive in the last versions of Telerin and were rather limiting. Unfortunately, of course, the careful design approach involved in Leaflet made it significantly slower, and ultimately resulted in some bugs being brought over—the fifi bug, in particular, where tokens after a parenthetic function() are ignored.

Anyway, Leaflet was a great improvement at least in theory, and I used it for a huge myriad of projects for years, never using Piki in another project after RM6 and Telerin. The language drifted in both specification and application, seeing most of its glory as the built-in scripting language of the IDD webserver, though it was also important in the side-scrolling Gamemaster and... well, just look at all of them:

Abandoned and retired Leaflet applications

  • Filterbox
  • Gamemaster
    It's not really that almighty.
  • IDD
  • WinISLE
    A recursive text editor.

Active Leaflet applications

Copyright © 2009 Samantha Wright.
All those rights are, like, totally reserved. This mumbling is legally binding.