Like Tree2Likes
  • 1 Post By Mario F.
  • 1 Post By grumpy

*nix - OSX

This is a discussion on *nix - OSX within the General Discussions forums, part of the Community Boards category; Most of us use *nix to refer to Linux, BSD, Solaris, OSX, etc. But let's say you want to exclude ...

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

    *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".
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,548
    "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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,627
    Quote Originally Posted by Salem View Post
    "Free *nix" perhaps?
    I thought of that, but Solaris isn't free.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,467
    "*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.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    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
    1,627
    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.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  6. #6
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,627
    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;
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  7. #7
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,548
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  8. #8
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,467
    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.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    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
    1,627
    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.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  10. #10
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,743
    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
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    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
    1,627
    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.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  12. #12
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,467
    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?
    Yarin likes this.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    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
    1,627
    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.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  14. #14
    Registered User
    Join Date
    Jun 2005
    Posts
    6,306
    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.
    Mario F. likes this.
    Right 98% of the time, and don't care about the other 3%.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21