Search code examples
luatorchluajit

What is the relationship between Torch and Lua?


Roughly speaking, I know

  ______             __   |  
 /_  __/__  ________/ /   |  is Scientific computing for Lua. 
  / / / _ \/ __/ __/ _ \  |   
 /_/  \___/_/  \__/_//_/  |   
                          |   

But could someone explain why we had to create a new language for that? Why not just make a module like Numpy in Python?

I'm wondering where is the fine line between just to modularize it or to create a new scripting language. Is it when the hardware starts get involved?

I was thinking maybe Torch is not a language, just a framework, but according to Wikipedia:

Torch is an open source machine learning library, a scientific computing framework, and a script language based on the Lua programming language. It provides a wide range of algorithms for deep machine learning, and uses the scripting language LuaJIT, and an underlying C implementation.


Solution

  • It's a language based on Lua in the same sense as DSL is a language -- "A domain-specific language (DSL) is a computer language specialized to a particular application domain" -- as it provides programming language extensions tailored to scientific computing.