| 02:24 | <MikeSmith> | https://groups.google.com/forum/?fromgroups#!topic/es-operating-system/8oWtRZnDK_w |
| 02:25 | <MikeSmith> | Shiki Okasaka wrote his own new browser engine |
| 05:47 | <annevk> | MikeSmith: http://code.google.com/p/es-operating-system/wiki/Cplusplus0xBinding is also pretty interesting |
| 05:48 | <annevk> | MikeSmith: did he implement HTML/CSS in JavaScript or C/C++? |
| 05:55 | <MikeSmith> | annevk: the engine is all C++ I think |
| 05:56 | <MikeSmith> | the UI is HTML and CSS |
| 05:57 | <annevk> | cool cool cool |
| 05:58 | <MikeSmith> | we should go visit Shiki down in Kyoto next time you're here |
| 05:58 | <MikeSmith> | he owns a cafe there |
| 05:58 | <annevk> | yeah I know, would be nice :) |
| 06:19 | <zcorpan> | for <ol reversed>, isn't the simplest thing to compute the start value by counting child <li> elements, and let the result be bogus if you do something bogus? |
| 06:20 | <annevk> | how is computed now? |
| 06:20 | <annevk> | it /\ |
| 06:22 | <Ms2ger> | That's the way it's counted |
| 06:22 | <Ms2ger> | Only if you do something bogus the spec isn't too clear about markers |
| 08:00 | <bdc> | hey! I was wondering if there's a way to completely remove the app cache from a website? Deleting the file and reference isn’t enough apparently :/ |
| 08:01 | <shwetank> | you mean programatically? or just from the perspective of the user (i.e, by asking the user to go in the browser's settings and delete it)? |
| 08:02 | <bdc> | programatically :) |
| 08:06 | <shwetank> | well, it should be enough ... which browser you're trying in? trying reloading a couple of times I guess, deleting the file and/or reference to it should be enough (i've always done this myself and had no issues) |
| 08:08 | <bdc> | hm ok I'll give it another try then… testing on mobile safari / ios5 |
| 08:09 | <zcorpan> | TabAtkins_: please add a new value to 'clear', clear:fix |
| 08:09 | <bdc> | I might be wrong but I think I've read some article saying it was actually not enough to just remove references |
| 08:09 | <zcorpan> | which will be the new new new way to do it |
| 08:10 | <zcorpan> | bdc: did you serve the manifest with no-cache headers? |
| 08:10 | <bdc> | zcorpan: good question :p |
| 08:11 | <zcorpan> | see gotcha #4 http://www.alistapart.com/articles/application-cache-is-a-douchebag/ |
| 08:12 | <bdc> | that's exactly the issue I have |
| 09:27 | <annevk> | Velmont: zcorpan: fancy creating a proper SVG out of http://lists.w3.org/Archives/Public/public-webappsec/2012Jun/att-0045/Hodges-CORS-Diagram-SimpleRequest-00.pdf ? |
| 09:28 | <odinho> | annevk: hm, ok. |
| 09:28 | <annevk> | odinho: unless you think it's not useful of course, but it looks fairly useful |
| 09:31 | <odinho> | Yeah. I might've decoded it faster if it was more visual though. But it's helpful either way. |
| 09:33 | <annevk> | if it would've helped you, future generations will like you for making it that way :) |
| 09:39 | <zcorpan> | annevk: doesn't seem useful for *me* |
| 09:41 | <annevk> | :) |
| 09:42 | <odinho> | zcorpan: Yeah, but you need to put yourself in a poor webdev's shoes and then think about it like that. |
| 09:42 | <zcorpan> | yeah i'm not saying it's not useful for everyone but me |
| 09:43 | <jgraham> | It seems pretty confusing |
| 09:43 | <odinho> | zcorpan: It's not like I didn't know how these requests were supposed to be made :P |
| 09:43 | <annevk> | jgraham: are you on public-webappsec? |
| 09:44 | <annevk> | jgraham: might want to mention that |
| 09:44 | <jgraham> | No |
| 09:44 | <annevk> | email to reply to is http://lists.w3.org/Archives/Public/public-webappsec/2012Jun/0045.html |
| 09:44 | <jgraham> | I can mention it here |
| 09:44 | <jgraham> | It seems inconsistent in the use of speech bubbles |
| 09:45 | <jgraham> | The initial request doesn't have one. They don't all list the same things |
| 09:45 | <odinho> | Yeah, I'm kinda changing it a bit now. |
| 10:59 | <matjas> | `'_'.anchor('x')` is `'<a name="x">_</a>'` in all browsers, except in IE, where it’s `'<A NAME="x">_</A>'` instead |
| 11:00 | <matjas> | should I tweak http://mathias.html5.org/specs/javascript/#string to allow uppercase, or could I ignore IE in this case as the resulting string is equivalent anyway? |
| 11:06 | <Ms2ger> | IE is dumb, spec the lower case thing :) |
| 11:06 | <matjas> | yay, then no tweaks are needed! |
| 11:07 | <matjas> | I guess the Strings chapter is complete then. I wrote tests for it, too: http://mathias.html5.org/tests/javascript/strings/ |
| 11:08 | <matjas> | I spent some time speccing the Object extensions too, in case anyone wants to review: http://mathias.html5.org/specs/javascript/#object |
| 11:09 | <zcorpan> | matjas: as a general rule, don't allow two things in a spec just because browsers disagree. specs are supposed to get rid of the "disagree" part, so pick the majority or the most sensible option |
| 11:09 | <matjas> | zcorpan: thanks; that makes sense |
| 11:13 | <zcorpan> | matjas: is your algorithm of substr different from the one in the ES spec? |
| 11:13 | <matjas> | it produces the same results, but the algo is a bit different |
| 11:13 | <matjas> | i had already written this when you told me it was already defined in the ES5.1 spec |
| 11:14 | <matjas> | i think this version is much more readable, but i guess that doesn’t matter |
| 11:14 | <Ms2ger> | matjas, do you want to check IsCallable() (http://ecma-international.org/ecma-262/5.1/#sec-9.11) for defineGetter/defineSetter? |
| 11:14 | <zcorpan> | i suggest you drop it and just reference the ES one |
| 11:14 | matjas | removes |
| 11:15 | <zcorpan> | having two algorithms means implementors need to spend time one evaluating whether they are equivalent |
| 11:16 | <zcorpan> | matjas: i guess all of the appendix in the ES spec is needed for compat, right? maybe say that all of it must be supported? |
| 11:18 | <matjas> | zcorpan: good call. would it be useful to have the separate features listed out in our spec, or would you just mention annex b once and never explicitly mention e.g. String#substr |
| 11:19 | <Ms2ger> | matjas, and what do Object.prototype.__defineGetter__ and friends do if you call them on non-objects? |
| 11:19 | <zcorpan> | either way works, your call :-) |
| 11:20 | <matjas> | Ms2ger: do you think that’s better / more clear than what it says now? “If function is not a Function instance (of type Function), throw a TypeError and return” |
| 11:20 | <Ms2ger> | Well, is it equivalent, and if not, what do browsers do? |
| 11:21 | <matjas> | seems like it is, as only Function instances have an internal [[Call]] property set to `true` |
| 11:21 | <matjas> | afaict |
| 11:21 | <matjas> | i guess it’s clearer to re-use the ES spec lingo though |
| 11:22 | <matjas> | thanks for the feedback! <3 |
| 11:22 | <Ms2ger> | Np :) |
| 11:23 | <Ms2ger> | Hmm, http://mxr.mozilla.org/mozilla-central/source/js/src/tests/ecma_5/extensions/extension-methods-reject-null-undefined-this.js |
| 11:26 | Ms2ger | goes off for a bit |
| 11:28 | <matjas> | interesting! I didn’t know Mozilla had a `String#quote` |
| 11:36 | <hasather> | matjas: In http://mathias.html5.org/specs/javascript/#tohtmltag, step 2, there is an extra quotation mark in "\"">" |
| 11:38 | <matjas> | hasather: good catch; thanks! |
| 11:38 | <hasather> | matjas: I'm also skeptic about the name, ToHTMLElement instead? |
| 11:39 | <matjas> | hasather: i don’t know. IMHO an element is what’s in the DOM, tags are what devs write |
| 11:40 | <matjas> | it doesn’t actually create an element (like `document.createElement`) so I think that would be confusing |
| 11:41 | <matjas> | hmm, it’s not just one “tag” though |
| 11:41 | <matjas> | could it be just “ToHTML”? |
| 11:45 | <hasather> | matjas: that's better. I wouldn't say that element is only a DOM concept though (XML has a production for it, and so has SGML) |
| 11:47 | <zcorpan> | ToTagSoup |
| 11:48 | <hasather> | :D |
| 11:48 | <zcorpan> | i think that's about as accurate as it gets :-) |
| 11:51 | <matjas> | :') |
| 11:54 | <zcorpan> | matjas: s#<code>"&quot;"</code>#"<code>&quot;</code>"# |
| 11:56 | <matjas> | zcorpan: thanks. i assume the same goes for the strings in the http://mathias.html5.org/specs/javascript/#tohtml algo? |
| 11:56 | <zcorpan> | yeah |
| 11:57 | <zcorpan> | actually the backslash thing is a bit un-spec-y |
| 11:58 | <zcorpan> | i think i'd use http://simon.html5.org/tools/js/unicodeize/ notation |
| 11:59 | <matjas> | so, "<code>"></code>" (U+0022 U+003E) |
| 11:59 | <matjas> | nice tool btw! |
| 12:00 | <zcorpan> | yeah |
| 12:00 | <zcorpan> | maybe i should make it emit <code>s too |
| 12:00 | <matjas> | do it! |
| 12:01 | <hasather> | matjas: is there a reason to say "six-character string" instead of "string"? |
| 12:02 | <matjas> | hasather: I saw that in the HTML spec somewhere and assumed it was the right way of doing things |
| 12:02 | <matjas> | hasather: it also made it more clear that the quotes aren’t part of the string; but that’s not an issue anymore with zcorpan’s suggestions |
| 12:03 | <hasather> | matjas: seems redundant, and it's not used like that always like that in the HTML spec, but I don't know if there's a reason for it |
| 12:03 | <hasather> | matjas: anyway, just nit-picking :) |
| 12:03 | <matjas> | hasather: thanks for nit-picking! very useful feedback |
| 12:06 | <zcorpan> | matjas: done |
| 12:07 | <matjas> | zcorpan: thanks! could you add .replace(/</g, '<').replace(/&/g, '&')? |
| 12:07 | <zcorpan> | i did :-) |
| 12:07 | <matjas> | thanks! |
| 12:10 | <hasather> | matjas: "=\"" still has a backslash, and not all of them have code points, but maybe you're currently updating that |
| 12:11 | <matjas> | hasather: I am, but thanks anyway :) |
| 13:02 | <odinho> | hmmm. Is this clearer? http://odin.s0.no/tmp/Hodges_odinho-CORS-Diagram-SimpleRequest.svg |
| 14:24 | <matjas> | odinho: minor typo: s/Do Access-Control-Allow-Origin/Does Access-Control-Allow-Origin/ |
| 14:24 | <odinho> | matjas: Fack, and I "fixed" it from Does to Do :P |
| 14:24 | <odinho> | Was unsure, so. |
| 14:40 | <odinho> | matjas: But no other comments? |
| 14:41 | <odinho> | So, I never liked that IndexedDB used .continue() and .delete() as they are reserved in JS, but thought, ohwell. -- But it actually breaks "with". with(os) { delete(); continue(); } doesn't work at all... |
| 14:41 | <matjas> | odinho: looks very clear to me. maybe explain what happens if access is not allowed |
| 14:41 | <jgraham> | odinho: I call "feature" |
| 14:41 | <Ms2ger> | ^ |
| 14:42 | <odinho> | matjas: Yea, thought about that. ... Hmm. Maybe I should try. Don't want it to be too advanced. And I'm basically only beautifying and SVG-ing something Jeff Hodges made. |
| 14:42 | <matjas> | odinho: only for backwards compatibility with ES3. in ES5, `continue` and `delete` are valid property names: http://mothereff.in/js-properties#delete |
| 14:43 | <odinho> | matjas: You mean that with will work correctly then? |
| 14:43 | <matjas> | odinho: as a property, yes |
| 14:44 | <matjas> | odinho: in your `with` example, you’re using `delete` as an identifier, which is not allowed |
| 14:44 | <odinho> | Yea, but property. continue() isn't a property? It has to hang onto somewhere? |
| 14:44 | <matjas> | even in ES5 |
| 14:44 | <odinho> | matjas: Yep, so what I was saying :P -- We have object.delete() and object.continue() working fine. |
| 14:45 | <matjas> | yeah, because they’re property names |
| 14:45 | <matjas> | ES5 allows the use of unquoted reserved words as property names |
| 14:45 | <matjas> | odinho: reserved words are valid IdentifierNames, but not valid Identifiers, in ES5 |
| 14:46 | <odinho> | Yeah, but it's a bit strange to use them in a web API like IDB... |
| 14:46 | <matjas> | see http://mathiasbynens.be/notes/javascript-identifiers and http://mathiasbynens.be/notes/javascript-properties if you’re interested |
| 14:46 | <odinho> | Highlight in vim is strange and all. |
| 14:46 | <odinho> | matjas: Yeah, I have somewhat control over that, keyPaths have to be valid identifiers, so I've read those parts of the ES spec. |
| 14:48 | <AryehGregor> | odinho, 'with' is evil anyway. |
| 14:48 | <odinho> | yeah, noone needs to tell me. |
| 14:49 | <jgraham> | odinho: It seems they do, because you keep talking as if breaking it is a problem |
| 14:49 | <jgraham> | ;) |
| 14:49 | <odinho> | But it's also evil to make API's that break features. |
| 14:49 | <jgraham> | "with" ain't no feature |
| 14:49 | <odinho> | And that highlight strangely in vim. :P |
| 14:49 | <AryehGregor> | Aha, so now we see your real motive. |
| 14:49 | <odinho> | jgraham: misfeatures then. |
| 14:52 | <matjas> | Gecko just unprefixed backface-visibility, perspective, perspective-origin, transform, transform-origin, transform-style — nice! |
| 14:53 | <AryehGregor> | Yep! |
| 14:53 | <AryehGregor> | Hurrah! |
| 14:53 | <AryehGregor> | Thank Ms2ger. |
| 14:55 | <Ms2ger> | Yay me :) |
| 15:00 | <Ms2ger> | matjas, all the String.prototype functions in ES5 call CheckObjectCoercible, and it looks like Gecko does that as well |
| 15:20 | <matjas> | Ms2ger: ah, only now I understand explains the Gecko source link you posted earlier |
| 15:20 | <matjas> | Ms2ger: thanks! |
| 15:20 | <Ms2ger> | Np |
| 15:43 | <matjas> | Ms2ger: do you know what I’m doing wrong here? test(function() { assert_throws(null, String.prototype.substr.call(null)); }); — http://mathias.html5.org/tests/javascript/strings/ |
| 15:43 | <matjas> | I tried `assert_throws('TypeError', fn)` first |
| 15:44 | <Ms2ger> | assert_throws(null, function() { String.prototype.substr.call(null); }); |
| 15:44 | <Ms2ger> | Or assert_throws(new TypeError(), function() { String.prototype.substr.call(null); }); |
| 15:44 | <matjas> | without wrapping it in test(), you mean? |
| 15:44 | <Ms2ger> | No, within the test |
| 15:45 | <Ms2ger> | But you need another function() |
| 15:45 | <matjas> | ah, duh! |
| 15:45 | <matjas> | thanks |
| 16:02 | <karlcow> | I wonder if the kobo touch JP (webkit) handles Furigana http://img.asiajin.com/blog/wp-content/uploads/2012/07/rakuten-kobo.png |
| 16:03 | <karlcow> | hmm yes it does. |
| 16:03 | <karlcow> | stupid me visible on the pic |
| 16:07 | <matjas> | interesting, WebKit & IE don’t perform the CheckObjectCoercible step for the String extensions |
| 16:17 | <Ms2ger> | Opera and Gecko do, though |
| 16:17 | <Ms2ger> | Actually, is this WebKit or V8? |
| 16:18 | <jgraham> | V8 I guess |
| 16:41 | <Ms2ger> | matjas, http://mathias.html5.org/specs/javascript/ is empty |
| 17:21 | <matjas> | Ms2ger: fixed |
| 17:21 | <Ms2ger> | Ta |
| 19:49 | <smokeyrat> | What is WhatWG again? Some kind of subset of W3C? And why did W3C rename to W3? |
| 19:50 | <TabAtkins_> | smokeyrat: WHATWG is an independent group that was formed after the W3C decided not to work on HTML. The W3C later changed its mind, and now HTML is developed jointly by both groups. |
| 19:50 | <TabAtkins_> | The W3C didn't rename to W3. It just uses "w3.org" as its url. |
| 19:58 | <smokeyrat> | You mean when they went all XHTML? |
| 19:59 | <TabAtkins_> | Yes. |
| 19:59 | <smokeyrat> | How come WhatWG has a say? Who made it? Usually, sensible groups that break out from a big organization have no say. |
| 19:59 | <smokeyrat> | That whole XHTML thing was bizarre. |
| 20:00 | <Ms2ger> | Because browsers vendors believe the WHATWG has a say |
| 20:01 | <othermaciej> | whatwg is also sort of a w3c community group but still in some ways independent |
| 20:01 | <smokeyrat> | I always found the W3C site to be a strange place. They used all kinds of bad practice in their own code, and even in examples, and at some point they used AdSense for Search on their site. They just gave a very lousy impression. |
| 20:02 | <othermaciej> | The w3c takes feedback on their site design |
| 20:06 | <TabAtkins_> | The WHATWG was created *by* browser vendors, who were annoyed at the W3C stopping work on HTML. It was just an alternate location to keep developing HTML, since the W3C wasn't going to allow it anymore. |
| 20:06 | <smokeyrat> | W3C = George Lucas? |
| 20:06 | <smokeyrat> | "HTML doesn't exist. HTML is dead to us. XHTML is the future." |
| 20:07 | <smokeyrat> | But yeah, they seem to have gotten *some* sense back. |
| 20:07 | <smokeyrat> | Too bad they still didn't make a sensible doctype syntax for HTML 5. |
| 20:07 | <Hixie> | the doctype in HTML now was developed in the WHATWG actually :-) |
| 20:08 | <othermaciej> | <!DOCTYPE html> was invented by the WHATWG |
| 20:08 | <Hixie> | it's the shortest thing we could come up with that still worked |
| 20:08 | <Hixie> | (we tried pretty hard to find shorter ones) |
| 20:08 | <othermaciej> | w3c is not really pushing XHTML-everything any more |
| 20:08 | <smokeyrat> | Why in the freaking heck not <html version="5">? |
| 20:08 | <othermaciej> | though there is a new desire to try to shove anything and everything into HTML |
| 20:08 | <smokeyrat> | Why was it ever an incredibly long and impossible-to-memorize line? |
| 20:08 | <othermaciej> | <html version="5"> is not a doctype |
| 20:09 | <othermaciej> | the impossible-to-memorize line was due to SGML |
| 20:09 | <othermaciej> | "<!doctype html>" is the shortest string that triggers standards mode |
| 20:09 | <othermaciej> | that is the sole reason for it |
| 20:09 | <smokeyrat> | The only thing I know of that is in HTML 5 that I don't get (but I'm sure there is more) is some kind of client-side SQL database. Which makes no sense at all. |
| 20:09 | <othermaciej> | you really want to be in standards more, not quirks mode |
| 20:09 | <othermaciej> | otherwise html5 would have no doctype at all |
| 20:09 | <smokeyrat> | The entire concept of standards/quirks mode still exists in modern IEs? |
| 20:10 | <Hixie> | sadly yes |
| 20:10 | <Hixie> | it's even specced now |
| 20:10 | <Hixie> | we had no choice, there were pages depending on both modes |
| 20:10 | <TabAtkins_> | In all modern browsers, not just IE. |
| 20:10 | <Hixie> | (four modes, really) |
| 20:11 | <smokeyrat> | Dang ol' mess. |
| 20:11 | <Hixie> | welcome to html |
| 20:11 | <smokeyrat> | Not really new to it... I remember when IE 6 was bliss compared to Netscape Navigator 4.8. |
| 20:20 | <smokeyrat> | Some PNGs in IE are not properly transparent, it seems. Or maybe I should phrase it like this: the transparency of PNGs in today's current stable versions of IE, Opera, Firefox, Safari and Chrome seems to vary. Can somebody confirm this? |
| 20:24 | <c|oneman> | probably fine in latest version |
| 20:24 | <c|oneman> | I knoew early IE's hae trouble |
| 20:24 | <smokeyrat> | IE 9 here. |
| 20:24 | <smokeyrat> | Not fine. |
| 21:00 | <tsatse> | Hello I'd like to submit a proposal about the canvas API |
| 21:00 | <tsatse> | In my use case, I'd like to be able to manipulate canvases with lower bit-depth |
| 21:01 | <tsatse> | like say one colour channel per pixel |
| 21:01 | <tsatse> | that is useful if you need to store a lot of offscreen canvases but don't really need all that pixel information |
| 21:02 | <tsatse> | it would allow to stuff more offscreen canvases in the same memory chunk |
| 21:02 | <tsatse> | that could be useful in games, image manipulation apps |
| 21:02 | <tsatse> | etc. |
| 21:02 | <tsatse> | and it should improve the processing time too in some cases |
| 21:03 | <tsatse> | because it would mean less pixels to copy when blitting for example |
| 21:51 | <jamesr> | tsatse, interesting! take a look at http://wiki.whatwg.org/wiki/FAQ#Is_there_a_process_for_adding_new_features_to_a_specification.3F if you haven't seen it. the proposal sounds reasonable, but as an implementor i would wonder if there are enough use cases to justify adding the API surface area / implementation code |
| 21:52 | <jamesr> | tsatse, if you just do the naive thing and use a canvas with full bit-depth, how wasteful is it in practice? i.e. how many games / image manipulation apps / etc see significant overhead? |
| 21:52 | <jamesr> | and if there are a lot, is canvas 2d the right primitive for them? |
| 22:11 | <tsatse> | jamesr, thanks. someone suggested me to store lower-depth image data in a typed array and manually move the data back and forth between the canvas when needed |
| 22:11 | <tsatse> | which is reasonable in my use case |
| 22:12 | <tsatse> | jamesr, I was thinking this was lacking because it's so common in opengl for instance to manipulate different colour-depth textures |
| 22:13 | <tsatse> | jamesr, and thanks for the pointer to the faq. I was looking for that formal information |
| 22:13 | <jamesr> | it's more advice than formal information |
| 22:13 | <jamesr> | webgl does have support for different texture formats, etc |
| 22:14 | <tsatse> | but it's less supported than canvas-2d |
| 22:14 | <jamesr> | canvas 2d is a bit higher-level |
| 22:14 | <tsatse> | yes |
| 22:14 | <jamesr> | it didn't have any support for controlling filtering until very recently |
| 22:15 | <tsatse> | it's good to have those features coming to canvas 2d because it means a higher reach for users |