all repos — min @ d6c6fc47265c0dc2e1b88b4f99183621211af613

A small but practical concatenative programming language.

Merge branch 'SolitudeSF-fixes'
h3rald h3rald@h3rald.com
Sat, 23 Jun 2018 10:42:05 +0200
commit

d6c6fc47265c0dc2e1b88b4f99183621211af613

parent

ef1e1123ffec4fb9ce315dcf22b68709ac1f3c20

2 files changed, 21 insertions(+), 16 deletions(-)

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

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

-import - times, +import + times, tables -import - ../core/parser, - ../core/value, - ../core/interpreter, +import + ../core/parser, + ../core/value, + ../core/interpreter, ../core/utils # Time

@@ -12,13 +12,13 @@

proc time_module*(i: In)= let def = i.define() - + def.symbol("timestamp") do (i: In): - i.push getTime().int.newVal - + i.push getTime().toUnix().newVal + def.symbol("now") do (i: In): i.push epochTime().newVal - + def.symbol("timeinfo") do (i: In): let vals = i.expect("num") let t = vals[0]

@@ -79,5 +79,5 @@ time = t.intVal.fromUnix

else: time = t.floatVal.int64.fromUnix i.push time.local.format(s.getString).newVal - + def.finalize("time")
M min.nimblemin.nimble

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

-[Package] -name = "min" +# Package + version = "0.17.0" author = "Fabio Cevasco" description = "A tiny concatenative programming language and shell." license = "MIT" -bin = "min" +bin = @["min"] + +# Dependencies + +requires "nim >= 0.18.0" +requires "nifty" -[Deps] -requires: "nim >= 0.18.0" +before install: + exec "nifty install"