diff --git a/drafts/au-commencement-etait-une-nouvelle-histoire-de-l-humanite-par-david-graeber-et-david-wengrow.md b/drafts/au-commencement-etait-une-nouvelle-histoire-de-l-humanite-par-david-graeber-et-david-wengrow.md new file mode 100644 index 0000000..0138b22 --- /dev/null +++ b/drafts/au-commencement-etait-une-nouvelle-histoire-de-l-humanite-par-david-graeber-et-david-wengrow.md @@ -0,0 +1,34 @@ +--- +title: "Au commencement était... : Une nouvelle histoire de l'humanité par David Graeber et David Wengrow" +categories: + - name: books +published_date: "2023-09-08" +template: page +--- + +## Notes + +### Chapitre 1 : l'adieu à l'enfance de l'humanité + +- _Homo sapiens_ a existé pendant au moins 200'000 ans, mais on ne saura jamais ce qu'il a vécu durant la majeure partie de cette période +- Rousseau v. Hobbes + - On essaie de puiser dans la préhistoire pour comprendre le monde actuel : est-ce que l'être humain est naturellement bon ou mauvais ? S'il est fondamentalement bon, est-ce qu'un événement a fait dérailler l'histoire ? + - Mauvaise question, puisque "bon" et "mauvais" ne sont pas des qualités intrinsèques, mais des jugements de valeur + - Réponse chrétienne : l'être humain est né bon, mais le péché originel l'a corrompu + - Réponse du second discours de Rousseau, 1754 : des petits groupes d'êtres humains vivaient en harmonie et en paix de chasse et de pêche, l'agriculture puis les villes et la société l'ont corrompu. C'était la naissance de la philosophie, l'écriture, la science, mais aussi de la patriarchie, les guerres, etc. + - Réponse alternative de Thomas Hobbes dans le Léviathan, 1651 : l'être humain est fondamentalement égoïste, et donc l'état de nature était l'inverse d'un âge d'or. Les humains y vivaient une existence "solitaire, misérable, dangereuse, animale et brève". Le rôle des états, la justice, la police est de réprimer cette nature pour vivre en paix + - Idée durable. Politique, police, politesse viennent de _polis_ en grec, la cité. En latin _civitas_ a donné civilité, civique, civilisation + - Rousseau v. Hobbes est la même distinction que dans [Crash Course: Big History ep. 6](https://youtu.be/UPggkvB9_dc?feature=shared&t=711) + - Le problème de Rousseau et Hobbes : (1) les deux théories sont fausses, (2) elles ont des terribles conséquences politiques et (3) donnent une image ennuyeuse du passé + - (1) La réalité n'est ni le bon sauvage ni l'état de nature d'Hobbes. Par exemple, on sait que les sociétés préagricoles n'étaient pas toutes des petits groupes égalitaires, mais qu'il y avait des formes très variées de fonctionnement ; que l'agriculture ne coïncide pas avec la naissance de la propriété privée et l'inégalité ; et que les premières villes ne fonctionnaient pas forcément avec une différence de classes. Plus dans la suite du livre + - (2) Hobbes : fait croire qu'on doit contrôler la population pour éviter les dérives vers sa nature. Rousseau : fait croire qu'il est impossible de retourner à l'état de nature, on doit se contenter de maintenant vivre dans un monde injuste et inégal. Le mot "inégalité" ne pousse pas à l'action, il est vague, on se contente de le calculer "à coups de coefficients de Gini". "Renverser le capitalisme" était une idée plus _actionable_. + - (3) Ennuyeux parce que binaire, le passé est beaucoup plus divers, expérimental et intéressant + - Généralement : "vision évolutionniste de l'histoire" +- Initialement le but du livre était de raconter l'histoire des inégalités. Mais : cela présume qu'il y a un moment où les inégalités ont _commencé_, ça laisse croire que c'est fait et qu'il est impossible de revenir en arrière. +- Rien ne laisse à croire que les petits groupes préagricoles étaient égalitaires ou, inversement, que les villes ou états doivent être organisés en royaumes ou bureaucraties. +- Intéressant ! Les auteurs critiquent des scientifiques qui disent que les chosent vont au mieux aujourd'hui, chiffres à la clé (espérance de vie, mortalité infantile etc.), je pense par exemple aux données de _Our World In Data_. Ils disent que ces chiffres ne corrèlent pas forcément au bonheur humain, qui est difficile à mesurer. Ils ignorent [les statistiques sur le sujet](https://ourworldindata.org/happiness-and-life-satisfaction) et disent qu'on a une façon de savoir si un mode de vie est préférable à un autre (ils pensent à un mode de vie tribal v. la société moderne) : demander aux individus. Or il semble que les individus questionnés préfèrent le mode de vie tribal. + - Exemple 1 : fille brésilienne enlevée par les Yanomamis à 11 ans. 20 ans plus tard, elle décide d'aller à la rencontre de sa famille biologique et du monde occidental, mais n'y trouve que tristesse et solitude. Elle choisit les Yanomamis + - Biaisé, non ? Elle est yanomami et le changement est souvent perçu comme négatif. Elle n'est pas neutre du tout, l'inverse st totalement envisageable + - Colons enlevés par des autochtones qui décident de rester parmi eux (pas d'exemple concret). On pense à Avatar + - Enfants de colons enlevés par des autochtones et qui, plus tard, mis en présence de leurs parents biologiques, se réfugient auprès de leurs parents adoptifs. Ça paraît normal, c'est de la psychologie humaine et pas une preuve que le mode de vie autochtone est supérieur... + - Amérindiens qui décident de retourner auprès des leurs après avoir essayé de s'intégrer. De nouveau, psychologie, appartenance... diff --git a/drafts/banques.md b/drafts/banques.md new file mode 100644 index 0000000..c614be1 --- /dev/null +++ b/drafts/banques.md @@ -0,0 +1,22 @@ +--- +title: "Banques" +categories: + - name: +published_date: "2024-07-03" +template: page +--- + +## La Banque Postale + +- j'aime + - environnementalement pas horrible + - branque trad donc des avantages p.ex. livret A, même si je comprends pas ce que c'est +- j'aime pas + - appli et interface web HORRIBLES + - "notifications" pour confirmer l'utilisation de Certicode + - pas de notifications pour les payements + - blocage de me carte à l'étranger et impossible de leur dire que je suis en voyage dans toute l'Asie, il faut spécifier les dates et pays (d'autres banques ne font pas ça) + - impossible de faire un versement tout de suite, il faut d'abord ajouter un bénéficiaire et attendre TROIS JOURS que ça soit approuvé + - communication IMPOSSIBLE, personne ne répond à part au tel + +## ... diff --git a/drafts/garden.md b/drafts/garden.md index 79007a7..c503238 100644 --- a/drafts/garden.md +++ b/drafts/garden.md @@ -12,8 +12,8 @@ template: page ## Don't break pages +- https://www.w3.org/Provider/Style/URI - https://jeffhuang.com/designed_to_last/ (to read) -- the one from Berners Lee ## Framework fatigue @@ -48,6 +48,9 @@ template: page - josh comeau's course! - testing CSS feature support: https://moderncss.dev/testing-feature-support-for-modern-css/ +- CSS resets + - https://www.joshwcomeau.com/css/custom-css-reset/ + - https://piccalil.li/blog/a-more-modern-css-reset/ ### HTML @@ -58,6 +61,10 @@ template: page - caching headers: https://simonhearne.com/2022/caching-header-best-practices/ +### Browsers + +- map Safari to WebKit versions (surprisingly difficult): https://github.com/mdn/browser-compat-data/blob/main/browsers/safari.json + ## Accessibility ### MVP is not an excuse @@ -70,6 +77,7 @@ template: page - names - https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ - some w3c thing??? +- intersection of performance and accessibility: https://noti.st/ericwbailey/Yfyaxa/slides (to read) ### Fun diff --git a/drafts/hosting-a-static-site.md b/drafts/hosting-a-static-site.md new file mode 100644 index 0000000..799dfe6 --- /dev/null +++ b/drafts/hosting-a-static-site.md @@ -0,0 +1,62 @@ +--- +title: "Hosting a static site" +categories: + - name: +published_date: "2024-05-30" +template: page +--- + +- not cloudflare anymore (ref to old post) +- want something more barebones, not free, on a shared server + - no vendor lock-in + - chance to learn about web servers + - no need for a CDN esp. when trying to reduce footprint +- for now, host images on host (one moving part fewer) +- Q: what about lambdas? these are useful for some things. Still Cloudflare? + +## Registrar + +Currently Gandi. Will move away from it (acquired) + +- big list here: https://european-alternatives.eu/category/domain-name-registrar +- tiny list here: https://github.com/pluja/awesome-privacy?tab=readme-ov-file#domain-registrar (including because the rest of this Awesome list is interesting) +- CH: Infomaniak +- EU: look at netim (FR), lots of others +- https://www.mythic-beasts.com/, Cambridge Uni + +## Hosting + +- https://shockhosting.net/ with several EU locations. Shared hosting starting at 2.24$/mo with unlimited storage, bandwidth AND mail (?!) + - would allow moving mail out of metral.ch and towards a full stack that I own (though that's not a goal in itself) + - would prefer for everything (incl. mail) to be hosted in the EU, is that possible? +- https://www.stablehost.com/ with several EU locations. Shared hosting starting at 1.5$/mo (0.9$/mo for first year), 5GB storage +- https://www.netim.com/en FR. 1 website (10GB), 10 email addresses (20GB), 1DB. 2EUR/mo +- To do: look at https://njal.la/, I like the messaging +- https://bunny.net, 100GO storage for 1EUR/mo +- https://www.hetzner.com/webhosting/, 2EUR/mo including a domain, a mailbox, 1 DB and 10GB storage (for files and mail). Also check the cloud services, bit more barebones + +## Object hosting + +For images e.g. for Eau de poisson (not an issue for this small website) + +- big list: https://european-alternatives.eu/category/object-storage-providers + - **Nope** [Exoscale](https://www.exoscale.com/object-storage/) (CH). Dismissed because I don't like the complicated pricing with egress fees etc + - [Scaleway](https://www.scaleway.com/en/object-storage/) (FR). Zones: Paris, Amsterdam, Warsaw. 1 zone = €0,0000165/GB/hour = ~€0,1188/mo for 10GB (tax excluded). Generous free tier for egress (75G/mo), then €0.01/Go (same as OVH). Total excluding tax = **€0.12/mo** (when egress < 75G/mo). Probably can host more objects. + - **Nope** [Fuga](https://fuga.cloud/services/s3-objectstorage/) (NL). Zones: Amsterdam. €0,055/GB/mo = ~€0.55/mo for 10GB. Egress €0,055 per GB/mo, cost for ops... complicated pricing and more expensive than Scaleway, dismissed + - **Nope** [Contabo](https://contabo.com/en/object-storage/) (DE). Zone: Worldwide. €2.49/month for 250 GB (tax excluded). Nice straightforward pricing, more expensive for smaller storage amounts, cheaper than Scaleway if nearing 250GB. Total excluding tax = **€2.49/mo**. Can host more objects. Dismissed, too expensive for now, maybe in the future when hosting more data (it should be easy to switch between S3-compliant providers!) + - [OVH](https://www.ovhcloud.com/en/public-cloud/object-storage/) (FR). Zones? €0,007/month/GB = €0,07/mo for 10GB (tax excluded). Cheapest when no public egress. Warning: public egress €0,01/Go—we currently serve 7Go/mo through eaudepoisson, so this would add €0.07. Total excluding tax = **€0.14/mo**. Probably can host more objects. + - [intercolo](https://intercolo.de/en/object-storage) (DE). Seems a bit MVPish. Anonymous access not allowed ([source](https://docs.intercolo.de/en/docs/object_storage/compatibility/#overview)), need to use intercolo's CDN service. **Emailed to ask questions about pricing** + - [Tebi](https://tebi.io/) (CY). Only object storage. Seems very MVP (don't trust it). Who hosts the files, Hetzner? Free tier of 25 GB of storage and 250 GB of traffic (good to start? If the API is S3-compatible it's easy to switch). Made an account and emailed with question about ACL (access control for objects) + - **Nope** [CleverCloud](https://www.clever-cloud.com/product/cellar-object-storage/) (FR). Zones: ?. €0,020/GB/mo = €0,2/mo. Expensive egress (€0,09/GB). Total excluding tax = **€0,83/mo**. Dismissed, more expensive and less reliable than competitors + - **Nope** [Ionos](https://cloud.ionos.fr/stockage/object-storage) (DE). Zones: ?. €0,007/Go/mo = 0,014/mo for 10Go (tax excluded) (same as OVH). Egress €0,030/Go when under 10To. Total excluding tax = **€0,224/mo**. Dismissed, more expensive than competitors (high egress) + - [Cloudflare R2](https://www.cloudflare.com/developer-platform/r2/) (US). Zones: worldwide. Free tier for storage (10GB) and operations (many). Beyond the free tier: $0,015/GB/mo = $0.15/mo for 10 GB. Total excluding tax = **€0,15/mo**. Good: it's Cloudflare (very easy to use R2 with Workers, current FAAS provider). Less good: it's Cloudflare (vendor lock-in, will be tough to switch, and I do want to switch eventually). I don't like that it's necessary to add a credit card to start using the service + +## FAAS (Lambda) hosting + +- one item on the list here: https://european-alternatives.eu/category/faas-function-as-a-service-providers + +## Code hosting + +- free hosted Gitea +- Codeberg (uses Forgejo) +- Sourcehut https://sourcehut.org/ (Q: where is it hosted?) diff --git a/drafts/les-choses-par-georges-perec.md b/drafts/les-choses-par-georges-perec.md new file mode 100644 index 0000000..769ec63 --- /dev/null +++ b/drafts/les-choses-par-georges-perec.md @@ -0,0 +1,10 @@ +--- +title: "Les choses par Georges Perec" +categories: + - name: books +published_date: "2023-11-29" +template: page +lang: "fr" +--- + +... diff --git a/drafts/paul-tbd.md b/drafts/paul-tbd.md new file mode 100644 index 0000000..8e3042f --- /dev/null +++ b/drafts/paul-tbd.md @@ -0,0 +1,7 @@ +--- +title: "Paul tbd" +categories: + - name: +published_date: "2023-12-07" +template: page +--- diff --git a/drafts/photos-workflow.md b/drafts/photos-workflow.md new file mode 100644 index 0000000..bcdb02e --- /dev/null +++ b/drafts/photos-workflow.md @@ -0,0 +1,63 @@ +--- +title: "photos-workflow" +categories: + - name: dev +published_date: "2024-05-26" +template: page +--- + +Just notes here + +Two kinds of photos: + +1. sorted photos for archiving +2. optimized photos for serving on the web + +## 1. sorted photos for archiving + +- high quality but not too high + - (should phone pics be slightly optimized before archiving?) +- easily accessible. Different levels: + - best (but most expensive in terms of $ and consumption): anywhere would require cloud storage + - better: on home network with some kid of NAS + - **good: on hard drive, with a photo viewing app** (incl thumbnails, albums, etc) to avoid having to go through a FS. WITH BACKUPS + - no access on phone. Fine for archives + - I like this one. Which photo viewing app and how to use it on multiple devices seamlessly? (two laptops) + - bad: on a hard drive without a backup + - bad: on Google Photos + +### 1b: on-the-road storage (when the hard drive is at home) + +- Nextcloud (easy upload, already using) + - optimize photos app with thumbnails? + - only worth it on very long trips, otherwise the viewing happens back home on local system + - improve viewing exp with memories app? (https://github.com/pulsejet/memories) + - only worth it on very long trips, otherwise the viewing happens back home on local system + - remote storage to avoid taking too much space on Alwaysdata? + - S3-compatible storage with no egress fees: + - reliable, cheap if using under 1TO: Digital Ocean Spaces, 5$/mo for 250 Go, https://www.digitalocean.com/products/spaces + - cheapest: iDrive e2, 30$/TO/year, https://www.idrive.com/s3-storage-e2/ + - cheap, reliable: BackBlaze, 6$/TO/mo, https://www.backblaze.com/cloud-storage/pricing + - Wasabi, 7$/TO/mo, https://wasabi.com/cloud-storage-pricing + - Impossible Cloud, 8$/TO/month, https://www.impossiblecloud.com/pricing + - Note: don't want to use these long-term (only while on the road) because + - commercial: pricing will change, there will be bad surprises + - cloud: not great with low/no connection + - To do: + - check small print of Digital Ocean, BackBlaze and iDrive to see what the real monthly cost would be for storing ~100Go as NextCloud remote storage with regular NextCloud usage (viewing photos etc.) + - find answer to this question: is remote storage really better for NextCloud storage? https://help.nextcloud.com/t/how-does-external-storage-work-local-caching-trash-storage-space/146456 + - is it better to have a single service for on-the-road hosting and web hosting? + +## 2. optimized web media storage + +Rough thoughts: + +- does it need to be in multiple locations? + - ideally yes. Truly, I don't think so (more resources, usually $ but also storage. Would rather have a single file server in use than many), better focus on optimizing aggressively +- store multiple photo sizes/formats + - ideally yes +- storage: look into costs for a few GB (currently 500MB with a single size and format) and 100GB (eventually) +- can the photos and the website be served from the same server? + - this would be ideal, moving away from Cloudflare and doing things more "manually". Need to look into hosts! +- what workflow for transforming and optimizing and uploading images? +- ... diff --git a/drafts/rss.md b/drafts/rss.md new file mode 100644 index 0000000..f8f972f --- /dev/null +++ b/drafts/rss.md @@ -0,0 +1,49 @@ +--- +title: "RSS" +categories: + - name: +published_date: "2024-05-14" +template: page +--- + +RSS + +- aggregator: fetches feeds, and keeps state of which posts are read or not (+optional: labels, favorite) + - should be web based, because mobile and desktop should be synced (if I read a post on my phone, I don't want my laptop to show it to me as unread) + - as a service: Feedly etc. Would like to avoid (subscription, bad interop, closed source) + - self-hosted: Tiny Tiny RSS, FreshRSS, miniflux, ... + - I don't want to use Omnivore, though it has good momentum right now: it already feels bloated and slow, I don't like the AI things (check: are there really any?), it's not designed to only be an aggregator but a full-fledged reading env. I have my own bookmarking solution (which I'm developing into a hughlighting solution as well). I see the feed as something separate: it feeds me posts, which I _might_ bookmark for later or which I might drop. It's noise and I'll try to pick signal from it, saving it to my bookmarks + - Easy to find hosted instances of self-hosted solutions. TTRSS feels older and more complex, and I'm not sure if it's supported by a lot of clients. FreshRSS feels pretty nice and has good docs on which clients can be used with it. Haven't tried miniflux (there's an offical, SAAS hosted instance with a free trial, but dev asks not to use disposable email addresses to actually try it, threw me off), also I don't think it's widely supported by clients (?), e.g. Readrops +- clients + - Android: Readrops. 3y old app. Dev is working on a V2. There might be others, but this one clearly has first-class support for FreshRSS + - Ubuntu: Newsflash. State of the art, active community, great + +## Others + +Imported OPML, all articles are marked unread. Is the read-unread status built into OPML? Or is that state handled by the aggregator and not interoperable? (e.g. what if I wanted to switch between FreshRSS and TTRSS, would all articles be marked unread again?). This is not really a problem for me, since I see the feed as more of an infinite feed thing + +How can I easily bookmark an article from the clients? They make it difficult to get to the article's link (there's always an "open in browser" button but loading this to then save in my bookmarking solution feels weird) + +Or should I bookmark only after reading sometimes? e.g. I read something in the client's reader (not on the web), like it, bookmark+archive it, or if I don't like it I don't bookmark at all? Why not but it would be better to use the reader in my bookmarking solution, so I can use highlighting there later on. Usually I think it's a matter of reading the very beginning of a post and seeing what's worth bookmarking + +ALSO some things aren't meant to be bookmarked! Videos. Releases that I might subscribe to. Social media. This kind of stuff. The feed will be pretty diverse (Q: is that a problem?), I should bookmark when I want to actively THINK about something, I guess + +## Tools (aggregators) + +- FreshRSS: https://github.com/FreshRSS/FreshRSS + - public instance: https://rss.hostux.net/ +- TTRSS: https://gitlab.tt-rss.org/tt-rss/tt-rss + - public instance: https://rss.g3l.org/ (cood: hosted by folks in Ardèche 07!) +- Omnivore: https://github.com/omnivore-app/omnivore + - new and shiny, but complex platform (seems to require Next.js on Vercel, GraphQL, GCP, a mailing tool etc.), plus will not be free anymore (https://docs.omnivore.app/about/pricing.html) and unlikely that others will host it for free in the future since it depends on a complex stack (see [domestication of users](https://seirdy.one/posts/2021/01/27/whatsapp-and-the-domestication-of-users/), this is a complex platform, OSS but not designed to be self hosted) ([people have been saying this since the early days of the tool](https://github.com/omnivore-app/omnivore/issues/25)). Compatible with third party apps that use the "standard" Google Reader API? https://github.com/omnivore-app/omnivore/issues/3984 + - official instance at https://omnivore.app/ +- proprietary (Feedly etc) + +## Tools (readers) + +- Gnome: https://gitlab.com/news-flash/news_flash_gtk +- + +## Others others + +Look at https://gitlab.gnome.org/World/read-it-later, client for Wallabag :eyes:, similar to our notes tool??? diff --git a/drafts/small-web.md b/drafts/small-web.md new file mode 100644 index 0000000..07119ac --- /dev/null +++ b/drafts/small-web.md @@ -0,0 +1,23 @@ +--- +title: "Small web" +categories: + - name: dev +published_date: "2024-06-04" +template: page +--- + +Directories: + +- https://indieblog.page/ +- https://ooh.directory/ +- https://blogroll.org/ + +Search engines: + +- https://kagi.com/smallweb/ +- https://search.marginalia.nu/ +- List here: https://seirdy.one/posts/2021/03/10/search-engines-with-own-indexes/#small-or-non-commercial-web + +Questions: + +- anything in French? diff --git a/drafts/static-site-generator.md b/drafts/static-site-generator.md new file mode 100644 index 0000000..94d6b1d --- /dev/null +++ b/drafts/static-site-generator.md @@ -0,0 +1,121 @@ +--- +title: "Static site generator" +categories: + - name: dev +published_date: "2024-05-27" +template: page +--- + +Goals: + +- simplify publishing workflow. The core of the static site is its content, not the site itself +- near-zero maintenance cost. I don't want to spend time reading release notes or doing migrations +- written in JS: a language that's familiar to people making websites. You already have node.js and npm set up, no need to get Rust here. The point is to make a small website, it'll build fast without taking on that complexity, and you can look under the hood! +- low maintenance cost of the tool itself: no need to depend on the generator, just fork and maintain your own + +Strategies: + +- the web platform got much better. We can ship reasonably modern CSS and JavaScript to users and it'll 'll run in most browsers without any need for transpiling/prefixing/etcing. +- keep it simple. Maybe we don't need to minify scripts, maybe we just keep scripts small instead. And that's one less dependency. I like the idea that the user is getting the code I'm writing, without middlemen. A benefit: we can edit in the browser! + +Non-goals: + +- support complex websites. This is for building small websites with a few templates and static pages. Anything is possible, but the developer will have to accept the burden of adding complexity (that's a feature, not a bug). The generator will not provide helpers or (shivers) a GraphQL layer to "improve" DX + +## Features + +Only what's absolutely necessary. + +Start from the end result, raw HTML and CSS and JS. Everything could be written by hand, but some aspects of this are tedious. Features are designed to make the website easier to work with and maintain over time. + +- Node.js and Rust! + - For JS developers who don't want Rust or who want to fork the Node.js version + - For science + - Rust perf pitfalls (2017, still relevant?): https://llogiq.github.io/2017/06/01/perf-pitfalls.html +- templating: I don't want to have to repeat the nav on every page. It's messy, and bug-prone when changing anything + - nested templating (see what I did there?): again to avoid duplication, it would be possible to nest templates in order to have e.g. a shell template with the head, nav, etc, and a post template with styles for articles, for example + - engines (JS): + - https://github.com/eta-dev/eta + - https://github.com/mde/ejs + - https://github.com/mozilla/nunjucks. Too big? + - https://github.com/janl/mustache.js + - https://github.com/handlebars-lang/handlebars.js. "Largely compatible with mustache" + - https://github.com/pugjs/pug. I don't like how it moves away from HTML + - https://github.com/harttle/liquidjs. Port of the [Ruby original](https://github.com/Shopify/liquid) (by Shopify) + - ES6 template literals + - this is what hydrogen uses: https://github.com/hydrogenjs/hydrogen + - too JS-centric? Would love it if the src folder could be built into a website using either a Node.js or a Rust engine. So would prefer HTML and Markdown files with frontmatter (yaml) over .js + - engines (RS): + - Crates by popularity: https://crates.io/search?q=template&sort=downloads + - https://github.com/rust-sailfish/sailfish. Inspired by EJS (compat?) + - https://github.com/nickel-org/rust-mustache. Port of handlebars + - https://github.com/cobalt-org/liquid-rust. Port of Liquid + - https://github.com/Keats/tera. Inspired by jinja2 (like Nunjucks. compat?) + - logic or logic-less? + - lots and lots of opinions + - https://www.boronine.com/2012/09/07/Cult-Of-Logic-less-Templates/ + - I feel that mustache in our case might work only because it's meant to use on small sites (otherwise I can see how context might blow up, if using a single one of them). Another benefit is the portability, though for small sites, a handful of tamplates could easily be ported. + - Still on the fence here +- markdown pipeline: writing HTML is tedious and hard to read. Markdown is almost an interoperable standard by now (you can write once in markdown on your website and then send as a newsletter on Buttondown, as a GitHub issue, as ...) + - QUESTION: for frontmatter, yaml (older, more common) or toml (new kid on the block, simpler)? TODO: benchmark! + - https://github.com/yaml/yaml-spec. YAML is complex! https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell + - Node.js parser: https://github.com/eemeli/yaml + - Rust parser: https://github.com/chyh1990/yaml-rust (and others?) + - https://github.com/toml-lang/toml: + - Node.js parser: there are several: https://github.com/BinaryMuse/toml-node (oldest, but [seems unmaintained](https://github.com/BinaryMuse/toml-node/issues/50), https://github.com/iarna/iarna-toml (SvelteKit switched to this from toml-node), https://github.com/squirrelchat/smol-toml (new) + - Ruse parser: https://github.com/toml-rs/toml + - QUESTION: custom markdown plugins? Or should this be the resp of users, aka should they fork and add the plugins they want? + - Personally I want footnotes, tables, TODO: which others?. But not everyone might + - QUESTION: should it be possible to write pages in HTML at all or should there always be a template with the markup and a markdown file with the content? + - In most cases I think the markup vs content thing works well + - What about pages with a more complex structure e.g. a page with three columns? + - Column text in frontmatter and md content holding the intro? (bit weird since frontmatter is usuall metadata, not meant for longer content) + - Column text hardcoded in template with md only holding the intro? (weird to split content between md and template files) + - What about pages that are custom build from another data source, e.g. from JSON (think my old Watching page)? + - ANSWER: HTML should probably still be allowed. And we still don't want to repeat templates, so it should be injected into the templating engine as well. So we have (Markdown ->) HTML with template vars -> HTML + - Does this mean that frontmatter is necessary for HTML pages? Otherwise, how can we e.g. get the page <\title> to work? + - make sure the markdown gets rendered when opening the VSCode preview! (beware images) Good writing and reading exp + - Node.js + - https://github.com/markdown-it/markdown-it. (TODO: CommonMark compat. Big.) + - simple project using markdown-it: https://github.com/joakin/markdown-folder-to-html. It also renames links from .md to .html so refs work locally + - plugins + - https://github.com/valeriangalliat/markdown-it-anchor: add permalinks to headings + - https://github.com/markedjs/marked. (TODO: Not 100% compat with CommonMark. Unsafe (np for me). Small and fast) + - https://github.com/jonschlinkert/remarkable. (Faster than marked according to README) + - https://github.com/rsms/markdown-wasm (based on md4c in C, warning has some extra features) + - https://github.com/micromark/micromark (Unified) + - https://github.com/remarkjs/remark (Unified, built on top of micromark, adding an AST) + - Rust + - Warning: compile time vs runtime. Sailfish is compile time, which makes it fast. In my case I think compile time is what I want (only need rust installed) + - Comparison: https://github.com/rosetta-rs/md-rosetta-rs + - https://github.com/pulldown-cmark/pulldown-cmark. Used by core Rust repos e.g. https://github.com/rust-lang/mdBook/ + - https://github.com/wooorm/markdown-rs. Port of micromark. Paid by Vercel ofc. + - ... + - Shell + - https://github.com/jgm/pandoc + - This is a cool script to generate a website from Markdown using pandoc: https://wstyler.ucsd.edu/files/lmimg/spcv.txt (blog post: https://wstyler.ucsd.edu/posts/pandoc_website.html) +- ~CSS compiling or script minification or other optional build step~: I don't think this is needed! (you're free to add your own extra build step) +- static dir + - gets copied over. Good for caching assets as immutable! + - but is it a better DX to colocate assets with posts? In this case a post would be an index.md in a dir with assets colocated. Support both! + - How does caching assets work with colocation? \*.jpg? +- RSS and Sitemap generation + - RSS should definitely be there. It's a core feature and not trivial to implement + - Sitemap: do research on whether it's actually useful for anyone other than search engines +- pagination for collections? + - see what Zola does: https://www.getzola.org/documentation/templates/pagination/ +- building search index? + - cool but not v1 + - Zola: https://www.getzola.org/documentation/content/search/ +- 404 page + - Challenge: depends on the server +- ~TOC gen like Zola does~: not right now, as not all posts would want a TOC (it's typically for long posts), and it can probably easily be automated with MD extensions (e.g. All In One) +- simple live reload (page by page)? + - Node.js: https://github.com/paulmillr/chokidar + - Or should this be maintained by the site maintainer? (this is what hydrogen does) + +To remove from brut: + +- pretty URLs (a mistake) +- TS in the generator (a mistake, TS is for complex code) +- ... diff --git a/drafts/telegram.md b/drafts/telegram.md new file mode 100644 index 0000000..44e4650 --- /dev/null +++ b/drafts/telegram.md @@ -0,0 +1,17 @@ +--- +title: "telegram" +categories: + - name: dev +published_date: "2024-04-30" +template: page +--- + +- created new bot using botfather +- created val +- saved bot token as val env var +- https://docs.val.town/integrations/telegram/ + +... + +- new attempt with Workers +- smooth