G'day Alexander,

Just some supporting information regarding your "Mac" comments.

"MacOS X inherits from Unix, but does many things differently."

It does have the "rgb.txt" file but it's in a different directory: "/opt/X11/share/X11/". There's a symlink from "/usr/X11/" to "/opt/X11/", so these are the same file:

$ ls -i1 /opt/X11/share/X11/rgb.txt /usr/X11/share/X11/rgb.txt 85658151 /opt/X11/share/X11/rgb.txt 85658151 /usr/X11/share/X11/rgb.txt

I ran the code you showed below and got the same numbers:

$ perl -nE '@x=split;$seen{join(" ",@x[0,1,2])}++;END{say 0+keys%seen} +' < /opt/X11/share/X11/rgb.txt 512 $ wc -l /opt/X11/share/X11/rgb.txt 782 /opt/X11/share/X11/rgb.txt

I downloaded a copy of the Xorg version you linked below. After canonicalising the whitespace of that and my local copy with:

$ perl -ne 's/[\t ]+/ /g; print' original_name > canonical_name

A diff showed them to be identical.

"AFAIK, you can run X11 on MacOS X, but it does not run X11 out of the box."

That's correct on both counts.

My version is 10.12.5 "macOS Sierra".

[Yes, they've changed the name from "Mac OS X" to "macOS". I have no idea why. As far as I was aware, the "X" was intended to be a roman numeral referring to the "10.x.x" series: the major version is still "10". ]

— Ken


In reply to Re^2: Best way to validate a string as a color? by kcott
in thread Best way to validate a string as a color? by pra

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.