2014-02-01 [16:03:38.0000] sad pandas [02:13:59.0000] Hixie: Yeah, I got confused by how it even got as far as a 500 then ran out of time, then forgot about it [11:27:52.0000] jobs [12:55:23.0000] https://twitter.com/tabatkins/status/429281803719823360 2014-02-02 [07:45:32.0000] http://msopentech.com/blog/2014/01/30/pointer-events-progress-mozilla-blink-communities-reach-significant-engineering-milestone/ seems like good news 2014-02-03 [21:17:58.0000] Hixie: sorry, I was not around, but I'll check your fix [21:18:28.0000] Hixie: I'm in UTC+7 (Vietnam) now so I'll seldom be online when you are [02:25:09.0000] should DOMException have [Exposed] also? annevk-cloud__ heycam|away [02:57:30.0000] zcorpan: DOMException will be defined as part of IDL [02:57:31.0000] zcorpan: in terms of JavaScript [02:59:10.0000] hmm not being logged [05:16:54.0000] oh, is [05:20:22.0000] annevk: ok. could you put in a note saying that the plan is to have it available in workers? [05:25:44.0000] What's the rush? [05:25:45.0000] Is [Expsosed] even defined for non-interface things? [06:03:03.0000] about https://www.w3.org/Bugs/Public/show_bug.cgi?id=24480 maybe we should add back the "Web developer view" button [06:03:22.0000] or "Hide UA implementation details" or whatever it was called [06:05:26.0000] because the commenter appears to be perturbed about the "run synthetic click activation steps" algorithm being in the section that gives info about the various types of content (flow, phrasing, etc.) [06:06:13.0000] and because the experiment of providing a separate "Developer Edition" spec doesn't appear to have become a huge success [06:08:29.0000] It hasn't? [06:08:29.0000] People rave about it on Twitter quite often [06:08:29.0000] developers.whatwg.org that is [06:09:16.0000] really? [06:09:22.0000] I guess I'm just out of touch [06:10:13.0000] and personally I really prefer Hixie's styling to the styling in that developer version [06:10:48.0000] I find that developer version harder to read [06:11:05.0000] Habit? :) [06:13:17.0000] MikeSmit1: also, the person giving feedback in that bug is zcorpan, he's well aware of all those things [06:13:36.0000] eh? [06:13:37.0000] "The MathML3 DTD has been updated" [06:13:46.0000] Good that someone is doing useful work [06:13:56.0000] annevk: zcorpan filed that bug? [06:14:21.0000] oh yeah I see he did [06:30:37.0000] MikeSmith: i filed it because of https://www.w3.org/Bugs/Public/show_bug.cgi?id=24473 [06:31:02.0000] /me loooks [06:31:29.0000] ah yeah [06:33:31.0000] I <3 the developer version and refer people to it often [06:33:33.0000] annevk: no rush but it might help test writers an implementers when deciding what self.DOMException should be in workers :-) [06:34:37.0000] zcorpan_: what is self.Error in a worker? [06:35:41.0000] I suspect we're basically waiting for heycam to recover from jetlag at this point [06:35:41.0000] Unless he went somewhere else after Seattle [06:38:05.0000] annevk: it's a function [06:38:06.0000] annevk: everything defined in JS is available in workers i think [06:39:19.0000] I would assume that, yes [06:39:46.0000] So http://people.mozilla.org/~jorendorff/es6-draft.html#sec-%realm%.prototype.eval lacks a hook for CSP [06:39:55.0000] Domenic_: should I just file a bug against JS for that? [06:47:36.0000] /me wonders how chromium people look at diffs [06:52:22.0000] I filed https://bugs.ecmascript.org/show_bug.cgi?id=2494 [07:24:20.0000] annevk: interesting. might be worth bringing in dave to the conversation since i think he's heading up the realm work. [07:24:59.0000] Domenic_: added dherman [07:36:17.0000] Domenic_: I'm curious if there's more such trickery [07:37:10.0000] annevk: I think in pure ES5, eval and Function are the only eval-er. [07:37:33.0000] ES6 adds Realm and GeneratorFunction; it might add some stuff in Loader but I think that was all encapsulated by Realm. [07:37:35.0000] Domenic_: there's structured clones of course which apparently are handled in the JS engine already [07:37:35.0000] Seems bad to set these precedents that specification authors can just hack the JS engine on the side, although you wouldn't want to gate everything on TC39 either [07:38:00.0000] yeah... [07:40:54.0000] Oooh, so Realm needs a flag too for CSP [07:44:26.0000] Loader too http://people.mozilla.org/~jorendorff/es6-draft.html#sec-loader.prototype.eval [07:44:52.0000] Hmm both reference IndirectEval but that doesn't exist according to Ctrl+F [07:44:56.0000] seems like this stuff is still WIP [07:45:42.0000] Note that I also filed a complaint with those responsible: http://lists.w3.org/Archives/Public/public-webappsec/2014Feb/ [07:47:22.0000] At some point we need some kind of low-tolerance policy for forking someone else their algorithm in your own specification without prior coordination [07:47:23.0000] /me looks for someone with experience with the v8 api [07:49:07.0000] /me has some [07:49:23.0000] being the author of an embedding alternative to node [07:49:50.0000] Ms2ger: ^ [07:49:58.0000] but I have to leave soon, so I might reply later [07:59:22.0000] Domenic_: Function isn't relevant as an eval-er in ES5, given it's creates a new scope whose containing environment is the global-scope. [07:59:32.0000] (likewise indirect eval) [08:02:39.0000] gsnedders: I imagine CSP still cares. [08:03:08.0000] if CSP doesn't care about indirect eval then it won't care about Loader or Realm either [08:03:16.0000] It cares [08:04:13.0000] annevk: changes to the URL spec seem pretty great. [08:04:31.0000] I like my new advice section [08:04:44.0000] I made it up in bed in SF and then forgot about it for a while [08:04:48.0000] Domenic_: Yeah. CSP cares. But CSP also needs to care about things at the DOM level to do what it needs. [08:05:23.0000] Domenic_: (e.g., var s = document.createElement("script"); s.textContent = "blah"; document.documentElement.appendChild(s); or whatever) [08:05:39.0000] And fetch. CSP affects all. [08:06:09.0000] This would be so much less confusing if I weren't in two conversations about two different CSPs. :) [08:06:25.0000] annevk: still not sure i get "scheme data." An example or two of the decomposition might be useful. [08:06:58.0000] Domenic_: data:text/html,teehee [08:07:09.0000] text/html,teehee is scheme data, but noted [08:07:12.0000] ahhh interesting. [08:07:26.0000] annevk: https://bugzilla.mozilla.org/show_bug.cgi?id=580234 is INVALID now right? [08:07:49.0000] zcorpan: yeah I guess [08:07:57.0000] zcorpan: depending on what UAs align on for the URL parser [08:08:08.0000] zcorpan: but yeah, that bug won't be used for aligning that [08:08:15.0000] zcorpan, as long as you have a test :) [08:09:21.0000] Domenic_: most of this rewrite was done to fix blob URLs btw [08:10:00.0000] Domenic_: where we introduce a component called "object" that holds a structured clone of the Blob the scheme data of a "blob" URL points to, which is then used when fetching... [08:10:57.0000] ah interesting... it might be worth pointing out in a non-normative section how blob URLs are indeed covered by the spec. I didn't even think of them, but it's great that they are covered. [08:11:14.0000] Ms2ger: http://web-platform.test:8000/websockets/constructor/017.html [08:11:17.0000] Well, I need to write that integration bit still :-) [08:11:30.0000] It's going to be fairly explicit once everything is done [08:12:25.0000] zcorpan, nice how I can just click that link now :) [08:12:43.0000] hmm i don't get a result for that test [08:13:03.0000] I get all passes [08:20:30.0000] yeah now i do too. had messed up my working copy [08:21:52.0000] Domenic_: What were the Promise changes that were decided against? [08:23:00.0000] Domenic_: I assume it was "welp, monads suck". [08:23:14.0000] Also, presented without comment: http://lists.w3.org/Archives/Public/www-style/2014Feb/0024.html [08:23:55.0000] I see the stack of links [08:23:58.0000] I see the sender [08:24:03.0000] /me closes tabs [08:24:06.0000] *tab [08:24:10.0000] And not you [08:24:16.0000] Good job, you passed the test. [08:25:02.0000] TabAtkins_, do you know if there's a way to look at a side-by-side diff of a blink revision? [08:25:12.0000] No, I don't know. [08:25:45.0000] /me is not much of a Blink dev. [08:26:09.0000] /me looks for blink devs, then :) [08:28:32.0000] TabAtkins_: yeah that's what it sounds like. Minutes coming out soon... [08:29:32.0000] I hate that the existing shitty promises led to monadic promises seeming like a complication rather than a simplification, as they got bolted on to the side. [08:30:00.0000] And it means that we *will* have the possibility of problems with async maps, as we discussed in the Service Worker f2f. :/ [08:30:09.0000] /me sees monads, tunes out [08:30:48.0000] Le sigh. I also fucking hate the word "monad", because it's a crappy nonsense word that looks confusing. [08:30:58.0000] Like using "Functor" for "Mappable". [08:31:31.0000] "monad" just sounds like a lonely nomad [08:31:50.0000] Which isn't at all scary [08:32:06.0000] But anyway, if we're stuck with crappy promises, it means you'll never be able to get a useful API out of an async map. [08:32:26.0000] I also tune out on "responsive images" :) [08:32:37.0000] Because it'll inherently mix up "failed because the key wasn't in the map" and "key was in the map, but it was for a failed promise". [08:32:53.0000] I thought there was a whole debate in which you had some way of getting monadic promises to coexist with whatever other people liked [08:32:55.0000] You'll have to handle both of these completely separate cases in the same .then() branch. [08:33:18.0000] jgraham: Yes, there was. But Domenic_ is making it sound like people gave up on that at last week's tc39 meeting. [08:33:21.0000] I'll wait for minutes, I guess. [08:34:07.0000] (Getting them to coexist is easy - it's basically equivalent to saying that arrays can nest, but we'll also give you an iterator that moves through the flattened array instead so you can pretend they don't.) [08:34:08.0000] TabAtkins_: There are certain choice words that you should use when people try to make decisions at face to face meetings like that [08:34:36.0000] This is why you're careful with "may": https://twitter.com/aloria/status/429375273625452544 [08:34:37.0000] (Actually it's exactly equivalent to that, because MONADS.) [08:37:03.0000] jgraham: I also see the word "gonad" when I write "monad", which isn't great either. [08:39:19.0000] Tentative plan: recast current parser as base URL parser. Introduce new URL parser that invokes that and adds blob magic. Allows rest of the world to pretend blobs don't exist, makes it likely web standards pick the right parser. [08:39:27.0000] You should just follow SPJ's view that it is misnamed and should instead be a "warm fuzzy thing", because people won't be scared of it. [08:40:38.0000] gsnedders: It's not even a *thing*, though. It's an interface or typeclass or abstract base class or trait or whatever-the-hell your language calls "here's some behavior that multiple things can implement". [08:41:23.0000] Giving it a "thing" name confused me when I first started learning about it, and I'm sure messes with a lot of other people too. [08:45:08.0000] Well the same applies to "algebra" or something; it's the name for a set of rules that allow computation. Actually "algebra" is worse because it's the general name to mean any set of rules that allow some kind of abstract computation. [08:45:40.0000] But I'm not sure that people find algebra confusing because of the name [08:46:12.0000] They find it confusing because it's hard to internalise a system of rules and the consequences of those rules [08:48:02.0000] And yet they find it easy to internalize "Mappable" as being "a thing with .map()". [08:48:14.0000] Or "Iterable" as being "a thing I can iterate". [08:48:38.0000] Or "Monad" as being "a thing I can moon" [08:48:40.0000] "Monad" is just a terrible name for "Map-then-Flatten-able". (Which, granted, is also a terrible name.) [08:49:00.0000] You get it, Ms2ger! [08:49:00.0000] Well iterable is easy because there is only a single operation which is familiar from other contexts [08:49:25.0000] Monad just combines two extremely familiar operations - map and flatten. [08:50:28.0000] Flatten? [08:50:48.0000] /me isn't sure he's ever had to use it [08:51:06.0000] You've never flattened an array? [08:52:07.0000] Not that I can remember [08:52:25.0000] I certainly wouldn't say its on the same level as map [08:52:36.0000] All right. Yeah, I grant that it's less common than "map", but still not anything exotic. [08:53:23.0000] So it's a map that can push multiple values, or what? [08:53:56.0000] In terms of arrays and other containers, yeah, that's it. (Or zero values.) [08:54:14.0000] "Flatten" ends up being a really generic concept that gets stretched all over the place, but for the most common cases, it's just that. [08:54:16.0000] Fascinating [08:54:27.0000] Yay, back on this side of the split! [08:54:42.0000] (It's just "how do I turn Thing> into Thing?".) [08:54:43.0000] You want to avoid the word monad [08:54:48.0000] That may well be the first time someone managed to explain monads in an understandable way [08:54:55.0000] Ms2ger: BLAME HASKELL [08:55:07.0000] Sure, I'll blame haskell for a great good [08:56:00.0000] TabAtkins_: A monad is just a definition of a sequence of computational actions. It is pretty much a thing that can do anything. [08:56:04.0000] Monads are among the simplest things I can describe in terms of generic behaviors, but they've built up this terrible mystique and also everyone's crap at explaining them for no reason I can fathom. [08:56:18.0000] gsnedders: So you're also one of the people who's crap at explaining them. ^_^ [08:56:23.0000] Clearly :) [08:56:55.0000] Jumping straight to the "but 'flatten' is really just a way of describing computational sequencing!" is why everyone hates monads. [08:57:56.0000] You've got a Thing which contains a value. You define .map() so functions can work on the value without caring about the Thing. But sometimes your functions want to return a Thing too, and now you've got nested Things. Define a way to flatten a nested Thing into a single Thing, and you've got monads. [08:59:01.0000] TabAtkins_: It's not even any behaviour. [08:59:01.0000] TabAtkins_: It's not really a type. [08:59:07.0000] Yes, it's a typeclass. [08:59:19.0000] Or interface, or trait, or ABC. [08:59:34.0000] Just like "Mappable" isn't a type. [08:59:40.0000] You don't inherit from Mappable. [09:00:49.0000] A map is a perfectly common name in category theory for functors. :P [09:00:52.0000] TabAtkins_: :) [09:01:02.0000] TabAtkins_: It's hard to explain *because* it's so abstract. [09:01:35.0000] monads are living mirrors of the entire universe [09:01:49.0000] (I only ever knew the philosophical term) [09:01:54.0000] /me puts astearns on the list too [09:02:42.0000] gsnedders: Only if you're trying to explain it the most abstract terms. Explain it in concrete terms, same as .map(), and nobody gets lost. Let them build up to the abstract shit later, after they've gotten a hold on the most useful forms of it. [09:03:11.0000] Most people don't need to know that functions are containers for their return value, and thus are monads, with composition being the flattening operation. [09:03:29.0000] Sorry, composition is the mapping operation. [09:03:59.0000] Flattening is just calling the return value with the same args again. [09:04:10.0000] TabAtkins_: Your way gives false insight though [09:04:35.0000] jgraham: No, it gives useful insight. All learning goes from concrete to abstract, and most people are actually totally fine with staying at some level of concreteness. [09:04:49.0000] You take something that people already understand (lists) [09:05:06.0000] And then you say "look this thing is an example of X, so now you understand X" [09:05:20.0000] Yes. [09:05:29.0000] But they don't. They understand what they understood to begin with. [09:05:30.0000] For most purposes, you *do* understand X. [09:06:11.0000] From your example I couldn't tell you whether any non-list thing was a monad [09:06:21.0000] Specifically, for the purpose of stopping remarks like "sees monads, tunes out", when we're not doing anything that needs more than that basic understanding. [09:06:37.0000] jgraham: From my example, no. From my accompanying explanation (map, then flatten), you can. [09:07:10.0000] TabAtkins_: "map then flatten" still doesn't tell me anything much [09:07:24.0000] You map, then you flatten. What's there to tell? [09:07:41.0000] If you map and end up with a nested Thing, you flatten back to a single Thing. [09:08:07.0000] It's not complicated. Don't try to make it so. [09:08:08.0000] I suspect you are taking people from "thing I don't understand" to "thing that TabAtkins_ keeps insisting is easy and to do with lists, but I don't understand and therefore I am too stupid to understand" [09:08:46.0000] Do you understand "turn a nested Thing> back to Thing", and how flattening arrays is an example of that? [09:09:57.0000] TabAtkins_: Sure. For the record, I don't claim to have a good grasp of this, but I am slightly above the level at which I have given examples of how people will not understand [09:10:52.0000] That's literally all you need to understand for most monads in practice. If you've got a class with a .map() method, and a .flatten() method that will turn it from being nested to being flat, you're good. [09:11:26.0000] Also, "most functions in most languages are actually monads". [09:11:37.0000] TabAtkins_: So, for example, one of the things that "everyone knows" about Monads is that Haskell uses them for IO (this is small values of "everyone", I admit). But it is entirely unclear from your example how monads work for that. Or for many of the other things that they are used for [09:11:56.0000] It is also very unclear why one would want to make one's own code monadic [09:12:00.0000] Monads for IO are one of those abstract things that you dont' need to know to understand monads. [09:12:18.0000] jgraham: Sure, that takes a few (easy, concrete) examples to show. [09:12:34.0000] Arrays (and other containers), Option types, and you're pretty much good. [09:13:12.0000] The IO monad leverages the "flatten is just a way to sequence computations" abstraction that is way above most uses of monads. [09:16:42.0000] I'm not sure that map/flatten is very obvious for maybe. [09:18:13.0000] (which is about the most trivial example) [09:18:48.0000] Domenic_: does http://domenic.me/aplus-tests-against-the-browser/ match what’s in ES6 spec draft completely? [09:19:03.0000] Sure, it's the first step outside of the base "container" concrete examples. [09:19:36.0000] But it's easy to show - a Maybe either holds a value, or holds nothing. When you map, you either map the value and return a new Maybe holding the return value, or just return an empty Maybe again. [09:20:08.0000] mathiasbynens: it matches a subset of the ES6 spec. [09:20:36.0000] If you have nested Maybes (because your mapped function also returned a Maybe), then you flatten a Maybe> into just a Maybe, and a Maybe into a Nothing. [09:20:44.0000] Domenic_: thanks for confirming [09:22:03.0000] (Maybe can be implemented as an Array that holds either 0 or 1 values, where its .map() is Array.map(), and it's .flatten() is Array.flatten().) [09:32:11.0000] good morning, Whatwg! [09:35:04.0000] hi, using html5lib python I would like to clean up a webpage. For instance I would like to remove (including it's content) the script tags [09:35:41.0000] I'm confused between filters, tokenizer and sanitizer [09:35:48.0000] what is the difference? [09:51:17.0000] aleray: The honest answer is the sanitizer API is a mess and needs completely changed. If you want something more stable, Bleach may or may not be suitable for your purposes. [09:52:21.0000] (Bleach uses html5lib internally) [09:52:44.0000] (But provides a stable API, and will magically stay up-to-date with html5lib when all the breakage happens there.) [09:53:12.0000] But basically the tokenizer takes the tokens produced by reading the HTML before they are built into a tree (start-tag, end-tag, etc.) [09:53:34.0000] Using this for sanitising is rather broken and will not be supported in the future [09:53:44.0000] s/sanitising/anything/ [09:54:01.0000] Using it for treebuilding is just fine :) [09:54:59.0000] A filter is something that runs on the output of a treewalker. A treewalker is something that takes a parsed HTML tree and produces a series of events like start-tag, end-tag, etc. that would reconstruct that tree [09:55:16.0000] Some filters currently operate (and only work) on the tokeniser. Such as the sanitizer. [09:55:23.0000] So it's a bit like a tokenizer with different input [09:55:32.0000] No, no [09:55:42.0000] The sanitiser tries to operate on both [09:55:46.0000] Badly [09:56:06.0000] But only works on the tokenizer. It will *always* fail with a tree-walker. [09:56:16.0000] Though it tries to work with it. [09:56:47.0000] A serializer takes the output from a tree walker, possibly after it passed though a filter, and writes it as markup [09:57:22.0000] So the setup you want is tokenizer -> treebuilder -> treewalker -> sanitizer filter -> serializer [09:57:34.0000] But that doesn't wuite work right now [09:57:37.0000] *quite [09:57:47.0000] I think it might if the document has no attributes. [09:57:51.0000] (the first two parts are just called "parser") [09:58:11.0000] On the other hand, the probability of having a document with no attributes… :) [10:03:34.0000] http://esdiscuss.org/topic/specification-styles#content-11 Well, anti-IDL camp, curious to see your move :-) [10:07:34.0000] Domenic_: you're missing that there's associated state with running a script [10:08:00.0000] annevk: I don't get it. What state. Where is it captured. [10:08:20.0000] Is this another thing where DOM specs have forked ES execution semantics? [10:08:31.0000] so that [[Call]] takes some invisible parameter in DOM land? [10:08:32.0000] Domenic_: it's script thread state [10:08:46.0000] Domenic_: no, it's just some global associated with the current task [10:08:58.0000] Domenic_: ES is just not complete in its task description [10:08:59.0000] so that state isn't captured in the ES spec anywhere? [10:09:06.0000] gsnedders, sorry I missed your answer. [10:09:06.0000] Domenic_: it doesn't have tasks [10:09:46.0000] I'm actually using bleach, but I don't find how to remove a tag and its content (eg. script tags) [10:10:54.0000] .then, and ES in general, does not specify or care about this DOM thing. It just invokes [[Call]]. If window.postMessage.bind(...) has a special [[Call]] that uses some global state, then it needs to be specified by window.postMessage; it's not the promise spec's job [10:11:56.0000] gsnedders, so if I don't want to use bleach, I'd rather use filters right? [10:15:03.0000] Domenic_: ES5 doesn't queue tasks [10:46:32.0000] annevk-cloud: I don’t really like the idea of "initial value" for the components of URL objects [10:47:24.0000] or rather, baking mutability in the standard [10:57:45.0000] annevk-cloud: Should the model also define constraints like "in the ASCII range" or "ASCII digits" (port) ? [11:06:42.0000] annevk-cloud: Also, was it deliberate to go with a "flat" model where every component always exists, rather than expressing in the model constraints like "scheme data is exclusive with (user, password, host, port, path)"? https://github.com/SimonSapin/rust-url/blob/1db0239ec2c2cfcee5b7fb6e7402571844cb2135/url.rs#L33 [11:45:25.0000] TabAtkins_: Any motion on (or interest in) EventStream since last April? [11:56:31.0000] jsbell: Nope. [12:25:09.0000] annevk-cloud: only file URLs can have a null host, right? [13:16:01.0000] dglazkov: I assume with http://lists.w3.org/Archives/Public/www-style/2014Feb/0032.html you mean that blink will ship something but changes are still expected [13:16:04.0000] to shadow dom handling [13:16:10.0000] (like event propagation and what not) [13:16:24.0000] smaug____: yep [13:16:33.0000] and you just want some css stuff to be a bit more stable [13:16:36.0000] But syntax has a habit of freezing much faster than those things. [13:16:37.0000] Yeah. [13:17:25.0000] smaug____: also CSS stuff is hard to tweak with polyfills :-\ [13:17:30.0000] sure [13:17:47.0000] Does blink have plans to implement