mirror of
https://github.com/kanaka/mal.git
synced 2024-09-11 21:57:38 +03:00
Change os.clock multiplier, update Dockerfile to use lua 5.3.5.5
This commit is contained in:
parent
024e0b0415
commit
d4fc4551a0
@ -22,9 +22,22 @@ WORKDIR /mal
|
||||
##########################################################
|
||||
|
||||
# Lua
|
||||
RUN apt-get -y install lua5.2 liblua5.2-dev lua-rex-pcre luarocks
|
||||
RUN luarocks install linenoise
|
||||
RUN luarocks install luasocket
|
||||
RUN apt-get -y install gcc wget unzip libpcre3-dev
|
||||
|
||||
RUN \
|
||||
curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz && \
|
||||
tar -zxf lua-5.3.5.tar.gz && \
|
||||
cd lua-5.3.5 && \
|
||||
make linux test && \
|
||||
make install
|
||||
|
||||
RUN \
|
||||
wget https://luarocks.org/releases/luarocks-3.3.1.tar.gz && \
|
||||
tar zxpf luarocks-3.3.1.tar.gz && \
|
||||
cd luarocks-3.3.1 && \
|
||||
./configure && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
# luarocks .cache directory is relative to HOME
|
||||
ENV HOME /mal
|
||||
|
@ -3,7 +3,6 @@ local types = require('types')
|
||||
local reader = require('reader')
|
||||
local printer = require('printer')
|
||||
local readline = require('readline')
|
||||
-- local socket = require('socket')
|
||||
|
||||
local Nil, List, HashMap, _pr_str = types.Nil, types.List, types.HashMap, printer._pr_str
|
||||
|
||||
@ -278,7 +277,7 @@ M.ns = {
|
||||
['-'] = function(a,b) return a-b end,
|
||||
['*'] = function(a,b) return a*b end,
|
||||
['/'] = function(a,b) return math.floor(a/b) end,
|
||||
['time-ms'] = function() return math.floor(os.clock()*1000) end,
|
||||
['time-ms'] = function() return math.floor(os.clock()*1000000) end,
|
||||
|
||||
list = function(...) return List:new(table.pack(...)) end,
|
||||
['list?'] = function(a) return types._list_Q(a) end,
|
||||
|
Loading…
Reference in New Issue
Block a user