A really cool small piece of integer division code in `folly::BucketedTimeSeries` – uvdn7.github.io/bucketed-tim….
I wrote this post on the mental model for C++ coro in March, and found myself referring back to it often. Let me just post it uvdn7.github.io/cpp-coro/.
OK I have my answer – I think you should switch.
My sister sent me this puzzle. It's so good!

ALT You are playing the Monty Hall problem. However, you secretly know one of the goats is the former pet of an eccentric billionaire who lost it and is willing to pay an enormous amount for its return, way more than the car is worth. You really want that goat. The host is unaware of this. After you pick your door, as is traditional, the host opens one door, which he knows doesn't have the car. He reveals a goat, which you can tell is the ordinary goat and not the secretly valuable one. The host offers to let you switch doors. Should you?
[new blog post] Access a function's return value in C++ scope guard blog.the-pans.com/return-val…
[new blog post] When `__cxa_pure_virtual` is just a different flavor of SEGFAULT blog.the-pans.com/pure_virtu…
The gnu bash manual is great. It's well-structured and concise. Just wonderful. Lots of effort must went into it. gnu.org/software/bash/manual…
The list of talks of NEDB Day 2024 is out! bu-disc.github.io/nedbday/20…
I saw "Why Machine Learning for Automatically Optimizing Databases Doesn't Work" and was thinking Andy Pavlo would have something to say about it, then I realized that he's the one giving the talk! #NEDBDAY2024
Not only the book Infinite Powers is fascinating (and I can’t put it down), I can feel @stevenstrogatz’s passion and love of the subject from the pages. The book is a wonderful gift. I am grateful.
`async && closure && requires_explicit_memory_management && !borrow_checker` is really challenging. Borrow checker is really good to have especially when writing async code with closure! #rust
[new blog post] Rust's early vs. late lifetime binding blog.the-pans.com/rusts-earl…
It appears that the rust compiler tries really hard to infer how _and_ what to capture when it comes to closures. Do you think the following program compiles? #rust
It does indeed compile in the playground play.rust-lang.org/?version=…. But it doesn't on Compiler Explorer (godbolt.org/z/WjozhxGoW), or on my local machine. All tested on version 1.76.
users.rust-lang.org/t/captur… is the answer. The actual capture algorithm is described here github.com/.../closure-doc/s…...
Why a standalone redirect e.g. `2>/dev/null` gets interpreted as a `cat` command in zsh? The consequence is that then the shell will wait for the cat command which is waiting on stdin ... bash simply does nothing in this case.
It looks like every value expression in rust behaves like xvalue in C++ – it has (or can have) an identity (so it can be borrowed) and can be moved from.
`getcontext/setcontext` are not system calls but why there are getcontext(2)/setcontext(2) entries man7.org/linux/man-pages/man…? `man getcontext.2` also exists although it shows the content for getcontext(3).
How come gcc has `extern inline` with inline definition in the header without running into ODR (xmmintrin.h)?
@davidtgoldblatt helped me! It is because of the __gnu__inline__ attribute which changed the behavior.
If the function is declared extern, then this definition of the function is used only for inlining. In no case is the function compiled as a standalone function, not even if you take its address explicitly. gcc.gnu.org/onlinedocs/gcc-6…



