News for hackers. Stuff that matters.

qouteall

Re:A chatbot's worst enemy is page refresh on Saturday February 21, 2026 @12:11AM (#47097714)
It's probably due to server side rendering and rehydration. The rehydration use server side component state to override DOM state.
Re:Index, Count, Offset, Size on Saturday February 21, 2026 @12:05AM (#47097687)
With modern IDE and AI there is no need to save letters in identifier (unless too long). It should be "sizeInBytes" instead of "size". It should be "byteOffset" "elementOffset" instead of "offset".
Re:What Functional Programmers Get Wrong About Systems on Monday February 09, 2026 @10:21PM (#46954953)
Normally the database and message queue is decoupled from the backend service. This decoupling makes managing simpler and make cross-language things easier.

But if the type system need to cover all these components, then they start coupling again.

Coupling is not necessarily a bad thing as long as it gives good developer UX. If the database is tightly coupled with programming language, then it looks like ORM but better. And it probably can also reduce CRUD biolerplate or N+1 issue etc.

Related, there is SpacetimeDB that make backend run within database, and the backend code is highly coupled with SpacetimeDB's own API

Re:What Happened to WebAssembly on Friday January 09, 2026 @07:19AM (#46553107)
WebAssembly standard design has considered binary size optimization. The format itself is quite compact. But porting native code to Wasm often brings many large existing libraries which contain a lot of code which makes the binary large.

The native ecosystem never payed attention to binary size optimization, but the JS ecosystem payed attention to code size in the very beginning.

Re:What Happened to WebAssembly on Friday January 09, 2026 @07:13AM (#46553080)
They originally used JS realm polyfill, which is not real JS realm. The polyfill has some security holes. Now they switched to Js interpreter in Wasm.

https://www.figma.com/blog/an-update-on-plugin-security/

Re:What Happened to WebAssembly on Friday January 09, 2026 @07:09AM (#46553050)
I've written about limitations of WebAssembly https://qouteall.fun/qouteall-blog/2025/WebAsembly%20Limitat...

WebAssembly still doesn't provide a way to release memory back to browser (unless using Wasm GC). The linear memory can only grow.

The Wasm GC limits memory layout and doesn't yet support multi-threading.

Wasm multithreading has many limitations. Such as cannot block on main thread, cannot share function table, etc. And web worker has "impedance mismatch" between native threads.

And tooling is also immature (debugging requires print debugging)

Re:TIL: Serde's borrowing can be treacherous on Saturday December 27, 2025 @03:09AM (#46400111)
One limitation of Rust macro is that it can only access code token, not actual type information.

When macro sees a type `X` macro can never be sure whether it's `&str` as Rust allows type alias. If `X` is not `&str` it may also be a struct that contains `&str`, still macro cannot know.

Wasm-bindgen workarounds this issue by generating "fake functions" then read and remove them in CLI:

https://wasm-bindgen.github.io/wasm-bindgen/contributing/des...

Zig comptime allows getting full type information. This is one advantage of Zig.

Re:More databases should be single-threaded on Saturday December 20, 2025 @08:44PM (#46341486)
The optimistic concurrency control that reads multiple shards cannot use simple CAS. It probably needs to do something like two-phase committing
Re:More databases should be single-threaded on Saturday December 20, 2025 @08:37PM (#46341452)
Thanks for reply.

So in my understanding:

- The transactions that only touch one shard is simple

- The transactions that read multiple shards but only write shard can use simple optimistic concurrency control

- The transactions that writes (and reads) multiple shards stay complex. Can be avoided by designing a smart sharding key. (hard to do if business requirement is complex)

Re:More databases should be single-threaded on Saturday December 20, 2025 @07:23PM (#46341056)
In real-world business requirements it often need to read some data then touch other data based on previous read result.

It violates the "every transaction can only be in one shard" constraint.

For a specific business requirement it's possible to design clever sharding to make transaction fit into one shard. However new business requirements can emerge and invalidate it.

"Every transaction can only be in one shard" only works for simple business logics.

Re:Rust and the Price of Ignoring Theory [video] on Friday December 19, 2025 @10:48PM (#46333485)
This video criticizes Rust using perfect solution fallacy. Critizing a useful thing just because it's imperfect.

https://en.wikipedia.org/wiki/Nirvana_fallacy

Re:Cloudflare Is Down, Again on Friday December 19, 2025 @07:13AM (#46324969)
We are in the down season.
Re:Slowness Is a Virtue on Thursday December 18, 2025 @06:27AM (#46311408)
There are two kinds of slowness. One is trying hard while getting no visible result. Another is procrastination. The article refers to the first
Re:Common Rust Lifetime Misconceptions on Monday December 15, 2025 @09:10AM (#46274752)
The better phrase is that "if it compiles, then many possible Heisenbugs vanish"

https://qouteall.fun/qouteall-blog/2025/How%20to%20Avoid%20F...

Re:Common Rust Lifetime Misconceptions on Monday December 15, 2025 @09:09AM (#46274734)
I want to add Contagious Borrow Issue https://qouteall.fun/qouteall-blog/2025/How%20to%20Avoid%20F...

Contagious borrow issue is a common problem for beginners.

Goodhart's law: When a measure becomes a target, it ceases to be a good measure.

AI companies have high incentive to make score go up. They may employ human to write similar-to-benchmark training data to hack benchmark (while not directly train on test).

Throwing your hard problem at work to LLM is a better metric than benchmarks.

Re:Cloudflare outage on December 5, 2025 on Friday December 05, 2025 @09:45PM (#46170118)
It's (at least) the second time Couldflage gets bitten by React. Last time an useEffect caused an incident.

https://blog.cloudflare.com/deep-dive-into-cloudflares-sept-...

Re:CSS now has an if() conditional function on Friday December 05, 2025 @07:23AM (#46160342)
Re:Thoughts on Go vs. Rust vs. Zig on Friday December 05, 2025 @07:16AM (#46160272)
Can you provide the source of "(eg Android definitely has sanitizers running on every commit and yet it wasn’t until they switched to Rust that exploits started disappearing)"?
Re:Personal blogs are back, should niche blogs be next? on Saturday November 22, 2025 @06:42AM (#46014024)
You can use Obsidian to edit markdown. Obsidian allows easy paste of images.
Re:62 chapter open-source Zig book on Monday November 17, 2025 @07:28AM (#45953014)
AI is really great at creating superficial signals. And most people just judge things by superficial signal.

Older »