01:19 | <jschoi> | https://github.com/tc39/Reflector/issues/388 says, “Sign-in form will be added before the meeting - fill in the sign-in form and you'll get the link”. Sorry for bothering, but where’s the sign-in form? |
01:25 | <bakkot> | presumably it'll be added in the next 12.5 hours |
03:42 | <Aki> | sorry i didn't get the schedule up earlier y'all |
05:31 | <Aki> | oh my look at that overflow https://hackmd.io/@tc39-chairs/rJJlSXjbF |
13:51 | <Rob Palmer> | The meeting starts in 9 mins |
13:51 | <Rob Palmer> | if anyone is having trouble joining, please say |
13:57 | <ryzokuken> | nothing to report for ECMA-402 btw |
13:57 | <ryzokuken> | and I'll try to speedrun my DurationFormat presentation |
13:59 | <bradleymeck> | Rob Palmer: don't see the sign-in form on reflector? |
13:59 | <bradleymeck> | or... i'm looking at wrong meeting... |
13:59 | <Rob Palmer> | https://github.com/tc39/Reflector/issues/388 |
13:59 | <Jamie Kyle> | Issue 388, under "Video Conference" |
14:00 | <Rob Palmer> | (we can put reflector links here, but not the signin form or the notes) |
14:00 | <Rob Palmer> | Room subject updated! |
14:10 | <rbuckton> | experiencing technical difficulties, will rejoin jitsi shortly |
14:13 | <Jamie Kyle> | oh im sorry |
14:17 | <rbuckton> | jitsi does not seem to like my webcam. |
14:18 | <Aki> | rbuckton: i saw you for a sec! |
14:19 | <Michael Ficarra> | thanks for taking that one, ljharb |
14:19 | <Michael Ficarra> | I had to step away and the moment I got back and sat down, my topic was up lol |
14:19 | <Michael Ficarra> | I just got flustered |
14:23 | <bakkot> | slides, for anyone with technical difficulties: https://docs.google.com/presentation/d/177vM52Cd6Dij-ta6vmw4Wi1sCKrzbCKjavSBpbdz9fM/edit |
14:26 | <Michael Ficarra> | I think optional catch went straight to stage 3 in one meeting and then stage 4 the next meeting? |
14:26 | <Michael Ficarra> | it was fast |
14:26 | <ljharb> | behind optional catch, fastest includes Object.hasOwn, Object.fromEntries, Object.entries/values, iirc |
14:27 | <shu> | i see |
14:27 | <Michael Ficarra> | I think there were some really fast String.prototype ones, too |
14:27 | <Ashley Claymore> | note for tcq. Item 8, change-array-by-copy. I'll be presenting, instead of Robin. |
14:27 | <shu> | i should be proposing stuff to be under Object for a faster speed then |
14:27 | <littledan> | it'd be great if we can call for explicit support for consensus |
14:28 | <Michael Ficarra> | shu: Object.at when? |
14:28 | <ryzokuken> | Ashley Claymore: IIUC, the presenter listed in TCQ doesn't matter all that much |
14:28 | <littledan> | maybe getting a couple people to support things for each stage advancement |
14:29 | <jschoi> | Where’s the question queue? Is it just the 8x8 Meet chat, or is it something special? |
14:29 | <ryzokuken> | jschoi: TCQ |
14:29 | <ryzokuken> | there's a link in reflector |
14:29 | <jschoi> | Thank you! |
14:32 | <rbuckton> | Any reason why I shouldn't tweet about static {} achieving stage 4 consensus? |
14:34 | <Michael Ficarra> | we didn't add flatMap to TypedArray? 🤔 |
14:36 | <shu> | is there a usecase? |
14:36 | <ljharb> | rbuckton: go for it, commit's pushed to the proposals repo already |
14:41 | <devsnek> | hello everyone |
14:44 | <bakkot> | we should add setAt to arrays |
14:44 | <bakkot> | solves this problem |
14:45 | <TabAtkins> | I mean we probably should add set() to arrays, if TypedArray has it |
14:46 | <TabAtkins> | kinda weird otherwise |
14:46 | <ljharb> | not stoked about adding more mutators to Array.prototype tho |
14:46 | <TabAtkins> | it's cool it's just an alias |
14:46 | <TabAtkins> | (with negative-wrapping magic, granted) |
14:47 | <devsnek> | there's a simple two step solution here:
|
14:48 | <TabAtkins> | ah yes simple |
14:48 | <shu> | hell yeah brother, we never unshipped function calls as LHS of assignments syntactically |
14:49 | <bakkot> | TA.p.set throws for negative indices |
14:49 | <bakkot> | which, I guess we could probably change that to wrap like .at |
14:51 | <bakkot> | though actually TA.p.set has this behavior where it spreads arrays which are passed, which we would probably not want to do with A.p.set |
14:51 | <bakkot> | so maybe not actually feasible to copy it over |
14:51 | <rbuckton> | rbuckton: go for it, commit's pushed to the proposals repo already |
14:52 | <ljharb> | lol you can still tweet about your own proposal even if others have |
14:52 | <ljharb> | but up to you ofc |
14:52 | <rbuckton> | Already did. |
14:53 | <bakkot> | it seems like the list of methods should be decided before stage 2? |
14:54 | <rbuckton> |
|
15:00 | <bakkot> | I don't get why everything on Tuple needs to be on Array |
15:00 | <ljharb> | a tuple is conceptually an immutable array |
15:01 | <littledan> | bakkot: One hope is that it'll be easy to write code that's generic between Tuples and Arrays |
15:01 | <littledan> | who is objecting to consensus? |
15:02 | <bakkot> | littledan: so, that seems like a good motivation for all the access methods to work. it seems like a strange goal to say you want mutating code which is generic between Tuples and Arrays, though |
15:02 | <shu> | Ashley Claymore: please work on a rough initial reduced list and link it here for interested parties before end of the plenary if possible |
15:02 | <Michael Ficarra> | I am a bit uncomfortable with how this advancement went |
15:03 | <shu> | why? |
15:03 | <littledan> | I am a bit uncomfortable with how this advancement went |
15:03 | <rbuckton> | I was about to point out that @aki's mic was making noise, but I think she said her mic went out and it seems to be better now. |
15:03 | <littledan> | I mean, the wording was a bit weird |
15:03 | <shu> | i mean the timebox rushing is uncomfortable but i don't think there was actual objection |
15:03 | <littledan> | if someone was on the queue and wanted to block, that should of course be respected |
15:03 | <littledan> | I didn't see what the queue items were |
15:03 | <shu> | since mozilla worked it out and kevin and i wanna see a list |
15:03 | <shu> | and that list... can just be communicated here, since nobody else asked for it |
15:04 | <Michael Ficarra> | I just feel like there wasn't agreement between the chairs and the rest of the committee about whether we covered everything sufficiently for advancement |
15:04 | <littledan> | it would've taken the same amount of time to ask, "is there consensus?" and give 15 seconds of uncomfortable silence for anyone to interject, as to have that argument |
15:05 | <littledan> | maybe we can add that as a blitz bonus topic |
15:05 | <littledan> | anyway chairing is hard; Aki is doing well |
15:07 | <bterlson> | The queue items weren't blockers, but in the future if we run up against timebox and someone raises a question we will move on even if there are no obvious objections. |
15:07 | <Michael Ficarra> | I am fine with moving on without advancement whenever we're even a second over timebox, but rushing advancement, whether within or without timebox, doesn't seem right |
15:08 | <Aki> | Michael Ficarra: i don't disagree. i think I should have held firm. |
15:10 | <Ashley Claymore> | Ashley Claymore: please work on a rough initial reduced list and link it here for interested parties before end of the plenary if possible |
15:16 | <Michael Ficarra> | ryzokuken: I'm still happy to review |
15:18 | <Michael Ficarra> | I ❤️ this proposal |
15:19 | <ryzokuken> | thanks Michael Ficarra 😇 |
15:20 | <Aki> | TabAtkins: & jschoi y'all want to hop on that next 30 min slot? |
15:20 | <TabAtkins> | i'm ready for it |
15:21 | <jschoi> | Ready; hoping my microphone will work. |
15:28 | <bakkot> | honestly it actually does seem a little bit analogous to shadow DOM |
15:30 | <TabAtkins> | "analogous to" isn't always great if it doesn't actually hook into the same concept tho. "this is theoretically similar to shadow DOM, but doesn't actually have anything to do with shadow DOM" can be problematic for learning. |
15:30 | <ljharb> | if it is analogous then that's a stronger argument for this name |
15:31 | <TabAtkins> | I'm not objecting, but I suspect the HTML/DOM editors might have an opinion on it |
15:31 | <shu> | i confirmed with domenic he's fine with SHadowRealm |
15:31 | <bakkot> | Domenic has been involved in the thread at least |
15:31 | <shu> | could ask anne i guess |
15:31 | <devsnek> | i don't get the analogy to shadow dom personally |
15:34 | <bakkot> | shadow dom and shadow realm both have the property of, it's a separate X where changes in it do not affect the main X except through specific boundaries |
15:36 | <leobalter> | devsnek the analogy is weak. Other than what Bakkot has said, it just indicates ShadowRealm is not the main Realm. |
15:36 | <ryzokuken> | can someone please give cjtenny access to post? |
15:37 | <ryzokuken> | devsnek the analogy is weak. Other than what Bakkot has said, it just indicates ShadowRealm is not the main Realm. |
15:37 | <ryzokuken> | something like "secondary" realm |
15:37 | <ljharb> | inb4 TertiaryRealm |
15:38 | <jschoi> | QuaternaryRealm…… |
15:38 | <ryzokuken> | can someone please give cjtenny access to post? |
15:38 | <leobalter> | The follow up candidates would be SatelliteRealm and Bubble |
15:38 | <Aki> | Schedule shifted |
15:38 | <ryzokuken> | thanks Aki |
15:38 | <ioanna> | Thank you! |
15:39 | <leobalter> | SatelliteRealm has the pretty annoying double L in between. It fails to check the "easy to spell" box. |
15:40 | <leobalter> | Bubble has subjective concerns over the meaningful item and it fails the Unique box |
15:40 | <Michael Ficarra> | okay but WHY does it need to be point-free? |
15:40 | <leobalter> | a "JS bubble" search will lead to a lot of documentation over event bubble, etc |
15:40 | <Michael Ficarra> | wow, right on cue |
15:40 | <bakkot> | yup |
15:41 | <bakkot> | nicely anticipated |
15:41 | <Michael Ficarra> | eh, still not compelling |
15:41 | <yulia> | this is a straw argument... |
15:42 | <yulia> | you could do $= for all of those |
15:42 | <Michael Ficarra> | agreed |
15:42 | <yulia> | and have basically the pipeline operator |
15:44 | <Michael Ficarra> | to be clear, I think the pipeline operator itself is alright, but I'm not convinced the placeholder syntax (% in these examples) is necessary |
15:45 | <bakkot> | Michael Ficarra: pipeline is not worth it without % |
15:46 | <jschoi> | I think a point is that people could use $= …but they often don’t. Heavily nested code occurs all the time, because people make the choice between nesting versus assigning variables (whether something with a name or $ ), and it often is in favor of nesting. |
15:46 | <bakkot> | but this is hashed out on github at length |
15:47 | <yulia> | I would prefer to have a partial application proposal. I don't see what this adds to the language other than another way to do a lot of what we can do already but in a different form |
15:47 | <Tierney Cyren> | what is the tcq code? |
15:48 | <rbuckton> | Its in the reflector thread near the bottom |
15:48 | <Tierney Cyren> | ah ty |
15:48 | <rbuckton> | Its not published here because this room's contents are public |
15:49 | <ljharb> | this placeholder isn't partial application tho, is it? |
15:49 | <ljharb> | it doesn't create another function |
15:49 | <shu> | yulia: i have concerns about readability and performance if partial application has easy to reach for syntax, personally |
15:49 | <devsnek> | ljharb i was thinking of it as a variable with a non-identifier name |
15:49 | <bakkot> | partial application also doesn't work for await or other keyword operators |
15:50 | <yulia> | thats fair, we actually have similar concerns about the performance of this proposal |
15:50 | <shu> | oh? what performance concerns |
15:50 | <shu> | i thought it could be straightforwardly compiled to be using temp vars |
15:50 | <ljharb> | devsnek: anything that's not already a possible variable name is fine with me wrt that objection |
15:52 | <Michael Ficarra> | bakkot: then have special awaiting forms? |
15:52 | <bakkot> | and yield and typeof and delete? |
15:52 | <bakkot> | ugh |
15:52 | <bakkot> | that's a bunch of new forms |
15:52 | <bakkot> | instead of one general thing that just works |
15:53 | <yulia> | shu: with the amount of potential threading we would need to do, and how it may be layered |
15:53 | <Michael Ficarra> | I just really don't think the placeholder provides any value over an arrow |
15:53 | <yulia> | we won't block alone on this, but we still aren't convinced this is worth the cost |
15:53 | <shu> | yulia: not sure i understand, like it's harder to parse? |
15:53 | <devsnek> | you want to write an arrow function in each part? |
15:53 | <yulia> | this will have a long standing impact on the languagee |
15:53 | <bakkot> | Michael Ficarra: your opinion on that question is not widely shared, as far as I can tell |
15:54 | <yulia> | oh wow my matrix is out of sync |
15:54 | <Michael Ficarra> | devsnek: only when it's necessary |
15:54 | <devsnek> | i think it would be necessary most of the time |
15:55 | <devsnek> | literally never have i worked with a fully functional-style api in js |
15:55 | <Michael Ficarra> | I work with functions of one input and one output all the time |
15:57 | <yulia> | shu: nah, it won't be harder to parse - we had some concerns because this will operate on expressions rather than functions and we would need to allow for both |
15:57 | <yulia> | and we didn't think too much about it, because we blocked before and understand the "taste" aspect here about how people want to write code |
15:58 | <shu> | yulia: i see, if there's a concrete example i'd love to see. i'm pretty neutral to slightly negative on any and all FP proposals, to be clear, and this seemed unproblematic at first glance for implementations, but might've missed something! |
15:58 | <yulia> | so if there is significant support here and people really want this, even though we are creating a second language on top of existing js syntax, even though there are criticisms of how pipeline works in bash and whether it was a wise addition, and in addition to the remove of partial application, then we aren't going to further complain |
16:02 | <yulia> | yulia: i see, if there's a concrete example i'd love to see. i'm pretty neutral to slightly negative on any and all FP proposals, to be clear, and this seemed unproblematic at first glance for implementations, but might've missed something! |
16:03 | <ljharb> | can we please add to the notes that i would like stage 3 to require a method extraction solution at stage 2? |
16:04 | <ljharb> | i can say that out loud if needed but i don't want to slow the agenda |
16:04 | <bakkot> | it was not clear to me that we were advancing with contingent consensus |
16:04 | <bakkot> | there were several objections to that |
16:04 | <bakkot> | so I am reluctant to put that in the ntoes |
16:04 | <ljharb> | the consensus today was about stage 2 advancement |
16:04 | <ljharb> | and reflects what jschoi actually said out loud already, iirc |
16:04 | <jschoi> | (It should also be clear in the notes that Hax’s current Extensions proposal does not address method extraction; it’ll have to be another extension.) |
16:05 | <littledan> | I don't think it's right to link multiple proposals this way. My understanding of our previous discussion was more like, I personally would need to see a really strong case for both pipeline and the infix form of :: to both be added to the language |
16:05 | <shu> | jschoi: going back to something you said earlier, why do you think people don't type something like $ = in practice, but will type |> ? |
16:05 | <littledan> | method extraction has no conflict whatsoever |
16:05 | <legendecas> | is bind operator dead by now? |
16:05 | <littledan> | but, also, we'd need to see a proposal written to make the case for it independently |
16:05 | <ljharb> | littledan and that is exactly my concern about pipeline advancing at all; i'd rather have neither than not have method extraction. |
16:05 | <littledan> | ljharb: The coupling was always false |
16:05 | <littledan> | I don't see how this makes method extraction harder |
16:05 | <ljharb> | the coupling is because the original :: proposal did so |
16:06 | <littledan> | yes, I am saying that is a false coupling |
16:06 | <littledan> | they are just unrelated |
16:06 | <TabAtkins> | Michael Ficarra: I'm confused about your "point free" comment. It's absolutely pointful - the point is named % . F#-syntax is point-free (unless you eta-expand manually via an arrow function) |
16:06 | <ljharb> | I don't see how this makes method extraction harder |
16:06 | <littledan> | the infix form was the form that wasn't method extraction |
16:06 | <jschoi> | legendecas: The old bind operator was supposed to do many things. I already have written a proposal that addresses one of its old use cases that Hax’s Extensions don’t, method extraction. https://github.com/js-choi/proposal-method-extraction/ |
16:06 | <jschoi> | I will present it later. |
16:06 | <littledan> | so, yes, those are related |
16:06 | <littledan> | the prefix form was method extraction. Totally unrelated. |
16:07 | <ljharb> | wait, maybe i'm confused. what do you mean by "the infix form" |
16:07 | <littledan> | the infix form was object::function(...args), which did function.call(object, ...args) |
16:08 | <littledan> | the prefix form was ::object.function, which did object.function.bind(object) |
16:08 | <littledan> | the prefix form is method extraction; the infix form is more like what will be presented later this meeting |
16:08 | <ljharb> | ah ok, then yes. i think the infix form is obviated by pipeline |
16:08 | <littledan> | I think the infix form's motivation is significantly reduced with pipeline at Stage 2, but the prefix (method extraction) is fine |
16:08 | <littledan> | this is what I mean by false coupling |
16:08 | <littledan> | however, we can't agree on method extraction yet, without an independent presentation on it |
16:09 | <jschoi> | shu: We know that people often don’t already write $= or temp = , because deeply nested expressions occur all the time in real code. But there seems to be strong community pressure to have some sort of pipe operator in order to be able to decompose statements into linear chains, e.g., The State of JS 2020. |
16:09 | <shu> | i understand that statement of fact |
16:09 | <shu> | i'm asking for some color and conjecture on why |
16:09 | <devsnek> | what does %== do |
16:10 | <ljharb> | because temp vars are gross when they aren't adding readability |
16:10 | <ljharb> | and reassigning the same var is gross because reassignment hurts readability |
16:10 | <shu> | but in this they are, by linearizing |
16:10 | <jschoi> | devsnek: %==something is % == something . |
16:10 | <devsnek> | oh, ez |
16:10 | <shu> | pipeline is conceptually reassigning? |
16:10 | <ljharb> | right but +linearizing -tempvars -reassignment is not a net win |
16:11 | <ljharb> | pipeline is conceptually reassigning? this , which is different from reassignment |
16:11 | <littledan> | pipeline helps you have fluid APIs, i.e., just letting you deal with intermediaries logically, rather than assigning names to them all |
16:11 | <jschoi> | shu: Currently the only way to linearize deeply nested expressions is by assigning to temporary variables or declaring unary functions and composing them. (And the latter does not work with several kinds of operations like yield , of course.) |
16:11 | <shu> | i think the confusing to me is that tab's argument was about the difficulty of coming up with unique names for all intermediates, which isn't needed |
16:12 | <ljharb> | in terms of color/conjecture, reusing the same name is gross - naming each step differently can be seen as more readable even though it's not needed. |
16:12 | <devsnek> | technically you need the unique names to guard against function nesting |
16:12 | <devsnek> | but that can be a case-by-case thing when writing the multi-variable form |
16:13 | <shu> | so the question is: why not use the same binding name, and the answer seems to be there are, in the ecosystem there are independent reasons that reassigning to the same variable is already gross? |
16:13 | <shu> | i don't share that reassigning-is-gross opinion, is that a linting thing? |
16:13 | <ljharb> | i don't think any linters enforce it |
16:13 | <ljharb> | but it's def a styleguide/code review thing |
16:13 | <shu> | whence "it's gross"? |
16:13 | <Justin Ridgewell> | i don't share that reassigning-is-gross opinion, is that a linting thing? |
16:13 | <shu> | sure but please tell me why :) |
16:13 | <ljharb> | same, every time |
16:14 | <shu> | you have to understand i have like 8 general purpose regs i can work with most of the time |
16:14 | <shu> | my world is reassigning |
16:14 | <ljharb> | one reason is because reusing the same name means it's hard to distinguish between a bug or an intentional conflation |
16:14 | <ljharb> | same reason let is strongly discouraged in favor of const |
16:14 | <shu> | wat |
16:14 | <Justin Ridgewell> | My formal CS degree was with C/C++, and it's not possible to do that way |
16:14 | <ljharb> | i'm sure there's many reasons, that's just the first one that popped into my head |
16:15 | <bakkot> | ljharb: I think if you saw
you would not think it was a mistake |
16:15 | <Justin Ridgewell> | So seeing it done feels really ikcy |
16:15 | <ljharb> | bakkot: agree, but it still looks gross to me subjectively/aesthetically |
16:15 | <devsnek> | that code is difficult for me to process |
16:15 | <bakkot> | same reason let ", not "let is strongly discouraged" |
16:15 | <bakkot> | as I'm sure you are aware, not everyone shares that opinion |
16:15 | <ljharb> | sure. but it's not just me that has that opinion. |
16:15 | <sarahghp> | reassigning would get kicked out of any codebase I have ever worked on |
16:16 | <ljharb> | "let is strongly discouraged by many", if you require the qualifier |
16:16 | <devsnek> | because i need to stop for a moment and mentally remove the assignment and only focus on the right hand sides |
16:16 | <Jamie Kyle> | I do this in Rust every now and then: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=5cffe97b80fea645eb3a34b711d36ad6 |
16:16 | <ptomato> | I've more than once heard people say that const names can be better optimized by the engine and therefore you shouldn't use let |
16:17 | <shu> | that is definitely not true |
16:17 | <littledan> | I feel like reassigning is sort of logically more complicated than having a nested expression or chain of method calls. You have to think about what else might be affected, instead of just seeing the single use in the expression tree. |
16:17 | <ljharb> | whenever i've heard that i've pointed out that a) you can't know that unless you look at the engine's code and/or benchmark it, and b) perf doesn't matter, clarity does |
16:17 | <ptomato> | I didn't say I believe that, I'm saying it's an idea that's out there |
16:17 | <bakkot> | "perf doesn't matter" is, uh, also a strong claim which maybe should be qualified |
16:18 | <sarahghp> | I think many devs have learned not to reassign because that smells like global variable, bug farm code. And so socially it's not done unless it can be proven it's more performant or someone who likes it has the power on that codebase. |
16:18 | <shu> | sarahghp: thanks, that's helpful |
16:18 | <shu> | i mean, i disagree with it, but that's helpful |
16:19 | <sarahghp> | You disagree with my description of experience or you think people shuldn't think that? |
16:19 | <shu> | the latter |
16:19 | <littledan> | well, I guess as language designers, we're sort of co-creators in this shared, socially constructed reality |
16:20 | <shu> | is this an accurate summary: it is easier to try for higher quality code to forbid reassignment stylistically, and that's of higher priority even though it takes out "linearization via reusing the same temp var" as collateral |
16:20 | <shu> | but at the same time, linearization is also good style |
16:20 | <littledan> | the culture of usage patterns is just as much co-creation, alongside the definition of the language |
16:20 | <shu> | so we should do pipeline? |
16:20 | <shu> | to be clear, my disagreement is it's just fine to carve an exception for "reassignment is bad, except when linearizing" |
16:21 | <ljharb> | but also, pipeline helps with things like Object.fromEntries, where otherwise you have to nest |
16:21 | <ljharb> | or react HOCs |
16:21 | <Jamie Kyle> | Sorry quick aside, did hack-style pipelines reach stage 2? I wasn't really clear |
16:21 | <ljharb> | yes |
16:21 | <shu> | but people really want to type what they want to type, and that's fine too, i don't have too much skin in the game |
16:21 | <Michael Ficarra> | the compiler's going to turn it into a reassignment for you anyway |
16:22 | <ljharb> | Component |> withC(%) |> withB(%) |> withA(%) or Object.entries(o).map(…) |> Object.fromEntries(%) are much clearer than withA(withB(withC(Component))) or Object.fromEntries(Object.entries(o).map(…)) , or the temp var equivalents |
16:22 | <shu> | i disagree? |
16:22 | <sarahghp> | is this an accurate summary: it is easier to try for higher quality code to forbid reassignment stylistically, and that's of higher priority even though it takes out "linearization via reusing the same temp var" as collateral |
16:22 | <ljharb> | the compiler turns it all into electricity anyways, "what the compiler does" doesn't matter |
16:23 | <shu> | especially the withA/B/C example, how is Component |> withC(%) |> withB(%) |> withA(%) clearer? |
16:23 | <bakkot> | I am not at all convinced that it's actually that much more clear than
|
16:23 | <bakkot> | no one writes that, of course, but no one writes |> either, so |
16:23 | <jschoi> | shu: I think it becomes clearer if postfix or circumfix operations (like array wrapping or function calls with following arguments) get involved, so that you no longer have to switch between LTR and RTL reading. |
16:23 | <legendecas> | especially the withA/B/C example, how is |
16:23 | <Jamie Kyle> | the compiler turns it all into electricity anyways, "what the compiler does" doesn't matter |
16:24 | <ljharb> | whose pipeline is it anyway |
16:24 | <shu> | the "order of execution" thing is weird to me |
16:24 | <shu> | like, presumably the folks who want this are FP enthusiasts |
16:24 | <littledan> | well, it's what I really loved about Factor and postfix langauges in general! |
16:24 | <littledan> | and also what I think many people love about method-chaining APIs |
16:24 | <shu> | yet a major selling point here is that they find function composition and order of function application confusing, and there should be new syntax to make it look imperative? |
16:24 | <ljharb> | i am very much not an FP enthusiast in that way, i think RxJS-style coding is harder to understand. and i very much want pipeline for my not-super-FP but not-OO code. |
16:25 | <sarahghp> | When the compiler reassigns it, it is in special compiler land, where Bill from four departments over isn't going to do something weird with it and bring the site down. |
16:25 | <littledan> | stack-based languages (and some FP enthusiasts) get way too obscure since they try to juggle multiple things in the pipeline. don't do that. |
16:25 | <ljharb> | the people who want the other pipeline syntax, the point-free one or whatever it's called, are definitely FP enthusiasts |
16:25 | <jschoi> | I am an FP enthusiast, and I like pipes. But I would like pipes to handle multiple arguments as well as they do unary calls. And non-function-call expressions too. |
16:25 | <sarahghp> | You can think of the pipeline as ShadowRealm reassignment maybe. (Warning: May not actually understand Shadow Realms.) |
16:25 | <sffc> | Stage 2 on Pipeline Operator is kind-of a big deal... I would have liked to have seen a lot more data and surveys about how this will impact practitioners and code readability in the long term. We have the TC39 Research Call for this exact purpose, but Pipeline Operator has not been a subject of that call, at least not for a long time. Stage advancement seemed rushed. |
16:25 | <shu> | we found out apparently Shadow Realm was a euphemism put in in the Yugioh dub to soften the concept of "death" |
16:26 | <Michael Ficarra> | jschoi: so use arrows? |
16:26 | <jschoi> | Yes, arrows, but they don’t work with function-scoped operations and they still require argument naming. Which is presumably why deeply nested code still happens in real life (naming is hard, etc.). |
16:27 | <ryzokuken> | nobody wants to join the hallway track? |
16:27 | <Michael Ficarra> | jschoi: when the scope of the variable is a single line, the names don't matter |
16:27 | <Michael Ficarra> | just use a single letter |
16:27 | <Michael Ficarra> | or $ as suggested above |
16:27 | <littledan> | we found out apparently Shadow Realm was a euphemism put in in the Yugioh dub to soften the concept of "death" |
16:28 | <shu> | euphemism isn't the right word |
16:28 | <shu> | but you know how they change stuff when they dub anime for a US audience? |
16:28 | <shu> | like they'd removal cigarettes, etc |
16:28 | <ryzokuken> | euphemism is what it says on the wiki |
16:29 | <devsnek> | https://i.kym-cdn.com/photos/images/newsfeed/001/069/615/189.jpg |
16:29 | <littledan> | Stage 2 on Pipeline Operator is kind-of a big deal... I would have liked to have seen a lot more data and surveys about how this will impact practitioners and code readability in the long term. We have the TC39 Research Call for this exact purpose, but Pipeline Operator has not been a subject of that call, at least not for a long time. Stage advancement seemed rushed. |
16:29 | <devsnek> | i think euphemism is the correct word |
16:29 | <jschoi> | Michael Ficarra: Yes, but arrow functions with single-char variables still don’t address function-scoped operations, and they’re more verbose. And that verbosity is also perhaps much of why people don’t linearize deeply nested expressions more often. |
16:30 | <Michael Ficarra> | still don’t address function-scoped operations |
16:30 | <Michael Ficarra> | what does this mean? |
16:30 | <jschoi> | yield and await . |
16:31 | <Michael Ficarra> | oh, yes, I think the pipeline proposal should have an awaiting pipe variant |
16:31 | <littledan> | it does? |
16:32 | <littledan> | you can just do that |
16:32 | <devsnek> | didn't mark propose a syntax for building up async chains |
16:32 | <bakkot> | littledan: michael is in favor of F#-style |
16:32 | <bakkot> | with a special await form |
16:32 | <littledan> | yeah, I proposed that in the past and people continued to be unhappy |
16:33 | <littledan> | I think Hack is a good general way forward. I'm glad we agreed to Stage 2 on it. |
16:33 | <nicolo-ribaudo> | didn't mark propose a syntax for building up async chains ~. operator? |
16:33 | <littledan> | I guess I'm seeing a lot of advancements this meeting where people express unhappiness afterwards. This seems pretty unfortunate process-wise. I'm wondering what's preventing the concerns from being expressed before/during the call for consensus. |
16:34 | <littledan> | do we need to punt more agenda items to next meeting, for example? |
16:34 | <shu> | "blocking" has high social cost? |
16:34 | <shu> | specifically, lone blocking |
16:34 | <Justin Ridgewell> | with a special |
16:34 | <shu> | all of the comments about this topic were expressed as "if everyone else supports it" |
16:34 | <Justin Ridgewell> | https://github.com/tc39/proposal-wavy-dot |
16:35 | <littledan> | well, I previously proposed that we have |> await usable within an F# pipeline |
16:35 | <sffc> | Huh, maybe some kind of research could be proposed as a request of the champion group for Stage 3? But if this request is made, it'd help to understand what the research question should be. |
16:35 | <bakkot> | littledan: I think we need a better process for advancement than taking the last two minutes of a timebox to ask if anyone is going to block |
16:35 | <bakkot> | that's like the maximally pressure-to-stay-silent situation one could devise |
16:35 | <littledan> | well, I've proposed that we ask for explicit support |
16:36 | <littledan> | we could say, everything needs to be nominated and seconded, and then we have an explicit (e.g., minimum 15 second) time to call for objections |
16:36 | <Michael Ficarra> | littledan: for this proposal, there are plenty of people willing to voice explicit support though |
16:36 | <Michael Ficarra> | I think that addresses a different kind of issue |
16:37 | <littledan> | well... I'm happy that this proposal went through. I'm not sure what we would want process-wise. I'd be fine with spending more time understanding people's objections, but I'm also up for it eventually going through. |
16:37 | <Michael Ficarra> | the issue here is the presence of a lot of negative sentiment as well |
16:37 | <littledan> | I think we should spend more time within Stage 2 more clearly communicating the concrete concerns that delegates have. I honestly don't understand, e.g., what Mozilla's concerns are. |
16:38 | <bakkot> | yeah, specifically, the problem is that if 10% of people like a proposal and 90% of people don't think it's worth it (or think it needs more time or research or whatever) but none of them enough to stand up and say "I am blocking this", then it will advance |
16:38 | <littledan> | I think support among JS developers is much higher than 10%... |
16:38 | <devsnek> | is that a problem though? |
16:39 | <devsnek> | if no one wants to block it then it shouldn't be bad enough to be a problem |
16:39 | <littledan> | I guess I'd be worried if pipeline had a lot of big implications for JS syntax, semantics, or implementation. This one is pretty lightweight, even if it does have some syntax. |
16:39 | <bakkot> | littledan: support for some form of pipeline, yes. it is not clear to me that any particular instantiation has support higher than 50% |
16:39 | <bakkot> | or, concretely, that this instantiation has support higher than 50% |
16:39 | <shu> | littledan: mozilla's concern seems to be broadly, "negative readability in the ecosystem in the future" |
16:40 | <HE Shi-Jun> | I believe there are still many concerns about the direction of pipeline op proposal. It seems fp guys who use Ramda heavily and rx guys actually don't like Hack style... |
16:40 | <littledan> | OK, I suggest that we should keep discussing the pros and cons of the forms during Stage 2 |
16:40 | <shu> | i also do not understand what their implementation concerns are |
16:40 | <littledan> | there's a channel for this that everyone can join |
16:40 | <littledan> | the current "default" proposal is Hack, but we're still allowed to make changes until Stage 3 |
16:41 | <HE Shi-Jun> | Stage 2 with Hack style already give a signal that champions choose Hack style... |
16:42 | <bakkot> |
also, actually, I think I disagree with this claim as stated, even aggregating the two forms. I doubt more than 10% of JS developers have even heard of it. |
16:42 | <legendecas> | there's a channel for this that everyone can join |
16:42 | <Michael Ficarra> | I think Dan meant the issue tracker? legendecas |
16:43 | <devsnek> | i think the only complexity for implementations is nesting % in functions, and that can still just be like pushing a scope if the thing is closed over |
16:43 | <ljharb> | Is it public? I can search nothing for pipeline rooms on freenode nor matrix |
16:44 | <HE Shi-Jun> |
|
16:44 | <shu> | i do not have confidence in the State of JS poll |
16:45 | <bakkot> | HE Shi-Jun: significantly less than 10% of js devs take that poll, and I strongly suspect that those who do are not a representative sample |
16:46 | <HE Shi-Jun> | i do not have confidence in the State of JS poll |
16:47 | <HE Shi-Jun> | Actually, Hack style is very rare , I only know Hack use it (are there others?) and Hack is not a popular language. |
16:47 | <ljharb> | is F# a popular language? |
16:48 | <bakkot> | HE Shi-Jun: topic variables are used in a number of languages; see https://rosettacode.org/wiki/Topic_variable |
16:48 | <bakkot> | hack-style is basically "introduce a context in which there is a topic variable" |
16:48 | <Michael Ficarra> | if I was the champion of this proposal, I wouldn't want it to advance to stage 2 with the current committee sentiment |
16:49 | <shu> | then i would recommend someone re-raise the issue if they feel strongly enough. for better or for worse our process isn't temperature based |
16:49 | <bakkot> | on the process question, I would kind of like something like, "no blockers, and at least a 60-40 ratio of support for advancing now among members [given a neutral option which counts as neither]" or something like that |
16:50 | <ptomato> | I have no stake in this proposal myself, but to be honest I'm uncomfortable with delegates seeding this much doubt upon proposals that advanced, right after allowing them to advance. |
16:50 | <devsnek> | i would not want to consider blocking and ratio in the same context |
16:50 | <HE Shi-Jun> | hack-style is basically "introduce a context in which there is a topic variable" it ) as Hack style. |
16:50 | <littledan> | invited you to the channel; anyone else here, feel free to request an invitation |
16:51 | <bakkot> | ptomato: see https://matrix.to/#/!WgJwmjBNZEXhJnXHXw:matrix.org/$JYBpReC9kRacMt_lOYbire_ID6halPslhWB0qzG6Ztk?via=matrix.org&via=mozilla.org&via=igalia.com |
16:51 | <bakkot> | I think we need a better process for advancement than taking the last two minutes of a timebox to ask if anyone is going to block |
16:52 | <littledan> | I would be in favor of a reform of TC39 where we do frequent non-binding polls of the committee like the Wasm CG does, so we can get more of a temperature. However, when I proposed this in the past, much of the committee was opposed and preferred to stick to the objection-based model, I guess because there was fear that such polls would be used to push past objections (sort of the inverse of this case) |
16:52 | <ptomato> | I feel if you have serious doubts about a proposal, then block it and work with the champions to resolve those doubts. it's true there is a social cost for single-handedly blocking a proposal, but that's by design. you shouldn't get to 'block lite' retroactively by seeding doubts without paying the social cost |
16:52 | <littledan> | I wouldn't mind at all making more frequent use of the temperature check feature, even if it's for each consensus |
16:52 | <devsnek> | in rfc7282 they do humming |
16:52 | <bakkot> | littledan: yeah, that's why I suggest having an additional requirement, rather than removing the current requirement |
16:53 | <devsnek> | tbh i think we should read through rfc7282 at the start of every meeting, it's not too long and its great |
16:53 | <littledan> | I do think we need better ways of taking non-blocking concerns into account. However, I think the champions did their homework here and there's nothing to change. |
16:53 | <HE Shi-Jun> | I mean use special token/syntax like Hack. I don't treat special identifier (for example, Kotlin's |
16:53 | <bakkot> | ptomato: right, but what if you, and 50% of the other committee members, have only moderate doubts about a proposal, and the timebox expires before you raise them |
16:53 | <bakkot> | (not claiming that's what happened here, just raising that it can happen) |
16:54 | <ptomato> | then the discussion isn't finished and there's no consensus? |
16:54 | <littledan> | well, maybe we should avoid shortening the timeboxes this meeting, and just cover fewer topics |
16:54 | <littledan> | if the consensus decisions will keep being questioned afterwards |
16:54 | <shu> | there's a practical question here for pipeline |
16:55 | <shu> | out of all the delegates with moderate concerns and negative sentiment: do you think you'll block a stage 3? if it's trending that way, best surface that now |
16:55 | <littledan> | this really isn't a healthy discussion style, of seeding doubt later about what stage things are really at. |
16:55 | <shu> | i agree, that's why i think folks should take stock of how strongly they feel and raise it now |
16:55 | <shu> | or hold their peace |
16:56 | <yulia> | i don't feel very comfortable objecting again as I did that before and was a lone objector. I am still not super happy with this solution but i can deal |
16:56 | <TabAtkins> | +1 to what Shu said. I absolutely want to surface, deal with, and address concerns sooner rather than later. I wanted to settle on the syntax-choice, and afaict once that was done we were in an appropriate place for stage 2, but stage 3 definitely shoudln't be reached until we generally have the committee happy |
16:57 | <bakkot> | TabAtkins: the committee will not generally be happy with any solution here, I am pretty sure |
16:57 | <bakkot> | including not advancing |
16:57 | <TabAtkins> | hehe |
16:59 | <devsnek> | is it time for iterator helpers blitz update |
17:01 | <yulia> | yeah |
17:03 | <HE Shi-Jun> | can't see slide ? |
17:03 | <ryzokuken> | I don't think there are slides? |
17:03 | <HE Shi-Jun> | can see slide now |
17:03 | <devsnek> | i see this https://gc.gy/7eb4bbb4-9e91-4496-b159-45c6e872d4bf.png |
17:04 | <ryzokuken> | oh wait I don't see slides |
17:04 | <Michael Ficarra> | that was so fast! |
17:04 | <devsnek> | shu no |
17:04 | <devsnek> | generator return is good |
17:04 | <shu> | i do not like it |
17:04 | <devsnek> | 😭 |
17:06 | <Justin Ridgewell> | What is generator return? |
17:06 | <littledan> | this was one of my first things in TC39, where I proposed 1) Get rid of subclassing RegExps 2) Get rid of generator return |
17:06 | <bakkot> | .return on generators |
17:06 | <littledan> | cool to see Shu and Yulia pick up those threads years later |
17:06 | <bakkot> | injects a return completion at yield |
17:06 | <bakkot> | throw is the better example though probably; it comes up much more |
17:07 | <devsnek> | generator return is key for doing... something |
17:08 | <bakkot> | cleaning up resources, primarily |
17:08 | <bakkot> | which still seems like it's important to me |
17:08 | <Justin Ridgewell> |
|
17:08 | <bakkot> | IteratorClose calls .return |
17:08 | <Justin Ridgewell> | What! |
17:09 | <devsnek> | oh right iteratorclose calls it |
17:09 | <devsnek> | i knew it did something |
17:10 | <HE Shi-Jun> | if no return it will have memory leak |
17:10 | <ljharb> | that depends very highly on what the iterator is doing tho, no? |
17:11 | <yulia> | HE Shi-Jun: i think i was wrong there let me get back to you |
17:11 | <bakkot> | ljharb: if it does not have any resources which need to be cleaned up, sure, it won't leak, tautologically |
17:11 | <bakkot> | if it does, it will |
17:11 | <yulia> | we may still pass the next value, i missed the follow up convo, and it looks like we may be primarily looking at throw and return |
17:11 | <HE Shi-Jun> | HE Shi-Jun: i think i was wrong there let me get back to you |
17:11 | <yulia> | specifically: https://github.com/tc39/proposal-iterator-helpers/issues/122#issuecomment-866811008 |
17:14 | <HE Shi-Jun> | yulia: I still not fully get what the changes of iterator-helpers , i need some time to read the issue carefully 😅 |
17:14 | <yulia> | hmm, no i think indeed, to pass the yield from next the suggestion was to have a method that calls out that behavior... HE Shi-Jun can you point me to your concern in double ended iterators? |
17:15 | <yulia> | that is, how it would use the yield |
17:15 | <yulia> | (also good to have this discussion) |
17:16 | <bakkot> | as a concrete example, calling .return on the iterator for a whatwg ReadableStream will close it, which can release e.g. network resources. if for await (let chunk of stream[Symbol.asyncIterator]().map(x => x) break; does not close the stream, that seems bad. |
17:16 | <bakkot> | I guess I should post that on the issue. |
17:17 | <yulia> | looks like domenic has a similar concern... |
17:17 | <bakkot> | hah, he literally just posted that, excellent |
17:18 | <shu> | let streams_fr = new FinalizationRegistry((stream) => stream.dispose()) 🤡 |
17:18 | <devsnek> | this was the original reason that domenic and i wanted passing the protocol |
17:18 | <yulia> | bakkot: is it ok if i quote your comment? |
17:18 | <bakkot> | yulia: go for it |
17:18 | <bakkot> | though I think it's just what domenic said |
17:19 | <devsnek> | domenic didn't say it cleans up a network request |
17:19 | <devsnek> | which is very motivating imo |
17:19 | <HE Shi-Jun> | hmm, no i think indeed, to pass the yield from next the suggestion was to have a method that calls out that behavior... HE Shi-Jun can you point me to your concern in double ended iterators? param in next(param) . So if iterator helpers pass the param then let [a, ..., b] = [1,2,3].values().map(x => x*x) just works (a will be 1, b will be 9) |
17:19 | <yulia> | ok, ill quote that in as well |
17:20 | <HE Shi-Jun> | yulia: Note last time I checked iterator helpers, there is a issue that the first next(param) call is missing. |
17:20 | <ljharb> | yulia: fwiw i continue to have zero idea what "pass the protocol" means, every time i see it; i wonder if there's a clearer phrasing that could be used to discuss that issue? |
17:20 | <yulia> | passing the protocol is referring to passing the iterator protocol, that is return , throw , and that next takes a value |
17:21 | <devsnek> | "implementing the extended iterator protocol" |
17:21 | <ljharb> | you can pass a first-class thing, a protocol is not a first-class thing, so it confuses me (because you can't actually pass a protocol, eg) |
17:21 | <yulia> | good feedback, thank you everyone |
17:21 | <TabAtkins> | Oh yeah, I didn't read "pass the protocol" as meaning "implement" either, I thought it was about argument-passing something. |
17:22 | <shu> | well, streams would "work" if you need an opt in as an argument |
17:22 | <shu> | that would be a pretty clunky API though i suppose |
17:22 | <jschoi> | “Delegating to the protocol” perhaps? |
17:37 | <Michael Ficarra> | ljharb: > a protocol is not a first-class thing not yet! |
17:37 | <bterlson> | jschoi: would you be able to present asyncFrom at ~15:20? |
17:37 | <ljharb> | Michael Ficarra still super waiting for you to bring it back to committee |
17:38 | <yulia> | ditto |
17:38 | <jschoi> | bterlson: I can do it. Would a chair be able to manage the slides for me? |
17:40 | <devsnek> | i want the protocol proposal |
17:40 | <bterlson> | jschoi: I can help with that sure. You just need me to present them? |
17:41 | <Michael Ficarra> | ljharb yulia devsnek: I would love to, I just need more time to do it |
17:41 | <Michael Ficarra> | maybe after this term as editor, I will feel satisfied with the state of the spec and replace that work with protocols proposal work |
17:41 | <yulia> | true facts about tc39 delegates ("would love to, need more time") |
17:41 | <jschoi> | bterlson: Yeah, but I can try screen sharing myself first. I just might run into problems. |
17:41 | <bakkot> | maybe after this term as editor, I will feel satisfied with the state of the spec and replace that work with protocols proposal work |
17:42 | <bterlson> | jschoi: ok no problem, I will be able to present if you cannot. |
17:42 | <bakkot> | though it is finite, at least |
17:42 | <Michael Ficarra> | bakkot: yes, it's unlikely; probably after the next term |
17:46 | <bakkot> | i do not love having a meaningfully different third mode |
17:46 | <bakkot> | I was hoping v would just be u with some tiny changes to syntax you weren't using, like && |
17:46 | <bakkot> | having it change the semantics of \d seems like a whole new mode to learn |
17:47 | <Michael Ficarra> | bakkot: same, I am not so sure about this |
17:53 | <Michael Ficarra> | sometimes making everything better isn't actually better |
17:55 | <Richard Gibson> | it is a new mode, the one described by https://www.unicode.org/reports/tr18/ |
17:58 | <bakkot> | does any language actually implement the full unicode regexes as specified in tr18? |
17:59 | <rbuckton> | Ah, meant to add my topic as a discussion of the last topic. No problem though |
18:02 | <rbuckton> | By "inline modifiers", I meant (?u-v:\d) |
18:03 | <rbuckton> | as in: https://rbuckton.github.io/regexp-features/features/modifiers.html |
18:05 | <jschoi> | I think it would be productive if there were specific examples of breakage, since this is an opt-in option. |
18:05 | <jschoi> | Oh, someone’s bringing it up now. |
18:05 | <rbuckton> | I think it would be productive if there were specific examples of breakage, since this is an opt-in option. \d along with set notation. |
18:06 | <rbuckton> | But they could just write [0-9] |
18:06 | <ljharb> | sorry i was afk, in what language is \d not [0-9]? |
18:08 | <rbuckton> | ICU, at least, specifies \d to "Match any character with the Unicode General Category of Nd (Number, Decimal Digit.)" |
18:08 | <ljharb> | ok but i'm genuinely asking in what practical implementations will a user type \d and not expect [0-9] ? |
18:09 | <jschoi> | People writing internationalized applications that use the ICU regex API in C++. I think some Apple APIs expose it for that purpose, from what I recall? |
18:09 | <jschoi> | https://unicode-org.github.io/icu/userguide/strings/regexp.html |
18:10 | <bakkot> | C++ regex is specified by reference to ecmascript, fun fact |
18:10 | <bakkot> | so \d means [0-9] |
18:12 | <bakkot> | I think if \d means [0-9] in literally every language that has regexes, we should not introduce a new mode where it means something else. |
18:12 | <bakkot> | if we want to expose a matcher which means a different thing, we can pick a new name for it. |
18:14 | <Richard Gibson> | Python \d \s \w are only limited to ASCII in the presence of a flag: https://docs.python.org/3/library/re.html |
18:14 | <bakkot> | ah, that's a good data point |
18:15 | <rbuckton> | I've updated https://rbuckton.github.io/regexp-features/engines/icu.html#feature-character-class-escapes, I'm checking if my comparison is missing anything for the other engines I've added so far. |
18:16 | <bakkot> | bradleymeck: let me put it a different way than "silent": if I use /.../v , it's going to be because I want to use && , and I am not going to expect it to also change \s |
18:16 | <rbuckton> | Oniguruma uses Decimal_Number in unicode mode |
18:18 | <Michael Ficarra> | so for the conclusion, was there any support for any of the discussed changes? |
18:18 | <bradleymeck> | bakkot: that doesn't make it silent/implicit though |
18:19 | <devsnek> | i would love if stuff like \s matched more than ascii |
18:19 | <Richard Gibson> | although JS is interesting in having ASCII-only \d \w but Unicode-aware \s |
18:21 | <devsnek> | can we just have like |
18:21 | <devsnek> | a /good flag |
18:21 | <devsnek> | that enables all the good unicode and sets and unicode selectors and etc |
18:21 | <nicolo-ribaudo> | /gud ! |
18:21 | <devsnek> | not even joking i want a flag that just does it all |
18:22 | <jschoi> | const goodRegex = /good/👍; |
18:22 | <ljharb> | /U , it's unicode but taller |
18:22 | <Richard Gibson> | that's basically what /v is currently proposed to be (or are you commenting specifically on how it is spelled?) |
18:22 | <ljharb> | apologies, that belonged in TDZ instead of here :-) |
18:22 | <devsnek> | that's basically what \w might only match ascii word characters? |
18:24 | <Richard Gibson> | the current proposal is for \v to align with https://www.unicode.org/reports/tr18/ , including set operations and Unicode-aware and -compliant \d \s \w ^ $ |
18:24 | <Richard Gibson> | but it sounds like there is not consensus for that |
18:25 | <devsnek> | yeah that's what i would want |
18:25 | <Michael Ficarra> | Richard Gibson: "not consensus" is quite the understatement there |
18:26 | <devsnek> | idk why anyone would want to keep having the bad versions of these character classes |
18:28 | <jschoi> | Another data point: https://perldoc.perl.org/perlunicode Perl 5.14 in fact has a Unicode opt-out flag ( |
18:28 | <ljharb> | Michael Ficarra: throwing. forcing me to coerce(x) === x sucks versus isGood(x) |
18:28 | <rbuckton> | Also, .NET has \d match \p{Nd} unless in "ECMAScript-compliant" mode |
18:29 | <ljharb> | * forcing me to coerce(x) === x sucks versus isGood(x) |
18:30 | <rbuckton> | Many (but not all) of the languages/engines I've been looking at only seem have \d match [0-9] for ECMAScript compatibility. |
18:32 | <shu> | Michael Ficarra: per my queue item, streaming seems like it definitely needs the predicate |
18:33 | <shu> | you want to slice off the surrogate and buffer it for the next chunk, or just wait, but you don't want to replace |
18:33 | <Michael Ficarra> | like you keep the buffer around and wait for the other part of the surrogate to come in? |
18:33 | <shu> | yeah, up to the impl |
18:33 | <Michael Ficarra> | yeah |
18:33 | <shu> | but you don't want to replace |
18:33 | <Michael Ficarra> | yeah I'm definitely convinced sufficiently for stage 1 |
18:33 | <Michael Ficarra> | would've been nice for the proposal to include these kinds of motivations |
18:34 | <HE Shi-Jun> | can't see the slide |
18:43 | <Michael Ficarra> | regarding toArray in iterator-helpers, I hope to expand it in the future to be able to build more kinds of structures (adding a protocol like Buildable or Ana) |
18:43 | <bakkot> | oh jeeze please do not gate this proposal on cancelation |
18:44 | <devsnek> | cancellation is a simple problem with a clear solution |
18:44 | <shu> | most definitely please do not |
18:44 | <rbuckton> | Don't want to gate, do want to consider it though. |
18:44 | <bakkot> | I agree with you that cancelation would be good, I just despair of trying to go through that again |
18:45 | <rbuckton> | cancellation is a simple problem with a clear solution AbortSignal /AbortController is the dependence on EventTarget . |
18:45 | <ljharb> | also the name "abort" is bad, but +1 that let's please not get into that again |
18:45 | <devsnek> | oh sorry i was being sarcastic |
18:45 | <yulia> | regarding toArray in iterator-helpers, I hope to expand it in the future to be able to build more kinds of structures (adding a protocol like Buildable or Ana) |
18:46 | <yulia> | because i agree that this should be general and i am wondering what thee best pattern will bee here |
18:46 | <rbuckton> | I've been meaning to follow up on https://github.com/tc39/proposal-cancellation/issues/22 for a while, but priorities shifted. |
18:46 | <shu> | i'm hearing profits for azure! |
18:46 | <shu> | what's the problem |
18:46 | <Michael Ficarra> | yulia: good question! I considered both and settled on the latter, but I can't remember the details of why. Let me get back to you. |
18:46 | <yulia> | what i like about using iterator helpres is that we can use take(n), and then this is already scoped |
18:47 | <bakkot> | .fromAsync_IKnowThisCanBeExpensive |
18:47 | <rbuckton> | That scopes by size, but not by time |
18:47 | <bakkot> | .takeWhile would let you scope by time! |
18:47 | <rbuckton> | you could say .take(10) and the 9th element could take minutes. |
18:48 | <bakkot> | .takeWhile(() => (new Date) - start < 1000) |
18:48 | <rbuckton> | Even .takeWhile needs to wait for the async element to complete before its evaluated. |
18:48 | <bakkot> | ah, fair point |
18:49 | <rbuckton> | So while that would work for Promise.race() , you still leave the array and promise allocations in memory until it eventually completes. |
18:50 | <rbuckton> | The main reason I never moved forward with https://github.com/tc39/proposal-cancellation/issues/22 was that it needed a compelling reason to exist (i.e., something in the JS core language that needed cancellation). Between this and .waitAsync there are now at least two compelling cases. |
18:52 | <rbuckton> | Upside of #22 is it just provides a protocol for cancellation that can be implemented by existing cancellation primitives (AbortController in DOM/Node, CancellationToken in VSCode, etc.) and makes them fairly interoperable, without introducing an actual cancellation primitive into the language. |
18:53 | <devsnek> | revoked proxies lul |
18:57 | <Michael Ficarra> | in case you didn't know, proxies for callables are callable |
19:13 | <Michael Ficarra> | yulia: I remembered why it's better for a buildable structure to consume an iterable than for an iterable to consume a buildable protocol |
19:15 | <Michael Ficarra> | sometimes building something one element at a time is the same as building it >1 element at a time, but sometimes it could be slow to build that way or produce a structure with equivalent semantics but different performance properties |
19:15 | <Michael Ficarra> | so it's best for the buildable thing to control how it consumes the iterable |
19:22 | <Michael Ficarra> | something like discussed here: https://github.com/tc39/proposal-iterator-helpers/issues/36 |
19:52 | <rbuckton> | Regarding how other engines treat This includes Perl, .NET, Oniguruma, and ICU. PCRE also does this if the PCRE2_UCP flag is set. |
20:29 | <leobalter> | TabAtkins: is this the proposal advancing to Stage 2? We need it move to the TC39 org |
20:29 | <leobalter> | https://github.com/js-choi/proposal-hack-pipes/ |
20:32 | <ljharb> | leobalter: the current plan seems to be to transfer it in and archive it, and repurpose the existing pipeline proposal repo to match the new shape |
20:32 | <ljharb> | it's being discussed in the pipeline room |
20:33 | <leobalter> | which room? I can't find it on Matrix |
20:33 | <leobalter> | is that in another server? |
20:35 | <ljharb> | https://matrix.to/#/!mjlgwjKxWUpgSgeCQU:matrix.org?via=matrix.org&via=igalia.com&via=mozilla.org it's in the tc39 space |
23:11 | <bakkot> |
a more fun example:
|
23:12 | <bakkot> | or you could even get labeled blocks involved if you wanted |
23:12 | <bakkot> | you could break out of the finally , thereby suppressing the return entirely |
23:12 | <bakkot> | rather than just delaying it, as above |