Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
detrino
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
31.
▲
by
detrino
11y ago
Small imperative functions are just as easy to make bug free, I don't buy it.
32.
▲
by
detrino
11y ago
This is an unrelated point, we were talking about representation.
33.
▲
by
detrino
11y ago
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.
34.
▲
by
detrino
11y ago
> 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.
35.
▲
by
detrino
11y ago
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.
36.
▲
by
detrino
11y ago
Ya, B-spline, as the article defines it: Cubic(1, 0), is an example of a very blurry cubic filter.
37.
▲
by
detrino
11y ago
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 super
38.
▲
by
detrino
11y ago
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.
39.
▲
by
detrino
11y ago
Can't you already achieve this with seccomp-bpf?
40.
▲
by
detrino
11y ago
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.
41.
▲
by
detrino
11y ago
Is gathering 256 bits of entropy a problem that justifies a dedicated piece of hardware?
42.
▲
by
detrino
11y ago
Why would I want to use this over chacha20 seeded properly?
43.
▲
by
detrino
11y ago
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.
44.
▲
by
detrino
11y ago
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
45.
▲
by
detrino
11y ago
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 infin
46.
▲
by
detrino
11y ago
Concepts lite has already passed the vote for for C++17.
47.
▲
by
detrino
11y ago
You assume women are just interested in getting "a boyfriend" rather than seeking a certain type of man.
48.
▲
by
detrino
11y ago
Of course you wouldn't. Why bluster?
49.
▲
by
detrino
11y ago
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
50.
▲
by
detrino
11y ago
Perhaps just an artifact of a weak PRNG or not truly uniform distribution?
51.
▲
by
detrino
11y ago
It should be noted that their version gives different results to std::upper_bound if your range contains duplicates.
52.
▲
by
detrino
11y ago
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 a
53.
▲
by
detrino
11y ago
Reading this article I instantly saw parallels to Gnome 3 and it reminded me what a usability nightmare it is.
54.
▲
by
detrino
11y ago
I didn't realize it was scoped this way, that's a nice bonus.
55.
▲
by
detrino
11y ago
What a long winded way to say "that syntax is weird" while totally ignoring that my main point was consistency.
56.
▲
by
detrino
11y ago
It's worse in every way to: for (int i = 1; i != 10; ++i)
57.
▲
by
detrino
11y ago
One could argue that trailing return types are more consistent and allow you to switch between return type deduction and explicit return types easier.
58.
▲
by
detrino
11y ago
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).
59.
▲
by
detrino
11y ago
I don't understand why these studies never seem to control for height.
60.
▲
by
detrino
11y ago
What are those two reasonable objections?
More ›