User:NeilK/Worklog/2011-01-25 to 2011-01-31

From Wikimedia Foundation Governance Wiki


Projects: Upload Wizard, MediaStorage, Resource Loader

Status:

Last week:

  • Yak shaving with mw.Language.js
  • all the above from last week
  • Gathering stats to provide some minimum performance metrics for MediaStorage - it's amazing how little we know
  • Trying to land some backend changes into 1.17, although I realize this may be a lost cause now -- will be talking in person to Roan, Sam

This week:

  • landing major changes to mw.Language.js into trunk
  • again UploadStash backend changes for 1.17
  • working on multimedia agenda (w/Kaldari?)

January 25, 2010

Reconciling patches to mw.Language etc.

Trying to write better parser from scratch; think I will give up and use or write a simpler parser library

January 26, 2010

Michael Dale in the house!

Was trying to work on alternative parser. Michael may have talked me out of that...

Ended up pairing with Michael Dale on fixing his patch up -- we both agreed that the jQuery functionality was best broken out into a jQuery-specific module. Paired on making that work from about 12:30pm to 4:00pm, including Jasmine tests. Note: it is not much fun trying to extend the libs that Roan & Trevor have written, they are a bit privacy-happy (correction: or are they -- maybe Message is extendable after all?)

Should discuss, anyway.

So now gM() only returns text, and to use jQuery parameters, you have to provide a selector and use $j.mwMessage();

Rationalized some aspects of this library. Managed to reduce several lines with the use of regular expressions.

Am still unhappy with mdale's use of the term 'swap', especially 'magic swap', which is pretty unclear to a developer. And how we basically have two parsers in operation, one in mwMessage does link parsing by itself and template argument substitution (including jquery object magic) BUT BUT BUT then calls out to mediawiki.language.parser to do hacky-regex-rec-descent-style parsing for PLURAL and all other such things.

Still would like a parser that gave us an AST, rather than all this hackery. It might take a bit more code though, although perhaps WikiEditor could share it. mdale points out that even in MediaWiki proper, there are 'phases' to parsing, like doing links before templates. However, having an AST does not preclude this; we could do two passthroughs.

Alolita strongly suggests briefing Kaldari on multimedia stuff before he goes on vacation.

January 27, 2010

Miscellaneous notes (carried forward from last week)

Ok. reconciling all these different implementations of parsing and language in MediaWiki.

We have:

  • Michael's patch in branch MwEmbedStandalone bug 20962.
  • my hacked version in trunk - extensions/UploadWizard/resources
  • the newly-namespaced version in trunk - resources

What we need to do:

  • bring the best of Michael's stuff into the mediawiki version (?) The patch affects quite a bit, in ways that are helpful to what Michael needs
    • mw.Parser is radically different
      • includes functionality to do fallback languages which the resource loader should itself be doing.
   * verify that his slow parserTest still works
   * try the jasmine test (will have failures, but will mostly work)
   * bring THOSE changes into the trunk/resources version
   * verify slow ParserTest still works
   * try the jasmine test (will have failures, but will mostly work)
   * namespace out the languages as decided
   * try if that works in the jasmine test (should completely work)
   * work on rewriting basic parsing algorithm