torch / sys Goto Github PK
View Code? Open in Web Editor NEWA system utility package for Torch.
License: Other
A system utility package for Torch.
License: Other
The parameter "readwhat" is not used, but is referenced from the parallel module (see the code for forking).
Proposed fix:
function sys.fexecute(cmd, readwhat)
*+ readwhat = readwhat or 'all'
local tmpfile = os.tmpname()
local cmd = cmd .. ' 1>'.. tmpfile..' 2>' .. tmpfile
os.execute(cmd)
local file = G.assert(io.open(tmpfile))
*- local s = file:read('all')
+ local s= file:read(readwhat)
file:close()
s = s:gsub('^%s',''):gsub('%s_$','')
os.execute('rm ' .. tmpfile)
return s
end
The latest set of changes removes a number of functions, so some existing code may break. How about tagging 5f8c734 as 1.0 and adding a v1.1 rockspec pointing to HEAD? That way we can keep existing code working by just modifying our rockspecs.
a recent commit (@7588fbd1) breaks lzmq.threads
(https://github.com/zeromq/lzmq).
in the context of lzmq.threads
, arg
might contain the following content:
{ "first argument", "second argument", "third argument",
[0] = "=(loadstring)",
n = 3
}
the variables i
and v
within find_prefix
will thus contain the following values:
0 "=(loadstring)"
1 "first argument"
2 "second argument"
3 "third argument"
"n" 3
the comparison i <= 0
will eventually fail with the following message:
sys/init.lua:99: attempt to compare number with string
package lua-torch-sys
is pending for refiew:
https://bugs.debian.org/827521
packaging repo here:
http://anonscm.debian.org/cgit/debian-science/packages/lua-torch-sys.git
For some reason: https://github.com/torch/sys/blob/master/init.lua#L37-L40 is returning nil when launched through OpenResty which causes an exception.
app.lua
local sys = require 'sys'
Running resty app.lua
results in:
$ resty app.lua
/Users/vanpelt/torch/install/share/lua/5.1/sys/init.lua:40: attempt to index local 's' (a nil value)
(sys.execute
is being called to set sys.prefix
)
I have no clue why popen
is behaving strangely, but thought the nil output case should be handled. Any idea's why child processes are failing in this context?
Is it necessary to remove the @ character in the following line?
https://github.com/torch/sys/blob/master/fpath.lua#L5
My username in the system has an "@", which causes the code to give incorrect path.
I am building the library via a script which subsequently calls "luarocks make XXX" where XXX are cwrap, paths, torch, sys, ...
"FIND_PACKAGE(Torch REQUIRED)" fails because -DCMAKE_PREFIX_PATH="$(LUA_BINDIR)/.." was removed in sys-1.1-0.rockspec
There is no such problem for other torch modules like optim, graph, ... because they contain DCMAKE_PREFIX_PATH="$(LUA_BINDIR)/.."
see discussion #7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.