<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Lua on Infinite Script</title><link>https://www.infinitescript.com/tags/lua/</link><description>Recent content in Lua on Infinite Script</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 09 Jan 2018 02:10:34 +0000</lastBuildDate><atom:link href="https://www.infinitescript.com/tags/lua/index.xml" rel="self" type="application/rss+xml"/><item><title>Lua in a Nutshell: A Quick Tutorial for Lua</title><link>https://www.infinitescript.com/2018/01/lua-in-a-nutshell-a-quick-tutorial-for-lua/</link><pubDate>Tue, 09 Jan 2018 02:10:34 +0000</pubDate><guid>https://www.infinitescript.com/2018/01/lua-in-a-nutshell-a-quick-tutorial-for-lua/</guid><description>&lt;p&gt;I&amp;rsquo;m reading source code written with Torch these days. &lt;a href="http://torch.ch/"&gt;Torch&lt;/a&gt; is a well-known deep learning framework written in Lua.&lt;/p&gt;&#10;&lt;p&gt;So I summarize its grammar and provide a quick tutorial here.&lt;/p&gt;&#10;&lt;h2 id="getting-started"&gt;Getting Started&lt;/h2&gt;&#10;&lt;p&gt;Like many languages, Lua is case-sensitive.&lt;/p&gt;&#10;&lt;p&gt;The following code outputs &amp;ldquo;Hello World&amp;rdquo; with Lua. Note that the semicolon at the end of a line is optional, like JavaScript.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Hello World&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can use the interpreter of Lua in the command line:&lt;/p&gt;</description></item></channel></rss>