jQuery Core Team Meeting – Dec 10 2012

December 10, 2012
Minutes (Notes) of the meeting of jQuery
Location: #jquery-meeting on Freenode
Attending: DaveMethvin, rwaldron, gibson042
Time: Noon ET

Official Agenda:

Early beta of 1.9 on December 12:

Ticket review (links below)

http://bugs.jquery.com/ticket/11290 “looks like HTML” rule

  • .charAt(0) === “<” for now
  • may allow whitespace depending on feedback
  • compat plugin needs to restore old behavior

http://bugs.jquery.com/ticket/13011 (“type” attribute)

  • dave will land

http://bugs.jquery.com/ticket/12336 (options.length = 0 for $select.empty())



Pull Requests https://github.com/jquery/jquery/pulls

https://github.com/jquery/jquery/pull/1066

  • timmywil thinks maybe .defaultChecked can save us

https://github.com/jquery/jquery/pull/1065

  • zowie, let’s land it if this works everywhere

https://github.com/jquery/jquery/pull/1063

  • look into using .defaultValue

https://github.com/jquery/jquery/pull/1051

https://github.com/jquery/jquery/pull/1027

  • timmywil to create a test from jQuery perspective

https://github.com/jquery/jquery/pull/1060

  • can’t land b/c causes errors in testswarm

https://github.com/jquery/jquery/pull/1047

  • GitHub’s a mess; close and request a fresh PR

jquery-compat plugin supporting removed features and behaviors

Documentation – Upgrade guide

Mergatron

Unassigned tickets

Assigned tickets review for 1.9; need volunteers for open tix

Testing Team Meeting – Dec 07 2012

December 6, 2012

Location: #jquery-meeting on Freenode

Attending: Scott, Corey, Jörn

Time: Noon ET

QUnit

TestSwarm

  • Lots of trouble with BrowserStack lately. Apparently their broken VMs only get fixed when we report the issue. Corey got IE7 and Safari 6 VMs fixed
  • A few jobs, especially in IE8 fail to submit results with “”Error connecting to server”
  • TestSwarm rewrite well on the way. Is now using ua-parser, much less maintenance in TestSwarm itself and testswarm-browserstack.

testswarm-browserstack

  • Rewrite finished. Much less maintenance required here as well. More advanced and machine-readable log output (Splunk!) and smarter worker spawn management, and more (see commit log for more details).

Mergeatron

Experimenting for jquery core

  • To be moved to a separate testswarm account
  • Refactor grunt-testswarm to not need changes for mergeatron/PR.

Jenkins builds are put in directory /build/<project>/PR-<#>. This is a problem as those are non-unique (more than 1 commit per PR). Should use the commit hash like we do for other builds. Though builds are synchronous, a run can be reset later in time. If the directory has changed, the re-run will be incorrect.

  • Also, job name: “pull #123” -> “pull #123 – commit #af04”.

 

jQuery Mobile Team Meeting – Dec 06 2012

  • Attending: Todd Parker, John Bender, Jasper de Groot, Anne-Gaelle Colom, Alex Schmitz, Ghislain Seguin, Ralph Whitbeck, Jeff Lembeck, Keith Pepin

link Todd

link John Bender

  • simple-nav is merged and green except for sequence tests
  • grunt-junit fix

link Jasper de Groot

  • keep making progress on triage (273 open issues now)
  • fixed issues with textinputs, updated unit tests
  • reviewed and modified PR option collapsible without icons (landed) https://github.com/jquery/jquery-mobile/pull/5327
  • added examples of new options to docs (dialog close button & corners, collapsible corners)
  • demos view source code: it’s now possible to select a specific script or style element in the head by giving it an ID and add data-demo-js=”#myID”
  • noticed that persistent toolbars are broken http://jquerymobile.com/test/docs/toolbars/footer-persist-a.html
  • worked on slider/range CSS, have to test when range widget is done
  • working on demos for 1.3

link Anne-Gaelle Colom

  • api docs:
    • changed controlgroup for new version of grunt
    • changed page loading widget (added options/methods/events and demos)
    • corrected dimissable -> dimissible in popup/options.html
    • added corners options to collapsibles and collapsible sets
  • the API docs format issue is resolved and all parties are happy!
  • changed jQuery core version from 1.7.2 to 1.8.2 in ThemeRoller.

link Ghislain Seguin

link Scott Jehl

  • Jeff and Matt have done some great work on the panel and I'm looking to help smooth the transitions. We're making progress We’ll likely want to use some HW accel on the elements involved in the panel transitions only during transitions, for memory reasons. The slide-panel branch has an unconditional 3d transform in there now and it appears to be helping a lot in testing. More to do

link Alexander Schmitz

  • Created way to do deeplinking in the demo docs
    • this will be for docs only not library
    • will make demo to show people how we do this
  • merged rewrite of swipe event
  • continued work on range widget
  • triage
  • Presistant toolbars VERY broken investigating this its a regression.
  • tracked down header load issue with reader

link Ralph Whitbeck

link Jeff Lembeck

  • Finished API of panel. Flossing out last tests of it. Also cleaning up code and fixing related bugs

jQuery UI Team Meeting – Dec 05 2012

  • Working on multi-version support for download builder.
    • Landed updated in master.
    • Testing on staging server.
  • Working on dialog cleanup.
    • Down to 7 bugs.
  • Working on selectmenu cleanup and accessibility issues.
  • Reviewed draggable API.
    • Proposed updated API is on the planning wiki.
    • Need to prepare a blog/forum post.
  • Planning 1.10.0 beta for next week.
  • Considering shorter release cycles with fewer widget updates per release.
    • May push selectmenu to 1.11 and push most of 1.11 to 1.12 for a quick 1.11 release.

jQuery Mobile Team Meeting – Nov 29 2012

  • Attending: Todd Parker, John Bender, Jasper de Groot, Anne-Gaelle Colom, Gabriel Schulhof, Alex Schmitz, Jeff Lembeck, Ralph Whitbeck

link Todd

link John Bender

  • 3 tests left before the merge. Not including the sequence tests.
  • Internal work

link Jasper de Groot

link Anne-Gaelle Colom

  • Modilfied the following widgets for the new version of grunt (generated examples for options, methods and events)
    • Slider
    • Dialog
    • Collapsible
    • Select
    • Textinput
    • Popup
    • Listview
    • Collapsibleset
  • Created the following event entries:
    • Updatelayout
    • Pageremove
    • Swipe
    • Swipeleft
    • Swiperight
  • Other changes:
    • Designed a warning style to draw the user’s attention to a warning paragraph
    • Created the getting started with jQuery Mobile guide on the learn site (most of the guide is based on the original guide which is on the current docs.)
  • working on the api style guide (our widget description is long so the quick-nav section is not in view... which I believe is a problem for us...)

link Gabriel Schulhof

link Jeff Lembeck

link Alexander Schmitz

  • re-wrote swipe event to allow extending it.
  • wrote extension to fix swipe on ios and demo extending swipe (this will NOT be part of the library)
  • First draft of range slider in range branch gallery at
  • general triage bug fixing.
  • issue #5035 touch events are missing teardown.
    • this could have performance implications if people use them a lot

link Ralph Whitbeck

Ecma/TC39 Meeting – Nov 29 2012

link November 29 2012 Meeting Notes

John Neumann (JN), Allen Wirfs-Brock (AWB), Waldemar Horwat (WH), Brian Terlson (BT), Luke Hoban (LH), Rick Waldron (RW), Eric Ferraiuolo (EF), Doug Crockford (DC), Yehuda Katz (YK), Erik Arvidsson (EA), Mark Miller (MM), Dave Herman (DH), Sam Tobin-Hochstadt (STH), Istvan Sebastian (IS), Andreas Rossberg (ARB), Brendan Eich (BE), Alex Russel (AR), Matt Sweeney (MS)

link Approval of ECMA/TC39 Scope Declaration

(Presented by John Neumann)

JN: (presents scope document for approval)

link Conclusion/Resolution

Approved.

link Scoping for default arguments revisited

(Presented by Allen Wirfs-Brock) See Slides

AWB: (Review legacy requirements)

Two Params, Same Name allowed (non-strict)

1
2
function f(x,x) { console.log(x); }
f(1,2); // logs: 2

Parameter and a Var with Same name

1
2
3
4
5
function g(x) {
var x;
console.log(x);
}
g(1); // logs: 1

Function Declarations Override Parameter Bindings

1
2
3
4
5
function h(x) {
function x() {return 2;}
console.log(x());
}
h(function() { return 1; }); // logs: 2

link Proposal Part 1

  • Simple ES<=5.1 parameter lists introduce "var bindings" in the top level scope of a function
  • All ES<=5.1 rules apply
    • Duplicated parameter names
    • Parameter names may be same as var or function Declaration
    • (missed) see slides...

ARB: These are simply the requirements.

link Proposal Part 2

  • If a parameter list uses ANY parameter syntax introduced in ES6, new rules apply:
    • Destructuring Parameters
    • Default value initializers
    • Rest Parameters
  • New Rules:
    • Parameter lists introduce "let bindings" in the top level scope of the function
      • No duplicate param names
      • Parameter names may not be the same as any other function top-level
    • TDZ rules apply to parameter default value initializers
      • Hoisted top-level function/var declaration are initialized after parameter initialization
    • "strict" arguments object (copy of actual args, no parameter joining)

DH/YK/LH: This is problematic for extant offending code, that is updated to use ES6 syntax. One syntax change shouldn't have adverse effects on other, not directly related, syntax.

RW: If offending code exists, it would be smart to fix the issues, new syntax does new things.

YK: Sympathetic, but disagrees

New Rules Examples:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function f(x, x, ...rest) {}
Syntax Error: duplicate parameter name (Rule 1.A)
function f(x, {a:x, b:y}) {}
Syntax Error: duplicate parameter name (Rule 1.A)
function f([x]) { let x; }
Syntax Error: redeclaration of parameter x (Rule 1.B)
function f([x]) { var x; }
Syntax Error: redeclaration of parameter x (Rule 1.B)
function f([x]) { {var x;} }
Syntax Error: redeclaration of parameter x using hoisted var (Rule 1.B)
function f([x]) { {let x;} }
Valid, redeclaration is in inner block
function f([x]) { function x(){} }
Syntax Error: redeclaration of parameter x (Rule 1.B)
function f([x]) { class x {} }
Syntax Error: redeclaration of parameter x (Rule 1.B)

WH/AWB/ARB: discussion about parenthesis on parameters

ARB: Points out that this is why 1JS becomes a problem where we introduce micro-modes to make things work

AWB: We need to have these to make these things work correctly

MM: Also nervous about these micro-modes, but want to see the rest of the proposal

New Rules Examples, Cont...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function f(x, y=x) {}
Valid, x has been initialized when y's default value expression is evaluated.
function f(x=y, y) {}
Runtime: ReferenceError exception y not initialized (Rule 2)
const a = "A";
function f(x=a) {}
Valid
function f(x=a) { var a;}
Runtime: ReferenceError a not yet initialized (Rule 2.A)
function f(x=a) { const a = "A";}
Runtime: ReferenceError a not yet initialized (Rule 2.A)
function a() {return "A";}
function f(x=a()) {}
Valid, a is initialized in surrounding scope, at time of parameter default value initialization.
function f(x=a()) { function a() { return "A"; } }
Runtime: ReferenceError a not yet initialized (Rule 2.A)

MM, WH: I want to preserve:

  1. A Function, as soon as it's in scope is already initialized
  2. A Var variable, as soon as it's in scope is already initialized

ARB: Agree, but these things simply should not be in scope.

DH: We're making mistakes with let all around. We should wait to continue this discussion until this afternoon when all are present.

MM: Luke, where does the let research stand?

LH: Incomplete.

AWB: If there are disagreements with these rules, then someone needs to write rules that cover all these cases.

ARB: I proposed a set of rules and posted to es-discuss. Basic idea: a function with default arguments behaves as if it was a wrapper function supplying the default arguments. So initializers cannot see any definitions from the body.

link Simplest example:

1
// scope boundaries

Ecma/TC39 Meeting – Nov 28 2012

link November 28 2012 Meeting Notes

John Neumann (JN), Norbert Lindenberg (NL), Allen Wirfs-Brock (AWB), Waldemar Horwat (WH), Brian Terlson (BT), Luke Hoban (LH), Rick Waldron (RW), Eric Ferraiuolo (EF), Doug Crockford (DC), Yehuda Katz (YK), Erik Arvidsson (EA), Mark Miller (MM), Dave Herman (DH), Sam Tobin-Hochstadt (STH), Istvan Sebastian (IS), Andreas Rossberg (ARB), Brendan Eich (BE), Alex Russel (AR)

link Syntactic Support for Private Names

BE/LH: Concern that the syntax required too much declaration

LH: Can delve deeper when presenting TypeScript findings. We don't have any experience with the impact of this syntax.

AWB: This is where we left it at the last meeting and I haven't had an opportunity to respond to feedback.

Mixed discussion regarding syntactic pains and impact of @-names

LH: Before it can go forward, someone will need to go back and address the existing issues.

AWB: The concern is the double declaration and we discussed adding a private prefix for method declarations.

YK: Alternatively, module bound private names, where declaration scopes to the module.

Discussion of Kevin Smith's modular @-names proposal...

AWB: The same logic applies to global vs. lexical namespace, and modules.

WH: If you have an @-name somewhere in a module, is it scoped to this module

YK: If you use an @-name it implies binding, and you need to explicitly export

AWB: References an implicit declaration if doesn't already have one?

YK: Yes. (draws example on whiteboard)

1
2
3
4
5
6
7
module "view" {
export class View {
constructor(id) {
this.@id = id;
}
}
}

DH: Points of clarification...

  1. If we're talking about @-names explicitly scope to a module, no declaration nec. Does that make them private or unique?
  • You would have to declare specifically

Reviewing Kevin Smith's gist (https://gist.github.com/3868131) on projector...

ARB: How does this avoid the use of the same name twice?

AWB: You're expected to know your module.

BE: (draw comparison to Go, Dart, CoffeeScript)

DH: The goal is simply to avoid repetitive declaration lists

LH: The notion that declaration of private names as a runtime construct is great, but the syntactic representation needs to be intuitive to "this is a private thing". So far, this feels at odds with those intuitions

DH: Disagrees, this is a static concept and declarations within are intuitively static.

WH/AR/STH: There is no precedence in the language to scope limited binding forms.

DH: Painful if you're required to list out everything

WH/YK: Sharing private names across classes is a problem that needs to be solved.

DH: Implicit scoping is asking for trouble (gives examples)

AWB: Common case where a symbol only needs to scoped to a class, for that case, we have a proposal on the table that covers everything except for fields without a lot of redundant declaration. Beyond the scope of a single class, it seems an explicit declaration at an appropriate level is desirable.

DH: Tied to classes implicitly? But allowed to explicitly bound to other scopes

AWB/DH: Clarification on private for classes.

ARB: Would need to hoist the thing outside the class?

AWB: Only if you're contributing to the thing outside of the class.

BE: If you want an outer scope, put a block around it. ...Kevin's proposal seems to have no support here.

LH/AWB: back to the @-names, we left it at "it's too chatty"

LH: I want syntax for privacy, something less

Discussion about import @iterator in classes...

LH: The immediate problem w/ YK's example on board is that it's unclear that @id... Developers don't want to think about binding names as objects

AWB: (modifies whiteboard)

1
2
3
4
5
6
7
8
module "view" {
private @id; // allows declaring a private name called "id"
export class View {
constructor(id) {
this.@id = id;
}
}
}

Move private @id...

1
2
3
4
5
6
7
8
module "view" {
export class View {
private @id;
constructor(id) {
this.@id = id;
}
}
}

BE: This all may be developer and future hostile.

WH: (agrees)

BE: Developers want declarative form to define an instance field with a private name in one step. We separate those two.

WH: I want to preserve the option of saying one thing

BE: That's what Luke wants.

LH: Most developers don't want to think about declaring their names before use.

AWB: Then we can't address private within a class without addressing field declarations in a class. (moves private @id out of example)

WH: We can't allow this to now be declarable in multiple contexts.

LH: The current behavior of @-names is not what developers expect it to be.

DH: I have contradicting experience. (ie. Racket define-local-member-name)

LH: If you had to do this for every property that you're ever going to use...?

DH: (Agrees with Yehuda's complaints)

BE: Then we need field syntax first.

LH/YK/WH: (nods of agreement)

DH: Let's punt on this for ES6. Too late

EA: How to do @iterator?

DH: We can make that work, but this is too large and too late. There are too many questionable issues w/r to declaration for the sake of scoping a name, without creating a field.

MM: Let's not discount ES7 development.

AWB: I disagree and don't think that we should defer on addressing this.

BE: If we wait and defacto standards emerge, then we're too slow.

MM: Intend to advocate:

  • postpone explicit field declarations to ES7 and things that might conflict until.

BE: Agree

LH: The concern is @iterator?

standard private names and public names

WH: What is the point of contention for the existing field declaration proposal?

BE/AR: (explanation of constructor declaration and hoisting issue)

BE: (whiteboard)

// Mark's proposal from a year ago // http://wiki.ecmascript.org/doku.php?id=harmony:classes

1
2
3
constructor(id) {
private id = id;
}

MM: (reiterates rationale)

LH: (whiteboard) // TypeScript...

1
2
3
4
private id;
constructor(id) {
this.id = id;
}

AWB: What happens when there is foo.id is in the constructor?

DH: So private is to statically reject programs that appear to poke at things that are assumed private?

LH: Confirm

MM: So they foo.id will refer to the same id field?

LH: Yes.

...Unusable for ES6

DH: Proposes... Exactly the semantics as shown, but syntactically only allows field declaration position in classes and import/export.

WH: Important that you will want to declaratively (not imperatively) list fields. Guaranteed to be there in instances of a class. Those who want to lock down the class further might also want extra class attributes that disallow other expando properties, etc. (not the default case, but something you might want to do).

LH: This is now a different discussion. If we introduce a form (re: whiteboard example)...

DH: A future compatible subset of what we discussed before.

Discussion about the baseline problem: Needing two lines to declare a private field.

YK: Not sure why the example that Luke approves of is different from the given syntax.

Discussion of computed object/class-literal properties, rejected due to

  • Runtime duplicate checking
  • Static object literal optimization

LH: Computed properties might be worth revisiting

EA: But you can't predict what the property name will be...

AWB: And you still need to go through the declaration steps...

BE/DH: Revisiting previous consensus on unique name for iterator

DH: No revisit on consideration for string name for iterator

LH: Revisit on square bracket computed properties.

AWB: Square brackets are future hostile... Explanation of the [] Reformation http://wiki.ecmascript.org/doku.php?id=strawman:object_model_reformation

BE/DH: (volley re: import iterator)

BE: If there is a standard library prelude in ES6 for @iter, that buys time to fully specify for ES7

AWB: Let me summarize... Take the @name proposal without the declaration.

DH: Understand, but the thing we do now needs a coherent story

AWB: Yes, we provide pre-declared @names and that's the end.

LH: Normal lexical bindings?

AWB: No, @name bindings

DH: max/min: only in property name position

WH: Can you stick an @name on any arbitrary object?

AWB: Just getting rid of declaration

BE: max/min

AWB: Existing @names in spec

  • @hasInstance
  • @iterator

DH: the whole benefit of unique names is no name clash

BE: This is why we decided that iterator should be public, because there is no way to avoid existing properties. We want new things to have no clash.

ARB: Want to use it for properties to avoid cross cut

BE: Use for stratified traps.

AWB: Any symbol is fine, doesn't need to private

DH: Why would you decide to expose something as visible...

AWB: There are cases where certain properties might want to be extended or customized.

Discussion of reorganization of Meta Object operations in order to simplify Proxy specification.

WH: The class proposals only permitted private properties on instances of the class. It was never the intent to allow you to create a private instance property @foo of instances of class C and then attach it to random objects unrelated to C.

AWB: At the root, symbols - ie. unique names are a powerful tool

MM: Always in consensus that symbols where a means of assigning and looking up a property by a unique, unforgeable name. It was never specifically tied to classes.

WH: Disagree. That's only one of the privacy proposals. Something got lost in translation in the attempts to merge the two privacy proposals. The class one would let you look up a class-private @foo on any object, but only the class could define an @foo property.

DH/AWB: (Discussion of pre-defined fields on class instances.)

AR: Similar to my constructor pre-amble...

LH: (Summarizing) No clash between the use of symbols at a lower level.

YK: Imagine a map literal...

AWB: Hypothetical Map that used [] for key, might use symbols for keys in that map, now there is an ambiguity at access time.

LH: Care about not having private names becoming lexical scopes

AWB, WH: (in response to question about why @'s are necessary) In the past we've attempted to work through several proposals that don't and it never works

ARB: Concern with meaning of @-syntax being dependent on context: sometimes denotes symbol itself, sometimes value it indexes. Might potentially be ambiguous in some circumstances, e.g. modules

MM: State a proposal:

  • We don't have in ES6: a private or special declaration form.
  • We allow @identifier, that is a symbol let @foo = Unique();
  • After a dot, in property name position, @foo does not refer to a new literal @foo, it refers to the value of the lexically enclosing @foo. We address Andreas's issue with modules separately.

DH: b/c tied to variable declaration forms, no way to know upfront what one of these names is.

AWB: Clarify...

DH: (Re-explains)

AWB: (refutes)

DH: What I was hoping for was declarative syntax closing in... but realize it's totally generative.

ARB/LH: This is a hack

DH: The syntax looks static but is not at all.

MM: Is the hack a subset of all the non-hack things we want?

DH: This shows the same problems as we discussed earlier.

AWB: This what symbols are...

MM: The "@" is what makes it clear that this is not static

DH: You could say the same thing about brackets.

MM: Always knew @ was dynamic. Opaque, unforgeable and generative.

ARB: (to DH), Once this is defined in a dynamic context it becomes dynamic.

WH: (illustration of perceived hoisting and dynamic rebinding issues)

1
2
3
4
5
6
7
8
9
class C {
private @name;
f() {
for(...) {
x.@name = 5;
}
var @name....
}
}

DH/MM: (discussion of future additions)

BE: We already have with nested function declarations name binding and generativity. Why is it ok for function, but not symbol?

DH: Punning the syntax to make it look static, but it's not.

BE: agreed, that was the fork we took to a bad path, punning "after-the-dot identifier"

DH: People rightly complained early on about static understanding/knowable aspects of syntax. (eg. do I have to look up in scope to know what prop means in { prop: val })

AWB: Most developers will align [] with dynamic property access, vs. .@foo aligns with "static" property name access.

LH: Clarification that we're not talking about the object literal case, but in fact the non-breakable, historic language syntax of property access with []

BE: (Hypothetical future with object [] reformation)

Discussion about implications of hypothetical future with object dereference reformation with ES6 objects.

MM: (to

LH: Moving back to the conservative position to build up from

AWB: Still have symbols

LH: Yes

YK: This is the max/min problem, writ large.

MM: Reminder of workload, wherein ES7 should look like just another phase of development and it's ok to defer to ES7.

AWB: Return to where we were before @-names were introduced

MM: yes

YK: Returning to [iterator]?

Yes.

LH: Still support Mark's proposal (see above)

DH: Only strict mode you get the duplicate error?

MM: true

DH: Could do semantics of strict mode and allow the collision

MM: I don't think this introduces a strict mode runtime tax.

link Conclusion/Resolution

STH will provide a summary.

  • Symbols, unique and private are runtime concepts
  • Only additional syntactic support for them in ES6 is the square brackets in literal forms.
  • Strict object literals throw on collision. (Today, duplicate checks happen at compile time, this will no longer be the case when [prop]: val is used in an objlit)
1
2
3
4
5
6
7
const s1 new PrivateSymbol();
const s2 = s1;
var x = {
[s1]: 33,
[s2]: 44
};

In this context, within the square brackets: AssignmentExpression

(Re: Symbol constructor binding: http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard)

link Experience With TypeScript

Presented by Luke Hoban (slides at http://sdrv.ms/W21q9e)

Findings... Classes: Statics

  • Statics are used frequently
  • Imperative update is awkward when using an otherwise declarative construct

Classes: Privates

  • Frequent asks for Privacy
  • TypeScript added compile-time-only privacy
  • Not quite the same as current private names syntax proposal
    • w/o further sugar private names syntax proposal will feel awkward in practical class

Classes: Automatic base constructor calls

  • Missing super calls

ArrowFunctions

  • Want thin arrow

Classes: Decorators

  • w/ classes available, teams want to use them
  • Biggest block is when existing class library supported some extra "magic" associated w/ class/method declarations
  • No solution yet, not sure what this looks like.

MM: (re annotations) Note that "@" is no longer reserved for ES6...

DH: Point out that we are future proof here.

MM: Let's postpone discussion of the feedback

Modules

  • ES6 modules
  • compiled to JS which uses AMD/CommonJS ...

Modules: Namespaces

  • Two common patterns for large code structure
    1. On demand loaded modules
    2. Namespace objects to reduce global pollution
  • External Modules address #1
  • TypeScript allows internal module re-declaration to grow the object
    • Effectively, a declarative form for object extension with build in closure scope and syntax that matches large scale structuring use cases well.

LH: (the transition from AMD/CommonJS of today to modules a la ES6 is not going to be an easy transition)

Loading order...

LH: When you have circular references, current modules make it appear easy to ignore these issue.

Modules: "modules.exports =" use case

  • Not addressed in TypeScript
  • Critical for interop with existing CommonJS/AMD code
  • Supportive of "export =" syntax proposal
1
2
3
4
5
6
7
8
// something.js
export = function() {
return "something";
};
// other.js
import something = module("something");
var s = something();

DH: (whiteboard)

1
2
3
4
export = function() {};
---------------------------------
import "foo" as foo;
foo();

Async

  • Top requested addition for TypeScript is C# "await"-style async
  • Generators + task.js help, but likely not enough
    • Wrapping is still very unnatural in any real examples
  • But light sugar over generators + task.js would serve
  • Feeds into promises discussion - have to standardize the task objects.

(shows example for task.js and identifies "spawn" which returns a promise object)

Mixed discussion about the history of async discussion through generators, promises, Q.async

link Modules Update

Presented by Dave Herman

(whiteboard)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Modules looked like...
module X {
export module Y {
}
}
// Moved to...
// "foo" doesn't bind anything into this scope,
// just adds to the module registry
module "foo" {
module "bar" {
// no more exporting...
}
}
module "foo/bar" {}
"bar" is not exposed as a property of "foo"
import "foo/bar" as m;

AWB: (clarification of his understanding of the original way that nested modules work)

STH: Yes, that was the way, but there was a realization that much of the earlier approach was flawed and these updates lead to revisions.

One important use case for modules is to configure module references, so that libraries can import jQuery (for example), and get the appropriate version of jQuery specified by the page. Further, it's desirable to be able to use different code for the same library name in different context. Originally, the modules proposal managed this via lexical scope, as follows:

1
2
3
4
5
6
7
8
9
module M1 {
module jquery = "jquery.js";
module something = "something_that_uses_jquery.js"
}
module M2 {
module jquery = "zepto.js";
module something_else = "something_else_that_uses_jquery.js"
}

However, this has two major problems: Inheriting scope across references to external files is potentially confusing, and disliked by a number of people Once we decided to share instances of the same module, the "parent scope" of a module is no longer well-defined

Therefore, we abandoned the idea of inheriting scope across external references. However, this had two consequences that we did not immediately appreciate. First, we no longer had a method for managing this configuration between module names and source code. Second, scoped module names no longer had nearly as much use as originally.

Thus, Dave and I revisited the design, abandoning the use of lexical scope for managing module names, and introducing module names that could be configured on a per-Loader basis.

DH: The registry with the string names is now where the sharing mechanism occurs.

Loader...

1
2
3
4
System.baseURL = "...";
System.resolve = function(...) {
...
};

link Mixed discussion...

  • "global namespace" as in "per realm"
  • <

ARB: This seems to create a parallel global object for modules. Giving up lexical scoping for one global namespace.

DH: There is no way to get rid of the global object

STH: Yes we tried.

DH: (explanation of registry table)

  • Per loader

MM: Separate name registries?

DH: Either are fine

...Provide a minimal set of APIs to allow devs to build there own. ...Sane default behavior ...Default resolution: - baseURL + "Crypto/sha1" + ".js" when no config has been done, this is the base default behavior.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// foo.js
export = 42;
// bar.js
export function bar() {
}
// foobar.js
module "foo" {
export = 42;
}
module "bar" {
export function bar() {
}
}
1
2
3
4
5
6
7
<script>
System.baseURL = "assets/";
</script>
<script async>
import "foo" as foo;
import "bar" as bar;
</script>

WH: What happens if... import "foobar" as fb; (given the above "files")

STH: Answer: fb is an empty object. You also get modules named "foobar/foo" and "foobar/bar" defined.

[WH's question was related to a claim in the discussion that there is no need to have module .js files be distinguishable at the textual level from top-level script .js files]

Mixed discussion w/r loading protocols... and resource loading (files from server, etc) seems to be out of scope?

DH: How is there anything special about JavaScript as the one asset to know about in browsers?

1
<link rel="prefetch"...>

BE: Before imports, prefetch dependencies... but an out of line module import is not a hint, it's a requirement.

DH: Help the browser know in advance about its...

AR: a "prefetch" attribute for scripts? Requests script but doesn't execute.

RW: Until import?

AR: Yes

EF: Don't want to prefetch lazily loaded code later in the program. Don't want to load packages with same dependencies twice.

Bundle A, Bundle B Each share common dependencies. Leads to unbounded number of combinations of pre-build bundles.

A loader should have a way which it can be told, upfront, about the dependency graph. Allowing the system to know all dependencies in advance, so that it doesn't have to compute transitive dependencies for all, every time—to make smart choices about IO.

jQuery UI Team Meeting – Nov 28 2012

  • Working on multiple version support in download builder.
  • Working on moving all sites to new markup/CSS.
  • Landed support for indeterminate progressbars.
  • Deleted everything in SVN trunk and branches.
  • Added TestSwarm jobs for 1-9-stable.
  • Clearing out pull request queue.
  • Landed dialog accessibility updates and API redesigns.
  • Working on mergatron improvements to support jQuery projects.

Ecma/TC39 Meeting – Nov 27 2012

link November 27 2012 Meeting Notes

John Neumann (JN), Norbert Lindenberg (NL), Allen Wirfs-Brock (AWB), Waldemar Horwat (WH), Brian Terlson (BT), Luke Hoban (LH), Rick Waldron (RW), Eric Ferraiuolo (EF), Matt Sweeney (MS), Doug Crockford (DC), Nebojša Ćirić (NC), Yehuda Katz (YK), Erik Arvidsson (EA), Mark Miller (MM), D. Herman, Sam Tobin-Hochstadt JN: (Identify missing members or those that will be here tomorrow)

...Welcome and introductions.JN welcomed members and introductions were made. DC gave us facility and logistical information. Dinner for Wednesday is set for 6 PM.

JN# Previous Meeting Minutes

JN: Review and approve?

RW: Confirm that l have had opportunity to review prior to submission.

JN: Minutes from Sept 2012: Approved.

Review and approval of agenda. Labeled as rev42 will be sent to Patrick for publication.

link ES6 feedback via TypeScript

LH: Move TypeScript feedback update to later, as part of module discussion.

link Review Proposals for inclusion in ES6

JN/AWB: Discussion re: harmony:proposals page and status of listed items.

link Spread Operation accepting Iterables

RW: SpiderMonkey has implemented spread to accept iterables despite the resolution from July. Would like to revisit the resolution.

DH: The implementation was likely just a misunderstanding, will file a bug for these notes.

EA: Let's add to the agenda for further discussion.

link Agenda Discussion

Missing agenda items re-added.

Begin Technical discussion as item 4 on agenda

link Review of new draft spec

AWB: Summary of changes in recent spec. drafts, including:

  • Global declaration instantiation added, "global object + lexical scope" model.
  • Program is now Script
  • Set/Map size is now an accessor
  • Set/Map clear method added

Notably, size is the first accessor defined by the spec.

DH: There will be more accessors defined in the module loader spec.

EA: Ensure no prototype for methods, should behave the same as spec functions.

AWB: Explains how the spec language is laid out for accessors, wherein "get" or "set" is prepended to the section item's title.

RW: (agrees that it's clear to follow)

AWB: This is the first rev. that brings in Proxy, which leads to the restructuring of early sections and internal methods.

Section outlines...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
6. Source
7. Lexical Grammar
8. Type
Abstract Engine
Language
Lex
Syntactic
Vocabulary
9. Helper
10. call/return/scoping
11. expressions
12. statements
13. functions
15. Libraries

Explanation of rationale leading to the restriction and reorganization of internal methods for defining spec behaviors. Leading into the organization of...

link Meta Object Protocol, aka. MOP

Discussing section on invariants and how to redefine in a reasonable way. We need people who are interested in these invariants to make contributions to this section.

8.1 Language Types 8.2 Specification Types

8.3-8.5 Will be moved to after section 10, these define the concrete types

8.3 Ordinary Object - an object that uses the standard MOP semantics in 8.3. example: Objects, Function objects

8.4 Exotic Objects - any object that is not an Ordinary Object, which means anything that specifies the use of something that is not in the MOP. examples: BoundFunction, Arrays, Strings

Standard Object - any object defined by the specification.

WH: why is BoundFunction exotic?

AWB: the special semantics of [[Call]] and [[Construct]]

WH: Does this mean that all built-in functions eg. Math.sin are exotic? This labeling bothers me if the user might be able to define differences between ordinary/exotic

LH: Why aren't all objects exotic?

AWB: initially set out to replace Host Objects, initially defined as anything that has redefined its internal methods

LH: Are there any checks, "is this an exotic object"?

AWB: No, this just simplifies and cleans up the language to that describes an object that has "special" semantics

WH: Do you identify all built-ins as exotic?

AWB: Reads back from Built-In descriptions in rev12

STH: Seems like it's simply a way to ease the pains of editing the spec.

AWB: [Further explanation of

WH: ?

AWB: Every algorithm in chapter 15 is the definition of the algorithms used when [[Call]]. In a situation where we need to reify concepts where we're not sure what the execution context currently is... eg. generators

WH: How does execution context come into this discussion

AWB: The spec needs to be able to discuss these semantics (gives example)

NL/WH: How is this observable if the implementation may or may not be provided in ECMAScript code?

AWB: Only need a means by which to explain the semantics.

I need to be able to talk about the execution context of a chapter 15 function while in a chapter 15 function algorithm

DH: I'm not sure this concept of an exotic object is the best way to go about this.

AWB: At this point we're talking about chapter 15 issues, not specifically exotic objects.

DH: I think this is good to signal to implementors that something different will have to occur.

STH: This is simply a tool to aid in the editing process.

DH: Not an annex, good.

AWB: Correct, the different semantics are grouped where they actually belong.

WH: I still don't understand why there is a grouping of these types of objects.

AWB: Please review the spec... If there are any strong arguments, please share.

AWB/DH: Confirm the subject matter of sections 8.3 and 8.4

RW: (stated prior to beginning of meeting) This change makes reading, understanding and following the varying behaviors easier to follow.

WH: Reading 8.4.6 and can't follow the description...

AWB: There are issues that exist due to prior hacks (not authored by me).

STH/LH: As long as this is just a spec tool, there is nothing wrong with the chosen categorizations.

AWB: For those of you reading the spec, please re-familiarize yourself with the new terminology.

LH:

AWB: The risk for semantic change... some methods renamed, some may have different behaviors. No change to observable semantics

DH: Don't remember the proto climbing refactoring

AWB: Tries locally, then same operation on next level. Each step up is observable via proxies.

DH: not web dependent

WH: if it's not visible, why do implementations need to change?

AWB: In the presence of proxies, proto climbing is visible. The difference... What [[Get]] in the old system did was loop, instead of recursion. If a prototype was a proxy, the trap would never be invoked. In the new system, it will. The property access system needed to change to support this...

DH: We'll get feedback from proxy implementors

AWB:

MM: There are two engine based proxy implementations, SpiderMonkey and v8—let's wait to discuss the impact.

BT: So there is a low risk of semantic change in 8.x? (with no regard for proxies)

AWB: Should be no observable semantic change and this should be confirmable with tests and reviewers. ...Will add a description of what should be observable and not.

Another change happening in this edition, is specifying where each exception is thrown. Previously this was implicit, but is now explicit.

WH/AWB: review 10.2.1.2.6 use of ReturnIfAbrupt(value)

LH: was there concern of ambiguity before? Seemed clear...

AWB: There were places where it was unclear where the the exception should be thrown, Mark had identified the loop in ??

...Discussion about explicit exceptions

DC: Need to break.

WH: Throw on string concat over allowed length?

...Discussion about ReturnIfAbrupt...

LH: Is this a maintainability issue? If a new leaf addition is defined that uses ReturnIfAbrupt, do you have to check all call sites?

AWB: The work is already done.

... Discussion.

link Break.

link Meeting Notes - Publish to wiki

(side discussion, but valid to document)

link Conclusion/Resolution RW to publish meeting notes to ecma wiki (in addition to publishing on es-discuss and submission to ECMA)

link Internationalization Update

NL: (Summary of changes based on feedback) Spec document submitted to general assembly for approval. HTML version of the spec has been prepared, will be posted to ECMA site after GA approval. Demonstration of test402 (INTL spec testing) running on Firefox (special build, not in Mozilla repository yet).

NC: v8 Implementation has regressed, due to clean up of defineProperty use.

LH: Has an IE plugin impl., next phase is to implement directly

LH: Should have discussion re: spec intention that all checks whether this is an instance Object, is this cross-realm? or this realm?

AWB: Yes, let's discuss this. Clarify...

NL: Any questions re: Internationalization 1.0?

JN: What is the plan w/r to hosting and maintaining test402

NL: Any company that wants to invest resources into contributing tests and maintaining?

BT: Can't say specifically, but Microsoft will certainly be contributing tests

NC: Same for google

JN: Anything for submission to the GA?

NL: We'll provide a technical report of some form for submission. Will provide the number of tests, (approx) and that coverage (missing and not) is understood.

link International 2.0

(get slides from NL)

(1) Complete Spec Sep/Nov 2013 TC39 approval March 2014 GA approval June 2014

MM: Be aware of possible delays in ES6

(2) Prioritization

(3) High (Or part of ES6?)

  • Unicode normalization
  • Case Conversion
  • Character properties in RegExp or as API

Discussion re: unicode, changes in ES6 to RegExp re: unicode No changes are in draft yet.

(4) High (cont)

  • IANA timezone IDs in DateTimeFormat
  • Chrome 24+ has impl
  • Message Formatting, including gender and plural handling
  • Not clear how template strings fit in

RW/NL: agree to loop Alex Sexton into the work on message formatting specification.

(5) Wait

  • DateTimeFormat improvements
  • Need feedback on 1.0
  • Pattern strings, highlevel specifiers
  • Info for date pickers
  • Date intervals, relative dates, durations?
  • Expose ToLocalTime?

(6) Wait

  • Resource Bundles
  • Needs investigation
  • Maybe module system can be used?

WH: How are resource bundles different from JSON?

NL: That's generally how they are stored, the challenge is loading the right bundle for the application's current locale

DH: can this be stored compressed in a binary format?

AWB/LH/YK: (discussion and agreement on HTML/CSS involvement in resource bundling is too browser-centric)

WH: Rather than providing a method that loads a bundle from some web page (which will likely clash with how a particular web server is structured), provide utilities such as decoding a bundle from a string and selecting the right bundle (e.g. the current language's) from a list of bundle names.

MM: Abstract the problem to a data loading issue

EF: Whose job is it to define the information in a resource bundle?

EF/NL: generally the library or application using the data has to define its structure and provide bundles for the locales it wants to support; there is an issue when third parties want to add more locales

(7) Medium

  • Text segmentation: word and line breaks
  • Editors, offline indexing...
  • Chrome already has impl
  • Browsers names for languages
  • Display names for languages, countries, scripts
  • Number parsing - no currencies/percent/dates

MM: Presumably there are other standards bodies that we can use the data from.

WH: This gets into the political issue of what countries are called based on local law. Is Taiwan a country?

(8) Medium/Low

  • Calendar Support
  • Info for date picker
  • Conversion between calendars
  • Calculations within calendar (add 3 days)

(9) No

  • Title case, too many house rules
  • Language Detection, too specialized
  • Encoding detection and conversion, value decreasing.

(10)

  • Script reording in Collator
  • Pseudo-numbering systems in NumberFormat and DateTimeFormat

(11) Approval?

JN: Who is working on this?

NL: First meeting had representatives from Mozilla, Google, Microsoft, Amazon.

JN: Will provide minutes of meetings to ECMA?

NC: Yes.

JN: Despite potential operational changes from ECMA, let's move forward with this project. Continue to report as adhoc group via this group.

link Conclusion/Resolution

TC39 Approves to move forward with 2.0. NL will submit slides to ECMA for minutes record.

link String Normalization

http://wiki.ecmascript.org/doku.php?id=strawman:unicode_normalization#add_normalize_method

NL: AWB has removed a number of references to normalization from the current spec that did not reflect reality

String.prototype.normalize(form)

MM: Any sequence of utf-16 has a valid, specific normalization?

NL: Will have to check if the normalization spec has anything about unpaired surrogates.

MM: Either we make the function total, in the sense that it always returns a string, or total in the sense that we define where it throws exception.

NL/LH: (agree w/ always return a string)

NL: Are we in agreement to spec this?

MM: Requirements: (moved to resolution)

link Conclusion/Resolution

Yes, requirements:

  • total,
  • deterministic
  • idempotent normalization (normalizing the result of normalization again will return the first result)

WH: Note that Unicode got this wrong a while back (their normalization algorithm wasn't idempotent, and it didn't even form proper equivalence relations). They fixed it since then and now explicitly state that it's idempotent.

link String Case Conversion

http://wiki.ecmascript.org/doku.php?id=strawman:case_conversion

LH: Why isn't this in the Internationalization standard?

AWB: Is there a reason this isn't in the Intl 1.0?

NL: Case conversion wasn't considered in original scope for Intl 1.0; we then forgot to add it when respecifying String.prototype.localeCompare and friends.

RW: There is a Case Conversion item in Intl 2.0, is this the same?

NL: Correct, but these functions are in Language spec. Should this be added to ES6?

AWB: Don't think that we should start moving Intl into ES, or at least not until ES7

NL/LH: Not being in ES6 doesn't prevent implementation or spec authoring.

LH: Doesn't need to be in the wrong spec just to move forward.

link Conclusion/Resolution

Goes in Internationalization but doesn't prevent specification or implementation.

link Eliminate ToUInt32() warping on array access

AWB: Sparse parameter on Array iterator constructors (eg. Array.prototype.keys/values/items that determines whether or not "holes" are included in the iteration.? Can we eliminate functions returning Reference values from the specification

AWB: Arrays use ToUint32, which does modulo arithmetic.

WH: Yes, but it doesn't actually warp indices. Ones larger than 2^32-2 are not array indices; they're not treated modulo 2^32.

WH: Also note that strings such as "0.0" and "007" are intentionally not array indices either, even though they're within the array range. The array index code checks that the value round-trips to a number and back to the same string; this is what keeps indices over 2^32-2 from warping.

MM: What are the practical benefits of this?

AWB: 2 Things, we could do this at 2^53 and truncate there instead of warping

MM: Is there a history of implementors that have worked out these issues?

AWB: Every new array(like) operation needs to have this behavior

DH: Concern that this will break the web

AWB: IE had a problem for a long time that went nearly unnoticed.

MM: strategic to postpone this cleanup until we have integers. Don't see a reason to make this change

DH: Concerned about code that would even have arrays this large

AWB: The point is to avoid craziness after 2^53

MM: What is the handling of the 2^53 edge condition that this change will benefit?

AWB: I have to review the spec and can follow up tomorrow.

Look at 15.4 of ES5.1, when you go over the edge, results in expand properties being set on the array. Additionally, the 2^32 edge condition:

1
2
var a = [];
a[Math.pow(2, 32) - 1] = true;

link Conclusion/Resolution

Tabled until AWB has further impact research.

link The prototype/constructor object model supporting Generators/use of instanceof with generators and generator instances

AWB, presents UML diagram to illustrate...

The Generator Constructor doesn't need a global name. Assume it's accessible at System.Global.

Each generator function has a unique prototype object with own properties for next, send, throw, close, etc. These prototype types may share references to the built-in mplementations of those methods.

1
2
g1 instanceof Function; // true
g2 instanceof Function; // true

But no way to test if either g1 or g2 is a generator function rather than an ordinary function. ...

Possible Solutions:

  1. Make Generator a subclass of Function, allows instanceof checking (on some kind of special System object)
  2. Make a global built-in Generator constructor
  3. @@hasInstance(): void

Anomalies...

  1. instanceof will be true for non Generator functions
  2. g1.constructor === "Generator"?

DH: If we go against the behavior of the language we'll end up with...

MM: Agree up until the reflective Generator

DH: Function creates function, Generator creates generator

YK: Anything other than that is pure WAT.

AWB: Need to get our terminology straight.

MM: Going forward, we've created this class system... Having Generators be a subclass...

lost track, sorry. Hope Mark can fill this point in later.

YK/MM/LH: like...

1
2
class Generator extends Function.prototype {}
class g* extends Generator {}

DH: The way to check "is this a generator?"

1
Object.getPrototypeOf(f) === "Generator";

MM: Of all the things we're talking about, creating Generators reflectively is the least concern. Something like...

Function.makeGenerator(...); returns generator function

... If that was important to provide, but likely not.

MM/LH: Generator is a zero-arg, no-op.

LH: Reiterates that class g* extends Generator {} clarifies thinking about the diagram

DH/LH: (Discussion of this inside Generator)

MM/AWB: (Converge on diagram of inheritance relationship)

DH: Which parts do we surface as public API?

MM: Abstaining.

DH: Important to retain Python naming to avoid WAT. Ok with not surfacing anything to public API

WH: Would like to at least expose "Generator". [Note: the object I was referring to got renamed to "GeneratorFunction" later in the discussion and further down in the notes here.]

DH/WH: (Disagreement on exposure of public API)

AWB: Need a value for .constructor

DH: Ok, .constructor dictates the requirement.

MM: Does this mean that if you call the Generator constructor with a yield?

AWB/RW: Error

??

DC: Are we adding Generator because it qualifies as important enough to stand on its own?

DH: Reflective evaluation is powerful enough to stand on its own. A huge gulf between with

MM: There is no immediate benefit...

WH: It's easier to include then to exclude it, for spec benefit.

MM: Agreed, only benefit is specification symmetry.

WH: Function does reflection, so it makes sense.

MM: Consensus on exposing GeneratorFunction via some imported module?

All: Yes.

MS: Can I determine if an object is a generator function?

DH:

1
2
3
f instanceof GeneratorFunction;
f.__proto__ === GeneratorFunction.prototype;
f.__proto__ === (function *() {}).__proto__;

link Conclusion/Resolution