Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tspiteri
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
tspiteri
6y ago
You are reducing the number of carries. The article explains it clearly. If you're not convinced by the article, I won't try to convince you. (Edit: the last thing I'll add: you are reducing the number of carries for 64-bit a
32.
▲
by
tspiteri
6y ago
I don't think so. If a core is busy, it's going to be consuming almost the same amount of power whether it's using one ALU or four. So the best strategy is to finish your processing as fast as possible so that you can idle, w
33.
▲
by
tspiteri
6y ago
You're grouping carries. If you have 13 spare bits, you can accumulate 13 additions before you have to take care of carries. Then you have to add some overhead for bit manipulation, but the article's point is that the parallelism
34.
▲
by
tspiteri
6y ago
But the carry propagation blocks parallelism. So by reducing the need to carry, you are getting the parallel gains.
35.
▲
by
tspiteri
6y ago
> Aside: Why 13 bits instead of 12? For our purposes, we’re going to ignore the carries in the most significant limb, allowing numbers to wrap when they overflow past 2^256 - 1 (just like how unsigned addition works in C with normal size
36.
▲
by
tspiteri
6y ago
Yeah, and then there are some jerks that think that by throwing a hissy fit in a meeting they're the next Steve Jobs. Well, they're not. Jerks.
37.
▲
by
tspiteri
6y ago
They can be made to be convicted of perjury. If you have enough trials, you're going to be falsely convicted a few times.
38.
▲
by
tspiteri
6y ago
One of those four features is dereferencing pointers, and unlike references, pointers are not checked by the borrow checker. So you could bypass the borrow checker using unsafe code in a way, though most probably you should not .
39.
▲
by
tspiteri
6y ago
It would have been good to get a Dune 7, because the more the better of course. But if there was a Dune 7, it would not have closed all the ends; if something comes to a complete finish, it means it's dead. As long as life goes on, the
40.
▲
by
tspiteri
6y ago
Book 1 is in a class of its own. Books 2 and 3 are a little slower than 1. Book 4 is very slower as you say. Book 4 brings out the most different reactions: some people even prefer it to 1, some just find it too slow. If you don't like
41.
▲
by
tspiteri
7y ago
Only if there was UB, and the point is that there probably isn't. (I'm not really knowledgeable on the C standard, so I might have misinterpreted something.)
42.
▲
by
tspiteri
7y ago
That says used , not read . And indeterminate , not unspecified . My point was on reading a value, not on acting on the value. I know it looks like nit-picking, and you should just not read uninitialized memory, but I don't think
43.
▲
by
tspiteri
7y ago
Your code is int x; if(x == 0) foo(); if(x != 0) foo(); That is reading the uninitialized value twice. Since it is unspecified, it does not have to be consistent, so you could get the same behavior as non-zero for the first
44.
▲
by
tspiteri
7y ago
As far as I know (and I could be wrong), reading uninitialized memory in C is not UB, but gives an indeterminate value, which may be either an unspecified value or a trap representation. If it is a trap representation, accessing it is indee
45.
▲
by
tspiteri
7y ago
2% of 2 billion is 40 million. So perhaps it was 2% of the whole population.
46.
▲
by
tspiteri
7y ago
Or use the C-u 0 prefix to repeat till there is an error, possibly at the end of buffer. And if you don't want to go on to the end of the buffer, narrow to the required region (C-x n n) and widen afterwards (C-x n w).
47.
▲
by
tspiteri
7y ago
The example won't compile because nickname is just a reference to the first three bytes of name, but then name is cleared, so nickname would be a bad reference. That are two ways to go around this: 1. Print the nickname before cleari
48.
▲
by
tspiteri
7y ago
> What I know from personal experience is that poverty makes one care less about the future. And make stupid decisions like voting for the guy who gives out $1 bread, sprays money in the air and ends up stealing $10mil. What do you mean
49.
▲
by
tspiteri
7y ago
The restrictions are so reasonable that even the GPL would allow supplementing similar terms (if I understand it correctly): https://www.gnu.org/licenses/gpl-3.0.en.html#section7 Quoting the relevant bit: Notwithstandi
50.
▲
by
tspiteri
7y ago
Oh, by field I meant it as a field in a record, not an area of study. For example in some reports I had to check a box for unambiguous text but I had no check box for grammar or spelling. That's some ambiguous text from my part! :)
51.
▲
by
tspiteri
7y ago
There's a difference between bad grammar/spelling and ambiguity; ambiguity is the worse issue. Some journals have fields in their review report where reviewers can say if the text is unambiguous, but no field about grammar or spel
52.
▲
by
tspiteri
7y ago
If he wanted to switch to GPL, he wouldn't have to relicence all the code; just the code that is by him alone. The contributions by others are in a permissive license that is compatible with the GPL, so they could remain in their cur
53.
▲
by
tspiteri
7y ago
And the news here to me is that the Spanish contractor was caught spying. So while it can be argued that the US spying is no news story, the spying by the security company is.
54.
▲
by
tspiteri
7y ago
Using that reasoning, there was no story when Klaus Fuchs was caught spying on the Manhattan Project for the Soviet Union: Of course the Soviet Union intelligence were spying on the Manhattan Project, if they weren't spying on it they&
55.
▲
by
tspiteri
7y ago
It was 121 seconds faster than his own world record.
56.
▲
by
tspiteri
7y ago
No, they cannot all be 9 bits, they have higher minimums. https://en.wikipedia.org/wiki/C_data_types#Basic_types
57.
▲
by
tspiteri
7y ago
> If you’re gripping a laptop in one hand, a thinner body is easier to hold. Is it though? If you're trying to hold six closed laptops in the same hand, thinner might be better, but when holding one laptop in one hand, it's wei
58.
▲
by
tspiteri
7y ago
How about "Forty-two"?
59.
▲
by
tspiteri
7y ago
> Isn't horse racing gambling a ripe area for the Hong Kong protesters to disrupt? That is a very bad idea. The protestors are already against one powerful actor. If they are against a second powerful actor, and something sinister h
60.
▲
by
tspiteri
7y ago
Word of warning, the entire series of books should be considered the six books written by Frank Herbert, not any of the poor worse-than-fan-fiction by Brian Herbert + Kevin J Anderson.
More ›