all repos — min @ e8915d01a7b1bf2f0ae0eb56ddf097507cd29d2c

A small but practical concatenative programming language.

Added startup symbol.
h3rald h3rald@h3rald.com
Sat, 08 Oct 2016 14:39:44 +0200
commit

e8915d01a7b1bf2f0ae0eb56ddf097507cd29d2c

parent

2f8da2778f017ab8db051fca7d75866b9042c494

3 files changed, 11 insertions(+), 10 deletions(-)

jump to
M minim.nimminim.nim

@@ -155,8 +155,8 @@ var s = newStringStream("")

i.open(s, "") var line: string echo "$1 v$2" % [appname, version] - echo "-> Type 'exit' or 'quit' to exit." var ed = initEditor(historyFile = MINIMHISTORY) + i.apply(i.scope.getSymbol("startup")) while true: let symbols = toSeq(i.scope.symbols.keys) ed.completionCallback = proc(ed: LineEditor): seq[string] =
M minim.vimminim.vim

@@ -10,7 +10,7 @@ endif

setl iskeyword+=?,$,+,*,/,%,=,>,<,&,-,',.,:,@,~,^,! -syntax keyword minimDefaultSymbol ! != $ & ' * + - % ^ -> . .. / : < <= == => =~ > >= @ ROOT aes and append apply ask at atime b bind bool bool? bury1 bury2 bury3 c call call! capitalize case cd chmod choose clear-stack column-print concat confirm cons contains cp cpu crypto ctime datetime ddel debug debug? decode decrypt define delete dget dictionary? dig1 dig2 dig3 dip dir? dirname div dprint dprint! dset dump-stack dup dupd echo encode encrypt env? eq eval even? exit fappend file? filename filter first float float? foreach fperms fread from-json fs fsize fstats ftype fwrite gets get-stack getenv gt gte hardlink hidden? i id ifte import include indent inspect int int? interpolate interval io join k keys length linrec load load-symbol logic lowercase ls ls-r lt lte map match md5 mkdir mod module mtime mv newline not noteq now num number? odd? or os password pop popd pred prepend print print! prompt puts puts! putenv q quit quotation? quote raise regex remove-symbol repeat replace rest rm rmdir run save-symbol scope scope? seal search select set-stack sha1 sha224 sha256 sha384 sha512 sigil sigils sip size sleep sort source split stored-symbols str string string? strip succ swap swapd swons symbols symlink symlink? sys system take tformat time timeinfo times timestamp titleize to-json try unit unquote uppercase unzip values version which while with xor zap zip +syntax keyword minimDefaultSymbol ! != $ & ' * + - % ^ -> . .. / : < <= == => =~ > >= @ ROOT aes and append apply ask at atime b bind bool bool? bury1 bury2 bury3 c call call! capitalize case cd chmod choose clear-stack column-print concat confirm cons contains cp cpu crypto ctime datetime ddel debug debug? decode decrypt define delete dget dictionary? dig1 dig2 dig3 dip dir? dirname div dprint dprint! dset dump-stack dup dupd echo encode encrypt env? eq eval even? exit fappend file? filename filter first float float? foreach fperms fread from-json fs fsize fstats ftype fwrite gets get-stack getenv gt gte hardlink hidden? i id ifte import include indent inspect int int? interpolate interval io join k keys length linrec load load-symbol logic lowercase ls ls-r lt lte map match md5 mkdir mod module mtime mv newline not noteq now num number? odd? or os password pop popd pred prepend print print! prompt puts puts! putenv q quit quotation? quote raise regex remove-symbol repeat replace rest rm rmdir run save-symbol scope scope? seal search select set-stack sha1 sha224 sha256 sha384 sha512 sigil sigils sip size sleep sort source split startup stored-symbols str string string? strip succ swap swapd swons symbols symlink symlink? sys system take tformat time timeinfo times timestamp titleize to-json try unit unquote uppercase unzip values version which while with xor zap zip syntax match minimDefaultSigil ;\<[:@'~!$%&$=<>^*]; contained
M prelude.minprelude.min

@@ -61,14 +61,15 @@ ((() cons cons) dip swap i) :bury2

((() cons cons cons) dip swap i) :bury3 ; Other -(print pop) :print! -(dprint pop) :dprint! -(puts pop) :puts! -(call pop) :call! -(:ms :q :check (check) (ms sleep q) while) :interval -(password aes encode) :encrypt -(decode password aes) :decrypt -(dup load import) :include +(print pop) :print! +(dprint pop) :dprint! +(puts pop) :puts! +(call pop) :call! +(:ms :q :check (check) (ms sleep q) while) :interval +(password aes encode) :encrypt +(decode password aes) :decrypt +(dup load import) :include +() :startup ; Prompt ("[$1]$$ " (.) %) :prompt