362 private links
It can be useful for later. It seems broken on Firefox though.
A dialog transition. It can be definitely useful instead of heavy implementations. Here is a lightweight implementation without JS.
With the tool https://weasyprint.org/
A makefile script in Typescript, or to run benchmarks.
Issues with SQLite:
- The test suite is not open source
- External contributions are not welcomed
- It's written in C, which is nowadays prone to easily-avoidable bugs, hard to maintain and add new features
- SQLite does not support concurrent writes
- Columns are weakly typed
Note the SQLite documentation hints Rust as a potential language for a rewrite under conditions listed at the end of the page.
Where Turso is good: scaling (instead of switching to PostgreSQL). Also it's simple to build an extension for it
I don't know if SASS is relevant for most projects nowadays.
A powerful demo
I also use the folder model to understand it. The way I undestood it is with some trials. I got it with position:absolute that somehow create a new stack. This stack inherits the z-index of the DOM node.
a thing you absolutely cannot do is nest one interactive control inside another
it has few examples.
Some things to consider in this reset:
- an anonymous layer is used.
- border-box for all
- reset margins and borders
- reset body margins and paddings.
- min body height is 100%
- typography: line-height 1.5; prevent
text-size-adjustfor mobile - but headings, button, input and label get a smaller line-height
- prevent media content overflow with
max-inline-size: 100%; display: block; block-size: auto - fill svg with currentColor for svg without fill properties
- inherit fonts in fields
- textarea should resize only vertically
- remove fieldset borders
- text with
text-wrap: pretty - every digit has its own size (use tabular-nums for tables, time, math) with
font-variant-numeric: proportional-nums overflow-wrap: break-wordon texts and heading to avoid inline overflows- get the numbers on the same baseline with
font-variant-numeric: lining-nums; - hanging punctuation must be set properly
- code clarity is a must, so
font-variant-numeric: slashed-zerois useful. - collapse table borders
- reset
supandsubline-height because they are messing with it in texts - align opacity with
:disabledto 0.8 for all browsers and set the cursor: not-allowed - add an outline-offset to 0.2rem for
:focus-visible
Shadcn makes the radio button overly complex, even if <input type="radio" name="beverage" value="coffee" /> with 30 lines of CSS is enough.
The library uses 3 imports (and 2 components) and 45 lines of code and ARIA.
Text rotating at the borders of an image
A Rick-roll in the source code
Rust is the best language so far to replace today's most used crypto libraries: OpenSSL, BoringSSL and libsodium.
C libraries often contain a lof of assembly code making them really fast, but potentially unsafe.
pure-Rust libraries benefit from Rust strong typing and generally offer a better API, compile for all platforms including WebAssembly.
It's important to note that pure-Rust libraries might be slightly slower than C and assembly wrappers, but still fast enough for most use cases.
- aws-lc-rs is a cryptograhy create
- libcrux is a Rust wrapper for formally verified C, Assembly and Rust code.
- ring is focused on the implementation, testing, and optimization of a core set of cryptographic operations exposed via an easy-to-use (and hard-to-misuse)
- boring is a safe wrapper around google's boringssl
- dalek-cryptography is a Github organization about pure-Rust elliptic curve cryptography, used by Signal and Diem
- graviola is promising because it's faster than other projects, but not mature enough yet.
There is also blake3
In short, RustCrypto to get pure-Rust implenentations, or aws-lc-rs for linux-servers and best perforamances with FIPS certification.
HTML and CSS only 😃
Why? Costs, operational complexity, data consistency
- Caching with UNLOGGED table (that I've also found in other posts)
- Pub/Sub with LISTEN/NOTIFY
- Job Queues with SKIP LOCKED
- Rate Limiting is also possible
- Sessions with JSONB
PostgresSQL ist nearly 2 times slower compared to Redis, but is it worth it?
When to keep Redis?
- extreme performance needed
- using redis-specific data structures
Migration strategy:
- Side by side
- Read from Postgres
- Write to Postgres only
- Remove Redis
and Prisma provide for example typedSQL to have a smooth integration with Typescript.
I’m currently building an app that pulls a ton of data from an external API. If you use Rust, you know the drill: you get a UserDTO from the API, but you want a User in your domain. This usually leads to writing the same From trait implementation over and over again.
What’s in the sandbox so far? I built a macro called FromDTO. Instead of manually mapping dozens of fields, I can just do this:
Note the serde create do that for JSON and other formats