Up to Main Index                         Up to Journal for September, 2022

                  JOURNAL FOR SATURDAY 10TH SEPTEMBER, 2022
______________________________________________________________________________

SUBJECT: Mere v0.0.3 with new tokenizer, ICE dark mode and vertical split
   DATE: Sat 10 Sep 18:37:38 BST 2022

I’ve just updated Mere & Mere ICE in the annexed works[1] to v0.0.3 for people
to play with. This update contains quite a big change — a new tokenizer. The
old tokenizer had a number of issues, the main one being the need to use a lot
of extraneous white-space. This made Mere programs look very light and airy.

This is an example of the light and airy style of coding previously required:


    z:[]int = []int 1 2 3 4 5 6
    z = []int ( ( delete []int ( z ) 2 4 ) 9 9 9 ( delete []int ( z ) 0 4 ) )
    println z ;// prints [1 2 9 9 9 5 6]


The code is a terrible array splicing example. We can tidy things up a bit:


    z:[]int = []int 1 2 3 4 5 6
    z = []int delete([]int(z) 2 4) 9 9 9 delete([]int(z) 0 4)
    println z // prints [1 2 9 9 9 5 6]


Ok, it’s still a terrible example :| There are a lot of other issues now fixed
with the new tokenizer. Comments work better and a line comment will no longer
stop at a semi-colon, in-line comments no longer need to follow a semi-colon.
That is to say, comments work as expected now. Well formed block comments can
be nested to make commenting out blocks of code easier.

A semi-colon is no longer interpreted as an implied line break in strings.
This means you no longer have to encode a semi-colon in a string as ‘\x3B’.

A new printf built-in has been added. It has most of the functionality of its
Go printf counterpart.

Examples have been updated for the new tokenizer and printf where appropriate.

Two features were requested for Mere ICE. One was for a dark mode, the other
was for a vertical split “like VS Code”. Both have been added ;) Dark mode can
be toggled by clicking Dark/Light or use accelerator-Z. Horizontal/Vertical
split can be toggled by click ─Split/│Split or use accelerator-V.

It should be noted that this version of Mere ICE does not work quite so well
in Safari on iPhone. It works, but there are a few layout issues. The only way
I can work on this is to abduct my daughter’s iPhone. I’m actually surprised
at how many people are using Mere ICE on mobile. Safari desktop may suffer the
same issues, I don’t know as I have no access to a Mac.

If anyone wants to take a look and provide patches I’d appreciate it, and so
would my daughter :) diddymus@wolfmud.org

I was asked to make the smallest font size smaller! I thought it was already
tiny? I actually made the smallest size bigger and added a new smallest size.
You can increase/decrease the font size manually in the browser still — for
example Crtl- and Ctrl+ in Chrome and Edge.

From the Mere ICE “What’s New” section:

  • Reworked Mere ICE layout, added vertical split.
  • Added 4th font size, small is larger, added new smallest size.
  • Added a dark mode to Mere ICE.
  • Mere ICE text and examples updated for improved tokenizer and
    printf usage (for clarity)
  • New tokenizer:
    ▪ Removes need for extraneous white-space
    ▪ Better handling of negative numbers
    ▪ Line-comments don’t stop at semi-colons
    ▪ Trailing line comments don’t have to appear after a semi-colon
    ▪ Well formed block comments may be nested
    ▪ A semi-colon is no longer interpreted as an implied new line in strings
  • Added printf built-in
  • Fixed bubble sort example

--
Diddymus

  [1] ../../../annex


  Up to Main Index                         Up to Journal for September, 2022