News for hackers. Stuff that matters.
Re:.C as a file extension for C++ is not portable by Joker_vD on Thursday May 13, 2021 @07:47AM (#27141014)
Over the last 7 years I've seen many small or hobby projects on GitHub that started non-portable, and there would always be an issue/comment about "how do I compile it on my OS?". Now, it's completely anecdotal and recalled from memory, but the reactions of Windows-based developers to "doesn't compile on Linux" was generally "OK, I'll try to take a look", while the reaction of Linux-based developers to "doesn't compile on Windows" was generally "switch to Linux or try to compile with Cygwin but honestly, idgaf lol".

Have you ever seen a Windows program that to tries to create "etc" directory in the C:'s root and put its config files there? I've seen, and it was "ported" from Linux.

Re:.C as a file extension for C++ is not portable by SAI_Peregrinus on Thursday May 13, 2021 @09:21AM (#27141763)
Windows is expensive. Linux is free. Now that MS offers free trial Windows VM images for developers it's less of an issue, but traditionally it's been significantly cheaper for a Windows dev to set up a Linux system than for a Linux dev to set up a Windows system.
Re:.C as a file extension for C++ is not portable by jolmg on Thursday May 13, 2021 @05:59PM (#27148014)
> Now, it's completely anecdotal and recalled from memory, but the reactions of Windows-based developers to "doesn't compile on Linux" was generally "OK, I'll try to take a look",

This is just my prejudice, I haven't actually checked, but I think most projects that have support for both Linux (or Unix-y OSes) and Windows generally start with Linux/Unix and then have Windows support added. I think the opposite is rare.

Maybe things changed? I think most Windows developers say 10 or 15 years ago might not even know what Linux is, or have heard the word as some obscure technology used by few. In other words, I would have expected a Windows developer to respond to "doesn't compile on Linux" the same as they would for e.g. "doesn't compile on Plan 9", or whatever is still very obscure relative to Windows nowadays.

Re:.C as a file extension for C++ is not portable by nanis on Thursday May 13, 2021 @06:37PM (#27148377)
I used to post on test failures in Perl modules when building `perl` with MSVC on Windows. Just two[1] examples[2].

Also, there is this gem[3]:

> I still run into modules that try to create temporary files in the root directory of my C: drive. That usually happens due to the script clearing the environment and not saving temporary directory locations. This is an unfortunate interaction with File::Spec->tmpdir which defaults to trying to write to the root (hey, Windows 95 allowed it!) of the current drive if it can’t locate the customary directories. I think File::Spec->tmpdir ought to croak if the environment does not contain one of TMP, TEMP, or TMPDIR, instead of offering C:\system\temp or C:\temp or /tmp or / on Windows. Regardless of File::Spec’s behavior, scripts, modules, etc should not delete those environment variables.

[1]: https://www.nu42.com/2014/12/yeah-you-put-me-in-my-place-rea...

[2]: https://www.nu42.com/2014/11/fixing-hard-coded-file-path-in-...

[3]: https://www.nu42.com/2018/03/dont-complicate-things.html