/irc-logs / freenode / #whatwg / 2007-05-23 / end

Options:

  1. # Session Start: Wed May 23 00:00:00 2007
  2. # Session Ident: #whatwg
  3. # [00:01] <Dashiva> Hey Hixie, I understand acid3 is not available, not finished and all, but how about at least removing that incomplete line that triggers a parse error and makes it not work at all :)
  4. # [00:02] <Hixie> why?
  5. # [00:02] <Dashiva> So the tests that do work can be run
  6. # [00:03] <Hixie> why? browser vendors won't want the big test, and who else is there who would care?
  7. # [00:04] <Dashiva> Those of us who hunt unreported bugs
  8. # [00:04] <Hixie> copy the file and edit it :-P
  9. # [00:05] <Dashiva> Darn, I was hoping you wouldn't think of that
  10. # [00:05] <Hixie> i'm in the middle of writing that test, it's not done yet, i'm not going to go out of my way to make it usable when all that would do is make my work harder
  11. # [00:05] * Joins: webben (n=benh@91.84.133.109)
  12. # [00:06] <Hixie> the tests in it are all based on other tests on hixie.ch anyway as far as i recall
  13. # [00:06] <Hixie> and are trivially extractable
  14. # [00:12] <Philip`> Hixie: Waiting for browsers to make my code faster doesn't seem like it'd work too well in practice, since the bottlenecks that affect my code might not affect anyone else so the browsers wouldn't care enough to spend the effort optimising it; and even if they did fix it, it'd take a year or two for the next release to get out there, whereas I would want it to work as well as possible for people today
  15. # [00:13] <Hixie> fair enough. but then you'll have the same problem that any optimising compiler has -- different platforms and architectures have different characteristics and so will need optimising in different ways. :-)
  16. # [00:14] <Philip`> although in practice I see 50% of people using Firefox 2 on Windows so I could just optimise for that and forget about everyone else, but I prefer to be nice to everyone else :-)
  17. # [00:15] <jruderman> Hixie: what does "the animation while the test was running has to be smooth" mean? no pauses in the percentages? the color changes should be gradual?
  18. # [00:17] <Philip`> I think the main problem is just working out what the characteristics are - I suppose I could have some one-off calibration process that measures some things, and store the results in globalStorage so it can skip that step next time, and then it'll be better at adapting to unexpected/unknown platforms
  19. # [00:18] <Hixie> jruderman: it means you should be getting 20fps or better
  20. # [00:18] <Philip`> (maybe kind of like an optimising compiler that emits two versions of a function, one with plain x86 code and one with SSE3, with run-time detection of which version it should use, although not really like that since that can just ask the CPU for its capabilities instead of guessing...)
  21. # [00:18] <Hixie> Philip`: until a user upgrades to another browser and the browser imports those globalStorage settings :-)
  22. # [00:19] <jruderman> Hixie: hmm. i get a slight pause at 44% or 45% in firefox trunk
  23. # [00:19] <Philip`> It'd associate the results with the UA string to avoid that problem :-)
  24. # [00:19] <jruderman> Hixie: old computers need not apply? :P
  25. # [00:20] <Philip`> although if they upgrade their hardware and copy their old browser settings...
  26. # [00:20] <Dashiva> Odd, the tests around 44-45 are all empty
  27. # [00:20] <Hixie> jruderman: you shouldn't see jerks in any browser on any platform
  28. # [00:21] <jruderman> maybe that's when the browser decides to do javascript+xpcom garbage collection
  29. # [00:22] <Hixie> then it sucks
  30. # [00:26] <othermaciej> Philip`: what code do you have in mind?
  31. # [00:35] <Philip`> I don't have anything specific in mind that I'm intending to work on - I'm mostly remembering Canvex and thinking about how I could have done that better
  32. # [00:37] <Philip`> (That's basically lots of scaled drawImages, so I didn't care about the performance of drawing lines and polygons and gradients and things)
  33. # [00:38] * Parts: hendry (n=hendry@91.84.53.136)
  34. # [00:40] <zcorpan> Philip`: you know about elastomania?
  35. # [00:43] <Philip`> zcorpan: No, except for having looked at screenshots of something with that name on Wikipedia about fifteen seconds ago
  36. # [00:44] <zcorpan> Philip`: heh, ok. i was thinking about whether it would be possible to port that to canvas with the exact same physics
  37. # [00:45] <zcorpan> http://video.google.com/videoplay?docid=-669731391958349456&q=elastomania
  38. # [00:51] * Quits: karlUshi (n=karl@ARouen-252-1-159-72.w90-23.abo.wanadoo.fr) ("Where dwelt Ymir, or wherein did he find sustenance?")
  39. # [00:52] <Philip`> zcorpan: From what I can see, the 3D bits (rotating rider and (I think) apples) wouldn't really be possible, but I don't see any reason why the rest of it couldn't be reproduced
  40. # [00:53] <zcorpan> oh, nothing is 3d
  41. # [00:53] <zcorpan> and i don't care about the animations
  42. # [00:53] * Parts: webben (n=benh@91.84.133.109)
  43. # [00:54] <zcorpan> i was more curious about whether the physics could be reproduced exactly
  44. # [00:56] <Philip`> Oh, they look rather 3Dish
  45. # [00:56] <Philip`> How exactly is "exactly"?
  46. # [00:57] <Philip`> I expect you'd get minor differences just between JS doubles and C floats
  47. # [00:57] <zcorpan> probably
  48. # [00:59] <Philip`> (It'd presumably also be impossible to reproduce fairly accurately without having access to the source code to copy)
  49. # [00:59] <zcorpan> yeah, makes sense. it's not open source
  50. # [01:00] <Philip`> Trying to deduce floating point algorithms from disassembly is usually a bit of a pain :-(
  51. # [01:03] <Philip`> It might not be impossible to work out something that acts similarly, though - it looks kind of like the bikes are just three masses with some damped springs, with collisions between the wheels and some straight lines, and presumably some forces from user input and gravity and friction and air resistance
  52. # [01:04] <zcorpan> no air resistance, but otherwise yeah, something like that
  53. # [01:05] <Philip`> It should just be some maths, and some tweaking of values, and not much else :-)
  54. # [01:06] <zcorpan> but it wouldn't be worth attempting if it would only be possible to get something that acts similarly...
  55. # [01:07] <zcorpan> well, for new players it might be
  56. # [01:08] * Joins: Toolskyn88 (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl)
  57. # [01:10] * Joins: Toolskyn_ (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl)
  58. # [01:13] <Philip`> Have people reverse-engineered/documented the level file format?
  59. # [01:15] <zcorpan> dunno
  60. # [01:17] <Philip`> The .exe has some strings (I guess from assert calls) that appear to give some information about the physics, except they say things like "gyuru::beszur-ban k >= pontszam!" and I'm not quite sure what that means
  61. # [01:18] <zcorpan> um, don't know either
  62. # [01:19] * Quits: billmason (n=billmaso@ip156.unival.com) (Read error: 104 (Connection reset by peer))
  63. # [01:22] <Philip`> At least I can read "fabs( ujenergia - oldenergia ) > 0.001!"
  64. # [01:24] * Quits: KevinMarks (i=KevinMar@pdpc/supporter/active/kevinmarks) ("The computer fell asleep")
  65. # [01:25] * Quits: Toolskyn (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl) (Read error: 110 (Connection timed out))
  66. # [01:25] <zcorpan> seems like it's written in Hungary
  67. # [01:27] <zcorpan> i mean Hungarian
  68. # [01:27] * Quits: Toolskyn88 (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl) (Read error: 110 (Connection timed out))
  69. # [01:28] * Joins: Toolskyn (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl)
  70. # [01:30] <Philip`> http://www.gamedev.net/community/forums/topic.asp?topic_id=397791 has some relevant notes
  71. # [01:33] <Philip`> It'd always be possible to ask the original author exactly how the physics works, though I don't know if he'd like people reproducing his work in JavaScript :-)
  72. # [01:33] <zcorpan> perhaps it makes elastomania even more famous :)
  73. # [01:34] <zcorpan> it's a very addicting game
  74. # [01:34] <Philip`> I just keep bashing my head on the floor and dying
  75. # [01:35] * Quits: nickshanks (n=nicholas@home.nickshanks.com)
  76. # [01:35] <zcorpan> heh
  77. # [01:35] * Quits: aroben (i=adamrobe@nat/apple/x-3e6a6861855ff2b3)
  78. # [01:36] <zcorpan> ah, its collision detection explains some bugs indeed
  79. # [01:37] * Joins: aroben (i=adamrobe@nat/apple/x-3235a9c15e9fd8db)
  80. # [01:37] * Quits: hasather (n=hasather@81-235-209-174-no62.tbcn.telia.com) (Read error: 104 (Connection reset by peer))
  81. # [01:37] * Joins: hasather (n=hasather@81-235-209-174-no62.tbcn.telia.com)
  82. # [01:42] <zcorpan> good stuff in there
  83. # [01:43] * Joins: KevinMarks (i=KevinMar@nat/google/x-474680ac7f54d202)
  84. # [01:44] * Quits: Toolskyn_ (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl) (Connection timed out)
  85. # [01:57] <zcorpan> xmoto is open source... but it doesn't have the same physics as elastomania at all
  86. # [02:02] * Parts: hasather (n=hasather@81-235-209-174-no62.tbcn.telia.com)
  87. # [02:05] * Quits: Welly (n=Welly@62-31-160-20.cable.ubr11.azte.blueyonder.co.uk) ("Computer went to sleep")
  88. # [02:13] * Joins: yod (n=ot@softbank221018155222.bbtec.net)
  89. # [02:20] * Quits: bzed (n=bzed@dslb-084-059-099-088.pools.arcor-ip.net) ("Leaving")
  90. # [02:23] * Quits: weinigLap (i=weinig@nat/apple/x-bc8b1335d980861d) (Remote closed the connection)
  91. # [02:24] * Joins: weinigLap (i=weinig@nat/apple/x-9fd4c6da5c3b0a4d)
  92. # [02:36] * Quits: weinigLap (i=weinig@nat/apple/x-9fd4c6da5c3b0a4d) (Remote closed the connection)
  93. # [02:37] * Joins: weinigLap (i=weinig@nat/apple/x-cf5f6a2e9b5be182)
  94. # [02:39] * Quits: kingryan (n=kingryan@corp.technorati.com)
  95. # [02:40] * Quits: weinigLap (i=weinig@nat/apple/x-cf5f6a2e9b5be182) (Client Quit)
  96. # [02:41] * Quits: aroben (i=adamrobe@nat/apple/x-3235a9c15e9fd8db)
  97. # [02:50] * Parts: zcorpan (n=zcorpan@84-216-43-255.sprayadsl.telenor.se)
  98. # [02:50] * Quits: Toolskyn (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl) (Connection timed out)
  99. # [03:17] * Joins: weinigLap (i=weinig@nat/apple/x-9bfcbf9e2fd47b40)
  100. # [03:25] * Joins: aroben (i=adamrobe@nat/apple/x-28f9203a9eff5be4)
  101. # [03:26] * Quits: aroben (i=adamrobe@nat/apple/x-28f9203a9eff5be4) (Client Quit)
  102. # [03:27] * Joins: aroben (i=adamrobe@nat/apple/x-2feed6bc00425d0d)
  103. # [03:31] * Quits: KevinMarks (i=KevinMar@pdpc/supporter/active/kevinmarks) ("The computer fell asleep")
  104. # [04:10] * Joins: h3h (n=w3rd@cpe-66-75-149-197.san.res.rr.com)
  105. # [04:30] * moeffju[Work] is now known as moeffju[ZzZz]
  106. # [04:53] * Quits: othermaciej (i=mjs@nat/apple/x-2babe6d794088105)
  107. # [04:55] * Quits: dbaron (n=dbaron@corp-242.mountainview.mozilla.com) ("8403864 bytes have been tenured, next gc will be global.")
  108. # [04:58] * Quits: jruderman (n=jruderma@corp-242.mountainview.mozilla.com)
  109. # [05:03] * Quits: Dashiva (i=Dashiva@v035b.studby.ntnu.no)
  110. # [05:04] * Joins: othermaciej (i=mjs@nat/apple/x-6c1f5e9e0dae2327)
  111. # [05:05] * Quits: h3h (n=w3rd@cpe-66-75-149-197.san.res.rr.com)
  112. # [05:08] * Joins: Dashiva (i=Dashiva@v035b.studby.ntnu.no)
  113. # [05:21] * Quits: othermaciej (i=mjs@nat/apple/x-6c1f5e9e0dae2327) (Read error: 110 (Connection timed out))
  114. # [05:23] * Joins: jruderman (n=jruderma@c-67-169-183-228.hsd1.ca.comcast.net)
  115. # [05:43] * Joins: MikeSmith (n=MikeSmit@tea12.w3.mag.keio.ac.jp)
  116. # [05:59] <MikeSmith> Hixie - you there?
  117. # [05:59] <MikeSmith> wanted to ask about meanings of flags/fields in html5 checkin message
  118. # [06:08] * Joins: htmlr (n=cjb@203-158-58-245.dyn.iinet.net.au)
  119. # [06:09] * Quits: weinigLap (i=weinig@nat/apple/x-9bfcbf9e2fd47b40)
  120. # [06:32] * Joins: weinigLap (n=weinig@c-67-170-238-241.hsd1.ca.comcast.net)
  121. # [06:33] * Quits: weinigLap (n=weinig@c-67-170-238-241.hsd1.ca.comcast.net) (Remote closed the connection)
  122. # [06:34] * Joins: weinigLap (n=weinig@c-67-170-238-241.hsd1.ca.comcast.net)
  123. # [06:43] * Joins: othermaciej (n=mjs@c-67-164-12-146.hsd1.ca.comcast.net)
  124. # [07:02] * Quits: othermaciej (n=mjs@c-67-164-12-146.hsd1.ca.comcast.net) (Read error: 110 (Connection timed out))
  125. # [07:08] <hsivonen> how testable is the HTML5 tokenizer these days? are the tokenizer tests in html5lib designed to run without a tree builder setting the content model flag?
  126. # [07:08] <hsivonen> testable on its own, that is
  127. # [07:14] * Quits: csarven (n=nevrasc@modemcable081.152-201-24.mc.videotron.ca)
  128. # [07:15] * Joins: othermaciej (n=mjs@dsl081-048-145.sfo1.dsl.speakeasy.net)
  129. # [07:28] * Quits: othermaciej (n=mjs@dsl081-048-145.sfo1.dsl.speakeasy.net)
  130. # [07:30] * Joins: othermaciej (n=mjs@dsl081-048-145.sfo1.dsl.speakeasy.net)
  131. # [07:32] <Hixie> MikeSmith: see the web-apps-tracker
  132. # [08:07] <MikeSmith> Hixie - thanks ... looking now
  133. # [08:10] <MikeSmith> Hixie - I know already about the browser flags in square brackets ... was wondering about the number in parens
  134. # [08:10] <Hixie> that's he stability
  135. # [08:12] <hsivonen> Hixie: are your tokenizer tests applicable without a tree builder? that is, can I develop a tokenizer first and prove that I pass the semiofficial tests before I develop a suite of tree builder?
  136. # [08:12] * hsivonen has a plan for 4 or 5 tree builder subclasses
  137. # [08:13] <Hixie> i believe there are tokeniser tests, but i didn't write them
  138. # [08:13] <MikeSmith> Hixie - OK ... stability values defined anywhere (mostly seems to be either 0 or 2 in checkin descriptions)
  139. # [08:13] <Hixie> hsivonen: i assumed that most people would not write tokenisers exactly per spec
  140. # [08:13] <hsivonen> Hixie: oh. I thought you had a tokenizer test suite
  141. # [08:13] <othermaciej> presumably only the actual tree output is normative
  142. # [08:14] <othermaciej> but some tokenizer issues must inevitably affect the DOM, so end-to-end tests could be made
  143. # [08:14] <Hixie> MikeSmith: 0 = experimental, 1 = unstable, 2 = has implementations, 3 = has stable implementations
  144. # [08:14] * Quits: aroben (i=adamrobe@nat/apple/x-2feed6bc00425d0d)
  145. # [08:15] <Hixie> hsivonen: my tokeniser wasn't an implemenatation of the spec -- e.g. it did some preprocessing magic for collecting characters together and separating whitespace from non-whitespace depending on the tree constructor mode
  146. # [08:15] <hsivonen> Hixie: how do you mean not exactly per spec? I intend to use the runtime stack for implicit state instead of an explicit state variable. Mike Day suggested making a table-driven DFA, but I'm not sure that makes sense in terms of optimizing Java performance
  147. # [08:15] <Hixie> hsivonen: so any tests i had for that wouldn't match the spec
  148. # [08:15] <hsivonen> oh
  149. # [08:15] <MikeSmith> Hixie - thanks
  150. # [08:15] <Hixie> np
  151. # [08:16] <hsivonen> othermaciej: I do intend to test the whole thing with a tree builder eventually
  152. # [08:17] <hsivonen> (although I am hoping to write the tree building stuff one with pluggable tree builder-specific back ends so that there's really only one tree builder to test instead of 4 or 5)
  153. # [08:17] <hsivonen> s/stuff one/stuff once/
  154. # [08:19] * Joins: KevinMarks (n=KevinMar@h-68-164-93-9.snvacaid.dynamic.covad.net)
  155. # [08:19] * Joins: aroben (i=adamrobe@nat/apple/x-49d798d480fe2de5)
  156. # [08:52] * Quits: aroben (i=adamrobe@nat/apple/x-49d798d480fe2de5) (Read error: 110 (Connection timed out))
  157. # [09:00] * Joins: hendry (n=hendry@91.84.53.136)
  158. # [09:12] * Joins: Toolskyn (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl)
  159. # [09:34] * Joins: peepo (n=Jay@host81-132-186-246.range81-132.btcentralplus.com)
  160. # [09:36] * Quits: peepo (n=Jay@host81-132-186-246.range81-132.btcentralplus.com) (Client Quit)
  161. # [09:36] * Joins: peepo (n=Jay@host81-132-186-246.range81-132.btcentralplus.com)
  162. # [09:47] * Quits: gavin_ (n=gavin@firefox/developer/gavin) (Read error: 110 (Connection timed out))
  163. # [09:49] <annevk> we're doing SQL now?!
  164. # [09:54] * Quits: yod (n=ot@softbank221018155222.bbtec.net) ("Leaving")
  165. # [09:54] * Quits: peepo (n=Jay@host81-132-186-246.range81-132.btcentralplus.com) ("later")
  166. # [09:59] <virtuelv> annevk: ?
  167. # [09:59] <virtuelv> SQL in HTML5?
  168. # [09:59] * virtuelv confused
  169. # [10:04] <annevk> http://html5.org/tools/web-apps-tracker?from=837&to=838
  170. # [10:15] * Joins: met_ (n=Hassman@b14-4.vscht.cz)
  171. # [10:24] <annevk> I think it would be easier if the second argument was an array
  172. # [10:24] <annevk> of executeSql()
  173. # [10:25] <annevk> Methods with an arbitrary amount of arguments are hard to construct on the fly
  174. # [10:36] * Quits: hendry (n=hendry@91.84.53.136) ("leaving")
  175. # [10:36] * Joins: bzed (n=bzed@dslb-084-059-117-253.pools.arcor-ip.net)
  176. # [10:39] * Joins: mikeday (n=mikeday@60.224.50.129)
  177. # [10:44] * Joins: maikmerten (n=maikmert@Lafc6.l.pppool.de)
  178. # [10:44] <mikeday> so, in HTML5, http-equiv is only kept around for backward compatibility with refresh, yeah?
  179. # [10:45] * Joins: weinigLap_ (n=weinig@c-67-170-238-241.hsd1.ca.comcast.net)
  180. # [10:48] <annevk> it's actually conforming to use it
  181. # [10:49] <mikeday> what about http-equiv="content-type" ?
  182. # [10:50] <annevk> that's replaced with <meta charset=utf-8>
  183. # [10:50] <annevk> well, replaced with <meta charset>
  184. # [10:50] <mikeday> right, so pages that still use it can not be valid HTML5? (for whatever definition of valid we are using this week)
  185. # [10:51] <othermaciej> I think <meta http-equiv="content-type"> should remain conforming for charset purposes
  186. # [10:51] <othermaciej> so your content can be conforming but still degrade gracefully
  187. # [10:52] * Quits: weinigLap (n=weinig@c-67-170-238-241.hsd1.ca.comcast.net) (Read error: 110 (Connection timed out))
  188. # [10:52] * Joins: hendry (n=hendry@91.84.53.136)
  189. # [10:52] <othermaciej> annevk: Function.call in JS lets you call any function with a variable number of arguments with an array instead
  190. # [10:52] <mikeday> that would help reduce confusion for authors following existing tutorials
  191. # [10:52] <othermaciej> annevk: but I don't believe there's a way to do the converse
  192. # [10:53] <annevk> mikeday, valid also requires <!Doctype html>
  193. # [10:53] <mikeday> true.
  194. # [10:54] <annevk> othermaciej, when would you want to do the reverse?
  195. # [10:55] <annevk> how do you set CVSROOT in Ubuntu?
  196. # [10:55] <othermaciej> annevk: I don't think you would want to do the reverse, but it makes functions w/ variable arguments more useful than functions that take an array
  197. # [10:55] <othermaciej> if you only have one
  198. # [10:55] <othermaciej> and I think I mean Function.apply, not call
  199. # [10:56] <mikeday> export CVSROOT=?
  200. # [10:57] <annevk> mikeday, cool
  201. # [10:57] * annevk continues fooling around
  202. # [10:58] * annevk is trying to switch to Ubuntu
  203. # [11:02] * Joins: weinigLap (n=weinig@c-67-170-238-241.hsd1.ca.comcast.net)
  204. # [11:02] * Quits: weinigLap_ (n=weinig@c-67-170-238-241.hsd1.ca.comcast.net) (Read error: 104 (Connection reset by peer))
  205. # [11:02] <annevk> othermaciej, the good thing about not allowing content-type is that there's only one way to do it
  206. # [11:02] <annevk> (in the markup, as you can still set it through HTTP)
  207. # [11:03] <Hixie> i can't think of a single time i've ever wanted to call a sql evaluator with a variable number of arguments -- it's not like getElementsByClassName() in that respect
  208. # [11:03] <mikeday> annevk, what are you using now?
  209. # [11:03] <annevk> ubuntu
  210. # [11:03] <annevk> I used to use Windows XP
  211. # [11:03] <mikeday> ah.
  212. # [11:03] <annevk> I also have a Windows XP installation on this computer
  213. # [11:03] <annevk> but I hope to leave it alone
  214. # [11:04] <mikeday> vmware is handy for testing IE bugs while still running Linux
  215. # [11:04] <mikeday> if you've got gcc installed, you can always try building my stub code: libhtml.sf.net
  216. # [11:04] <annevk> yeah, I got IE6 and IE7 running
  217. # [11:04] <mikeday> (you'll need svn to check it out, not cvs)
  218. # [11:05] <annevk> I need CVS for W3C stuff
  219. # [11:05] <othermaciej> annevk: I think "only one way to do it" is a weak advantage compared to graceful degradation
  220. # [11:06] <othermaciej> in fact, I'm not sure <meta charset=""> is really justifiable
  221. # [11:06] <othermaciej> it's nicer syntax but it does not degrade in older browsers at all
  222. # [11:06] <annevk> browsers have to support it to support the web
  223. # [11:06] <annevk> in that sense it degrades perfectly
  224. # [11:06] <othermaciej> <meta charset>?
  225. # [11:07] <annevk> yeah
  226. # [11:07] <othermaciej> what current browsers support it?
  227. # [11:07] <othermaciej> I guess I just did not know about it
  228. # [11:07] <Hixie> all of them
  229. # [11:07] <mikeday> hmm, in the charset sniffing, <!--> is not a complete comment, and <!----> is, but what about <!---> ?
  230. # [11:07] <Hixie> specifically they support <meta htt-equiv=content-type content=text/html; charset=utf-8>
  231. # [11:07] <Hixie> (note the lack of quotes)
  232. # [11:08] <othermaciej> that's amusing
  233. # [11:08] <annevk> mikeday, also not complete
  234. # [11:08] <othermaciej> ok, no real objection then
  235. # [11:09] <mikeday> annevk, the spec could be clearer on that point :)
  236. # [11:09] <mikeday> or, I could be smarter
  237. # [11:09] <mikeday> I missed the bit that said after the existing --
  238. # [11:09] <annevk> (note that <!--> will become a comment in due course)
  239. # [11:10] <annevk> (to minimize differences between quirks and standards mode)
  240. # [11:10] <mikeday> "Advance the position pointer so that it points at the first 0x3E byte which is preceeded by two 0x2D bytes and comes after the second 0x2D byte that was found."
  241. # [11:10] * Joins: zcorpan (n=zcorpan@84-216-42-16.sprayadsl.telenor.se)
  242. # [11:10] <mikeday> it could be clearer that the two 0x2D bytes come after the second 0x2D byte that was found
  243. # [11:10] <mikeday> not just the first 0x3E byte coming after the second 0x2D byte that was found.
  244. # [11:10] <Hixie> send mail
  245. # [11:11] * mikeday sends
  246. # [11:11] <Hixie> thanks
  247. # [11:11] <mikeday> (although if comment definition will change, perhaps charset sniffing will need to change as well)
  248. # [11:12] <annevk> yeah, likely
  249. # [11:12] <annevk> at least, it would make sense if they behaved the same :)
  250. # [11:16] <mikeday> I'm trying to write a little state machine for charset sniffing,
  251. # [11:16] <mikeday> as it's a lot easier than writing a state machine for complete HTML tokenisation :)
  252. # [11:35] * mikeday is now known as mikeday|away
  253. # [11:38] <zcorpan> what's the use-case for a client-side database?
  254. # [11:50] * Joins: tantek (n=tantek@c-67-188-209-131.hsd1.ca.comcast.net)
  255. # [11:55] * othermaciej is now known as om_sleep
  256. # [11:57] * Quits: hendry (n=hendry@91.84.53.136) (kubrick.freenode.net irc.freenode.net)
  257. # [11:57] * Quits: mpt (n=mpt@canonical/launchpad/mpt) (kubrick.freenode.net irc.freenode.net)
  258. # [11:57] * Quits: jgraham (n=jgraham@85-210-7-238.dsl.pipex.com) (kubrick.freenode.net irc.freenode.net)
  259. # [11:57] * Quits: hsivonen (n=hsivonen@kekkonen.cs.hut.fi) (kubrick.freenode.net irc.freenode.net)
  260. # [11:57] * Quits: laug (n=laug@poy.chewa.net) (kubrick.freenode.net irc.freenode.net)
  261. # [11:57] * Quits: didymos (i=jho@rapwap.razor.dk) (kubrick.freenode.net irc.freenode.net)
  262. # [11:57] * Quits: deltab (n=deltab@82-46-154-93.cable.ubr02.smal.blueyonder.co.uk) (kubrick.freenode.net irc.freenode.net)
  263. # [11:58] * Joins: hendry (n=hendry@91.84.53.136)
  264. # [11:58] * Joins: mpt (n=mpt@canonical/launchpad/mpt)
  265. # [11:58] * Joins: jgraham (n=jgraham@85-210-7-238.dsl.pipex.com)
  266. # [11:58] * Joins: hsivonen (n=hsivonen@kekkonen.cs.hut.fi)
  267. # [11:58] * Joins: didymos (i=jho@rapwap.razor.dk)
  268. # [11:58] * Joins: laug (n=laug@poy.chewa.net)
  269. # [11:58] * Joins: deltab (n=deltab@82-46-154-93.cable.ubr02.smal.blueyonder.co.uk)
  270. # [12:03] * Quits: weinigLap (n=weinig@c-67-170-238-241.hsd1.ca.comcast.net) (No route to host)
  271. # [12:06] * moeffju[ZzZz] is now known as moeffju
  272. # [12:08] <hsivonen> mikeday|away: did you already investigate the feasibility of a table-driven DFA for the tokenizer?
  273. # [12:09] <hsivonen> SQL! whoa! how will that one interoperate without requiring every browser to embed sqlite?
  274. # [12:10] <zcorpan> who requested it?
  275. # [12:10] <hsivonen> SQL isn't exactly the best example of an interoperably implemented standard
  276. # [12:12] <annevk> got a point there...
  277. # [12:12] * hsivonen is still shying away from a table-driven DFA in Java
  278. # [12:12] <annevk> zcorpan, Mozilla has it
  279. # [12:12] <annevk> not sure if they requested it
  280. # [12:19] * Joins: ROBOd (n=robod@86.34.246.154)
  281. # [12:32] * Joins: weinigLap (n=weinig@c-67-170-238-241.hsd1.ca.comcast.net)
  282. # [12:41] * mikeday|away is now known as mikeday
  283. # [12:43] <mikeday> hsivonen, not sure yet, the state machine in the spec is too complex as is, needs to be simplified first
  284. # [12:44] <mikeday> hsivonen, I'm just trying to get something basic working to implement <meta charset> sniffing
  285. # [12:44] <mikeday> but it won't be implemented as an array, probably just use goto
  286. # [12:44] <mikeday> and it only needs to apply to a buffer of fixed size, so blocking on input won't be an issue.
  287. # [12:50] <hsivonen> mikeday: is your main loop of control going to be inside the parser as in Java SAX parsers or outside as in expat?
  288. # [12:50] <mikeday> outside
  289. # [12:51] <mikeday> can still support SAX that way
  290. # [12:52] <mikeday> and more convenient for integration with some input sources, eg. curl
  291. # [12:52] <hsivonen> I've been thinking if I should decouple the loop from the tokenizer on the Java side, but I'll probably go with the traditional java.io/org.xml.sax model on the inside
  292. # [12:53] * Joins: hasather (n=hasather@81-235-209-174-no62.tbcn.telia.com)
  293. # [12:53] <mikeday> you've got a few more options in Java, but fitting in with SAX makes perfect sense.
  294. # [12:54] * Joins: arve (n=arve@213.236.208.247)
  295. # [12:54] * arve is now known as virtuelv2
  296. # [12:56] <hsivonen> mikeday: just about all XML parsing in Java happens with the parser pulling stuff from java.io.InputStream instead of an app-owned loop pushing buffers to a parser
  297. # [12:56] <mikeday> yeah, most C libraries work like that as well
  298. # [12:56] <mikeday> then sometimes end up trying to hack in support for progressive parsing later
  299. # [12:56] <mikeday> I'm going to try and do it the other way around from the beginning, and see how far I get :)
  300. # [12:58] <mikeday> but starting with charset sniffing, as that's easier and doesn't involve input at all
  301. # [12:58] <mikeday> as you only apply it to the bytes that you already have in the buffer.
  302. # [12:59] <hsivonen> I'm a bit uncomfortable with the sniffing result depending on buffering
  303. # [12:59] <mikeday> tee hee, I found another bug in the spec: 0x3C 0x2D (ASCII '<!')
  304. # [12:59] <hsivonen> requiring the sniffer to read up to 512 until it finds the charset would be deterministic
  305. # [13:00] <mikeday> yes, mine will read up to 512 or EOF, whichever comes first.
  306. # [13:01] <mikeday> hmm, actually mine will sometimes read past 512 at the moment
  307. # [13:01] <mikeday> do you think it would be best to clamp it at 512, regardless of how much has been read?
  308. # [13:03] <hsivonen> I'd clamp to 512 to avoid results depending on buffering details.
  309. # [13:03] <hsivonen> (those are hard to track down when something goes wrong)
  310. # [13:03] <mikeday> right, sounds good.
  311. # [13:03] <mikeday> min(buf->size, 512) :)
  312. # [13:03] * Quits: htmlr (n=cjb@203-158-58-245.dyn.iinet.net.au)
  313. # [13:05] <mikeday> hmm, with goto and macros you can make a decent state machine
  314. # [13:05] <mikeday> if you used labels-as-values gcc extension you could probably make it handle input buffering too
  315. # [13:06] <mikeday> basically defining a state machine mini-language in C
  316. # [13:06] <hsivonen> mikeday: do you compile with GCC on Windows?
  317. # [13:06] <hsivonen> or does MS support that GCC extension?
  318. # [13:06] <mikeday> I usually cross-compile Windows binaries on Linux using mingw32
  319. # [13:06] <mikeday> but I'll avoid using gcc extensions for now
  320. # [13:06] <mikeday> there's always someone out there not using gcc
  321. # [13:09] <mikeday> gcc also has case ranges: case 0x41 ... 0x5A:
  322. # [13:09] <mikeday> which would be quite handy in this case, as they would save me writing out 52 letters explicitly :/
  323. # [13:10] <gsnedders> mikeday: no, you write code to write tedious code :)
  324. # [13:11] <mikeday> s/me/me or an automation under my control/
  325. # [13:11] <gsnedders> :)
  326. # [13:11] <mikeday> actually, I'm curious to see if gcc generates any clever code for a switch statement on a byte value
  327. # [13:12] <mikeday> for example, does it generate a jump table by itself, or some other clever trick
  328. # [13:17] <Philip`> SELECT "a"||0; - SQLite says "a0", MySQL says 0, Postgres says column "a" does not exist; interoperably not great :-(
  329. # [13:17] <Dashiva> You need 'a' for postgres, sadly
  330. # [13:18] <Dashiva> I think oracle is the same
  331. # [13:18] <annevk> SQL5 will safe us
  332. # [13:18] <Dashiva> How many doctype states will -that- have ;)
  333. # [13:18] * moeffju is now known as moeffju[Work]
  334. # [13:19] <Philip`> Dashiva: I'm guessing Postgres follows the standard, since MySQL doesn't and SQLite is slightly crazy
  335. # [13:19] * Joins: BenWard (n=BenWard@cpc3-cmbg2-0-0-cust58.cmbg.cable.ntl.com)
  336. # [13:21] * Quits: MikeSmith (n=MikeSmit@tea12.w3.mag.keio.ac.jp) ("Get thee behind me, satan.")
  337. # [13:22] * Quits: virtuelv2 (n=arve@213.236.208.247) (Read error: 113 (No route to host))
  338. # [13:24] * Quits: jcgregorio (n=chatzill@adsl-072-148-043-048.sip.rmo.bellsouth.net) ("ChatZilla 0.9.78.1 [Firefox 2.0.0.3/0000000000]")
  339. # [13:26] <Philip`> Hixie: I think variable number of arguments is useful whenever you want to add some abstracted interface, like with
  340. # [13:26] <Philip`> function search(fields) {
  341. # [13:26] <Philip`> db.execute("SELECT * FROM stuff WHERE " + " AND ".join(name+" = ?" for name,value in fields), [ value for name,value in fields ]);
  342. # [13:26] <Philip`> }
  343. # [13:26] <Philip`> results = search([ ['name', n], ['age', 12], ['colour', c] ]);
  344. # [13:26] <mikeday> (where is this proposal to support SQL in JavaScript?)
  345. # [13:26] <Philip`> (Er, that's probably a broken mix of JS and Python, though I suppose I might be lucky and it could be valid JS1.7)
  346. # [13:27] <Philip`> http://www.whatwg.org/specs/web-apps/current-work/multipage/section-sql.html
  347. # [13:27] <annevk> mikeday, http://html5.org/tools/web-apps-tracker?from=837&to=838
  348. # [13:28] <mikeday> "A future version of this specification may define the exact SQL subset required in more detail."
  349. # [13:28] <mikeday> now there's an understatement :)
  350. # [13:29] <Philip`> I think the only interoperable subset of SQL and of existing SQL implementations is likely to be the empty set
  351. # [13:29] <Philip`> Well, maybe "SELECT 1+1" would work
  352. # [13:29] <Dashiva> Philip`: Yeah, I finally found the part in SQL92 which mentions it
  353. # [13:31] <mikeday> "SELECT * FROM table" is probably more interoperable than 1+1
  354. # [13:31] <Philip`> I'd the practical effect would be that Firefox ships with support for the full SQLite syntax, so people write code assuming that, and other browsers have no choice but to use SQLite too, and then Microsoft would ship with Jet or whatever, and everyone would suffer pain, and then maybe someone would try to sort out the mess by defining a common subset but it'd be too late then
  355. # [13:31] <Philip`> *I'd guess
  356. # [13:32] <annevk> at that point we get "Web SQL 5"
  357. # [13:33] <mikeday> why bother? I mean honestly, is SQL the best method for doing this?
  358. # [13:34] * zcorpan doesn't understand the use-case for client side SQL
  359. # [13:34] <annevk> "best" also includes what people are used to
  360. # [13:34] <annevk> I think it's pretty awesome that techniques people are used to on the server can now be easily reused client side
  361. # [13:35] <annevk> in theory you might even be able to share some code
  362. # [13:35] <mikeday> and in practice, you wouldn't
  363. # [13:35] <annevk> yeah, dunno about that either
  364. # [13:35] <annevk> although some of the database design can be reused
  365. # [13:36] <Philip`> Like using XForms to integrate server-side and client-side processing of data?
  366. # [13:36] <annevk> is there a better way to do relational data storage client side?
  367. # [13:37] <mikeday> hmm, once you say relational, no, not really
  368. # [13:37] <Dashiva> I'm not so worried about acid and all the fancy DB stuff, but SQL itself is a nice way to manipulate
  369. # [13:37] <annevk> which also includes support for querying etc.
  370. # [13:38] <Philip`> It seems there are lots of libraries that hide the SQL behind an object-like interface, so maybe it'd be worth looking at those
  371. # [13:38] <mikeday> it just doesn't seem very webby, to me.
  372. # [13:39] <Philip`> (Hmm, it doesn't look like there's even a common-subset way to concatenate strings...)
  373. # [13:39] <mikeday> HTML5 is complex enough without trying to inhale a common subset of SQL
  374. # [13:39] <hsivonen> I wonder what the disk footprint of a SQLite database is
  375. # [13:39] <mikeday> seems to far removed from "standardisation of what we already know"
  376. # [13:39] <hsivonen> considering that each domain needs its own
  377. # [13:40] <mikeday> geez, it's going to suck debugging random crappy websites in the future
  378. # [13:40] <mikeday> I mean keeping track of cookies was bad enough
  379. # [13:40] <annevk> the web evolves :)
  380. # [13:40] <mikeday> and writing eg. little screen scraping tools with wget or whatever
  381. # [13:41] <mikeday> evolution != progress, it can just mean random mutations, genetic drift, and pointless specialisation :)
  382. # [13:41] <met_> whow! there is a book already http://www.amazon.com/tag/sql5
  383. # [13:41] <mikeday> SQL: the peacock's tail of the web
  384. # [13:42] <Philip`> hsivonen: A SQLite database with one table and no data is 3072 bytes
  385. # [13:42] <Philip`> and 158 bytes after gzip
  386. # [13:43] <mikeday> hah, that's 158 bytes we won't see again in a hurry :)
  387. # [13:44] <Philip`> I bet you could do fun DOS attacks by JOINing a table with itself dozens of times
  388. # [13:46] <mikeday> presumably it's no more vulnerable to that sort of thing than JavaScript already is
  389. # [13:46] <mikeday> eg. running ackermann's function or whatever
  390. # [13:48] <Philip`> But the JS engines already provide timeouts so users can stop runaway scripts, and SQL engines might not
  391. # [13:48] <Philip`> (SQLite does, but it's marked as experimental)
  392. # [13:49] <mikeday> right, it's another weak point that would need to be checked
  393. # [13:49] <mikeday> is it in the spec purely because Mozilla support it?
  394. # [13:51] <Philip`> Mozilla doesn't appear to support it now (though they could easily add it (if they don't care about security, e.g. limiting to privileged content) since they're using SQLite)
  395. # [13:51] <mikeday> so who asked for it?
  396. # [13:52] <annevk> Developers, developers, developers!
  397. # [13:52] * annevk doesn't know
  398. # [13:52] <Dashiva> You missed one developer
  399. # [13:52] <mikeday> hmm. Maybe I should ask for a complete POSIX implementation to be added to HTML5
  400. # [13:52] <annevk> Dashiva, he didn't care
  401. # [13:52] <Dashiva> Oh
  402. # [13:52] <mikeday> that way, people could run existing Linux binaries in the browser environment
  403. # [13:52] <mikeday> each domain could have a chroot style setup
  404. # [13:52] <Philip`> mikeday: That would solve the problem of making a web-based OS
  405. # [13:53] <Dashiva> Are we still talking about a world where Microsoft exists?
  406. # [13:53] <mikeday> with its own POSIX namespace, the usual APIs available, sockets, memory mapped files, etc.
  407. # [13:53] <Philip`> Just wait for virtualisation technology to advance a bit, and then it'll be fine to run a virtual machine per browser session
  408. # [13:53] <mikeday> or better yet, an x86 virtual machine would make more sense than a POSIX layer
  409. # [13:53] <mikeday> hah, you beat me to it
  410. # [13:54] <mikeday> then we could run arbitrary programs and old DOS games in the browser. take that, flash!
  411. # [13:54] <Philip`> Hmm, x86 is a pain - just make a new instruction set that's easy to virtualise, and port Linux to it
  412. # [13:54] <Dashiva> Why not just reuse JS?
  413. # [13:54] <Dashiva> We have JSON, next is JSOS
  414. # [13:55] <Philip`> Hmm, compile Linux into the instruction set for virtual machine written in JavaScript?
  415. # [13:55] <Philip`> +a
  416. # [13:55] <Philip`> Then just JIT it to the user's native instruction set, for optimal performance
  417. # [13:56] <mikeday> rather than having an SQL based storage system in the browser,
  418. # [13:56] <mikeday> you could have a virtual machine with a virtual IDE hard disk of configurable size
  419. # [13:56] * Philip` wonders how many potential embedded-SQL uses could be handled just by adding B-tree indexes to globalStorage
  420. # [13:56] <mikeday> scripts can then "format" the virtual hard disk with their file system of choice, and address it at block-level
  421. # [13:59] <Philip`> I would be quite nervous looking at a web site that said "Formatting disk - please wait" and knowing that it was actually capable of formatting a disk, even if I was fairly certain it was isolated to the web browser
  422. # [13:59] <mikeday> how nervous would you be to see "Creating tables and building indices"
  423. # [14:00] <Philip`> I know how to protect myself from tables, so that's not a problem - I can just climb up the stairs and they can't follow because their legs won't bend enough
  424. # [14:01] <mikeday> touche :)
  425. # [14:01] <hsivonen> a whole new world of layout tables
  426. # [14:02] <Philip`> We could just adopt the proposal from http://sql4.by.ru/
  427. # [14:11] * Joins: csarven (n=nevrasc@modemcable081.152-201-24.mc.videotron.ca)
  428. # [14:11] <zcorpan> we have good stuff in here for next year's april fool's joke
  429. # [14:11] <Dashiva> Next year it won't be a joke anymore :)
  430. # [14:11] <mikeday> why wait? After all, they didn't wait until April for the SQL proposal :)
  431. # [14:12] <annevk> :p
  432. # [14:17] * Quits: BenWard (n=BenWard@cpc3-cmbg2-0-0-cust58.cmbg.cable.ntl.com) (Read error: 110 (Connection timed out))
  433. # [14:20] <mikeday> ah well, that's enough spec bashing for now
  434. # [14:20] * mikeday waves
  435. # [14:21] * Quits: mikeday (n=mikeday@60.224.50.129) ("-")
  436. # [14:21] <hsivonen> Hixie: Re: IRC logs a week ago: Jukka Korpela is known to argue about the details of what it means to have a "sample" in the statistics sense.
  437. # [14:26] <hsivonen> of course, on the Web, it is impossible to have the kind of sample he means
  438. # [14:26] <Lachy> what kind of sample does he mean?
  439. # [14:26] <Lachy> he refused to explain when I asked and then insulted me for not having taken statistics 101
  440. # [14:27] <Dashiva> Well, intranet pages for one
  441. # [14:29] <hsivonen> Lachy: I think he means that first you identify a population and then you pick a sample at random so that each member of the population has an equal probability of appearing in the sample
  442. # [14:30] <hsivonen> Lachy: but on the Web, you cannot enumerate the population of pages and you cannot do uniform sampling
  443. # [14:30] <hsivonen> Lachy: one might argue, though, that a chunk of "important" pages from google is more useful than a proper sample of the same size
  444. # [14:31] <Lachy> doesn't taking a massive sample of several billion pages somewhat compensate for the problems of not being able to do that?
  445. # [14:31] <hsivonen> Lachy: but the argument wasn't about useful but about proper use of statistics terminology
  446. # [14:31] <hsivonen> Lachy: just don't call it a "sample" :-)
  447. # [14:31] <Lachy> well, what would you call it?
  448. # [14:32] <hsivonen> dunno. it has been a while since I've done statistics
  449. # [14:32] <Philip`> Why would taking a bigger sample make it any better, if the sample is still biased in some direction?
  450. # [14:33] <hsivonen> Philip`: well, if the bias is towards some notion of being more important
  451. # [14:33] <hsivonen> Philip`: then we can discuss what's important
  452. # [14:33] <Philip`> If you identified a billion pages and then chose a million at random to analyse in detail, you should get exactly the same results (except for incredibly rare events where you'd lose statistical significance)
  453. # [14:34] <zcorpan> Lachy: call it "a subset of the Web". :)
  454. # [14:34] <Philip`> (then the problem is in identifying the population of a billion pages, and the actual sampling is easy)
  455. # [14:35] <hsivonen> Philip`: the problem is that implicitly the infinite population of all Web pages is assumed
  456. # [14:35] <Philip`> (and using a bigger sample within that population wouldn't compensate for any problems in the choice of population)
  457. # [14:36] <hsivonen> hmm. according to wikipedia, a non-random subset is still a "sample" even if not a "random sample"
  458. # [14:38] <Philip`> Sampling an infinite space seems like it ought to be impossible (or at least not well defined) - if you chose a sample of n random positive integers, then the mean would be some value which is completely non-representative of the population because there'd be a finite number of numbers below it and an infinite number of numbers above it...
  459. # [14:42] * Parts: zcorpan (n=zcorpan@84-216-42-16.sprayadsl.telenor.se)
  460. # [14:45] * Parts: annevk (n=annevk@pat-tdc.opera.com)
  461. # [14:45] * Joins: annevk (n=annevk@pat-tdc.opera.com)
  462. # [14:51] <annevk> jgraham, I think we should be using insert(0, data) as opposed to append()
  463. # [14:51] <annevk> jgraham, for stream.qeue
  464. # [14:51] <annevk> jgraham, especially if we start allowing injection
  465. # [15:01] * Joins: gavins (n=gavin@firefox/developer/gavin)
  466. # [15:01] * gavins is now known as gavin_
  467. # [15:15] * Quits: Lachy (n=Lachlan@210-84-58-18.dyn.iinet.net.au) (Read error: 110 (Connection timed out))
  468. # [15:17] <annevk> hehe
  469. # [15:17] <annevk> the Content-Type discussion is funny
  470. # [15:18] <annevk> the last e-mail from Jeff :)
  471. # [15:37] <annevk> What annoys me most about these HTTP guys is that they always tell you how things should be done, but they never make it actually happen
  472. # [15:38] <annevk> Browser vendors have tried and tried to fix the web, but it hasn't paid off and didn't work out very well either.
  473. # [15:38] <annevk> In fact, we're still trying to actively educate people and publish articles, etc. and what not and still lots of people get it wrong and will get it wrong.
  474. # [15:40] <annevk> (HTTP people also have this notion about asking the user. It's even in the HTTP specification. That's one of the worst possible models you can have and it has been widely ignored in practice...)
  475. # [15:45] * Parts: hasather (n=hasather@81-235-209-174-no62.tbcn.telia.com)
  476. # [15:46] <Philip`> Browsers still seem to ask the user if they really want to submit a form, or if they really want to look at a secure site, or if they really want to leave a secure site
  477. # [15:46] <Philip`> though the default seems to be to only ask once, and it's not like anybody reads those messages the first time anyway, so I'm not sure what the point is
  478. # [15:47] <gsnedders> Philip`: to claim you implement the spec
  479. # [15:48] <annevk> My XML tokenizer now passes the "tests" in http://www.w3.org/TR/xml/#sec-entexpand
  480. # [15:49] <annevk> Some bits are a bit hacky for my taste, but I suppose that can eventually be made cleaner
  481. # [15:52] <annevk> Philip`, yeah, I've the feeling that those messages are there to please the HTTP gods
  482. # [15:52] <annevk> At some point in the past my parents switched browser and were heavily confused with those modal dialogs wondering what they had done wrong.
  483. # [15:54] * gsnedders is still attempting to get his mother to use a computer at all
  484. # [15:55] * Joins: briansuda (n=briansud@82.221.34.106)
  485. # [15:56] * Quits: briansuda (n=briansud@82.221.34.106) (Client Quit)
  486. # [15:57] * Joins: karlUshi (n=karl@ARouen-252-1-159-72.w90-23.abo.wanadoo.fr)
  487. # [16:00] <annevk> After I hook this up with the treebuilder I need to start doing boring things... Such as making testcases :(
  488. # [16:00] <annevk> Maybe I should open source it :)
  489. # [16:02] * Joins: BenWard (n=BenWard@cpc3-cmbg2-0-0-cust58.cmbg.cable.ntl.com)
  490. # [16:03] * Joins: briansuda (n=briansud@82.221.34.106)
  491. # [16:12] <Dashiva> I liked that dialog box
  492. # [16:12] <Dashiva> We should have more of those. "Do you want this page to render correctly?"
  493. # [16:13] <annevk> "Do you want to render this page per spec?"
  494. # [16:17] <gsnedders> "Do you want to render this page in a way completely incompatible with the web?"
  495. # [16:17] <annevk> "Do you want to use a browser that doesn't follow the spec but does render this page?"
  496. # [16:18] * Joins: hasather (n=hasather@81-235-209-174-no62.tbcn.telia.com)
  497. # [16:18] <gsnedders> Does anyone have any documentation of the major incompatibilities between HTTP/1.1 and HTTP in the real world?
  498. # [16:18] <annevk> No
  499. # [16:20] <gsnedders> ergh. does anyone know if you need to do hysterics involving CR or LF where the spec says you should have CRLF?
  500. # [16:20] * Quits: hasather (n=hasather@81-235-209-174-no62.tbcn.telia.com) (Read error: 104 (Connection reset by peer))
  501. # [16:21] * Joins: hasather (n=hasather@81-235-209-174-no62.tbcn.telia.com)
  502. # [16:30] * Quits: karlUshi (n=karl@ARouen-252-1-159-72.w90-23.abo.wanadoo.fr) ("Where dwelt Ymir, or wherein did he find sustenance?")
  503. # [16:31] * Joins: icaaq_ (n=icaaaq@249.228.13.217.in-addr.dgcsystems.net)
  504. # [16:35] <hsivonen> annevk: are html5lib tokenizer tests independent of tree builder?
  505. # [16:36] * Joins: billmason (n=billmaso@ip156.unival.com)
  506. # [16:37] * Joins: MikeSmith (n=MikeSmit@58.157.21.205)
  507. # [16:38] <annevk> hsivonen, yes, although you have to implement some logic to run them
  508. # [16:38] <annevk> hsivonen, they may also assume a particular implementation
  509. # [16:38] * Quits: BenWard (n=BenWard@cpc3-cmbg2-0-0-cust58.cmbg.cable.ntl.com)
  510. # [16:38] <hsivonen> annevk: what kind of assumptions?
  511. # [16:41] <annevk> that end tags have their attributes not dropped yet I believe
  512. # [16:41] <annevk> some things are done during the tree builder step
  513. # [16:42] <annevk> but just go through them yourself, it should not be that hard to modify the problematic ones
  514. # [16:42] <hsivonen> eww. do the end tag attributes ever get anything but ignored?
  515. # [16:42] * hsivonen doesn't remember the spec doing anything with end tag attributes
  516. # [16:45] * Joins: BenWard (n=BenWard@cpc3-cmbg2-0-0-cust58.cmbg.cable.ntl.com)
  517. # [16:47] <annevk> hsivonen, we don't check whether it's an end or start tag when appending attributes
  518. # [16:47] * Joins: h3h (n=w3rd@66-162-32-234.static.twtelecom.net)
  519. # [16:51] * Quits: icaaq_ (n=icaaaq@249.228.13.217.in-addr.dgcsystems.net) (Read error: 110 (Connection timed out))
  520. # [17:01] * Quits: BenWard (n=BenWard@cpc3-cmbg2-0-0-cust58.cmbg.cable.ntl.com)
  521. # [17:02] <annevk> Philip`, you mentioned <canvas> perf earlier on? Do you have standalone testcases for that?
  522. # [17:02] <annevk> Philip`, Having standalone testcases makes it easier to improve the situation
  523. # [17:09] * Quits: weinigLap (n=weinig@c-67-170-238-241.hsd1.ca.comcast.net)
  524. # [17:12] * Joins: briansuda_ (n=briansud@82.221.34.106)
  525. # [17:14] * Joins: jcgregorio (i=chatzill@nat/ibm/x-1cb5d8a313ebd622)
  526. # [17:30] * Quits: briansuda (n=briansud@82.221.34.106) (Read error: 110 (Connection timed out))
  527. # [17:33] * Quits: met_ (n=Hassman@b14-4.vscht.cz) ("Chemists never die, they just stop reacting.")
  528. # [17:38] * Joins: BenWard (n=BenWard@cpc3-cmbg2-0-0-cust58.cmbg.cable.ntl.com)
  529. # [17:42] * Joins: weinigLap (n=weinig@17.203.15.217)
  530. # [17:44] * Joins: dbaron (n=dbaron@c-71-198-189-81.hsd1.ca.comcast.net)
  531. # [17:44] * Quits: KevinMarks (n=KevinMar@pdpc/supporter/active/kevinmarks) ("The computer fell asleep")
  532. # [17:56] * Quits: BenWard (n=BenWard@cpc3-cmbg2-0-0-cust58.cmbg.cable.ntl.com)
  533. # [18:00] * annevk removes lots of HTML specific stuff out of base.py in his XML5 project
  534. # [18:01] * annevk tries to align the architecture as much as possible so it remains relatively easy to do similar things
  535. # [18:16] <hsivonen> what's the deal with this ship names thing?
  536. # [18:16] <hsivonen> is there a good use case for needing to know that a string is a ship name?
  537. # [18:17] <hsivonen> or is it just a popular contrived example of something that is italicized but doesn't have a more appropriate element than <i> in HTML?
  538. # [18:17] <Dashiva> It's apparently the best example of semantic non-emphasis italic
  539. # [18:17] <hsivonen> right.
  540. # [18:18] <hsivonen> and presumably ship names are a common case?
  541. # [18:18] <Dashiva> Personally I'd guess most people wouldn't italicize them at all
  542. # [18:25] * Quits: tantek (n=tantek@c-67-188-209-131.hsd1.ca.comcast.net)
  543. # [18:30] * Joins: nickshanks (n=nicholas@home.nickshanks.com)
  544. # [18:38] * Joins: aroben (n=adamrobe@17.203.15.208)
  545. # [18:40] * Quits: briansuda_ (n=briansud@82.221.34.106) (Read error: 110 (Connection timed out))
  546. # [18:50] * Quits: nickshanks (n=nicholas@home.nickshanks.com)
  547. # [18:57] * Joins: tantek (n=tantek@corp.technorati.com)
  548. # [19:03] <Philip`> annevk: I don't have any intentional tests - I've just played around a bit with http://canvex.lazyilluminati.com/misc/speed/benchmark.html but I don't think any of those cases are actually representative of what makes Canvex slow (e.g. I no longer see any real-world performance difference using drawImage(img) vs drawImage(canvas) because it's probably drowned out by other problems)
  549. # [19:06] <Philip`> I should probably set up some mode in Canvex where it starts in an interesting place looking at complex stuff, so I could run it in a profiler and see what's actually slow nowadays
  550. # [19:10] * Joins: BenWard (n=BenWard@cpc3-cmbg2-0-0-cust58.cmbg.cable.ntl.com)
  551. # [19:18] * Joins: Toolskyn88 (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl)
  552. # [19:21] * Joins: arve (n=arve@47.80-202-66.nextgentel.com)
  553. # [19:21] * arve is now known as virtuelv2
  554. # [19:27] * Joins: Toolskyn_ (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl)
  555. # [19:33] * Quits: BenWard (n=BenWard@cpc3-cmbg2-0-0-cust58.cmbg.cable.ntl.com)
  556. # [19:35] * Quits: Toolskyn (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl) (Read error: 110 (Connection timed out))
  557. # [19:44] * Quits: Toolskyn88 (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl) (Read error: 110 (Connection timed out))
  558. # [19:50] * Quits: dbaron (n=dbaron@c-71-198-189-81.hsd1.ca.comcast.net) ("8403864 bytes have been tenured, next gc will be global.")
  559. # [19:53] * Joins: BenWard (n=BenWard@cpc3-cmbg2-0-0-cust58.cmbg.cable.ntl.com)
  560. # [19:58] * Joins: KevinMarks (i=KevinMar@nat/google/x-3a8424a439da70b7)
  561. # [20:00] * Toolskyn_ is now known as Toolskyn
  562. # [20:16] * Joins: dbaron (n=dbaron@corp-242.mountainview.mozilla.com)
  563. # [20:17] * Joins: Toolskyn88 (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl)
  564. # [20:20] * Quits: BenWard (n=BenWard@cpc3-cmbg2-0-0-cust58.cmbg.cable.ntl.com)
  565. # [20:34] * Quits: Toolskyn (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl) (Read error: 110 (Connection timed out))
  566. # [21:14] * om_sleep is now known as othermaciej
  567. # [21:18] * Quits: jruderman (n=jruderma@c-67-169-183-228.hsd1.ca.comcast.net)
  568. # [21:46] <Hixie> the SQL stuff's main use case is offline Web apps -- big web apps like say an RSS reader that wants to support working while offline needs way more than the globalStorage stuff
  569. # [21:47] <Hixie> i'm very aware of the problem with sql interoperability :-(
  570. # [21:47] <Hixie> i hope we'll be able to have implementations in the coming 6-12 months; if we then have 2 implementations we can define a common subset and lock that down
  571. # [21:48] <virtuelv2> Hixie: I don't think interoperability should be a problem if you specify the exact subset of SQL supported by SQLite
  572. # [21:48] <Hixie> (in practice i would expect it to be very similar to sqllite, since safari and firefox are both already using it, as i understand it)
  573. # [21:49] <Hixie> hsivonen: regarding samples, note that he never replied to my e-mail where i explained exactly how i defined a fixed sampling frame before taking a sample
  574. # [21:49] <virtuelv2> ... since SQLite is placed in the public domain, http://sqlite.org/copyright.html
  575. # [21:50] <Hixie> yeah
  576. # [21:50] <virtuelv2> and they have this interesting take on patents, http://programming.reddit.com/info/1eypf/comments
  577. # [21:50] <othermaciej> being in the public domain is actually a little more dodgy than copyright with a liberal license
  578. # [21:51] <virtuelv2> othermaciej: you're thinking of the fact that all jurisdictions don't recognize PD?
  579. # [21:51] <virtuelv2> They offer licensing for that purpose
  580. # [21:53] <othermaciej> virtuelv2: that and because anyone can copyright even a trivial derivative work of a PD work in full, thereby potentially making the licensing issues more murky
  581. # [21:53] <gavin> if it's in the public domain, who are they to issue licenses?
  582. # [21:54] <gavin> isn't copyright in this case non-existent?
  583. # [21:54] <virtuelv2> gavin: because all contributors have to sign off the code to the PD
  584. # [21:54] <virtuelv2> you can relicense PD code if you please, as othermaciej noted
  585. # [21:54] <gavin> the copyright is what I'm wondering about
  586. # [21:55] <gavin> if they say they have no copyright to the code, I don't see how they can license it
  587. # [21:55] <gavin> you can only license something if you have the copyright
  588. # [21:55] <virtuelv2> gavin: they can, because they are free to do so under the same license they're distributing it
  589. # [21:55] <virtuelv2> you can do the same
  590. # [21:56] * Joins: Toolskyn_ (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl)
  591. # [21:56] <gavin> maybe I should go speak to a copyright lawyer
  592. # [21:56] <gavin> wonder how much that'll cost me :)
  593. # [21:56] <virtuelv2> gavin: make sure you do in a country that accepts the PD
  594. # [21:56] <virtuelv2> Some countries don't
  595. # [21:56] <gavin> I don't see how that matters
  596. # [21:57] <hsivonen> I once had a boss who doubted our ability to waive copyright in Finland. So we used the MIT license. I have talked to copyright lawyers since and none of them saw a problem with waiving copyright.
  597. # [21:57] <virtuelv2> ok, let's say I place Item A in the public domain in country Foo
  598. # [21:57] <gavin> I have no stake in this, I'm just curious
  599. # [21:57] <othermaciej> make sure you talk to a lawyer that understands the copyright law of countries that accept the public domain
  600. # [21:57] <othermaciej> that would be the right way to put it
  601. # [21:57] <gavin> sure
  602. # [21:57] <gavin> ah, ok, I see
  603. # [21:57] <gavin> (what virtuelv2 meant)
  604. # [21:58] <virtuelv2> if a user in country Bar, that doesn't accept PD, gets my Item A, the legal system in Country Bar will assert that I own copyright of Item A
  605. # [21:58] * gavin didn't intend to start a discussion about copyright law
  606. # [21:58] * Toolskyn_ is now known as Toolskyn
  607. # [21:58] <gavin> I should have kept my curiosity to myself :)
  608. # [21:59] * Joins: met_ (n=Hassman@r5bx220.net.upc.cz)
  609. # [22:02] * Joins: Lachy (n=Lachlan@203-206-243-149.dyn.iinet.net.au)
  610. # [22:09] * Philip` still can't imagine any two SQL implementations being close to interoperable, unless they're two versions of exactly the same database engine and then it's still fairly dodgy (e.g. SQLite 2 vs SQLite 3 being very different; though from what I've heard, v3 is considered pretty much complete and there's not going to be a v4, though I could be utterly wrong in remembering that)
  611. # [22:10] * Quits: othermaciej (n=mjs@dsl081-048-145.sfo1.dsl.speakeasy.net)
  612. # [22:11] <Dashiva> Well, cut down on the utility functions and fancy frills, and it gets a lot better
  613. # [22:11] <Philip`> Oh, it was http://osdir.com/ml/python.db.pysqlite.user/2006-12/msg00015.html saying "drh does not expect there to ever be a SQLite 4"
  614. # [22:11] <Philip`> What about e.g. types?
  615. # [22:11] <Philip`> like, SQLite doesn't really have them, but other databases do
  616. # [22:11] <Philip`> which seems a fairly major interoperability concern
  617. # [22:12] <Hixie> Philip`: we couldn't imagine two html implementations being close to interoperable, but now we have html5 and the goal is in sight :-)
  618. # [22:13] <Dashiva> Maybe clarify what kind of interoperability is the worry. Developer experience/lockin, or machine/application interop?
  619. # [22:13] <Philip`> The people implementing HTML want it to be interoperable, whereas the people implementing SQL have never really cared and there's not much reason to think they ever will, and the people implementing HTML probably don't want all the work of reimplementing SQL too :-)
  620. # [22:13] <Philip`> Uh, "The people implementing HTML wanted HTML to be interoperable, ..."
  621. # [22:13] <met_> Philip` there are people building apps with same SQL working on MSSQL and Oracle too, but it is only small subset of all functionality
  622. # [22:13] * Quits: Toolskyn88 (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl) (Connection timed out)
  623. # [22:15] <Dashiva> And on a pragmatic note, reality survives with the current set of SQL engines. Why would that change?
  624. # [22:17] <Philip`> I don't remember having seen any applications that work on more than one database, without them having put significant effort into writing multiple sets of database backend code
  625. # [22:17] <Hixie> we'll see. it may well be that we simply can't have interoperability here, and we have to drop it.
  626. # [22:17] <Dashiva> I don't imagine there are too many web applications running SQL on the client side yet
  627. # [22:18] <Philip`> e.g. Trac at http://trac.edgewall.org/wiki/DatabaseBackend eventually got support for SQLite+MySQL+Postgres but it took a long time
  628. # [22:18] <Hixie> one thing though -- if the first two implementations use SQLLite, same version, and then we get widely distributed code out there that uses it, that will greatly increase the cost of someone writing a non-compatible version.
  629. # [22:19] * Joins: weinigLap_ (i=weinig@nat/apple/x-742d9daa8455f2c5)
  630. # [22:20] <Dashiva> Well, look at mozilla expanding JS, who's to say they won't do the same to their SQL?
  631. # [22:21] <Dashiva> they being browser vendors in general, not just moz
  632. # [22:25] <Hixie> they're expanding JS in conjunction with the ECMA working group
  633. # [22:26] * Quits: weinigLap (n=weinig@17.203.15.217) (Read error: 60 (Operation timed out))
  634. # [22:28] * Quits: annevk (n=annevk@pat-tdc.opera.com) (Read error: 60 (Operation timed out))
  635. # [22:29] * Quits: KevinMarks (i=KevinMar@pdpc/supporter/active/kevinmarks) ("The computer fell asleep")
  636. # [22:30] <Philip`> If the first implementations do use SQLite and everyone else has to too, it sounds like the specification will simply (though maybe not explicitly) require all implementors to use the SQLite implementation, and it doesn't really sound very spec-like to say "you must accept the dialect of SQL spoken by SQLite" (but it wouldn't be good to not say that, if it's true)...
  637. # [22:32] <Philip`> I'm not sure if there's anything particularly wrong with everybody in the world using SQLite, if Microsoft would accept that too instead of going their own way with a different SQL implementation (assuming they ever bother with this at all), but it seems odd
  638. # [22:33] <Hixie> Philip`: no, we'd define it in detail, not like that
  639. # [22:34] <Hixie> it would just happen to be compatible with the implementations in the wild, whether that be sqllite or whatever
  640. # [22:34] <Philip`> What would happen with old content that came before it was defined, and assumed all of SQLite's behaviour?
  641. # [22:35] <Hixie> the idea would be to define it such that existing content works
  642. # [22:35] <Philip`> Just doing "CREATE TABLE t ( n )" is perfectly normal in SQLite but I don't believe it works in any other database at all (since they all require columns to have types)
  643. # [22:36] <Hixie> then if sqllite is what is used, then we will probably end up defining that
  644. # [22:36] <gsnedders> ergh. I give up with people claiming <i> is deprecated.
  645. # [22:37] <Philip`> If someone isn't going to use SQLite for whatever reason, would they implement something that's compatible with it (or with the definition of it from the spec), rather than just sticking in whatever other SQL engine is handy because it'll save them years of work?
  646. # [22:38] <Hixie> if they want to be compliant and want to work with existing content, yes
  647. # [22:38] <Hixie> hence the desire to have existing content depend on something before we spec it in detail
  648. # [22:38] <Hixie> since that rather forces the issue
  649. # [22:39] * Quits: virtuelv2 (n=arve@47.80-202-66.nextgentel.com) ("Leaving")
  650. # [22:43] * Quits: tantek (n=tantek@corp.technorati.com)
  651. # [22:43] * Quits: ROBOd (n=robod@86.34.246.154) ("http://www.robodesign.ro")
  652. # [22:43] * Joins: jruderman (n=jruderma@corp-242.mountainview.mozilla.com)
  653. # [22:44] <Philip`> What'd be really neat is if you could use SQLite's virtual tables, where you implement the table backend in JavaScript and could make it do synchronous XHR requests to retrieve the data to return to the client code when it performs queries...
  654. # [22:46] <Philip`> (http://www.sqlite.org/cvstrac/wiki?p=VirtualTables etc)
  655. # [22:46] * Quits: maikmerten (n=maikmert@Lafc6.l.pppool.de) (Remote closed the connection)
  656. # [22:50] <Hixie> yeah
  657. # [22:55] * Joins: othermaciej (n=mjs@netblock-66-245-248-74.dslextreme.com)
  658. # [22:56] * Quits: gsnedders (n=gsnedder@host86-139-123-225.range86-139.btcentralplus.com) (Remote closed the connection)
  659. # [22:57] * Joins: gsnedders (n=gsnedder@host86-139-123-225.range86-139.btcentralplus.com)
  660. # [22:58] * Quits: jruderman (n=jruderma@corp-242.mountainview.mozilla.com)
  661. # [22:58] * Joins: jruderman (n=jruderma@corp-242.mountainview.mozilla.com)
  662. # [22:59] * Quits: jcgregorio (i=chatzill@nat/ibm/x-1cb5d8a313ebd622) ("ChatZilla 0.9.78.1 [Firefox 2.0.0.3/0000000000]")
  663. # [23:01] * Joins: virtuelv2 (n=arve@47.80-202-66.nextgentel.com)
  664. # [23:01] <virtuelv2> 2
  665. # [23:01] <virtuelv2> heh, dette er pussig
  666. # [23:01] <virtuelv2> Ubuntu NEKTER å mounte ipoden min
  667. # [23:02] * Joins: KevinMarks (i=KevinMar@nat/google/x-652a1e6a7d56b6a8)
  668. # [23:02] <virtuelv2> augh, wrong channel
  669. # [23:03] * Quits: othermaciej (n=mjs@netblock-66-245-248-74.dslextreme.com)
  670. # [23:04] * Joins: aroben_ (i=adamrobe@nat/apple/x-55ac597385d42585)
  671. # [23:05] * Quits: aroben_ (i=adamrobe@nat/apple/x-55ac597385d42585) (Read error: 104 (Connection reset by peer))
  672. # [23:06] * Joins: aroben_ (i=adamrobe@nat/apple/x-2511b9c98d51a970)
  673. # [23:07] * Philip` assumes you wouldn't have to use transactions if you were doing everything in a single JS function (rather than spread across multiple event handlers), since JS has to execute single-threadedly so there wouldn't be concurrent database accesses, which is nice because it prevents some obvious errors
  674. # [23:11] * Quits: virtuelv2 (n=arve@47.80-202-66.nextgentel.com) ("Leaving")
  675. # [23:12] <Philip`> Why does ResultSet have getName and not specify what order or what set of fields should be returned, rather than just saying it returns the same fields in the same order as in the SELECT statement (and then not needing getName because the user already knows)?
  676. # [23:12] * Quits: aroben (n=adamrobe@17.203.15.208) (Read error: 60 (Operation timed out))
  677. # [23:15] <Philip`> getName throwing exceptions if there are no results sounds a bit annoying, because it means you couldn't do "r = executeSql(...); i = r.getName('field'); for (; r.validRow; r.next()) { dostuff(r[i]) }"
  678. # [23:17] <Philip`> insertId doesn't say what happens if multiple rows were inserted
  679. # [23:18] * Joins: tantek (n=tantek@c-71-202-60-161.hsd1.ca.comcast.net)
  680. # [23:21] <Philip`> I expect people writing code would like to be able to find out how much disk space they're using and how much is available, so they can present it to the user nicely and can clean up old data if it's getting full, rather than waiting until they get an exception at an unexpected time
  681. # [23:22] <Hixie> Philip`: you don't know the rows in a SELECT * statement
  682. # [23:22] <Hixie> can you insert multiple rows?
  683. # [23:22] <Hixie> yeah, i imagine quota management might be something we'll do in a v2
  684. # [23:22] <Philip`> I think "executeSql('BEGIN'); executeSql('INSERT INTO table VALUES (?)', lots_of_data_so_we_run_out_space); executeSql('COMMIT')" would break confusingly since JS exceptions won't roll back the transaction
  685. # [23:22] <Hixie> it interacts with the other storage things
  686. # [23:23] <Philip`> Oh, I forgot about SELECT *
  687. # [23:23] <Hixie> why won't they?
  688. # [23:24] <Philip`> You can do e.g. "INSERT INTO b SELECT * FROM a" to copy a whole table at once
  689. # [23:24] * Quits: aroben_ (i=adamrobe@nat/apple/x-2511b9c98d51a970) (Remote closed the connection)
  690. # [23:24] <Hixie> hm
  691. # [23:25] <Hixie> what should insertId return then?
  692. # [23:25] <Philip`> I don't think they can they roll back the transaction without knowing that the exception is passing out of the transaction's scope without being caught
  693. # [23:25] * Joins: aroben (i=adamrobe@nat/apple/x-671c5a17b11e7edf)
  694. # [23:25] <Philip`> and since the transaction is defined by a pair of BEGIN and COMMIT commands, it doesn't have a scope that the browser could know about
  695. # [23:26] <Hixie> oh, well sure, if you're going to do commit/rollback transactions, you should use exception handlers around what you're doing
  696. # [23:26] <Hixie> i think you misunderstood getName, btw
  697. # [23:27] <Philip`> You could write a transaction wrapper and run "doTransaction(function(){ executeSql(...) })" and it can do the BEGIN/COMMIT/catch/ROLLBACK/throw stuff, I suppose
  698. # [23:27] <Hixie> your example would be r = executeSql(...); for (; r.validRow; r.next()) { dostuff(r['field']) }
  699. # [23:28] <Hixie> there is in fact no way to get an index from a string
  700. # [23:28] <Philip`> SQLite's last_insert_rowid() returns the last row ID that was inserted in the current connection - if insertId is supposed to be per-resultset instead, I'm not sure how you could implement that, but it'd probably end up returning the last inserted row ID from that query
  701. # [23:28] <Hixie> k
  702. # [23:29] <Philip`> Oops, yes, I got getName the wrong way round
  703. # [23:30] <Hixie> (well i guess you can get an index from a string if you loop over the fields looking at each name in turn)
  704. # [23:30] <Hixie> I fixed the insertId thing.
  705. # [23:30] <Hixie> you're in the acknowledgements already right?
  706. # [23:30] * Quits: Toolskyn (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl) (Read error: 110 (Connection timed out))
  707. # [23:31] <Philip`> I'd guess doing string->index might be useful for efficiency, if you're getting lots of rows and don't want the hash lookup cost for each one, but maybe it's not worth caring about
  708. # [23:31] <Philip`> I am
  709. # [23:31] <Philip`> (I'm famous!)
  710. # [23:31] * Joins: Toolskyn (n=Toolskyn@adsl-dc-266ef.adsl.wanadoo.nl)
  711. # [23:32] <Hixie> christ, between twitter being down and the mail server being twitchy the people watching twitter and commit-watchers aren't going to get much of a good look at the changes today
  712. # [23:33] <Philip`> I'm not sure how you could implement insertId so it works with "INSERT INTO t (id) VALUES (123) /* insertId = 123 */; DELETE FROM t /* insertId undefined */; INSERT INTO t (id) VALUES (123) /* insertId = 123 */", given SQLite's last_insert_rowid (which will (I think) give exactly the same value after each of those statements)
  713. # [23:33] * Quits: hendry (n=hendry@91.84.53.136) ("bedtime")
  714. # [23:35] <Hixie> dunno, we'll see what implementors say
  715. # [23:35] <Hixie> maybe we'll just have to have insertId return the last inserted row at the point the result set was created
  716. # [23:36] <met_> In ms sql wil be the second insert 134 (dunno sqllite)
  717. # [23:36] <Hixie> or they'll fix sqllite
  718. # [23:36] <Philip`> Could just drop it entirely and use executeSql("SELECT last_insert_rowid()")[0]
  719. # [23:38] <Hixie> when writing database code i always wish i could just do |var x = executeSql("INSERT ...").insertId;|
  720. # [23:38] <Philip`> (and have that be per browsing context, since it's per connection and each browsing context can have a separate connection)
  721. # [23:40] <Philip`> var x = executeSql("INSERT ...; SELECT last_insert_rowid()")[0] isn't much worse
  722. # [23:40] <Hixie> but it is worse :-)
  723. # [23:40] * Hixie ponders whether pushState() should always require a URI and title, or if it should allow state to be pushed without a URI
  724. # [23:40] <met_> Philip` why not per connection? it should be for one connection
  725. # [23:40] <Hixie> bbiab
  726. # [23:41] <Philip`> met_: Not quite sure what you mean
  727. # [23:42] <met_> you said last_insert_rowid() should return last id from whole context not from one connection?
  728. # [23:45] <Philip`> I meant that if you did "executeSql("INSERT ..."); setTimeout(function(){ executeSql("SELECT last_insert_rowid()") }, 1000)" (and nothing else happens on that page) then it should return the rowid from that first INSERT, regardless of whether you've got the same site open in a different tab or window and are inserting new rows over there
  729. # [23:46] <met_> yes I agree, misunderstand it
  730. # [23:46] <Philip`> which would require browsers to have a separate SQLite-connection in order to keep that separation
  731. # [23:46] <Philip`> Uh
  732. # [23:46] <Philip`> *a seperate SQLite-connection per browsing context
  733. # [23:46] <met_> yes
  734. # [23:47] <met_> has sqllite some lock mechanism for this?
  735. # [23:47] <met_> for more connection accesing one table
  736. # [23:51] <Philip`> You can open multiple connections (as long as the database is stored on disk, not in memory, I think), so each will have its own last_insert_rowid and stuff, and you can do some coarse-grained (per-table reader-writer) locking to stop transactions interfering
  737. # [23:52] <Philip`> and JavaScript's singlethreadedness should avoid most of the real concurrency issues
  738. # [23:52] <met_> fine
  739. # [23:52] <Philip`> (I think people would like finer-grained locks, but it'll only be implemented if they can find a mechanism that was described long enough ago for any patents to have expired)
  740. # [23:53] <met_> how handle in javascript case when 1 browser windows lock some table and second windows are in a que? should'n be there some timeout? for not to freeze so many windows
  741. # [23:54] <met_> *queu
  742. # [23:56] <Philip`> The browser can set SQLite's busy_timeout, so if two pages both BEGIN EXCLUSIVE then the second will time out after 5 seconds (or whatever) and presumably the browser would then raise a JavaScript exception
  743. # [23:56] <Philip`> Oh, actually, no
  744. # [23:56] <met_> busy_timetout will be useful
  745. # [23:57] <Philip`> Since JS runs single-threaded, you wouldn't want to bother with timeouts because there isn't any other thread that's going to release the lock later
  746. # [23:57] <met_> and what 2 browser windows?
  747. # [23:57] <Philip`> Both browser windows still run all the scripts in the same thread (as far as I'm aware)
  748. # [23:57] <met_> these are not neccessary in one JS thread
  749. # [23:58] <met_> or is it some recommendation for implementors?
  750. # [23:58] <Philip`> HTML5 says "... the HTML scripting model is strictly single-threaded and not reentrant"
  751. # [23:59] <met_> and concern this really more windows?
  752. # [23:59] <Philip`> So you could still have one page that does BEGIN EXCLUSIVE and then returns control to the browser, then a second page comes along and tries BEGIN EXCLUSIVE but it would immediately fail because the table's already locked (so you set the busy timeout to 0, I guess)
  753. # Session Close: Thu May 24 00:00:00 2007

The end :)