HNHacker News
TopNewBestAskShowJobs

tspiteri

1,924 karma · joined May 16, 2008

www.tspiteri.org

[ my public key: https://keybase.io/tspiteri; my proof: https://keybase.io/tspiteri/sigs/12YpbcDWvBDiF1HW66L_acFVS8N9MnonlctvQrsPhHs ]

submissionscomments
tspiteri··on IEEE 754 Floating Point Type in C++
While it does include many sizes, I don't think 80-bit is included. The sizes mentioned in IEEE754-2008 are 16, 32, 64 and then multiples of 32 that are greater or equal to 128 (96 is not included).
tspiteri··on OpenDUNE – An open-source recreation of the game Dune II
You can switch to/from the original form any time with F10.
tspiteri··on OpenDUNE – An open-source recreation of the game Dune II
I remember getting units in one screen, moving the mouse pointer onto a target location in the map, and then doing a series of Tab-M-Clicks: Tab selects the next unit, M selects the Move command, and Click on the target.
tspiteri··on Man donated blood every week for 60 years and helped save 2.4M babies
My pressure sometimes would drop just after the donation while still in the seat, until I figured out it was due to dehydration; the one thing that solves the issue completely for me is drinking plenty of water the day before.
tspiteri··on A coworker stole my spicy food, got sick, and is blaming me (2016)
I don't think the police are there to intervene in petty squabbles like lunch theft, annoying as lunch theft may be. Getting the lunch owner fired, on the other hand, is a serious matter, and firing the thief and HR because of them doing this to the lunch owner is a proportionate response.
tspiteri··on Show HN: SuperString – A fast and memory-optimized string library for C++
In that case it's closer to 50 bytes I think. (Average wrong line length is 105k, as first line is 210k and last line is 0k, so number of lines is 450M / 105k (about 4300), so lines would be 210 / 4.3 = about 50 bytes.)
tspiteri··on Show HN: SuperString – A fast and memory-optimized string library for C++
How is the std string version taking over 450 MB for two copies (original and split into lines) of a 210 kB file?
tspiteri··on The relationship between money and happiness
What this chart shows to me is that GDP is not a good measure of people's wealth. For example Luxembourg is shown as an outlier because it has a very high GDP but not a similarly high satisfaction score. And I think that is because the economy of Luxembourg is largely banking, where the money will just belong to a rich few, not to the average people.
tspiteri··on I've just learned Rust and I think I'm in love
If you want to write a linked list like you do in C, just use pointers instead of references, mark your code as unsafe, and basically you have it.

I'm not suggesting this is a good idea, but I'm tired of the linked list argument which kind of implies Rust is much harder than C for an equivalent linked list implementation. If you explicitly choose to lose the extra guarantees, Rust is about as easy as C to write a linked list in.

tspiteri··on Rust things I miss in C
My mental model of Rust's current overflow behaviour is that "integer overflow is wrapping overflow, but during development it also panics to push me to use explicit wrapping in the code." I'm failing to see how that can qualify as something that "pass[es] the tests but fail[s] in production".
tspiteri··on Rust things I miss in C
Or if this type is used a lot, you can wrap the 16-bit integer inside its own type and overload addition and/or other operators.

    struct Angle(i16);
    impl Add for Angle {
        type Output = Angle;
        fn add(self, rhs: Angle) -> Angle {
            Angle(self.0.wrapping_add(rhs.0))
        }
    }
tspiteri··on Firefox’s new streaming and tiering compiler
To increase the frequency, you also have to increase the voltage so that the transistors charge faster, otherwise they won't be able to switch in the shorter time.
tspiteri··on Asking members to support journalism, The Guardian raises more revenue than ads
How would offshore tax structures help them, considering they're making losses at the moment?
tspiteri··on Flat-Earther Set to Launch Himself in Own Rocket
Nah, he just wants to finish his project, and the one way he has found to fund it is to become a flat-earther and get their money.
tspiteri··on The Supreme Court discussed my research on gerrymandering: some misconceptions
The DUP as king makers in the UK has nothing to do with STV; in fact it is an example of king makers with no STV. There are no STV or multi rep constituencies in British general elections. (In Northern Ireland, STV is used for local elections, but that's something else.)
tspiteri··on Floating Point Visually Explained
And the implication is that the windows all have different sizes, which I do not find intuitive at all.
tspiteri··on Why you should, actually, rewrite some of it in Rust
I've never seen Python or Lua community do that so far.

Back then, wasn't it readable Python versus unreadable Perl?

tspiteri··on The first woman to finish the Boston Marathon in 1967 has run it again at age 70
IIRC women have to start before men for their records to hold, as otherwise women could gain from the faster men's slip stream. Of course, there are still pace makers so even men can take advantage of that, and men can run behind each other and their records would still hold. I think the reasoning is that at least they're running behind/ahead of racers who are competing with them, whereas if women and men started together, the front runners of the women's race would be able to run behind men with whom they are not really competing, and who would thus be less careful about giving them a lift.
tspiteri··on UK Prime Minister Theresa May announces intention to hold general election
Of course you're right. I just pointed out that the Tories and Labour did worse on the issue and suffered less for it. But then, the Lib Dems did the pledge and weren't able to stand up for it, so they did deserve some punishment.
tspiteri··on UK Prime Minister Theresa May announces intention to hold general election
And it is a bit ironic that New Labour introduced tuition fees, the Tories were the coalition partner that wanted to increase them, but it is the Lib Dems who caught all the flak.
tspiteri··on The new £1 Coin
I've had machines refuse one pound coins, which then looked slightly off on closer inspection when comparing to other coins.
tspiteri··on Mathify – Simple Text Equation to LaTeX
delta produces \Delta instead of \delta, so there is no way to get \delta.

Is there a way to produce <= and >=? lt and gt become < and >, which is not so necessary seeing that < and > work fine, but lte and gte do not become \lte or \gte.

In the product prod example, there is nlogn in the source and logi in the rendering.

tspiteri··on 'My life was ruined by a typo'
If police officers are liable to pay the victims, would anyone want to be a police officer, given their relatively low wages? In order to make them liable for such things, you would have to increase their wages a lot. I think one of the problems is that we expect a lot from the police, which we should, but then they are not paid nearly enough for that level of responsibility.
tspiteri··on YC will hold interviews in Vancouver for founders who can’t get US visas
Looking it another way: giving a quote like that which needs to be examined in full to make sure he does not support Trump, and which can so easily be interpreted to support Trump, is quite naive. When you're giving quotes you have to be extremely careful that it is not easy to take them out of context, because that "out of context" is exactly what most people reading the article will understand at first reading.
tspiteri··on Mozilla launches new brand identity
They both use the symbols, but the design is not identical. The curl colon is high off the baseline, while the Mozilla colon is not.
tspiteri··on Mozilla launches new brand identity
That's bound to happen when a logo is based on something so core to the context.
tspiteri··on Dd is not a disk writing tool (2015)
The dd idiom can be used to split a file into parts with known block size, something like

    (dd bs=$SIZE1 count=1 of=file1; dd bs=$SIZE2 ...
tspiteri··on An American airline wins the right to weigh passengers on its Samoan route
A surcharge for obese people because they are obese would be punishing people for their life style. A surcharge based on weight no matter what or why is not nearly as intrusive, and is only making you pay for the resources you use.
tspiteri··on Tesla footage of braking before crash ahead [video]
When the car behind me is driving too close, I leave even more space than usual to the car in front to give myself time to brake slowly if anything happens.
tspiteri··on The Resurgence of C Programming
This is exactly why I was careful enough to include the phrase "in the usual case", because it would not be too hard to doctor a situation where the compiler will not optimize the Option away, either because the compiler is not perfect, or because of some clever juggling, or for some other reason. But in the usual case, you get zero-cost abstraction.
← PreviousPage 4 of 15Next →