71 karma · joined Aug 10, 2017 (9y ago) · 249 submissions
comment 8y ago · link · parent
Here in 2018, we still have to roll our own.
Libnop has the right idea, but still fails on two important points:
a) Versioning is a must-have feature. (And no, some weird non-standard 'table' type is not a replacement.)
b) The wire protocol needs to be human-readable ASCII. (Or at least a human-readable ASCII with no performance degradation option must be available.)
comment 8y ago · link · parent
CDN's can help with this somewhat, but a server-to-server network connection will still always be better and faster.
comment 8y ago · link · parent
It is. Online, you can use statistics and probability theory to actually test what's more profitable instead of relying on ad-hoc metrics about what "feels good".
> They chase you around the web, even for products you already decided you didn’t want
These are a small minority of online ads. They're displayed in places where nothing more profitable or contextual can be displayed. (I.e., most websites, since most websites are junk.)
comment 8y ago · link · parent
Just no. The very point of cooperative games is learning to work together as a team. If you can't do that, then you lost the game. Ruining the rules so the game can't be lost is counterproductive.
comment 8y ago · link · parent
Money values are rationals, not reals.
Languages need to support the full number stack, including the rationals!
"Floating point decimal" is wrong and the worst of both worlds. Unless you live in the USA, you need to do currency conversions anyways, and those aren't decimal.
comment 8y ago · link · parent
You misunderstand how context switching works. It doesn't matter how many threads you have -- 5 or 5000. Your OS will switch contexts at a constant rate.
What you perceive as 'context switch overhead' is really process scheduling being too smart for its own good.
99% of the time the problem is solved with a simple round-robin process scheduler. (Called a 'realtime' scheduler in Linux.)
> it is common to see multithreaded applications spending more CPU time on context-switching than actually running application code
No. Like I said, context switching is constant-time overhead for your OS.
comment 8y ago · link · parent
Figuring out a compiler error is significantly easier than having to debug a malfunctioning test.
comment 8y ago · link · parent
Javascript programmers don't need a number type designed for accurately computing trig and square roots and representing pi, but they got one anyways.
comment 8y ago · link · parent
No, they don't. Floats are meant to represent real numbers reasonably accurately.
Real numbers aren't fractions, and the idea of 'rounding' doesn't even apply to reals.
What you want are rational numbers, they solve your use case perfectly.
Floats don't represent rational numbers properly, and they are not meant to.
comment 8y ago · link · parent
In the real world, there are natural numbers, integers, rationals and real numbers.
Computer languages are designed with types that mimic this real-world number stack. Low-level binary implementation details don't leak unless you're overflowing or using bit operations.
What you're really complaining about is the fact that rationals aren't a first-class type in any popular language. With that I agree, it's a shame that corners were cut we three number types instead of four.