Wikimedia

[Lua task #01] Set up your sandbox for programming in Lua on English Wikipedia

Lua is a lightweight programming language that is particularly suited for embedding within other software. The software used by Wikipedia, called MediaWiki, has an extension (called Scribunto) that provides a version of Lua that can be used within Wikipedia pages.

  1. Create a Wikipedia account. See https://en.wikipedia.org/wiki/Wikipedia:Why_create_an_account%3F . Adding an email address allows you to reset your password if you forget it.
  2. Use the link at the top right of your page that has your username to create / edit your user page. Add some text, noting that you’re taking part in GCI, but don’t add personal information. Save your edit. Give a link here to your user page.
  3. Use the link at the top right of your page to create your sandbox). Type some text and save it. Remember that what you type can potentially be seen by anybody!
  4. Read about Scribunto, the Lua implementation embedded in Wikimedia software.
  5. Create an empty sandbox module for yourself as a subfolder of https://en.wikipedia.org/wiki/Module:Sandbox . For example, if your user name is Joe Bloggs, then create your module at https://en.wikipedia.org/wiki/Module:Sandbox/Joe_Bloggs . Note that spaces need to be converted to underscores. This is called "url encoding".
  6. In your module sandbox, add a line of text starting with two hyphens: -- After the two hyphens, type your username and Google Code-in 2017, Introduction to Lua in Wikipedia. Save it. Text beginning with two hyphens is used in Lua to designate a comment.

Task tags

  • lua
  • scribunto

Students who completed this task

Chen Xinpeng, Adam Husain, Patryk, Allen Aby, Chen Wuyang, krithika jaikumar, Mihir Bafna, Om Desai, ichauster, Cliff Chen, Tarun Prasad, suufi, Priyanshu Ahuja, Rhuta Akolkar-1, Vishal, Gabe Mitnick, hp77, Gammaburst_3000, PokkPol, Rhys35, Yajn Bollapragada, Sanath, Kid116, Linda Thelen, Jan Nowosielski, Shaun Lee, C. F. Fairfeld, Sai, Liza Amini, Yu Chenbo, Keerthivass Chandran, OHM OMAR, TimurO, srflp

Task type

  • code Code

Level

Beginner
close

2017