all repos — min @ fe4bc2a0cdbfacd043f6f4f59641d0dca7d83364

A small but practical concatenative programming language.

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

fe4bc2a0cdbfacd043f6f4f59641d0dca7d83364

parent

bab1504f48097800ca08b26c7dd107ad0b6aa46f

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"