HackerTrans
TopNewTrendsCommentsPastAskShowJobs

okl

no profile record

Submissions

Atlas of Humanity

atlasofhumanity.org
3 points·by okl·il y a 16 jours·0 comments

The Everyday Projects

everydayprojects.org
3 points·by okl·il y a 16 jours·0 comments

Show HN: Mutex Service – Team Coordination Tool

mutex.team
1 points·by okl·il y a 7 mois·0 comments

Wikipedia: Incrementalism

en.wikipedia.org
2 points·by okl·il y a 9 mois·1 comments

comments

okl
·il y a 13 jours·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
·il y a 9 mois·discuss
Also there is garage, which I found easy to setup: https://garagehq.deuxfleurs.fr/
okl
·il y a 9 mois·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
·il y a 9 mois·discuss
Did you know that 90% of gamblers quit before they win big? /s
okl
·il y a 9 mois·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
·il y a 10 mois·discuss
https://c-ares.org/
okl
·il y a 5 ans·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
·il y a 5 ans·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
·il y a 5 ans·discuss
Exactly.
okl
·il y a 5 ans·discuss
How do you know that when you don't know what else he was using his GitHub account for?
okl
·il y a 5 ans·discuss
Not different from Google shutting down someone's account, something that's constantly bemoaned on Hacker News.
okl
·il y a 5 ans·discuss
Instead of the government, we let corporations repress deviants.
okl
·il y a 5 ans·discuss
Using someone's code (for free) doesn't mean you can dictate terms to them.
okl
·il y a 5 ans·discuss
Well fuck them. It's his code, he should be able to do with it whatever he wants.