all repos — min @ cad483b64d4eba42c9a90599c8717ce466b917ff

A small but practical concatenative programming language.

Fixed while symbol
h3rald h3rald@h3rald.com
Sun, 10 Jan 2021 22:10:54 +0100
commit

cad483b64d4eba42c9a90599c8717ce466b917ff

parent

db4627428c44faac8f69b391a538935dd60ab1e7

4 files changed, 4 insertions(+), 16 deletions(-)

jump to
M min.ymlmin.yml

@@ -2,4 +2,4 @@ author: Fabio Cevasco

description: A tiny concatenative programming language and shell. id: 35924740 name: min -version: 0.28.0+version: 0.28.1
M minpkg/lib/min_lang.nimminpkg/lib/min_lang.nim

@@ -771,15 +771,12 @@ def.symbol("while") do (i: In):

let vals = i.expect("quot", "quot") var d = vals[0] var b = vals[1] - for e in b.qVal: - i.push e i.dequote(b) var check = i.pop - while check.isBool and check.boolVal == true: + while check.boolVal == true: i.dequote(d) i.dequote(b) check = i.pop - discard i.pop # Other
M next-release.mdnext-release.md

@@ -1,10 +1,1 @@

-* Improved diagnostics for native symbols calling other symbols. -* Refactored **crypto** module to use Nim StdLib's md5 and sha1 module when OpenSSL support is not enabled. -* Fixed detection of musl executables when running build task. -* Added **union**, **intersection**, **difference**, **symmetric-difference**, **one?** symbols to **seq** module. -* Fixed compilation for loaded files and assets. -* Refacored code to satisfy nimble package structure. -* Now caching required modules so that their code is executed only once. -* Added **line-info** symbol returning a dictionary containing the current filename, line and column numbers. -* Added **dsdelete!**, **dspost!**, **dsput!**, **dswrite!**. -* **REMOVED** the following symbols because redundant or pointless: **dequote-and**, **dequote-or**, **reverse-expect-dequote** (and **--**), **read**. Also, **apply** no longer works on dictionaries, only quotations.+* Fixed implementation of the **while** symbol, as it polluted the stack in some cases.
M site/settings.jsonsite/settings.json

@@ -6,5 +6,5 @@ "rules": "rules.min",

"temp": "temp", "templates": "templates", "title": "min language", - "version": "0.28.0" + "version": "0.28.1" }