Daily Shaarli
January 24, 2025
How to prototype in Rust?
- use simple types: String, Vec
, Box , Rc and Arc<Mutex > to avoid ownership and lifetime issues. - make use of type inference
- use
.unwrap()
, and quick context withbail!()
undwith_context
of the crateanyhow
- run the code (and tests) automatically with
bacon
- have a look to
cargo-script
- Use
println!
anddbg!
for debugging:dbg!
has advantages such as printing file name and line number, outputs the expression adn less syntax-heavy.dbg!(x)
- Design through types
- rely on the
todo!
macro - rely on the
unreachable!
for assumptions of dead code branches: it documents assumptions - rely on
assert!
for invariants: it documents assumptions - avoid generics and lifetimes: use concrete types and owned types
- keep a flat hierarchy (of files), then only starts playing with mod around. All in the same file.
- start small
Une excellente nouvelle.
*le redressement rapide de la production nucléaire (361,7 TWh), après un niveau historiquement faible en 2022 (279,0 TWh) et une reprise progressive en 2023,
- une production hydraulique exceptionnelle, au plus haut depuis 2013 (74,7 TWh)
- la croissance soutenue de la production des filières éolienne et solaire (70 TWh en 2024, contre 46 TWh en 2019).
A better man page online
Anyways, there’s a real friction between great UX and great security, and I can appreciate a lot of the challenges and compromise required to strike a balance.
The UX is currently hard.
There is often websites that have "bad" UX as listed in the post. The majority starts to have the "better". The "best" does not exist yet.
- Springy easing with linear()
- Typed custom properties
- View transitions for page navigation
- Transition animation for
- Transition animation for
- Animated adaptive gradient text
It uses Tauri under the hood to provide efficient defaults to desktop apps.
L'impact réel des data center en quelques paragraphes.
It's more complicated than initially thought.
Key points
- Writing is a way of thinking. Write early and often and always.
- Write in plaintext to concentrate on writing rather than formatting.
- Keep a work journal to help focus your thoughts at the beginning of each day.
- Keep standing files, such as "someday/maybe", to capture far-off tasks and keep your main to-do.txt file lean, clean, and relevant.
- Write a personal manifesto to help define yourself.
- When creating drafts of your work product, focus on content and structure, rather than formatting.
- Use the lightweight markup language Markdown to provide basic structure and formatting hints to your drafts.
- Use a really good text editor, such as Sublime Text, that keeps your hands on the keyboard, for efficient writing and word processing.
- Backup and revision history are important. You don't want to lose anything.
So it's similar to user agents, do the same thing without standard. What could go wrong? Well the same as User Agents.
Put AI everywhere
About dependency churn: how can we have less dependency?