On Sun, Jan 29, 2012 at 2:51 AM, Platonides <Platonides(a)gmail.com> wrote:
> 1) Is there a simple Lua syntax guide?
looks more like a grammar. Certainly not
> suitable for end users.
Wikipedia article has some nice examples.
> 2) The decision seems to have been Lua vs JS. What
discarded a custom
> language? (such as WikiScripts)
As far as I am aware, those are mostly performance issues. Although
there may be maintaining issues as well.
> 3) How hard is it to translate Lua to PHP?
> (for templates which then get converted into extensions)
About as hard as JS -> PHP (since they are very similar in many questions).
> 4) Where would code live?
> 5) I think it _would_ be possible to make an extension defined with
> <wikiscript> to take over the page. (avoiding the need of template wrappers)
> 6) What's the expected way of implementing 'libraries' in the wiki?
That's sort of unsolved question. Check out the meeting notes for some
thoughts on that.
Answer to #4 is almost certainly separate pages as far as I
understand. This approach allows us to have syntax highlighting, code
editor and a better debugger. According to meeting notes, this may
also be problematic for visual editor.
The way WikiScripts extensions did it is that there are special code
pages which are called modules, and you can export stuff (functions
and constants and probably classes in Lua) from modules like you do in
CommonJS and call one module's methods from another's. I am now
working on the Scripting extension which is a language-independent
scripting module based on WikiScripts code: