all repos — min @ 61dfd2ec1e5568ac262c111129a55414101140ca

A small but practical concatenative programming language.

Updating for release.
h3rald h3rald@h3rald.com
Tue, 18 Jun 2024 14:01:02 +0200
commit

61dfd2ec1e5568ac262c111129a55414101140ca

parent

122fae050a9f7ba590655508f401a1867d035cd4

1 files changed, 54 insertions(+), 0 deletions(-)

jump to
A site/contents/news/v0.44.0.md

@@ -0,0 +1,54 @@

+----- +content-type: "post" +title: "Version 0.44.0 released" +slug: v0.44.0 +date: 2024-06-18 +----- +{@ _defs_.md || 0 @} + +This minor release brings a lot of refactoring and a few breaking changes related to sigils and introduces a new concept of _dot notation_ for symbols. + +In previous releases, it was possible to use the `invoke` symbol (and the `*` sigil) to access members of a dictionary or modules, e.g. `*crypto/encode` to access the {#link-operator||crypto||encode#} symbol of the {#link-module||crypto#} module. This was fine, but a little bit verbose... plus this didn't work for setting values, for example. + +As of this release, you can no longer use `.` in symbols, because that will be used as a namespace separator, so you'll be able to do things like this: + +``` +{} :example +(dup *) :example.square +(dup dup * *) :example.cube + +2 example.square example.cube puts! # Prints 64 +``` + +> %tip% +> Tip +> +> You can run `min run min-upgrade <folder>` to automatically upgrade all the `.min` files in `<folder>` and all its subfolders. + +### BREAKING CHANGES + +- User-defined symbols can no longer contain dots (`.`). +- The symbol `invoke` and the `*` sigil have been removed in favor of symbol dot notation. +- The `.` and `..` symbols have been renamed to `pwd` and `parent-dir` respectively. +- The `!` symbol has been removed; use `system` instead. +- The `!` sigil has been removed; use `system` instead. +- The `&` symbol has been removed; use `run` instead. +- The `&` sigil has been removed; use `run` instead. +- The `/` sigil has been removed; use `dget` or symbol dot notation instead. +- The `%` sigil has been removed; use `dset` or symbol dot notation instead. +- The `>` sigil has been removed; use `save-symbol` innstead. +- The `<` sigil has been removed; use `load-symbol` innstead. +- Moved `get-env`, `put-env`, `$` symbol and `$` sigil from `sys` to `global` module. + +### New Features + +- It is now possible to access dictionary (and module) keys (even nested) via dot notation. This replaces the `invoke` symbol. +- Added shell auto-completion for symbols using dot notation +- Added a new `color` symbol to the `io` module to enable/disable terminal color output. +- Added a new `from-html` symbol to the `xml` module to parse HTML documents and fragments. +- Added a new `xentity2utf8` symbol to the `xml` module to convert an XML entity to its corresponding UTF-8 string. +- Added a new `xescape` symbol to the `xml` module to convert special XML characters into the corresponding XML entities. + +### Fixes and Improvements + +- Fixed `tokenize` symbol (wasn't processing commands correctly)