News for hackers. Stuff that matters.
Re:About size_t and ptrdiff_t by seiji on Tuesday August 18, 2015 @12:43PM (#10080246)
ptrdiff_t is signed (because subtraction). size_t is unsigned (because length).

This page is a much shorter summary than the article: http://www.gnu.org/software/libc/manual/html_node/Important-...

Also an important note: if you use special types like ptrdiff_t and size_t, you must not use the underlying native type printf specifiers when printing them. e.g. never print a ptrdiff_t using %ld, use the ptrdiff_t format specifier %td. (because some systems may say ptrdiff_t is long while others may say long long, and all your printf strings will then print compile time warnings.) Also see https://en.wikipedia.org/wiki/Printf_format_string#Length_fi...

Plus, the medium article is a complete copy/paste of this 2009 article: http://www.viva64.com/en/a/0050/ — looks like the account https://news.ycombinator.com/user?id=PVS-Studio is copying from viva64 and posting to medium for a lot of old articles.

Re:About size_t and ptrdiff_t by w0000t on Tuesday August 18, 2015 @01:36PM (#10080721)
Article republished by the author’s permission.

I guess that is one way to write articles.

Re:About size_t and ptrdiff_t by gjm11 on Tuesday August 18, 2015 @01:59PM (#10080920)
The author of the original article is one Andrey Karpov. The Medium article is posted by someone called Sergey Vasiliev Marina Makarova and Andrey Karpov recommend". I guess it's the same Andrey Karpov in both cases, especially as hovering over the name Andrey Karpov on the Medium article indicates that his username is "Code_Analysis" and the original article was posted on the blog of a static-code-analysis company.

Seems legit unless someone's actually impersonating someone else. I don't quite understand why, if Karpov wrote the original article and is a Medium contributor, Vasiliev rather than Karpov should be doing the reposting. (You could imagine something like this: K is a senior technical guy at PVS-Studio, V is a more junior technical guy or is in the marketing department; in 2009 they thought it better to post things under K's name to get it out there, but now K wants only the more impressive articles under his name and lets V post the others. But this doesn't feel terribly plausible.)

Re:About size_t and ptrdiff_t by AndreyKarpov on Wednesday August 19, 2015 @10:52AM (#10085880)
OMG! It is a great conspiracy theory! Everything is clear. Much time has elapsed since then, many people didn't read old articles about 64-bit. But these articles are useful and as we can see attract interest. Plus, the audience has changed. We would like to share with new one a good material. It is impossible to share old link that is why we decided republish some good articles in new places. This information will be interesting for recruits.