Fixed mintool build commands; started new release.
h3rald h3rald@h3rald.com
Sun, 07 Jul 2024 10:48:03 +0200
6 files changed,
180 insertions(+),
27 deletions(-)
M
min.nimble
→
min.nimble
@@ -1,6 +1,6 @@
# Package -version = "0.44.0" +version = "0.45.0" author = "Fabio Cevasco" description = "A small but practical concatenative programming language and shell." license = "MIT"
M
next-release.md
→
next-release.md
@@ -1,28 +1,7 @@
### 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)
M
site/settings.json
→
site/settings.json
@@ -6,5 +6,5 @@ "rules": "rules.min",
"temp": "temp", "templates": "templates", "title": "min language", - "version": "0.44.0" + "version": "0.45.0" }
M
tasks/build.min
→
tasks/build.min
@@ -1,1 +1,137 @@
-#!/usr/bin/env min "_helpers" require :helpers 'helpers import ( symbol cz ('sym :stage 'sym :variant 'sym :target-os ==>) ( true :pack-result (stage "^(release-nopack|dev)$" match?) (false @pack-result) when "-d:release" :d-stage (stage "dev" ==) ("-d:dev" @d-stage) when " " :d-variant "min" :o-variant (variant length 0 >) ( "-d:$# " (variant) =% @d-variant "$#min" (variant) =% @o-variant ) when "nim" required "Building $# - $# (x64)" (o-variant target-os) =% notice! "" :musl "musl-gcc" which :musl-gcc (musl-gcc length 0 >) ("--gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc" @musl) when "nim c $# -d:ssl -d:useOpenSsl3 $# --opt:size --cpu:amd64 --os:$# $#-o:$# min" (d-stage musl target-os d-variant o-variant) =% puts system pop (pack-result) ( {} target-os "os" dset config "version" dget "version" dset o-variant "exe" dset pack ) when ) ) :: ;; Builds and packs a min executable. #|| Tasks ||# ( symbol guide (==>) ( "hastyscribe" required "Building - guide" notice! "hastyscribe Min_DeveloperGuide.md --field/version=$#" (version) =% !! "cp Min_DeveloperGuide.htm site/output/guide.dev.html" !! ) ) :: ;; Builds the developer guide. ( symbol site (==>) ( "hastysite" required "Building - site" notice! "cd site && hastysite build && cd .." !! ) ) :: ;; Builds the min site. ( symbol pack (dict :vdata ==>) ( vdata "exe" dget :exe (vdata "os" dget "windows" ==) ("$#.exe" (exe) =% @exe) when "$exe:_v$version:_$os:_x64.zip" :fn fn vdata dpairs % ":" "" replace @fn "Compressing: $#" (fn) =% notice! (exe) => fn zip ) ) :: ;; Compresses a min executable. ( symbol vim (==>) ( config "version" dget :min-version "tasks/data/min.vim" fread :template timestamp "dd MMM YYYY" tformat :date min-symbols ("||" !=) filter " " join :symbols "min.vim" :out-file "Building - min.vim" notice! template ("date" date "version" min-version "symbols" symbols) =% out-file fwrite ) ) :: ;; Generates the min.vim file. ( symbol docs (==>) ( guide site ) ) :: ;; Generate the min development guide and site. ( symbol dev (==>) ("dev" "" os cz) ) :: ;; Builds min (dev version) on the current OS. ( symbol default (==>) ("release-nopack" "" os cz) ) :: ;; Builds min on the current OS. ( symbol linux (==>) ("" "" "linux" cz) ) :: ;; Builds min for Linux. ( symbol macosx (==>) ("" "" "macosx" cz) ) :: ;; Builds min for macOS. ( symbol windows (==>) ("" "" "windows" cz) ) :: ;; Builds min for Windows. +#!/usr/bin/env minsystemsystemsystem + +"_helpers" require :helpers 'helpers import + +( + symbol cz + ('sym :stage 'sym :variant 'sym :target-os ==>) + ( + true :pack-result + (stage "^(release-nopack|dev)$" match?) + (false @pack-result) + when + "-d:release" :d-stage + (stage "dev" ==) + ("-d:dev" @d-stage) + when + " " :d-variant + "min" :o-variant + (variant length 0 >) ( + "-d:$# " (variant) =% @d-variant + "$#min" (variant) =% @o-variant + ) when + "nim" required + "Building $# - $# (x64)" (o-variant target-os) =% notice! + "" :musl + "musl-gcc" which :musl-gcc + (musl-gcc length 0 >) + ("--gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc" @musl) + when + "nim c $# -d:ssl -d:useOpenSsl3 $# --opt:size --cpu:amd64 --os:$# $#-o:$# min" (d-stage musl target-os d-variant o-variant) =% puts system pop + (pack-result) + ( + {} + target-os "os" dset + config "version" dget "version" dset + o-variant "exe" dset + pack + ) + when + ) +) :: +;; Builds and packs a min executable. + +#|| Tasks ||# + +( + symbol guide + (==>) + ( + "hastyscribe" required + "Building - guide" notice! + "hastyscribe Min_DeveloperGuide.md --field/version=$#" (version) =% system + "cp Min_DeveloperGuide.htm site/output/guide.dev.html" system + ) +) :: +;; Builds the developer guide. + +( + symbol site + (==>) + ( + "hastysite" required + "Building - site" notice! + "cd site && hastysite build && cd .." system + ) +) :: +;; Builds the min site. + +( + symbol pack + (dict :vdata ==>) + ( + vdata "exe" dget :exe + (vdata "os" dget "windows" ==) ("$#.exe" (exe) =% @exe) when + "$exe:_v$version:_$os:_x64.zip" :fn + fn vdata dpairs % ":" "" replace @fn + "Compressing: $#" (fn) =% notice! + (exe) => fn zip + ) +) :: +;; Compresses a min executable. + +( + symbol vim + (==>) + ( + config "version" dget :min-version + "tasks/data/min.vim" fread :template + timestamp "dd MMM YYYY" tformat :date + min-symbols ("||" !=) filter " " join :symbols + "min.vim" :out-file + "Building - min.vim" notice! + template ("date" date "version" min-version "symbols" symbols) =% out-file fwrite + ) +) :: +;; Generates the min.vim file. + +( + symbol docs + (==>) + ( + guide + site + ) +) :: +;; Generate the min development guide and site. + +( + symbol dev + (==>) + ("dev" "" os cz) +) :: +;; Builds min (dev version) on the current OS. +( + symbol default + (==>) + ("release-nopack" "" os cz) +) :: +;; Builds min on the current OS. +( + symbol linux + (==>) + ("" "" "linux" cz) +) :: +;; Builds min for Linux. +( + symbol macosx + (==>) + ("" "" "macosx" cz) +) :: +;; Builds min for macOS. +( + symbol windows + (==>) + ("" "" "windows" cz) +) :: +;; Builds min for Windows.
M
tasks/h3rald.min
→
tasks/h3rald.min
@@ -1,1 +1,39 @@
-#!/usr/bin/env min "_helpers" require :helpers 'helpers import config "version" dget :min-version "Min_DeveloperGuide.htm" :guide-file "../h3rald/assets/min/" guide-file suffix :h3rald-guide "../h3rald/contents/min.md" :h3rald-min-md "version:\\s+\\d+\\.\\d+\\.\\d+" :min-v-reg "version: $#" (min-version) =% :min-v-rep ( symbol update (==>) ( "Updating min Developer Guide and project on H3RALD.com..." notice! guide-file h3rald-guide cp h3rald-min-md fread min-v-reg min-v-rep replace :updated-contents updated-contents h3rald-min-md fwrite "Done." notice! ) ) :: ;; Updates the min Developer Guide and project page on H3RALD.com ( symbol build (==>) ( "git" required "hastysite" required "Pulling content and rebuilding H3RALD.com web site..." notice! ;; Assuming min and h3rald are siblings parent-dir cd "h3rald" cd "git pull" !! "hastysite build" !! parent-dir cd "min" cd ) ) :: ;; Builds H3RALD.com web site +#!/usr/bin/env minsystemsystem + +"_helpers" require :helpers 'helpers import + +config "version" dget :min-version +"Min_DeveloperGuide.htm" :guide-file +"../h3rald/assets/min/" guide-file suffix :h3rald-guide +"../h3rald/contents/min.md" :h3rald-min-md +"version:\\s+\\d+\\.\\d+\\.\\d+" :min-v-reg +"version: $#" (min-version) =% :min-v-rep + +( + symbol update + (==>) + ( + "Updating min Developer Guide and project on H3RALD.com..." notice! + guide-file h3rald-guide cp + h3rald-min-md fread min-v-reg min-v-rep replace :updated-contents + updated-contents h3rald-min-md fwrite + "Done." notice! + ) +) :: +;; Updates the min Developer Guide and project page on H3RALD.com + +( + symbol build + (==>) + ( + "git" required + "hastysite" required + "Pulling content and rebuilding H3RALD.com web site..." notice! + ;; Assuming min and h3rald are siblings + parent-dir cd "h3rald" cd + "git pull" system + "hastysite build" system + parent-dir cd "min" cd + ) +) :: +;; Builds H3RALD.com web site