Comment j’ai été mis en vente sur le Web… à mon insu !
by Ploum.net (billets en français uniquement) 07 Dec '22
by Ploum.net (billets en français uniquement) 07 Dec '22
07 Dec '22
COMMENT J’AI ÉTÉ MIS EN VENTE SUR LE WEB… À MON INSU !
by Ploum on 2022-12-07
https://ploum.net/2022-12-07-comment-jai-ete-mis-en-vente.html
> Dans ce billet, je vous explique comment j’ai découvert qu’une société
de marketing propose mes services, mettant en avant une version
fantaisiste de ma biographie, sans que j’en aie été informé.
Mon recueil de nouvelles « Stagiaire au spatioport Oméga 3000 » s’ouvre
sur la génération d’un auteur artificiel adapté à vos goûts selon vos
données personnelles collectées.
Lorsque j’ai écrit cette introduction, j’étais persuadé que j’allais me
faire rattraper un jour ou l’autre par la réalité. Je n’imaginais pas
que ce serait avant même que le livre soit disponible dans les
librairies !
Et pour cause…
La découverte d’un conférencier homonyme
========================================
Après avoir publié un billet sur l’invasion des contenus générés par des
AI, j’allais faire directement l’expérience de devenir un conférencier
généré automatiquement !
Drowning in AI generated garbage
https://ploum.net/2022-12-05-drowning-in-ai-generated-garbage.gmi
Testant mon nouveau site, quelle ne fut pas ma surprise de trouver sur
la première page Google de la recherche « Lionel Dricot » un profil à
mon nom sur un site dont je n’avais jamais entendu parler.
Capture d’écran d’une recherche Google pour « Lionel Dricot »
https://ploum.net/files/google_sn.png
Un profil décrivant ma biographie avec moult détails, reprenant des
photos et vidéos de diverses conférences. J’étais intrigué. Sur
Mastodon, un lecteur me signala que le site était chez lui le premier
résultat Bing pour une recherche sur mon patronyme .
Capture d’écran d’une recherche Bing pour « Lionel Dricot »
https://ploum.net/files/bing_sn.png
Un site étrange, à l’apparence très professionnelle et qui se présente
comme une entreprise de « Celebrity Marketing ». Le simple fait que je
sois sur un site de Celebrity Marketing a fait pouffer mon épouse. Elle
a d’ailleurs remarqué que l’entreprise tire son nom de Simone Veil et
Nelson Mandela. Utiliser Simone Veil et Nelson Mandela pour faire du
« Celebrity Marketing », ça pose le niveau ! Ah ouais quand même…
Mon profil sur le site incriminé
https://ploum.net/files/profil_sn.png
Petite précision : je ne ferai pas de lien vers ce site, car c’est
explicitement interdit dans leurs conditions d’utilisation.
Conditions d’utilisation du site S&N interdisant de faire un lien vers
le site
https://ploum.net/files/cu1_sn.png
Pratiquement, que fait cette société ? C’est très simple : elle met en
contact des entreprises à la recherche de conférenciers et des
conférenciers. C’est un service assez courant, j’ai même été en contact
il y a quelques années avec une agence de ce genre. Souvent, ces agences
signent un contrat d’exclusivité : le conférencier est obligé de passer
par l’agence pour toutes les conférences qu’il donne. En échange,
l’agence lui trouve des conférences, fait sa promotion, le place voir
lui trouve un remplaçant en cas de forfait (j’ai moi-même effectué ce
genre de remplacements).
Sauf que dans le cas présent, je n’ai signé aucun contrat, je n’ai pas
donné mon accord ni même été vaguement informé ! Le site donne
l’impression que, pour me contacter, il faut absolument passer par eux.
Nous ne sommes plus dans la bêtise, mais dans la malhonnêteté
caractérisée.
Formulaire pour me contacter… via le site S&N !
https://ploum.net/files/contact_sn.png
Où je découvre des facettes ignorées de ma propre vie
=====================================================
La lecture de ma biographie est particulièrement intéressante, car, à
première vue, elle est tout à fait crédible. Une personne peu informée
n’y trouverait, à première vue, pas grand-chose à redire à part quelques
fautes d’orthographe (mon roman s’appelle « Printeurs », à la française,
pas « Printer » et j’ai du mal à imaginer qu’il puisse être perçu comme
un message d’espoir ! La scène du nouveau-né dans le vide-ordure n’était
assez explicite ?)
Mais une lecture attentive relève des aberrations. Ces aberrations ont
toutes une explication pour peu qu’on se mette à creuser. Ainsi j’aurais
écrit une nouvelle intitulée « Voulez-vous installer
Linux mademoiselle ? ». Comme l’a découvert un lecteur, cette phrase est
extraite d’une de mes nouvelles intitulées « Les non-humains », publiée
sur Linuxfr et Framasoft.
Les non-humains sur Framasoft
https://framablog.org/2009/05/18/les-non-humains-une-nouvelle-de-ploum/
J’ai également appris également que je suis cofondateur d’Ubuntu.
Excusez du peu ! C’est bien entendu faux. Je suis co-auteur du premier
livre publié sur Ubuntu, ce qui est très différent. Certaines phrases
semblent également sorties de leur contexte (pourquoi insister sur
l’obésité et la malnutrition ?) Enfin, le tout se termine par le
sublime :
> Lors de ses conférences, Ploum nous prédit un monde plus sain et doux.
Le ton général et les références font fortement penser à un texte généré
artificiellement. Du type : « Donne-moi une biographie de Lionel
Dricot », le tout en anglais suivi d’une traduction automatique. Il est
possible que ce soit ce qu’on appelle un « mechanical turk », un
travailleur sous-payé à qui on demande un travail que pourrait faire une
IA (très fréquent dans les chats de support). Mais cela aurait dû au
moins lui prendre une heure et j’ai du mal à imaginer qu’on paye une
heure de travail pour pondre ma biographie.
Que le texte soit ou non généré par une IA, cela ne change rien. Il
pourrait très bien l’être et est représentatif de ce que produisent et
produiront toujours les IAs : quelque chose qui a l’air correct, mais
est constellé de fautes difficilement détectables pour un non-
spécialiste (j’ai la chance d’être le plus grand spécialiste vivant de
ma propre biographie).
Comment réagir ?
================
À ce stade, je pourrais tout simplement envoyer un mail et exiger le
retrait de la page, l’histoire en resterait là. J’ai alerté une
connaissance qui est également sur ce site.
Mais ce serait trop facile. L’existence de ce profil pose plusieurs
problèmes.
Premièrement en se mettant en intermédiaire entre moi et des clients
potentiels sans mon accord et en donnant l’impression que je suis
affilié à cette entreprise. Cela pourrait sérieusement nuire à mon image
ou à mon business (si j’avais l’une ou l’autre).
Mais l’existence de ce genre de profil peut tordre la réalité de manière
encore plus insidieuse. Admettons qu’un wikipédien, affilié ou nom à
cette entreprise, se serve de ces infos pour créer une fiche Wikipédia à
mon nom. Cela semble parfaitement légitime vu que cette page semble
avoir été faite avec mon accord. Cette info pourrait être reprise
ailleurs. Soudainement, je deviendrais l’auteur d’une nouvelle que je
n’ai jamais écrite. De nombreux libristes informés s’affronteront pour
savoir si je suis oui ou non cofondateur d’Ubuntu. Déjà que je suis
devenu un écrivain français sur Babelio !
En envoyant un simple mail pour demander le retrait de cette page, je
légitime cette pratique business et me prépare à devoir surveiller en
permanence le web pour faire retirer les profils générés sans mon
accord.
Attaquer en justice une société dans un pays qui n’est pas le mien (car
Babelio se plante, pour info) ? Ô joies administratives en
perspectives ! (si vous êtes juriste spécialisé et intéressé, contactez-
moi)
Ou alors il me reste la solution de lutter avec mes armes à moi. De
faire le ploum et de vous raconter cette histoire de la manière la plus
transparente possible. Afin de vous mettre en garde sur le fait que tout
ce que vous lisez sur le web est désormais un gloubi-glouba qui a l’air
sérieux, qui a l’air correct, mais qui ne l’est pas. Toutes les
plateformes sont impactées. Tous les résultats des moteurs de recherche.
En rendant cette histoire publique, je sais que la société va réagir
avec « ouin-ouin je suis une entrepreneuse-je-ne-pensais-pas-à-mal-je-
le-ferai-plus » ou alors « c’est-le-stagiaire-qui-a-fait-une-erreur-on-
le-surveillera-mieux » voir « on-a-fait-ce-profil-avec-nos-petites-
mains-parcec-qu’on-admire-votre-travail-on-penserait-que-vous-seriez-
flatté ». Bref d’odieux mensonges hypocrites. C’est la base du métier du
marketing : mentir pour pourrir la vie des autres (et détruire la
planète).
Et si la malhonnêteté ne vous est pas encore flagrante, apprenez que la
société se targue de posséder la propriété intellectuelle des textes et
photos sur son site. Je pense que le photographe du TEDx Louvain-la-
Neuve serait ravi de l’apprendre… La plupart de ces images de moi ne
sont même pas sous licence libre !
Conditions d’utilisation du site S&N stipulant la propriété
intellectuelle des contenus
https://ploum.net/files/cu2_sn.png
Le futur du web…
================
Si cela n’était pas encore clair, je suis désormais la preuve vivante
que tout ce que pond le marketing est du mensonge. Ce qui est juste ne
l’est que par hasard. Et tout ce qui nous tombe sous les yeux est
désormais du marketing. Pour sortir de ce merdier, il va falloir trouver
des solutions (Bill Hicks en proposait une très convaincante…).
Bill Hicks on Marketing
https://invidious.esmailelbob.xyz/watch?v=tHEOGrkhDp0
Nous allons devoir reconstruire des cercles de confiance. Oublier nos
formations à reconnaître les « fake news » et considérer toute
information comme étant fausse par défaut. Identifier les personnes en
qui nous avons confiance et vérifier qu’un texte signé avec leur nom est
bien de leur plume. Ce n’est pas parce qu’il y’a un cadenas vert ou une
marque bleue à côté du pseudo que l’on peut faire confiance. C’est même
peut-être le contraire…
Bref, bienvenue dans un web de merde !
1
0
LA FIN D’UN BLOG ET LA DERNIÈRE VERSION DE PLOUM.NET
by Ploum on 2022-12-04
https://ploum.net/2022-12-04-fin-du-blog-et-derniere-version.html
> Avertissement : Ce billet est une rétrospective technique des
18 années de ce blog. Il contient des termes informatiques et traite de
la manière dont j’ai développé du code pour créer les pages que vous
lisez. N’hésitez pas à passer les paragraphes qui contiennent trop de
jargon.
La naissance d’un blog
======================
Je suis un précurseur visionnaire.
En 2004, sur les conseils de mon ami Bertrand qui avait constaté que
j’écrivais de longues tartines éparpillées aux quatre coins du web, je
finis par ouvrir un blog. J’étais au départ réticent, affirmant qu’un
blog n’était qu’un site web comme un autre, que la mode passerait vite.
Tout comme le podcast n’était jamais qu’un fichier MP3, que la mode
passerait tout autant. J’avais tenu un discours similaire en 97,
affirmant que le web n’était que du texte affiché à l’écran, que la mode
passerait. Juste avant de créer mon premier site. Un véritable
précurseur visionnaire vous dis-je.
Inspiré par le Standblog de Tristan Nitot (que je lisais et lis
toujours), j’installai le logiciel Dotclear sur le serveur de deux amis
et me mis à bloguer. Pour ne plus jamais arrêter. Que Bertrand, Tristan,
Anthony, Fabien et Valérie (qui nomma mon blog "Where is Ploum?") soient
ici mille fois remerciés.
En 2010, n’arrivant pas à trouver un thème Dotclear 2 qui me satisfasse,
je décidai de migrer temporairement vers Wordpress (et non pas vers
J2EE). Plateforme sur laquelle je suis resté depuis.
Ploum.net en J2EE (je précise qu’il s’agit d’une blague que seuls les
vieux geeks comprendront)
https://ploum.net/ploum-en-j2ee/index.gmi
La vie avec Wordpress n’est pas de tout repos : mises à jour fréquentes,
incompatibilités avec certains plug-ins, évolutions de plug-ins et de
thèmes, certains devenant payants, messages d’alertes pour des versions
PHP ou MySQL dépassées. Sans compter des pléthores de versions d’un
fichier htaccess à ne surtout pas toucher sous peine de tout casser, des
sauvegardes de bases de données à faire et oubliées dans un coin.
Cherchant un minimalisme numérique, Wordpress ne me convenait plus du
tout. Il ne correspondait plus non à ma philosophie. Malgré quelques
tentatives, je n’avais pas réussi à retirer tout le JavaScript ni
certaines fontes hébergées par Google sans casser mon thème. En 2018, je
me suis activement mis à chercher une alternative.
À cette époque, j’ai rencontré Matt, le fondateur de Write.as. J’ai
contribué au projet afin de le rendre open source (ce que Matt fera sous
le nom WriteFreely). Nous avons tenté de l’adapter à mes besoins.
Besoins que je décrivais dans un long document évolutif. En parallèle,
je testais tous les générateurs de sites statiques, les trouvant
complexes, n’arrivant pas à faire exactement ce que je voulais.
Je prétendais chercher du minimalisme et je reproduisais, sans le
vouloir, le syndrome du project manager J2EE dont je m’étais moqué.
Découvrant le protocole Gemini, je me suis rendu compte que c’était bel
et bien ce genre de minimalisme auquel j’aspirais. J’en étais convaincu
: mon Ploum.net nouvelle génération devrait également être sur Gemini.
Gemini, le protocole du slow web
https://ploum.net/gemini-le-protocole-du-slow-web/index.gmi
Mais loin de m’aider, cette certitude ne faisait qu’ajouter une
fonctionnalité à la liste déjà longue de ce que je voulais pour mon
blog. Je me perdais dans une quête d’un workflow idéal.
Après quelques mois, abandonnant l’idée de mettre mon blog sur Gemini,
je me décidai à ouvrir un Gemlog sur rawtext.club. Pour tester. Que
cmccabe soit ici publiquement remercié.
J’écrivais tous mes fichiers à la main dans Vim, je les envoyai ensuite
sur le serveur distant depuis mon terminal. Le tout sans le moindre
automatisme. J’y prenais énormément de plaisir. Alors que je pensais
juste tester la technologie, je me suis naturellement retrouvé à écrire
sur mon Gemlog, à réfléchir, à partager. Je retrouvais la naïveté
initiale de mon blog, la spontanéité.
Au fil des mois, j’introduisis néanmoins certaines automatisations.
Sauvegardes et envoi vers le serveur grâce à git. Un petit script pour
générer la page d’index. Les billets sur mon gemlog connaissaient un
certain succès et certains les partageaient sur le web grâce à un proxy
gemini−>web. Un comble !
Et c’est à ce moment-là que je compris que mon blog ne serait jamais sur
Gemini. Ce serait le contraire ! J’allais mettre mon gemlog sur le web.
Et importer près de 800 billets Wordpress dans mon Gemlog. Plus de
800.000 mots écrits en 18 années de blog. L’équivalent de 15 livres de
la taille de Printeurs.
Lire avant tout
===============
Depuis mon premier Dotclear, je jouais avec les thèmes, les plug-ins,
les artifices, les commentaires. Je ne m’étais jamais vraiment posé la
question de ce que j’attendais de mon blog.
Mon blog est, depuis ces années, un fil de vie, un élément essentiel de
mon identité. Mon blog me reflète, je suis qui je suis grâce à mon
blog. Il est une partie de mon intimité, de mon essence.
Qu’ai-je envie de faire de ma vie ? Écrire ! Mon blog doit donc me
faciliter le fait d’écrire et son pendant indissociable : être lu !
Être lu ne signifie pas être découvert, avoir des fans, des likes ou des
abonnés. Être lu signifie que chaque personne arrivant sur un article
sera considérée comme une lectrice et respectée comme telle. Pas
d’engagement, de métriques, d’invitation à découvrir d’autres articles.
Une lectrice a le droit de lire dans les meilleures conditions et de
passer ensuite à autre chose.
Au travail !
============
Pour la première fois, le chemin me semblait enfin clair. Je n’allais
pas tenter de trouver le logiciel parfait pour faire ce que je voulais.
Je n’allais pas planifier, tester, connecter des solutions différentes
en écumant le web. J’allais tout faire à la main, tout seul comme un
grand. Si j’arrivais à convertir mon blog Wordpress en fichiers gmi (le
format Gemini), il ne me restait qu’à écrire une petite routine pour
convertir le tout en HTML.
Un adage chez les programmeurs dit que tout programme complexe nait
parce que le programmeur pensait sincèrement que c’était facile. Mon
script ne fait pas exception à la règle. Il m’aura fallu plusieurs mois
pour peaufiner et arriver à un résultat acceptable. Devant me passer du
service Mailpoet intégré à Wordpress (service dont la licence m’était
fournie par un sympathique lecteur, qu’il soit ici remercié), je du me
résoudre à écrire ma propre gestion d’email pour pouvoir l’intégrer à un
service open source. Ce fut la partie la plus difficile (probablement
parce qu’en toute honnêteté, cela ne m’intéresse pas du tout). Si vous
voulez recevoir les billets par mail, il existe désormais deux mailing-
listes (si vous avez reçu ce billet par mail, vous êtes inscrit à la
première FR mais pas à celle en anglais EN, je vous laisse vous inscrire
si vous le souhaitez) :
2 mailings listes
https://listes.ploum.net/
Envoyez un mail à fr-join(a)listes.ploum.net pour recevoir les billets en
français
mailto:fr-join@listes.ploum.net
Pareil à en-join(a)listes.ploum.net pour recevoir les billets en anglais
mailto:en-join@listes.ploum.net
J’avoue être assez fier du résultat. Chaque billet que vous lisez est
désormais un simple fichier texte que j’écris et corrige avant de
publier en l’insérant dans le répertoire FR ou EN selon la langue. À
partir de là, le tout est envoyé par git sur le service sourcehut et un
script publish.py transforme mon texte en une page gmi, une page hmtl ou
un email. À l’exception des éventuelles images, chaque page est
complètement indépendante et ne fait appel à aucune ressource externe.
Même les 40 lignes de CSS (pas une de plus) sont incluses. Cela permet
des pages légères, rapides à charger même sur une mauvaise connexion,
compatibles avec absolument toutes les plateformes même les plus
anciennes, des pages que vous pouvez sauver, imprimer, envoyer sans
craindre de perdre des informations. Bref, des véritables pages web, un
concept devenu absurdement rare.
Les sources de ce blog sur Sourcehut
https://sr.ht/~lioploum/ploum.net/
La signification du minimalisme
===============================
En codant ce site, il m’est apparu que le minimalisme impliquait de
faire des sacrifices. D’abandonner certains besoins. La raison pour
laquelle je n’avais jamais été satisfait jusqu’à présent était mon
incapacité à abandonner ce que je pensais essentiel.
Les tags aident-ils la lecture ? Non, ils ont donc disparu. Les séries ?
J’étais convaincu d’en avoir besoin. J’ai commencé à les implémenter,
mais je n’ai pas été convaincu et j’ai mis ce travail de côté. La
recherche intégrée ? La fonctionnalité est certes utile, mais son
bénéfice ne couvre pas le coût de sa complexité. J’ai dû me faire
violence pour l’abandonner, mais, une fois convaincu, quel soulagement !
Pour remplacer la recherche, je dispose de deux armes : la première est
que la liste de tous mes billets est désormais disponible sur une simple
page. Si vous connaissez un mot du titre du billet que vous recherchez,
vous le trouverez avec un simple Ctrl+f dans votre navigateur.
La liste de tous mes billets depuis 2004
https://ploum.net/index_all.gmi
Pour la recherche plus profonde sur le contenu, mes billets étant
désormais de simples fichiers texte sur mon disque dur, la commande
"grep" me convient parfaitement. Et elle fonctionne même lorsque je suis
déconnecté.
Car l’aspect déconnecté est primordial. Ma déconnexion dans la première
moitié de 2022 m’a fait prendre conscience à quel point mon blog
Wordpress n’était plus en phase avec moi. Je ne pouvais plus le
consulter simplement, je ne pouvais plus y poster sans passer du temps
en ligne.
Mes lecteurs les plus techniques peuvent également me consulter offline
avec un simple "git clone/git pull".
La dernière version ?
=====================
Le titre de ce billet est volontairement racoleur (et si vous êtes
arrivé jusqu’ici, c’est que ça fonctionne), mais, oui, ce billet annonce
bel et bien la fin de mon blog sur le web tel qu’il a été durant 18 ans.
Désormais, vous ne lirez plus que mon Gemlog. Gemlog dans lequel j’ai
importé le contenu de mon ancien blog. Cette approche Gemini-first
implique des contraintes assez fortes, notamment celle de n’avoir qu’un
lien par ligne (ce qui rend certains de mes anciens billets truffés de
liens assez particuliers à lire, je le reconnais).
J’ai cependant pris grand soin de faire en sorte que les anciennes URLs
fonctionnent toujours. "Cool URLs never change". Si ce n’est pas le cas,
signalez-le-moi !
Une autre particularité de ce projet dont je suis fier est que tout mon
blog ne dépend désormais plus que de deux briques logicielles : git et
python, des composants fondamentaux sur lesquels je peux espérer me
baser jusqu’à la fin de ma vie. Le tout étant rédigé dans Vim et corrigé
par le couple Antidote/Grammalecte (le point le plus fragile de mon
système).
Ce qui me fait dire que ce site est peut-être bel et bien la dernière
version de ploum.net. Après Dotclear et Wordpress, je ne dépends
désormais plus de personne. Plus de mises à jour imposées, plus de
changements soudains d’interface, plus d’adaptation à des nouvelles
versions (à part un éventuel python 4 qui ne devrait pas poser de
problème vu que je n’utilise à dessein aucune bibliothèque externe).
J’évolue à mon rythme et en faisant exactement ce qui me plait, sans
dépendre d’une communauté ou d’un fournisseur.
Aurais-je été plus efficace avec un générateur de site web existant ?
Peut-être. Je n’en suis pas convaincu. J’aurais dû l’apprendre et me
plier à ses contraintes arbitraires. Pour ensuite tenter de l’adapter à
mes besoins. Même si cela avait été plus rapide sur le court terme, il
aurait été nécessaire de me plier aux nouvelles versions, d’espérer
qu’il soit maintenu, de m’intégrer dans la communauté et j’aurais
forcément fini par migrer vers une autre solution un moment ou un autre.
La philosophie du code
======================
Pour la première fois, mon blog exprime donc avec son code des valeurs
que je tente de mettre par écrit : la simplicité volontaire est
difficile, mais libère autant l’auteur que les lecteurs. Elle implique
une vision tournée vers un long terme qui se compte en décennies.
L’indépendance se conquiert en apprenant à maitriser des outils de base
plutôt qu’en tentant d’adopter la dernière mode.
En apportant les dernières touches au code qui génère ce qui n’est pour
vous qu’une page parmi tant d’autres, j’ai eu l’impression d’avoir
réduit la distance qui nous séparait. Les intermédiaires entre mon
clavier et votre intelligence ont été réduits au strict nécessaire.
Plutôt que des connexions à des interfaces impliquant des copier-coller,
des chargements de librairies JavaScript, j’écris désormais dans un
simple fichier texte.
Fichier texte qui s’affiche ensuite dans vos mails, votre lecteur RSS ou
votre nagivateur.
Cela parait trivial, simple. C’est pourtant l’essence du web. Une
essence qui est malheureusement beaucoup trop rare.
Merci de me lire, de me partager (pour certain·e·s depuis des années),
de partager mon intimité. Merci pour vos réactions, vos suggestions et
votre soutien. J’espère que cette version vous plaira.
Bonnes lectures et bons partages !
PS: Si vous relisez régulièrement certains anciens articles (plusieurs
personnes m’ont confié le faire), n’hésitez pas à vérifier que tout est
OK et me signaler tout problème éventuel. Comme tout logiciel, le
travail n’est jamais terminé. La version Wordpress restera disponible
sur le domaine ploum.eu pour quelques mois.
Ancienne version de ploum.net
https://ploum.eu
1
0
…ET AUTRES JOYEUSETÉS QUE NOUS RÉSERVE LE FUTUR
by Ploum on 2022-11-28
https://ploum.be/2022-11-28-et-autres-joyeusetes-que-nous-reserve-le-futur.…
Couverture de « Stagiaire au spatioport Omega 3000… et autres joyeusetés
que nous réserve le futur ».
https://ploum.be/files/stagiaire-au-spatioport-omega-3000.jpg
> Pourriez-vous devenir le premier Madame pipi mâle de la station
spatiale Omega 3000 ? Ou optimiser le rendement des mines de chocolat de
la Lune ? La vie privée étant abolie, percerez-vous l'identité secrète
de l'homme le plus riche du monde ? Comment lutter contre les monopoles
informatiques si, lassée de vous voir taper à la machine, votre famille
vous inscrit à une initiation aux ordinateurs ? Jouerez-vous un rôle
majeur dans le destin de la galaxie ou resterez-vous un figurant ?
Toutes les réponses à ces questions (et à bien d’autres) sont désormais
disponibles dans « Stagiaire au spatioport Omega3000 et autres
joyeusetés que nous réserve le futur », un recueil de nouvelles
désormais disponibles en ligne et dans toutes les librairies de Suisse.
Il arrivera dans celles de France et de Belgique en février 2023.
Ce qui est un peu tard pour les cadeaux de Noël/Newtonmass, raison pour
laquelle vous pouvez directement commander ce recueil chez l’éditeur.
Commander « Stagiaire au spatioport Omega 3000 et autres joyeusetés que
nous réserve le futur »
https://pvh-editions.com/shop/livres-imprimes/271-stagiaire-au-spatioport-o…
« Stagiaire au spatioport Omega 3000 » est une idée cadeau idéale, car,
contrairement à un roman, qu’on aime ou qu’on n’aime pas, le livre offre
ici 15 histoires très différentes. Certaines plus farfelues, d’autres
sérieuses. Des rigolotes, des absurdes ou des interpelantes voire tout
simplement poétiques. L’une évoque la problématique du genre dans le
cadre du space opera ( « Stagiaire au spatioport Omega 3000 »). D’autres
alertent sur l’emprise des monopoles informatiques ( « Le dernier espoir
»), la disparition de la vie privée en ligne ( « Le jour où la
transparence se fit » ) ou l’impact à très long terme de nos choix
technologiques ( « Les successeurs » ).
En (vous) offrant ce recueil, vous offrez donc des moments de plaisir,
de rire et de poésie, mais également, sans en avoir l’air, des pistes de
réflexion et des introductions à des sujets potentiellement difficiles
que vous, lecteurs de mon blog, vous connaissez probablement déjà.
Autour de la bûche de Noël, rien que le titre et la couleur de la
couverture devraient occuper une bonne partie de la soirée et détourner
un bon moment les conversations de la coupe du monde au Qatar, de la
crise économique et de la guerre en Ukraine. Avouez que, à ce prix là,
c’est donné !
Alors, plutôt que de parcourir les centres commerciaux surchauffés,
offrir 15 nouvelles est une idée de cadeau rapide, chic et pas cher !
Pour ceux dont la liste de lecture peut attendre février, commandez le
livre dès maintenant chez votre libraire. On ne se rend compte de
l’importance des librairies que lorsqu’on les perd, soutenez-les !
L’ISBN est 978-2-940609-29-1.
Fiche du livre sur Place des libraires
https://www.placedeslibraires.fr/livre/9782940609291-stagiaire-au-spatiopor…
Plus qu’un simple recueil…
==========================
Depuis ma plus tendre enfance, je dévore les recueils de nouvelles.
J’adore quand les nouvelles sont entrecoupées d’anecdotes par l’auteur.
Ce que fait Isaac Asimov avec un talent incroyable.
Lorsque Lionel, mon éditeur homonyme, m’a proposé de publier un recueil
de nouvelles, j’ai d’abord pensé à les rassembler de manière
traditionnelle, n’osant même pas tenter d’imiter le grand Asimov. Mon
épouse m’a convaincu d’écouter mon intuition et de faire ce recueil
avant tout pour moi, comme je voudrais le lire.
Donc acte. Chaque nouvelle est désormais accompagnée d’une petite note
où j’explique l’inspiration et le processus d’écriture derrière le
texte. Parfois, je digresse un peu sur les thèmes qui me sont chers.
Vous me connaissez, on ne se refait pas…
Le résultat est que loin d’être juste un assemblage de texte, ce recueil
est devenu une forme de mise à nu, un partage très intime entre
l’écrivain et chaque lect·eur·rice. Avec mon éditeur, nous avons pris la
décision d’inclure également quelques « erreurs de jeunesse ». Ce ne
sont pas mes meilleurs textes, mais rendre transparente mon évolution
personnelle est une manière d’illustrer mon travail et, je l’espère,
d’inspirer d’autres à apprécier leurs propres progrès. Pour tout avouer,
je n’ose pas me relire, je suis un peu gêné de ce que vous allez
découvrir de moi. Tout en étant très fier d’offrir un recueil qui est
bien plus que la somme des textes qui le composent.
Si vous lisez ce blog, ce recueil est ce qui s’en rapproche le plus au
format papier. Tout en étant bien plus amusant et gai à lire. Le
partager et le recommander est la plus belle manière de soutenir mon
travail.
Commander « Stagiaire au spatioport Omega 3000 et autres joyeusetés que
nous réserve le futur » (format papier)
https://pvh-editions.com/shop/livres-imprimes/271-stagiaire-au-spatioport-o…
Le recueil au format epub
https://pvh-editions.com/shop/collection-ludomire/276-epub-stagiaire-au-spa…
Je serai très heureux d’avoir vos avis, vos réactions, de lire vos
critiques sur vos blogs ou vos espaces en ligne respectifs. N’hésitez
pas à m’envoyer vos retours. Sur Mastodon, je vous propose d’utiliser le
hashtag #omega3000.
Et si vous avez découvert la surprise (qui est, si Wikipédia est exact,
une première mondiale), chut ! Ne la spoilez pas pour les autres…
1
0
Rendering the Web with Pictures in Your Terminal : more than you would like to know about HTML, ANSI and the philosophy of communication.
by Ploum.net (fr) 17 Nov '22
by Ploum.net (fr) 17 Nov '22
17 Nov '22
RENDERING THE WEB WITH PICTURES IN YOUR TERMINAL : MORE THAN YOU WOULD
LIKE TO KNOW ABOUT HTML, ANSI AND THE PHILOSOPHY OF COMMUNICATION.
by Ploum on 2022-03-24
https://ploum.be/2022-03-24-ansi_html.html
I’ve often been baffled by the productivity of Open Source developers.
But I may have found the secret. Having something else to do. As soon as
you need to do something urgently, something non-computer related,
programming open source seems really important.
So, in a new episode of "I should really have done something else with
my life", please welcome the "Offpunk got a new HTML rendering" story, a
long meditation on reading HTML and starting meaningful, philosophical
discussions.
Discovering ANSI Codes
======================
When I started using AV-98 as a Gemini client, I thought it was simple
because it simply displayed the Gemtext content on the screen, only
replacing URLs with numbers. I didn’t realise consciously that titles
had to be coloured. But how can you send colours to a terminal? Isn’t
that only white lines on black background ?
The answer is ANSI codes. ANSI codes are special characters that, when
passed to a terminal, change the "mode" of the terminal. If you type
"\e" followed by "[", the terminal understands it as the "Control
Sequence Indicator". You can then type different numbers (separated by
";") and end with "m". The different numbers correspond to different
modes. So typing "\e [1m" switch to bold and "\e [1;35m" (without the
space) switch to bold and magenta. You can close all opened modes with
"\e [0m".
It is limited to 8 background/foreground colours and a few other modes
like bold, faint, italic, underline, …
It’s all fun until you realise that those 8 colours can be customised
using another special code. So, in essence, your terminal can display
any Unicode character with any background and foreground colour. (Not
all terminals have the same colouring capabilities but, still…)
As I was discovering that through reading AV-98 code, I also wondered
how hard it would be to display HTML pages in what was already called
Offpunk. If I could display a gemtext page with blue title, how hard
would it be to display some HTML? I would only need to transform HTML
tags into ANSI codes. Right?
Why HTML is a Bad Way of Communicating
======================================
I hacked a first version displaying links in blue and, yes, it was
working! This had been surprisingly easy! But the more I kept trying
webpages, the more I realised how bad the situation was.
First of all, HTML is really hard to parse for a simple single reason:
space and return characters may act completely differently depending on
where they are in the page. In fact, except in <PRE>, one could say that
you could drop returns. Except that, sometimes, they should be
considered as a whitespace (if you don’t, some pages will
havetheirtextgarbledwithoutspace).
But that’s only when the HTML is good. Most of the time, it isn’t. My
initial HTML2ANSI routine started to grow organically to handle all the
cases I was finding. It was try and error: add a space there, reload,
see if it looks good, add another strip() there. No architecture, pure
random code.
When looking at the source code, I found myself multiple times pondering
if I should display what the people obviously intended to say or if
I should display what the HTML told. One very small but obvious example:
Wordpress websites using Jetpack have some of their picture duplicated.
The reason is that one of the pictures is behind a "lazyloading"
attribute while the other is in a "<noscript>" tag. Offpunk should
obviously display the "<noscript>" because it doesn’t do JS but also
displays the first one because it doesn’t parse the lazyloading CSS
attribute. I don’t see how I can correctly not display the picture
twice.
Tools are simply bad and produce awful HTML. If you are not convinced,
look at the source of a page generated by the pseudo-minimalist Medium.
When trying to parse HTML, it becomes obvious how we lost any meaning.
People wrote, tools transformed it in a meaningless mumbo jumbo and
I was trying to write a tool to find the original meaning back.
But tools are not the only ones to blame…
People are Bad at Writing
=========================
When I added support for bold and italic, something strange appeared.
I realised the test pages I’ve been using since the beginning were now
less readable. The text alone was good but people are somehow forced to
add many fancy stuff over it. It’s like they fear not being remarked.
Every HTML webpage looks like a child doing stupid stuff to attract his
parent’s attention.
Open a book. Open 10 books around you. Try to find how many instances of
bold sentences, varying styles and coloured words you have. Except in
some very modern technical books, there’s none. You can sometimes find
some italics to indicate a citation. It’s quite rare. I am, of course,
referring to books that were published before writers started to use
MS Word.
As Neal Stephenson said in "In the Beginnings was the command line",
bold was at first only used for the title. Then MS Word came without any
support for formal title/subtitle styling. The bold button was put
prominently and people were expected to make their titles manually. But
something else happened: people started to put bold and italics
everywhere. Because they could.
When reading through so many webpages, it struck me how all this styling
was looking like insecurity. Fear of not being read. Fear of not being
cool. Fear of being boring. Fear of losing your audience. And how much
better most of the texts were without any styling.
As I was reading "L’Âge des low-tech", by Philippe Bihouix, I came
across one of those insecurities. The author put the word "NEVER" in all
caps, probably hoping to make a point. It looks like the author felt
insecure about his argument, felt that it was weak and tried to
compensate. The point was something like "3D printing is not a solution
because true constructions like houses can NEVER be 3D printed". Which
is obviously false (or at least it should be explained why current
3D-printed buildings are not trully 3D-printed). Without the all cap, it
would have been an error in a book, something understandable. With the
all cap, the author lost a lot of credibility for many pages.
Any Mistake That Can Be Made…
=============================
So, in essence, people are using crappy tools that produce shitty code
and they are using it as badly as they can. We can safely say that any
error that can be done will be done.
The same is true for Gemini. Hopefully, Gemtext is so simple that
there’s no tool, reducing the error surface. Errors can only be done on
a line-by-line basis. Like that case when someone was speaking about a
hashtag and the hashtag appeared at the beginning on the line, turning
the line into a title.
But there’s one true error still possible with gemtext : Preformatted.
I’ve seen them all : people missing one preformatted line and thus
inverting formatted/preformatted, people not closing an opened
preformatted or, the worse : some gemlogs switching between
formatted/preformatted for each paragraph. The only explanation I found
was that it was looking cool in their test client. What if their client
was switching the background colour for preformatted? Then their posts
would render as a nice patchwork of colours.
This is a huge problem as Offpunk doesn’t wrap preformatted texts,
assuming they are some sort of ASCIIART. Those paragraphs were thus
displayed as a long non-wrapped line.
If a mistake can be made, it will be made.
About Wrapping
==============
It seems obvious when you are reading texts but, once a line is longer
than your screen, that line should be wrapped. The line should continue
on the next line. Wrapping is far from trivial if you don’t want to wrap
in the middle of words. You need to count characters then, once a
threshold has been reached, cut at the nearest word separation.
But remember what I told you about ANSI codes and colours. When you see
a coloured line on a terminal, there are some invisible characters. Many
of them. So the wrapping is confused and may wrap too soon.
If you have a Gemini title you want to be bold blue, the ANSI sequences
to open and close everything will amount to 12 characters. Your wrap
will be really short.
Not a huge problem until you start dealing with HTML lines where you can
have 4 or 5 links per line. You may start to wrap before displaying any
character at all!
ANSI modes should be conserved to the next line but I observed many
singularities and, from what I’ve seen, it is a good practice to close
all ANSI codes before the end of a line. That makes the wrap even
harder: you need to identify all opened ANSI sequences, close them and
reopen them on the next line.
That’s exactly the problem that python-ansiwrap is solving. And they did
quite a good job with it.
Displaying Images
=================
As I was reading webpages with Offpunk, I realised once that I was
really missing an important information. I loaded the page in Firefox
and, yes, a whole paragraph, a citation, was missing. What happened? It
took me the source code to realise that the citation was not a text but
a picture.
The easy solution to avoid such problem was to render pictures as links.
If you wanted to see a picture, you would simply follow the link and the
picture would be displayed in your picture viewer (feh, in my case).
But, quickly, I started to open all the pictures, curious to see what
they were. Most pictures on the web are useless. They serve to get a
sense of "feeling". Like bold and styling, they only serve to attract
attention to the content. I’m guilty as everyone. For years, I tried to
find a catchy picture for every article on my blog. This was reinforced
by the fact that a link without a picture has no chance to thrive on
Twitter nor Facebook. It even became some sort of artistic ritual to
pair a finished blog post with a totally unrelated picture.
As I discovered the console, more than 20 years ago, I started to play
with libcaca, which was transforming pictures into asciiart. I did a
little experiment but, on the small size of a website, a libcaca picture
does not help at all. It is fun but there’s no way you could recognise
anything.
At that point, the universe told be about Chafa. For the anecdote, I was
removing unused packages from my computer when I found one called
neofetch. I did a "apt-cache show neofetch" to see what it was and was
intrigued by a dependency called "chafa").
Remember that your terminal can display any Unicode character with a
custom foreground and background colour? Well, chafa uses that to
transform any picture into a configurable block of coloured text. What
is really interesting is that most pictures are recognisable. I also
found "timg", which is doing exactly the same as chafa albeit slower.
I thought it would be fun to have chafa rendering pictures in Offpunk
and tried it. It was just a proof of concept. But I was quickly
convinced. It was working so well that I could easily tell if a picture
was an important one I should open or a decorative one I could skip. In
a word, it was "useful". One more tool to extract information that
people are deliberately burying while trying to promote it.
A webpage with pictures rendered in Offpunk. Notice how you can
recognize that IMG 11 is a meme while IMG 15 is a screenshot.
https://ploum.be/files/offpunk_gtg06.png
With the 1.8 version, Chafa added support for a kind of "kitty-image-
protocol", something I don’t understand but which allows the Terminal
Kitty to display pixel-perfect pictures. Timg already had support for
that. Pixel perfect pictures cannot be integrated into text but this
meant that I could directly display pictures into Offpunk. And, yes, it
works when you access the picture directly.
Offpunk displaying a picture from a gemlog you should follow
https://ploum.be/files/frosty_bjorn.png
For best result, use Kitty terminal and Chafa 1.10. If you have an older
Chafa, also install Timg to have the best of both worlds.
Rewriting All From Scratch
==========================
All this hacked-together plate of spaghetti was working quite well but
was unmaintainable. The HTML rendering code was pure random guessing.
Ansiwrap sometimes gave very strange results and the performances were
horrible. A 40 characters wide line produced by chafa could contain up
to 1000 characters, which were parsed by ansiwrap.
When reading the Ansiwrap source code, I realised that one hard task was
to first identify ANSI codes in a text. Something I could avoid as I was
doing it myself.
So, in essence, I was making a text full of ANSI codes then wrapping it
with ansiwrap. Could I do it the other way?
I started a new renderer that would save the position of every future
ANSI code without inserting them. Then, I would wrap it, line by line,
inserting ANSI codes only after wrapping while being smart enough to
close them before the end of the line and reopening them.
Chafa pictures would be inserted without being wrapped at all.
This was not an easy task and I even added a BETA switch to keep the old
rendering engine while I was working on the new. But, quickly,
I realised it was doing a better job. Instead of transforming HTML to
ANSI, I was first trying to understand HTML then building a meaningful
representation. For example, newparagraph() and newline() are two
different functions because they have a different meaning. For the
anecdote, the first rendering engine was adding so many blank lines that
I needed to remove every block of more than three blank lines before
displaying the result.
So, starting with 1.2, Offpunk as a whole new rendering engine, also
used for Gemini, Gopher and RSS. Please test your favourite capsules and
websites and report any problems.
Download Offpunk
https://tildegit.org/ploum/AV-98-offline
Send me an email about Offpunk
mailto:offpunk@ploum.eu
Subscribe to the offpunk mailing list to discuss
mailto:~lioploum/offpunk-devel+subscribe@lists.sr.ht
Using the renderer without Offpunk
==================================
An HTML2ANSI renderer seems very useful and I’m wondering if I should
release it as a standalone tool. You can already test it quite easily
with the following python script within the same folder as Offpunk.
!/usr/bin/env python3
=====================
from offpunk import HtmlRenderer
f = open("index.html")
content = f.read()
f.close()
rend = HtmlRenderer(content,"www.test.com")
display the result in less
==========================
rend.display()
or put it in a variable
=======================
body = rend.get_body()
print(body)
Making the Web Readable
=======================
I’m proud to say that my first objectives have been met: removing any
dependency to python-ansiwrap, improving performance with pictures and
making the code more maintainable.
Outside of ansiwrap, Offpunk uses two libraries to parse the web: the
venerable BeautifulSoup 4 (python-bs4), which does an outstanding job of
parsing the HTML. Parsing is the act of transforming a text into an
usable computer representation. Rendering is the opposite : transforming
the computer representation into something an user can read/watch. The
best the parsing, the easiest the rendering.
The other is python-readability which removes unwanted cruft from an
HTML page. Python-readability transforms HTML into HTML but with less
thing. Most of the time, it works really well, allowing Offpunk to
display only the article that I want to read.
Sometimes, it removes too much. In that case, Offpunk allows bypassing
readability with the command "view full" (or "v full"). Starting with
1.2, you can bookmark a page and its mode, so you automatically switch
to "full" for some pages. This is done with a very naughty hack (adding
"##offpunk_mode=full" at the end of the URL and crossing fingers for no
URL having this string in their URL in real life).
Without python-readability, I could not have added web support to
Offpunk. It would have been discouraging. But now that I have an
improved HTML renderer, I’m starting to wonder if I could make python-
readability an optional dependency. Would it be useful for anyone not to
install python-readability?
There’s one good reason not to allow running Offpunk without python-
readability. With readability enabled, most webpages have between 0 and
20 or 30 links. When running "offpunk --sync", this means making that
many requests to prefetch contents and pictures.
But in "full" mode, most webpages have between 100 and 500 links. Most
of them completely useless, of course. Using Offpunk to surf the web
without readability might be a nightmare.
Starting a Discussion
=====================
I created my first website in 1998 and started my still active blog in
2004. For all those years, I was publishing to attract attention,
readership. I was looking for some "success". I got some. Published
books, was invited to give conferences, was offered jobs, was even twice
recognized by strangers because of my blog. But it was never enough. It
is still not enough. I don’t feel particularly successful.
For the last 20 years, I’ve tried to become a successful writer by doing
anything that could attract attention to my writing. In the last years,
I’ve been slowly evolving toward writing more, publishing less and doing
marketing even less.
By being forced to parse all the greasy cruft that others put around
their writing, I was forced to realise how I did (and might still do)
the same. How the appearance is detrimental to the content. Anyone
suggesting that gemtext should support colours should be forced to write
an ANSI parser first. Anyone suggesting that Gemtext formatting is not
enough to express correctly what they want to express should open an old
book. Most people are trying to work around the fact that writing is
hard. Really hard. They hope to share emotions and non-verbal clues
through emojis, colours, boldening. The problem is that, unlike the
written language, those expressions are not explicit. You don’t convey
what you want to convey, you make it less understandable. If you can’t
write without colours and emojis, it is probably because you don’t
really know what you want to say. That’s why writing is so hard. It is
hard but it pays off. When writing with only words, you not only
communicate better with others, you also communicate with your present
and future self.
« Ce qui se conçoit bien s’énonce clairement et les mots pour le dire
viennent aisément. » (Boileau)
I’m still astonished by the emptiness of most successful webpages once
displayed in Offpunk. Offpunk made the front page of Hackernews which
led me to break my disconnection temporarily because I was curious about
other links with more votes. They were shallow, empty and rarely had
more than 200 words. A search about Offpunk on Google that same day
revealed that the top pages were mostly computer remixes of the Offpunk
README. The web is full of automatic content trying to mimic what has
been successful. There were even two Youtube videos in the first Google
results. Both of which are computer reading of the README while the
website is displayed. The real Offpunk website was only on the second
page, demonstrating how the web is buried in shitty auto-generated
content and how bad the leading search engine is.
I did not receive more emails that day than when I post on this gemlog.
That success everybody is running after is fake, short-lived. It is not
even finished that you must already run for the next shot.
With Offpunk, I still can read people I like on the web. I follow their
RSS feeds. It makes me feel like I’m still on Gemini or Gopher. It’s
funny how, each time I find something deep and meaningful to read on the
web, it renders well in Offpunk. It feels a bit like meaning and
technical presentation are somehow connected.
I also like to write on Gemini because I know that it can’t be
successful. I can write long stuff like this one. It will be read by
people that find it interesting. Not many. Maybe none. But if you made
it until now, then it certainly had an impact on you. I’ve shared my
thoughts with you. You will, consciously or not, process them. You may
even one day produce something that will have been impacted by what
you’ve read today. I may read you later without knowing that.
This whole post has been influenced heavily by a lot of people in the
Gemini space. They made me think. You probably made me think. I’ve
evolved thanks to what I’ve read. Sometimes, when reading you, I wanted
to reply. But there was no short and easy way to reply. So my reply
either got lost, which means it was not important, or got carried with
my thinking and crystallised into this post or the following one.
We have started a long, slow and meaningful conversation. The kind of
conversation upon which every human breakthrough was conceived. Thank
you for participating in it.
This is just the beginning of our conversation.
1
0
Rendering the Web with Pictures in Your Terminal : more than you would like to know about HTML, ANSI and the philosophy of communication.
by ploum@mailfence.com 17 Nov '22
by ploum@mailfence.com 17 Nov '22
17 Nov '22
RENDERING THE WEB WITH PICTURES IN YOUR TERMINAL : MORE THAN YOU WOULD
LIKE TO KNOW ABOUT HTML, ANSI AND THE PHILOSOPHY OF COMMUNICATION.
by Ploum on 2022-03-24
https://ploum.be/2022-03-24-ansi_html.html
I’ve often been baffled by the productivity of Open Source developers.
But I may have found the secret. Having something else to do. As soon as
you need to do something urgently, something non-computer related,
programming open source seems really important.
So, in a new episode of "I should really have done something else with
my life", please welcome the "Offpunk got a new HTML rendering" story, a
long meditation on reading HTML and starting meaningful, philosophical
discussions.
Discovering ANSI Codes
======================
When I started using AV-98 as a Gemini client, I thought it was simple
because it simply displayed the Gemtext content on the screen, only
replacing URLs with numbers. I didn’t realise consciously that titles
had to be coloured. But how can you send colours to a terminal? Isn’t
that only white lines on black background ?
The answer is ANSI codes. ANSI codes are special characters that, when
passed to a terminal, change the "mode" of the terminal. If you type
"\e" followed by "[", the terminal understands it as the "Control
Sequence Indicator". You can then type different numbers (separated by
";") and end with "m". The different numbers correspond to different
modes. So typing "\e [1m" switch to bold and "\e [1;35m" (without the
space) switch to bold and magenta. You can close all opened modes with
"\e [0m".
It is limited to 8 background/foreground colours and a few other modes
like bold, faint, italic, underline, …
It’s all fun until you realise that those 8 colours can be customised
using another special code. So, in essence, your terminal can display
any Unicode character with any background and foreground colour. (Not
all terminals have the same colouring capabilities but, still…)
As I was discovering that through reading AV-98 code, I also wondered
how hard it would be to display HTML pages in what was already called
Offpunk. If I could display a gemtext page with blue title, how hard
would it be to display some HTML? I would only need to transform HTML
tags into ANSI codes. Right?
Why HTML is a Bad Way of Communicating
======================================
I hacked a first version displaying links in blue and, yes, it was
working! This had been surprisingly easy! But the more I kept trying
webpages, the more I realised how bad the situation was.
First of all, HTML is really hard to parse for a simple single reason:
space and return characters may act completely differently depending on
where they are in the page. In fact, except in <PRE>, one could say that
you could drop returns. Except that, sometimes, they should be
considered as a whitespace (if you don’t, some pages will
havetheirtextgarbledwithoutspace).
But that’s only when the HTML is good. Most of the time, it isn’t. My
initial HTML2ANSI routine started to grow organically to handle all the
cases I was finding. It was try and error: add a space there, reload,
see if it looks good, add another strip() there. No architecture, pure
random code.
When looking at the source code, I found myself multiple times pondering
if I should display what the people obviously intended to say or if
I should display what the HTML told. One very small but obvious example:
Wordpress websites using Jetpack have some of their picture duplicated.
The reason is that one of the pictures is behind a "lazyloading"
attribute while the other is in a "<noscript>" tag. Offpunk should
obviously display the "<noscript>" because it doesn’t do JS but also
displays the first one because it doesn’t parse the lazyloading CSS
attribute. I don’t see how I can correctly not display the picture
twice.
Tools are simply bad and produce awful HTML. If you are not convinced,
look at the source of a page generated by the pseudo-minimalist Medium.
When trying to parse HTML, it becomes obvious how we lost any meaning.
People wrote, tools transformed it in a meaningless mumbo jumbo and
I was trying to write a tool to find the original meaning back.
But tools are not the only ones to blame…
People are Bad at Writing
=========================
When I added support for bold and italic, something strange appeared.
I realised the test pages I’ve been using since the beginning were now
less readable. The text alone was good but people are somehow forced to
add many fancy stuff over it. It’s like they fear not being remarked.
Every HTML webpage looks like a child doing stupid stuff to attract his
parent’s attention.
Open a book. Open 10 books around you. Try to find how many instances of
bold sentences, varying styles and coloured words you have. Except in
some very modern technical books, there’s none. You can sometimes find
some italics to indicate a citation. It’s quite rare. I am, of course,
referring to books that were published before writers started to use
MS Word.
As Neal Stephenson said in "In the Beginnings was the command line",
bold was at first only used for the title. Then MS Word came without any
support for formal title/subtitle styling. The bold button was put
prominently and people were expected to make their titles manually. But
something else happened: people started to put bold and italics
everywhere. Because they could.
When reading through so many webpages, it struck me how all this styling
was looking like insecurity. Fear of not being read. Fear of not being
cool. Fear of being boring. Fear of losing your audience. And how much
better most of the texts were without any styling.
As I was reading "L’Âge des low-tech", by Philippe Bihouix, I came
across one of those insecurities. The author put the word "NEVER" in all
caps, probably hoping to make a point. It looks like the author felt
insecure about his argument, felt that it was weak and tried to
compensate. The point was something like "3D printing is not a solution
because true constructions like houses can NEVER be 3D printed". Which
is obviously false (or at least it should be explained why current
3D-printed buildings are not trully 3D-printed). Without the all cap, it
would have been an error in a book, something understandable. With the
all cap, the author lost a lot of credibility for many pages.
Any Mistake That Can Be Made…
=============================
So, in essence, people are using crappy tools that produce shitty code
and they are using it as badly as they can. We can safely say that any
error that can be done will be done.
The same is true for Gemini. Hopefully, Gemtext is so simple that
there’s no tool, reducing the error surface. Errors can only be done on
a line-by-line basis. Like that case when someone was speaking about a
hashtag and the hashtag appeared at the beginning on the line, turning
the line into a title.
But there’s one true error still possible with gemtext : Preformatted.
I’ve seen them all : people missing one preformatted line and thus
inverting formatted/preformatted, people not closing an opened
preformatted or, the worse : some gemlogs switching between
formatted/preformatted for each paragraph. The only explanation I found
was that it was looking cool in their test client. What if their client
was switching the background colour for preformatted? Then their posts
would render as a nice patchwork of colours.
This is a huge problem as Offpunk doesn’t wrap preformatted texts,
assuming they are some sort of ASCIIART. Those paragraphs were thus
displayed as a long non-wrapped line.
If a mistake can be made, it will be made.
About Wrapping
==============
It seems obvious when you are reading texts but, once a line is longer
than your screen, that line should be wrapped. The line should continue
on the next line. Wrapping is far from trivial if you don’t want to wrap
in the middle of words. You need to count characters then, once a
threshold has been reached, cut at the nearest word separation.
But remember what I told you about ANSI codes and colours. When you see
a coloured line on a terminal, there are some invisible characters. Many
of them. So the wrapping is confused and may wrap too soon.
If you have a Gemini title you want to be bold blue, the ANSI sequences
to open and close everything will amount to 12 characters. Your wrap
will be really short.
Not a huge problem until you start dealing with HTML lines where you can
have 4 or 5 links per line. You may start to wrap before displaying any
character at all!
ANSI modes should be conserved to the next line but I observed many
singularities and, from what I’ve seen, it is a good practice to close
all ANSI codes before the end of a line. That makes the wrap even
harder: you need to identify all opened ANSI sequences, close them and
reopen them on the next line.
That’s exactly the problem that python-ansiwrap is solving. And they did
quite a good job with it.
Displaying Images
=================
As I was reading webpages with Offpunk, I realised once that I was
really missing an important information. I loaded the page in Firefox
and, yes, a whole paragraph, a citation, was missing. What happened? It
took me the source code to realise that the citation was not a text but
a picture.
The easy solution to avoid such problem was to render pictures as links.
If you wanted to see a picture, you would simply follow the link and the
picture would be displayed in your picture viewer (feh, in my case).
But, quickly, I started to open all the pictures, curious to see what
they were. Most pictures on the web are useless. They serve to get a
sense of "feeling". Like bold and styling, they only serve to attract
attention to the content. I’m guilty as everyone. For years, I tried to
find a catchy picture for every article on my blog. This was reinforced
by the fact that a link without a picture has no chance to thrive on
Twitter nor Facebook. It even became some sort of artistic ritual to
pair a finished blog post with a totally unrelated picture.
As I discovered the console, more than 20 years ago, I started to play
with libcaca, which was transforming pictures into asciiart. I did a
little experiment but, on the small size of a website, a libcaca picture
does not help at all. It is fun but there’s no way you could recognise
anything.
At that point, the universe told be about Chafa. For the anecdote, I was
removing unused packages from my computer when I found one called
neofetch. I did a "apt-cache show neofetch" to see what it was and was
intrigued by a dependency called "chafa").
Remember that your terminal can display any Unicode character with a
custom foreground and background colour? Well, chafa uses that to
transform any picture into a configurable block of coloured text. What
is really interesting is that most pictures are recognisable. I also
found "timg", which is doing exactly the same as chafa albeit slower.
I thought it would be fun to have chafa rendering pictures in Offpunk
and tried it. It was just a proof of concept. But I was quickly
convinced. It was working so well that I could easily tell if a picture
was an important one I should open or a decorative one I could skip. In
a word, it was "useful". One more tool to extract information that
people are deliberately burying while trying to promote it.
A webpage with pictures rendered in Offpunk. Notice how you can
recognize that IMG 11 is a meme while IMG 15 is a screenshot.
https://ploum.be/files/offpunk_gtg06.png
With the 1.8 version, Chafa added support for a kind of "kitty-image-
protocol", something I don’t understand but which allows the Terminal
Kitty to display pixel-perfect pictures. Timg already had support for
that. Pixel perfect pictures cannot be integrated into text but this
meant that I could directly display pictures into Offpunk. And, yes, it
works when you access the picture directly.
Offpunk displaying a picture from a gemlog you should follow
https://ploum.be/files/frosty_bjorn.png
For best result, use Kitty terminal and Chafa 1.10. If you have an older
Chafa, also install Timg to have the best of both worlds.
Rewriting All From Scratch
==========================
All this hacked-together plate of spaghetti was working quite well but
was unmaintainable. The HTML rendering code was pure random guessing.
Ansiwrap sometimes gave very strange results and the performances were
horrible. A 40 characters wide line produced by chafa could contain up
to 1000 characters, which were parsed by ansiwrap.
When reading the Ansiwrap source code, I realised that one hard task was
to first identify ANSI codes in a text. Something I could avoid as I was
doing it myself.
So, in essence, I was making a text full of ANSI codes then wrapping it
with ansiwrap. Could I do it the other way?
I started a new renderer that would save the position of every future
ANSI code without inserting them. Then, I would wrap it, line by line,
inserting ANSI codes only after wrapping while being smart enough to
close them before the end of the line and reopening them.
Chafa pictures would be inserted without being wrapped at all.
This was not an easy task and I even added a BETA switch to keep the old
rendering engine while I was working on the new. But, quickly,
I realised it was doing a better job. Instead of transforming HTML to
ANSI, I was first trying to understand HTML then building a meaningful
representation. For example, newparagraph() and newline() are two
different functions because they have a different meaning. For the
anecdote, the first rendering engine was adding so many blank lines that
I needed to remove every block of more than three blank lines before
displaying the result.
So, starting with 1.2, Offpunk as a whole new rendering engine, also
used for Gemini, Gopher and RSS. Please test your favourite capsules and
websites and report any problems.
Download Offpunk
https://tildegit.org/ploum/AV-98-offline
Send me an email about Offpunk
mailto:offpunk@ploum.eu
Subscribe to the offpunk mailing list to discuss
mailto:~lioploum/offpunk-devel+subscribe@lists.sr.ht
Using the renderer without Offpunk
==================================
An HTML2ANSI renderer seems very useful and I’m wondering if I should
release it as a standalone tool. You can already test it quite easily
with the following python script within the same folder as Offpunk.
!/usr/bin/env python3
=====================
from offpunk import HtmlRenderer
f = open("index.html")
content = f.read()
f.close()
rend = HtmlRenderer(content,"www.test.com")
display the result in less
==========================
rend.display()
or put it in a variable
=======================
body = rend.get_body()
print(body)
Making the Web Readable
=======================
I’m proud to say that my first objectives have been met: removing any
dependency to python-ansiwrap, improving performance with pictures and
making the code more maintainable.
Outside of ansiwrap, Offpunk uses two libraries to parse the web: the
venerable BeautifulSoup 4 (python-bs4), which does an outstanding job of
parsing the HTML. Parsing is the act of transforming a text into an
usable computer representation. Rendering is the opposite : transforming
the computer representation into something an user can read/watch. The
best the parsing, the easiest the rendering.
The other is python-readability which removes unwanted cruft from an
HTML page. Python-readability transforms HTML into HTML but with less
thing. Most of the time, it works really well, allowing Offpunk to
display only the article that I want to read.
Sometimes, it removes too much. In that case, Offpunk allows bypassing
readability with the command "view full" (or "v full"). Starting with
1.2, you can bookmark a page and its mode, so you automatically switch
to "full" for some pages. This is done with a very naughty hack (adding
"##offpunk_mode=full" at the end of the URL and crossing fingers for no
URL having this string in their URL in real life).
Without python-readability, I could not have added web support to
Offpunk. It would have been discouraging. But now that I have an
improved HTML renderer, I’m starting to wonder if I could make python-
readability an optional dependency. Would it be useful for anyone not to
install python-readability?
There’s one good reason not to allow running Offpunk without python-
readability. With readability enabled, most webpages have between 0 and
20 or 30 links. When running "offpunk --sync", this means making that
many requests to prefetch contents and pictures.
But in "full" mode, most webpages have between 100 and 500 links. Most
of them completely useless, of course. Using Offpunk to surf the web
without readability might be a nightmare.
Starting a Discussion
=====================
I created my first website in 1998 and started my still active blog in
2004. For all those years, I was publishing to attract attention,
readership. I was looking for some "success". I got some. Published
books, was invited to give conferences, was offered jobs, was even twice
recognized by strangers because of my blog. But it was never enough. It
is still not enough. I don’t feel particularly successful.
For the last 20 years, I’ve tried to become a successful writer by doing
anything that could attract attention to my writing. In the last years,
I’ve been slowly evolving toward writing more, publishing less and doing
marketing even less.
By being forced to parse all the greasy cruft that others put around
their writing, I was forced to realise how I did (and might still do)
the same. How the appearance is detrimental to the content. Anyone
suggesting that gemtext should support colours should be forced to write
an ANSI parser first. Anyone suggesting that Gemtext formatting is not
enough to express correctly what they want to express should open an old
book. Most people are trying to work around the fact that writing is
hard. Really hard. They hope to share emotions and non-verbal clues
through emojis, colours, boldening. The problem is that, unlike the
written language, those expressions are not explicit. You don’t convey
what you want to convey, you make it less understandable. If you can’t
write without colours and emojis, it is probably because you don’t
really know what you want to say. That’s why writing is so hard. It is
hard but it pays off. When writing with only words, you not only
communicate better with others, you also communicate with your present
and future self.
« Ce qui se conçoit bien s’énonce clairement et les mots pour le dire
viennent aisément. » (Boileau)
I’m still astonished by the emptiness of most successful webpages once
displayed in Offpunk. Offpunk made the front page of Hackernews which
led me to break my disconnection temporarily because I was curious about
other links with more votes. They were shallow, empty and rarely had
more than 200 words. A search about Offpunk on Google that same day
revealed that the top pages were mostly computer remixes of the Offpunk
README. The web is full of automatic content trying to mimic what has
been successful. There were even two Youtube videos in the first Google
results. Both of which are computer reading of the README while the
website is displayed. The real Offpunk website was only on the second
page, demonstrating how the web is buried in shitty auto-generated
content and how bad the leading search engine is.
I did not receive more emails that day than when I post on this gemlog.
That success everybody is running after is fake, short-lived. It is not
even finished that you must already run for the next shot.
With Offpunk, I still can read people I like on the web. I follow their
RSS feeds. It makes me feel like I’m still on Gemini or Gopher. It’s
funny how, each time I find something deep and meaningful to read on the
web, it renders well in Offpunk. It feels a bit like meaning and
technical presentation are somehow connected.
I also like to write on Gemini because I know that it can’t be
successful. I can write long stuff like this one. It will be read by
people that find it interesting. Not many. Maybe none. But if you made
it until now, then it certainly had an impact on you. I’ve shared my
thoughts with you. You will, consciously or not, process them. You may
even one day produce something that will have been impacted by what
you’ve read today. I may read you later without knowing that.
This whole post has been influenced heavily by a lot of people in the
Gemini space. They made me think. You probably made me think. I’ve
evolved thanks to what I’ve read. Sometimes, when reading you, I wanted
to reply. But there was no short and easy way to reply. So my reply
either got lost, which means it was not important, or got carried with
my thinking and crystallised into this post or the following one.
We have started a long, slow and meaningful conversation. The kind of
conversation upon which every human breakthrough was conceived. Thank
you for participating in it.
This is just the beginning of our conversation.
1
0
Rendering the Web with Pictures in Your Terminal : more than you would like to know about HTML, ANSI and the philosophy of communication.
by ploum@mailfence.com 11 Nov '22
by ploum@mailfence.com 11 Nov '22
11 Nov '22
RENDERING THE WEB WITH PICTURES IN YOUR TERMINAL : MORE THAN YOU WOULD
LIKE TO KNOW ABOUT HTML, ANSI AND THE PHILOSOPHY OF COMMUNICATION.
by Ploum on 2022-03-24
https://ploum.be/2022-03-24-ansi_html.html
I’ve often been baffled by the productivity of Open Source developers.
But I may have found the secret. Having something else to do. As soon as
you need to do something urgently, something non-computer related,
programming open source seems really important.
So, in a new episode of "I should really have done something else with
my life", please welcome the "Offpunk got a new HTML rendering" story, a
long meditation on reading HTML and starting meaningful, philosophical
discussions.
Discovering ANSI Codes
======================
When I started using AV-98 as a Gemini client, I thought it was simple
because it simply displayed the Gemtext content on the screen, only
replacing URLs with numbers. I didn’t realise consciously that titles
had to be coloured. But how can you send colours to a terminal? Isn’t
that only white lines on black background ?
The answer is ANSI codes. ANSI codes are special characters that, when
passed to a terminal, change the "mode" of the terminal. If you type
"\e" followed by "[", the terminal understands it as the "Control
Sequence Indicator". You can then type different numbers (separated by
";") and end with "m". The different numbers correspond to different
modes. So typing "\e [1m" switch to bold and "\e [1;35m" (without the
space) switch to bold and magenta. You can close all opened modes with
"\e [0m".
It is limited to 8 background/foreground colours and a few other modes
like bold, faint, italic, underline, …
It’s all fun until you realise that those 8 colours can be customised
using another special code. So, in essence, your terminal can display
any Unicode character with any background and foreground colour. (Not
all terminals have the same colouring capabilities but, still…)
As I was discovering that through reading AV-98 code, I also wondered
how hard it would be to display HTML pages in what was already called
Offpunk. If I could display a gemtext page with blue title, how hard
would it be to display some HTML? I would only need to transform HTML
tags into ANSI codes. Right?
Why HTML is a Bad Way of Communicating
======================================
I hacked a first version displaying links in blue and, yes, it was
working! This had been surprisingly easy! But the more I kept trying
webpages, the more I realised how bad the situation was.
First of all, HTML is really hard to parse for a simple single reason:
space and return characters may act completely differently depending on
where they are in the page. In fact, except in <PRE>, one could say that
you could drop returns. Except that, sometimes, they should be
considered as a whitespace (if you don’t, some pages will
havetheirtextgarbledwithoutspace).
But that’s only when the HTML is good. Most of the time, it isn’t. My
initial HTML2ANSI routine started to grow organically to handle all the
cases I was finding. It was try and error: add a space there, reload,
see if it looks good, add another strip() there. No architecture, pure
random code.
When looking at the source code, I found myself multiple times pondering
if I should display what the people obviously intended to say or if
I should display what the HTML told. One very small but obvious example:
Wordpress websites using Jetpack have some of their picture duplicated.
The reason is that one of the pictures is behind a "lazyloading"
attribute while the other is in a "<noscript>" tag. Offpunk should
obviously display the "<noscript>" because it doesn’t do JS but also
displays the first one because it doesn’t parse the lazyloading CSS
attribute. I don’t see how I can correctly not display the picture
twice.
Tools are simply bad and produce awful HTML. If you are not convinced,
look at the source of a page generated by the pseudo-minimalist Medium.
When trying to parse HTML, it becomes obvious how we lost any meaning.
People wrote, tools transformed it in a meaningless mumbo jumbo and
I was trying to write a tool to find the original meaning back.
But tools are not the only ones to blame…
People are Bad at Writing
=========================
When I added support for bold and italic, something strange appeared.
I realised the test pages I’ve been using since the beginning were now
less readable. The text alone was good but people are somehow forced to
add many fancy stuff over it. It’s like they fear not being remarked.
Every HTML webpage looks like a child doing stupid stuff to attract his
parent’s attention.
Open a book. Open 10 books around you. Try to find how many instances of
bold sentences, varying styles and coloured words you have. Except in
some very modern technical books, there’s none. You can sometimes find
some italics to indicate a citation. It’s quite rare. I am, of course,
referring to books that were published before writers started to use
MS Word.
As Neal Stephenson said in "In the Beginnings was the command line",
bold was at first only used for the title. Then MS Word came without any
support for formal title/subtitle styling. The bold button was put
prominently and people were expected to make their titles manually. But
something else happened: people started to put bold and italics
everywhere. Because they could.
When reading through so many webpages, it struck me how all this styling
was looking like insecurity. Fear of not being read. Fear of not being
cool. Fear of being boring. Fear of losing your audience. And how much
better most of the texts were without any styling.
As I was reading "L’Âge des low-tech", by Philippe Bihouix, I came
across one of those insecurities. The author put the word "NEVER" in all
caps, probably hoping to make a point. It looks like the author felt
insecure about his argument, felt that it was weak and tried to
compensate. The point was something like "3D printing is not a solution
because true constructions like houses can NEVER be 3D printed". Which
is obviously false (or at least it should be explained why current
3D-printed buildings are not trully 3D-printed). Without the all cap, it
would have been an error in a book, something understandable. With the
all cap, the author lost a lot of credibility for many pages.
Any Mistake That Can Be Made…
=============================
So, in essence, people are using crappy tools that produce shitty code
and they are using it as badly as they can. We can safely say that any
error that can be done will be done.
The same is true for Gemini. Hopefully, Gemtext is so simple that
there’s no tool, reducing the error surface. Errors can only be done on
a line-by-line basis. Like that case when someone was speaking about a
hashtag and the hashtag appeared at the beginning on the line, turning
the line into a title.
But there’s one true error still possible with gemtext : Preformatted.
I’ve seen them all : people missing one preformatted line and thus
inverting formatted/preformatted, people not closing an opened
preformatted or, the worse : some gemlogs switching between
formatted/preformatted for each paragraph. The only explanation I found
was that it was looking cool in their test client. What if their client
was switching the background colour for preformatted? Then their posts
would render as a nice patchwork of colours.
This is a huge problem as Offpunk doesn’t wrap preformatted texts,
assuming they are some sort of ASCIIART. Those paragraphs were thus
displayed as a long non-wrapped line.
If a mistake can be made, it will be made.
About Wrapping
==============
It seems obvious when you are reading texts but, once a line is longer
than your screen, that line should be wrapped. The line should continue
on the next line. Wrapping is far from trivial if you don’t want to wrap
in the middle of words. You need to count characters then, once a
threshold has been reached, cut at the nearest word separation.
But remember what I told you about ANSI codes and colours. When you see
a coloured line on a terminal, there are some invisible characters. Many
of them. So the wrapping is confused and may wrap too soon.
If you have a Gemini title you want to be bold blue, the ANSI sequences
to open and close everything will amount to 12 characters. Your wrap
will be really short.
Not a huge problem until you start dealing with HTML lines where you can
have 4 or 5 links per line. You may start to wrap before displaying any
character at all!
ANSI modes should be conserved to the next line but I observed many
singularities and, from what I’ve seen, it is a good practice to close
all ANSI codes before the end of a line. That makes the wrap even
harder: you need to identify all opened ANSI sequences, close them and
reopen them on the next line.
That’s exactly the problem that python-ansiwrap is solving. And they did
quite a good job with it.
Displaying Images
=================
As I was reading webpages with Offpunk, I realised once that I was
really missing an important information. I loaded the page in Firefox
and, yes, a whole paragraph, a citation, was missing. What happened? It
took me the source code to realise that the citation was not a text but
a picture.
The easy solution to avoid such problem was to render pictures as links.
If you wanted to see a picture, you would simply follow the link and the
picture would be displayed in your picture viewer (feh, in my case).
But, quickly, I started to open all the pictures, curious to see what
they were. Most pictures on the web are useless. They serve to get a
sense of "feeling". Like bold and styling, they only serve to attract
attention to the content. I’m guilty as everyone. For years, I tried to
find a catchy picture for every article on my blog. This was reinforced
by the fact that a link without a picture has no chance to thrive on
Twitter nor Facebook. It even became some sort of artistic ritual to
pair a finished blog post with a totally unrelated picture.
As I discovered the console, more than 20 years ago, I started to play
with libcaca, which was transforming pictures into asciiart. I did a
little experiment but, on the small size of a website, a libcaca picture
does not help at all. It is fun but there’s no way you could recognise
anything.
At that point, the universe told be about Chafa. For the anecdote, I was
removing unused packages from my computer when I found one called
neofetch. I did a "apt-cache show neofetch" to see what it was and was
intrigued by a dependency called "chafa").
Remember that your terminal can display any Unicode character with a
custom foreground and background colour? Well, chafa uses that to
transform any picture into a configurable block of coloured text. What
is really interesting is that most pictures are recognisable. I also
found "timg", which is doing exactly the same as chafa albeit slower.
I thought it would be fun to have chafa rendering pictures in Offpunk
and tried it. It was just a proof of concept. But I was quickly
convinced. It was working so well that I could easily tell if a picture
was an important one I should open or a decorative one I could skip. In
a word, it was "useful". One more tool to extract information that
people are deliberately burying while trying to promote it.
A webpage with pictures rendered in Offpunk. Notice how you can
recognize that IMG 11 is a meme while IMG 15 is a screenshot.
https://ploum.be/files/offpunk_gtg06.png
With the 1.8 version, Chafa added support for a kind of "kitty-image-
protocol", something I don’t understand but which allows the Terminal
Kitty to display pixel-perfect pictures. Timg already had support for
that. Pixel perfect pictures cannot be integrated into text but this
meant that I could directly display pictures into Offpunk. And, yes, it
works when you access the picture directly.
Offpunk displaying a picture from a gemlog you should follow
https://ploum.be/files/frosty_bjorn.png
For best result, use Kitty terminal and Chafa 1.10. If you have an older
Chafa, also install Timg to have the best of both worlds.
Rewriting All From Scratch
==========================
All this hacked-together plate of spaghetti was working quite well but
was unmaintainable. The HTML rendering code was pure random guessing.
Ansiwrap sometimes gave very strange results and the performances were
horrible. A 40 characters wide line produced by chafa could contain up
to 1000 characters, which were parsed by ansiwrap.
When reading the Ansiwrap source code, I realised that one hard task was
to first identify ANSI codes in a text. Something I could avoid as I was
doing it myself.
So, in essence, I was making a text full of ANSI codes then wrapping it
with ansiwrap. Could I do it the other way?
I started a new renderer that would save the position of every future
ANSI code without inserting them. Then, I would wrap it, line by line,
inserting ANSI codes only after wrapping while being smart enough to
close them before the end of the line and reopening them.
Chafa pictures would be inserted without being wrapped at all.
This was not an easy task and I even added a BETA switch to keep the old
rendering engine while I was working on the new. But, quickly,
I realised it was doing a better job. Instead of transforming HTML to
ANSI, I was first trying to understand HTML then building a meaningful
representation. For example, newparagraph() and newline() are two
different functions because they have a different meaning. For the
anecdote, the first rendering engine was adding so many blank lines that
I needed to remove every block of more than three blank lines before
displaying the result.
So, starting with 1.2, Offpunk as a whole new rendering engine, also
used for Gemini, Gopher and RSS. Please test your favourite capsules and
websites and report any problems.
Download Offpunk
https://tildegit.org/ploum/AV-98-offline
Send me an email about Offpunk
mailto:offpunk@ploum.eu
Subscribe to the offpunk mailing list to discuss
mailto:~lioploum/offpunk-devel+subscribe@lists.sr.ht
Using the renderer without Offpunk
==================================
An HTML2ANSI renderer seems very useful and I’m wondering if I should
release it as a standalone tool. You can already test it quite easily
with the following python script within the same folder as Offpunk.
!/usr/bin/env python3
=====================
from offpunk import HtmlRenderer
f = open("index.html")
content = f.read()
f.close()
rend = HtmlRenderer(content,"www.test.com")
display the result in less
==========================
rend.display()
or put it in a variable
=======================
body = rend.get_body()
print(body)
Making the Web Readable
=======================
I’m proud to say that my first objectives have been met: removing any
dependency to python-ansiwrap, improving performance with pictures and
making the code more maintainable.
Outside of ansiwrap, Offpunk uses two libraries to parse the web: the
venerable BeautifulSoup 4 (python-bs4), which does an outstanding job of
parsing the HTML. Parsing is the act of transforming a text into an
usable computer representation. Rendering is the opposite : transforming
the computer representation into something an user can read/watch. The
best the parsing, the easiest the rendering.
The other is python-readability which removes unwanted cruft from an
HTML page. Python-readability transforms HTML into HTML but with less
thing. Most of the time, it works really well, allowing Offpunk to
display only the article that I want to read.
Sometimes, it removes too much. In that case, Offpunk allows bypassing
readability with the command "view full" (or "v full"). Starting with
1.2, you can bookmark a page and its mode, so you automatically switch
to "full" for some pages. This is done with a very naughty hack (adding
"##offpunk_mode=full" at the end of the URL and crossing fingers for no
URL having this string in their URL in real life).
Without python-readability, I could not have added web support to
Offpunk. It would have been discouraging. But now that I have an
improved HTML renderer, I’m starting to wonder if I could make python-
readability an optional dependency. Would it be useful for anyone not to
install python-readability?
There’s one good reason not to allow running Offpunk without python-
readability. With readability enabled, most webpages have between 0 and
20 or 30 links. When running "offpunk --sync", this means making that
many requests to prefetch contents and pictures.
But in "full" mode, most webpages have between 100 and 500 links. Most
of them completely useless, of course. Using Offpunk to surf the web
without readability might be a nightmare.
Starting a Discussion
=====================
I created my first website in 1998 and started my still active blog in
2004. For all those years, I was publishing to attract attention,
readership. I was looking for some "success". I got some. Published
books, was invited to give conferences, was offered jobs, was even twice
recognized by strangers because of my blog. But it was never enough. It
is still not enough. I don’t feel particularly successful.
For the last 20 years, I’ve tried to become a successful writer by doing
anything that could attract attention to my writing. In the last years,
I’ve been slowly evolving toward writing more, publishing less and doing
marketing even less.
By being forced to parse all the greasy cruft that others put around
their writing, I was forced to realise how I did (and might still do)
the same. How the appearance is detrimental to the content. Anyone
suggesting that gemtext should support colours should be forced to write
an ANSI parser first. Anyone suggesting that Gemtext formatting is not
enough to express correctly what they want to express should open an old
book. Most people are trying to work around the fact that writing is
hard. Really hard. They hope to share emotions and non-verbal clues
through emojis, colours, boldening. The problem is that, unlike the
written language, those expressions are not explicit. You don’t convey
what you want to convey, you make it less understandable. If you can’t
write without colours and emojis, it is probably because you don’t
really know what you want to say. That’s why writing is so hard. It is
hard but it pays off. When writing with only words, you not only
communicate better with others, you also communicate with your present
and future self.
« Ce qui se conçoit bien s’énonce clairement et les mots pour le dire
viennent aisément. » (Boileau)
I’m still astonished by the emptiness of most successful webpages once
displayed in Offpunk. Offpunk made the front page of Hackernews which
led me to break my disconnection temporarily because I was curious about
other links with more votes. They were shallow, empty and rarely had
more than 200 words. A search about Offpunk on Google that same day
revealed that the top pages were mostly computer remixes of the Offpunk
README. The web is full of automatic content trying to mimic what has
been successful. There were even two Youtube videos in the first Google
results. Both of which are computer reading of the README while the
website is displayed. The real Offpunk website was only on the second
page, demonstrating how the web is buried in shitty auto-generated
content and how bad the leading search engine is.
I did not receive more emails that day than when I post on this gemlog.
That success everybody is running after is fake, short-lived. It is not
even finished that you must already run for the next shot.
With Offpunk, I still can read people I like on the web. I follow their
RSS feeds. It makes me feel like I’m still on Gemini or Gopher. It’s
funny how, each time I find something deep and meaningful to read on the
web, it renders well in Offpunk. It feels a bit like meaning and
technical presentation are somehow connected.
I also like to write on Gemini because I know that it can’t be
successful. I can write long stuff like this one. It will be read by
people that find it interesting. Not many. Maybe none. But if you made
it until now, then it certainly had an impact on you. I’ve shared my
thoughts with you. You will, consciously or not, process them. You may
even one day produce something that will have been impacted by what
you’ve read today. I may read you later without knowing that.
This whole post has been influenced heavily by a lot of people in the
Gemini space. They made me think. You probably made me think. I’ve
evolved thanks to what I’ve read. Sometimes, when reading you, I wanted
to reply. But there was no short and easy way to reply. So my reply
either got lost, which means it was not important, or got carried with
my thinking and crystallised into this post or the following one.
We have started a long, slow and meaningful conversation. The kind of
conversation upon which every human breakthrough was conceived. Thank
you for participating in it.
This is just the beginning of our conversation.
1
0
Rendering the Web with Pictures in Your Terminal : more than you would like to know about HTML, ANSI and the philosophy of communication.
by ploum@mailfence.com 06 Nov '22
by ploum@mailfence.com 06 Nov '22
06 Nov '22
TEXT VERSION :
Rendering the Web with Pictures in Your Terminal : more than you
----------------------------------------------------------------
would like to know about HTML, ANSI and the philosophy of
---------------------------------------------------------
communication.
--------------
I’ve often been baffled by the productivity of Open Source
developers. But I may have found the secret. Having something else
to do. As soon as you need to do something urgently, something non-
computer related, programming open source seems really important.
So, in a new episode of "I should really have done something else
with my life", please welcome the "Offpunk got a new HTML rendering"
story, a long meditation on reading HTML and starting meaningful,
philosophical discussions.
Discovering ANSI Codes
----------------------
When I started using AV-98 as a Gemini client, I thought it was
simple because it simply displayed the Gemtext content on the
screen, only replacing URLs with numbers. I didn’t realise
consciously that titles had to be coloured. But how can you send
colours to a terminal? Isn’t that only white lines on black
background ?
The answer is ANSI codes. ANSI codes are special characters that,
when passed to a terminal, change the "mode" of the terminal. If you
type "\e" followed by "[", the terminal understands it as the
"Control Sequence Indicator". You can then type different numbers
(separated by ";") and end with "m". The different numbers
correspond to different modes. So typing "\e [1m" switch to bold and
"\e [1;35m" (without the space) switch to bold and magenta. You can
close all opened modes with "\e [0m".
It is limited to 8 background/foreground colours and a few other
modes like bold, faint, italic, underline, …
It’s all fun until you realise that those 8 colours can be
customised using another special code. So, in essence, your terminal
can display any Unicode character with any background and foreground
colour. (Not all terminals have the same colouring capabilities but,
still…)
As I was discovering that through reading AV-98 code, I also
wondered how hard it would be to display HTML pages in what was
already called Offpunk. If I could display a gemtext page with blue
title, how hard would it be to display some HTML? I would only need
to transform HTML tags into ANSI codes. Right?
Why HTML is a Bad Way of Communicating
--------------------------------------
I hacked a first version displaying links in blue and, yes, it was
working! This had been surprisingly easy! But the more I kept trying
webpages, the more I realised how bad the situation was.
First of all, HTML is really hard to parse for a simple single
reason: space and return characters may act completely differently
depending on where they are in the page. In fact, except in <PRE>,
one could say that you could drop returns. Except that, sometimes,
they should be considered as a whitespace (if you don’t, some pages
will havetheirtextgarbledwithoutspace).
But that’s only when the HTML is good. Most of the time, it isn’t.
My initial HTML2ANSI routine started to grow organically to handle
all the cases I was finding. It was try and error: add a space
there, reload, see if it looks good, add another strip() there. No
architecture, pure random code.
When looking at the source code, I found myself multiple times
pondering if I should display what the people obviously intended to
say or if I should display what the HTML told. One very small but
obvious example: Wordpress websites using Jetpack have some of their
picture duplicated. The reason is that one of the pictures is behind
a "lazyloading" attribute while the other is in a "<noscript>" tag.
Offpunk should obviously display the "<noscript>" because it doesn’t
do JS but also displays the first one because it doesn’t parse the
lazyloading CSS attribute. I don’t see how I can correctly not
display the picture twice.
Tools are simply bad and produce awful HTML. If you are not
convinced, look at the source of a page generated by the pseudo-
minimalist Medium. When trying to parse HTML, it becomes obvious how
we lost any meaning. People wrote, tools transformed it in a
meaningless mumbo jumbo and I was trying to write a tool to find the
original meaning back.
But tools are not the only ones to blame…
People are Bad at Writing
-------------------------
When I added support for bold and italic, something strange
appeared. I realised the test pages I’ve been using since the
beginning were now less readable. The text alone was good but people
are somehow forced to add many fancy stuff over it. It’s like they
fear not being remarked. Every HTML webpage looks like a child doing
stupid stuff to attract his parent’s attention.
Open a book. Open 10 books around you. Try to find how many
instances of bold sentences, varying styles and coloured words you
have. Except in some very modern technical books, there’s none. You
can sometimes find some italics to indicate a citation. It’s quite
rare. I am, of course, referring to books that were published before
writers started to use MS Word.
As Neal Stephenson said in "In the Beginnings was the command line",
bold was at first only used for the title. Then MS Word came without
any support for formal title/subtitle styling. The bold button was
put prominently and people were expected to make their titles
manually. But something else happened: people started to put bold
and italics everywhere. Because they could.
When reading through so many webpages, it struck me how all this
styling was looking like insecurity. Fear of not being read. Fear of
not being cool. Fear of being boring. Fear of losing your audience.
And how much better most of the texts were without any styling.
As I was reading "L’Âge des low-tech", by Philippe Bihouix, I came
across one of those insecurities. The author put the word "NEVER" in
all caps, probably hoping to make a point. It looks like the author
felt insecure about his argument, felt that it was weak and tried to
compensate. The point was something like "3D printing is not a
solution because true constructions like houses can NEVER be 3D
printed". Which is obviously false (or at least it should be
explained why current 3D-printed buildings are not trully
3D-printed). Without the all cap, it would have been an error in a
book, something understandable. With the all cap, the author lost a
lot of credibility for many pages.
Any Mistake That Can Be Made…
-----------------------------
So, in essence, people are using crappy tools that produce shitty
code and they are using it as badly as they can. We can safely say
that any error that can be done will be done.
The same is true for Gemini. Hopefully, Gemtext is so simple that
there’s no tool, reducing the error surface. Errors can only be done
on a line-by-line basis. Like that case when someone was speaking
about a hashtag and the hashtag appeared at the beginning on the
line, turning the line into a title.
But there’s one true error still possible with gemtext
: Preformatted.
I’ve seen them all : people missing one preformatted line and thus
inverting formatted/preformatted, people not closing an opened
preformatted or, the worse : some gemlogs switching between
formatted/preformatted for each paragraph. The only explanation I
found was that it was looking cool in their test client. What if
their client was switching the background colour for preformatted?
Then their posts would render as a nice patchwork of colours.
This is a huge problem as Offpunk doesn’t wrap preformatted texts,
assuming they are some sort of ASCIIART. Those paragraphs were thus
displayed as a long non-wrapped line.
If a mistake can be made, it will be made.
About Wrapping
--------------
It seems obvious when you are reading texts but, once a line is
longer than your screen, that line should be wrapped. The line
should continue on the next line. Wrapping is far from trivial if
you don’t want to wrap in the middle of words. You need to count
characters then, once a threshold has been reached, cut at the
nearest word separation.
But remember what I told you about ANSI codes and colours. When you
see a coloured line on a terminal, there are some invisible
characters. Many of them. So the wrapping is confused and may wrap
too soon.
If you have a Gemini title you want to be bold blue, the ANSI
sequences to open and close everything will amount to 12 characters.
Your wrap will be really short.
Not a huge problem until you start dealing with HTML lines where you
can have 4 or 5 links per line. You may start to wrap before
displaying any character at all!
ANSI modes should be conserved to the next line but I observed many
singularities and, from what I’ve seen, it is a good practice to
close all ANSI codes before the end of a line. That makes the wrap
even harder: you need to identify all opened ANSI sequences, close
them and reopen them on the next line.
That’s exactly the problem that python-ansiwrap is solving. And they
did quite a good job with it.
Displaying Images
-----------------
As I was reading webpages with Offpunk, I realised once that I was
really missing an important information. I loaded the page in
Firefox and, yes, a whole paragraph, a citation, was missing. What
happened? It took me the source code to realise that the citation
was not a text but a picture.
The easy solution to avoid such problem was to render pictures as
links. If you wanted to see a picture, you would simply follow the
link and the picture would be displayed in your picture viewer (feh,
in my case).
But, quickly, I started to open all the pictures, curious to see
what they were. Most pictures on the web are useless. They serve to
get a sense of "feeling". Like bold and styling, they only serve to
attract attention to the content. I’m guilty as everyone. For years,
I tried to find a catchy picture for every article on my blog. This
was reinforced by the fact that a link without a picture has no
chance to thrive on Twitter nor Facebook. It even became some sort
of artistic ritual to pair a finished blog post with a totally
unrelated picture.
As I discovered the console, more than 20 years ago, I started to
play with libcaca, which was transforming pictures into asciiart. I
did a little experiment but, on the small size of a website, a
libcaca picture does not help at all. It is fun but there’s no way
you could recognise anything.
At that point, the universe told be about Chafa. For the anecdote, I
was removing unused packages from my computer when I found one
called neofetch. I did a "apt-cache show neofetch" to see what it
was and was intrigued by a dependency called "chafa").
Remember that your terminal can display any Unicode character with a
custom foreground and background colour? Well, chafa uses that to
transform any picture into a configurable block of coloured text.
What is really interesting is that most pictures are recognisable. I
also found "timg", which is doing exactly the same as chafa albeit
slower.
I thought it would be fun to have chafa rendering pictures in
Offpunk and tried it. It was just a proof of concept. But I was
quickly convinced. It was working so well that I could easily tell
if a picture was an important one I should open or a decorative one
I could skip. In a word, it was "useful". One more tool to extract
information that people are deliberately burying while trying to
promote it.
=> files/offpunk_gtg06.png A webpage with pictures rendered in
Offpunk. Notice how you can recognize that IMG 11 is a meme while
IMG 15 is a screenshot.
With the 1.8 version, Chafa added support for a kind of "kitty-
image-protocol", something I don’t understand but which allows the
Terminal Kitty to display pixel-perfect pictures. Timg already had
support for that. Pixel perfect pictures cannot be integrated into
text but this meant that I could directly display pictures into
Offpunk. And, yes, it works when you access the picture directly.
=> files/frosty_bjorn.png Offpunk displaying a picture from a gemlog
you should follow
For best result, use Kitty terminal and Chafa 1.10. If you have an
older Chafa, also install Timg to have the best of both worlds.
Rewriting All From Scratch
--------------------------
All this hacked-together plate of spaghetti was working quite well
but was unmaintainable. The HTML rendering code was pure random
guessing. Ansiwrap sometimes gave very strange results and the
performances were horrible. A 40 characters wide line produced by
chafa could contain up to 1000 characters, which were parsed by
ansiwrap.
When reading the Ansiwrap source code, I realised that one hard task
was to first identify ANSI codes in a text. Something I could avoid
as I was doing it myself.
So, in essence, I was making a text full of ANSI codes then wrapping
it with ansiwrap. Could I do it the other way?
I started a new renderer that would save the position of every
future ANSI code without inserting them. Then, I would wrap it, line
by line, inserting ANSI codes only after wrapping while being smart
enough to close them before the end of the line and reopening them.
Chafa pictures would be inserted without being wrapped at all.
This was not an easy task and I even added a BETA switch to keep the
old rendering engine while I was working on the new. But, quickly,
I realised it was doing a better job. Instead of transforming HTML
to ANSI, I was first trying to understand HTML then building a
meaningful representation. For example, newparagraph() and newline()
are two different functions because they have a different meaning.
For the anecdote, the first rendering engine was adding so many
blank lines that I needed to remove every block of more than three
blank lines before displaying the result.
So, starting with 1.2, Offpunk as a whole new rendering engine, also
used for Gemini, Gopher and RSS. Please test your favourite capsules
and websites and report any problems.
=> https://tildegit.org/ploum/AV-98-offline Download Offpunk
=> mailto:offpunk@ploum.eu Send me an email about Offpunk
=> mailto:~lioploum/offpunk-devel+subscribe@lists.sr.ht Subscribe to
the offpunk mailing list to discuss
Using the renderer without Offpunk
----------------------------------
An HTML2ANSI renderer seems very useful and I’m wondering if I
should release it as a standalone tool. You can already test it
quite easily with the following python script within the same folder
as Offpunk.
```
!/usr/bin/env python3
---------------------
from offpunk import HtmlRenderer
f = open("index.html")
content = f.read()
f.close()
rend = HtmlRenderer(content,"www.test.com")
display the result in less
--------------------------
rend.display()
or put it in a variable
-----------------------
body = rend.get_body()
print(body)
```
Making the Web Readable
-----------------------
I’m proud to say that my first objectives have been met: removing
any dependency to python-ansiwrap, improving performance with
pictures and making the code more maintainable.
Outside of ansiwrap, Offpunk uses two libraries to parse the web:
the venerable BeautifulSoup 4 (python-bs4), which does an
outstanding job of parsing the HTML. Parsing is the act of
transforming a text into an usable computer representation.
Rendering is the opposite : transforming the computer representation
into something an user can read/watch. The best the parsing, the
easiest the rendering.
The other is python-readability which removes unwanted cruft from an
HTML page. Python-readability transforms HTML into HTML but with
less thing. Most of the time, it works really well, allowing Offpunk
to display only the article that I want to read.
Sometimes, it removes too much. In that case, Offpunk allows
bypassing readability with the command "view full" (or "v full").
Starting with 1.2, you can bookmark a page and its mode, so you
automatically switch to "full" for some pages. This is done with a
very naughty hack (adding "##offpunk_mode=full" at the end of the
URL and crossing fingers for no URL having this string in their URL
in real life).
Without python-readability, I could not have added web support to
Offpunk. It would have been discouraging. But now that I have an
improved HTML renderer, I’m starting to wonder if I could make
python-readability an optional dependency. Would it be useful for
anyone not to install python-readability?
There’s one good reason not to allow running Offpunk without python-
readability. With readability enabled, most webpages have between 0
and 20 or 30 links. When running "offpunk --sync", this means making
that many requests to prefetch contents and pictures.
But in "full" mode, most webpages have between 100 and 500 links.
Most of them completely useless, of course. Using Offpunk to surf
the web without readability might be a nightmare.
Starting a Discussion
---------------------
I created my first website in 1998 and started my still active blog
in 2004. For all those years, I was publishing to attract attention,
readership. I was looking for some "success". I got some. Published
books, was invited to give conferences, was offered jobs, was even
twice recognized by strangers because of my blog. But it was never
enough. It is still not enough. I don’t feel particularly
successful.
For the last 20 years, I’ve tried to become a successful writer by
doing anything that could attract attention to my writing. In the
last years, I’ve been slowly evolving toward writing more,
publishing less and doing marketing even less.
By being forced to parse all the greasy cruft that others put around
their writing, I was forced to realise how I did (and might still
do) the same. How the appearance is detrimental to the content.
Anyone suggesting that gemtext should support colours should be
forced to write an ANSI parser first. Anyone suggesting that Gemtext
formatting is not enough to express correctly what they want to
express should open an old book. Most people are trying to work
around the fact that writing is hard. Really hard. They hope to
share emotions and non-verbal clues through emojis, colours,
boldening. The problem is that, unlike the written language, those
expressions are not explicit. You don’t convey what you want to
convey, you make it less understandable. If you can’t write without
colours and emojis, it is probably because you don’t really know
what you want to say. That’s why writing is so hard. It is hard but
it pays off. When writing with only words, you not only communicate
better with others, you also communicate with your present and
future self.
« Ce qui se conçoit bien s’énonce clairement et les mots pour le
dire viennent aisément. » (Boileau)
I’m still astonished by the emptiness of most successful webpages
once displayed in Offpunk. Offpunk made the front page of Hackernews
which led me to break my disconnection temporarily because I was
curious about other links with more votes. They were shallow, empty
and rarely had more than 200 words. A search about Offpunk on Google
that same day revealed that the top pages were mostly computer
remixes of the Offpunk README. The web is full of automatic content
trying to mimic what has been successful. There were even two
Youtube videos in the first Google results. Both of which are
computer reading of the README while the website is displayed. The
real Offpunk website was only on the second page, demonstrating how
the web is buried in shitty auto-generated content and how bad the
leading search engine is.
I did not receive more emails that day than when I post on this
gemlog.
That success everybody is running after is fake, short-lived. It is
not even finished that you must already run for the next shot.
With Offpunk, I still can read people I like on the web. I follow
their RSS feeds. It makes me feel like I’m still on Gemini or
Gopher. It’s funny how, each time I find something deep and
meaningful to read on the web, it renders well in Offpunk. It feels
a bit like meaning and technical presentation are somehow connected.
I also like to write on Gemini because I know that it can’t be
successful. I can write long stuff like this one. It will be read by
people that find it interesting. Not many. Maybe none. But if you
made it until now, then it certainly had an impact on you. I’ve
shared my thoughts with you. You will, consciously or not, process
them. You may even one day produce something that will have been
impacted by what you’ve read today. I may read you later without
knowing that.
This whole post has been influenced heavily by a lot of people in
the Gemini space. They made me think. You probably made me think.
I’ve evolved thanks to what I’ve read. Sometimes, when reading you,
I wanted to reply. But there was no short and easy way to reply. So
my reply either got lost, which means it was not important, or got
carried with my thinking and crystallised into this post or the
following one.
We have started a long, slow and meaningful conversation. The kind
of conversation upon which every human breakthrough was conceived.
Thank you for participating in it.
This is just the beginning of our conversation.
1
0
La légèreté d’un monde sans Twitter
-----------------------------------
Il y a un peu moins d’un an, j’ai supprimé mon compte Twitter. Un
compte vérifié avec la célèbre icône bleue, suivi par près de 7000
autres comptes Twitter.
Si ce n’est pas exceptionnel, ce compte n’en était pas moins
relativement "influent" sur l’échelle Twitter. J’ai pourtant décidé
de tenter l’expérience de m’en passer complètement, pour voir. Je
savais que j’avais un an pour faire marche arrière. Durant un an,
mon compte serait "réactivable" avant d’être définitivement
supprimé. Il me reste donc quelques semaines pour changer d’avis.
Et pourtant, cela ne me viendrait pas à l’esprit.
Un sentiment de liberté
-----------------------
Je m’étais déjà déconnecté de mon compte Twitter pendant des
périodes plus ou moins longues, jusqu’à trois mois. Mais la
suppression est complètement différente. En quelques jours, j’ai
tout simplement arrêté de penser à ce qui se passait sur Twitter.
J’ai arrêté de penser que ce réseau existait. L’expérience a été la
même que pour Facebook et LinkedIn : en supprimant le compte, je me
suis ôté un poids énorme. C’est pour Twitter, le réseau auquel
j’étais le plus accroc, que la sensation a été la plus forte.
Il est simple de se retirer des réseaux que l’on n’aime pas ou qu’on
utilise peu. Le réel changement vient d’accepter de se retirer d’un
réseau dont on connait la nocivité, pour soi et pour le monde, sans
pourtant pouvoir s’en passer. Parce qu’on est persuadé d’en tirer
plus de bien que de mal.
Je suis un blogueur et écrivain qui cherche la gloire. Qui cherche
le buzz. Qui cherche à vendre des livres, à être lu, à toucher des
lecteurs. Les réseaux sociaux sont littéralement conçus pour les
gens comme moi. Et pourtant, ils me prennent beaucoup en m’apportant
bien peu. Les pseudobénéfices ne sont que du vent. Une icône bleue à
côté de mon nom ? La belle affaire ! Un nombre à quatre chiffres
sous la marque "abonnés" ? Un simple attrape-nigaud pour que je
tente à tout prix de le faire augmenter.
Twitter ne me manque pas. Au contraire. Je me demande sans cesse
pourquoi je ne l’ai pas quitté plus tôt. Pourquoi ceux qui, comme
moi, ont la conscience de la nocivité de cette plateforme la
crédibilisent en restant dessus. (je ne vais pas leur jeter la
pierre, j’en faisais partie il y a moins d’un an).
La migration vers Mastodon
--------------------------
Je souris de la naïveté de certains utilisateurs qui s’indignent de
l’arrivée d’Elon Musk à la tête de Twitter. C’était pourtant clair
depuis le début, non ? Vous êtes des "utilisateurs". Vous êtes une
marchandise, vous créez la valeur de l’entreprise, que ce soit pour
Elon Musk ou un autre. Vous êtes les pigeons et votre indignation ne
fait qu’alimenter les débats, les interactions et donc les intérêts
publicitaires.
Il n’y a pas de bonne manière d’utiliser un réseau propriétaire. En
créant un compte, nous acceptons d’être utilisés, manipulé et que
chacune de nos interactions y soit désormais monétisée.
Il y a déjà 5 ans, je tentais de promouvoir Mastodon, une
alternative libre et décentralisée à Twitter. Je lis souvent des
remarques comme quoi c’est beaucoup plus compliqué.
Non.
C’est juste différent. Si tu n’arrives pas à utiliser Mastodon,
c’est que tu n’en as tout simplement pas envie.
C’est plus facile de manger un burger au Macdo qu’un plat équilibré
avec des légumes. C’est plus facile de balancer ses déchets dans un
parc plutôt que de faire du tri. L’argument de la facilité n’en est
pas un. Le monde se modèle selon l’énergie que nous y mettons.
Il faut créer un compte avec un mot de passe et tout ? Sur Twitter
aussi. C’est juste que tu as l’habitude. C’est juste que tu t’es
connecté sur un serveur Mastodon, que tu as découvert que tu avais 0
follower, que tu n’avais plus la petite icône bleue, que tu ne
savais plus "promouvoir tes tweets", que tu ne voyais plus des likes
s’afficher en direct sous tes messages. Que tu n’es plus revenu et
que donc tu as oublié ton mot de passe. Que c’est plus facile
d’accuser le logiciel libre d’être compliqué plutôt que d’affronter
sa propre vacuité.
Si tu n’as pas l’envie d’apprendre à utiliser Mastodon, c’est
compréhensible. Personne ne te force. Mais n’accuse pas la
plateforme.
Twitter est très bon pour te faire croire que tu es un utilisateur
important. Mais sur le Fediverse, le réseau décentralisé auquel
participent les serveurs Mastodon, il n’y a pas d’utilisateurs,
encore moins des importants. Il y a juste des personnes qui sont
toutes sur le même pied d’égalité.
La plateforme ne peut pas remplacer l’introspection
---------------------------------------------------
C’est peut-être ça le plus difficile à accepter : ce n’est pas
Mastodon ni le logiciel libre le problème. C’est toi. C’est toi qui
cherches à te sentir important, à être valorisé. En achetant des
vêtements chers, le dernier iPhone le jour de sa sortie, une grosse
voiture ou une icône bleue à côté de ton pseudo Twitter. Ou tout
simplement en ayant beaucoup de retweets, en étant beaucoup cité
dans les débats.
La question n’est pas de faire un Twitter-sans-Elon-Musk. La
question est de savoir ce que nous voulons, ce que nous cherchons.
De faire la part entre ce que nous prétendons ("communiquer") et ce
que nous voulons réellement ("être valorisé","avoir le sentiment
d’exister").
J’ai plusieurs fois suggéré de supprimer dans Mastodon l’affichage
public du nombre de followers pour couper court à toute potentielle
spéculation sur cet indicateur. Si je me rends compte qu’un compte à
beaucoup de followers, j’ai tendance instinctivement à penser que
cette personne est importante, que son avis vaut la peine d’être
écouté. Je ne pense pas être le seul.
Tentez l’expérience
-------------------
Si votre morale personnelle réprouve ce qu’est ou ce que devient
Twitter, je ne peux que vous inviter à tenter l’expérience de
supprimer votre compte. Rappelez-vous : vous avez un an pour changer
d’avis.
Faites fi de ces conversations tellement importantes, de cette
communauté que vous ne pouvez pas "abandonner", de ces ennemis
virtuels qui verront votre départ comme une victoire. Tentez
simplement de vous aligner avec vos propres valeurs morales. Juste
pour voir.
Supprimer votre compte est également la seule et unique manière de
protester, de toucher l’entreprise là où ça lui fait mal.
Bien sûr, vous pouvez aussi venir sur Mastodon. Mais ce n’est pas
nécessaire. C’est même peut-être contreproductif. Si vous étiez
accroc à Twitter, vous serez tenté de voir dans Mastodon un
substitut. Il est sans doute préférable de se sevrer de Twitter
avant de découvrir autre chose.
Bonus
-----
Installez l’extension libredirect dans votre navigateur, de manière
à pouvoir continuer à consulter Twitter à travers l’interface Nitter
(vous pouvez même suivre les comptes Twitter dans votre lecteur
RSS). Sur Android, utilisez Fritter.
=> https://libredirect.codeberg.page/ Libredirect pour
Chrome/Firefox
=> https://f-droid.org/en/packages/com.jonjomckay.fritter/ Fritter
pour Android
1
0