Redkey

joined 2 years ago
[–] Redkey@programming.dev 6 points 3 hours ago

ASM doesn't care about your variable types, because it doesn't care about your variables. What's a variable, anyway? There is only address space.

[–] Redkey@programming.dev 6 points 2 days ago (1 children)

Only Winsocks.

[–] Redkey@programming.dev 4 points 1 week ago* (last edited 1 week ago)

I don't think that even C++ is that bad. Like a lot of shows and music acts, I think it's more the toxic fan base than the thing itself that really sucks. I've had the same feeling with a certain kind of JavaScript programmer.

*Edit for clarity: I'm not saying that the entire C++ community is toxic, just a vocal segment of it, in line with the other examples I gave.

The added difficulty with this in programming is that it can be much harder simply to ignore them, because you may be forced to work with them, or stuck needing to learn something from them (shudder).

[–] Redkey@programming.dev 4 points 2 weeks ago (1 children)

Tail recursion in particular is usually just turned back into a loop at the compiler, and typical modern architectures implement a call stack at the hardware level, which allows you to do limited-depth recursion, but breaks like in OP if you try to go too deep.

Yes, in my experience this is what the term "recursion" means in a programming context; it doesn't usually refer to a mathematical ideal. That was what tripped me up.

[–] Redkey@programming.dev 5 points 2 weeks ago (9 children)

Could someone expand a little on this statement, or point me toward an applicable resource? How do "real" (modern?) CPUs prevent unwanted recursion? As in, not the compiler or the OS, but the CPU itself? I've been searching for a while now but I haven't found anything that clears this up for me.

[–] Redkey@programming.dev 1 points 5 months ago (1 children)

Despite this, I still bet that they post "nvm fixed it" an hour or two later.

[–] Redkey@programming.dev 0 points 1 year ago (1 children)

Of course! There's already a proposal for a replacement Temporal object.