00:16:14  * aki_joined
00:17:22  * akirosequit (Ping timeout: 250 seconds)
00:17:23  * aki_changed nick to akirose
01:53:30  * wuz_joined
01:57:54  * wuz_quit (Ping timeout: 250 seconds)
02:23:54  * akirosequit (Ping timeout: 250 seconds)
02:23:56  * aki_joined
02:24:20  * aki_changed nick to akirose
04:30:53  * akirosequit (Ping timeout: 245 seconds)
04:37:41  * akirosejoined
05:15:02  * nilsetjoined
05:16:19  <nilset>so i decided to try and make my own toy js as close to the spec as possible. looking at the grammar now
05:16:50  <nilset>and the lexical grammar seems to depend on the syntactic grammar
05:17:18  <nilset>so i am guessing there is no way to do a lexer pass first and then do a syntax pass over the tokens?
05:19:55  <nilset>or is there a way to slice it where the correct set of tokens is always a concatenation of tokens i have already lexed?
05:32:23  <jmdyck>conceivably you could do a complete lexer pass first if you gave the lexer enough smarts to know what the syntactic parser would want at any given point, but that's error prone and duplicates work. you might as well just do it more-or-less as the spec describes it.
05:33:51  <nilset>which is... consuming tokens from a stream of code points as the lexical grammar requests them?
05:35:51  <jmdyck>The current state of the syntactic parser dictates the goal symbol for lexical parser for the next input element only.
05:37:38  <nilset>the "current state of the syntactic parser" isnt really covered by the spec is it? i only see a declaritive description of a grammar
05:38:49  <jmdyck>"current state of the syntactic parser" is what clause 11 refers to as "syntactic grammar contexts"
05:40:49  <jmdyck>(without definition)
05:40:52  <nilset>mainly trying to figure out what technologies will be the clearest translation from spec to code. i am thinking parser combinators so far
05:42:01  <jmdyck>can parser combinators handle lookahead-exclusions?
05:44:50  <nilset>yes, the lib i am looking at found a way to implement a `not` combinator
05:45:12  <nilset>https://github.com/Geal/nom/pull/264/files
05:46:00  <jmdyck>rust, cool.
05:48:18  <nilset>i ran across a few existing js parsers written in rust when researching this but since this is a toy i wanna implement it myself
05:48:29  <jmdyck>having trouble reading it. I wonder if it's more like the "but not" annotation than the lookahead-exclusion
05:49:06  <devsnek>i think with rust it would be more like
05:49:50  <devsnek>`match getLookaheadSomehow() { all cases including negative one }`
05:51:37  <devsnek>like if you were parsing a template, and you got "$", you would match on lookahead to be "{" or <anything else>
05:51:59  <nilset>i think the trick is it matches but consumes no input
05:52:11  <devsnek>well yes that is the idea of lookahead
05:53:02  <devsnek>good luck implementing js btw
05:53:14  <nilset>thanks, gonna need it!
05:53:17  <devsnek>i'm working on an engine written in js
05:54:48  <nilset>my goal is to have an engine which i can keep up to date with spec changes as they are merged in
05:55:13  <nilset>and maybe be able to use it for experimenting with proposals
05:55:36  <jmdyck>devsnek: does engine262 have its own parser, or does it use a pre-existing one?
05:55:37  <nilset>i suppose writing it in js would be more useful for other people working on proposals
05:56:12  <devsnek>jmdyck: it uses acorn am
05:56:13  <devsnek>atm*
05:56:19  <devsnek>i'm working on making my own though
05:56:30  <devsnek>nilset: yes that is the goal :)
05:56:55  <devsnek>jmdyck: one of the main things i want that acorn doesn't have is the ability to disable annex b parsing
05:57:26  <jmdyck>does *any* parser have such a switch?
05:57:51  <devsnek>yes
05:58:00  <devsnek>graalvm's js vm has an annex b switch
05:58:02  <devsnek>it is the only one
06:01:06  * jwaldenquit (Quit: ChatZilla 0.9.92-rdmsoft [XULRunner 35.0.1/20150122214805])
06:13:21  * jmdyckquit (Quit: Leaving.)
06:44:29  * aki_joined
06:45:27  * akirosequit (Ping timeout: 240 seconds)
06:45:27  * aki_changed nick to akirose
07:41:25  <ljharb>devsnek: you could send a PR to acorn for that
07:50:19  <nilset>rbuckton: any chance you will be cutting a release of grammarkdown soon? there is a bugfix which would be nice to have in ecmarkup
07:50:37  <nilset>discussion here https://github.com/tc39/ecma262/pull/1381
07:55:28  * keith_mi_joined
07:56:42  <nilset>wait my bad, it looks like it was released on npm, just not on github
07:56:45  * keith_millerquit (Ping timeout: 250 seconds)
07:59:27  <ljharb>nilset: in that case, can you file an issue on grammarkdown to push the release tag to github, and update your ecma262 PR to update the dep?
08:01:43  <nilset>my double bad, i think there was a more recent release than i thought on npm, but not recent enough to include the bugfix
08:04:06  <ljharb>lol k
08:51:26  * aki_joined
08:52:39  * akirosequit (Ping timeout: 250 seconds)
08:52:40  * aki_changed nick to akirose
09:06:02  * nilsetquit (Ping timeout: 250 seconds)
09:23:56  * Havvyquit (Read error: Connection reset by peer)
09:24:29  * Havvyjoined
10:58:08  * aki_joined
10:58:56  * akirosequit (Ping timeout: 268 seconds)
10:58:57  * aki_changed nick to akirose
11:02:35  * nilsetjoined
11:06:59  * nilsetquit (Ping timeout: 250 seconds)
13:03:29  * nilsetjoined
13:04:25  * aki_joined
13:05:29  * akirosequit (Ping timeout: 244 seconds)
13:05:29  * aki_changed nick to akirose
13:08:26  * nilsetquit (Ping timeout: 268 seconds)
13:36:56  * jmdyckjoined
14:46:24  * howdoijoined
15:04:38  * nilsetjoined
15:09:10  * nilsetquit (Ping timeout: 250 seconds)
15:11:34  * aki_joined
15:12:23  * akirosequit (Ping timeout: 268 seconds)
15:12:24  * aki_changed nick to akirose
15:29:08  * nilsetjoined
15:31:24  <nilset>looks like this channel is not currently being logged by logbot
15:33:23  <nilset>https://freenode.logbot.info/tc39 says we need to invite glogbot
15:35:12  <nilset>err globbot
15:37:25  <devsnek>nilset: we use logs.libuv.org/tc39
15:38:28  <nilset>ah, we should update the topic to include the right link
15:39:19  <devsnek>indeed
15:52:28  * nilsetquit (Ping timeout: 268 seconds)
16:00:32  <bradleymeck>is there any grammar position that is directly tied to a Record like how Delete is directly interacting with Reference and Parameters is interacting with List
16:08:27  <jmdyck>bradleymeck: I don't understand the question.
16:08:50  <bradleymeck>jmdyck: is there a position in the grammar where some source text gets directly shoved into a record type
16:09:16  <jmdyck>hmm
16:09:51  <jmdyck>I think so.
16:14:34  <jmdyck>maybe not, if by "source text" you mean a sequence of code points.
16:16:11  <jmdyck>If you're willing to accept Parse Nodes, then there are a few
16:21:37  <bradleymeck>jmdyck: i am looking for a direct mapping of some kind, not really particular. trying to ensure I have all the source positions of types tested for an AST test fixture
16:32:35  <jmdyck>Let me see if I understand: you're looking for parts of the grammar that, in the corresponding structures of the AST, will exercise the specification types?
16:42:03  * nilsetjoined
16:43:08  <bradleymeck>yea
16:46:27  * nilsetquit (Ping timeout: 240 seconds)
16:53:47  <jmdyck>I think that would depend on the AST: in general, there isn't a guarantee that the structures of an AST will have *any* interaction with specification types.
16:55:23  <bradleymeck>jmdyck: just looking at the spec grammar
16:55:38  <jmdyck>(Certainly, code that *uses* the AST [e.g., evaluates it] will probably do stuff that relates to spec types, but the AST itself needn't)
16:55:53  <bradleymeck>i can figure out how to mape things, but i simply don't see any location where records are created directly off a source text position
16:55:59  <bradleymeck>they all seem to go through abstract ops
16:56:20  <bradleymeck>jmdyck: yup, looking for evaluation not representation
16:56:42  <bradleymeck>even object literals don't directly map record fields to anything, they just do a single object create
17:01:05  <jmdyck>backing up: you're interested in the spec type Record, and where/when Records are created. And you can presumably see places in the spec where they're created, but no place where they're created "directly off a source text position". Right?
17:04:03  * nilsetjoined
17:05:33  <jmdyck>So how about Script Record? https://tc39.github.io/ecma262/#sec-script-records It's created immediately after you parse source text as a /Script/.
17:06:52  <jmdyck>Similarly with Source Text Module Record, though not as simply.
17:07:43  <bradleymeck>jmdyck: mmm thats not quite right, having hard time describing it
17:08:05  <bradleymeck>i'm trying to dynamically shape a record's list of fields using source text
17:08:44  <bradleymeck>lists can be added to roughly by generating parameter lists with more items in the source text
17:09:49  <jmdyck>Ah, I maybe understand...
17:12:11  <jmdyck>I think every Record Type in the spec has (more or less) a known and fixed set of fields: there's nothing you can do to dynamically add or remove fields.
17:13:20  <bradleymeck>i think you are correct, been looking and don't see anything clearly affected in shape by source text
17:14:45  <jmdyck>I think the only quasi-exception is Property Descriptors, where the [[Get]] and [[Set]] fields can be absent.
17:17:52  * akirosequit (Ping timeout: 250 seconds)
17:18:05  * akirosejoined
17:20:59  <devsnek>aren't they ~empty~, not absent
17:23:02  <jmdyck>I don't think so (although that would probably be an equivalent way to spec it).
17:23:10  <jmdyck>E.g., see in CompletePropertyDescriptor:
17:23:20  <jmdyck>"If _Desc_ does not have a [[Set]] field, set _Desc_.[[Set]] to _like_.[[Set]]."
17:23:56  <jmdyck>checking whether it *has* a [[Set]] field, not whether _Desc_.[[Set]] is ~empty~.
17:24:42  <jmdyck>and it looks like *all* of the fields can be absent?
17:25:22  <jmdyck>(that abs op certainly assumes they can be)
17:25:32  <devsnek>interesting
17:27:01  <devsnek>so reading https://tc39.github.io/ecma262/#sec-property-descriptor-specification-type
17:27:09  <jmdyck>"In addition, any field may be present or absent."
17:27:11  <devsnek>its more like PropertyDescriptor is an abstract parent class
17:27:27  <devsnek>where you then have property/accessor descriptors as the concrete implementations
17:28:25  <jmdyck>also "generic" Property Descriptor
17:30:01  <devsnek>oh that makes it a big ugly
17:30:55  <jmdyck>outside of that defining para, "data Property Descriptor" and "accessor Property Descriptor" are only used once each
17:31:14  <jmdyck>"generic" PD not at all.
17:32:06  <jmdyck>(so unclear that the terms are that useful)
18:05:04  * nilsetquit (Ping timeout: 268 seconds)
18:05:37  * nilsetjoined
18:05:47  * AtumTjoined
18:06:03  * Havvyquit (Quit: Computer Restarted or Restarting IRC)
18:06:28  * Havvyjoined
18:42:45  * wuz_joined
18:44:07  <wuz_>Hi! Is there anyone around that I can speak to about putting together a proposal?
18:44:36  <ljharb>wuz_: how can i help?
18:46:09  <wuz_>Hello! Yeah, I am interested in putting together a proposal and I am not sure what the best course of action is. I read through the Github docs and it said to reach out here
18:48:13  * nilsetquit (Ping timeout: 268 seconds)
18:50:43  <ljharb>wuz_: do you want more mechanical tips (like how to put the repo together) or are you looking for thoughts on the content of your idea (to discuss feasibility, obstacles/challenges, etc)?
18:51:52  <wuz_>Probably mechanical, but I would also be interested in content discussion too
18:52:20  <wuz_>Right now, the proposal is from me and another person (we've discussed on twitter), but no tc39 members
18:56:07  <devsnek>wuz_: at stage 0 it just needs to be an explainer
18:57:56  <wuz_>Ok cool - I wasn't sure if I needed a tc39 member to be on board. The document wasn't super clear: https://github.com/tc39/ecma262/blob/master/CONTRIBUTING.md
18:58:12  <wuz_>Where do I share the explainer once it is done?
18:58:19  <devsnek>you need to find a tc39 delegate
18:58:28  <devsnek>and ask them to champion it
18:58:46  <devsnek>https://github.com/tc39/ecma262/blob/master/CONTRIBUTING.md#tc39-meetings-and-champions
19:04:54  <ljharb>wuz_: and ^ is why it’s helpful to talk out the challenges and whatnot as early and often as possible :-)
19:05:45  <devsnek>wuz_: out of curiosity what is your proposal
19:17:45  <wuz_>Ok cool!
19:17:58  <wuz_>The proposal is for a range method in JS
19:18:25  <wuz_>We couldn't find one anywhere
19:19:27  <devsnek>there isn't one
19:20:21  <wuz_>How do I go about finding a champion?
19:22:12  <devsnek>you just kinda gotta bump into one
19:22:23  <devsnek>you can try asking here and on es discuss
19:22:42  <wuz_>haha ok sounds good
19:22:53  <devsnek>where would you put the range function
19:22:53  <wuz_>I'll see about putting somethign in on es-discuss
19:24:06  * aki_joined
19:25:00  * akirosequit (Ping timeout: 246 seconds)
19:25:00  * aki_changed nick to akirose
19:25:19  <wuz_>My thinking would be either on Array or Number
19:25:58  <wuz_>My gut is leaning towards Array
19:26:25  <devsnek>oh i was thinking you would produce an iterator
19:26:40  <devsnek>i've been thinking of proposing some additions for iterator stuff
19:28:11  <wuz_>Iterators would be interesting, I was also thinking about a potential new operator to define a range
19:29:08  <wuz_>I guess iterators would actually be the best way to do it
19:29:53  <devsnek>https://gist.github.com/devsnek/230919934eff442a31f9e3116a752c68
19:30:03  <devsnek>i've been wanting to propose this
19:30:12  <devsnek>but i'm waiting to see how first class protocols go
19:31:23  <wuz_>Interesting! How would the reducer work with an infinite iterator?
19:31:36  <devsnek>not that well
19:31:46  <wuz_>ok haha that makes sense
19:31:52  <devsnek>oh i forgot to add collect()
19:33:17  <devsnek>`Iterator.of(1, 2, 3, 4).map((n) => n * 2).collect()` would be `[ 2, 4, 6, 8 ]`
19:35:44  <wuz_>I gotta run, but I will definitely be back on to continue working on this. Thanks for the help!
19:40:03  * wuz_quit (Ping timeout: 245 seconds)
19:44:00  * nilsetjoined
19:55:37  <ljharb>http://array.build already exists too
20:15:29  * howdoiquit (Quit: Connection closed for inactivity)
20:36:10  * nilsetquit (Ping timeout: 246 seconds)
21:29:18  * AtumTquit (Read error: Connection reset by peer)
21:29:59  * AtumTjoined
21:30:28  * akirosequit (Ping timeout: 245 seconds)
21:31:08  * akirosejoined
21:39:28  * nilsetjoined
22:04:07  * nilsetquit (Ping timeout: 240 seconds)
22:04:28  * jwaldenjoined
22:43:48  * AtumTquit (Quit: AtumT)
23:37:02  * wuz_joined
23:37:54  * akirosequit (Ping timeout: 250 seconds)
23:38:08  * akirosejoined
23:41:45  * wuz_quit (Ping timeout: 268 seconds)
23:45:29  * nilsetjoined
23:50:01  <devsnek>why don't ResolveExport() and GetExportedNames() say like "if resolveSet is not passed, set resolveSet to a new empty List"
23:50:07  <devsnek>instead making the caller pass an empty list
23:50:12  * nilsetquit (Ping timeout: 272 seconds)