lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 4/8/2012 1:53 AM, David Manura wrote:
On Sat, Apr 7, 2012 at 10:15 AM, Matthew Wild wrote:
On 7 April 2012 07:44, KHMan wrote:
This would be relevant for lstrip and squish too.

When using squish, I found the module organization confusing and
wanted a published API to call from a Lua program (not command-line)
like this:

   package.path = 'squish-0.2.0/lua/?.lua;' .. package.path
   local SQ = require 'squish'
   local err; s, err = SQ.minify_string(s)

Instead, I ended up loading it via dofile [1].

My other impression was that squish forked/superseded LuaSrcDiet, so I
used squish.  However, I see some useful documentation in LuaSrcDiet
that is not in squish like TechNotes.html, so I'm unsure how these
relate.

I should point out for the benefit of others that LuaSrcDiet is really "experimental software", so there should be no expectation of maintenance or support because of the very limited number of users of such tools. Hence, the concept of official or good API is hard to apply rigorously here, compared to Lua libraries that are stably maintained.

squish and LuaSrcDiet aims for different objectives, so there is no problem with that. The niche for such utilities is tiny, so they are more in the realm of academic toys rather than something to be treated like an ubiquitous tool that others depend and rely on. Being a practical person, I cannot justify expenditure of too much time on it.

The calls to getfenv() should also be removed in squish for 5.2 compat.

[snip]
so that the level of interest can be gauged and plans adjusted

Since minimized Lua source is considered in a way a type of byte code
that's portable, some have used this type of thing in LuaJit -prior-
to its addition of bytecode loading/saving support, and it may still
have applications like that. [snip]

Most of the optimizations still to do would be best done on a parsed syntax tree, doing it properly like metalua. No one seems to be in a hurry to go 5.2, so I'm thinking about sticking with 5.1 stuff a little while longer.

But apart from stuff already mentioned on the list, I didn't really think new specific use cases would be uncovered, given the circumstances.

So it will be hacked on from time to time, only don't hold your breath waiting for the next release... :-)

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia