<?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: 5 awkward and 5 awesome things about lua &#8230;</title>
	<atom:link href="http://www.philhassey.com/blog/2010/01/29/5-awkward-and-5-awesome-things-about-lua/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.philhassey.com/blog/2010/01/29/5-awkward-and-5-awesome-things-about-lua/</link>
	<description>game dev blog</description>
	<lastBuildDate>Fri, 06 Jan 2012 23:00:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: phil hassey</title>
		<link>http://www.philhassey.com/blog/2010/01/29/5-awkward-and-5-awesome-things-about-lua/comment-page-1/#comment-22377</link>
		<dc:creator>phil hassey</dc:creator>
		<pubDate>Mon, 08 Feb 2010 20:12:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=291#comment-22377</guid>
		<description>@Denilson: &quot;Tender lovin&#039; care.&quot;</description>
		<content:encoded><![CDATA[<p>@Denilson: &#8220;Tender lovin&#8217; care.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devon Strawn</title>
		<link>http://www.philhassey.com/blog/2010/01/29/5-awkward-and-5-awesome-things-about-lua/comment-page-1/#comment-22376</link>
		<dc:creator>Devon Strawn</dc:creator>
		<pubDate>Mon, 08 Feb 2010 08:16:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=291#comment-22376</guid>
		<description>Mulling this over a bit more, I&#039;d advise you to double down on improving TinyPy rather than move your investment to Lua.  Lua doesn&#039;t seem to be getting much traction outside of the game development community, whereas Python is widely adopted.  And the momentum behind Python will continue to grow now that Google&#039;s putting resources into the language (Guido works there, and Google&#039;s built several products on Python).

Here&#039;s some real data on usage of various dynamic languages: http://www.ohloh.net/languages/compare?measure=commits&amp;percent=&amp;l0=csharp&amp;l1=javascript&amp;l2=lua&amp;l3=python&amp;l4=ruby&amp;l5=lisp&amp;l6=-1&amp;commit=Update
Lua rides the bottom of the graph, and Python beats out even JavaScript and C#.  Lua&#039;s great for embedding, but it&#039;s an idiosyncratic also-ran language.

Perhaps you could modify LuaJit (or LLVM-Lua) to work with TinyPy bytecode to improve perf?</description>
		<content:encoded><![CDATA[<p>Mulling this over a bit more, I&#8217;d advise you to double down on improving TinyPy rather than move your investment to Lua.  Lua doesn&#8217;t seem to be getting much traction outside of the game development community, whereas Python is widely adopted.  And the momentum behind Python will continue to grow now that Google&#8217;s putting resources into the language (Guido works there, and Google&#8217;s built several products on Python).</p>
<p>Here&#8217;s some real data on usage of various dynamic languages: <a href="http://www.ohloh.net/languages/compare?measure=commits&#038;percent=&#038;l0=csharp&#038;l1=javascript&#038;l2=lua&#038;l3=python&#038;l4=ruby&#038;l5=lisp&#038;l6=-1&#038;commit=Update" rel="nofollow">http://www.ohloh.net/languages/compare?measure=commits&#038;percent=&#038;l0=csharp&#038;l1=javascript&#038;l2=lua&#038;l3=python&#038;l4=ruby&#038;l5=lisp&#038;l6=-1&#038;commit=Update</a><br />
Lua rides the bottom of the graph, and Python beats out even JavaScript and C#.  Lua&#8217;s great for embedding, but it&#8217;s an idiosyncratic also-ran language.</p>
<p>Perhaps you could modify LuaJit (or LLVM-Lua) to work with TinyPy bytecode to improve perf?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denilson</title>
		<link>http://www.philhassey.com/blog/2010/01/29/5-awkward-and-5-awesome-things-about-lua/comment-page-1/#comment-22374</link>
		<dc:creator>Denilson</dc:creator>
		<pubDate>Sun, 07 Feb 2010 13:15:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=291#comment-22374</guid>
		<description>Just one question: WTF is TLC?</description>
		<content:encoded><![CDATA[<p>Just one question: WTF is TLC?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philhassey</title>
		<link>http://www.philhassey.com/blog/2010/01/29/5-awkward-and-5-awesome-things-about-lua/comment-page-1/#comment-22369</link>
		<dc:creator>philhassey</dc:creator>
		<pubDate>Thu, 04 Feb 2010 16:54:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=291#comment-22369</guid>
		<description>@brm - I don&#039;t use -lgc, I use a hand rolled incremental collector, which could also use some work.

Thanks for the thoughts!</description>
		<content:encoded><![CDATA[<p>@brm &#8211; I don&#8217;t use -lgc, I use a hand rolled incremental collector, which could also use some work.</p>
<p>Thanks for the thoughts!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brm</title>
		<link>http://www.philhassey.com/blog/2010/01/29/5-awkward-and-5-awesome-things-about-lua/comment-page-1/#comment-22368</link>
		<dc:creator>brm</dc:creator>
		<pubDate>Thu, 04 Feb 2010 10:34:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=291#comment-22368</guid>
		<description>first, try to avoid on hacking bare lua parser, i did that, got my hands burnt. it&#039;s easy but all you&#039;ll end up is no-lua anymore with all the bad strings attached (unknown to users). this can be solved nicely by using http://metalua.luaforge.net so you use whatever syntax you&#039;re comfortable with, while the users are left with a choice whether to use plain lua or your mod (the index 1 tables are still a neccesity for common co-op though).

second, why is tinypy slower? from superficial look at the code it seems to it&#039;s rather luasqe (internalized strings, ssa-like register vm, tuples are pretty much heavier than lua&#039;s stack arg passing, consts are inline though..), save for bloated -lgc which is probably a real performance hit. imho hacking tinypy to be more like luavm would be the way to go (also, having OO implemented on top of syntax/codegen, rather than vm would probably help) i suppose you&#039;re familiar with the http://www.lua.org/doc/jucs05.pdf</description>
		<content:encoded><![CDATA[<p>first, try to avoid on hacking bare lua parser, i did that, got my hands burnt. it&#8217;s easy but all you&#8217;ll end up is no-lua anymore with all the bad strings attached (unknown to users). this can be solved nicely by using <a href="http://metalua.luaforge.net" rel="nofollow">http://metalua.luaforge.net</a> so you use whatever syntax you&#8217;re comfortable with, while the users are left with a choice whether to use plain lua or your mod (the index 1 tables are still a neccesity for common co-op though).</p>
<p>second, why is tinypy slower? from superficial look at the code it seems to it&#8217;s rather luasqe (internalized strings, ssa-like register vm, tuples are pretty much heavier than lua&#8217;s stack arg passing, consts are inline though..), save for bloated -lgc which is probably a real performance hit. imho hacking tinypy to be more like luavm would be the way to go (also, having OO implemented on top of syntax/codegen, rather than vm would probably help) i suppose you&#8217;re familiar with the <a href="http://www.lua.org/doc/jucs05.pdf" rel="nofollow">http://www.lua.org/doc/jucs05.pdf</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devon Strawn</title>
		<link>http://www.philhassey.com/blog/2010/01/29/5-awkward-and-5-awesome-things-about-lua/comment-page-1/#comment-22363</link>
		<dc:creator>Devon Strawn</dc:creator>
		<pubDate>Tue, 02 Feb 2010 06:20:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=291#comment-22363</guid>
		<description>Lua&#039;s awkward bits make it annoying for real-world use.  Python&#039;s not perfect, but it&#039;s *more perfect* than Lua by far.

Your time might be better spent optimizing TinyPy than forking Lua.</description>
		<content:encoded><![CDATA[<p>Lua&#8217;s awkward bits make it annoying for real-world use.  Python&#8217;s not perfect, but it&#8217;s *more perfect* than Lua by far.</p>
<p>Your time might be better spent optimizing TinyPy than forking Lua.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.philhassey.com/blog/2010/01/29/5-awkward-and-5-awesome-things-about-lua/comment-page-1/#comment-22362</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sun, 31 Jan 2010 23:09:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=291#comment-22362</guid>
		<description>You might get more people helping with tinypy if you made a busybox module for it.</description>
		<content:encoded><![CDATA[<p>You might get more people helping with tinypy if you made a busybox module for it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Niki</title>
		<link>http://www.philhassey.com/blog/2010/01/29/5-awkward-and-5-awesome-things-about-lua/comment-page-1/#comment-22361</link>
		<dc:creator>Niki</dc:creator>
		<pubDate>Sun, 31 Jan 2010 17:35:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=291#comment-22361</guid>
		<description>point 1 is very important. After years of using 1 based indexing in Pascal and fighting with extra +1 and -1 on many places i am confident that 0 based indexing is the only save way.</description>
		<content:encoded><![CDATA[<p>point 1 is very important. After years of using 1 based indexing in Pascal and fighting with extra +1 and -1 on many places i am confident that 0 based indexing is the only save way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam H</title>
		<link>http://www.philhassey.com/blog/2010/01/29/5-awkward-and-5-awesome-things-about-lua/comment-page-1/#comment-22360</link>
		<dc:creator>Adam H</dc:creator>
		<pubDate>Sat, 30 Jan 2010 19:12:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=291#comment-22360</guid>
		<description>One quick note: Lua uses identical syntax for arrays and dictionary, but if you use a table as if it were an array, internally it stores it as an array. I worked this out when I got curious and dug into their handling code a little bit. So if your discomfort is caused by &quot;storing arrays as hash tables is inefficient,&quot; then be aware that Lua does NOT store arrays as hash tables. It just uses the same syntax for both, and does not make a type distinction between the two.

Note also that there is another difference -- arrays have a magic member named &quot;n&quot; which gives the size of the array, but it only works on true arrays. Hash tables don&#039;t keep count of their contents, so you either have to do that yourself (update &#039;n&#039; on your own) or do without it.

If you start using an array as a hash table, of course, it converts it into a hash table.</description>
		<content:encoded><![CDATA[<p>One quick note: Lua uses identical syntax for arrays and dictionary, but if you use a table as if it were an array, internally it stores it as an array. I worked this out when I got curious and dug into their handling code a little bit. So if your discomfort is caused by &#8220;storing arrays as hash tables is inefficient,&#8221; then be aware that Lua does NOT store arrays as hash tables. It just uses the same syntax for both, and does not make a type distinction between the two.</p>
<p>Note also that there is another difference &#8212; arrays have a magic member named &#8220;n&#8221; which gives the size of the array, but it only works on true arrays. Hash tables don&#8217;t keep count of their contents, so you either have to do that yourself (update &#8216;n&#8217; on your own) or do without it.</p>
<p>If you start using an array as a hash table, of course, it converts it into a hash table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phil hassey</title>
		<link>http://www.philhassey.com/blog/2010/01/29/5-awkward-and-5-awesome-things-about-lua/comment-page-1/#comment-22359</link>
		<dc:creator>phil hassey</dc:creator>
		<pubDate>Sat, 30 Jan 2010 17:22:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=291#comment-22359</guid>
		<description>@sopyer - I&#039;ll check out squirrel!

@Eli - yeah, tinypy is pretty slow, doesn&#039;t handle exceptions well, and a few other things.  Maybe I should put more work into it.  At any rate, I&#039;m considering my options.

@carl - A few brief tests.  It&#039;s not enormously faster than python, so it&#039;s not a major thing.  

@tonic - I&#039;ll check that language out too.</description>
		<content:encoded><![CDATA[<p>@sopyer &#8211; I&#8217;ll check out squirrel!</p>
<p>@Eli &#8211; yeah, tinypy is pretty slow, doesn&#8217;t handle exceptions well, and a few other things.  Maybe I should put more work into it.  At any rate, I&#8217;m considering my options.</p>
<p>@carl &#8211; A few brief tests.  It&#8217;s not enormously faster than python, so it&#8217;s not a major thing.  </p>
<p>@tonic &#8211; I&#8217;ll check that language out too.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

