Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
eMSF
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
121.
▲
by
eMSF
6y ago
>Resisting arrest should not lead to death Yes, the world is not perfect in many ways. That does not remove the logical fallacy of implying that because police are ( wrongly , as you say) a mortal threat to those who resist arrests, ther
122.
▲
by
eMSF
6y ago
No. Also, among other things you might in bad faith argue that I imply – but I do not – is that even if that was the case, killing him would've been OK. What I actually implied was that I hardly think these two are very good examples o
123.
▲
by
eMSF
6y ago
Buses are a great place to catch airborne disease. As a whole, the deal with public transportation is a lot less rosy than some of the proponents would like one to believe.
124.
▲
by
eMSF
6y ago
It is just an example. You can think of "measuring size" here as getting the result of a long computation that involves a lot of allocations. After you get the result, you no longer care about the intermediate stuff – i.e. all the
125.
▲
by
eMSF
6y ago
>Not to mention that coding style may require that function calls broken to 2 lines must have the arguments aligned at the opening parenthesis. That doesn't result in any problems with using <TAB>s, unless the coding style als
126.
▲
by
eMSF
6y ago
Yes. Also, %p isn't non-standard, however the conversion is implementation-defined. (The reason why I used the word technically earlier was because on all common platforms int-pointers and void-pointers – and indeed all object pointers
127.
▲
by
eMSF
6y ago
>* Casting NULL is pointless, as it's already defined by the standard to be a pointer constant, compatible with all data pointers. You should still cast NULL when passed as an unnamed argument to a variadic function. While NULL is d
128.
▲
by
eMSF
6y ago
You can (implicitly) convert it to another pointer type, e.g. int *buf = malloc(sizeof(*buf)); (It's noteworthy that while there's an implicit conversion above, there's no such thing as an implicit cast.)
129.
▲
by
eMSF
6y ago
>extrapolating to 50kB gives me 0.3625 seconds It should give you much more than that, considering that the green (SHA256) graph hits almost 0.1s at just 1000 bytes of input. >either crypt() is doing much more than I tought (is saltin
130.
▲
by
eMSF
6y ago
>For one, a sha256 hash of 50kB would take a good quarter of a second (possibly more, I just ). You're probably thinking 50MB. Hashing 50kB should be almost instantaneous.
131.
▲
by
eMSF
6y ago
A comment from the cat example: >/* For each block of the file we need to read, we allocate an iovec struct which is indexed into the iovecs array. This array is passed in as part of the submission. If you don't understand this
132.
▲
by
eMSF
6y ago
Private schools are rather rare, and most of them follow the national curriculum. I don't think their small existence affects policy changes like this much at all.
133.
▲
by
eMSF
6y ago
>Had they not heard the phrase “if it ain’t broke, don’t fix it!”? Not only that, but the current administration may have vastly overestimated their own influence in the previously great PISA results. Putting all their “smarts” into over
134.
▲
by
eMSF
6y ago
Somewhat ironically a consent wall is exactly what TechCrunch presents to an EU visitor the first time, and there's no opting out; only way to get past the consent dialog is to consent. I know this especially well because I automatical
135.
▲
by
eMSF
6y ago
There is no issue here (except the one highlighted by joejev). Many standard library functions return a pointer which they got as a parameter (or another pointer offset from it, as is the case here). The compound literal is no more "te
136.
▲
by
eMSF
6y ago
I didn't get even that far with VS Code snap. I realize I have to soon upgrade from Ubuntu 16.04, so a while ago I installed 19.10 to see what to roughly expect from 20.04, as there are quite a few changes. Trying things out, I install
137.
▲
by
eMSF
6y ago
AFAIK noexcept is a C++ specifier that isn't valid C. Even so, it has nothing to do with the loop, but in C++ it would cause the program to terminate if an exception occurred in the sw function.
138.
▲
by
eMSF
6y ago
The main reason is that in C, "indexing" an array is purely syntactic sugar for pointer arithmetic, which itself is commutative; that is. ((A)[B]) is equivalent to ((A)+(B)), which itself is equivalent to ((B)+(A)) (assuming one o
139.
▲
by
eMSF
6y ago
>We should stop assuming any string data is a fixed-length encoding. This is a major disadvantage of UTF-8, because it allows for this conflation. Mistaking a variable-width encoding for a fixed-width one is specifically a UTF-16 probl
140.
▲
by
eMSF
6y ago
or with caf for any of them.
141.
▲
by
eMSF
7y ago
>.querySelectorAll() does not return a list of elements. It returns a NodeList, which is different to the HTMLCollection that the other methods return. For a start, NodeLists aren't iterable in the same way as HTMLCollections. You c
142.
▲
by
eMSF
7y ago
Disregarding Leap Day, it's been the same amount of days since last September as every other year, and while there has been little snow or freezing temperatures, it was still rather too cold to comfortably sit outside all winter (winte
143.
▲
by
eMSF
7y ago
The perception of Apple's Midas Touch has never been dependent on banal things like objective comparisons.
144.
▲
by
eMSF
7y ago
>ESR is not only an ultra-libertarian You say that like it's a bad thing...
145.
▲
by
eMSF
7y ago
> I was born in 1976. I understand that in the eyes of millennials 1976 is around the same time period as 1796. My son sometimes asks me if TV was invented when I was a child. Assuming these sentences are somehow connected, and you have
146.
▲
by
eMSF
7y ago
>The output of the above program will be “NULL is 0”, so it is quite evident that NULL is defined as “0” in C language. To be pedantic, all that's evident from the observed behaviour is that in C, NULL compares equal to the integer
147.
▲
by
eMSF
7y ago
The file name's position is not magical; it's linked to the -f flag. tar -c [files...] -f archive.tar The thing is, for both basic compressing and decompressing you don't actually have to memorize all that much:
148.
▲
by
eMSF
7y ago
>I mean, I know because I've used it enough Perhaps you mean that you've looked it up. Others could do so, too; it's not that hard (even if a web comic makes light-hearted fun of the subject)! Anyway, here's a fun fac
149.
▲
by
eMSF
7y ago
I doubt it's not classified as a motor vehicle - it's just not classified as a car, but a light quadricycle (L6e). Similar ICE-powered vehicles are rather popular with younger folks and some of the elderly, at least in countries w
150.
▲
by
eMSF
7y ago
Almost white text on a white background. Judging by the colours, you could guess that the body of the article is supposed to be the least important part of the page. Or maybe I'm just old-fashioned.
More ›