Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
allywilson ( allywilson@lemmy.ml )  to Linux@lemmy.ml · 2 years ago

*nix doesn't make sense

imgflip.com

external-link
message-square
9
link
fedilink
53
external-link

*nix doesn't make sense

imgflip.com

allywilson ( allywilson@lemmy.ml )  to Linux@lemmy.ml · 2 years ago
message-square
9
link
fedilink
Richard Stallman
imgflip.com
external-link
An image tagged richard stallman
  • Telorand ( Telorand@reddthat.com ) 
    link
    fedilink
    arrow-up
    30
    ·
    edit-2
    2 years ago

    Because there’s non-programmers in this community, if you aren’t sure what this means but are too afraid to ask, it’s a Regular Expression that better represents the terms “Linux” and “Unix.”

    Though if we’re going to be that pedantic, it would be [nN][uiI][xX]$. That extra pipe wouldn’t actually do anything in the last example, because regexp picks one character from the set by default.

    And if we want to be really pedantic,

    (?!nix)[nN][uI][xX]$
    

    Would be the most accurate.

    Edit: based on comments, I think…

    (nux|NIX)$
    

    …would be the best. Then you don’t wind up with weird matches with things like UNiX.

    • bigkahuna1986 ( bigkahuna1986@lemmy.ml ) 
      link
      fedilink
      arrow-up
      19
      ·
      2 years ago

      We’re talking about Unix so being as pedantic as possible is actually required.

    • thingsiplay ( thingsiplay@beehaw.org ) 
      link
      fedilink
      arrow-up
      17
      ·
      2 years ago

      Actually *nix isn’t a Regular Expression, because the star operator * requires a preceding character or object to apply to. This is a wildcard for the shell style globbing, where a single star doesn’t require a second object.

    • exu ( exu@feditown.com ) 
      link
      fedilink
      English
      arrow-up
      7
      ·
      2 years ago

      *nix is more likely to be a glob, therefore an accurate version would be *n?x

      Edit: global -> glob dang autocorrect

    • ReversalHatchery ( ReversalHatchery@beehaw.org ) 
      link
      fedilink
      English
      arrow-up
      7
      ·
      2 years ago

      at that point we could just flip the switch for the case insensitive mode

      • Telorand ( Telorand@reddthat.com ) 
        link
        fedilink
        arrow-up
        7
        ·
        2 years ago

        But then you’d match terms like “liNuX” and “UniX,” and that’s just silly. 😆

        • JackbyDev ( JackbyDev@programming.dev ) 
          link
          fedilink
          English
          arrow-up
          4
          ·
          2 years ago

          The pattern they made already does that though lmao.

          • Telorand ( Telorand@reddthat.com ) 
            link
            fedilink
            arrow-up
            1
            ·
            2 years ago

            That’s true! Good catch. Regexp is a fun challenge.

    • MonkderVierte ( MonkderVierte@lemmy.ml ) 
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      deleted by creator

Linux@lemmy.ml

linux@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linux@lemmy.ml

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

  • !opensource@lemmy.ml
  • !libre_culture@lemmy.ml
  • !technology@lemmy.ml
  • !libre_hardware@lemmy.ml

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 1.26K users / week
  • 2.39K users / month
  • 6.28K users / 6 months
  • 1.31K local subscribers
  • 68.1K subscribers
  • 8.11K Posts
  • 109K Comments
  • Modlog
  • mods:
  • AgreeableLandscape ( AgreeableLandscape@lemmy.ml ) 
  • nooter692 ( nooter692@lemmy.ml ) 
  • MarcellusDrum ( MarcellusDrum@lemmy.ml ) 
  • Arthur Besse ( cypherpunks@lemmy.ml ) 
  • Cyclohexane ( cyclohexane@lemmy.ml ) 
  • d3Xt3r ( d3Xt3r@lemmy.nz ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code