Thread: *nix - OSX

  1. #1
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158

    *nix - OSX

    Most of us use *nix to refer to Linux, BSD, Solaris, OSX, etc. But let's say you want to exclude OSX/iOS... what you would call that? It's kind of unwieldy to say "*nix excluding OSX".

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    "Free *nix" perhaps?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by Salem View Post
    "Free *nix" perhaps?
    I thought of that, but Solaris isn't free.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    "*nix excluding OSX" does sound strange. But "we will be talking about *nix operating systems, except for OSX" sounds about right. It's just an exercise in phrase construction.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Maybe "librt OS"...

    EDIT:
    Does "distro OS" sound right? Linux and BSDs are traditionally called "distros", but I've never heard of an OSX version called a "distro".
    Last edited by Yarin; 08-20-2013 at 01:11 PM.

  6. #6
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by Mario F. View Post
    "*nix excluding OSX" does sound strange. But "we will be talking about *nix operating systems, except for OSX" sounds about right. It's just an exercise in phrase construction.
    Eh, maybe in natural language that's acceptable, but not for code:
    Code:
    bool is_nix_os;
    bool is_nix_os_not_osx;

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    How about "Not POSIX broken *nix" operating systems.

    So says the manual page for clock_gettime
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    err...

    Use a std::bitset

    EDIT: Actually I'm suggesting that because somehow I think you want to define an OS through a series of bool values. If that's not the case:

    bool is_nix_os
    bool is_osx

    is all that is required for you to match an operating system that is nix but not osx.
    Last edited by Mario F.; 08-20-2013 at 01:48 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  9. #9
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by Mario F. View Post
    err...

    Use a std::bitset

    EDIT: Actually I'm suggesting that because somehow I think you want to define an OS through a series of bool values. If that's not the case:

    bool is_nix_os
    bool is_osx

    is all that is required for you to match an operating system that is nix but not osx.
    Well yeah, that's what I wanted to avoid.
    "is_nix_os && !is_osx" will work, but what happens when another pseudo-nix OS, like OSX, comes along? I may be rewriting a lot of stuff.

    Quote Originally Posted by Salem View Post
    How about "Not POSIX broken *nix" operating systems.

    So says the manual page for clock_gettime
    Not a bad idea. Maybe it wouldn't be so bad after all to differentiate "posix" and "nix" OSes. I think I'll go with this.

  10. #10
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Yarin
    Well yeah, that's what I wanted to avoid.
    "is_nix_os && !is_osx" will work, but what happens when another pseudo-nix OS, like OSX, comes along?
    Sounds like you have chanced upon a name that might work for you!
    Code:
    is_nix_os && !is_pseudo_nix
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  11. #11
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by laserlight View Post
    Sounds like you have chanced upon a name that might work for you!
    Code:
    is_nix_os && !is_pseudo_nix
    An interesting idea.
    I think I'll go with is_nix and is_posix though, it's more succinct.

    Thanks for the feedback.

  12. #12
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    What will you do if OSX turns POSIX compliant? Or if Linux (which isn't fully compliant already) keeps widening the gap?

    Just being annoying... But the point is, isn't it better if you just name your variables based on your actual problem domain? Say, bool compatible?
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  13. #13
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by Mario F. View Post
    ... But the point is, isn't it better if you just name your variables based on your actual problem domain? ...
    True, true.

  14. #14
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by Mario F. View Post
    Just being annoying... But the point is, isn't it better if you just name your variables based on your actual problem domain? Say, bool compatible?
    Well, yeah, except that I'd have something like "bool ThisApplication::CompatibleHost()". That way, you can check for any obvious or obscure features you require (particular OS, a particular library installed, program running from a privileged (or unprivileged) account, an RS232 port, a dongle plugged in, source compiled as C++98 but not as C++11, etc etc). With only a little more work, that function can complain bitterly and exit if the host doesn't have required capabilities, or save its findings so any complicated compatibility checks only need be done once. The function can include a range of checks at either compile time or run time.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

Popular pages Recent additions subscribe to a feed