Lua News

lua-users home
wiki

A summary of the latest happenings on the Lua mail list and elsewhere in the Lua world. For other news, see also [lua.org News], [LuaForge news], [SWiK: Lua], [Lua Bugs]/[Errata], wiki RecentChanges, and [lua-l archive].

STATUS: Help is needed to add entries to this page (see bottom of page). Some recent news items are missing.


[Lua on Twitter]

(2008-12-14) ANNOUNCE: Lua Programming Gems book [1][2] published, announced by Luiz Henrique de Figueiredo. [68]

(2008-12-12) ANNOUNCE: LuaDist [3], a variant of LuaRocks, announced by Peter Drahos. [69]

(2008-12-02) TOPIC: compiling Lua with Alchemy for use under ActionScript? (Flash) [70], posted by Robert Stehwien.

(2008-11-17) ANNOUNCE: Mochalua [4], a Java J2ME port of the Lua runtime and API, announced by Patrick Meehan. [71]

(2008-11-13) ANNOUNCE: LuCI Project [5], collection of Lua software for embedded devices / web, announced by Steven Barth [72]

(2008-11-12) ANNOUNCE: complex number operation library (based on C99) [6] announced by Luiz Henrique de Figueiredo. [73]

[missing entries]

(2008-05-xx) ANNOUNCE: Lua for Windows [7], a Lua scripting environment for Windows, with installer, Lua Binaries, many Lua libraries, and documentation, announced by Ryan Pusztai [74][75][76][77][78]

[missing entries]

(2008-05-07) ANNOUNCE: patch-lua-5.1.3, a patch file fixing all known [bugs] in Lua 5.1.3 posted by LuizHenriqueDeFigueiredo.[79]

[missing entries]

(2008-02-19) TOPIC: Initial list of upcoming changes in Lua 5.2 [80] posted by Roberto Ierusalimschy.

(2008-02-18) TOPIC: Nanoki and Sputnik wiki demos [81][8] posted by Petite Abeille and Yuri Takhteyev. There were long discussions of moving the lua-users.org wiki to one of these Lua implementations.

(2008-02-11) BUG: LUAI_MAXCSTACK must be smaller than -LUA_REGISTRYINDEX reported by Patrick Donnelly [82][9]

(2008-02-11) BUG: coroutine.resume pushes element without ensuring stack size noted by Roberto Ierusalimschy [83][9]

(2008-02-09) ANNOUNCE: LuaRocks 0.4.2 [10], deployment and management system for Lua modules, announced by Hisham Muhammad [84]. LuaRocks has similar goals as Perl CPAN [11] or RubyGems [12].

(2008-02-06) ANNOUNCE: Metalua 0.4 [13], a language and compiler that extends Lua with compile-time metaprogramming, released by FabienFleutot. [14] Metalua allows syntax extensions in a consistent framework. There is also a new wiki page on this project: MetaLua.

(2008-02-05) ANNOUNCE: LuaJIT 1.1.4 [15], a Just-In-Time Compiler for Lua, and a Roadmap for LuaJIT 2.0 [85] released by MikePall. [86] LuaJIT 1.1.4 updates against Lua 5.1.3. LuaJIT provides higher performance on x86/IA-32 CPUs. Coco 1.1.4, a Lua extension for True C Coroutines, was also updated.

[missing entries]

(2008-02-02) PATCH: new table scope support (TableScope) in lvm.c posted by DavidManura. [87]

[missing entries]

(2008-01-31) PATCH: for try/catch/finally support posted by Hu Qiwei [88][89][90]. return and break are prohibited in the try block.

(2008-01-07) PATCH: finalization of objects posted by Nodir Temirhodzhaev. [91] This is an alternative to the above "try/catch/finally" exception handling mechanism and is related to [16] and ResourceAcquisitionIsInitialization.

(2008-02-12) PATCH: experimental finalize/guard posted by Alex Mania [92] supports finalize and guard blocks for RAII.

(2008-01-30) PATCH: C-style string lexing to llex.c [93] posted by EricTetz. This makes the lexer automatically concatenate adjacent strings as in C (e.g. x = "a" "b" --> x = "ab"), with the intent to avoid needlessly allocating many small strings. This breaks some constructs such as f "a" "b" that must be interpreted as (f "a") "b". One could workaround that by concatenating strings in the lexer only for strings immediately preceded by a parenthesis or by requiring a new lexical concatenation operator. Constant folding concatenations (e.g. x = "a" .. "b" --> x = "ab") was also suggested but has the performance loss of needing to be done in the parser. A very simple solution is a new escape sequence that can be used to ignore whitespace (including embedded line breaks):

x = "a\

    \b" --> x = "ab"

[missing entries]

(2008-01-25) ANNOUNCE-Lua: Lua 5.1.3 available [94]. This is a bug-fix only release [17] and follows release candidates earlier this month [95][96][97][98][18] .

[missing entries]

(2008-01-20) TOPIC: Lua Workshop 08 dates proposed [99][100][101] by Matthew Burke.

[missing entries]

(2007-12-19) TOPIC: Default max argument limit for Lua functions often limits number of command-line arguments to about 2048 [102], noted by NormanRamsey.[102] The Linux 2.6 limit is ~32K [103]. Roberto noted the arg table supports arbitrary length and suggested changing Lua to remove the mechanism of passing command-line arguments as separated arguments to functions. [104]

(2007-12-18) ANNOUNCE: Shake 1.0.1/1.0 [19], transparent Lua test engine using Leg [20], announced by Andre Carregal [105][106]. This allows unit tests to be written as simple assert calls. Normally, failures of assert calls like assert(a == b, 'test equals') are less informative than offered by jUnit-style [21] tests as in assert_equal(a, b, 'test equals') since the values of a and b are unavailable to the testing function. Shake overcomes this by source code analysis using Leg [20]. See also UnitTesting.

(2007-12-18) ANNOUNCE-MANUAL: Lua Reference manual now available in Spanish [107], contributed by Julio Manuel Fernández-Díaz.

(2007-12-18) ANNOUNCE: LuaRocks 0.3.2/0.3.1/0.3 [10], deployment and management system for Lua modules, announced by Hisham Muhammad [108][109][110]. LuaRocks has similar goals as Perl CPAN [11] or RubyGems [12].

(2007-12-17) ANNOUNCE: LuaPascal [22], integration between Lua and Pascal (Delphi), announced by Macro Antonio Abreu [111].

(2007-12-17) ANNOUNCE: LuaService [23] alpha release 2/1, a framework for writing Windows Service application in Lua, announced by Ross Berteig [112][113]. One goal is to run the Xavante [24] web server as a service. "The advantage of running as a service include starting the application automatically as Windows boots, and running without any user logged in at the console."

(2007-12-17) PATCH: Fast string hash patch to Lua strings posted by MikePall. "The new hash algorithm is a bastardized variant of Bob Jenkins' fast rotate-and-mix hash [25]. It hashes up to 12 chars from a string, picked from the start, middle and end. The basic ideas are: less fetches, more bit mixing, no loops and a constant hash time." The current version uses UNALIGNED access of 32 bit words for speed (ok in x86). It is reported to 2x-10x faster than Lua's hash function and gives 5-10% speedup on string-intensive some benchmarks. The patch is in LuaJIT 2.x but also applies to Lua 5.1.2.

(2007-12-17) ANNOUNCE: Another XML parser in pure Lua posted by Peter Hickman as an experiment. [114]. This translates an XML string to a nested Lua table and is non-lossy. For another pure Lua XML parser see [115]. For other Lua XML interfaces see LuaXml.

(2007-12-16) TOPIC: Win32 GUI bindings short discussion opened by Habib [116][117], primarily focused on wxLua JPEG display.

(2007-12-15) TOPIC: Lua interface [26] to Gnuplot [27], announced by Ken Smith [118]. Gnuplot is a portable command-line driven interactive data and function plotting utility for many platforms. Another Lua Gnuplot interface [28] was also noted [119].

(2007-12-15) ANNOUNCE: a file system operations library announced by Andreas Weis [120]. It was mostly a programming excersize and is posssibly redundant with LuaFileSystem [29] and ExtensionProposal.

(2007-12-15) TOPIC: Implications of adding the small-string optimization (SSO) [30] in Lua, discussion opened by Alex Mania [121] in response to RiciLake's recent SpeedingUpStrings. Problems with SSO were noted by RiciLake [122] in regards to FastStringPatch. Others commented on avoiding lua_pushstring in C code interning strings [123].

(2007-12-13) ANNOUNCE: Scite-debug 0.8 [31], a Scite text editor extension for debuggers, announced by SteveDonovan. [124]. It now supports clidebugger [32] and experimental jdb and mdb support.

(2007-12-12) TOPIC: "String access & metamethods" discussion started by Brett Kugler [125]. [[ TO DO - SHOULD BE SUMMARIZED ]]

(2007-12-11) TOPIC: Why os.exit skips __gc finalizers discussion started by NormanRamsey [126]. The atexit[33] C function and gcc __attribute__((destructor)) [34] were suggested. Issues with multiple Lua states were noted.

(2007-12-11) WIKI-TOPIC: SpeedingUpStrings - RiciLake studied the performance increase from patching Lua's strings to be lazily interned. Here, a string can exist in one of two states: regular or prestring. A prestring has a fixed-sized buffer, like a regular string, but is mutable and not interned (i.e. having a hash value and single instance stored in the global string table [35]). A prestring can be converted into a regular string but not vice-versa. The conversion can be automatic and transparent, in a way that maintains C API backward compatibility. The supposed main advantage of prestrings is that their use can avoid a malloc and/or copy in some cases: instead of malloc'ing a buffer, writing to the buffer, and creating a string from the buffer (second malloc + copy), one can malloc a prestring as a buffer, write to the prestring, and transform the prestring into a string (without additional malloc or copy but only an intern). Furthermore, prestrings, being mutable, can be reused (avoids more mallocs and interning). Some benchmarks showed that interning was only 200-250 nanoseconds (64-bit AMD Turion), while the malloc time could be a significant percentage of run-time in special cases of hard loops not involving I/O. The conclusion was that the performance increase of prestrings was not well justified relative to the added complexity. A follow-up discussion was on the list [127].

(2007-12-11) TOPIC-PATCH: Stall in atomic with userdata finalizers (luaC_separateudate), discussion started by Niklas Frykholm [128] with lgc.c patch [129] posted.

(2007-12-11) REQUEST-MANUAL: Programming in Lua book [36] is 70% translated to Japanese. Proofreaders solicited by Yutaka Ueno [130].

(2007-12-10) ANNOUNCE: Lua signal library 1.0 [37], announced by Patrick Donnelly [131][132]. Example: << signal.signal("SIGTERM", function() print "dying..."; os.exit(1) end); signal.raise("SIGTERM") >>.

(2007-12-10) ANNOUNCE: CairoPad [38], real-time scratchpad application for experimenting with LuaCairo [39], a binding for Cairo [40][41] 2D device-independent vector-based graphics library, announced by Hakki Dogusan [133]

(2007-12-10) ANNOUNCE: "[Why are] register-based VMs generally considered to give better performance these days than stack-based ones?" asked Duck. [134]. David Olofson noted register VM's use of fewer instructions combats the high level of branch misprediction in VM's [135]. Papers were referenced [136].

(2007-12-09) ANNOUNCE: Lua Workshop 2008 [42] will be hosted by George Washington University in Washington, D.C., announced Matthew Burke [137]. "The main goal of the workshop is to allow the Lua community (or at least part of it) to get together and meet in person and talk about the Lua language, its uses, and its implementation. Another goal is to help spread the word about Lua to the industry and academia..." [42]. Registration is free and open to everyone interested in Lua.

(2007-12-09) TOPIC: This LuaNews page, announced by DavidManura [138] and discussed. Some suggested longer comments and RSS support [131][134].

(2007-12-08) ANNOUNCE: Simple XML -> Lua table translator [43], based on "BadgerFish" [44] XML -> JSON [45] (i.e. JavaScript table) translator, announced by Petite Abeille [139]. Here's an example using DataDumper: << require "XML"; dofile 'DataDumper.lua'; print(DataDumper(XML [[<alice charlie="david"><bob>charlie</bob><bob>david</bob></alice>]])) >>. This outputs << return { alice={ ["@charlie"]="david", bob={ { ["$"]="charlie" }, { ["$"]="david" } } } } >>. The code is just over 100 non-comment lines. The translation offers convenience but not always reversibility [46][140]. For other Lua XML interfaces see LuaXml.

(2007-12-06) ANNOUNCE: LuaCairo [39] update, binding for Cairo [40][41] 2D device-independent vector-based graphics library, announced by Hakki Dogusan [141].

(2007-12-05) TOPIC: "Is it possible to have my app statically link to Lua but also allow for [dynamically linked] DLL based packages to work correctly?" asks John Dunn. [142][143][144]

(2007-12-03) ANNOUNCE: Lua syntax coloring for Mac OS X Xcode 3 [47] posted by Graham Henstridge [145].

(2007-12-03) TOPIC: Question on garbage collection performance with 130 000 userdata objects by Niklas Frykholm. [146]

(2007-12-03) ANNOUNCE: LuaMacro [48] update, announced by Steve Donovan. [147] "The macro du jour is list comprehensions."

(2007-11-29) ANNOUNCE: IUP 2.6 [49], portable GUI toolkit, announced by Antonio Scuri [148].

(2007-11-29) ANNOUNCE: CD 5.0 [50], Canvas Draw graphics toolkit, platform-independent graphics library, announced by Antonio Scuri [149].

(2007-11-29) ANNOUNCE: IM 3.3 [51] for digital imaging, announced by Antonio Scuri [150].

(2007-11-29) TOPIC: Extend xpcall [52] to take arguments, proposed by Patrick Donnelly [151], with comment by Roberto.

(2007-11-28) BUG: "lua_setfenv may crash if called over an invalid object" [53] reported by Mike Pall and confirmed by Roberto, with patch. [152]

(2007-11-27) TOPIC: Justifications for introducing Lua at one's workplace, inquired about by Tim Hunter. [153] Various links posted in posts [154] through [155], [156][157][158]

(2007-11-25) TOPIC: Proposed patch to [Lua bug #5.1.2-4] (Recursive coroutines may overflow C stack) forwarded by Jim Whitehead II [159]. Roberto still preferred "idea of moving nCcalls from lua_State into global_State." [160]

(2007-11-24) ANNOUNCE: LuaTask 1.6.4 [54] announced by Daniel Quintela [161].

(2007-11-22) ANNOUNCE: ilua, enhanced interactive prompt for Lua (InteractiveLua) announced by Steve Donovan [162]. Avoids '=' and supports pretty-printing.

(2007-11-20) TOPIC: Adding support for Subversion [55] on LuaForge, rather than just CVS, discussed. [163]. Others recommended distributed SCMs. The may happen next year, possibly with limited support for other SCMs, during a GForge upgrade says Stefan Sandberg and Andre Carregal [164][165]. Help is solicited.

(2007-11-19) ANNOUNCE: bitlib 22, 23, and 24 bitwise operations library [56] [166][167][168] released by Reuben Thomas

(2007-11-19) ANNOUNCE: Leg 0.1, Lua 5.1 grammar with API for user manipulation in LPeg [169] announced by Humberto S. N. dos Anjos. David Manura noted this has similarities to LuaFish. Humberto announced further plans for having a Lua 5.1 optimizing compiler written using Lua and LPeg [170]. Static optimizations discussion followed.

(2007-11-19) NOTICE: Typesetting begun on Lua Gems book [1], noted by Luiz Henrique de Figueiredo [171].

(2007-11-17) TOPIC: "Aside from using next or pairs and facing a O(n) complexity, are there any other Lua ways of implementing a priority queue?" asked by W. C. Bubel [172]

(2007-11-17) TOPIC: Dalvik VM [57] discussed [173], a Java-like register VM used by Google.

(2007-11-16) ANNOUNCE: Simplified binding for poll [58], patched in lposix [59], posted by Steve Donovan [174].

(2007-11-15) ANNOUNCE-PATCH: Adds Lua -t switch to ignore environment variable settings, partly similar in aim to Perl's taint mode, via patched Lua, posted by Reuben Thomas [175].

(2007-11-15) ANNOUNCE-PATCH: Adds Lua command-line history support, via patched Lua with readline, posted by Reuben Thomas. [176]

(2007-11-15) TOPIC: The Lua List of Projects [60] page was trimmed down [177]. Roberto noted it was getting quite long [178]. Some suggested moving old links to the wiki.

(2007-11-14) MANUAL-COMMENT: Undocumented lua_pushliteral API function noted by Peter Cawley and discussed [179]. Lhf writes: "Use lua_pushliteral when you have a literal string instead of a string pointer. lua_pushliteral is slightly faster than lua_pushstring because it avoids a call to strlen; it also allows strings with embedded zeros." #define lua_pushliteral(L, s) lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1)

(2007-11-14) TOPIC: Absence of a __hash metamethod to allow two objects to lookup to the same value in a table discussed again. [180]

(2007-11-12) BUG: table.remove(t, #t+1) removes last element, reported by Patrick Donnelly [181], confirmed by Roberto, with patch available [61].

(2007-11-10) ANNOUNCE: A new Lua-related blog [182] called [lua nova] announced by Nathan Youngman.

(2007-11-10) MANUAL-CORRECTION: luaL_getmetafield error handling wrong in manual, reported by David Manura and corrected by Roberto. lua_next and lua_gc error handling also discussed.

(2007-11-10) ANNOUNCE: Scite-debug [183], a Scite text editor extension for debuggers like gdb and Lua remDebug [62], announced by Steve Donovan. Static variable conflict problem when linking two Lua VMs into a process also noted by Mike Pall [184].

(2007-11-10) TOPIC: PDF creation modules discussed [185], including [lpdf], [LuaHPDF], [CD], [LuaTeX], and [LuaCairo].

(2007-11-10) TOPIC: Lua threading kits discussed briefly [186] and compared [63].

(2007-11-09) TOPIC: securing getfenv in a sandbox [187] solution posted by David Manura [188].

(2007-11-07/09) ANNOUNCE: clue 1,2, and 3 minimal Lua-C interface [64][189][190][191] released by Reuben Thomas

(2007-11-07) TOPIC: Usages of Lua on cell phones [192], such as Trig Development with Lua by Kevin Hunter of QUALCOMM at BREW 2007 [65] pointed out by Roberto and others. List of reasons Lua would be good for cell phones given by Mike pall [193].

(2007-11-07) TOPIC: switch/case statements long discussion reopened by Steve Donovan [194]. Structural pattern matching [195] as in Haskell/OCaml/Metalua/etc. was recommended by Fabien and others with minor syntax variants:


match k

  with 10, 11 then return 1

  with 12 then return 2

  with i if 13<=i and i<=16 then return 4

  with c/"^([a-z]+)([0-9]*)$" then

    printf("1st part: %s; 2nd part: %s", c[1], c[2])

end -- note: return breaks out of function containing the switch.

Some highlights:

(2007-11-07) TOPIC: How "edit and continue" might be implemented in Lua discussed [205], related to The Sims game [66].

(2007-11-06) TOPIC: Why is the Lua module system written in C rather than Lua? [206] asks Matt Campbell. The C implementation is rather simple and might otherwise be complicated by bootstrapping. See also Lua Compat [67].

{2007-11-06} TOPIC: Some C library functions (e.g. strcoll in lvm.c) may internally call malloc, bypassing the Lua allocator, as noted by Enrico Colombini [207]. Mike Pall [208] argued again [209] that the Lua core should avoid the quagmire of natural language support (NLS)/locale' functions.


About This Page

The purpose of this page is similar to the news and mailing list summarizes of other languages ([Perl][Python][OCaml][Haskell]). It is similar to the [lua.org news page] except that it is on the wiki so that all people in the Lua community can contribute to it, and it can have greater depth. Only the most newsworthy points discussed on the mail list are mentioned, as well as important items of interest on other web sites. This page made be moved or restructured--we'll see how it goes and decide later. Perhaps old news items, no longer needing editing, will be archived to another site. --DavidManura

An RSS feed is a bare minimum requirement of anything like this-- the wiki engine here does not offer per-page feeds (even if it did, the feed would be per-edit, not per news item). --JohnBelmonte

I see the use on the wiki more as a staging area prior to publishing. Generally, I don't think this will be delivered per news item or in real time but rather bundled every couple weeks following editing (like the Perl and Python (bi)weekly summaries or the "What's New in Kernel Development" column in the Linux Journal), though if anyone wants to convert it into an RSS feed, they may. --DavidManura

Just a note: it might be a staging area, but some may still find an RSS feed for pre-published items useful (or at least desirable). I would! -- McFin

If there is any interest in switching to a different wiki engine, [Sputnik] is written in Lua and allows both per-edit and per-news-item RSS. (Per-edit RSS feed comes in the box, per-news-item is trivial to add.) --YuriTakhteyev?

Inclusion of LuaForge project update announcements mentioned on the mailing list maybe are redundant and should be removed. The LuaForge project home page already announces all of them, including those not announced on the mailing list. Still, many projects are not maintained on LuaForge. Or perhaps this page should be reserved for major version updates only. Compare also to the other news pages at top.

Some others have suggested Lua blogs or journals, similar to [use.perl.org] and the now defunct [Perl Journal] and [C/C++ Users' Journal]. The wiki already serves much of this purpose, though not as edited to a high standard, which maybe [Lua Programming Gems] will achieve. Occasionally Lua gets on more general sites such as [ONLamp]. --DavidManura

This page was discussed in [138][134][210][211] .

How to Help / News Submissions

If you want to submit a summary of single news item, just post it to the top of this page or at the bottomn here for review. (Maybe you have just read a noteworthy discussion thread on the mail list and have a good understanding of the points presented.) Items may be reviewed/edited.

The format is roughly as follows, and you can use the above postings as templates.

(<YYYY-MM-DD>) <POSTING TYPE>: <SUBJECT>[<LINK TO SUBJECT>] <ACTION TAKEN>, noted by <AUTHOR>.[<LINK TO DISCUSSION>] <A COUPLE SENTENCES OF SUMMARY> [<OTHER LINKS>]


RecentChanges · preferences
edit · history
Last edited April 4, 2012 7:04 pm GMT (diff)