all repos — min @ 1a3e68f245c904b2c3049b75712687b6aff7106e

A small but practical concatenative programming language.

Documented min run functionality.
h3rald h3rald@h3rald.com
Sat, 03 Feb 2024 21:49:23 +0100
commit

1a3e68f245c904b2c3049b75712687b6aff7106e

parent

1870b7482e551f224d67f5a543161dfc61fa9e98

M min.nimmin.nim

@@ -160,6 +160,8 @@ init Sets up the current directory as a managed min module.

install [<module>@<version>] Install the specified managed min module or all dependent modules. uninstall [<module>@<version>] Uninstall the specified managed min module or all dependent modules. update [<module>@<version>] Update the specified managed min module or all dependent modules. + run <mmm> Executes the main symbol exposed by the specified min managed module, + downloading it and installing it globally if necessary. search [...terms...] Search for a managed min module matching the specified terms. list List all managed min modules installed in the local directory or globally. Options:
M next-release.mdnext-release.md

@@ -5,6 +5,7 @@

### New Features - Upgraded OpenSSL to v3.2.0 +- Added the `min run <mmm>` command to (download, install globally, and) execute the `main` symbol of the the specified managed module. For example this functionality can be used to upgrade `.min` files using the `min-upgrade` managed module. - mmm: It is now possible to install, uninstall, and update modules by specifying them via `<name>@<version>`. - mmm: The version is now optional when installing, uninstalling, and updating modules (the name of the HEAD branch will be used, e.g. "master" or "main", typically).
M site/contents/get-started.mdsite/contents/get-started.md

@@ -127,6 +127,7 @@ To execute a min script, you can:

* Run `min eval "... program..."` to execute a program inline. * Run `min myfile.min` to execute a program contained in a file. +* Run `min run <mmm>` to execute the `main` symbol of the specified [min managed module](/learn-mmm/). If the managed module is not installed globally, it will be downloaded and installed automatically. min also supports running programs from standard input, so the following command can also be used (on Unix-like system) to run a program saved in [myfile.min](class:file):
M site/contents/news/v0.43.0.mdsite/contents/news/v0.43.0.md

@@ -1,21 +1,29 @@

----- content-type: "post" title: "Version 0.43.0 released" -date: 2024-02-04 +date: 2024-02-03 ----- {@ _defs_.md || 0 @} +This is minor release introduces a breaking change, but also provides a way to automatically migrate your code using the `min-upgrade` managed module. + ## BREAKING CHANGES - Renamed `ROOT` symbol to `global`. Also the built-in `lang` module is now called `global`. +> %tip% +> Tip +> +> You can run `min run min-upgrade <folder>` to automatically upgrade all the `.min` files in `<folder>` and all its subfolders. + ## New Features - Upgraded OpenSSL to v3.2.0 +- Added the `min run <mmm>` command to (download, install globally, and) execute the `main` symbol of the the specified [managed module](/learn-mmm/). For example this functionality can be used to upgrade `.min` files using the `min-upgrade` managed module. - mmm: It is now possible to install, uninstall, and update modules by specifying them via `<name>@<version>`. - mmm: The version is now optional when installing, uninstalling, and updating modules (the name of the HEAD branch will be used, e.g. "master" or "main", typically). ## Fixes and Improvements - Added check to prevent installing local managed modules in the HOME directory or $HOME/mmm. -- Changed `tokenize` symbol so that it returns the full token, including delimiters (for strings and comments). +- Changed {#link-operator||global||tokenize#} symbol so that it returns the full token, including delimiters (for strings and comments).
M site/contents/reference-global.mdsite/contents/reference-global.md

@@ -487,6 +487,9 @@

{#op||times||{{q}} {{i}}||{{a0p}}|| Applies the quotation {{q}} {{i}} times.#} +{#op||tokenize||{{s}}||{{q}}|| +Parses the min program {{s}} and returns a quotation {{q}} containing dictionaries with a `type` symbol and a `value` symbol for each token.#} + {#op||to-json||{{any}}||{{s}}|| Converts {{any}} into a JSON string.#}