HNHacker News
TopNewBestAskShowJobs

otabdeveloper2

71 karma · joined August 10, 2017

submissionscomments
otabdeveloper2··on Is Cobol holding you hostage with Math?
Daily reminder: floats are emulated reals.

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.

otabdeveloper2··on Libaco: A fast and lightweight C asymmetric coroutine library
> First, context-switching in coroutines is at least a thousand times faster than with threads.

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.

otabdeveloper2··on Testing Memory Allocators: ptmalloc2 vs. tcmalloc vs. hoard vs. jemalloc
OS allocators allocate pages, userspace allocators use the OS allocator to allocate bytes.
otabdeveloper2··on DjVu, an open PDF alternative
Every Linux distribution comes bundled with a DjVu viewer by default. I don't think it will be a problem.
otabdeveloper2··on My Teenage Video Game Obsession Wasn't 'Gaming Disorder'
Video games are vice (like beer or cigarettes), not a hobby.
otabdeveloper2··on IPv6 excuse bingo
> and it's amazing to have so much flexibility in your addressing.

More flexibility than having the entire 10.* block to yourself? What are you, Google?

otabdeveloper2··on Apple needs to tackle the issue of smartphone addiction
> "Pain killer manufacturers need to tackle the issue of opiate addiction"

Looks like they already have, lol (all the way to the bank).

otabdeveloper2··on Could a Neuroscientist Understand a Microprocessor? (2017)
Or perhaps the brain works nothing like a CPU.

(The very idea that it does is actually laughable, akin to medieval fantasists imagining that flying machines must have huge white wings with fleshy feathers.)

otabdeveloper2··on Playing Video Games with My Son Isn’t What I Thought It Would Be
Video games are a vice, not a hobby.

Giving your child video games is like giving him beer. (I learned this from bitter experience.)

otabdeveloper2··on C++ Core Guidelines
You've obviously never written any C++. The point of templates is precisely the fact that they make debugging easier, by replacing runtime assertions and bugs with cryptic compile-time error messages.

Figuring out a compiler error is significantly easier than having to debug a malfunctioning test.

otabdeveloper2··on DEC64: Decimal Floating Point
Yeah, you're right, there's a good historic reason for this current mess. Computing originated in scientific computational math problems, so the algorithms and data types are biased for that.

Javascript programmers don't need a number type designed for accurately computing trig and square roots and representing pi, but they got one anyways.

otabdeveloper2··on DEC64: Decimal Floating Point
So-called 'decimal' numbers are just rationals with a specific set of denominators.

No sense in special casing the number 10 when you can have proper rational numbers with almost equal effort.

otabdeveloper2··on DEC64: Decimal Floating Point
> For Floats in particular, binary implementation details leak all the time due to rounding.

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.

otabdeveloper2··on DEC64: Decimal Floating Point
There's no such thing as a "binary" or "decimal" number.

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.

otabdeveloper2··on How Google Chrome’s ad blocker works
>*There are real issues with non-annoying ads, like tracking,

99% of online tracking comes from Google Analytics, not ads.

> ...but I don't think most people know or care very much about that.

Indeed...

otabdeveloper2··on How to Print Integers Really Fast
> It’s a stupid problem to have–just use a binary format

Not really. A safe, efficient and future-proof binary format is not a simple problem to solve. At the very least, you'll need something like base-127 encoded digits.

At this point you might as well go with base 10 and have human readability as a side bonus.

P.S. "Just use protobuf" is not a solution either. It's only an option because you're using a pre-built library solution, and there's no apriori reason to pick protobuf over some other pre-built solution.

otabdeveloper2··on Why doesn’t Apple make its devices as carefully as it’s making Apple Park?
Real estate is where corporations go to die, regardless of what they were originally making.
otabdeveloper2··on Pure: a modern functional programming language based on term rewriting
Isn't this basically bubble sort?
otabdeveloper2··on Previous Evidence of Water on Mars Now Identified as Grainflows
'How' is not interesting, the real question is 'why'.

There's nothing there on Mars that would ever make human habitation profitable or self-sustaining.

otabdeveloper2··on XML? Be cautious
XML is not a serialization format. It's a structured document format. For, you know, human text and stuff.

When used as intended it is wonderful.

otabdeveloper2··on Taking meldonium for performance enhancement
Yes, meldonium is prescribed to help with recovery after stress and injury. It won't make you stronger or faster or tougher.
otabdeveloper2··on Taking meldonium for performance enhancement
In a technical sense, yes.

But really it's only prohibited because it's not licensed by Western corporations.

In Eastern Europe meldonium is an over-the-counter drug that's routinely prescribed for all sorts of maladies and is considered a very mild and inoffensive medicine, just a step above drinking green tea.

otabdeveloper2··on Taking meldonium for performance enhancement
Meldonium isn't doping. It's an antioxidant, like drinking a cup of coffee.
otabdeveloper2··on Why GitHub Can't Host the Linux Kernel Community
Some things need to be gatekept. (One obvious example is OS kernels.)

If you won't submit a kernel patch because you feel that email is unfashionable, then you're kind that should be kept out of the gate. Sorry.

← PreviousPage 8 of 8