{"id":291,"date":"2010-01-29T14:33:37","date_gmt":"2010-01-29T20:33:37","guid":{"rendered":"http:\/\/www.philhassey.com\/blog\/?p=291"},"modified":"2010-01-29T14:33:37","modified_gmt":"2010-01-29T20:33:37","slug":"5-awkward-and-5-awesome-things-about-lua","status":"publish","type":"post","link":"https:\/\/www.philhassey.com\/blog\/2010\/01\/29\/5-awkward-and-5-awesome-things-about-lua\/","title":{"rendered":"5 awkward and 5 awesome things about lua &#8230;"},"content":{"rendered":"<p>Hey,<\/p>\n<p>I&#8217;ve been spending some time checking out lua, because I&#8217;m thinking about using it for scripting in games. \u00a0I&#8217;m looking at it instead of tinypy because tinypy is slow and really needs some more TLC to be totally useful to me. \u00a0However, after looking at lua for a while, I&#8217;m finding the things that make it feel awkward to me.<\/p>\n<ol>\n<li>List indexes starting at 1.<\/li>\n<li>For loops use [a,b] intervals<\/li>\n<li>No += operator.<\/li>\n<li>do \/ end keywords instead of { }<\/li>\n<li>List and Dict types combined into one<\/li>\n<\/ol>\n<p>At the same time, I&#8217;ve found that lua is totally awesome. \u00a0I mean, wow. \u00a0Really slick stuff! \u00a0Here&#8217;s 5 awesome things:<\/p>\n<ol>\n<li>Small codebase<\/li>\n<li>Faster than other dynamic languages<\/li>\n<li>Easy API integration<\/li>\n<li>Coroutines &lt;- these are neat!<\/li>\n<li>State is serializable<\/li>\n<\/ol>\n<p>So here are my thoughts:<\/p>\n<ul>\n<li>The first 4 awkward things are superficial, I could probably hack those into shape in a day or two. \u00a0The 5th item (List + Dict) as one item is probably not something I can fix, but I could probably live with it.<\/li>\n<li>If I changed the language like that, and provided it for users to create mods for my games I would not be able to give them a link to the lua documentation, since it would not be accurate anymore.<\/li>\n<\/ul>\n<p>Not quite sure what to do here. \u00a0Lua seems great, though a few language design decisions seem awkward to me. \u00a0I could change the language easily enough, but then I would be breaking all the lua documentation for my users.<\/p>\n<p>Anyone got some language-design thoughts on this one?<\/p>\n<p>-Phil<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey, I&#8217;ve been spending some time checking out lua, because I&#8217;m thinking about using it for scripting in games. \u00a0I&#8217;m looking at it instead of tinypy because tinypy is slow and really needs some more TLC to be totally useful to me. \u00a0However, after looking at lua for a while, I&#8217;m finding the things that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,8,2],"tags":[],"class_list":["post-291","post","type-post","status-publish","format-standard","hentry","category-development","category-languages","category-python"],"_links":{"self":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/comments?post=291"}],"version-history":[{"count":1,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/291\/revisions"}],"predecessor-version":[{"id":292,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/291\/revisions\/292"}],"wp:attachment":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/media?parent=291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/categories?post=291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/tags?post=291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}