Better HN
topnewbestaskshowjobs
Log inSign up

otabdeveloper2

71 karma · joined Aug 10, 2017 (9y ago) · 249 submissions

Submissions

comment 8y ago · link · parent

It's insane that with this proliferation of serialization libraries none of them are still usable for real-world work.

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

> Do You Really Know CORS?

Of course I don't, nobody does.

comment 8y ago · link · parent

It's the opposite, actually. Servers have very good and very fast network connections to other servers. Clients have very shitty network connections, especially with wi-fi or mobile devices.

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

> the failing of the metric system

Really? If that's an example of 'failing', I'd like to see what success looks like.

comment 8y ago · link · parent

> An Embeddable NoSQL Database Engine

So, std::unordered_map?

comment 8y ago · link · parent

It won't. Google owns the Internet. What are you going to do? Leave and start your own internet? Get real.

comment 8y ago · link · parent

> Is it really more profitable

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

We need a variant of Greenspun's tenth rule for systems programming languages.

Any sufficiently old systems programming language that aims for simplicity and clean code will eventually devolve into a variant of C++, except ad-hoc and poorly specified.

comment 8y ago · link · parent

You're right. For example, there's a similar distinction in Russian.

comment 8y ago · link · parent

'On a course' implies that there's some sort of definite plan and resources delegated to the task. Which isn't true of Firefox and Rust, as far as I know.

comment 8y ago · link · parent

> 0 being the only good choice

Devil's advocate: why not a maximum integer like 18446744073709551615 or 9223372036854775807?

0 looks like a valid number, while 18446744073709551615 is an obvious NaN for any programmer looking at the output.

comment 8y ago · link · parent

Come on, it's not like shell scripts are debugable.

comment 8y ago · link · parent

> a cooperative game that limits communication (which is essential for any cooperative game, to prevent quarterbacking)

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

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.

comment 8y ago · link · parent

> 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.

comment 8y ago · link · parent

OS allocators allocate pages, userspace allocators use the OS allocator to allocate bytes.

comment 8y ago · link · parent

Every Linux distribution comes bundled with a DjVu viewer by default. I don't think it will be a problem.

comment 8y ago · link · parent

Video games are vice (like beer or cigarettes), not a hobby.

comment 8y ago · link · parent

> 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?

comment 8y ago · link · parent

> "Pain killer manufacturers need to tackle the issue of opiate addiction"

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

comment 8y ago · link · parent

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.)

comment 8y ago · link · parent

Video games are a vice, not a hobby.

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

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

> 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.

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

>*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...

1
56789