Talk:Lua/Scribunto Lua

From Wikiversity
Jump to navigation Jump to search

Thanks for a very good start.

I've worked on a wikitable:

{{#invoke:Sandbox|hello}} Keyword 1st Parameter 2nd Parameter

Code

#invoke:

Sandbox

hello

What it does

specifies action - here load module and implement function

specifies the name of the module to be loaded

specifies the name of the function inside the module that is to be invoked (called).

Two questions:

  1. Is it a good idea to use the term elements?
  2. Does #****: "specify the action to be performed"?

Leutha (discusscontribs) 07:39, 5 December 2013 (UTC)[reply]

  1. Element seems fine. Typically in programming you have a keyword and parameters. invoke is the keyword. The module name is the first parameter. The function name is the second parameter.
  2. Effectively, yes. Think about #redirect. It's exactly the same syntax. redirect is the keyword, and then the page to redirect to is the first parameter.
Regarding terminology, we need to decide whether the audience is programmers or a typical wiki user. My guess is that programmers won't need a detailed tutorial, just some examples and they're on their way. Where I think common usage may be different from programmer usage, I've tried to include both, such as with array (container).
This is where the advantage of a global wiki comes in. If we all add what helps it make sense to us, it should become a useful resource for everyone.
Please let me know what you'd like to see next. Where would you want to go from here in terms of Lua and templates?
Dave Braunschweig (discusscontribs) 14:57, 5 December 2013 (UTC)[reply]

OK, my long term goal is to get the OCLC working in the citation parameters I import from Open Library, like they do on Wikipedia. However, perhaps we can start by going through Template:Lsw and Module:Link little by little as an example. Does that sound doable?Leutha (discusscontribs) 16:19, 5 December 2013 (UTC)[reply]

That sounds like a plan. It's a couple of steps to get there, but I'll start working on those steps as I have time. -- Dave Braunschweig (discusscontribs) 17:00, 5 December 2013 (UTC)[reply]