345 private links
Eventually, I got sick of manually converting my equations, so I wrote a Python script to automatically convert LaTeX expressions to MathML in my blog posts. I started considering writing an automated tool for inserting my navbars into the HTML files, and then I realized that I was completely wasting my time. After some shopping around, I decided Zola was the least deranged of the existing site generators, so I tried rolling with it.
I’m using a fork of Zola with Typst support written by cstef.
For thousands of years, man has invented technology to ameliorate the petty pains and discomforts of his life. It would be an insult not to use it.
So dynamic-linking saves us about 11%11% of build time in incremental case.
This time dynamic-linking saves us 0.25 seconds, or about merely 5%5%.
About the new Anki algorithm to schedule flashcard reviews. I didn't read it yet, but it can become handy.
The type=number state is not appropriate for input that happens to only consist of numbers but isn't strictly speaking a number. For example, it would be inappropriate for credit card numbers or US postal codes. A simple way of determining whether to use type=number is to consider whether it would make sense for the input control to have a spinbox interface (e.g. with "up" and "down" arrows). Getting a credit card number wrong by 1 in the last digit isn't a minor mistake, it's as wrong as getting every digit incorrect. So it would not make sense for the user to select a credit card number using "up" and "down" buttons. When a spinbox interface is not appropriate, type=text is probably the right choice (possibly with an inputmode or pattern attribute).
inputmode="decimal" or inputmode="number" fit better for these cases.
New HTML features of 2025
Awesome
The current nightly preview to run rust file as scripts.
alias cargo-script='cargo +nightly -Zscript -q' is my new friend.
The usual command is cargo +nightly -Zscript file.rs
The tracking issue is full of insights: https://github.com/rust-lang/cargo/issues/12207
An accessibility decision tree for the alt attribute
an interactive tutorial series on building realtime collaborative applications using the Yjs CRDT library.
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_contextof 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
The code snippet are great
- Springy easing with linear()
- Typed custom properties
- View transitions for page navigation
- Transition animation for
- Transition animation for
- Animated adaptive gradient text
A blog post.
An RSS feed for it.
An index.html.
Then more blog post.