Repository with sources and generator of https://larlet.fr/david/ https://larlet.fr/david/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 32KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. <!DOCTYPE html><!-- This is a valid HTML5 document. -->
  2. <!-- Screen readers, SEO, extensions and so on. -->
  3. <html lang="fr">
  4. <!-- Has to be within the first 1024 bytes, hence before the `title` element
  5. See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
  6. <meta charset="utf-8">
  7. <!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
  8. <!-- The viewport meta is quite crowded and we are responsible for that.
  9. See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
  10. <meta name="viewport" content="width=device-width,initial-scale=1">
  11. <!-- Required to make a valid HTML5 document. -->
  12. <title>
  13. Étiquette #laboratoire
  14. — David Larlet</title>
  15. <script>
  16. function toggleTheme(themeName) {
  17. document.documentElement.classList.toggle(
  18. 'forced-dark',
  19. themeName === 'dark'
  20. )
  21. document.documentElement.classList.toggle(
  22. 'forced-light',
  23. themeName === 'light'
  24. )
  25. }
  26. const selectedTheme = localStorage.getItem('theme')
  27. if (selectedTheme !== 'undefined') {
  28. toggleTheme(selectedTheme)
  29. }
  30. </script>
  31. <!-- Documented, feel free to shoot an email. -->
  32. <link rel="stylesheet" href="/static/david/css/style_2024-03-07.css">
  33. <!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
  34. <link rel="preload"
  35. href="/static/david/css/fonts/century_supra_ot_a_regular.woff2"
  36. as="font"
  37. type="font/woff2"
  38. media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
  39. crossorigin>
  40. <link rel="preload"
  41. href="/static/david/css/fonts/century_supra_ot_a_bold.woff2"
  42. as="font"
  43. type="font/woff2"
  44. media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
  45. crossorigin>
  46. <link rel="preload"
  47. href="/static/david/css/fonts/century_supra_ot_a_italic.woff2"
  48. as="font"
  49. type="font/woff2"
  50. media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
  51. crossorigin>
  52. <link rel="preload"
  53. href="/static/david/css/fonts/century_supra_ot_b_regular.woff2"
  54. as="font"
  55. type="font/woff2"
  56. media="(prefers-color-scheme: dark)"
  57. crossorigin>
  58. <link rel="preload"
  59. href="/static/david/css/fonts/century_supra_ot_b_bold.woff2"
  60. as="font"
  61. type="font/woff2"
  62. media="(prefers-color-scheme: dark)"
  63. crossorigin>
  64. <link rel="preload"
  65. href="/static/david/css/fonts/century_supra_ot_b_italic.woff2"
  66. as="font"
  67. type="font/woff2"
  68. media="(prefers-color-scheme: dark)"
  69. crossorigin>
  70. <meta name="description" content="Publications relatives au tag #laboratoire">
  71. <!-- That good ol' feed, subscribe :). -->
  72. <link rel="alternate"
  73. type="application/atom+xml"
  74. title="Feed"
  75. href="/david/log/">
  76. <!-- Generated from https://realfavicongenerator.net/ such a mess. -->
  77. <link rel="apple-touch-icon"
  78. sizes="180x180"
  79. href="/static/david/icons2/apple-touch-icon.png">
  80. <link rel="icon"
  81. type="image/png"
  82. sizes="32x32"
  83. href="/static/david/icons2/favicon-32x32.png">
  84. <link rel="icon"
  85. type="image/png"
  86. sizes="16x16"
  87. href="/static/david/icons2/favicon-16x16.png">
  88. <link rel="manifest" href="/static/david/icons2/site.webmanifest">
  89. <link rel="mask-icon"
  90. href="/static/david/icons2/safari-pinned-tab.svg"
  91. color="#07486c">
  92. <link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
  93. <meta name="msapplication-TileColor" content="#f7f7f7">
  94. <meta name="msapplication-config"
  95. content="/static/david/icons2/browserconfig.xml">
  96. <meta name="theme-color"
  97. content="#f7f7f7"
  98. media="(prefers-color-scheme: light)">
  99. <meta name="theme-color"
  100. content="#272727"
  101. media="(prefers-color-scheme: dark)">
  102. <!-- Is that even respected? Retrospectively? What a shAItshow…
  103. https://neil-clarke.com/block-the-bots-that-feed-ai-models-by-scraping-your-website/ -->
  104. <meta name="robots" content="noai, noimageai">
  105. <style type="text/css">
  106. details[open] summary {
  107. display: none;
  108. }
  109. </style>
  110. <body data-instant-intensity="viewport-all">
  111. <article>
  112. <header>
  113. <hgroup>
  114. <h1>#laboratoire</h1>
  115. <p>Publications relatives à cette étiquette</p>
  116. </hgroup>
  117. </header>
  118. <nav>
  119. <p>
  120. <a href="/david/" title="Aller à l’accueil">
  121. Accueil</a>
  122. <a rel="tags"
  123. href="/david/2024/#tags"
  124. title="Liste de toutes les étiquettes">
  125. Étiquettes</a>
  126. <a href="/david/recherche/" title="Aller à la page de recherche" rel="search" data-no-instant>Recherche</a>
  127. <a href="/david/log/" title="Accès au flux RSS">Suivre</a>
  128. </p>
  129. </nav>
  130. <h2>
  131. <a href="/david/2024/03/01/" title="Lien permanent vers cet article">Simple</a> <time datetime="2024-03-01">1 mars 2024</time>
  132. </h2>
  133. <blockquote lang="en">
  134. <p>We can bring that into RSS by treating any interaction as content. If you post something, thats an entry in your feed (as before). If you comment on something, thats also an entry in your feed. If you like something, thats another entry in your feed. If you follow someone (which would mean subscribing to some RSS feed), thats also another entry in your feed. To mark that interactive nature of some feed entry, <mark>we can simple extend RSS a&nbsp;bit</mark></p>
  135. <p><cite><em><a data-link-domain="gist.github.com" href="https://gist.github.com/loreanvictor/bddd8824c744024d338e935bd7e96707" hreflang="en"
  136. title="Consultation de l’article (anglais)">Interaction as Content</a>
  137. <a href="/david/cache/2024/e401917f8e9785285afed817e5344443/" hreflang="en"
  138. data-tippy data-description="Interaction as Content. GitHub Gist: instantly share code, notes, and snippets."
  139. data-source="https://gist.github.com/loreanvictor/bddd8824c744024d338e935bd7e96707"
  140. data-date="2024-03-01"
  141. data-favicon="https://github.githubassets.com/favicons/favicon.png"
  142. data-domain="gist.github.com"
  143. ><svg xmlns="http://www.w3.org/2000/svg"
  144. width="24" height="24" viewBox="0 0 24 24" fill="none"
  145. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  146. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  147. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  148. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  149. </svg>
  150. <span class="sr-only">[archive]</span></a></em></cite></p>
  151. </blockquote>
  152. <p>Tout est dans le <q lang="en">simple</q>&nbsp;🙃.</p>
  153. <p>Rédiger une spécification comme <a data-link-domain="en.wikipedia.org" href="https://en.wikipedia.org/wiki/Media_RSS">Media RSS</a> n’est déjà pas trivial mais alors faire en sorte que cela soit adopté et devienne un standard c’est une autre paire de&nbsp;manches.</p>
  154. <blockquote lang="en">
  155. <p>RSS originated in 1999, and has strived to be a simple, easy to understand format, with relatively modest goals. After it became a popular format, <mark>developers wanted to extend it</mark> using modules defined in namespaces, as specified by the&nbsp;W3C.</p>
  156. <p>RSS 2.0&nbsp;adds that capability, following a simple rule. A RSS feed may contain elements and attributes not described on this page, only if those elements and attributes are defined in a&nbsp;namespace.</p>
  157. <p><cite><em><a data-link-domain="rssboard.org" href="https://www.rssboard.org/rss-specification#extendingRss" hreflang="en"
  158. title="Consultation de l’article (anglais)">RSS 2.0&nbsp;Specification</a>
  159. <a href="/david/cache/2024/85b765a918ef094a5a2dd13a1ff5dd7d/" hreflang="en"
  160. data-tippy data-description="The current version of the RSS 2.0 specification (2.0.11), published on March 30, 2009."
  161. data-source="https://www.rssboard.org/rss-specification#extendingRss"
  162. data-date="2024-03-01"
  163. data-favicon="https://www.rssboard.org/favicon.ico"
  164. data-domain="rssboard.org"
  165. ><svg xmlns="http://www.w3.org/2000/svg"
  166. width="24" height="24" viewBox="0 0 24 24" fill="none"
  167. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  168. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  169. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  170. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  171. </svg>
  172. <span class="sr-only">[archive]</span></a></em></cite></p>
  173. </blockquote>
  174. <p>Beaucoup de personnes ont envie de faire davantage avec RSS, c’est la diffusion à une échelle non anecdotique qui est difficile. Peut-être qu’un acteur comme Mastodon pourrait peser dans la balance d’une telle&nbsp;initiative.</p>
  175. <blockquote lang="en">
  176. <p>Another feature area I would think about is interactivity. I’m fascinated with Google’s work in Gmail around “Inbox Actions” – basically the one-click buttons to perform an email action like RSVP, or reviewing a bug. Here’s an explainer with some&nbsp;examples.</p>
  177. <p>Let’s call it Feed Actions. <mark>Feed Actions could also be an RSS&nbsp;extension.</mark></p>
  178. <p><cite><em><a data-link-domain="interconnected.org" href="https://interconnected.org/home/2021/05/26/chrome_and_rss" hreflang="en"
  179. title="Consultation de l’article (anglais)">Three requests for the Google Chrome team as they experiment with RSS</a>
  180. <a href="/david/cache/2024/4a9c4c407b34c40ec5b3783ac5f274a7/" hreflang="en"
  181. data-tippy data-description="Posted on Wednesday 26 May 2021. 976 words, 11 links. By Matt Webb."
  182. data-source="https://interconnected.org/home/2021/05/26/chrome_and_rss"
  183. data-date="2024-03-01"
  184. data-favicon=""
  185. data-domain="interconnected.org"
  186. ><svg xmlns="http://www.w3.org/2000/svg"
  187. width="24" height="24" viewBox="0 0 24 24" fill="none"
  188. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  189. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  190. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  191. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  192. </svg>
  193. <span class="sr-only">[archive]</span></a></em></cite></p>
  194. </blockquote>
  195. <p>J’ai deux communautés dans lesquelles c’est même devenu un <em>running gag</em> de créer un outil qui explorerait de nouvelles&nbsp;possibilités.</p>
  196. <p><a href="/david/2021/05/26/">Suivez-moi</a> et vous n’aurez plus jamais faim&#8239;! Gniarkgniarkgniark&nbsp;🦁⚡️</p>
  197. <nav>
  198. <p>
  199. <a href="/david/2024/evolution/"
  200. title="Liste de tous les articles 2024 associés à cette étiquette"
  201. rel="tag">#évolution</a>
  202. <a href="/david/2024/laboratoire/"
  203. title="Liste de tous les articles 2024 associés à cette étiquette"
  204. rel="tag">#laboratoire</a>
  205. <a href="/david/2024/web/"
  206. title="Liste de tous les articles 2024 associés à cette étiquette"
  207. rel="tag">#web</a>
  208. <a href="/david/2024/#tags" title="Liste de toutes les étiquettes 2024">tous ?</a>
  209. </p>
  210. </nav>
  211. <h2>
  212. <a href="/david/2024/02/20/" title="Lien permanent vers cet article">Véhicule</a> <time datetime="2024-02-20">20 février 2024</time>
  213. </h2>
  214. <blockquote>
  215. <p>John Burroughs est d’avis que l’étude expérimentale des animaux en captivité est totalement futile. Leur caractère, leurs habitudes, leur appétit changent complètement lorsqu’ils sont arrachés à leur habitat naturel. Comment pourrions-nous donc envisager les potentialités de la nature humaine alors qu’elle est confinée dans un espace restreint et contrainte quotidiennement à la&nbsp;soumission&#8239;?</p>
  216. <p>Seuls la liberté, l’épanouissement, la chance et, par-dessous tout, la paix et la sérénité peuvent nous renseigner sur les véritables facteurs dominants de la nature humaine et toutes ses merveilleuses&nbsp;possibilités.</p>
  217. <p>L’anarchisme représente donc essentiellement la libération de l’esprit de la domination religieuse&#8239;; la libération du corps du joug de la propriété&#8239;; la libération de l’individu des entraves et des restrictions du gouvernement. L’anarchisme représente un ordre social fondé sur <mark>le regroupement volontaire des individus en vue de produire une véritable richesse sociale</mark>&#8239;; un ordre qui garantira à tout être humain le libre accès à la terre et la pleine jouissance des nécessités de la vie, selon les désirs, les goûts et les inclinations de&nbsp;chacun.</p>
  218. <p><cite><em>Ce que l’anarchisme représente vraiment</em>, Emma Goldman, 1911</cite></p>
  219. </blockquote>
  220. <p>L’exercice Scopyleft du jour était d’imaginer et de partager le véhicule que représente la coopérative pour chacun·e d’entre nous aujourd’hui. J’ai été agréablement surpris que nous proposions tou·tes quelque chose de différent. Les questions n’ont pas besoin d’être très élaborées pour apporter des éclairages personnels sur une même&nbsp;situation.</p>
  221. <a href="#hr-81" title="Lien vers cette section de la page"><hr id="hr-81" /></a>
  222. <blockquote lang="en">
  223. <p>Your AI-free Content Deserves a&nbsp;Badge</p>
  224. <p>Artificial Intelligence (AI) is trained using human-created content. If humans stop producing new content and rely solely on AI, online content across the world may become repetitive and&nbsp;stagnant.</p>
  225. <p>If your content is not AI-generated, add the badge to your work, with&nbsp;pride.</p>
  226. <p><cite><em><a data-link-domain="notbyai.fyi" href="https://notbyai.fyi/">not by&nbsp;AI</a></em></cite></p>
  227. </blockquote>
  228. <p>De <a href="/david/2024/02/19/#hr-80">même qu’hier</a>, je m’interroge beaucoup sur le notion de plagIAt. Je copie-colle des citations, j’explore des idées déjà connues, je crée un <em>patchwork</em> quotidien, quelle différence avec un algorithme suffisamment bien&nbsp;nourri&#8239;?</p>
  229. <a href="#hr-82" title="Lien vers cette section de la page"><hr id="hr-82" /></a>
  230. <blockquote>
  231. <p>Depuis plus de dix ans, l’Ouvre-Boîtes a mis en place les prêts Coopitalistes. Le principe est simple&nbsp;: des citoyennes et citoyens ou associations investissent de l’argent à l’Ouvre-Boîtes pour sept&nbsp;ans.</p>
  232. <p>En captant cette épargne solidaire, <mark>la coopérative se créée une banque interne</mark> qui finance des projets&nbsp;comme&nbsp;:</p>
  233. <ul>
  234. <li>Des projets collectifs&nbsp;: travaux pour aménager un lieu à disposition des entrepreneur·es (le Grand&nbsp;Bain),</li>
  235. <li>Des investissements pour des entrepreneur·es qui en ont besoin pour lancer leur activité&nbsp;: vélos, voiture, appareil photos, ordinateurs, outils de&nbsp;jardinage…</li>
  236. <li>Des besoins exceptionnels de&nbsp;trésorerie</li>
  237. </ul>
  238. <p><cite><em><a data-link-domain="ouvre-boites.coop" href="https://www.ouvre-boites.coop/les-coopitalistes" hreflang="fr"
  239. title="Consultation de l’article">Les Coopitalistes</a>
  240. <a href="/david/cache/2024/865257313ae3d6aca13284128d6523d5/" hreflang="fr"
  241. data-tippy data-description="Depuis plus de dix ans, l’Ouvre-Boîtes a mis en place les prêts Coopitalistes."
  242. data-source="https://www.ouvre-boites.coop/les-coopitalistes"
  243. data-date="2024-02-20"
  244. data-favicon="https://www.ouvre-boites.coop/themes/custom/front/favicon.ico"
  245. data-domain="ouvre-boites.coop"
  246. ><svg xmlns="http://www.w3.org/2000/svg"
  247. width="24" height="24" viewBox="0 0 24 24" fill="none"
  248. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  249. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  250. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  251. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  252. </svg>
  253. <span class="sr-only">[archive]</span></a></em></cite></p>
  254. </blockquote>
  255. <p>Les alternatives existent, elles sont moins faciles à trouver mais elles existent. Et elles&nbsp;inspirent.</p>
  256. <nav>
  257. <p>
  258. <a href="/david/2024/echanges/"
  259. title="Liste de tous les articles 2024 associés à cette étiquette"
  260. rel="tag">#échanges</a>
  261. <a href="/david/2024/laboratoire/"
  262. title="Liste de tous les articles 2024 associés à cette étiquette"
  263. rel="tag">#laboratoire</a>
  264. <a href="/david/2024/protopie/"
  265. title="Liste de tous les articles 2024 associés à cette étiquette"
  266. rel="tag">#protopie</a>
  267. <a href="/david/2024/#tags" title="Liste de toutes les étiquettes 2024">tous ?</a>
  268. </p>
  269. </nav>
  270. <h2>
  271. <a href="/david/2024/02/19/" title="Lien permanent vers cet article">Injection</a> <time datetime="2024-02-19">19 février 2024</time>
  272. </h2>
  273. <blockquote lang="en">
  274. <p>It’s fun to think of <mark>other possible uses…</mark> Perhaps you could pull in HTML modules along with their relevant CSS link. Or embed a tweet or code examples in documentation or a blog post. It could probably even be used to load and apply a regular <code>rel=stylesheet</code> link asynchronously, and at a low priority, which is otherwise surprisingly hard to do (note: I didn’t test this idea much to say for&nbsp;sure).</p>
  275. <p><cite><em><a data-link-domain="filamentgroup.com" href="https://www.filamentgroup.com/lab/html-includes/" hreflang="en"
  276. title="Consultation de l’article (anglais)">HTML Includes That Work Today</a>
  277. <a href="/david/cache/2024/88df28660094efbc5a13bb09d70dfea6/" hreflang="en"
  278. data-tippy data-description="Read this page on the Filament Group website"
  279. data-source="https://www.filamentgroup.com/lab/html-includes/"
  280. data-date="2024-02-19"
  281. data-favicon="https://www.filamentgroup.com/images/icons/favicon-32x32.png"
  282. data-domain="filamentgroup.com"
  283. ><svg xmlns="http://www.w3.org/2000/svg"
  284. width="24" height="24" viewBox="0 0 24 24" fill="none"
  285. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  286. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  287. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  288. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  289. </svg>
  290. <span class="sr-only">[archive]</span></a></em></cite></p>
  291. </blockquote>
  292. <p>J’ai cette page ouverte dans un onglet depuis littéralement des années. C’est <a data-link-domain="blog.notmyidea.org" href="https://blog.notmyidea.org/">Alexis</a> qui me l’a rappelé en partageant <a data-link-domain="leanrada.com" href="https://leanrada.com/htmz/">htmz</a> aujourd’hui qui va un tout petit peu plus&nbsp;loin.</p>
  293. <p>Voilà le code en&nbsp;question&nbsp;:</p>
  294. <pre><code>&lt;iframe
  295. src=&quot;/static/david/2024/test-injection.html&quot;
  296. onload=&quot;
  297. this.before(
  298. (
  299. this.contentDocument.body||this.contentDocument
  300. ).children[0]
  301. );
  302. this.remove()
  303. &quot;
  304. hidden&gt;
  305. &lt;/iframe&gt;
  306. </code></pre>
  307. <p>En résumé, on prend le code l’<code>iframe</code> et on l’injecte au chargement dans le document en cours. Voici un exemple (pas sûr que ça fonctionne depuis un&nbsp;agrégateur…)&nbsp;:</p>
  308. <iframe src="/static/david/2024/test-injection.html" onload="this.before((this.contentDocument.body||this.contentDocument).children[0]);this.remove()" hidden></iframe>
  309. <p>J’ai ajouté l’attribut <code>hidden</code> à la proposition initiale pour éviter le flash. Si vous inspectez le code, vous constatez que le paragraphe précédent tout à fait classique alors qu’il s’agissait d’une <code>iframe</code> (sauf si vous avez une extension qui bloque les <code>iframe</code> bien sûr). Jusque là c’est <a data-link-domain="css-tricks.com" href="https://css-tricks.com/the-simplest-ways-to-handle-html-includes/" hreflang="en"
  310. title="Consultation de l’article (anglais)">une forme d’inclusion</a>
  311. <a href="/david/cache/2024/6bfc6bd7bc1d9158aa7f6591123e7f4b/" hreflang="en"
  312. data-tippy data-description="It's extremely surprising to me that HTML has never had any way to include other HTML files within it. Nor does there seem to be anything on the horizon that"
  313. data-source="https://css-tricks.com/the-simplest-ways-to-handle-html-includes/"
  314. data-date="2024-02-19"
  315. data-favicon="https://css-tricks.com/favicon.svg"
  316. data-domain="css-tricks.com"
  317. ><svg xmlns="http://www.w3.org/2000/svg"
  318. width="24" height="24" viewBox="0 0 24 24" fill="none"
  319. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  320. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  321. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  322. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  323. </svg>
  324. <span class="sr-only">[archive]</span></a> mais rien de bien&nbsp;utile.</p>
  325. <p>Ce qui devient un peu plus fou serait de pouvoir injecter un <em>Web Component</em> de cette façon&#8239;! Le problème étant que le <code>this.remove()</code> est exécuté avant le chargement du script de l’<code>iframe</code>… et si on le retire on conserve cet élément <code>hidden</code> dans le document. Ce n’est pas critique mais ce n’est pas très élégant non plus, d’autant que cela signifie que le composant est défini et instancié deux&nbsp;fois.</p>
  326. <style>para-graph { background: paleturquoise; color: black; }</style>
  327. <iframe src="/static/david/2024/test-injection-web-component.html" onload= "this.before((this.contentDocument.body||this.contentDocument).children[0]);this.before(this.contentDocument.scripts[0])" hidden></iframe>
  328. <p>Il y a probablement des choses qui m’échappent mais il se fait&nbsp;tard.</p>
  329. <p><em>To be&nbsp;continued…</em></p>
  330. <a href="#hr-79" title="Lien vers cette section de la page"><hr id="hr-79" /></a>
  331. <p>Découvertes du jour&nbsp;: <a data-link-domain="MDN" href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base"><code>&lt;base&gt;</code></a> et <a data-link-domain="MDN" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis">globalThis</a>.</p>
  332. <p>Aussi, il n’est <a data-link-domain="github.com" href="https://github.com/django/django/commit/b7f500396e05cd1f0bb8901fce16e2d8393d2779">pas forcément indiqué</a> de générer une <code>SECRET_KEY</code> avec Django, il vaut mieux le faire en Python&nbsp;directement&nbsp;:</p>
  333. <pre><code>[depuis un shell]
  334. $ python3 -c 'import secrets; print(secrets.token_hex(100))'
  335. </code></pre>
  336. <a href="#hr-80" title="Lien vers cette section de la page"><hr id="hr-80" /></a>
  337. <blockquote lang="en">
  338. <p>So, what’s the fun of writing on the internet anymore? Well, if your aim is to be respected as an author, there’s probably not much fun to be had here at all. Don’t write online for fame and glory. Oblivion, obscurity and exploitation are all but guaranteed. Write here because <em>ideas</em> matter, not authorship. Write here because the more robots, pirates, and single-minded trolls swallow up cyberspace, <mark>the more we need independent writing in order to think new thoughts in the future</mark> — even if your words are getting dished up and plated by an&nbsp;algorithm.</p>
  339. <p><cite><em><a data-link-domain="jamesshelley.com" href="https://jamesshelley.com/blog/writing-on-the-internet.html" hreflang="en"
  340. title="Consultation de l’article (anglais)">What’s the fun in writing on the internet anymore?</a>
  341. <a href="/david/cache/2024/a005801f0e596f9ecb99037a992ecc1b/" hreflang="en"
  342. data-tippy data-description="The moment you release your words, you relinquish all control."
  343. data-source="https://jamesshelley.com/blog/writing-on-the-internet.html"
  344. data-date="2024-02-19"
  345. data-favicon="https://jamesshelley.com/images/favicon.png"
  346. data-domain="jamesshelley.com"
  347. ><svg xmlns="http://www.w3.org/2000/svg"
  348. width="24" height="24" viewBox="0 0 24 24" fill="none"
  349. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  350. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  351. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  352. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  353. </svg>
  354. <span class="sr-only">[archive]</span></a></em></cite></p>
  355. </blockquote>
  356. <p>Rester (et alimenter la machine) ou quitter (et laisser l’espace à la&nbsp;machine).</p>
  357. <p>Je n’aime pas beaucoup la <a data-link-domain="maggieappleton.com" href="https://maggieappleton.com/ai-dark-forest" hreflang="en"
  358. title="Consultation de l’article (anglais)">métaphore de la forêt noire</a>
  359. <a href="/david/cache/2024/140458968f9f7da7d14e181d0a80e799/" hreflang="en"
  360. data-tippy data-description="Proving you're a human on a web flooded with generative AI content"
  361. data-source="https://maggieappleton.com/ai-dark-forest"
  362. data-date="2024-02-19"
  363. data-favicon="https://maggieappleton.com//images/favicon/favicon.ico"
  364. data-domain="maggieappleton.com"
  365. ><svg xmlns="http://www.w3.org/2000/svg"
  366. width="24" height="24" viewBox="0 0 24 24" fill="none"
  367. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  368. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  369. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  370. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  371. </svg>
  372. <span class="sr-only">[archive]</span></a> ces temps-ci car j’apprécie un peu trop les forêts pour ça. J’aurais davantage l’impression de faire partie d’une haie alors qu’il y a beaucoup de monoculture aux alentours. Avec les double sens que cette méta·phore&nbsp;implique.</p>
  373. <nav>
  374. <p>
  375. <a href="/david/2024/apprentissage/"
  376. title="Liste de tous les articles 2024 associés à cette étiquette"
  377. rel="tag">#apprentissage</a>
  378. <a href="/david/2024/laboratoire/"
  379. title="Liste de tous les articles 2024 associés à cette étiquette"
  380. rel="tag">#laboratoire</a>
  381. <a href="/david/2024/web/"
  382. title="Liste de tous les articles 2024 associés à cette étiquette"
  383. rel="tag">#web</a>
  384. <a href="/david/2024/#tags" title="Liste de toutes les étiquettes 2024">tous ?</a>
  385. </p>
  386. </nav>
  387. <form action="/david/recherche/" method="get">
  388. <fieldset>
  389. <legend>Recherche</legend>
  390. <label for="input-search">Termes de votre recherche :</label>
  391. <input id="input-search" type="search" name="s" aria-describedby="indexation-infos" required>
  392. <input type="submit" value="Chercher">
  393. <p id="indexation-infos">
  394. <small>
  395. Seuls les contenus de ces 8 dernières années sont indexés.
  396. </small>
  397. </p>
  398. </fieldset>
  399. </form>
  400. <aside>
  401. <theme-toggle></theme-toggle>
  402. </aside>
  403. </article>
  404. <hr>
  405. <footer>
  406. <p>
  407. <a href="/david/" title="Aller à l’accueil">Accueil</a>
  408. <a href="/david/log/" title="Accès au flux RSS">Suivre</a>
  409. <a href="http://larlet.com"
  410. title="Go to my English profile"
  411. data-instant>Pro</a>
  412. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel">Email</a>
  413. <abbr title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340">Légal</abbr>
  414. </p>
  415. <template id="theme-selector">
  416. <form>
  417. <style type="text/css">
  418. fieldset div {
  419. text-align: center;
  420. }
  421. </style>
  422. <fieldset>
  423. <legend>Thème</legend>
  424. <div>
  425. <label>
  426. <input type="radio" value="auto" name="chosen-color-scheme" checked>
  427. Auto
  428. </label>
  429. <label>
  430. <input type="radio" value="dark" name="chosen-color-scheme">
  431. Foncé
  432. </label>
  433. <label>
  434. <input type="radio" value="light" name="chosen-color-scheme">
  435. Clair
  436. </label>
  437. </div>
  438. </fieldset>
  439. </form>
  440. </template>
  441. </footer>
  442. <script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
  443. <script>
  444. class ThemeToggle extends HTMLElement {
  445. constructor() {
  446. super()
  447. const themeSelectorTemplate = document.querySelector('#theme-selector')
  448. const form = themeSelectorTemplate.content.firstElementChild
  449. this.attachShadow({ mode: 'open' })
  450. this.shadowRoot.appendChild(form.cloneNode(true))
  451. }
  452. connectedCallback() {
  453. const form = this.shadowRoot.querySelector('form')
  454. form.addEventListener('change', (e) => {
  455. const chosenColorScheme = e.target.value
  456. localStorage.setItem('theme', chosenColorScheme)
  457. toggleTheme(chosenColorScheme)
  458. })
  459. const selectedTheme = localStorage.getItem('theme')
  460. if (selectedTheme && selectedTheme !== 'undefined') {
  461. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  462. }
  463. }
  464. }
  465. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  466. window.addEventListener('load', () => {
  467. let colorsLayer = undefined
  468. let hasDarkRules = false
  469. for (const styleSheet of Array.from(document.styleSheets)) {
  470. let mediaRules = []
  471. for (const layerRule of styleSheet.cssRules) {
  472. if (!(layerRule instanceof CSSLayerBlockRule)) {
  473. continue
  474. }
  475. if (layerRule.name === 'colors') {
  476. colorsLayer = layerRule
  477. }
  478. for (const cssRule of layerRule.cssRules) {
  479. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  480. continue
  481. }
  482. // WARNING: Safari does not have/supports `conditionText`.
  483. if (cssRule.conditionText) {
  484. if (cssRule.conditionText !== prefersColorSchemeDark) {
  485. continue
  486. }
  487. } else {
  488. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  489. continue
  490. }
  491. }
  492. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  493. }
  494. }
  495. // WARNING: do not try to insert a Rule to a styleSheet you are
  496. // currently iterating on, otherwise the browser will be stuck
  497. // in a infinite loop…
  498. for (const mediaRule of mediaRules) {
  499. // Safari requires the `0` second parameter (even if default).
  500. colorsLayer.insertRule(mediaRule.cssText, 0)
  501. hasDarkRules = true
  502. }
  503. }
  504. if (hasDarkRules) {
  505. if ('customElements' in window && !customElements.get('theme-toggle')) {
  506. customElements.define('theme-toggle', ThemeToggle)
  507. }
  508. }
  509. })
  510. </script>
  511. </body>
  512. </html>