Last modified: 2014-04-21 03:10:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T49799, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47799 - Scribunto should allow coroutines in Lua
Scribunto should allow coroutines in Lua
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 48176
  Show dependency treegraph
 
Reported: 2013-04-28 18:36 UTC by darklama
Modified: 2014-04-21 03:10 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description darklama 2013-04-28 18:36:27 UTC
Scribunto should allow coroutines in Lua. The only explanation
I've found for excluding the coroutine package is that
"No application is known for us, so it has not been reviewed
for security." I would like to address lack of application:

underscore.lua[1] provides an assortment of useful functions
that mediawiki wikis can benefit from having available. It
uses coroutines to implement iter and range functions.

A simple coroutine example:

function range(b,e)
  return coroutine.wrap(function()
    for i = b, e do
      coroutine.yield(i);
    end
  end);
end

for n in range(1,10) do print(n); end

[1] https://raw.github.com/mirven/underscore.lua/master/lib/underscore.lua

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links