Closed jinfengr closed 8 years ago
lua 5.2 does not have unpack. it has table.unpack
Does lua 5.1 have unpack?
yes, but it's best to stick to Lua 5.2 and do this: unpack = table.unpack
I see, thanks.
I see this problem with lua 5.3 on Mac OS:
→ rep.lua [e61612a]
/usr/local/bin/lua5.3: /usr/local/share/lua/5.3/repl/init.lua:404: attempt to call a nil value (global 'unpack')
stack traceback:
/usr/local/share/lua/5.3/repl/init.lua:404: in function 'repl.loadplugin'
/usr/local/lib/luarocks/rocks-5.3/luarepl/0.8-1/bin/rep.lua:24: in main chunk
[C]: in ?
yes, but it's best to stick to Lua 5.2 and do this: unpack = table.unpack
Hi soumith. Sorry, I’m new to lua. When you say “do this”, can you explain where I should add this declaration?
yes, but it's best to stick to Lua 5.2 and do this: unpack = table.unpack
Hi soumith. Sorry, I’m new to lua. When you say “do this”, can you explain where I should add this declaration?
Hi djebel-amila, did you figure this out? I tried local unpack = unpack or table.unpack in bash but it didn't allow me to use "local". I'm also new to this
I installed the torch with: TORCH_LUA_VERSION=LUA52 ./install.sh
Then I installed nngraph with: luarocks install nngraph
Then I entered into torch terminal: require 'nngraph' require 'nn' unpack()
Then I met the exception: [string "_RESULT={unpack()}"]:1: attempt to call global 'unpack' (a nil value)
Previously I didn't met this exception after installing torch. I am wondering if it's caused by any new commit... Could you please take a look at it?
Thanks.