00:12:42  * AtumT_quit (Quit: AtumT_)
00:40:49  * jwaldenquit (Quit: ChatZilla 0.9.92-rdmsoft [XULRunner 35.0.1/20150122214805])
00:49:56  * keith_millerjoined
01:00:43  * cybaiquit (Remote host closed the connection)
01:05:49  * keith_millerquit (Quit: Textual IRC Client: www.textualapp.com)
01:12:23  * cybaijoined
01:12:37  * keith_mi_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:17:01  * cybaiquit (Ping timeout: 268 seconds)
01:18:11  * keith_millerjoined
01:35:13  * cybaijoined
01:38:22  * cybai_joined
01:39:41  * cybaiquit (Ping timeout: 244 seconds)
02:00:13  * ephemera_joined
02:06:05  * obensour1quit (Quit: WeeChat 1.0.1)
02:06:48  * obensourcejoined
02:47:59  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:56:52  * vikash-afkjoined
03:18:14  * keith_millerjoined
04:15:46  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:37:51  * keith_millerjoined
04:45:00  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:48:21  * keith_millerjoined
04:52:43  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:13:58  * howdoijoined
05:37:51  * vikash-afkquit (Quit: vikash.io)
05:43:52  * Nimelrianjoined
05:54:35  * jmdyckquit (Quit: Leaving.)
07:02:20  * mquy90joined
07:24:16  * mgolquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:27:51  * vikash-afkjoined
07:31:20  * kpattichajoined
07:32:33  * leobalterquit (Ping timeout: 245 seconds)
07:32:52  * leobalter_joined
07:48:49  * mgoljoined
08:41:16  * cybai_quit (Quit: Leaving...)
11:01:50  * cybaijoined
11:02:53  * cybaiquit (Remote host closed the connection)
11:03:22  * cybaijoined
11:07:35  * cybaiquit (Ping timeout: 250 seconds)
11:28:26  * cybaijoined
11:33:02  * cybaiquit (Ping timeout: 258 seconds)
11:59:29  * jmdyckjoined
12:16:45  * kpattich_joined
12:17:58  * kpattichaquit (Ping timeout: 246 seconds)
12:21:28  * cybaijoined
12:25:45  * cybaiquit (Ping timeout: 252 seconds)
12:25:55  * gcommerquit (Ping timeout: 258 seconds)
12:26:33  * gcommerjoined
12:26:33  * cybaijoined
12:30:47  * cybaiquit (Ping timeout: 250 seconds)
12:43:25  * cybaijoined
13:02:12  * kpattich__joined
13:03:42  * kpattich_quit (Ping timeout: 252 seconds)
13:46:02  * gibson042joined
15:17:58  * kpattich__quit (Ping timeout: 245 seconds)
15:18:54  * AtumTjoined
15:29:14  * mgolquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:01:51  * jwaldenjoined
16:02:36  * keith_millerjoined
16:12:08  <devsnek>was it ever suggested that return with an operand could be disallowed in generators
16:44:14  * cybaichanged nick to cybai|leave
16:48:23  * mquy90quit (Ping timeout: 245 seconds)
17:06:00  <jwalden>vaguely idle question, given a variable |code| that is a string, is there any shorter/clearer way to count the number of code points in it than |[...code[Symbol.iterator]()].length|?
17:07:16  <jwalden>I guess the iterator-call already happens for a spread, so |[...code].length| would work too
17:45:44  <annevk>jwalden: the latter is shortest I suspect
18:12:43  <ljharb>jwalden: i'd love to see an accessor that returned that length without the intermediate array
18:13:30  <jwalden>static function to do the same seems maybe preferable to me, if I were concerned about API and not just writing some goofball test code right now
18:13:49  <ljharb>sure, i suppose that's fine, but it seems weird since `.length` is an instance property
18:14:19  <jwalden>given code point length is O(n), an accessor that hides the perf issue seems unideal
18:14:38  <jwalden>or at least O(n) without a bunch of work to maintain a value that is currently never accessed
18:14:46  <ljharb>why would it need to be O(n) inside the engine
18:14:49  <jwalden>and would presumably be relatively rarely accessed were one introduced
18:15:12  <jwalden>gotta run through all the code units to count the number of code points in them, no?
18:15:17  <ljharb>or rather, how is `.length` not O(n) too?
18:15:44  <jwalden>.length is a count of code units, and that is maintained in the string to know how much memory the characters use
18:16:07  <jwalden>or if the string is begin/end pointer denominated, you just subtract and divide by character size
18:19:23  <ljharb>sure, but that's determined at string creation time by counting the code units
18:19:38  <ljharb>while doing that count, couldn't the number of code points be counted at the same time, and stored alongside it?
18:20:54  <jwalden>it /could/, but it's not accessed enough to justify four bytes' storage per string
18:21:40  <ljharb>i'd be interested to know how often people do count code points, but also i suspect it's not accessed that much *because* it's not easy
18:21:41  <jwalden>I suppose you can imagine custom-arena tricks or so to encode "this has multiple-unit code points in it" to avoid the cost for most things, but we're building up a lot of complexity for a thing that is not often used now
18:21:56  <ljharb>it's usually the thing people actually want instead of length anyways
18:22:04  <ljharb>(actually grapheme count is what people want, but that's a separate discussion)
18:22:51  <jwalden>a number that's usable as an index is most often what people really want, if they're manipulating strings, and a count of code units plays much better with indexes as counts of code units
18:23:06  <ljharb>hm, i'm not sure that's true
18:23:23  <ljharb>manipulating strings by code units is often inherently broken, since code points exist
18:23:40  <ljharb>but yeah a way to index by code point, like the `.at()` proposal, would make sense in concert
18:23:41  <jwalden>well, if you have an index as a count of code points, of what use is it? you have to iterate from start to find out the meaning of that index
18:23:51  <ljharb>it's the number of things i will see on screen
18:24:02  <ljharb>i don't care about the index
18:30:29  <Domenic>No, that's grapheme clusters
18:30:41  <Domenic>Code points are a not-so-useful in between, IME
18:31:01  <annevk>Or font stuff, with ligatures
18:36:07  <ljharb>Domenic: yeah that's fair that graphemes are what i really want
18:40:24  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:43:58  * keith_millerjoined
18:45:16  * keith_millerquit (Client Quit)
18:45:29  <jwalden>https://paste.rs/GNo.js is roughly what I'm working on/doing right now
18:46:17  <jwalden>basically I'm changing a bunch of coordinate stuff inside SpiderMonkey from code units to code points -- a necessary change to be able to tokenize/parse UTF-8 without inflating to UTF-16 -- and I get to think in both coordinate spaces to some degree right now
18:46:45  <ljharb>that's quite a gasp matrix
18:49:28  <jwalden>it seemed appropriate for the subject matter
18:49:48  <rkirsling>TIL (as a demonstration of the definition of grapheme cluster not being dependent on glyph rendering) ᄀᄀᄀ각ᆨᆨ is a single grapheme cluster 👀
18:50:16  <jwalden>I'm doing work on computing column numbers in code, and so I need some code with a bunch of non-BMP stuff in it, at intervals such that dicing up a line by code unit will end up splitting some code points in half
18:50:54  <jwalden>the dicing interval I'm using is 128, but in principle it could be any number that's at least 2 for UTF-16, or 4 for UTF-8
18:51:12  <ljharb>rkirsling: lol so i guess what i really want is a way to iterate on glyphs, and get glyph count
18:51:32  <jwalden>and I expect to run with 128 at the end of the day, so something that hits a couple few chunks of that size is desirable
19:07:58  <annevk>ljharb: do you want ff or ffi as a single unit depending on the font though?
19:08:31  <ljharb>annevk: lol i just want to know if i squint, how many chunks of ink will i see
19:08:53  <ljharb>but yeah i'd expect a ligature to be counted as 1
19:28:20  <jwalden>bringing font metrics into core JS sounds good
19:28:47  <jwalden>my working assumption is code editors generally are going to denominate column numbers as counts of code points, so I'm trying to make things consistent with that
19:29:14  <jwalden>but given UTF-8 making a major hash of code unit counts, there is zero chance counts of code units are what editors will typically display
20:04:12  * keith_millerjoined
20:09:45  * srl295quit (Quit: Connection closed for inactivity)
20:23:07  * mgoljoined
21:50:18  * mgolquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:52:05  <gibson042>jwalden There's a proposal for that: https://github.com/tc39/proposal-intl-segmenter includes `new Intl.Segmenter(locale, {granularity: "grapheme"})`
21:52:53  * gibson042quit (Quit: Leaving.)
21:53:40  <jwalden>gibson042: I could be wrong, but I don't think grapheme is the same as code point
21:54:07  <jwalden>and a count of code points is definitely not a locale-sensitive thing
21:54:16  <jwalden>(on a given string, that is)
22:07:58  * isHavvyquit (Read error: Connection reset by peer)
22:25:54  * Nimelrianquit (Ping timeout: 258 seconds)
22:37:04  * howdoiquit (Quit: Connection closed for inactivity)
22:57:03  * Nimelrianjoined
23:01:33  * Nimelrianquit (Ping timeout: 258 seconds)
23:44:38  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:54:40  * AtumTquit (Quit: AtumT)
23:57:05  * Nimelrianjoined