Santa has been fretting about the most concise way to use his personal emoticon [}:]>* programatically in a raku one-liner.
The best he can do is…
raku -e 'sub santa($x is copy){$x~~s/ <[}:]>* /claus/; $x.say}; santa(":")'
#OUTPUT claus
Can you help him? If so – please send your version via the Comments field below.
The rules are:
(i) to use raku (the language formerly known as perl6), perl5 and other languages will be considered too
(ii) to use the character sequence [}:]>* (or reversed, no spaces)
(iii) these characters must have semantic meaning in the code (ie. to just as a comment)
(iv) it should be a one-liner that uses raku -e on the command line
The objective criteria is: shortest count of chars between the ”
Kudos will also be given to the overall Christmassy-ness … in the example, a call to ‘santa’ creates output ‘claus’
Merry Christmas to one and all (and any)
PS. Code golf is very, very naughty, so be sure not to do this in your day job!
3 Comments