HackerTrans
TopNewTrendsCommentsPastAskShowJobs

okl

no profile record

Submissions

Atlas of Humanity

atlasofhumanity.org
3 points·by okl·16 दिन पहले·0 comments

The Everyday Projects

everydayprojects.org
3 points·by okl·16 दिन पहले·0 comments

Show HN: Mutex Service – Team Coordination Tool

mutex.team
1 points·by okl·7 माह पहले·0 comments

Wikipedia: Incrementalism

en.wikipedia.org
2 points·by okl·9 माह पहले·1 comments

comments

okl
·13 दिन पहले·discuss
strncpy was originally used to write into fixed length buffers[1]. This becomes obvious when considering the padding behavior, as described in the C standard[2]: "If the array pointed to by s2 is a string that is shorter than n characters, null characters are appended to the copy in the array pointed to by s1, until n characters in all have been written."

strlcpy, often touted as a replacement, does not elicit the padding behavior but has another flaw: It is supposed to return the length of the string it tried to create, for example, so the user can call realloc without calling strlen again.[3] However, this final "strlen-tail" in strlcpy isn't bounded by the size parameter which describes dest, not src.

While strscpy is a marked improvement, there is still something to be careful about: It can read past the end of the src-buffer, when sizeof src < sizeof dest and src is not nul-terminated.[4] (Set the count argument to something like min(sizeof dest, sizeof src) to avoid that).

--

[1] - https://softwareengineering.stackexchange.com/a/438090

[2] - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf, 7.26.2.5 p. 3

[3] - https://manpages.debian.org/jessie/libbsd-dev/strlcpy.3.en.h...

[4] - https://manpages.debian.org/testing/linux-manual-4.8/strscpy...
okl
·9 माह पहले·discuss
Also there is garage, which I found easy to setup: https://garagehq.deuxfleurs.fr/
okl
·9 माह पहले·discuss
Game theoretic modelling commonly results in early escalation followed by a slower de-escalating as a winning strategy. Fits into the strong-arm approach to politics of exercising power to expand power which the current US administration seems to follow. Thus, I wouldn't think that decoupling or falling of a cliff is the intended goal.
okl
·9 माह पहले·discuss
Did you know that 90% of gamblers quit before they win big? /s
okl
·9 माह पहले·discuss
Problem here is that the excessive focus on secondary issues raises the perception of a problem solving deficit which reduces support/legitimacy for the political system.

It would be nice to focus on solving more existential problems of which there are enough.
okl
·10 माह पहले·discuss
https://c-ares.org/
okl
·5 वर्ष पहले·discuss
> If a major FOSS Linux distro decided to add a virus to their latest release, would you say the same thing?

https://www.eff.org/deeplinks/2012/10/privacy-ubuntu-1210-am...
okl
·5 वर्ष पहले·discuss
I agree that it was a dick move from his side. Fork his project, or use an older version. I am not convinced that him breaking his code is something that ought to be punished.

GitHub gets the right to close their hand while Marak doesn't.
okl
·5 वर्ष पहले·discuss
Exactly.
okl
·5 वर्ष पहले·discuss
How do you know that when you don't know what else he was using his GitHub account for?
okl
·5 वर्ष पहले·discuss
Not different from Google shutting down someone's account, something that's constantly bemoaned on Hacker News.
okl
·5 वर्ष पहले·discuss
Instead of the government, we let corporations repress deviants.
okl
·5 वर्ष पहले·discuss
Using someone's code (for free) doesn't mean you can dictate terms to them.
okl
·5 वर्ष पहले·discuss
Well fuck them. It's his code, he should be able to do with it whatever he wants.