Better HN
topnewbestaskshowjobs
Log inSign up

Denvercoder9

5,570 karma · joined Oct 5, 2013 (13y ago) · 1,210 submissions

Submissions

comment 2y ago · link · parent

It's an EU project in the sense that it has received a grant from the EU research program, not in the sense that what they're doing is EU policy.

comment 2y ago · link · parent

USB-PD rev 3.1 supports 5A at 5V with electronically marked cables. It's not a requirement to support it, and it's rare to find in the wild, but it's within the spec.

comment 2y ago · link · parent

I'm not sure based on what exactly you think the performance is very close (video is a terrible way to present information), but in the benchmark shown at the end of the "CPU Performance" section, the Intel beats the Pi by almost 3x.

comment 2y ago · link · parent

The danger of climate change isn't the end of life on Earth, it's the end of human civilization. The planet will be fine, we won't be.

comment 2y ago · link · parent

> maybe 3 years (1000 days) of flying to date per aircraft on average

It's probably a lot less. 950 out of those 1300 aircraft were delivered in the last three years, and the other 350 were grounded throughout most of 2019 and 2020.

comment 2y ago · link · parent

> It wasn't anything specific to the plane's model, it was the fact that it was a manufacturing defect that caused the door to blow out.

We don't know that yet. The NTSB report will tell.

comment 2y ago · link · parent

> Journalctl has advantages, but they're mostly enjoyed by large enterprises.

I don't agree with this. As a single administrator, being able to do `journalctl -u <service>` and get all output from a unit (and its subprocesses), including anything that it erroneously send to stdout or stderr instead of its logfile, is a godsend. Back in the SysV days I had to manually step through initscripts to figure out what's wrong when a daemon immediately exited without logging anything.

comment 2y ago · link · parent

I interpreted GP's comment as asking what the precedence of == was (assumably in C, given that we're discussing a post by Dennis Ritchie). On second read it could also be interpreted as asking what a good precedence for == would be, in which case you're absolutely right. Sorry about that.

comment 2y ago · link · parent

I'm also not familiar with Sail, but you could have a single token ("&&") behave as either a bitwise or logical AND, depending on the context: if both operands are an boolean, operate logically, if both operands are an integer, operate bitwise. The complexity lies in what you do with mixed expressions. One solution is to just forbid them. This makes bitwise expressions nested within logical expressions more verbose (you'd need to add a cast), but I'd wager that those aren't used often in most high-level languages.

comment 2y ago · link · parent

The only operators with precedence between & and && are ^ and |, though. In e.g. the expression from the sibling comment, `a & b == c`, writing & or && doesn't make any difference (aside from short-circuiting). I guess it's an issue if you write & instead of && in an expression that also involves a bitwise-OR (or | instead of || in an expression that also involves logical-AND), but that seems quite rare. I expect that reversing the precedence of the bitwise and logical operators would create problems a lot more often.

comment 2y ago · link · parent

Wrong. In C and C++, == has a higher precedence than && and ||, so `A && B == C && D` parses as `A && (B == C) && D`.

comment 2y ago · link · parent

> `await` is the one with the most variation [..] in C++ it's just barely tighter than assignment.

That doesn't seem right to me. According to cppreference[1] it's the operator with the third-highest precedence, well above assignment, which is the second-lowest.

[1] https://en.cppreference.com/w/cpp/language/operator_preceden...

comment 2y ago · link · parent

> However, the precedence of & vs &&, or & vs ||, etc is a source of problems.

Do you have any examples of this? In my experience you almost always want the bitwise operators to have a higher precedence than the logical operators, as using the result of logical operators as a bitmask makes little sense. Consider e.g. `A & B && C & D`, which currently is equivalent to `(A & B) && (C & D)`, but with reversed precedence would be equivalent to the almost nonsensical `A & (B && C) & D`.

Now, the precedence of == with respect to & and | is actually problematic (as Ritchie admits as well). Having `A == B | C` interpreted as `(A == B) | C` is almost never desirable. For extra annoyance, the shift operators do have higher precedence than comparison, so `A == B << C` does what you usually want (`A == (B << C)`).

comment 2y ago · link · parent

> whatever happened to flying at mach 0.9

Airlines found out that people, in aggregate, care more about ticket prices than about speed. Flying a bit slower allows planes to be more fuel efficient, and thus allows them to offer lower ticket prices.

comment 2y ago · link · parent

> I believe a typical EV has to make do with the equivalent of just 2-3 gallons of gasoline in energy on a full battery charge.

The 57.5 kWh battery in the base Model 3 has the same energy content as just ~1.18 US gallons (4.46 liters) of pure gasoline. Electric motors are a lot more efficient than combustion engines, though.

comment 2y ago · link · parent

> the correct runway to use, C1 or C5.

FWIW, C1 and C5 are not runways, but taxiways leading to the runway.

comment 2y ago · link · parent

Most applications don't need planet scale, though.

comment 2y ago · link · parent

A bit later another commit [1] was merged that makes reads from /dev/urandom opportunistically initialize the RNG. In practice this has the same result as the reverted commit on non-obsolete architectures, which support the jitter entropy generation.

[1] https://github.com/torvalds/linux/commit/48bff1053c172e6c7f3...

comment 2y ago · link · parent

> However, the last time I looked at Linux video decoding (which was years ago), the drivers were awful and interfacing with each vendor's APIs was a huge pain, and so most apps just did video decoding on CPU.

Nowadays VA-API is near universally supported, and any half-decent video player uses it to do hardware decoding.

comment 2y ago · link · parent

You have the right idea, but you got the formula wrong. That's evidenced in the source you link, but you can also reason it from first principles: a higher discount rate should make the cash stream less valuable, not more. The correct formula is n / d.

comment 2y ago · link · parent

Not saying the pay isn't outrageous, but most of the executive pay is in equity, which probably cost Hasbro next to nothing. They can't pay those laid off workers, probably making little more than minimum wage, with that.

comment 2y ago · link · parent

The `6.1.66-1` release with a fix was uploaded to Debian's infrastructure about 2 hours after the bug was filed, but it takes a bit for it to be compiled for all Debian's architectures (the mipsel builder e.g. needed 9 hours) and for it to propgate through the mirror network.

comment 2y ago · link · parent

The way the Debian update process works doesn't make it possible to halt updates immediately. The servers you're getting the updates from aren't controlled by the Debian project itself, but are operated by third parties. They sync their data from a master machine (which is operated by Debian) 4 times per day. If you're using a mirror that's not under the debian.org domain, there might even be another machine or two in between, each adding some delay. So even if Debian pulled the update immediately, which their archive software isn't really setup to do, it'd take a bit for that to propgate through to the mirrors.

If this all seems archaic, keep in mind that all this has been designed 20+ years ago, when bandwidth was quite a bit less abundant.

comment 2y ago · link · parent

The HIBP database only stores hashes of leaked passwords, but the source material is often (always?) plaintext passwords. If the hash of a password is in the HIBP database, the plaintext password is out there somewhere in a database of a malicious actor.

comment 3y ago · link · parent

That's only in C++, type punning through unions is still legal in C.

comment 3y ago · link · parent

This subject was previously discussed here: https://news.ycombinator.com/item?id=38287095

comment 3y ago · link · parent

I don't see how new APIs will help here. The problem is that the semantics that application developers want is expensive (performance-wise), so they use a similar API that doesn't guarantee those semantics but provides them in practice 99% of the time. You could create a new set of API's, but it's really hard to implement any API in a way that doesn't give extra, unspecified semantics in practice, so what prevents application developers from making the same choice?

comment 3y ago · link · parent

> If my 7$ is thrown in a global pool and split by global stream counts this artist gets almost nothing.

Not by definition. If you generate more streams this month than the average user, your streams are a larger fraction of the stream counts than your 7$ is of the revenue pool, and this artist will get paid more than if he only got your 7$.

Splitting the revenue per-user instead of per-stream can certainly make a huge difference, but switching to per-user instead of per-stream benefits artists with listeners that generate a below-average amount of streams per month, regardless of their absolute stream numbers.

comment 3y ago · link · parent

If with lose out you mean that it's not financially sustainable for them, then it's not at all clear to me that's caused by the way Spotify splits revenue, instead of Spotify just being too cheap for users to make streaming viable. Spotify takes in less than five bucks per Premium user per month, so after subtracting costs you need to quite a bit of listeners to make a living, even if Spotify shares it payout per user.

If with lose out you mean that Spotify pays out less per stream to small artists as opposed to big artists, then that's not the claim made in the parent comment nor one I've been able to find any evidence for.

1
8910
41