Hacker News new | ask | show | jobs
by rwmj 24 days ago
MSVC support for C is fairly terrible. For the projects we write that are portable to Windows we insist you use GCC or Clang on Windows. No one has time to deal with the lack of even standard C1x/C2x features (never mind useful extensions like attribute cleanup).

Surprised about FreeBSD. My experience is that porting Linux software is usually pretty easy as long as it's not using some Linux-only feature (io_uring for instance).

3 comments

Generally speaking, if someone is not actively using/hacking software on a particular platform, support for that platform can fall in a hole. It's often not hard to add, however, if the code base is well written and keeps portability in mind. I fixed an issue with NetBSD support in GrafX2 (pixel art editor) some years back in like fifteen minutes.
> Surprised about FreeBSD. My experience is that porting Linux software is usually pretty easy as long as it's not using some Linux-only feature (io_uring for instance).

I'm not sure why you're surprised, the parent of you comment clearly stated

"on FreeBSD you often run into systemd dependencies or other non-posix behaviors"

which means, software written for Linux often uses "Linux-only features" such as systemd and other non-posix dependencies that are foreign to the BSDs and traditional UNIX. Thus, it shouldn't be surprising that Linux software is hard to port to the BSDs.

Linux used to be a pretty good UNIX, I'm not sure what it is now.

How is that Linux only features line different from OpenSSH (OpenBSD specific) vs Portable OpenSSH? If it bothered people that much they can also band together and make a Portable $whatever.
Linux used to be a pretty good UNIX, I'm not sure what it is now.

Linux has become Linux, it's own thing that as often as not says "yeah, that old Unix stuff is fine for you boomers and other fossils...we're going to be over here doing our own thing". Which is probably fine, I guess, because all the old Unix versions did the same thing to some extent and the computing world had changed over a dozen times since Unix showed up. Unless you were on one of the minimally massaged System V reference ports, going from one vendor to another was anything between "lots of annoying differences that make life less fun than it could be" to "WTF said this was Unix and why did you make me touch it?". Ultrix, SCO and UTek (among many others) weren't awful. Solaris and HP/UX had some vendor-only things that were hard to replicate. AIX made you question your life choices, especially if you wandered off into one of the mainframe versions; you had clearly angered the gods.

There used to be Windows, Unix, and everything else. Now there's Windows, Linux, and everything else, with Unix (BSD mostly) being part of everything else. Times change, shit happens, and there's only so much that impotently shaking your fist at the unjust universe will fix.

Also, people confuse "good" with "ought to live forever". It's time to leave BSD and LISP in the history books.
How dare anyone spend time on things you don't approve of. /s
Spending time on your hobby is wondwerful. Expecting the world to consider your hobby important is arrogant.
Much like saying It's time to leave (your hobby) in the history books. But it's obvious that the distinction and thus the irony is completely lost here.
Linux is just Linux. There is no need for it to be part of some larger category of operating systems.

And BSDs are just as happy to accumulate nifty features like kqueue, unveil and whatever else it is that they have. These features are all just as foreign to Linux as io_uring is to them, and just as non-POSIX compliant.

Yet somehow I just don't see people complaining about them endlessly the way people complain about "linux-isms". When I see such features I am very impressed because I think they're amazing innovations, and my only reaction is to wonder when Linux will gain the same features so it can be just as great as they are.

What do you even miss, honestly works fine for me? In terms of platform APIs, I prefer the Windows ones on Windows anyway
Complex numbers, for example. Also, C preprocessor expands macros differently on MSVC.
Use the new standards-conformant preprocessor with `/Zc:preprocessor`

https://learn.microsoft.com/en-us/cpp/build/reference/zc-pre...

Wasn't aware of preprocessor conformity issues, good to know!