<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Lua, Lua, Oh, Oh</title>
	<atom:link href="http://www.linux-mag.com/id/4678/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linux-mag.com/id/4678/</link>
	<description>Open Source, Open Standards</description>
	<lastBuildDate>Fri, 10 Feb 2012 10:47:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: clowenstein</title>
		<link>http://www.linux-mag.com/id/4678/#comment-4950</link>
		<dc:creator>clowenstein</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/4678/#comment-4950</guid>
		<description>Programming examples in Listing One and Listing Two have been garbaged up by text reformatting that ignored newlines in the original.  Really hard to decipher.</description>
		<content:encoded><![CDATA[<p>Programming examples in Listing One and Listing Two have been garbaged up by text reformatting that ignored newlines in the original.  Really hard to decipher.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: atai</title>
		<link>http://www.linux-mag.com/id/4678/#comment-4951</link>
		<dc:creator>atai</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/4678/#comment-4951</guid>
		<description>Squirrel (http://squirrel-lang.org/) is a language designed following Lua in its internal architecture but supporting a C/C++ style syntax with classes.  It may be attractive to people who find Lua too minimalistic.</description>
		<content:encoded><![CDATA[<p>Squirrel (<a href="http://squirrel-lang.org/" rel="nofollow">http://squirrel-lang.org/</a>) is a language designed following Lua in its internal architecture but supporting a C/C++ style syntax with classes.  It may be attractive to people who find Lua too minimalistic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ivantorres</title>
		<link>http://www.linux-mag.com/id/4678/#comment-4952</link>
		<dc:creator>ivantorres</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/4678/#comment-4952</guid>
		<description>Jet another language!!! (*Signs*) Bored!</description>
		<content:encoded><![CDATA[<p>Jet another language!!! (*Signs*) Bored!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stuartp</title>
		<link>http://www.linux-mag.com/id/4678/#comment-4953</link>
		<dc:creator>stuartp</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/4678/#comment-4953</guid>
		<description>Editors: Please reformat the code listings so they are readable.</description>
		<content:encoded><![CDATA[<p>Editors: Please reformat the code listings so they are readable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: akovalenko</title>
		<link>http://www.linux-mag.com/id/4678/#comment-4954</link>
		<dc:creator>akovalenko</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/4678/#comment-4954</guid>
		<description>Introduction could have been lifted verbatim from the Tcl book circa 1990. Amusing... Lua/Tk anyone?</description>
		<content:encoded><![CDATA[<p>Introduction could have been lifted verbatim from the Tcl book circa 1990. Amusing&#8230; Lua/Tk anyone?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jgcastellanoa</title>
		<link>http://www.linux-mag.com/id/4678/#comment-4955</link>
		<dc:creator>jgcastellanoa</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/4678/#comment-4955</guid>
		<description>Hey editors, are you checking the comments? please format the code so it is useful for everyone.&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
		<content:encoded><![CDATA[<p>Hey editors, are you checking the comments? please format the code so it is useful for everyone.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mino</title>
		<link>http://www.linux-mag.com/id/4678/#comment-4956</link>
		<dc:creator>mino</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/4678/#comment-4956</guid>
		<description>Hi,&lt;br /&gt;
Lua is also the eaiest way to develop homebrews for PlayStation Portable. I discovered it that way a few month ago and gave it a try.&lt;br /&gt;
&lt;br /&gt;
nice scripting language.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Lua is also the eaiest way to develop homebrews for PlayStation Portable. I discovered it that way a few month ago and gave it a try.</p>
<p>nice scripting language.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ricegf</title>
		<link>http://www.linux-mag.com/id/4678/#comment-4957</link>
		<dc:creator>ricegf</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/4678/#comment-4957</guid>
		<description>Here&#039;s listing one (I think):&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;br /&gt;
$ lua &lt;br /&gt;
&gt; -- create an empty table and add some elements &lt;br /&gt;
&gt; t1 = {} &lt;br /&gt;
&gt; t1[1] = &quot;moustache&quot; &lt;br /&gt;
&gt; t1[2] = 3 &lt;br /&gt;
&gt; t1[&quot;brothers&quot;] = true &lt;br /&gt;
&gt; -- more commonly, create the table and define elements all at once &lt;br /&gt;
&gt; t2 = {[1] = &quot;groucho&quot;, [3] = &quot;chico&quot;, [5] = &quot;harpo&quot;} &lt;br /&gt;
&gt; t3 = {[t1[1]] = t2[1], accent = t2[3], horn = t2[5]} &lt;br /&gt;
&gt; t4 = {} &lt;br /&gt;
&gt; t4[t3] = &quot;the marx brothers&quot; &lt;br /&gt;
&gt; t5 = {characters = t2, marks = t3} &lt;br /&gt;
&gt; t6 = {[&quot;a night at the opera&quot;] = &quot;classic&quot;} &lt;br /&gt;
&gt; -- make a reference and a string &lt;br /&gt;
&gt; i = t3 &lt;br /&gt;
&gt; s = &quot;a night at the opera&quot; &lt;br /&gt;
&gt; -- indices can be any Lua value &lt;br /&gt;
&gt; print(t1[1], t4[t3], t6[s]) &lt;br /&gt;
moustache the marx brothers classic &lt;br /&gt;
&gt; -- the phrase table.string is the same as table[&quot;string&quot;] &lt;br /&gt;
&gt; print(t3.horn, t3[&quot;horn&quot;]) &lt;br /&gt;
harpo harpo &lt;br /&gt;
&gt;-- indices can also be &quot;multi-dimensional&quot; &lt;br /&gt;
&gt; print (t5[&quot;marks&quot;][&quot;horn&quot;], t5.marks.horn) &lt;br /&gt;
harpo harpo &lt;br /&gt;
&gt; -- i points to the same table as t3 &lt;br /&gt;
&gt; = t4[i] &lt;br /&gt;
the marx brothers &lt;br /&gt;
&gt; -- non-existent indices return nil values &lt;br /&gt;
&gt; print(t1[2], t2[2], t5.films) &lt;br /&gt;
nil nil nil &lt;br /&gt;
&gt; -- even a function can be a key &lt;br /&gt;
&gt; t = {} &lt;br /&gt;
&gt; function t.add(i,j) &lt;br /&gt;
&gt;&lt;br /&gt;
&gt; return(i+j) &lt;br /&gt;
&gt;&lt;br /&gt;
&gt; end &lt;br /&gt;
&gt; print(t.add(1,2)) &lt;br /&gt;
3 &lt;br /&gt;
&gt; print(t[â€™addâ€™](1,2)) &lt;br /&gt;
3 &lt;br /&gt;
&gt; -- and another variation of a function as a key &lt;br /&gt;
&gt; t = {} &lt;br /&gt;
&gt; function v(x) &lt;br /&gt;
&gt;&lt;br /&gt;
&gt; print(x) &lt;br /&gt;
&gt;&lt;br /&gt;
&gt; end &lt;br /&gt;
&gt; t[v] = &quot;The Big Store&quot; &lt;br /&gt;
&gt; for key,value in t do key(value) end &lt;br /&gt;
The Big Store&lt;br /&gt;
&lt;br /&gt;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Here&#8217;s listing one (I think):<br />
<code></p>
<p>$ lua <br />
&gt; -- create an empty table and add some elements <br />
&gt; t1 = {} <br />
&gt; t1[1] = "moustache" <br />
&gt; t1[2] = 3 <br />
&gt; t1["brothers"] = true <br />
&gt; -- more commonly, create the table and define elements all at once <br />
&gt; t2 = {[1] = "groucho", [3] = "chico", [5] = "harpo"} <br />
&gt; t3 = {[t1[1]] = t2[1], accent = t2[3], horn = t2[5]} <br />
&gt; t4 = {} <br />
&gt; t4[t3] = "the marx brothers" <br />
&gt; t5 = {characters = t2, marks = t3} <br />
&gt; t6 = {["a night at the opera"] = "classic"} <br />
&gt; -- make a reference and a string <br />
&gt; i = t3 <br />
&gt; s = "a night at the opera" <br />
&gt; -- indices can be any Lua value <br />
&gt; print(t1[1], t4[t3], t6[s]) <br />
moustache the marx brothers classic <br />
&gt; -- the phrase table.string is the same as table["string"] <br />
&gt; print(t3.horn, t3["horn"]) <br />
harpo harpo <br />
&gt;-- indices can also be "multi-dimensional" <br />
&gt; print (t5["marks"]["horn"], t5.marks.horn) <br />
harpo harpo <br />
&gt; -- i points to the same table as t3 <br />
&gt; = t4[i] <br />
the marx brothers <br />
&gt; -- non-existent indices return nil values <br />
&gt; print(t1[2], t2[2], t5.films) <br />
nil nil nil <br />
&gt; -- even a function can be a key <br />
&gt; t = {} <br />
&gt; function t.add(i,j) <br />
&gt;<br />
&gt; return(i+j) <br />
&gt;<br />
&gt; end <br />
&gt; print(t.add(1,2)) <br />
3 <br />
&gt; print(t[â€™addâ€™](1,2)) <br />
3 <br />
&gt; -- and another variation of a function as a key <br />
&gt; t = {} <br />
&gt; function v(x) <br />
&gt;<br />
&gt; print(x) <br />
&gt;<br />
&gt; end <br />
&gt; t[v] = "The Big Store" <br />
&gt; for key,value in t do key(value) end <br />
The Big Store</p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ricegf</title>
		<link>http://www.linux-mag.com/id/4678/#comment-4958</link>
		<dc:creator>ricegf</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/4678/#comment-4958</guid>
		<description>Here&#039;s listing two:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;br /&gt;
01 #include &lt;br /&gt;
02 #include &lt;br /&gt;
03 #include &lt;br /&gt;
04 #include &lt;br /&gt;
05&lt;br /&gt;
06 int main (void) {&lt;br /&gt;
07   char buff[256];&lt;br /&gt;
08   int error;&lt;br /&gt;
09   lua_State *L = lua_open(); /* opens Lua */&lt;br /&gt;
10   luaopen_base(L); /* opens the basic library */&lt;br /&gt;
11   luaopen_table(L); /* opens the table library */&lt;br /&gt;
12   luaopen_io(L); /* opens the I/O library */&lt;br /&gt;
13   luaopen_string(L); /* opens the string lib. */&lt;br /&gt;
14   luaopen_math(L); /* opens the math lib. */&lt;br /&gt;
15 &lt;br /&gt;
16   while (fgets(buff, sizeof(buff), stdin) != NULL) {&lt;br /&gt;
17     error = luaL_loadbuffer(L, buff, strlen(buff), &quot;line&quot;) &#124;&#124;&lt;br /&gt;
18     lua_pcall(L, 0, 0, 0);&lt;br /&gt;
19     if (error) {&lt;br /&gt;
20       fprintf(stderr, &quot;%s&quot;, lua_tostring(L, -1));&lt;br /&gt;
21       lua_pop(L, 1); /* pop error message from the stack */&lt;br /&gt;
22     }&lt;br /&gt;
23   }&lt;br /&gt;
24 &lt;br /&gt;
25   lua_close(L);&lt;br /&gt;
26   return 0;&lt;br /&gt;
27 }&lt;br /&gt;
&lt;br /&gt;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Here&#8217;s listing two:<br />
<code></p>
<p>01 #include <br />
02 #include <br />
03 #include <br />
04 #include <br />
05<br />
06 int main (void) {<br />
07   char buff[256];<br />
08   int error;<br />
09   lua_State *L = lua_open(); /* opens Lua */<br />
10   luaopen_base(L); /* opens the basic library */<br />
11   luaopen_table(L); /* opens the table library */<br />
12   luaopen_io(L); /* opens the I/O library */<br />
13   luaopen_string(L); /* opens the string lib. */<br />
14   luaopen_math(L); /* opens the math lib. */<br />
15 <br />
16   while (fgets(buff, sizeof(buff), stdin) != NULL) {<br />
17     error = luaL_loadbuffer(L, buff, strlen(buff), "line") ||<br />
18     lua_pcall(L, 0, 0, 0);<br />
19     if (error) {<br />
20       fprintf(stderr, "%s", lua_tostring(L, -1));<br />
21       lua_pop(L, 1); /* pop error message from the stack */<br />
22     }<br />
23   }<br />
24 <br />
25   lua_close(L);<br />
26   return 0;<br />
27 }</p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: porridge</title>
		<link>http://www.linux-mag.com/id/4678/#comment-4959</link>
		<dc:creator>porridge</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/4678/#comment-4959</guid>
		<description>heterogeneous: means that something (an object or system) consists of a diverse range of different items.&lt;br /&gt;
&lt;br /&gt;
Sounds like the author confused it with homogeneous.</description>
		<content:encoded><![CDATA[<p>heterogeneous: means that something (an object or system) consists of a diverse range of different items.</p>
<p>Sounds like the author confused it with homogeneous.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

