Page MenuHomePhabricator

Dan1wang (Daniel Wang)
User

Projects

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Wednesday

  • Clear sailing ahead.

User Details

User Since
Apr 22 2019, 8:21 AM (32 w, 6 d)
Availability
Available
LDAP User
Unknown
MediaWiki User
Dan1wang [ Global Accounts ]

Recent Activity

Jun 19 2019

Dan1wang renamed T224086: Optimize silent fails: remove checks that always false from WikiPEG: Optimize silent fails: remove checks that always false to Optimize silent fails: remove checks that always false.
Jun 19 2019, 5:47 AM · Patch-For-Review, WikiPEG

Jun 17 2019

Dan1wang added a comment to T224086: Optimize silent fails: remove checks that always false.

Benchmark:

┌─────────────────────────────────────┬───────────┬────────────┬──────────────┐
│                Test                 │ Inp. size │ Avg. time  │  Avg. speed  │
├─────────────────────────────────────┴───────────┴────────────┴──────────────┤
│                                    JSON                                     │
├─────────────────────────────────────┬───────────┬────────────┬──────────────┤
│ Example 1                           │   0.69 kB │    0.41 ms │ 1662.15 kB/s │
│ Example 2                           │   0.24 kB │    0.08 ms │ 2934.98 kB/s │
│ Example 3                           │   0.59 kB │    0.26 ms │ 2228.67 kB/s │
│ Example 4                           │   3.39 kB │    0.83 ms │ 4103.64 kB/s │
│ Example 5                           │   0.85 kB │    0.21 ms │ 4104.92 kB/s │
├─────────────────────────────────────┼───────────┼────────────┼──────────────┤
│ JSON total                          │   5.75 kB │    1.79 ms │ 3209.71 kB/s │
├─────────────────────────────────────┴───────────┴────────────┴──────────────┤
│                                     CSS                                     │
├─────────────────────────────────────┬───────────┬────────────┬──────────────┤
│ Blueprint - reset.css (source)      │   1.20 kB │    2.77 ms │  434.37 kB/s │
│ Blueprint - typography.css (source) │   3.11 kB │    5.01 ms │  620.82 kB/s │
│ Blueprint - forms.css (source)      │   1.79 kB │    1.52 ms │ 1177.71 kB/s │
│ Blueprint - grid.css (source)       │   9.54 kB │    6.83 ms │ 1395.35 kB/s │
│ Blueprint - print.css (source)      │   1.78 kB │    0.88 ms │ 2032.76 kB/s │
│ Blueprint - screen.css (minified)   │  11.83 kB │    7.86 ms │ 1505.23 kB/s │
│ Blueprint - print.css (minified)    │   1.25 kB │    0.51 ms │ 2448.11 kB/s │
│ 960.gs - reset.css (source)         │   0.99 kB │    0.46 ms │ 2145.21 kB/s │
│ 960.gs - text.css (source)          │   0.97 kB │    0.34 ms │ 2857.01 kB/s │
│ 960.gs - 960.css (source)           │   8.94 kB │    2.99 ms │ 2986.95 kB/s │
│ 960.gs - 960_24_col.css (source)    │   7.48 kB │    2.56 ms │ 2924.73 kB/s │
│ 960.gs - reset.css (minified)       │   0.63 kB │    0.40 ms │ 1597.76 kB/s │
│ 960.gs - text.css (minified)        │   0.41 kB │    0.28 ms │ 1448.59 kB/s │
│ 960.gs - 960.css (minified)         │   5.21 kB │    2.42 ms │ 2150.77 kB/s │
│ 960.gs - 960_24_col.css (minified)  │   4.94 kB │    2.19 ms │ 2256.68 kB/s │
├─────────────────────────────────────┼───────────┼────────────┼──────────────┤
│ CSS total                           │  60.08 kB │   37.02 ms │ 1622.81 kB/s │
├─────────────────────────────────────┼───────────┼────────────┼──────────────┤
│ Total                               │  65.83 kB │   38.81 ms │ 1696.11 kB/s │
└─────────────────────────────────────┴───────────┴────────────┴──────────────┘
Jun 17 2019, 9:12 AM · Patch-For-Review, WikiPEG

Jun 14 2019

Dan1wang added a comment to T224086: Optimize silent fails: remove checks that always false.

Haven't done any benchmark test. But the compiled parser.js code got a hug size reduction (from 197kB to 146kB)

Jun 14 2019, 9:53 AM · Patch-For-Review, WikiPEG

Jun 11 2019

Dan1wang added a comment to T222964: WikiPEG character class optimization.

Below is benchmark results (using a-b benchmark of https://gerrit.wikimedia.org/r/#/c/wikipeg/+/516457/ ):

Jun 11 2019, 4:44 AM · WikiPEG, Patch-For-Review
Dan1wang added a comment to T225408: WikiPEG: Error with Makefile on Windows: ../../vendor/autoload.php not found.

The PHP test seems to run, but at the end, I got the following message:

Jun 11 2019, 4:10 AM · WikiPEG

Jun 10 2019

Dan1wang created T225408: WikiPEG: Error with Makefile on Windows: ../../vendor/autoload.php not found.
Jun 10 2019, 8:23 AM · WikiPEG

Jun 5 2019

Dan1wang updated the task description for T225049: Create a unified HTML entity encoder/decoder.
Jun 5 2019, 7:46 AM · Patch-For-Review, MediaWiki-Parser, Parsoid
Dan1wang created T225049: Create a unified HTML entity encoder/decoder.
Jun 5 2019, 5:49 AM · Patch-For-Review, MediaWiki-Parser, Parsoid

May 24 2019

Dan1wang added a comment to T222964: WikiPEG character class optimization.

It would be nice to support proposed changes like this with benchmarks. My strong suspicious is that character class optimizations are already done by the javascript regex runtime, so these changes are unlikely to produce any actual performance improvement.

May 24 2019, 12:51 PM · WikiPEG, Patch-For-Review

May 22 2019

Dan1wang created T224086: Optimize silent fails: remove checks that always false.
May 22 2019, 7:55 AM · Patch-For-Review, WikiPEG
Dan1wang created T224085: WikiPEG: remove unnecessary variable assignment assertion mode.
May 22 2019, 7:46 AM · WikiPEG, Patch-For-Review
Dan1wang created T224084: WikiPEG: Drop legacy (IE8) and unused code.
May 22 2019, 7:36 AM · WikiPEG, Patch-For-Review

May 21 2019

Dan1wang added a comment to T222964: WikiPEG character class optimization.

My reaction is... (holding my breadth) "why are you asking this?"

May 21 2019, 11:34 AM · WikiPEG, Patch-For-Review
Dan1wang created T223957: Implement @ ("picked") operator.
May 21 2019, 7:37 AM · WikiPEG, Patch-For-Review

May 20 2019

Dan1wang added a comment to T223296: proposal: new &? !? and ~? predicates.

Tim, it looks the folks over at PEG.js already implemented a return-this feature (using @!)

May 20 2019, 1:15 PM · Patch-For-Review, Parsoid

May 16 2019

Dan1wang added a comment to T223296: proposal: new &? !? and ~? predicates.

I was think about this too.

May 16 2019, 9:32 AM · Patch-For-Review, Parsoid

May 15 2019

Dan1wang added a comment to T223296: proposal: new &? !? and ~? predicates.

Hmm... got "Maximum call stack size exceeded" error with the following:

~?("(") ~?__ expression:Expression ~?__ ~?")" { return expression; }
May 15 2019, 10:09 AM · Patch-For-Review, Parsoid
Dan1wang added a comment to T223296: proposal: new &? !? and ~? predicates.

Expected results:

May 15 2019, 9:42 AM · Patch-For-Review, Parsoid

May 14 2019

Dan1wang added a comment to T223296: proposal: new &? !? and ~? predicates.

WIP: https://patch-diff.githubusercontent.com/raw/dan1wang/wikipeg/pull/3.patch

May 14 2019, 4:31 PM · Patch-For-Review, Parsoid
Dan1wang created T223296: proposal: new &? !? and ~? predicates.
May 14 2019, 4:10 PM · Patch-For-Review, Parsoid
Dan1wang added a comment to T222964: WikiPEG character class optimization.

Please ignore the first patch. The code was missing a ranges = newRanges; line after merger of ranges.

May 14 2019, 3:53 AM · WikiPEG, Patch-For-Review

May 10 2019

Dan1wang created T222971: WikiPEG: implement @define/@macro or something similar.
May 10 2019, 5:46 PM · WikiPEG
Dan1wang created T222964: WikiPEG character class optimization.
May 10 2019, 4:21 PM · WikiPEG, Patch-For-Review

May 9 2019

Dan1wang added a comment to T222856: WikiPEG & Parsoid cache rule optimization.

Well, WikiPEG and Parsoid may be used in environment where the compiled code is not cached.

May 9 2019, 4:44 PM · WikiPEG, Patch-For-Review
Dan1wang added a comment to T222856: WikiPEG & Parsoid cache rule optimization.

Compiled result of parsoid\lib\wt2html\pegTokenizer.pegjs


May 9 2019, 7:52 AM · WikiPEG, Patch-For-Review
Dan1wang added a comment to T222856: WikiPEG & Parsoid cache rule optimization.

Compiled result of wikipeg\tests\common\TestFile.peg


May 9 2019, 4:15 AM · WikiPEG, Patch-For-Review
Dan1wang created T222856: WikiPEG & Parsoid cache rule optimization.
May 9 2019, 4:10 AM · WikiPEG, Patch-For-Review

May 8 2019

Dan1wang added a comment to T222770: Parser rule clean-up: extlink_preprocessor_text_parameterized.

The rule doesn't make sense.

May 8 2019, 9:26 AM · Parsoid
Dan1wang created T222774: Parser rule clean-up: url & autourl.
May 8 2019, 8:02 AM · Parsoid
Dan1wang updated the task description for T222770: Parser rule clean-up: extlink_preprocessor_text_parameterized.
May 8 2019, 3:58 AM · Parsoid
Dan1wang updated the task description for T222770: Parser rule clean-up: extlink_preprocessor_text_parameterized.
May 8 2019, 3:22 AM · Parsoid
Dan1wang created T222770: Parser rule clean-up: extlink_preprocessor_text_parameterized.
May 8 2019, 2:22 AM · Parsoid

May 6 2019

Dan1wang created T222561: Minor: don't test for "/" before autolink.
May 6 2019, 1:35 AM · Patch-For-Review, Parsoid
Dan1wang created T222560: flattenIfArray should just accept null/undefined result.
May 6 2019, 1:30 AM · Patch-For-Review, Parsoid
Dan1wang added a comment to T222328: [extlink] parsing - link cannot contain language variant or extension tags.

test case: https://zh.wikipedia.org/wiki/User:Dan1wang/SandboxT222328

May 6 2019, 12:35 AM · Chinese-Sites, Parsoid

May 2 2019

Dan1wang added a project to T222328: [extlink] parsing - link cannot contain language variant or extension tags: Parsoid.
May 2 2019, 4:00 AM · Chinese-Sites, Parsoid
Dan1wang created T222328: [extlink] parsing - link cannot contain language variant or extension tags.
May 2 2019, 4:00 AM · Chinese-Sites, Parsoid
Dan1wang added a comment to T221920: [extlink] parsing - don't validate protocol twice on simple link.

sorry, literal:(url_protocol urladdr) / should be literal:(url_protocol (urladdr / "") extlink_preprocessor_text<extlink>) /

May 2 2019, 2:56 AM · Parsoid
Dan1wang renamed T221920: [extlink] parsing - don't validate protocol twice on simple link from Simplify [extlink] parsing to [extlink] parsing - don't validate protocol twice on simple link.
May 2 2019, 2:24 AM · Parsoid
Dan1wang added a comment to T221920: [extlink] parsing - don't validate protocol twice on simple link.

I see.

May 2 2019, 2:23 AM · Parsoid

Apr 30 2019

Dan1wang created T222130: Simplify `nowiki_text` parsing.
Apr 30 2019, 2:20 AM · Patch-For-Review, Parsoid

Apr 29 2019

Dan1wang created T222048: Parsoid VE should not decode HTML5 entities.
Apr 29 2019, 2:48 AM · Parsoid

Apr 26 2019

Dan1wang created T221920: [extlink] parsing - don't validate protocol twice on simple link.
Apr 26 2019, 2:09 AM · Parsoid