Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
Trust the World's Fastest VPN with Your Internet Security & Freedom - A Lifetime Subscription of PureVPN at 88% off. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. ×

Comment Re:Linus is a dumb ditch digger (Score 1) 357

NetBSD is nearly a dead platform.

Is it? I switched from FreeBSD to NetBSD in late 2013, there have been some 27k commits on trunk alone since (~1500 in 2017 so far). Also some 30k mails on the mailing lists. Not to say the project couldn't use some funding, but it sure does not seem 'nearly dead'.

when i used it

When did you use it?

Comment Re:A damn good reason to learn security best pract (Score 2) 374

You've got it backwards. Yes, I do know x86 and the pertinent C implementations rather well. But no, since C abstracts those concepts away, there is a) no need to and b) it actually makes things less portable if you have implicit assumptions about what the machine has and does WHEN C ALLOWS YOU TO NOT CARE ABOUT IT.

So please tell me, given the code
int a, *b = malloc(sizeof *b);

What exactly is the advantage of thinking about `a` and `b` as "on the stack" and `*b` "on the heap"? I truly don't get it.
What is the problem with thinking about `a` and `b` as having automatic storage duration+block scope, and `*b` having allocated storage duration? It's THOSE TERMS that have well-defined semantics that EVERY C implementation (including those that put things "on the stack"/"on the heap") *has* to comply with. (That is apart from the fact that something you think is "on the stack" might well be NOT on the stack because it's "in a register", or got opimized out entirely, rendering your stack/heap categorization as a heuristic at best).

Learn some C. Make your programs more portable. You'll end up a better C programmer.

Comment Re:A damn good reason to learn security best pract (Score 1) 374

It was actually a rhetorical question. Standard C does neither specify nor require a stack or a heap, and memory allocation isn't specified in terms of those.
I'm only pointing it out because of the GP implying that knowing about "the stack" implies competence at C, which is far from true.

Or to put it differently:
$ grep -iEc 'stack|heap' c11std.txt
0
$

Comment Re:Uber? (Score 1) 640

Yes, Captn Capslock, I finally do. I wasn't sure I got it after the first dozen people pointing out that US measures BAC in percent as opposed to per mille, but your angry - albeit late - rant convinced me that I must be finally getting it. Thank you so much! I hope you didn't wet yourself over it because it sure sounds like you did.

Slashdot Top Deals

Prediction is very difficult, especially of the future. - Niels Bohr

Working...