Up to Main Index                           Up to Journal for October, 2023

                   JOURNAL FOR SATURDAY 14TH OCTOBER, 2023
______________________________________________________________________________

SUBJECT: Mere ICE updated to v0.0.8
   DATE: Sat 14 Oct 17:07:44 BST 2023

Mere ICE has been updated to v0.0.8 in the annexed works[1]. This update comes
seven weeks after the v0.0.7 release. Mere now uses strong typing with the
inclusion of 22 new operators. All example code has been updated to use strong
typing. Type errors are currently runtime warnings, but will be compile time
errors in the future.

Label types are now officially supported: label, []label and [label]

Bool conversions can now apply to arrays and maps. If the array or map is
empty returns false, else returns true.

Mere now displays the original source line numbers in error messages, dumps
and traces. Mere ICE has been updated to display line numbers in the source
editing window. The assert and refute built-ins now include line numbers in
their error messages. The assert built-in has also been updated to show a
marker ‘►’ indicating the first difference between the given and expected
values.

NOTE: Please make sure the version in the top right of Mere ICE shows ‘v0.0.8’
      and if not hard refresh the web page in your browser.

From the “What’s New” section:

  v0.0.8 — Saturday 14th October, 2023
  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    • Added strong typing. 20 new operators to declare types:

        :int   :uint   :float   :string   :bool   :label   :regexp
        :[]int :[]uint :[]float :[]string :[]bool :[]label :[]regexp
        :[int] :[uint] :[float] :[string] :[bool] :[label]

      Example:

        i:int     // ‘i’ is an int
        a:[]int   // ‘a’ is an array with int values
        m:[int]   // ‘m’ is a map with int keys

      Note that maps with regexp keys are not supported. 2 additional
      declaration operators:

        := (assignment with inferred type)
        :: (define as, with same type as)

      Example:

        f := 0.5 // ‘f’ is defined as a float with the specified value
        x := i   // ‘x’ is defined like ‘i’, set to the value of ‘i’
        y :: i   // ‘y’ is defined like ‘i’, set to the int zero value

    • All example code in Mere ICE updated for strong typing.

    • New ‘Variables’ section added to Mere ICE. Updated ‘Functions’ section.

    • Func statement can now use ‘:<type>’ and ‘::’ to define arguments. The
      argument types are checked on calls and generate a runtime warning. In
      the future these will be compile time errors.

    • Fix function guards when multiple existing labels present.

    • Fix pre-link pre-linking already pre-linked labels.

    • Track original source lines to improve error messages, debugging, dumps
      and traces.

    • Assert and refute built-ins now include the source file and line numbers
      in error messages. Assert error messages now include a marker ‘►’
      indicating the first difference between the current and expected values.

    • Update Mere ICE editor to display source code lines. It's currently a
      little janky but it works :/

    • Bool conversions can now be used on arrays and maps. If the array or map
      is empty returns false, else returns true.

    • Added basic runtime warnings. In the future these will become compile
      time errors.

    • Label types are officially supported: label, []label and [label].

    • Fixed defined labels so they can no longer be modified

    • New expression calculator example added to Mere ICE.

    • Removed LFSR (linear feedback shift register) and bit swapper examples.
      They were a bit to esoteric :(

--
Diddymus

  [1] The annexed works: /annex/


  Up to Main Index                           Up to Journal for October, 2023