<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>lua — jd:/dev/blog</title><description>Posts tagged &quot;lua&quot; on jd:/dev/blog.</description><link>https://julien.danjou.info/</link><item><title>FOSDEM 2016, recap</title><link>https://julien.danjou.info/blog/fosdem-2016-recap/</link><guid isPermaLink="true">https://julien.danjou.info/blog/fosdem-2016-recap/</guid><description>Last week-end, I was in Brussels, Belgium for the FOSDEM, one of the greatest open source developer conference.</description><pubDate>Sat, 06 Feb 2016 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Last week-end, I was in Brussels, Belgium for the &lt;a href=&quot;http://fosdem.org&quot;&gt;FOSDEM&lt;/a&gt;, one of the greatest open source developer conference. I was not sure to go there this year (I already skipped it in 2015), but it turned out I was requested to do a talk in the shared &lt;a href=&quot;https://fosdem.org/2016/schedule/track/lua/&quot;&gt;Lua&lt;/a&gt; &amp;amp; &lt;a href=&quot;https://fosdem.org/2016/schedule/track/gnu_guile/&quot;&gt;GNU Guile&lt;/a&gt; devroom.&lt;/p&gt;
&lt;p&gt;As a long time &lt;a href=&quot;http://lua.org&quot;&gt;Lua&lt;/a&gt; user and developer, and a follower of &lt;a href=&quot;http://www.gnu.org/software/guile/&quot;&gt;GNU Guile&lt;/a&gt; for several years, the organizer asked me to run a talk that would be a link between the two languages.&lt;/p&gt;
&lt;p&gt;I&apos;ve entitled my talk &quot;How awesome ended up with Lua and not Guile&quot; and gave it to a room full of interested users of the awesome window manager 🙂.&lt;/p&gt;
&lt;p&gt;We continued with a panel discussion entitled &quot;&lt;a href=&quot;https://fosdem.org/2016/schedule/event/future_guile_lua/&quot;&gt;The future of small languages Experience of Lua and Guile&lt;/a&gt;&quot; composed of Andy Wingo, Christopher Webber, Ludovic Courtès, Etiene Dalcol, Hisham Muhammaad and myself. It was a pretty interesting discussion, where both language shared their views on the state of their languages.&lt;/p&gt;
&lt;p&gt;It was a bit awkward to talk about Lua &amp;amp; Guile whereas most of my knowledge was years old, but it turns out many things didn&apos;t change. I hope I was able to provide interesting hindsight to both community. Finally, it was a pretty interesting FOSDEM to me, and it was a long time I didn&apos;t give talk here, so I really enjoyed it. See you next year!&lt;/p&gt;
</content:encoded><category>talks</category><category>awesome</category><category>lua</category><category>lisp</category></item><item><title>Why not Lua</title><link>https://julien.danjou.info/blog/why-not-lua/</link><guid isPermaLink="true">https://julien.danjou.info/blog/why-not-lua/</guid><description>Since my latest announcement of the Lua workshop, I received a couple of emails asking why I discourage the use of Lua.</description><pubDate>Tue, 26 Apr 2011 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Since my latest announcement of the &lt;a href=&quot;https://julien.danjou.info/blog/lua-workshop-at-fabelier-tmplab&quot;&gt;Lua workshop&lt;/a&gt;, I received a couple of emails asking why I discourage the use of &lt;a href=&quot;http://lua.org&quot;&gt;Lua&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Actually, I already wrote out many of &lt;a href=&quot;https://julien.danjou.info/blog/rants-about-lua&quot;&gt;the things I dislike about Lua&lt;/a&gt;. I won&apos;t come back on this technical issues here, but since Lua 5.2 is not yet released (it&apos;s still at alpha stage), they are still relevant nowadays.&lt;/p&gt;
&lt;h2&gt;Stack based API is harder&lt;/h2&gt;
&lt;p&gt;The ease of integration of Lua into a C program is one of the point of Lua. They claim it&apos;s very easy to integrate Lua into your C application, because it does not use pointer, nor reference counting, nor anything that requires a minimum amount of skills to be used.&lt;/p&gt;
&lt;p&gt;It uses a virtual stack based approach. You push or pop things on a stack, and refers to them using a relative or absolute index.&lt;/p&gt;
&lt;p&gt;In order to people who never wrote Lua code to understand, here&apos;s a quick example on how this work. The &lt;em&gt;L&lt;/em&gt; pointer is a Lua environment.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/* Create a table on the stack: index 1 */
lua_newtable(L);
/* Push a string on the stack: index 2 */
lua_pushstring(L, &quot;hello&quot;);
/* Push a number on the stack: index 3 */
lua_pushnumber(L, 123);
/* Set newtable[&quot;hello&quot;] = 123 */
lua_settable(L, -3);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You first push a table (in Lua, a table is almost equivalent to what you&apos;d call a hash table in other language), then push the key, the value, and do the assignment operation. In the settable, we use -3 as index, meaning the &quot;3rd item on the stack counting from top&quot;. We could also have written &lt;em&gt;lua_settable(L, 1)&lt;/em&gt;, since the table is also the first item on the stack from the bottom.&lt;/p&gt;
&lt;p&gt;So far, so good.&lt;/p&gt;
&lt;p&gt;Problems arise when you do more complicated stuff. My previous example is what you would typically find in a tutorial, but of course, real life is different, and usually more complex. If you cut the things in different parts, it can start to be more complicated.&lt;/p&gt;
&lt;p&gt;Let&apos;s take a look at the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/* Create a table on the stack: index 1 */
lua_newtable(L);
/* Push a string on the stack: index 2 */
lua_pushstring(L, &quot;hello&quot;);
/* Push a number on the stack: index 3 */
lua_pushnumbe(L, mycomputingfunction());
/* Set newtable[&quot;hello&quot;] = 123 */
lua_settable(L, -3);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here, we do exactly the same thing, but we do not push &lt;em&gt;123&lt;/em&gt; directly: we compute it.&lt;/p&gt;
&lt;p&gt;And here&apos;s the trick: if your computing function is also using the Lua stack, things can become &lt;em&gt;very&lt;/em&gt; messy. As long as your computing function use the stack cleanly by pushing and poping all its item, and returning the stack &lt;strong&gt;in the same state it was before&lt;/strong&gt;, you&apos;re safe. The problem is that in a complex program, you also write bugs. You do not chose to, but you do. And sometimes, you forget to pop one of the item you fetched from a table.&lt;/p&gt;
&lt;p&gt;Imagine that &lt;em&gt;mycomputingfunction&lt;/em&gt; is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;int
mycomputingfunctiong(void)
{
  /* Just push the table we want to fetch
     the number from on the stack */
  pushatableonstack(L);
  lua_pushstring(L, &quot;mykey&quot;);
  lua_gettable(L, -2);
  return lua_tonumber(L, -1);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This function works perfectly. It pushes a table, then a key (&lt;em&gt;&quot;mykey&quot;&lt;/em&gt;), then fetches mytable[&quot;mykey&quot;] and pops the key (lua_gettable does push value/pop key itself), and then returns the numeric value of the last item (the fetched one) of the stack.&lt;/p&gt;
&lt;p&gt;However, this function has a bug: it does not pop the table! This does not prevent the function to work. It does not raise a segmentation fault. It does not show any problem under &lt;a href=&quot;http://www.gnu.org/software/gdb/&quot;&gt;gdb&lt;/a&gt;. It does not show any leak under &lt;a href=&quot;http://valgrind.org/&quot;&gt;Valgrind&lt;/a&gt;. It does now show any problem under &lt;strong&gt;any standard C debugging tool&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;But when you&apos;ll start using it, your program will start to do weird things, and you&apos;ll have to spend a huge amount of time debugging it manually, dumping the stack content at each step of your program to watch out what&apos;s wrong.&lt;/p&gt;
&lt;p&gt;Another bad thing, that can happen, is some code poping accidentally an item from the stack, or worst, from an empty stack. This does not raise any error on the Lua side, but will break your program in very unfunny way.&lt;/p&gt;
&lt;p&gt;Even if I&apos;ve been very meticulous writing &lt;a href=&quot;http://awesome.naquadah.org&quot;&gt;awesome&lt;/a&gt;, but we hit that problem regularly.&lt;/p&gt;
&lt;p&gt;The easiest workaround is to use &lt;em&gt;lua_settop(L, 0)&lt;/em&gt; to reset the stack to 0 element. Doing this regularly (like after each program event or treatment) can remove left-over items and avoid the never ending stack grow you may experience if your left-over items continue to pile up. Did I tell you I dislike work-around?&lt;/p&gt;
&lt;p&gt;You could also use &lt;em&gt;lua_call()&lt;/em&gt;, which would avoid such an error, but this would require a huge amount of indirection, and would make write more (useless) code.&lt;/p&gt;
&lt;p&gt;This kind of problem does not exists with pointer based API. If you screw things up, the problem will cause a segmentation fault or leak memory, or cause things you can (easily) debug with standard tools like gdb or Valgrind.&lt;/p&gt;
&lt;h2&gt;No reference counting is a pain&lt;/h2&gt;
&lt;p&gt;Userdata objects are variable Lua size objects embedding a C struct you define. It&apos;s the equivalent of an object in object oriented language.&lt;/p&gt;
&lt;p&gt;Lua does not provide any reference counting for the userdata objects. That means you can push this objects on the stack, use them, but they cannot directly reference each others. If you have a &quot;car&quot; userdata and a &quot;wheel&quot; one, the car cannot hold directly a reference to the wheel. This is not possible because userdata are allocated and garbage collected by Lua, and there&apos;s no way to increase the reference counting yourself.&lt;/p&gt;
&lt;p&gt;So the common hack is to store the wheel into a table as a value, and store&lt;br /&gt;
the table index as an integer into the car data structure.&lt;/p&gt;
&lt;p&gt;This obviously makes memory leaks tracking harder, add huge level of reference indirection in usage (still more code), and does not make the whole process less error prone (at least in my opinion).&lt;/p&gt;
&lt;h2&gt;No paradigm makes you lose time&lt;/h2&gt;
&lt;p&gt;Lua is proud to come with no paradigm and to provide metatables. &lt;a href=&quot;https://julien.danjou.info/blog/rants-about-lua&quot;&gt;I already showed 3 years ago that it has big flaws&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To me, this ain&apos;t no good. Lua is not functional, nor it is object oriented.&lt;/p&gt;
&lt;p&gt;Most people, including me, want one of this paradigm, or any else. Plain old imperative is not enough.&lt;/p&gt;
&lt;p&gt;So you&apos;ll start to build more, or to use something like &lt;a href=&quot;http://loop.luaforge.net/&quot;&gt;LOOP&lt;/a&gt;, which implements an object model. You&apos;ll implement your paradigm. I say life is too short to (re)write a paradigm.&lt;/p&gt;
&lt;p&gt;In &lt;a href=&quot;http://awesome.naquadah.org&quot;&gt;awesome&lt;/a&gt; we wanted to have an object oriented approach (this is kind of typical in such a graphical application context), so we tried to build one.&lt;br /&gt;
To me, this started to be a show stopper when I realized that I&apos;ve ended writing Python object model into Lua while developing &lt;em&gt;awesome (which aims to be a window manager, not a language)&lt;/em&gt;. This is one of the reason I stopped hacking on Lua things.&lt;/p&gt;
&lt;p&gt;I liked Python object model and wanted to have it in Lua, and spending time rewriting Python is just not worth it. I probably should have chose Python, not Lua. YMMV.&lt;/p&gt;
&lt;h2&gt;Embedding may not be a good choice&lt;/h2&gt;
&lt;p&gt;This is not Lua related, but I want to mention it. Googling for &quot;&lt;a href=&quot;http://www.google.fr/search?q=embedding+vs+extending&quot;&gt;embedding vs extending&lt;/a&gt;&quot; will probably tell you more about why you should double check that you really need to embed Lua rather than to extend it.&lt;/p&gt;
&lt;h2&gt;Being small is not an excuse&lt;/h2&gt;
&lt;p&gt;One common argument to choose Lua is that it has a small footprint. Yeah, that&apos;s true, but that&apos;s useless. Bummer! When I program, I don&apos;t have any resource usage pressure. People who have such pressure are either paranoids or playing in the world of embedded computers. This is also a no more existing conception since quad core processors equiped phones are coming into the market. I&apos;m rather confident that what we used to call embedded devices are just dead and are now plain computers. But as usual, YMMV.&lt;/p&gt;
&lt;p&gt;So start to forget about it, run in your underpants and yelling &quot;yay we killed that shit!&quot;, and then use real computers stuff. :-)&lt;/p&gt;
&lt;p&gt;Even &lt;a href=&quot;http://shootout.alioth.debian.org/u32/lua.php&quot;&gt;if benchmarks show how Lua is damn fast&lt;/a&gt;, remember what a benchmark proves: that you can do useless things very fast.&lt;/p&gt;
&lt;h2&gt;Too few extension modules&lt;/h2&gt;
&lt;p&gt;This is not directly Lua&apos;s fault, but there&apos;s too few extension modules for Lua. The community is quite small compared to other big languages&apos; ones.&lt;/p&gt;
&lt;h2&gt;So think twice&lt;/h2&gt;
&lt;p&gt;before you choose Lua (or any other language). My recommendations these days would be not to embed, but to extend. If you really have no choice and need to embed a language into your application, &lt;a href=&quot;http://www.gnu.org/s/guile/&quot;&gt;GNU Guile&lt;/a&gt; is probably worth considering, because it&apos;s a Scheme and therefore a functional language :-), and because it can provides also different languages.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://git.savannah.gnu.org/gitweb/?p=guile.git;a=shortlog;h=refs/heads/lua&quot;&gt;Including Lua&lt;/a&gt;.&lt;/p&gt;
</content:encoded><category>lua</category></item><item><title>Lua workshop at Fabelier/tmplab</title><link>https://julien.danjou.info/blog/lua-workshop-at-fabelier-tmplab/</link><guid isPermaLink="true">https://julien.danjou.info/blog/lua-workshop-at-fabelier-tmplab/</guid><description>It seems I&apos;ll be at the Lua workshop at Fabelier/tmplab on April 28th 2011, where I&apos;ll try to present and talk about Lua, how to use it, and why you should probably not use it. ;-)</description><pubDate>Thu, 14 Apr 2011 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;It seems I&apos;ll be at the &lt;a href=&quot;http://fabelier.org/lua-programming-language-by-julien-danjou/&quot;&gt;Lua workshop at Fabelier/tmplab&lt;/a&gt; on April 28th 2011, where I&apos;ll try to present and talk about &lt;a href=&quot;http://lua.org&quot;&gt;Lua&lt;/a&gt;, how to use it, and why you should probably not use it. ;-)&lt;/p&gt;
</content:encoded><category>lua</category><category>talks</category></item><item><title>Various news: what happend during summer</title><link>https://julien.danjou.info/blog/various-news/</link><guid isPermaLink="true">https://julien.danjou.info/blog/various-news/</guid><description>It&apos;s been a while since I blogged about something. So here&apos;s a bunch of things I&apos;ve done the last month.  Holidays Well, I&apos;ve been in holidays one week. :-P  awesome There have been a huge number of c</description><pubDate>Tue, 22 Sep 2009 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;It&apos;s been a while since I blogged about something. So here&apos;s a bunch of things I&apos;ve done the last month.&lt;/p&gt;
&lt;h2&gt;Holidays&lt;/h2&gt;
&lt;p&gt;Well, I&apos;ve been in holidays one week. :-P&lt;/p&gt;
&lt;h2&gt;awesome&lt;/h2&gt;
&lt;p&gt;There have been a huge number of changes between 3.3 (released in June) and 3.4 (almost relesed). I wrote a small but very useful object layer on top of Lua, which adds a class/object system a bit like &lt;a href=&quot;http://www.gtk.org&quot;&gt;gobject&lt;/a&gt;. I&apos;ve also replaced all the hooks by per-class/object signals. Finally, the awesome Lua basement are cleaner than they were before, and the extendability is improved. How nice.&lt;/p&gt;
&lt;p&gt;We&apos;re trying to release 3.4 (rc2 should be out soon), but the development pace is a bit slower than a year before. We&apos;re basically almost 2 months late on what was our previous release rate. Not a big deal however.&lt;/p&gt;
&lt;p&gt;I&apos;ve started working on 3.5 slowly. It gonna get amazing new features too. :-)&lt;/p&gt;
&lt;h2&gt;Google Summer Of Code 2009&lt;/h2&gt;
&lt;p&gt;I&apos;ve mentored Mariusz Ceier on &lt;a href=&quot;http://xcb.freedesktop.org&quot;&gt;XCB&lt;/a&gt; GSoC. He worked on adding Xinput2 and XKB extensions. And he managed to do this. His work should be imported ASAP, the discussion has started on XCB maling list last week.&lt;/p&gt;
&lt;p&gt;In exchange, Google offered me (and to every mentor) an awful blue t-shirt! Thanks Google! :-P&lt;/p&gt;
</content:encoded><category>awesome</category><category>lua</category><category>x11</category></item><item><title>Rants about Lua</title><link>https://julien.danjou.info/blog/rants-about-lua/</link><guid isPermaLink="true">https://julien.danjou.info/blog/rants-about-lua/</guid><description>I&apos;ve started using Lua some months ago, while looking for a more powerful way to configure awesome. At this time, around March 2008, Lua seemed to be the best language to integrate inside the core.</description><pubDate>Tue, 30 Dec 2008 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I&apos;ve started using &lt;a href=&quot;http://www.lua.org&quot;&gt;Lua&lt;/a&gt; some months ago, while looking for a more powerful way to configure &lt;a href=&quot;http://awesome.naquadah.org&quot;&gt;awesome&lt;/a&gt;. At this time, around March 2008, Lua seemed to be the best language to integrate inside the core system of &lt;em&gt;awesome&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I still think that Lua was a good choice, but after 8 months, it shows some important drawbacks.&lt;/p&gt;
&lt;p&gt;I&apos;ll try to keep my explanation simple and to make you understand everything, even if you do not know Lua.&lt;/p&gt;
&lt;p&gt;I refer here to Lua version 5.1.&lt;/p&gt;
&lt;h2&gt;Design flaws&lt;/h2&gt;
&lt;h3&gt;Length operator&lt;/h3&gt;
&lt;p&gt;Lua has a length operator on its objects, known as &lt;code&gt;#&lt;/code&gt;. It can be used to get the size of various objects.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; return #&quot;lol&quot;
&amp;gt; 3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This operator works for table, string, etc… It&apos;s possible to define this operator by setting a &lt;code&gt;__len&lt;/code&gt; meta-method on a userdata value.&lt;/p&gt;
&lt;p&gt;The problem is that you cannot redefine it on string or table objects, see:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; a = { &quot;hello&quot;, &quot;world&quot; }
&amp;gt; return #a
2
&amp;gt; setmetatable(a, { __len = function () return 18 end })
&amp;gt; return #a
2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Indeed, looking at the Lua core code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;      case OP_LEN: {
        const TValue *rb = RB(i);
        switch (ttype(rb)) {
          case LUA_TTABLE: {
            setnvalue(ra, cast_num(luaH_getn(hvalue(rb))));
            break;
          }
          case LUA_TSTRING: {
            setnvalue(ra, cast_num(tsvalue(rb)-&amp;gt;len));
            break;
          }
          default: {  /* try metamethod */
            Protect(
              if (!call_binTM(L, rb, luaO_nilobject, ra, TM_LEN))
                luaG_typeerror(L, rb, &quot;get length of&quot;);
            )
          }
        }
        continue;
      }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You clearly see that tables and strings always use the internal length operator, never the &lt;code&gt;__len&lt;/code&gt; meta-method.&lt;/p&gt;
&lt;p&gt;That&apos;s for me a design problem, which will cause more trouble. We&apos;ll see later.&lt;/p&gt;
&lt;h3&gt;index and newindex metamethods&lt;/h3&gt;
&lt;p&gt;Lua defines two useful meta-methods, which are &lt;code&gt;__index&lt;/code&gt; and &lt;code&gt;__newindex&lt;/code&gt;. Both can be set on a table or any other object. &lt;code&gt;__index&lt;/code&gt; will be called upon each read access to an undefined key on an object, and &lt;code&gt;__newindex&lt;/code&gt; upon each write access.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; a = {}
&amp;gt; -- function are not defined, this is just an example
&amp;gt; setmetatable(a, { __index = myindexfunction, __newindex = mynewindexfunction })
&amp;gt; a[1] = &quot;hello&quot; -- This will call __newindex metamethod
&amp;gt; return a[2] -- This will call __index metamethods
&amp;gt; return a[1] -- This will NOT call __index
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The last line does not call &lt;code&gt;__index&lt;/code&gt; meta-method because &lt;code&gt;a[1]&lt;/code&gt; does exists. This is a problem when you want to use table as object, because sometimes you want to monitor access to the table elements.&lt;/p&gt;
&lt;p&gt;This can be easily worked around using a proxy system: you don&apos;t store&lt;br /&gt;
things in the table you manipulate, but in another table.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; a = {}
&amp;gt; realtable = {}
&amp;gt; -- function are not defined, this is just an example:
&amp;gt; setmetatable(a, { __index = myindexfunction, __newindex = mynewindexfunction })
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Where meta-methods are something like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function myindexfunction(table, key)
   return realtable[key]
end

function mynewindexfunction(table, key, value)
   realtable[key] = value
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This way, our &lt;code&gt;a&lt;/code&gt; table will always be empty, and &lt;code&gt;realtable&lt;/code&gt; will have the data. At every read or write access to &lt;code&gt;a&lt;/code&gt;, the meta-methods will be called. This is very convenient and widely used hack.&lt;/p&gt;
&lt;p&gt;But this has serious drawbacks: as we saw before, the length operator (&lt;code&gt;#&lt;/code&gt;) cannot be redefined on a table. That means &lt;code&gt;#a&lt;/code&gt; will always be &lt;code&gt;0&lt;/code&gt;, and you cannot get the table length anymore, except by defining another method or a special attribute.&lt;/p&gt;
&lt;p&gt;Also, Lua has several functions in the &lt;em&gt;table&lt;/em&gt; library that are used to manipulate table in a easy way. The problem is that standard functions like &lt;code&gt;table.insert&lt;/code&gt; or &lt;code&gt;table.remove&lt;/code&gt; do raw accesses to the table. Meaning that if you do &lt;code&gt;table.insert(a, 1, 1)&lt;/code&gt; it will insert the value 1 at the key 1 into &lt;em&gt;a&lt;/em&gt;, &lt;strong&gt;without&lt;/strong&gt; calling the &lt;code&gt;__newindex&lt;/code&gt; meta-methods, breaking all your beautiful object-oriented model.&lt;/p&gt;
&lt;p&gt;Another solution is to use a userdata object, like done in the Lua &lt;code&gt;newproxy&lt;/code&gt; function (which is under-documented).&lt;/p&gt;
&lt;p&gt;The problem is that it breaks all the other functions that are waiting for a table as argument, because they see a userdata, not a table. So this time &lt;code&gt;table.insert&lt;/code&gt; is now more usable, which somehow fixes the problem, but not in the right way IMHO. However, this allows to use the &lt;code&gt;__len&lt;/code&gt; meta-method.&lt;/p&gt;
&lt;h2&gt;Development model&lt;/h2&gt;
&lt;p&gt;The development model of Lua is, from my point of view, non-existent.&lt;/p&gt;
&lt;p&gt;There is no public version control system repository available, so there&apos;s no chance to really contribute to Lua. It seems only a defined set of people work on it and therefore, the development system is very closed to my eyes, in comparison of usual projects.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I still think Lua is a good choice, because it is very easy to integrate into any C program, and to expand to fulfill your needs. However, some bad design choices were made, and the poor and closed development model chosen does not allow to have a good overview of the future of Lua.&lt;/p&gt;
&lt;p&gt;This has been &lt;a href=&quot;http://lua-users.org/lists/lua-l/2008-06/msg00407.html&quot;&gt;well stated by the authors themselves&lt;/a&gt;.&lt;/p&gt;
</content:encoded><category>lua</category></item></channel></rss>