Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/xlua.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Lerer <adam.lerer@gmail.com>2015-02-07 00:43:40 +0300
committerAdam Lerer <adam.lerer@gmail.com>2015-02-07 00:43:40 +0300
commitf18cce06e64f3aab73370470c9412e459290836f (patch)
tree613796c051b4590d3e8ce4c4c07003d09c744377 /init.lua
parentbf8eb60946ac8f0bfd382e4dbadeaaa9e745a0e5 (diff)
Minor improvement to progress bar
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index a4fb01c..4357fd8 100644
--- a/init.lua
+++ b/init.lua
@@ -246,8 +246,6 @@ do
local termLength = getTermLength()
function progress(current, goal)
-- defaults:
- for i=1,termLength do glob.io.write(' ') end
- for i=1,termLength do glob.io.write('\b') end
local barLength = termLength - 34
local smoothing = 100
local maxfps = 10
@@ -278,6 +276,8 @@ do
else glob.io.write('.') end
end
glob.io.write('] ')
+ for i=1,termLength-barLength-4 do glob.io.write(' ') end
+ for i=1,termLength-barLength-4 do glob.io.write('\b') end
-- time stats
local elapsed = timer:time().real
local step = (elapsed-times[1]) / (current-indices[1])