12
2
Introduction
Your challenge today (inspired by this challenge) is to write a number of snippets, functions or full programs each that output various ascii emoticons, without reusing characters.
Challenge
The list of valid ascii emoticons for this challenge is both here and in the code block at the bottom of this post.
Each snippet should be on a separate line in your submission.
You may only use one language for all the snippets.
Each snippet must either output to stdout or return a string containing the emoticon and an optional trailing new line, and nothing else.
You may not use any character more than once across all snippets, however using a character multiple times in a single snippet is fine.
You may not use any character not in your language's codepage (or ascii, if your language doesn't use a custom codepage) in any of the snippets. Put another way, you are restricted to only characters that can be encoded in one byte.
No snippet can take any input.
Standard loopholes are disallowed.
Your score is the number of unique snippets that each print a different ascii emoticon in the text file above.
Highest score wins!
Good luck!
Allowed emoticons, space separated:
:-) :) :-] :] :-3 :3 :-> :> 8-) 8) :-} :} :o) :c) :^) =] =) :-D :D 8-D 8D x-D xD X-D XD =D =3 B^D :-)) :-( :( :-c :c :-< :< :-[ :[ :-|| >:[ :{ :@ >:( :'-( :'( :'-) :') D-': D:< D: D8 D; D= DX :-O :O :-o :o :-0 8-0 >:O :-* :* ;-) ;) *-) *) ;-] ;] ;^) :-, ;D :-P :P X-P XP x-p xp :-p :p :-b :b d: =p >:P :-/ :/ :-. >:\ >:/ :\ =/ =\ :L =L :S :-| :| :$ :-X :X :-# :# :-& :& O:-) O:) 0:-3 0:3 0:-) 0:) 0;^) >:-) >:) }:-) }:) 3:-) 3:) >;) |;-) |-O :-J #-) %-) %) :-###.. :###.. <:-| ',:-| ',:-l <_< >_>
EDIT: Apologies, there was a Unicode character in one of the emoticons which I missed. I have since deleted the emoticon containing it. I hope it won't cause too much inconvenience.
"Each snippet must output (or return a string containing) a different ascii emoticon" <- just to be clear, does this mean that a string containing the emoticon but also other characters is valid? I'm guessing not, but that's the way I first read it, so wanted to make sure. – sundar - Reinstate Monica – 2018-07-15T17:16:17.710
@sundar no, you are correct. The string needs to just contain the emoticon. – Amphibological – 2018-07-15T17:18:10.540
@AsoneTuhid The Haskell answer uses Haskell functions not snippets.
– Post Rock Garf Hunter – 2018-07-16T13:59:54.607@WW you could make a similar argument about ruby – Asone Tuhid – 2018-07-16T14:12:06.597
@AsoneTuhid No you can't, Ruby doesn't have lazily evaluated objects, which is the only criteria the linked answer cites. – Post Rock Garf Hunter – 2018-07-16T14:16:12.077
Related (but not a dupe) – Beta Decay – 2018-07-16T16:14:56.390
@WW "In Haskell 26 is a valid anonymous function which takes no argument" While not integers, globally defined 'functions' are actually methods of the
main
object and, perhaps idealistically, you can see variables as getter methods. Also, ruby has lazy enumerators (.lazy
) – Asone Tuhid – 2018-07-18T09:16:38.297