Better HN
topnewbestaskshowjobs
Log inSign up

flqn

123 karma · joined Aug 14, 2018 (8y ago) · 108 submissions

Submissions

comment 1mo ago · link · parent

It makes it less ductile, which means it's harder and more resistant to deformation. Bronze is more brittle than copper.

Adding fibres to already brittle materials improves their resilience to tensile forces mostly

comment 8mo ago · link · parent

This is a good change. Potentially ambiguous to read syntax is being made clearer in a way that harms no previous code substantially.

I sometimes wonder if the comments that say nothing more than "C++ is too complicated" are from people who use it regularly, much less people who are even commenting on TFA

comment 8mo ago · link · parent

What is a teapot?

I cannot make one of those.

Refrigerator.

comment 9mo ago · link · parent

Can't pass a PhoneNumber to a function expecting an EmailAddress, for one, or mix up the order of arguments in a function that may otherwise just take two or more strings

comment 9mo ago · link · parent

Dates are unfortunate in that you can only really parse them reliably with a TZDB.

comment 10mo ago · link · parent

Nitpick: icons are about signifiers, not affordances. A button affords being pressed, an icon on the button signifies what pressing it will do.

comment 10mo ago · link · parent

In context, binary breakup and binary fracture apppear to mean a splitting ofa whole into two parts along a given line or plane

comment 11mo ago · link · parent

Since the optimiser is allowed to assume you're not invoking UB, and strlen of null is UB, I don't believe that it would consider that case when optimising this function.

comment 1y ago · link · parent

You mean the same problem that the article is trying to solve in C? Generic data structures?

comment 1y ago · link · parent

"Just FYI I have a PhD in cosmology" is the credentials for the poster being an expert.

comment 1y ago · link · parent

That would certainly catch nearly all migration issues, but it doesn't provide a helpful error message like a test for a specific mistake like this does.

Ideally both approaches would be used, with the general case being used to detect and inform more targeted tests.

comment 1y ago · link · parent

And the Greek mathematician is pronounced OY-clid ;)

comment 1y ago · link · parent

I think the author misspoke and meant to say "easy-to-misuse" instead, which it definitely was.

comment 1y ago · link · parent

The Ninja files being that huge is likely more to do with the Android build environment or the tool that generates them. The main advantages of Ninja as a build executor are that the language is simple and it processes the build graph very quickly.

comment 2y ago · link · parent

They're locale independent, which the C stol, stof, etc functions are not.

comment 2y ago · link · parent

Is the moon not already tidally locked? The same hemisphere of it always faces the earth. Is there a different kind of tidal locking or orbital resonance it will settle into?

comment 2y ago · link · parent

Depending on the area of logistics OP is in, it's not unlikely that he'd need on-call engineers for his logistics management system. Blockages in supply chain can be extremely expensive.

comment 2y ago · link · parent

C++ also has stop_token, so although they're not natively interruptable a mechanism for implementing it exists in the standard.

comment 2y ago · link · parent

It still can't communicate information faster than light and the sun god can't know your prayers earlier than 8min after you made them

comment 2y ago · link · parent

Mathematics doesn't usually deal with databases or http requests

comment 2y ago · link · parent

Perhaps the "rising tide" takes longer to reach some than others. I hope for a more equitable, fairer future, but it's likely my outlook is somewhat jaded.

comment 2y ago · link · parent

I disagree, it's more an argument that even though advancement of human capability can bring great gains (defeating the dragon) we need to pursue equitability in these gains or otherwise they are unethically allocated.

The rising tide should raise ALL boats, otherwise inequitability will lead to social instability as seen througout human history so far.

comment 2y ago · link · parent

A well written fable, but its moral would not be equitable in the world of today. It's inevitable that access to "defeating the dragon" would be available to only the most affluent in society, whom have also led the most comfortable lives. There is no fairness in allowing these people to enjoy extended or indefinite lifespans whilst countless others suffer inhumane conditions only to die early.

comment 2y ago · link · parent

In this case you are assuming not to have P. The traditional idea of "pick 2 of 3" with respect to CAP is weirdly formulated because you either have a distributed system, in which case P is a given and you must trade C vs A, or you don't have a distributed system and can therefore have both C and A.

comment 2y ago · link · parent

Constructs an object from kv pairs, definitely assoctiated with the "Object" prototype. Groupby is more dubious

comment 2y ago · link · parent

Does every set contain the empty set? Arguably yes.

Does every sequence contain the empty sequence? If so, does it not contain the empty sequence at every position in itself? Harder to reason about.

comment 2y ago · link · parent

Not so much "error reporting" as "there is no meaningful return value" for a position in a string -- if it wasn't found, it doesn't have a position.

If you use either Optional or Result you don't need to choose a special value like -1 to be your "invalid string position" case which could be used incorrectly.

I'd argue it's largely stylistic for this example, especially so outside of functional programming niches.

comment 2y ago · link · parent

Depends on your string representation. It's not unreasonable for an empty string to have no internal buffer allocated meaning it wouldn't even have a NUL terminator!
1234