Weekly Shaarli

All links of one week in a single page.

Week 44 (October 30, 2023)

Bibi-binary - Wikipedia
CSS { In Real Life } | Code Gardening

Maintaining, improving code, fixing bugs and delivering minor features. Small step by small steps.

zerocal - A Serverless Calendar App in Rust Running on shuttle.rs | Matthias Endler

Nice: a web service that creates a calendar event from a URL

Down and to the Right: Firefox Got Faster for Real Users in 2023 - Mozilla Hacks - the Web developer blog
Why I Love Programming | Matthias Endler
  1. Automating stuff gives you superhero strengths
  2. Coding is fun (and we can forget the rest)
  3. Sharing is fun too
  4. Elegant, creative solutions
  5. Talk to a machine
  6. Standing on the shoulders of giants
Being a Professional Programmer | Matthias Endler

The difference between professional and hobby is accountability. In professional programming, you're expected to get the job done.

If a skill becomes obsolete, it's not a skill.

Professional programmers have to balance constraints: deadlines, budgets, and code quality for example.

At the end one of the most important fact is communication.

A Little Story About the `yes` Unix Command | Matthias Endler

How it is optimized to be the fastest possible.

lexi-sh/rs-natural: Natural Language Processing for Rust
Introduction - Rust Design Patterns
Afraid of Makefiles? Don't be! | Matthias Endler

A quick guide on makefiles

Faster Rust Serialization

All that we did to get this speedup is implement the Serialize trait using one line for the body of the serialize method!

But implementing the trait directly loses the possibility to serialize the structure with the #derive(Serialize) macro.

Instead, you should implement it on wrapper types that act like formatters.

Also for efficiency: format_args! doesn't allocate or even apply the formatting! It only returns Arguments which is a formatter that borrows its arguments.

The New CSS Math: rem() and mod()

We can now calculate the remainder rem() and the modulo mod in css.

We will have to wait a bit though for browser support: https://caniuse.com/?search=rem() and https://caniuse.com/?search=mod()

Pourquoi sommes-nous tellement accros à Google Maps et Waze ?
Don't Use Fixed CSS height or width on Buttons, Links, or Any Other Text Containers | Ashlee M Boyer

Use padding, relative line-height and a flow layout instead.

Les données de l’inventaire forestier national confirment l’impact du changement climatique sur la santé des forêts françaises - Portail IGN - IGN

Pour 2023, l’IFN, véritable état des lieux de la forêt française, révèle des forêts de plus en plus affectées par le changement climatique, avec notamment une accélération de la mortalité des arbres, et une multiplication de crises entraînant un ralentissement du puits de carbone des forêts sur la dernière décennie.

silkenweb - crates.io: Rust Package Registry

This project looks interesting.

  • No VDOM
  • Rust syntax
  • CSS scoping
  • Routing & SSR & SSG
  • Tauri support
  • Htmx integration
Featurize your app
Iconbuddy — 180K+ open source icons
hubblo-org/scaphandre: ⚡ Energy consumption metrology agent. Let "scaph" dive and bring back the metrics that will help you make your systems and applications more sustainable !
Sean Tilley in Elk: "This one is for all the new people on #..." | Elk

The Fediverse has multiple services that provides alternatives:

  • Facebook replacement: Friendica
  • Instagram replacement: Pixelfed
  • YouTube replacement: PeerTube
  • Spotify replacement: Funkwhale
  • MeetUp replacement: Mobilizon
  • Reddit replacement: Lemmy
  • Podcasting replacement: Castopod
  • GoodReads replacement: BookWyrm
Fin du procès des «activistes d’ultragauche» : «Puisque la DGSI vous le dit, c’est que c’est vrai» – Libération
Asahi Linux

Asahi Linux aims to bring you a polished Linux® experience on Apple Silicon Macs.

Visual Studio Code is designed to fracture
The beauty of finished software | Jose M.

It’s a reminder that reliability, consistency, and user satisfaction can coexist in the realm of software development.

Grading on a Curve: How Rust can Facilitate New Contributors while Decreasing Vulnerabilities

TL;DR security vulnerabilities introduced by new Rust contributors are largely less than C++ contributors. They use the amount of commits to measure it as experience. It confirms the claim of the

Namely, while it may still be true that Rust may feel like a more difficult language to learn, in at least some ways, new contributors benefit from its adoption, with their first contributions being less than 2% as likely to introduce vulnerabilities as C++, and first-time contributors appearing at a notably higher rate in the projects examined.

The results should not be used as is, as there are some effects:

  • does Rust increase the number of contributors or does Rust act as its own filter and
    reduce the rate of new contributors entirely
  • it is possible Rust developers are more experienced with programming in general. Note that the study focused on new contributors, not new maintainers.
  • at around 18,000 commits, a C++ developer will be less likely to introduce a vulnerability than an equivalently experienced Rust developer.
  • Finally, there is some limitation to these results in that they
    all come from Oxidation projects.
Ten Years of Vim | Matthias Endler

If I can give you one tip, don't learn Vim by memorizing commands. Instead, look at your current workflow and try to make it better, then see how Vim can make that easier.

What Happened To Programming In The 2010s? | Matthias Endler
On Hard Work | Matthias Endler

The dedication, the urgency to reach your aims must come from within you.

Deploy Rust Code Faster | Matthias Endler

The author shares its point of view on Shuttle that needs little to nearly 0 configuration to get started.

Zerocal was the first project I deployed on Shuttle. The principle was very simple yet innovative: encode calendar data directly into a URL. [https://endler.dev/2022/zerocal/]

#project #idea improve the UI or make a custom one that calls the API
#project #idea use such API to generate other files. Contacts?

Naming Variables In CSS
  1. Consider mixing kebab-casing with camelCasing: --system-color-controlAccent: blue;
  2. Using namespaces can help to avoid collision. In the upper example: system is a namespace.
  3. Value typing hints to the use cases of the variable. In the upper example: color. It could be fontSize for example
  4. Descriptive names can use 2 patterns: icyBlue which is value-based or accent which is usage-based.
  5. Dark mode is simpler with usage-based variables

When to use between value- and usage-base?

Variables with value-based names can be useful for restricting the number of values in your interface. Using numbers can be useful, but sometimes overkill.

Usage-based tend to be useful to describe scopes of capability and utility within the project. The utility of a usage-based name comes in how it guides a developer or designer in its use.

There are often 3 levels of abstractions:

  • defining the values
  • different property for custom controls such as --color-accentColor
  • the CSS variable of use in the component such as --button-color
Chrome drops Web Integrity API plans deemed by many to be DRM

the company announced today it’s not going ahead with the proposed API.

See the first question heading of https://android-developers.googleblog.com/2023/11/increasing-trust-for-embedded-media.html?m=1

In Search Of The Ideal Privacy Icon — Smashing Magazine

Current icon ideas (but not satisfying):

  • padlock
  • detective (chrome incognito is a simplified detective icon)
  • zorro mask
  • shield

New ideas:

  • a blurred user icon
  • Venetian blind icon: an easy toggle to close and open the Venetian
  • the picket fence icon: prevent folks from looking in or hopping over.
Free Software Is Even More Important Now - GNU Project - Free Software Foundation

Those two nonfree programs have something else in common: they are both malware. That is, both have functionalities designed to mistreat the user.

If you use a program to carry out activities in your life, your freedom depends on your having control over the program.

Nonfree software was the first way for companies to take control of people's computing. Nowadays, there is another way, called Service as a Software Substitute, or SaaSS. That means letting someone else's server do your own computing tasks.

In some cases, nonfree software causes indirect harm (secondary injustice): it puts pressure directly on others to use this software (Teams, Skype, Zoom, ...), it encourages to develop the non-free software further. All the forms of indirect harm are magnified when the user is a public entity or a school.

Public agencies exist for the people, not for themselves. When they do computing, they do it for the people. They have a duty to maintain full control over that computing so that they can assure it is done properly for the people.

CSS { In Real Life } | Owning Your Web
Hecto, Chapter 3: Raw input and output – flenker.blog – thoughts on stuff, views on things

Just for the expression:

Russian: Killing two rabbits with one shot
German: Killing two flies with one swat
Francais: Faire d'une pierre deux coups

Skipping skip links ⚒ Nerd

To my surprise they didn’t use skip links when they were presented one. [...] They didn’t understand the purpose of these links.

He explained that when he clicks on a link, for instance to an interesting article about skip links, he expects the first thing he encounters to be the article itself.

Instead of a "Skip to content", a "Skip to navigation" could be better.

Of Boxes and Trees - Smart Pointers in Rust | Matthias Endler

The author takes the example of a tree structure.

TL;DR; Start with lifetimes, if it is not enough and you don't need a specific guarantee: Box, then go for Rc or Arc if needed.

Cursed Rust: Printing Things The Wrong Way | Matthias Endler

Various way to print "Hello World!" in rust

Why Type Systems Matter | Matthias Endler

Advantages of types: they are here to help, improve readability, and provide context

UI Tips for Landing Pages & Apps by Jim Raptis
Little Helpers | Matthias Endler

We take all of this for granted because the devices rarely fail, but it's really amazing when you think about it. It's only been a few decades since much of this was tedious, time-consuming, manual labor.

About automation:

That means we have more time to focus on the fun stuff, like playing with the cat.

htmx, Rust & Shuttle: A New Rapid Prototyping Stack

Ok not bad at all. I still think Rust is not meant for prototyping, but let's give it a try.

Let’s reinvent the wheel ⚒ Nerd

Both Figma and Photoshop are for people who believe the web looks like an image.

Semantic HTML is a must. Because there is UX with HTML :D

Another thing our design tools really don’t give a shit about is accessibility. And to be honest, I think most of our industry doesn’t really care about accessibility as well.

Looks also valid to me.

The specialists who helped the architect in making sure it was certified did nothing else than ticking boxes. And this is exactly what most of us do when we think we make our sites accessible. We tick the WCAG boxes.

On the Uniting Power of a Commitment to HTML Conformance · Jens Oliver Meiert

TL;DR nearly no website have valid HTML. We need validators and ways to integrate them in our development processes. It could allow us to tackle more serious challenges—like advancing accessibility—with collective vigor.

Maybe Cypress and test the different pages?
There is an NPM package dedicated to HTML checking https://www.npmjs.com/package/html-validate

bufferhead-code/nextjs-use-php: Use PHP code right within your React / Next.js App. With "use php";

because it is possible

Humans TXT: We Are People, Not Machines.

It's an initiative for knowing the people behind a website. It's a TXT file that contains information about the different people who have contributed to building the website.

A txt file is simple and fast to create and can be embedded easily with a <link type="text/plain" rel="author" href="./humans.txt">

It completes robots.txt or security.txt

Why Do We Interface?

In this micro-book I take a historical look at interfaces to build an understanding of how they allow us to utilize information in such powerful ways that they can fundamentally change what it means to be human.

Politique de confidentialité des Chaînes - EEE

À propos des chaînes sur Whatsapp

Référentiel général de l'écoconception des services numériques - RGESN

Réalisé par l'Arcep, il regroupe des critères formulés en questions sur des thématiques. Le critère est accompagné d'un niveau d'impact et d'une fiche pratique est associé afin de mettre en oeuvre et de tester ledit critère.

dav1d - dav1d is an AV1 decoder - VideoLAN

Dav1d is a new AV1 cross-platform decoder, open-source, and focused on speed, size and correctness.

It uses software instead of hardware to be compatible.

unjs/knitwork: Utilities to generate JavaScript code.

The projects of UnJs are awesome

torvalds/linux: Linux kernel source tree
Geist Mono Font — Vercel

A well crafted font

Youtube’s Anti-adblock and uBlock Origin - And a Dinosaur

Key points:

  • YouTube does not only target ad-blockers but extensions or settings in general
  • It is hard to organize adblockers because of the noise and confusion generated by YouTube's strategy

The post goes in-depth into these assumptions.

The uBO team members are all volunteers. They’ve gone above and beyond to meet every little request from their users. But there’s a limit to how much they can take.