summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/l-os.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-08-25 10:54:48 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-08-25 10:54:48 +0200
commitb098b3973dd4a38184882a4a5b84aad2bdd5835a (patch)
tree0dba397b70a6bcb26f24c70e3b806d3ba677a7ea /tex/context/base/mkiv/l-os.lua
parent994bed45a8c8f6833acbdb9250eb4ad531717111 (diff)
downloadcontext-b098b3973dd4a38184882a4a5b84aad2bdd5835a.tar.gz
2018-08-25 10:12:00
Diffstat (limited to 'tex/context/base/mkiv/l-os.lua')
-rw-r--r--tex/context/base/mkiv/l-os.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/l-os.lua b/tex/context/base/mkiv/l-os.lua
index 534be5edf..c2a903f5c 100644
--- a/tex/context/base/mkiv/l-os.lua
+++ b/tex/context/base/mkiv/l-os.lua
@@ -32,11 +32,12 @@ local concat = table.concat
local random, ceil, randomseed = math.random, math.ceil, math.randomseed
local rawget, rawset, type, getmetatable, setmetatable, tonumber, tostring = rawget, rawset, type, getmetatable, setmetatable, tonumber, tostring
--- The following code permits traversing the environment table, at least
--- in luatex. Internally all environment names are uppercase.
+-- The following code permits traversing the environment table, at least in luatex. Internally all
+-- environment names are uppercase.
-- The randomseed in Lua is not that random, although this depends on the operating system as well
--- as the binary (Luatex is normally okay). But to be sure we set the seed anyway.
+-- as the binary (Luatex is normally okay). But to be sure we set the seed anyway. It will be better
+-- in Lua 5.4 (according to the announcements.)
math.initialseed = tonumber(string.sub(string.reverse(tostring(ceil(socket and socket.gettime()*10000 or time()))),1,6))