lua-users home
lua-l archive

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


On May 2, 2012, at 2:26 AM, Dirk Laurie wrote:

> 1. Laurens is totally open about what other language sits behinds his
>   ideas (not trying to surreptitiously smuggle bits of Python/ Ruby/
>   Perl/ Haskell/ Smalltalk/ Erlang/ C++ etc into Lua).

I think this is a strawman. "Smuggling in" of foreign style and concepts could equally cover tail calls, coroutines, lexical scoping, weak tables, regular expressions, CPS-in-C-style yielding, modules, and other things added to Lua since I started using it. In particular, tail calls plus lexical scoping for first class functions allow you to write Algol-syntax Scheme. (With no lists and no macros. Cons cells suck, but I miss real macros all the time.)

That's just the language itself. There are plenty of "foreign" libraries.

> 2. He has already made available a working version of the current
>   prototype (not trying to get the Triumvirate to do it).

On lua-l, language change proposals may be divided into three parts...well, five parts:

1) Those that are broken. If you try to implement them, you will often discover how they are broken.

2) Syntax changes for constructs congruent to the Lua 5 computational model. Many of these are implementable in a few hours with Metalua, LuaMacro, tokenf, pick one[1]. Writing bigger syntactic changes in C instead of Lua is often wasted effort if your goal is influencing Lua; license issues for both major Lua implementations would probably keep your code out if nothing else.

3) Hacking on value semantics. Turning back the clock on __index is not that difficult. Indexing arrays from 0...harder, as Miles points out.

4) Core, critical coordination. Modules are implementable (and at the time were implemented) in pure Lua; there were several systems. Lua 5.0 picked one to reimplement in C so programs could depend on it, and libraries could have a common load interface. 5.1/5.2 changed this...but at least there was one instead of n for each version.

5) Those full of murk--usually where nobody is really certain what the right thing *is*. Unicode is a pet topic for me, because it's going to involve #4 and maybe #3. How to deal with hash collision attacks was another.

But aside from #1, providing an implementation appears to have have little *direct* effect on adoption. And the majority of ideas are bad, and proving a bad idea is feasible doesn't help much.

I've left out "ship more/fewer/different functions in lualib"; I've already gone through the personal exercise of "why does function X exist in _G?" and decided there's as good an argument for ml.inject (snicker) as at least some of the other utilities floating around. I've decided not to care that much, since most of the time I use Lua distros anyway.

PUC-Rio lua.exe does not ship with any functions written in Lua, which seems increasingly strange to me. How efficient does the module system have to be? Is this stuck on the problem of cross-compilation of bytecode?

> 3. He has created something he likes for his own pleasure like a true
>   artist (not trying to impose his computerlinguo-political views
>   on the rest of the community).

Were 5.1 and 5.2 an imposition of computerlinguo-political views on the rest of the community? Or the work of true artists? I can't tell.[2]
 
> When I the words out of one language choose, but the syntax of another
> language use, feels it to me more if my think-work in that second language
> done is, even looks it with the first eye-upbeat like a sentence which in
> the first language written is.

:-)

Many machine translation systems have difficulty with non-local syntax transformations--words cannot move far. Verb-at-end does not to English well over long sentences translate. He/she/it cannot process implied subjects either. Discover Japanese is closer to /PowerPoint-English/. Become better at reading it. Is pained.

Jay

[1]: You don't have to pick one; you can pick two syntax tools--I did tokenf and LuaMacro last time.

[2]: Nobody else can tell about 5.2 either, I guess. Intellectually, I know It fixes important things, as well as things I complained about.