An Old Irish Blessing

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.

Joey Adams

Posted 2011-03-18T05:00:17.320

Reputation: 9 929

Answers

2

05AB1E, 117 bytes

'€¿“‡âŽÓ€î€†€€èÊ€‚“„€Ë‡´).ªðý“€¿€€†â£ƒ€¾€„‰Ã€î““€¿€€ïë€ï‡Š€›€ž‚ƒ““€¿€€‡µã»©ÃˆÉ€žŠÑ““€€¥·sŽ§š¼ˆÉ€ž™æ““€ƒ‡æ€¦‰Ã†î“).ªÀ»

Try it online!

'€¿                 "may"
“‡âŽÓ€î€†€€èÊ€‚“    "god hold you in the hollow of"
„€Ë‡´               "his hand"
)                   push stack into a list
.ª                  sentence-case each
ðý                  and join by spaces
“€¿€€†â£ƒ€¾€„‰Ã€î“  "may the road rise up to meet you"
“€¿€€ïë€ï‡Š€›€ž‚ƒ“  "may the wind be always at your back"
“€¿€€‡µã»©ÃˆÉ€žŠÑ“  "may the sun shine warm upon your face"
“€€¥·sŽ§š¼ˆÉ€ž™æ“   "the rains fall soft upon your fields
“€ƒ‡æ€¦‰Ã†î“        "and until we meet again"
)                   push stack into a list
.ª                  sentence-case each
À                   rotate list left
»                   join by newlines
                    implicitly print

Dorian

Posted 2011-03-18T05:00:17.320

Reputation: 1 521

14

Python, 143 chars

#coding:u8
print u'慍⁹桴⁥潲摡爠獩⁥灵琠敭瑥礠畯䴊祡琠敨眠湩⁤敢愠睬祡⁳瑡礠畯⁲慢正䴊祡琠敨猠湵猠楨敮眠牡灵湯礠畯⁲慦散吊敨爠楡獮映污潳瑦甠潰潹牵映敩摬ੳ湁⁤湵楴敷洠敥⁴条楡੮慍⁹潇⁤潨摬礠畯椠桴⁥潨汬睯漠⁦楈⁳慨摮'.encode("u16")[2:]

run at codepad.org

YOU

Posted 2011-03-18T05:00:17.320

Reputation: 4 321

8

Haskell, 179 characters

e="\n "++['='..'z']++e;i r=[e!!div r 64,e!!r]
main=putStr$i.fromEnum=<<"뒦뾁빭몁뷴릩끷뮸몁뺵끹봁벪몹끾봺뀒릾끹뭪끼뮳멁맪끦뱼릾븁릹끾봺뷁맦먰뀒릾끹뭪끸뺳끸뭮볪끼릷벁뺵봳끾봺뷁뫦먪뀙뭪끷릮본끫릱뱁븴뫹끺뵴볁뾴뺷끫뮪뱩븀놳멁뺳빮뱁뼪끲몪빁리릮변뒦뾁댴멁뭴뱩끾봺끮볁빭몁뭴뱱봼끴뫁덮븁뭦볩뀀"

This exploits the ancient common bond between the Irish and the Koreans. You all knew that lace and potato farming came via Korea, and that Kimchi was first made in Dublin... right?


  • Edit: (197 -> 184) No need to mod (why⁈ :-) ); eliminated separate declaration for the Korean text.
  • Edit: (184 -> 179) Used a more compact to represent code book.

MtnViewMark

Posted 2011-03-18T05:00:17.320

Reputation: 4 779

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 that fromEnum returns the character's code point scalar value, not some encoded value. – MtnViewMark – 2011-03-24T02:05:25.013

4

INTERCALL, 3421 bytes

A simple solution. Genered automatically, if anyone is wondering...

INTERCALL IS A ANTIGOLFING LANGUAGE
SO THIS HEADER IS HERE TO PREVENT GOLFING IN INTERCALL
THE PROGRAM STARTS HERE:
PUSH LXXVII
PRINT
PUSH XCVII
PRINT
PUSH CXXI
PRINT
PUSH XXXII
PRINT
PUSH CXVI
PRINT
PUSH CIV
PRINT
PUSH CI
PRINT
PUSH XXXII
PRINT
PUSH CXIV
PRINT
PUSH CXI
PRINT
PUSH XCVII
PRINT
PUSH C
PRINT
PUSH XXXII
PRINT
PUSH CXIV
PRINT
PUSH CV
PRINT
PUSH CXV
PRINT
PUSH CI
PRINT
PUSH XXXII
PRINT
PUSH CXVII
PRINT
PUSH CXII
PRINT
PUSH XXXII
PRINT
PUSH CXVI
PRINT
PUSH CXI
PRINT
PUSH XXXII
PRINT
PUSH CIX
PRINT
PUSH CI
PRINT
PUSH CI
PRINT
PUSH CXVI
PRINT
PUSH XXXII
PRINT
PUSH CXXI
PRINT
PUSH CXI
PRINT
PUSH CXVII
PRINT
PUSH X
PRINT
PUSH LXXVII
PRINT
PUSH XCVII
PRINT
PUSH CXXI
PRINT
PUSH XXXII
PRINT
PUSH CXVI
PRINT
PUSH CIV
PRINT
PUSH CI
PRINT
PUSH XXXII
PRINT
PUSH CXIX
PRINT
PUSH CV
PRINT
PUSH CX
PRINT
PUSH C
PRINT
PUSH XXXII
PRINT
PUSH XCVIII
PRINT
PUSH CI
PRINT
PUSH XXXII
PRINT
PUSH XCVII
PRINT
PUSH CVIII
PRINT
PUSH CXIX
PRINT
PUSH XCVII
PRINT
PUSH CXXI
PRINT
PUSH CXV
PRINT
PUSH XXXII
PRINT
PUSH XCVII
PRINT
PUSH CXVI
PRINT
PUSH XXXII
PRINT
PUSH CXXI
PRINT
PUSH CXI
PRINT
PUSH CXVII
PRINT
PUSH CXIV
PRINT
PUSH XXXII
PRINT
PUSH XCVIII
PRINT
PUSH XCVII
PRINT
PUSH XCIX
PRINT
PUSH CVII
PRINT
PUSH X
PRINT
PUSH LXXVII
PRINT
PUSH XCVII
PRINT
PUSH CXXI
PRINT
PUSH XXXII
PRINT
PUSH CXVI
PRINT
PUSH CIV
PRINT
PUSH CI
PRINT
PUSH XXXII
PRINT
PUSH CXV
PRINT
PUSH CXVII
PRINT
PUSH CX
PRINT
PUSH XXXII
PRINT
PUSH CXV
PRINT
PUSH CIV
PRINT
PUSH CV
PRINT
PUSH CX
PRINT
PUSH CI
PRINT
PUSH XXXII
PRINT
PUSH CXIX
PRINT
PUSH XCVII
PRINT
PUSH CXIV
PRINT
PUSH CIX
PRINT
PUSH XXXII
PRINT
PUSH CXVII
PRINT
PUSH CXII
PRINT
PUSH CXI
PRINT
PUSH CX
PRINT
PUSH XXXII
PRINT
PUSH CXXI
PRINT
PUSH CXI
PRINT
PUSH CXVII
PRINT
PUSH CXIV
PRINT
PUSH XXXII
PRINT
PUSH CII
PRINT
PUSH XCVII
PRINT
PUSH XCIX
PRINT
PUSH CI
PRINT
PUSH X
PRINT
PUSH LXXXIV
PRINT
PUSH CIV
PRINT
PUSH CI
PRINT
PUSH XXXII
PRINT
PUSH CXIV
PRINT
PUSH XCVII
PRINT
PUSH CV
PRINT
PUSH CX
PRINT
PUSH CXV
PRINT
PUSH XXXII
PRINT
PUSH CII
PRINT
PUSH XCVII
PRINT
PUSH CVIII
PRINT
PUSH CVIII
PRINT
PUSH XXXII
PRINT
PUSH CXV
PRINT
PUSH CXI
PRINT
PUSH CII
PRINT
PUSH CXVI
PRINT
PUSH XXXII
PRINT
PUSH CXVII
PRINT
PUSH CXII
PRINT
PUSH CXI
PRINT
PUSH CX
PRINT
PUSH XXXII
PRINT
PUSH CXXI
PRINT
PUSH CXI
PRINT
PUSH CXVII
PRINT
PUSH CXIV
PRINT
PUSH XXXII
PRINT
PUSH CII
PRINT
PUSH CV
PRINT
PUSH CI
PRINT
PUSH CVIII
PRINT
PUSH C
PRINT
PUSH CXV
PRINT
PUSH X
PRINT
PUSH LXV
PRINT
PUSH CX
PRINT
PUSH C
PRINT
PUSH XXXII
PRINT
PUSH CXVII
PRINT
PUSH CX
PRINT
PUSH CXVI
PRINT
PUSH CV
PRINT
PUSH CVIII
PRINT
PUSH XXXII
PRINT
PUSH CXIX
PRINT
PUSH CI
PRINT
PUSH XXXII
PRINT
PUSH CIX
PRINT
PUSH CI
PRINT
PUSH CI
PRINT
PUSH CXVI
PRINT
PUSH XXXII
PRINT
PUSH XCVII
PRINT
PUSH CIII
PRINT
PUSH XCVII
PRINT
PUSH CV
PRINT
PUSH CX
PRINT
PUSH X
PRINT
PUSH LXXVII
PRINT
PUSH XCVII
PRINT
PUSH CXXI
PRINT
PUSH XXXII
PRINT
PUSH LXXI
PRINT
PUSH CXI
PRINT
PUSH C
PRINT
PUSH XXXII
PRINT
PUSH CIV
PRINT
PUSH CXI
PRINT
PUSH CVIII
PRINT
PUSH C
PRINT
PUSH XXXII
PRINT
PUSH CXXI
PRINT
PUSH CXI
PRINT
PUSH CXVII
PRINT
PUSH XXXII
PRINT
PUSH CV
PRINT
PUSH CX
PRINT
PUSH XXXII
PRINT
PUSH CXVI
PRINT
PUSH CIV
PRINT
PUSH CI
PRINT
PUSH XXXII
PRINT
PUSH CIV
PRINT
PUSH CXI
PRINT
PUSH CVIII
PRINT
PUSH CVIII
PRINT
PUSH CXI
PRINT
PUSH CXIX
PRINT
PUSH XXXII
PRINT
PUSH CXI
PRINT
PUSH CII
PRINT
PUSH XXXII
PRINT
PUSH LXXII
PRINT
PUSH CV
PRINT
PUSH CXV
PRINT
PUSH XXXII
PRINT
PUSH CIV
PRINT
PUSH XCVII
PRINT
PUSH CX
PRINT
PUSH C
PRINT
END

Wow

TuxCrafting

Posted 2011-03-18T05:00:17.320

Reputation: 4 547

3

GolfScript (204 chars)

Contains non-printing characters, so copy-paste may not work:

:k'May the road rise up to meet you
wind be always ar back¢ sun shin¬armÈon€face
Tåainsll soft¡ields
Aäuntil we meet ag²áGod holdø inñlow of His hand'{k{{k$}*0:k;}{127.2$<{-:k}*;}if}/](+

Base64-encoded:

OmsnTWF5IHRoZSByb2FkIHJpc2UgdXAgdG8gbWVldCB5b3UKnwh3aW5kIGJlIGFsd2F5cyBhnAVy
IGJhY2uiCXN1biBzaGlurANhcm3IA29upAZmYWNlClTlBGFpbnONA2xsIHNvZnShDGllbGRzCkHk
A3VudGlsIHdlIG1lZXQgYWeyA+EFR29kIGhvbGT4BCBpbvEFjgNsb3cgb2YgSGlzIGhhbmQne2t7
e2skfSowOms7fXsxMjcuMiQ8ey06a30qO31pZn0vXSgr

There really is less redundancy than you might expect in the string. I think gzip's savings are 2/3 from Lempel-Ziv and 1/3 from the Huffman encoding; what I'm using is essentially LZ, but I have more overhead than the gzip format.

Note that this is the first solution to take fewer bytes than the output.

Peter Taylor

Posted 2011-03-18T05:00:17.320

Reputation: 41 901

2

PHP, 431 425 bytes

<?php $s="May therodisupm\nwnblckfTAgGH";$p=array('01234563','3cd8h328c73m','jj','3e6643');$b=str_split('s781937ab63cd348v28cfsgah93i631jg12b314328c73i1klfsbch3b5ah63g17et1k6fn56371ahb3m1u3b8m4ta6j9bfoh93ch4aj3g6v1p1ahf0123q89358j9328c3ah3456358u8g38m3rab351h9');foreach($b as $x){$x=b($x);if($x>27){$c=str_split($p[$x-28]);foreach($c as $y){echo $s[b($y)];}}else{echo $s[$x];}}function b($a){return base_convert($a,36,10);}

An approach of mapping and base conversion to store the information. However, I failed at keeping the program size very small.

mauris

Posted 2011-03-18T05:00:17.320

Reputation: 636

2

Bash/Sed, 206 chars

I didn't manage to beat Peter Taylor, but like his solution, it's fewer bytes than the original. But I didn't use unprintable characters.
sed was useful in the similar "no strangers to codegolf" challenge. But there I used it twice, to compress the list of replacements. Here, the text is too short for this trick.

sed 's/Z/May the /;s/W/ uponYr f/;s/Y/ you/'<<X
Zroad rise up to meetY
Zwind be always atYr back
Zsun shine warmWace
The rains fall softWields
And until we meet again
May God holdY in the hollow of His hand

ugoren

Posted 2011-03-18T05:00:17.320

Reputation: 16 527

1

Haskell - 284

s n=words"And God His May The again always at back be face fall fields hand hold hollow in meet of rains rise road shine soft sun the to until up upon warm we wind you your"!!(fromEnum n-48)
main=mapM_(putStrLn.unwords.map s)$words"3IEDLJAQ 3IP967R8 3IHFNMR: 4C;GMR< 0KOA5 31>Q@I?B2="

Sadly, this is much longer than the output or putting the string verbatim. Even the string literals themselves (without quotes) total to two characters longer than the input. How can that be?

Joey Adams

Posted 2011-03-18T05:00:17.320

Reputation: 9 929

1

Keg, 175 chars

‘3p‘®m‘00‘®t¶©m  ©t  2½;4•;up to 2m;you\n©m  ©t  2⬩;be 0Ȧ;at 0B;0∞;\n©m  ©t  sun kƝ;4Ȧ;0M;0B;0Ƚ;\nThe A④;2÷;4l;0M;0B;8R;\nAnd 0;we 2m;0¡;\n©m  God 1④;you in ©t  dɅ;of His 0║;

Thank goodness all long words are in Keg's dictionary. Just uses string compression to reduce length.

TIO currently doesn't work as it needs to be updated.

Try it online!

Lyxal

Posted 2011-03-18T05:00:17.320

Reputation: 5 253

1

Quetzalcoatl, 218 bytes

"May the road rise up to meet you\nMay the wind be always at your back\nMay the sun shine warm upon your face\nThe rains fall soft upon your fields\nAnd until we meet again\nMay God hold you in the hollow of His hand"

Strings are implicitly printed.

Or pyth, 217 bytes

"May the road rise up to meet you\nMay the wind be always at your back\nMay the sun shine warm upon your face\nThe rains fall soft upon your fields\nAnd until we meet again\nMay God hold you in the hollow of His hand

NoOneIsHere

Posted 2011-03-18T05:00:17.320

Reputation: 1 916

0

Wren, 248 bytes

Adopting this method.

System.print("Zroad rise up to meetY\nZwind be always atYr back\nZsun shine warmWace\nThe rains fall softWields\nAnd until we meet again\nMay God holdY in the hollow of His hand".replace("Z","May the ").replace("W"," uponYr f").replace("Y"," you"))

Try it online!

user85052

Posted 2011-03-18T05:00:17.320

Reputation: