Skip to content

Releases: BarbeMCR/mlmcr

Revision 3

28 Sep 17:26
bc120bd
Compare
Choose a tag to compare

Oh, folks! It has been several months since the release of mlmcr Revision 2.
Many things have changed, starting from the interpreter itself: it has been completely rewritten from scratch, to allow for many new features to be added.

This release is fundamentally incompatible with mlmcr Revision 1 and 2. I suggest you read the (much improved) documentation to understand how everything works now.

A brand new thing for me was the creation of Linux binaries, which I think I might have finally understood. The binaries are below.

Another thing that comes with this release is the addition of a Visual Studio Code extension made specifically to support syntax highlighting in mlmcr scripts and headers.

You can download everything below. The instructions for installing everything are in the README.md file in the root of this repository.

Happy coding!

Warning: a critical hotfix fixing a stack error being thrown erroneously has been released after the initial release of Revision 3. The source code that is downloadable below is the old version, and I can't update it. The updated source code is the one in mlmcr-main.zip.

Revision 2

05 Mar 14:05
9103d33
Compare
Choose a tag to compare

mlmcr Revision 2 is centered around control flow, subroutines and functions. However, many other changes were made. Check this changelog to know how some of your mlmcr 1 code could be affected.

The number of opcodes in mlmcr grew from 42 (in mlmcr 1) to 89 (in mlmcr 2). Check mlmcr2_manual.txt to learn about those new opcodes!

The changes in the changelog are not in order of importance.

  • Added docstrings in functions and classes in mlmcr.py
  • Permanent sequences are now more "bullet-proof" as forbidden operations are now checked directly in the PermaSequence class instead of in parse
  • Added class Subroutine with methods add_instruction and run
  • Added class Function with methods report_argdefs_validity, add_instruction and run
  • Subroutines can be created with the SUBR opcode and ended with the RTS opcode
  • Subroutines support all instructions but PYEVAL and PYEXEC
  • Functions can be created with the FUNC opcode and ended with the END opcode
  • Functions support the following extra opcodes (check the manual): GIVE, TAKE, SYNC
  • Functions support all operations but SUBR, FUNC, KILL, WAKE, KSET, KGET, PYEVAL and PYEXEC
  • Functions use local variable of type @ (global variables are of type $)
  • parse now has a namespace argument instead of individual properties (such as killed_vars and kill_length)
  • Opcodes are no longer limited to 4 characters in length
  • Now opcodes need to match exactly the ones written in the manual (due to a bug, it was possible to, for example, encode a IN opcode by typing INTO)
  • Now error reporting prints the culprit instruction
  • Added NEW opcode to make a new instance of a variable's type, even if it is a Python type
  • Added SWAP opcode to swap two variables
  • Booleans have received full support
  • Added ABS, SQRT and CBRT math opcodes
  • PUSH no longer requires variables as arguments
  • PULL now works with standard notation (& to prefix strings and support for variables): this is not backwards-compatible with mlmcr 1
  • Added NULL opcode to store None in a variable
  • Added MIN and MAX opcodes
  • Added REST to get part of an array given the starting and ending indices
  • Added maps, which can be created with opcode MAP and support some (extra) dedicated opcodes: MSET, MGET, MPOP, MPLI, GRAB, KEYS, VALS
  • Added COPY to make a shallow copy of an array
  • Added EQ, NE, GT, LT, GE, LE, AND, OR, NOT and IS operators (check the manual)
  • Changed the syntax of IN to make it similar to other operators: this is not backwards-compatible with mlmcr 1
  • Added LOOP to allow for range-like iterables to exist in mlmcr (you can use it for many things: check the manual for more info)
  • Added IF, ELIF and ELSE
  • Added FOR and FORI (FOR Index)
  • Added ALA (As Long As) and DALA (Do As Long As)
  • Added RAND to get a random integer (the generation limits can be customized)
  • Now EXIT supports an optional integer to get thrown as the return code for the process on exit
  • Now the interpreter automatically indents subroutines/functions and differentiates the pointers
  • Importing the mlmcr module in Python no longer makes it start an interpreter session nor changes the window title

A new, more complex, demo has just been released: it is map_demo.mlmcr. Make sure to check it out and try understanding its code!

Revision 1.1

18 Oct 19:59
0ebcfb7
Compare
Choose a tag to compare

Bugfixes for BOOL and PSEQ instructions.
Customized title bar.

Revision 1

17 Oct 20:20
7d7f870
Compare
Choose a tag to compare

First release.
42 instructions.
Variables, arrays, essentials.
You need a machine with Windows 8.1+ to run the compiled version.