Sumana Harihareswara | 7 Sep 2011 01:41
Picon
Gravatar

Formal & informal grammar, and design of visual editor

Brion and Trevor just wrote up design documents you want to see:

http://www.mediawiki.org/wiki/Visual_editor/software_design "This
document specifies the information models and technologies required to
interact with Wikitext visually.... [t]his project, like this document,
is in a research and design phase."  Covers:

* Project status
* Objectives
* Constraints
* Normalization
* Document model
** Elements
** Blocks
** Content
* Transactions
** Block transactions
** Document transactions
** Wiki transactions
* Wikitext Representations
* Linear Addressability

http://www.mediawiki.org/wiki/Wikitext_parser/Stage_1:_Formal_grammar
discussing low-level tokens and structures:

* Tightly-bound tags
* Brace structures
* Loose structures
* Line type tokens
* Free/magic markup
(Continue reading)

Sumana Harihareswara | 10 Sep 2011 00:57
Picon
Gravatar

parser code review (help deploy future versions faster)

We're trying to deploy MediaWiki 1.18 on Wikimedia Foundation sites by
mid-September, and get into a faster deployment pace for future
versions.  That means we need help reviewing our backlog of unreviewed
code and fixing the FIXMEs.  Could you help by reviewing some code, and
maybe even helping fix FIXMEs?

NEW parser-related commits that could use comments (You can click on a
revision number to get the code review page, where you can comment):

http://www.mediawiki.org/w/index.php?path=%2Ftrunk%2Fphase3%2Fincludes%2Fparser&title=Special%3ACode%2FMediaWiki%2Fstatus%2Fnew

FIXMEs that are blocking the release of MediaWiki 1.18:

http://www.mediawiki.org/wiki/MediaWiki_roadmap/1.18/Revision_report

Thanks.
--

-- 
Sumana Harihareswara
Volunteer Development Coordinator
Wikimedia Foundation
Sumana Harihareswara | 16 Sep 2011 16:44
Picon
Gravatar

this week in visual editor development

Thought you might want to see the EditSurface ToDo list that Trevor,
Inez, and Neil are working off:

http://etherpad.wikimedia.org/VisualEditorTodo

Also, Trevor reports from last week & early this week:

* Wrote lots of tests for new code structure and made some changes as needed
* Continuing work on cleaning up and porting old code into new structure
* Got new code structure to render paragraphs and lists
* Working on rendering other things, such as tables
* Redesigning selection system to better support a variety of block types

*Wrote a bunch of code that proved our hypothesis was possible, but then
there were design flaws.  We learned a lot from that to redesign the
architecture, and now are building it right.  Made changes to wikidom,
needs to be communicated to members of the team.*

Neil's been very busy with the upload wizard and timed media handler,
and Brion with code review & fixes ahead of the 1.18 deployment
(example: http://www.mediawiki.org/wiki/User:Brion_VIBBER/Math_fixes ).
 So, no news on the Etherpad integration or the parser front.

Also, the Wikimedia Foundation is hiring for a visual editor software
developer, so please spread the word:
http://wikimediafoundation.org/wiki/Job_openings/Software_Developer_Rich_Text_Editing_(Features)

--

-- 
Sumana Harihareswara
Volunteer Development Coordinator
(Continue reading)

Inez Korczynski | 16 Sep 2011 22:06
Favicon

Re: this week in visual editor development

Hi,

And here is short update from me:

This and the last week I worked on support for rendering basic tables (no auto width) and selection drawing mechanism (now it is part of ContentView class - very low level - vs. Surface class as it was before). Next thing that I will be working on is to add support for more types of tables.

Inez

On Fri, Sep 16, 2011 at 7:44 AM, Sumana Harihareswara <sumanah <at> wikimedia.org> wrote:
Thought you might want to see the EditSurface ToDo list that Trevor,
Inez, and Neil are working off:

http://etherpad.wikimedia.org/VisualEditorTodo

Also, Trevor reports from last week & early this week:

* Wrote lots of tests for new code structure and made some changes as needed
* Continuing work on cleaning up and porting old code into new structure
* Got new code structure to render paragraphs and lists
* Working on rendering other things, such as tables
* Redesigning selection system to better support a variety of block types

*Wrote a bunch of code that proved our hypothesis was possible, but then
there were design flaws.  We learned a lot from that to redesign the
architecture, and now are building it right.  Made changes to wikidom,
needs to be communicated to members of the team.*

Neil's been very busy with the upload wizard and timed media handler,
and Brion with code review & fixes ahead of the 1.18 deployment
(example: http://www.mediawiki.org/wiki/User:Brion_VIBBER/Math_fixes ).
 So, no news on the Etherpad integration or the parser front.

Also, the Wikimedia Foundation is hiring for a visual editor software
developer, so please spread the word:
http://wikimediafoundation.org/wiki/Job_openings/Software_Developer_Rich_Text_Editing_(Features)

--
Sumana Harihareswara
Volunteer Development Coordinator
Wikimedia Foundation

_______________________________________________
Wikitext-l mailing list
Wikitext-l <at> lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitext-l

_______________________________________________
Wikitext-l mailing list
Wikitext-l <at> lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitext-l
Proger_XP | 28 Sep 2011 07:45
Picon

Regarding new recursive parser

Hi all,

Not long ago I have stumbled upon Brion's presentation at
http://upload.wikimedia.org/wikipedia/commons/d/d5/Parser_and_Editor_-_Haifa_2011.pdf
and I think I have something interesting to tell you folks about.

Over a year ago me and my friend have started to create an intuitive,
multipurpose and flexible wiki markup syntax. Looking back now I think
we did a good job (and you can see it yourself, below) but that's not
the main point of this message.

I have written a PHP framework implementing descent recursive processing
of a (wiki) document into corresponding DOM. Produced tree can be
serialized into a binary format for storage/transmission or dumped
(rendered) into different representations such as HTML or plain text (or
FB2, XML, RTF, etc., etc.) - if each node supports the target format.

Even though the project haven't got enough members yet we have developed
several child projects that use the aforementioned framework - a fast
blog engine and a JavaScript editor (incomplete). The latter is
particularly interesting because it makes full use of per-node editing
(e.g. text node -> bold fragment -> paragraph -> entire document) - and
unlike solutions built on top of HTML/raw wiki code this one is 100%
accurate since it relies on the document tree itself.

What's also interesting about the framework is that in itself it and its
DOM are markup-independent so, say, if a MediaWiki markup module is
written it will allow the frontend (the wiki engine or something else)
seamlessly operate on documents of both old and new syntaxes. Moreover,
the compat module can support rendering into the new markup marking it
transparent to migrate to the new format, if necessary.

The project home page is: http://uverse.i-forge.net/wiki
There's a concise but complete description of our markup language and
our plans; you can experiment with the markup there, as well as find
links to related sites and more in-depth articles.
JavaScript editor page: http://uverse.i-forge.net/wiki/demo/Pages/Swacked

The global goal of the project is to create a uniform markup syntax for
all electronic texts and standardize it to allow 3rd party
implementations.

--

-- 
Regards,
Proger_XP
Brion Vibber | 29 Sep 2011 19:54
Picon
Gravatar

ParserPlayground partial internals update

I'm starting to take some more time away from helping the general MediaWiki 1.18 development and get back to the JavaScript back-end parser experiments[1] that'll power the initial testing of the visual editor's work on existing pages.

[1] http://www.mediawiki.org/wiki/Extension:ParserPlayground

I've made some progress[2] on in-tree template expansion, modeled on parts of PPFrame::expand[3], Parser::argSubstitution[4] and Parser::braceSubstitution[5] from the current MediaWiki parser.

[2] http://www.mediawiki.org/wiki/Special:Code/MediaWiki/98393
[3] http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/parser/Preprocessor_DOM.php?view=markup#l948
[4] http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/parser/Parser.php?view=markup#l3589
[5] http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/parser/Parser.php?view=markup#l3012

There are two key differences between this in-progress code and how the stock parser does it:


1) The stock parser expands a preprocessor node tree as it flattens it into another string (eg for later parsing steps on the compound markup) -- the experimental parser produces another node tree.

Later-stage parsing will deal with re-assembling start and end tokens when producing HTML or other output, but within the tree structure instead of a flat stream of string tokens -- that'll let output know how to mark where pieces of output came from in the input so they can be hooked up to editing activation.


2) Operations like fetching a template from the network are inherently asynchronous in a JavaScript environment, so the iteration loop uses a closure function to 'suspend' itself, calling back into the function when the async operation completes.

Currently this is fairly naive and suspends the entire iterator, meaning that all work gets serialized and every network round-trip will add wait time. A smarter next step could be to keep on iterating over other nodes, then come back to the one that was waiting when it's ready -- this could be a win when working with many templates and high network latency. (Another win can be to pre-fetch things you know you're going to need in bulk!)


I'm actually a bit intrigued by the idea of more aggressive asynchronous work on the PHP-side code now; while latency is usually low within the data center, things still add up. Working with multiple data centers for failover and load balancing may make it more likely for Wikimedia's own sites to experience slow data fetches, and things like InstantCommons[6] can already require waiting for potentially slow remote data fetches on third-party sites using shared resources over the internet.

[6] http://www.mediawiki.org/wiki/InstantCommons

Alas we can't just take JavaScript-modeled async code and port it straight to PHP, but PHP does let you do socket i/o and select() and whatnot and could certainly do all sorts of networked requests in background during other CPU operations.


This is still very much in-progress code (and in-progress data structure), but do feel free to take a peek over and give feedback. :)

-- brion vibber (brion <at> wikimedia.org / brion <at> pobox.com)

_______________________________________________
Wikitext-l mailing list
Wikitext-l <at> lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitext-l

Gmane