18.xhtml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. h t t :: / / t /
  4. h t t :: // // t //
  5. h ttttt ttttt ppppp sssss // // y y sssss ttttt //
  6. hhhh t t p p s // // y y s t //
  7. h hh t t ppppp sssss // // yyyyy sssss t //
  8. h h t t p s :: / / y .. s t .. /
  9. h h t t p sssss :: / / yyyyy .. sssss t .. /
  10. <https://y.st./>
  11. Copyright © 2016 Alex Yst <mailto:copyright@y.st>
  12. This program is free software: you can redistribute it and/or modify
  13. it under the terms of the GNU General Public License as published by
  14. the Free Software Foundation, either version 3 of the License, or
  15. (at your option) any later version.
  16. This program is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. GNU General Public License for more details.
  20. You should have received a copy of the GNU General Public License
  21. along with this program. If not, see <https://www.gnu.org./licenses/>.
  22. -->
  23. <!DOCTYPE html>
  24. <html xmlns="http://www.w3.org/1999/xhtml">
  25. <head>
  26. <base href="https://y.st./en/weblog/2016/02-February/18.xhtml" />
  27. <title>Better spider debugging and list-based navigation &lt;https://y.st./en/weblog/2016/02-February/18.xhtml&gt;</title>
  28. <link rel="icon" type="image/png" href="/link/CC_BY-SA_4.0/y.st./icon.png" />
  29. <link rel="stylesheet" type="text/css" href="/link/basic.css" />
  30. <link rel="stylesheet" type="text/css" href="/link/site-specific.css" />
  31. <script type="text/javascript" src="/script/javascript.js" />
  32. <meta name="viewport" content="width=device-width" />
  33. </head>
  34. <body>
  35. <nav>
  36. <p>
  37. <a href="/en/">Home</a> |
  38. <a href="/en/a/about.xhtml">About</a> |
  39. <a href="/en/a/contact.xhtml">Contact</a> |
  40. <a href="/a/canary.txt">Canary</a> |
  41. <a href="/en/URI_research/"><abbr title="Uniform Resource Identifier">URI</abbr> research</a> |
  42. <a href="/en/opinion/">Opinions</a> |
  43. <a href="/en/coursework/">Coursework</a> |
  44. <a href="/en/law/">Law</a> |
  45. <a href="/en/a/links.xhtml">Links</a> |
  46. <a href="/en/weblog/2016/02-February/18.xhtml.asc">{this page}.asc</a>
  47. </p>
  48. <hr/>
  49. <p>
  50. Weblog index:
  51. <a href="/en/weblog/"><abbr title="American Standard Code for Information Interchange">ASCII</abbr> calendars</a> |
  52. <a href="/en/weblog/index_ol_ascending.xhtml">Ascending list</a> |
  53. <a href="/en/weblog/index_ol_descending.xhtml">Descending list</a>
  54. </p>
  55. <hr/>
  56. <p>
  57. Jump to entry:
  58. <a href="/en/weblog/2015/03-March/07.xhtml">&lt;&lt;First</a>
  59. <a rel="prev" href="/en/weblog/2016/02-February/17.xhtml">&lt;Previous</a>
  60. <a rel="next" href="/en/weblog/2016/02-February/19.xhtml">Next&gt;</a>
  61. <a href="/en/weblog/latest.xhtml">Latest&gt;&gt;</a>
  62. </p>
  63. <hr/>
  64. </nav>
  65. <header>
  66. <h1>Better spider debugging and list-based navigation</h1>
  67. <p>Day 00348: Thursday, 2016 February 18</p>
  68. </header>
  69. <p>
  70. Today, I checked in on the spider and found that it was about a week into working on the current website, had about an estimated week left, and had crashed.
  71. A week&apos;s worth of crawling efforts had been lost, and if I could find and fix the bug, it would take about a week to reach that page again to test the fix.
  72. Because of this, I set up a new feature that allows the administrator to specify a <abbr title="Uniform Resource Identifier">URI</abbr> to test on.
  73. Because of how the spider works, the specified <abbr title="Uniform Resource Identifier">URI</abbr> will be used third, right after the <code>robots.txt</code> and main index pages.
  74. It still means a lot less waiting and a lot less wasted effort.
  75. It appears that there was no bug for me to fix though, I had already fixed it and the page that the spider choked on before was no longer an issue.
  76. Most likely, I&apos;d fixed this but hadn&apos;t restarted the spider to make the fix come into effect due to the fact that restarting the spider would cause the spider to lose its progress on the current site.
  77. </p>
  78. <p>
  79. My initial plan was to implement the feature in such a way that if a debugging <abbr title="Uniform Resource Identifier">URI</abbr> is provided, <strong>*only*</strong> that page would be loaded and parsed.
  80. I was going to do this by having the debug switch set the queue variable to an object of a class that acted like an array, but just dropped any information given to it.
  81. However, it seems that even the most array-like object implementing all the relevant interfaces cannot be passed to <code>\array_pop()</code>, so after building that class, I ended up throwing it out.
  82. </p>
  83. <p>
  84. It turns out that the reason that the <a href="apt:atheme-services">atheme-services</a> package in Debian is so outdated isn&apos;t because the Debian package maintainers for that package stopped caring or have been too busy.
  85. It is because the Atheme team has requested that distribution maintainers only package their long-term support version! The copy in the Debian repositories is the latest long-term support version.
  86. It&apos;s a shame that this version doesn&apos;t support <abbr title="Next Generation IRC Daemon">ngIRCd</abbr>.
  87. I&apos;ll have to use a copy from outside the Debian repositories, which is something that I really don&apos;t like doing when choosing server software.
  88. </p>
  89. <p>
  90. Speaking of <abbr title="Internet Relay Chat">IRC</abbr>, I forgot that <a href="http://zdasgqu3geo7i7yj.onion/">The Unknown Man</a> and I had agreed to only allow encrypted connections to our network.
  91. Yesterday, I wrote about <abbr title="Uniform Resource Identifier">URI</abbr>s with the <code>irc:</code> and <code>irc6:</code> schemes, but those won&apos;t really be relevant to our network.
  92. </p>
  93. <p>
  94. Someone that prefers not to be mentioned by name has requested that I provide an index for my weblog that uses lists instead of <abbr title="American Standard Code for Information Interchange">ASCII</abbr> calendars.
  95. He thinks that they would be more accessible in text-based Web browsers than the <abbr title="American Standard Code for Information Interchange">ASCII</abbr> calendars.
  96. I disagree, but agreed to set up such an index.
  97. After agreeing to build such an index, I realized that while I still disagree that it will help in text-based Web browsers, it might actually be helpful for blind people using screen readers.
  98. With that in mind, I also added a <code>title</code> attribute to the links on the calender-based index page.
  99. I added both an ascending and descending list of entries.
  100. </p>
  101. <p>
  102. While trying to set up the set up the list-based version of the index, I ran into a problem that I have run into countless times before.
  103. The list has an order, so unordered lists are the incorrect thing to use semantically, but ordered lists don&apos;t work either because they stupidly index from one.
  104. If only I could use the <code>start</code> attribute! However, that attribute is deprecated in <abbr title="Extensible Hypertext Markup Language">XHTML</abbr> 1.1, the latest version of the <abbr title="Extensible Hypertext Markup Language">XHTML</abbr> standard, or so I thought.
  105. I looked into it today to see it <abbr title="Extensible Hypertext Markup Language">XHTML</abbr>5 is any closer to finalization, and it seems that it was <a href="https://www.w3.org/TR/2014/REC-html5-20141028/">finalized</a> over a year ago.
  106. According to one article, <a href="http://www.pcworld.com/article/2840132/html5-finalized-finally.html">it took eight years to finalize it</a>.
  107. No wonder I gave up checking on it! I had kind of started wondering if <abbr title="Extensible Hypertext Markup Language">XHTML</abbr>5 would ever become an actual standard.
  108. </p>
  109. <p>
  110. It seems that <a href="apt:links">Links</a>, the Web browser that my friend uses, does not handle lists correctly.
  111. If you attempt to list from zero, Links uses bullet points instead of numbers.
  112. If you use a reverse list, Links will still count up instead of down.
  113. I never could find a solution to either issue.
  114. The problem with the reversed lists might be that they are a newish feature.
  115. However, list starting points are old enough that they have become deprecated and then undeprecated.
  116. There is no good reason not to support them fully.
  117. Thankfully, I found a workaround.
  118. It isn&apos;t as good as using the the <code>start</code> attribute of the <code>&lt;ol/&gt;</code> tag, but you can also use the <a href="https://www.impressivewebs.com/reverse-ordered-lists-html5/"><code>value</code> attribute of the <code>&lt;li/&gt;</code> tag</a>.
  119. </p>
  120. <hr/>
  121. <p>
  122. Copyright © 2016 Alex Yst;
  123. You may modify and/or redistribute this document under the terms of the <a rel="license" href="/license/gpl-3.0-standalone.xhtml"><abbr title="GNU&apos;s Not Unix">GNU</abbr> <abbr title="General Public License version Three or later">GPLv3+</abbr></a>.
  124. If for some reason you would prefer to modify and/or distribute this document under other free copyleft terms, please ask me via email.
  125. My address is in the source comments near the top of this document.
  126. This license also applies to embedded content such as images.
  127. For more information on that, see <a href="/en/a/licensing.xhtml">licensing</a>.
  128. </p>
  129. <p>
  130. <abbr title="World Wide Web Consortium">W3C</abbr> standards are important.
  131. This document conforms to the <a href="https://validator.w3.org./nu/?doc=https%3A%2F%2Fy.st.%2Fen%2Fweblog%2F2016%2F02-February%2F18.xhtml"><abbr title="Extensible Hypertext Markup Language">XHTML</abbr> 5.1</a> specification and uses style sheets that conform to the <a href="http://jigsaw.w3.org./css-validator/validator?uri=https%3A%2F%2Fy.st.%2Fen%2Fweblog%2F2016%2F02-February%2F18.xhtml"><abbr title="Cascading Style Sheets">CSS</abbr>3</a> specification.
  132. </p>
  133. </body>
  134. </html>