HNHacker News
TopNewBestAskShowJobs

detrino

482 karma · joined July 15, 2013

chris@detrino.org
submissionscomments
detrino··on A small British firm shows that software bugs aren't inevitable (2005)
Small imperative functions are just as easy to make bug free, I don't buy it.
detrino··on Rant: On the C++ std::experimental::variant to come
This is an unrelated point, we were talking about representation.
detrino··on Rant: On the C++ std::experimental::variant to come
I'm just saying you wouldn't use std::variant<T star>, you'd just use T star. Also C++ has the meta-programming capabilities to special variant for pointers.

edit: replaced * with star to defeat italicizer.

detrino··on Rant: On the C++ std::experimental::variant to come
> Or if T is NonZero.

Ok, I wasn't aware of this.

>More importantly, dereferencing a None is not undefined behavior in Rust.

That's an unrelated point. I never said Rust enum's have no advantages.

detrino··on Rant: On the C++ std::experimental::variant to come
This isn't true in general, it's only true when T is a pointer type, in which case C++ would just use a pointer.
detrino··on The magic kernel
Ya, B-spline, as the article defines it: Cubic(1, 0), is an example of a very blurry cubic filter.
detrino··on The magic kernel
If you prefer blurry images such as the author seems to, you can use parameters to your cubic filter to add more blur than the (probably mitchell or catrom) parameters that gimp is using. I'd bet most people would find the result superior to this filter.
detrino··on Emulating Swift's “defer” in C, with Clang or GCC+Blocks
Last time I looked at it, BOOST_SCOPE_EXIT_ALL generated similarly atrocious code, which is a shame because you can write a zero-cost construct in C++11 very easily.
detrino··on Why unikernels might kill containers in five years
Can't you already achieve this with seccomp-bpf?
detrino··on The Hardest Program I've Ever Written
Have you used clang-format at all? It's the first formatting tool that I have come across that I have no problem letting format 100% of my code.
detrino··on Really Random Number Generator
Is gathering 256 bits of entropy a problem that justifies a dedicated piece of hardware?
detrino··on Really Random Number Generator
Why would I want to use this over chacha20 seeded properly?
detrino··on Should I Use Signed or Unsigned Ints? (Part 2)
You are mistaken, left shift is the same for both signed and unsigned and any instance of a left shift turning a signed int into a positive number is just normal underflow.
detrino··on Should I Use Signed or Unsigned Ints? (Part 2)
On modern computers, both unsigned/signed ints are just bit patterns and it's only some operations that differ. add/sub/mul/left-shift are the same, but cmp/div/right-shift differ. Look up twos-complement representation for more information.
detrino··on Should I Use Signed or Unsigned Ints? (Part 2)
I found this odd too. I'd add that comparison and right shift also differ, but signed right shift does have obvious semantics: sign extension. I'd also argue that signed division has obvious semantics: round towards negative infinity, which matches the semantics of right shift with sign extension. I'm saddened that none of C/C++/x86 have native support for this kind of division, it's _always_ what I want from signed division.
detrino··on Moving forward with work on the D language and foundation
Concepts lite has already passed the vote for for C++17.
detrino··on Apps like Tinder are a symptom of gender imbalance in the dating market
You assume women are just interested in getting "a boyfriend" rather than seeking a certain type of man.
detrino··on A Woman Who Spent Six Years Fighting a Traffic Stop
Of course you wouldn't. Why bluster?
detrino··on How odd is a cluster of plane crashes?
And a poor PRNG or poor implementation of a uniform distribution (both extremely common, for example: rand() % max) has more clumps, my question is still valid.

Edit: I wrote a program[1] to fill random pixels based on rand/modulo and mersenne twister/uniform distribution and I could not tell the difference in the generates images.

[1] https://gist.github.com/anonymous/9c726ea636f06900ba3a

detrino··on How odd is a cluster of plane crashes?
Perhaps just an artifact of a weak PRNG or not truly uniform distribution?
detrino··on How We Beat C++ STL Binary Search
It should be noted that their version gives different results to std::upper_bound if your range contains duplicates.
detrino··on How yuppies hacked the hacker ethos
This is an over-simplification of the article which talks about much more than just labels. It talks about things like control of the internet, the destruction of the culture of Silicon Valley, and the people that co-opt hacker culture in an attempt to make money.
detrino··on The Hamburger Menu Doesn't Work
Reading this article I instantly saw parallels to Gnome 3 and it reminded me what a usability nightmare it is.
detrino··on C++ Internals: STL Vector, Part 3
I didn't realize it was scoped this way, that's a nice bonus.
detrino··on C++ Internals: STL Vector, Part 3
What a long winded way to say "that syntax is weird" while totally ignoring that my main point was consistency.
detrino··on C++ Internals: STL Vector, Part 3
It's worse in every way to:

    for (int i = 1; i != 10; ++i)
detrino··on C++ Internals: STL Vector, Part 3
One could argue that trailing return types are more consistent and allow you to switch between return type deduction and explicit return types easier.
detrino··on Eating Spicy Food Linked to a Longer Life
There is a common link in all these longevity studies, whether it be women, mexican americans, people who eat spicy food, etc, and that is height, which has been shown to correlate negatively with longevity (not withstanding malnutrition).
detrino··on Eating Spicy Food Linked to a Longer Life
I don't understand why these studies never seem to control for height.
detrino··on Ask HN: HMH anti-OOP movement
What are those two reasonable objections?
← PreviousPage 2 of 9Next →