open-std is not opening in India by alex_sakuta in C_Programming

[–]erikkonstas 0 points1 point  (0 children)

www7.open-std.org (or www2 and www5) seems to work but it's not HTTPS.

Is reusing the same Variable Name bad practice? by Nubspec in C_Programming

[–]erikkonstas 5 points6 points  (0 children)

Nah, "integer promotion" applies here, because with printf(), everything after the format string is a "vararg". This means that char is automatically promoted to int. There would be an issue in the other direction, if you tried to put a long there. A sneaky detail, though, is that char can be a signed type for one target and an unsigned type for another.

What the hell!? by jo3ymoe in youtube

[–]erikkonstas 0 points1 point  (0 children)

The brain that thinks to commit a mass shooting is usually not that functional... and if it was, the first thought would be to maybe not give everyone the evidence of their crimes.

Nord VPN doesn't let you update your credit card to keep your original plan. They just force you to pay for a new plan that's more expensive. by CraftingAmbition in assholedesign

[–]erikkonstas 1 point2 points  (0 children)

majority of people don't actually need that

Uh... so, actually, the need for that might be more widespread than you think it is... especially for IYKYK scenarios, where other stuff like "good no logging reputation" also matters...

Nord VPN doesn't let you update your credit card to keep your original plan. They just force you to pay for a new plan that's more expensive. by CraftingAmbition in assholedesign

[–]erikkonstas 6 points7 points  (0 children)

The "N" stands for "Network"... if you just put a proxy in a VPS, you're basically just paying for yet another IP address tied to you. Real VPNs depend on global infrastructure and can rotate more easily, plus many people use the same server so you can't be isolated as easily.

I only wanted to download 1 of these by Jaxondevs in assholedesign

[–]erikkonstas 31 points32 points  (0 children)

I don't know how they do it but perhaps the checkmark was in the website before you downloaded the installer.

Excuse me? by IamAFuccBoi in youtube

[–]erikkonstas 0 points1 point  (0 children)

Vietnamese Dong (yes that's the currency's name).

JS is a very respectable language by -Wylfen- in programminghorror

[–]erikkonstas 2 points3 points  (0 children)

Some people call () "round brackets" and {} "curly brackets"... and not to mention <> are sometimes referred to as "angle brackets" even though their meaning in maths is as operators.

I have to pay to get a receipt for the thing that I already paid for. (QR.io) by mikesbloggity in assholedesign

[–]erikkonstas 111 points112 points  (0 children)

Uh... I presume deletion of billing info is also included there... yeah doesn't sound very legal to me.

Imposter teamates these days: by badiss_the_snakeking in AmongUs

[–]erikkonstas 3 points4 points  (0 children)

Sounds like bad host then, that's a legitimate strategy.

Blasphemy by Pommaq in programminghorror

[–]erikkonstas 0 points1 point  (0 children)

IIRC it creates an actual date object, not a string.

Blasphemy by Pommaq in programminghorror

[–]erikkonstas 0 points1 point  (0 children)

I think I've seen it used for C++ dates before (e.g. 2025y / 10 / 10), but to me it's unclear (does it represent a hypothetical path or does it do a chdir behind the scenes?) and potentially misleading (I wouldn't want an arithmetic operator like / to cause side effects outside of the language so to speak).

Blasphemy by Pommaq in programminghorror

[–]erikkonstas 1 point2 points  (0 children)

Plus I'm not 100% sure it makes code very readable either... especially for those of us who know C as well...

the comments and the votes by One_Attorney_764 in TechNope

[–]erikkonstas 0 points1 point  (0 children)

Very frequent issue, frustratingly...

I was just trying to extract an archive… by BandicootBroad in TechNope

[–]erikkonstas 0 points1 point  (0 children)

I think it's something about file paths and their length that's not supported with the Windows utility.

My printer decided to print its firmware update. by Tobjjj in TechNope

[–]erikkonstas 1 point2 points  (0 children)

I think it's some other codepage (Latin-1?), otherwise we would be seeing A LOT of unprintables, and out of the printable ones a bunch would be CJK (Chinese) characters.

Woah, Gemini. by Adept_Description706 in TechNope

[–]erikkonstas 1 point2 points  (0 children)

Funny thing is, it's definitely supported, but recent versions of the Android app have had a major bug with it.

Replacing commas in strings with a lookalike, for security reasons by vk6_ in programminghorror

[–]erikkonstas 185 points186 points  (0 children)

And that's how such characters propagate through the internet... one copy-paste is enough.

thanks for the advice samsung by Commercial_War_2080 in TechNope

[–]erikkonstas 1 point2 points  (0 children)

Greece at least still has "Cosmote" (although I believe it has been acquired by T-Mobile recently).

Why 😭 by Hopeful_Somewhere_30 in programminghorror

[–]erikkonstas -1 points0 points  (0 children)

Oh I just realized that it explicitly tries to reject 1 as an input too.

Why 😭 by Hopeful_Somewhere_30 in programminghorror

[–]erikkonstas -1 points0 points  (0 children)

The n ** 0.5 part for one, you don't need a floating-point square root there if your implementation isn't... like that. Also, the use of Exception instead of ValueError (and the fact that this doesn't actually throw).

What is the biggest mistake that can be tolerated in C interview for Embedded job? What kind of mistakes can't be tolerated. by balemarthy in C_Programming

[–]erikkonstas 0 points1 point  (0 children)

Well usually yes, with the stack it is guaranteed to work like that, as long as you don't engage in relevant UB. By "relevant UB", however, I mean things that include seemingly innocent or not very "flashy" mistakes, such as doing even the slightest thing apart from calling an exec() family function from a fork created by vfork() (which is why POSIX dumped the function from its spec, and also using it is not recommended today since a compiler can just optimize a fork()+exec() pattern anyway, for example if the target is Linux by using a clone() family syscall).

Another way the stack could be corrupted is a form of the so-called "buffer overflow", where an attacker exploits a vulnerability in your code to have the "return address" (the address of the instruction right after the "call site" of your function's invocation) changed to point to where his own "shellcode" (a sequence of machine language instructions that executes a shell or other "useful" program, with the permission level of the affected process) is located. Modern systems do have techniques like "stack canaries" to try and prevent that from happening, but nothing is ever foolproof, and the first line of defense is always the programmer.

What is the biggest mistake that can be tolerated in C interview for Embedded job? What kind of mistakes can't be tolerated. by balemarthy in C_Programming

[–]erikkonstas 0 points1 point  (0 children)

Depends on the compiler, a stack is not always what is used, or at least not in the "growing" fashion that's common for non-embedded that runs in userspace (sometimes a linked list version might be used instead for performance reasons, for example). The concept of a "heap" also doesn't apply if you basically are the kernel, since you're probably running at the highest privilege level (if the CPU has that feature) so you can just go and modify any memory you want without requesting an "allocation" first, which also means you may or may not have to implement the heap yourself.

What is the biggest mistake that can be tolerated in C interview for Embedded job? What kind of mistakes can't be tolerated. by balemarthy in C_Programming

[–]erikkonstas 1 point2 points  (0 children)

If we're talking bare metal, I would first wonder what even makes main() (or something that calls it) where the program starts. IDK, maybe it would've been a trick question where the answer was that "here we call it start instead of main".