Hacker News new | ask | show | jobs
by technologia 4165 days ago
We've been using Torch for a while at work, really appreciate Facebook doing this. Some of us had a hard time adjusting to Lua, but it was well worth it.
3 comments

I'm curious what your team experience was with Lua.

IIRC, Lua is even more liberal than Python in that if you mistype a variable name, it will silently give you 'nil' rather than throwing an exception.

Also, the prototype system is a little wonky. It seems overly flexible and makes you do too much work yourself, which would make it hard on a large team all getting started at once.

If Torch gets popular I wonder if something like TypeScript or Facebook's own Flow would start to make sense.

> IIRC, Lua is even more liberal than Python in that if you mistype a variable name, it will silently give you 'nil' rather than throwing an exception.

Like most things in Lua, that is easy to customize. You can just add an __index metamethod to environment tables. There are various 'strict' modules which do just that.

Thats what we love about Lua, it gives us control of the side effects.
So some of our team were a bit disoriented with the lack of reference counting and for others it was their first foray into functional programming.

Our team first picked up the Little Schemer and then jumped directly to lua.

Could you provide some steps how you could bring everyone one board? We are still having python/R migration issues.
Most of our people came from a stats background using R or python (more focused on Scipy/numpy than any other package).

A few of us had some experience with Lua before with game programming, so we took it on ourselves to teach the others Scheme (almost like an intro to programming class) and then teach how Lua worked in comparison.

I guess we lucked out because they were able to pick it up quickly after the education on functional programming.

Torch is really cool. I wish I could use it more. Sadly it isn't supported on Windows.
Initially we had to use Windows for some client requirements, because of that we used Vagrant+Docker to deploy torch. You might want to try that if you can use VMs.