bcpierce00/unison 2000
Unison file synchronizer
Track when you have done a review in org mode
Certified LambdaJS semantics and interpreter.
The missing package manager for OS X.
opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
TC39 meeting agendas
Website for serving Pyret to folks.
An Emacs configuration for the stubborn martian vimmer
Status, process, and documents for ECMA262
issue closedtc39/proposal-pattern-matching
Can pin operator work with regex binding?
I like the idea of generating bindings from capture groups. However, how should it work with the pin operator?
const regex = /(?<left>\d+) \+ (?<right>\d+)/;
match (res) {
when (^regex) { process(left, right); }
}
If the pin operator works and the res is then compared with the evaluated regex, then left and right is not statically analyzable.
If the pin operator does not work (maybe a runtime error when regex is not a primitive value?), this feature becomes a refactoring hazard because the regex in the WhenClause can not be reused.
We could require that for regex one must manually offers the capture groups:
const regex = /(?<left>\d+) \+ (?<right>\d+)/;
match (res) {
when (^regex as { groups: { left, right } } ) { process(left, right); }
}
Related: #189
closed time in 2 minutes
JLHwungissue commenttc39/proposal-pattern-matching
Can pin operator work with regex binding?
Closing as it works as expected. Thanks for clarifying!
comment created time in 2 minutes
issue closedtc39/proposal-pattern-matching
Do we support regex matching nested in structures?
The readme example has
match (arithmeticStr) {
when (/(?<left>\d+) \+ (?<right>\d+)/) as { groups: { left, right } } { process(left, right); }
else { ... }
}
where the as { groups: { left, right } } is after when ( ... ). However, I think it should have been
match (arithmeticStr) {
when (/(?<left>\d+) \+ (?<right>\d+)/ as { groups: { left, right } } ) { process(left, right); }
else { ... }
}
since it can be extended for nested cases:
match (res) {
when ({
input: /(?<left>\d+) \+ (?<right>\d+)/) as { groups: { left, right } },
direction: 'N' | 'S' | 'W' | 'E',
}) { process(left, right, direction); }
else { ... }
}
closed time in 3 minutes
JLHwungissue commenttc39/proposal-pattern-matching
Do we support regex matching nested in structures?
@mpcsh @ljharb Thanks! I confused as with with in previous examples. https://github.com/tc39/proposal-pattern-matching/issues/188#issuecomment-837783929 works for me.
comment created time in 3 minutes
issue openedtc39/proposal-intl-numberformat-v3
Improve readability of SetNumberFormatDigitOptions
https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/diff.html#sec-setnfdigitoptions
I suggest we change 15. If hasSd or roundingPriority is not "auto", set needSd to true; else, set needSd to false. to 15. If hasSd is true or roundingPriority is not "auto", then set needSd to true; else, set needSd to false.
I suggest we change 16. If ( not hasSd and notation is not "compact" ) or roundingPriority is not "auto", set needFd to true; else, set needFd to false. to 16. set needFd to false. 17. If hasSd is false and notation is not "compact", then set needFd to true. 18. if roundingPriority is not "auto", then set needFd to true.
created time in 5 hours
push eventtc39/ecma262
commit sha 1988e69dd272d7b0931c5b0062dce692a1d4512f
Update gh-pages [skip ci]
push time in 7 hours
push eventtc39/agendas
commit sha 1cf23005dadec2c73b614f49d39ec13767206703
Add Intl.NumberFormat v3 for Stage 3
push time in 7 hours
Pull request review commenttc39/ecma262
Editorial: Add support for Abstract Closures to `CreateBuiltinFunction`
<h1>[[Construct]] ( _argumentsList_, _newTarget_ )</h1> </emu-clause> <emu-clause id="sec-createbuiltinfunction" aoid="CreateBuiltinFunction">- <h1>CreateBuiltinFunction ( _steps_, _length_, _name_, _internalSlotsList_ [ , _realm_ [ , _prototype_ [ , _prefix_ ] ] ] )</h1>- <p>The abstract operation CreateBuiltinFunction takes arguments _steps_, _length_, _name_, and _internalSlotsList_ (a List of names of internal slots) and optional arguments _realm_, _prototype_, and _prefix_. _internalSlotsList_ contains the names of additional internal slots that must be defined as part of the object. This operation creates a built-in function object. It performs the following steps when called:</p>+ <h1>CreateBuiltinFunction ( _behaviour_, _length_, _name_, _internalSlotsList_ [ , _realm_ [ , _prototype_ [ , _prefix_ ] ] ] )</h1>+ <p>The abstract operation CreateBuiltinFunction takes arguments _behaviour_, _length_ (a non-negative integer or +∞), _name_ (a property key), and _internalSlotsList_ (a List of names of internal slots) and optional arguments _realm_ (a Realm Record), _prototype_ (an Object or *null*), and _prefix_ (a String). _internalSlotsList_ contains the names of additional internal slots that must be defined as part of the object. This operation creates a built-in function object. It performs the following steps when called:</p> <emu-alg>- 1. Assert: _steps_ is either a set of algorithm steps or other definition of a function's behaviour provided in this specification.- 1. If _realm_ is not present or _realm_ is ~empty~, set _realm_ to the current Realm Record.+ 1. Assert: _behaviour_ is either an Abstract Closure, a set of algorithm steps, or some other definition of a function's behaviour provided in this specification.+ 1. If _realm_ is not present, set _realm_ to the current Realm Record. 1. Assert: _realm_ is a Realm Record. 1. If _prototype_ is not present, set _prototype_ to _realm_.[[Intrinsics]].[[%Function.prototype%]].- 1. Let _func_ be a new built-in function object that when called performs the action described by _steps_. The new function object has internal slots whose names are the elements of _internalSlotsList_, and an [[InitialName]] internal slot.+ 1. Let _func_ be a new built-in function object that, when called, performs the action described by _behaviour_. The new function object has internal slots whose names are the elements of _internalSlotsList_, and an [[InitialName]] internal slot.
1. Let _func_ be a new built-in function object that, when called, performs the action described by _behaviour_ using the provided arguments as the values of the corresponding parameters specified by _behaviour_. The new function object has internal slots whose names are the elements of _internalSlotsList_, and an [[InitialName]] internal slot.
per discussion.
comment created time in 7 hours
issue closedtc39/proposal-intl-numberformat-v3
From @FrankYFTang:
is that true, with your change passing
Symbol(12) [] {} as input to format(), formatToParts() or formatRange() will throw TypeError
closed time in 7 hours
sffcissue commenttc39/proposal-intl-numberformat-v3
I pass everything except BigInt through the ToNumber function:
https://tc39.es/ecma262/#sec-tonumber
This implies that Symbol will trigger a TypeError, as it does now, but not the other ones like [] and {}. This part of the behavior of the spec should be unchanged.
Feel free to reopen if I missed something.
comment created time in 7 hours
push eventtc39/proposal-intl-numberformat-v3
commit sha 5e0711377545627d03b7c01b03d3d86c51aa750d
Editorial README fixes
commit sha 9ce009aa7d66e4b962901b12f485b77912f3bcbb
Re-generate HTML
push time in 7 hours
push eventtc39/proposal-intl-numberformat-v3
commit sha b10389ebbb2c3dc390f0fca0341d9fa110b8c8fa
Fix NaN handling. Fixes #39
push time in 7 hours
issue closedtc39/proposal-intl-numberformat-v3
From @FrankYFTang:
Also in the README.md it said
Ranges to infinity are supported, but if either value is NaN, an error is thrown. (#12)
nf.formatRange(500, 0/0); // RangeError
But I have a hard time figuring out where in the spec to throw the NaN now. I don't think ToIntlMathematicalValue will throw if the value is NaN right? https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/diff.html#sec-partitionnumberrangepattern
If x is a non-finite Number or y is is a non-finite Number, throw a RangeError exception.
What is the definition of "non-finite Number" ? Is NaN a "non-finite Number" ? I cannot tell https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/diff.html#sec-partitionnumberpattern surely won't throw if NaN because
If x is NaN, then Let n be an implementation- and locale-dependent (ILD) String value indicating the NaN value.
closed time in 7 hours
sffcpush eventtc39/proposal-intl-numberformat-v3
commit sha b2d1502c8173387908b0bfc3a1f16885c767b12b
Fix range checks in PartitionNumberRangePattern. Fixes #37
push time in 8 hours
issue closedtc39/proposal-intl-numberformat-v3
Possible bug in PartitionNumberRangePattern
From @FrankYFTang:
I think this is a bug in your current spec
nf.formatRange(500, 1/0); // "3–∞" https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/diff.html#sec-partitionnumberrangepattern
1.1.21 PartitionNumberRangePattern ( numberFormat, x, y ) ... If x is a non-finite Number or y is is a non-finite Number, throw a RangeError exception.
Should it be an "and" here? and there is a double "is" (editorial issue)
closed time in 8 hours
sffcpush eventtc39/proposal-intl-numberformat-v3
commit sha 76887d45717cc2deb7a6d9ca54488b97b9510d30
Fix #35
commit sha 3efb67ff8117ffb5100826a6290fe85090445ab1
Re-generate all HTML files
push time in 8 hours
issue closedtc39/proposal-intl-numberformat-v3
ResolvePluralRange ( pluralRules, n ) should be ResolvePluralRange ( pluralRules, x, y )
ResolvePluralRange ( pluralRules, n ) should be 3 arguments instead of 2 and should be ResolvePluralRange ( pluralRules, x, y ) https://tc39.es/proposal-intl-numberformat-v3/out/pluralrules/diff.html#sec-resolvepluralrange
closed time in 8 hours
FrankYFTangissue closedtc39/proposal-intl-numberformat-v3
Update spec to reflect latest changes in README
As of #28, the README is up to date with the latest consensus. The spec needs to be updated to reflect this.
CC @FrankYFTang @ryzokuken
closed time in 8 hours
sffcissue commenttc39/proposal-intl-numberformat-v3
Update spec to reflect latest changes in README
I believe this is done.
comment created time in 8 hours
issue commenttc39/proposal-intl-numberformat-v3
Improve GetStringOrBooleanOption
@FrankYFTang LMK if my fix in 8c82d8c satisfies your suggestion.
comment created time in 8 hours
push eventtc39/proposal-intl-numberformat-v3
commit sha 8c82d8ca802662357dc3c24e951f9c1fc7dcffcf
Fix #20
push time in 8 hours
issue closedtc39/proposal-intl-numberformat-v3
Improve GetStringOrBooleanOption
Currently, https://tc39.es/proposal-intl-numberformat-v3/out/negotiation/diff.html#sec-getoption (notice the section ID should be changed from #sec-getoption to #sec-getstringorbooleanoption for GetStringOrBooleanOption instead of the one for the GetOption) have
1.2.12 GetStringOrBooleanOption ( options, property, values, trueValue, fallback ) The abstract operation GetStringOrBooleanOption extracts the value of the property named property from the provided options object. If the value is undefined, the operation returns fallback. If the value is true, the operation returns trueValue. If the value is falsy, the operation returns false. Otherwise, the operation converts the value to a String, checks whether it is one of a List of allowed values (which must not be undefined), and returns the stringified value.
- Let value be ? Get(options, property).
- If value is undefined, then return fallback.
- If value is true, then return trueValue.
- Let valueBoolean be ToBoolean(value).
- If valueBoolean is false, then return valueBoolean.
- Let value be ? ToString(value).
- If values does not contain an element equal to value, throw a RangeError exception.
- Return value.
I suggest we change it to the following to make it more generalized:
1.2.12 GetStringOrBooleanOption ( options, property, values, ^falseValue,^ trueValue, fallback ) The abstract operation GetStringOrBooleanOption extracts the value of the property named property from the provided options object. If the value is undefined, the operation returns fallback. If the value is true, the operation returns trueValue. If the value is false, the operation returns ^falseValue^. Otherwise, the operation converts the value to a String, checks whether it is one of a List of allowed values (which must not be undefined), and returns the stringified value.
- Let value be ? Get(options, property).
- If value is undefined, then return fallback.
- If value is true, then return trueValue.
- If value is false, then return ^falseValue^.
- Let value be ? ToString(value).
- If values does not contain an element equal to value, throw a RangeError exception.
- Return value.
@sffc
closed time in 8 hours
FrankYFTangissue closedtc39/proposal-intl-numberformat-v3
Clearly specify that rounding modes apply in decimal space
@waldemarhorwat, @erights, and @msaboff have at various times raised questions about the rounding modes and how they apply to this proposal. The intent is that all rounding modes take place in decimal space, after we compute the "shortest string" form of the IEEE double. I'm opening this issue to make sure we specify this clearly in the spec.
closed time in 8 hours
sffcissue commenttc39/proposal-intl-numberformat-v3
Clearly specify that rounding modes apply in decimal space
My latest spec draft performs all arithmetic using mathematical values (MVs) instead of Numbers, which should resolve this issue.
comment created time in 8 hours
push eventtc39/proposal-intl-numberformat-v3
commit sha 23bdb3173b3a217ec81330d950011e1ae60cb4db
More boilerplate
push time in 8 hours
push eventtc39/proposal-intl-numberformat-v3
commit sha ffc7e7dc85ee6b56d2efb735d0232026846da2ab
Wiring up TrailingZeroDisplay
push time in 8 hours
Pull request review commenttc39/ecma402
Editorial: Refactor SetNumberFormatDigitOptions
<h1>SetNumberFormatDigitOptions ( _intlObj_, _options_, _mnfdDefault_, _mxfdDefa 1. Let _mnsd_ be ? Get(_options_, *"minimumSignificantDigits"*). 1. Let _mxsd_ be ? Get(_options_, *"maximumSignificantDigits"*). 1. Set _intlObj_.[[MinimumIntegerDigits]] to _mnid_.- 1. If _mnsd_ is not *undefined* or _mxsd_ is not *undefined*, then- 1. Set _intlObj_.[[RoundingType]] to ~significantDigits~.+ 1. If _mnsd_ is not *undefined* or _mxsd_ is not *undefined*, set _hasSd_ to *true*; else, set _hasSd_ to *false*.+ 1. If _mnfd_ is not *undefined* or _mxfd_ is not *undefined*, set _hasFd_ to *true*; else, set _hasFd_ to *false*.
@syg @anba thoughts?
comment created time in 8 hours
Pull request review commenttc39/ecma402
Editorial: Refactor SetNumberFormatDigitOptions
<h1>SetNumberFormatDigitOptions ( _intlObj_, _options_, _mnfdDefault_, _mxfdDefa 1. Let _mnsd_ be ? Get(_options_, *"minimumSignificantDigits"*). 1. Let _mxsd_ be ? Get(_options_, *"maximumSignificantDigits"*). 1. Set _intlObj_.[[MinimumIntegerDigits]] to _mnid_.- 1. If _mnsd_ is not *undefined* or _mxsd_ is not *undefined*, then- 1. Set _intlObj_.[[RoundingType]] to ~significantDigits~.+ 1. If _mnsd_ is not *undefined* or _mxsd_ is not *undefined*, set _hasSd_ to *true*; else, set _hasSd_ to *false*.+ 1. If _mnfd_ is not *undefined* or _mxfd_ is not *undefined*, set _hasFd_ to *true*; else, set _hasFd_ to *false*.
I agree that it's more readable, but I am unsure if (1) this is a spec convention (2) it even matters.
Maybe we can ask the 262 editors about it?
comment created time in 8 hours
push eventtc39/proposal-intl-numberformat-v3
commit sha 28c201ec0f31450c02b18324371248c360be534a
Adding RoundingIncrement
push time in 8 hours
push eventtc39/proposal-intl-numberformat-v3
commit sha df0b4a90984a6c546c021d6797ec684b1b2babed
Checkpoint: adding more references to lessPrecision and morePrecision
commit sha 5659d0fae7ffbd7f030cfdbab13bf3fd0bae5935
Wire up lessPrecision/morePrecision
push time in 9 hours