2,624 karma · joined Sep 14, 2009 (17y ago) · 1,047 submissions
Github: http://github.com/halayli/
Hydrolix Inc founder/co-founder
comment 6mo ago · link · parent
being a developing country or not is orthogonal to what you have described. The top developed nations have one or more of these issues.
comment 6mo ago · link · parent
comment 8mo ago · link · parent
comment 8mo ago · link · parent
comment 8mo ago · link · parent
comment 8mo ago · link · parent
comment 8mo ago · link · parent
comment 8mo ago · link · parent
comment 8mo ago · link · parent
comment 8mo ago · link · parent
The C++11 threadsafety guarantee on static initialization is explicitly scoped to block local statics. That's not an implementation detail, that's the guarantee.
The __cxa_guard_acquire/release machinery in the assembly is the standard fulfilling that contract. Move to a private static data member and you're outside that guarantee entirely. You've quietly handed that responsibility back to yourself.
Then there's the static initialization order fiasco, which is the whole reason the meyers singleton with a local static became canonical. Block local static initializes on first use, lazily, deterministically, thread safely. A static data member initializes at startup in an order that is undefined across translation units. If anything touches Instance() during its own static initialization from a different TU, you're in UB territory. The article doesn't mention this.
Real world singleton designs also need: deferred/configuration-driven initialization, optional instantiation, state recycling, controlled teardown. A block local static keeps those doors open. A static data member initializes unconditionally at startup, you've lost lazy-init, you've lost the option to not initialize it, and configuration based instantiation becomes awkward by design.
Honestly, if you're bottlenecking on singleton access, that's design smell worth addressing, not the guard variable.
comment 9mo ago · link · parent
comment 9mo ago · link · parent
The electromagnetic field is naturally a single complex valued object(Riemann/Silberstein F = E + i cB), and of course Maxwell's equations collapse into a single equation for this complex field. The symmetry group of electromagnetism and more specifically, the duality rotation between E and B is U(1), which is also the unit circle in the complex plane.
comment 9mo ago · link · parent
comment 11mo ago · link · parent
comment 11mo ago · link · parent
comment 11mo ago · link · parent
https://clang.llvm.org/docs/AttributeReference.html#counted-...
comment 1y ago · link · parent
https://pubs.opengroup.org/onlinepubs/7908799/xsh/brk.html
> The behaviour of brk() and sbrk() is unspecified if an application also uses any other memory functions (such as malloc(), mmap(), free()). Other functions may use these other memory functions silently.
comment 1y ago · link · parent
most of the claims you're making against zod is inaccurate. the readme feels like false claims by ai.