logo

drewdevault.com

[mirror] blog and personal website of Drew DeVault git clone https://hacktivis.me/git/mirror/drewdevault.com.git

Status-update-January-2021.html (3791B)


  1. ---
  2. title: Status update, January 2021
  3. date: 2021-01-15
  4. outputs: [html, gemtext]
  5. ---
  6. <p>
  7. Hello from the future! My previous status update was last year, but it feels
  8. like it was only a month ago. I hope you didn't miss my crappy jokes too much
  9. during the long wait.
  10. <p>
  11. One of the advancements that I would like to mention this month is the general
  12. availability of <a href="https://godocs.io">godocs.io</a>, which is a replacement for the
  13. soon-to-be-obsolete godoc.org, based on a fork of their original codebase.
  14. <a href="https://sr.ht/~sircmpwn/godocs.io">Our fork</a> has already attracted
  15. interest from many contributors who wanted to work on godoc.org, but found the
  16. Google CLA distasteful. We've been hard at work excising lots of Google crap,
  17. rewriting the indexer to use PostgreSQL instead of GCP, and making the little
  18. JavaScript bits more optional &amp; more conservative in their implementation.
  19. We also plan to update it with first-class support for Go modules, which was
  20. never added to the upstream gddo codebase. Beyond this, we do not plan on
  21. making any large-scale changes: we just want godoc.org to keep being a thing.
  22. Enjoy!
  23. <p>
  24. On SourceHut, the first point of note is the new dark theme, which is
  25. automatically enabled when your user-agent configures
  26. <code>prefers-color-scheme: dark</code>. It has gone through a couple of
  27. iterations of refinement, and I have a few more changes queued up for my next
  28. round of improvements. Please let me know if you notice anything unusual!
  29. Additionally, I broke ground on the todo.sr.ht API 2.0 implementation this
  30. month. It required some minor changes to our underlying GraphQL approach, but
  31. in general it should be fairly straightforward &mdash; albeit time consuming
  32. &mdash; to implement. Ludovic has also started working on an API 2.0 branch for
  33. hg.sr.ht, which I plan on reviewing shortly.
  34. <p>
  35. Small projects have enjoyed some improvements as well.
  36. <a href="https://sr.ht/~sircmpwn/mkproof/">mkproof</a> grew multi-processor
  37. support and had its default difficulty tweaked accordingly &mdash; thanks, Tom!
  38. Zach DeCook and Nolan Prescott also sent some bugfixes for
  39. <a href="https://sr.ht/~sircmpwn/gmnisrv/">gmnisrv</a>, and René Wagner and
  40. Giuseppe Lumia both helped fix some issues with
  41. <a href="https://sr.ht/~sircmpwn/gmni">gmni</a> as well. Jason Phan sent an
  42. improvement for <a href="https://sr.ht/~sircmpwn/dowork">dowork</a> which adds
  43. random jitter to the exponential backoff calculation. Thanks to all of these
  44. folks for their help!
  45. <p>
  46. That's all for today. Thanks again for your support and attention, and I'll see
  47. you again soon!
  48. <details>
  49. <summary>...</summary>
  50. <p>I have actually been working on this a lot this month. Progress is good.
  51. <pre>fn measurements() void = {
  52. const x = "Hello!";
  53. assert(len(x) == 6z);
  54. assert(size(str) == size(*u8) + size(size) * 2z);
  55. const align: size =
  56. if (size(*u8) &gt; size(size)) size(*u8)
  57. else size(size);
  58. assert(&amp;x: uintptr: size % align == 0z);
  59. };
  60. fn charptr() void = {
  61. const x = "Hello!";
  62. const y = x: *const char;
  63. const z = y: *[*]u8;
  64. const expected = ['H', 'e', 'l', 'l', 'o', '!', '\0'];
  65. for (let i = 0z; i &lt; len(expected); i += 1z) {
  66. assert(z[i] == expected[i]: u32: u8);
  67. };
  68. };
  69. fn storage() void = {
  70. const string = "こんにちは";
  71. const ptr = &amp;string: *struct {
  72. data: *[*]u8,
  73. length: size,
  74. capacity: size,
  75. };
  76. assert(ptr.length == 15z &amp;&amp; ptr.capacity == 15z);
  77. // UTF-8 encoded
  78. const expected = [
  79. 0xE3u8, 0x81u8, 0x93u8, 0xE3u8, 0x82u8, 0x93u8, 0xE3u8, 0x81u8,
  80. 0xABu8, 0xE3u8, 0x81u8, 0xA1u8, 0xE3u8, 0x81u8, 0xAFu8, 0x00u8,
  81. ];
  82. for (let i = 0z; i &lt; len(expected); i += 1z) {
  83. assert(ptr.data[i] == expected[i]);
  84. };
  85. };
  86. export fn main() void = {
  87. measurements();
  88. charptr();
  89. storage();
  90. };</pre>
  91. </details>