I haven't used Torch7 yet, but from heavy usage I can recommend http://www.nongnu.org/gsl-shell/.
GSL-Shell combines Lua + Luajit + GSL-Library (GNU Science Library) + additional syntactic sugar that helps with matrix/vector calculations. I use it for all kinds of linear algebra projects and gsl-shell does an excellent job.