all repos — min @ ca1138ad77c32cfe86cd0d137b0682b81c65f41e

A small but practical concatenative programming language.

Preparing for release.
h3rald h3rald@h3rald.com
Sun, 05 Mar 2017 19:33:38 +0100
commit

ca1138ad77c32cfe86cd0d137b0682b81c65f41e

parent

a9f08f5ea9b54e043736e92a95f0639148cb3eb3

4 files changed, 63 insertions(+), 2 deletions(-)

jump to
M lib/min_lang.nimlib/min_lang.nim

@@ -822,6 +822,9 @@

.symbol(":") do (i: In): i.push("define".newSym) + .symbol("@") do (i: In): + i.push("define".newSym) + .symbol("!") do (i: In): i.push("system".newSym)
M min.nimblemin.nimble

@@ -1,6 +1,6 @@

[Package] name = "min" -version = "0.3.0" +version = "0.4.0" author = "Fabio Cevasco" description = "A tiny concatenative programming language and shell." license = "MIT"
A nakefile.nim

@@ -0,0 +1,58 @@

+import + nake + +import + core/consts + +const + compile = "nim c -d:release" + linux_x86 = "--cpu:i386 --os:linux" + linux_x64 = "--cpu:amd64 --os:linux" + linux_arm = "--cpu:arm --os:linux" + windows_x64 = "--cpu:amd64 --os:windows" + macosx_x64 = "" + parallel = "--parallelBuild:1 --verbosity:3" + hs = "min" + hs_file = "min.nim" + zip = "zip -X" + +proc filename_for(os: string, arch: string): string = + return "min" & "_v" & version & "_" & os & "_" & arch & ".zip" + +task "windows-x64-build", "Build min for Windows (x64)": + direshell compile, windows_x64, hs_file + +task "linux-x86-build", "Build min for Linux (x86)": + direshell compile, linux_x86, hs_file + +task "linux-x64-build", "Build min for Linux (x64)": + direshell compile, linux_x64, hs_file + +task "linux-arm-build", "Build min for Linux (ARM)": + direshell compile, linux_arm, hs_file + +task "macosx-x64-build", "Build min for Mac OS X (x64)": + direshell compile, macosx_x64, hs_file + +task "release", "Release min": + echo "\n\n\n WINDOWS - x64:\n\n" + runTask "windows-x64-build" + direshell zip, filename_for("windows", "x64"), hs & ".exe" + direshell "rm", hs & ".exe" + echo "\n\n\n LINUX - x64:\n\n" + runTask "linux-x64-build" + direshell zip, filename_for("linux", "x64"), hs + direshell "rm", hs + echo "\n\n\n LINUX - x86:\n\n" + runTask "linux-x86-build" + direshell zip, filename_for("linux", "x86"), hs + direshell "rm", hs + echo "\n\n\n LINUX - ARM:\n\n" + runTask "linux-arm-build" + direshell zip, filename_for("linux", "arm"), hs + direshell "rm", hs + echo "\n\n\n MAC OS X - x64:\n\n" + runTask "macosx-x64-build" + direshell zip, filename_for("macosx", "x64"), hs + direshell "rm", hs + echo "\n\n\n ALL DONE!"
M tests/lang.mintests/lang.min

@@ -155,7 +155,7 @@ ((a b +) (4 :a 5 :b) with 9 ==) assert

("{\"a\": 1, \"b\": 2.3}" from-json ((a 1) (b 2.3)) ==) assert - ((1 2 3 "aaa" 'q q true) to-json "[1,2,3,\"aaa\",\";sym:'q\",\";sym:q\",true]" ==) assert + ((1 2 3 "aaa" 'q q true) to-json "\n" "" replace " " "" replace "[1,2,3,\"aaa\",\";sym:'q\",\";sym:q\",true]" ==) assert ((1 2 3 "aaa" 'q q true) to-json from-json (1 2 3 "aaa" 'q q true) ==) assert