14
1
I don't know who coined these words, and I'm not Irish, but I give you an Irish blessing:
May the road rise up to meet you
May the wind be always at your back
May the sun shine warm upon your face
The rains fall soft upon your fields
And until we meet again
May God hold you in the hollow of His hand
I was planning on posting this a few weeks from now, but it just dawned on me that yesterday was Saint Patrick's Day.
Rules:
- Produce the above text exactly.
(Feel free to break this rule for the sake of cleverness and amusement.) - The program must generate the text on its own accord.
cat
is not a valid solution. - The solution with the fewest characters "wins".
I saw slight variations in wording among versions of the blessing I obtained from the Internet, so I tried to average them out. Please use the version posted above. Also, I dropped the punctuation to make it a bit easier.
May the luck of the Irish enfold you.
Hahaha, nice! That's why I'm usually careful to say "solution with the fewest characters" (I edited my post accordingly). Exploiting Unicode is always an option, but few people take it. – Joey Adams – 2011-03-18T14:06:17.987
Isn't it possible to put three our four chars into one exploiting this way? – FUZxxl – 2011-03-18T19:24:09.490
@FUZxxl: You have to be careful: Not all values in the range 0x0 ~ 0x10FFFF are usable. Some are outright banned (0xD800 ~ 0xDFFF for example and any value ending in FFFE or FFFF), others may or may not be legal in a given programming language's lexical definition. I choose Hangul here because it is a large block of values with no holes, and all certainly legal in any definition of Unicode string. But, it is only ~13 bits in size. – MtnViewMark – 2011-03-18T19:31:57.590
MtnViewMark: If you have two consecutive surrogates then it is indeed valid and would be a single codepoint outside the BMP. That would require that the implementation uses UTF-16 and could cut your character needs by one ;) – Joey – 2011-03-23T09:43:35.783
@Joey - You could only use surrogates if every appearance of them were paired, and in proper order (one from 0xD800~0xDBFF and the next from 0xDC00~0xDFFF). But, in Haskell's case it is moot:
String
is a sequence of unicode scalar values (U+0000 ~ U+D7FF & U+E000 ~ U+10FFFF), not UTF-16 code units. Note thatfromEnum
returns the character's code point scalar value, not some encoded value. – MtnViewMark – 2011-03-24T02:05:25.013