Golfing Emoticons

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.

Amphibological

Posted 2018-07-15T15:35:38.703

Reputation: 1 394

"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

Answers

15

Lenguage, 131

I have put all the emoticons I am representing in the format <emoticon> <byte> <length> where the program is <byte> repeated <length> times.

:-) 0 8062834757772801319734094828124956399638898464638002583172449928323170213117820932
:) 1 2892400118827976939438684163170029797380
:-] 2 736490387500841447075516267663006608725303862349670620478812283647578112884440609487323312712386965678607264902605611675427012612
:] 3 264202969342699153645046819327998571303367330111090974890246487724490982787908355751940
:-3 4 8657402899421565866640894175739857184468743778771208393372298092586390046095597770136092676
:3 5 3105690979328168701182830269522101416768856653828
:-> 6 74366524642622405428665075721999126422007787328051598231869446920043450605361049824610086990930509828
:> 7 26677682375393393246302105048632582268435010638972146679812
8-) 8 8062834757772801319734094828124956399638898464638002583172449928323170213117820932
8) 9 2892400118827976939438684163170029797380
:-} a 58350780111110182577346156792191842346790220983533887814420020926317170260174910391653244380390906064837889652367278401208674211826539380018313418995597836292
:} b 20932315791834567081523240053201294833948611487434768542347530871005539691107893137313828947907611434178521119850500
:o) c 3239118979209708736174752985014882031111216334552277195105326435158161594234375948611157455571250214219021418006029673058983092521806556299268
:c) d 47135384800053852612833041130432422958419430281388881777898152870448562232695635591679564906662772946483627525782544884262590480388
:^) e 1438457788087580951319367710279309782666608590130275933163395778517107001730213488515614614316939287805297916050613997699858436
=] f 264202969342699153645046819327998571303367330111090974890246487724490982787908355751940
=) 10 2892400118827976939438684163170029797380
:-D 11 19494738235915607848691977610067738996770809401324758166895184293407870315491767045222586644150487567302660
:D 12 6993394368615125679158619025868739646176627428942714419231588356
8-D 13 19494738235915607848691977610067738996770809401324758166895184293407870315491767045222586644150487567302660
8D 14 6993394368615125679158619025868739646176627428942714419231588356
x-D 15 19494738235915607848691977610067738996770809401324758166895184293407870315491767045222586644150487567302660
xD 16 6993394368615125679158619025868739646176627428942714419231588356
X-D 17 19494738235915607848691977610067738996770809401324758166895184293407870315491767045222586644150487567302660
XD 18 6993394368615125679158619025868739646176627428942714419231588356
=D 19 6993394368615125679158619025868739646176627428942714419231588356
=3 1a 3105690979328168701182830269522101416768856653828
B^D 1b 3477977520889650736889014052879324099230182173920756338825997078602142158679966714563481466490641782098496260504558444186939511707432172833580792152068
:-)) 1c 5487280990934680753018828240506400232950626778227616999140473333355621344480221047070135810437858502018906538135322099716
:-( 1d 1007854344721600164966761853515619549954862308079750322896556241040396276639727620
:( 1e 361550014853497117429835520396253724676
:-c 1f 193066536141020580302164136470251204437686055691792055134797767284510716823978799133444882487675968730852822850628645467043138793111556
:c 20 69259223195372526933127153405918857475749925384641832521628775278048964191953448010235510788
:-< 21 1161976947540975084822891808156236350343871677000806222372960108125678915708766403509532609233289220
:< 22 416838787115521769473470391384884097944297041233939791876
:-[ 23 11507662304700647610554941682234478261332872849213603444981441931993408013819384523239426761131046338728238514103212682428547076
:[ 24 4128171395979674275703856551999977676615114532985796482660101370695171606061068058628
:-|| 25 4490503514653154593994888171790391155410203882196166795024427350741089979748728649713594708726872557302769860059030544234798515347871831399522962560307902130717984058775353233427641373262315637622954685896613847112512731353207673251960307641577181784460210162728903376900
>:[ 26 6326404256268962375341314423857191467014094403422416400818262089647958639442872076631144582027712607626673470721042183428656778636530024452
:{ 27 327067434247415110648800625831270231780447054491168258474180169859461557673560830270528577311056428659039392497668
:@ 28 1707371672025177167763334723112485265179840680894217387507716
>:( 29 554073785562980215465017227247350859805999403077134660534580217077888830965463104478137810948
:'-( 2a 10717345685419298345739898907239062955989543426288201658648697659470455871802103594384430744225253295339799090003181572
:'( 2b 3844659212957764301173255361616590690802154974454843970302450614408994357252
:'-) 2c 85738765483354386765919191257912503647916347410305613269189581275763646974416828755075445953802026362718392720025452548
:') 2d 30757273703662114409386042892932725526417239795638751762419604915271954857988
D-': 2e 193066536141020580302164136470251204437686055691792055134797767284510716823978805646550931167703616753827688239442675846684408073420804
D:< 2f 638803582514482637985938722326699671446185653303063005249221931372282624304643888007010225504954128458626105348
D: 30 6513106048680027648022974865388814030379641269280309252
D8 31 101767282010625432000358982271700219224681894832504836
D; 32 52104848389440221184183798923110512243037130154242473988
D= 33 3334710296924174155787763131079072783554376329871518334980
DX 34 8062834757772801319734094828124956399638895572237883755195510489639007043088023556
:-O 35 167458526334676536652185920425610358671588951972278350803847452800159342788092683232963125354305467608039012907876356
:O 36 60072800202465067205832115025259229538134452493771044576134610843949072388
:-o 37 13267431338842966983371788226620956799431546865783704518985364512972676097928094894007982561650102539906104005323704405147662831001648414716854276
:o 38 4759457577127833947434564846207944091008496681623630261662476839548057726257842008934364673202165121028
:-0 39 16908990037932745833282996436991908563415515192912516393305269712082793058780464394797060
8-0 3a 16908990037932745833282996436991908563415515192912516393305269712082793058780464394797060
>:O 3b 92061298437605180884439533457875826090662949768337659782530130027559915316565778290258379740810961922785987127587463814832979972
:-* 3c 64502678062182410557872758624999651197111187717104020665379599426585361704942567428
:* 3d 23139200950623815515509473305360238379012
;-) 3f 8062834757772801319734094828124956399638898464638002583172449928323170213117820932
;) 40 2892400118827976939438684163170029797380
*-) 41 8062834757772801319734094828124956399638898464638002583172449928323170213117820932
*) 42 2892400118827976939438684163170029797380
;-] 43 736490387500841447075516267663006608725303862349670620478812283647578112884440609487323312712386965678607264902605611675427012612
;] 44 264202969342699153645046819327998571303367330111090974890246487724490982787908355751940
;^) 45 1438457788087580951319367710279309782666608590130275933163395778517107001730213488515614614316939287805297916050613997699858436
:-, 46 4128171395979674275703856551999977676615116013894657322584294363301463149116324315140
;D 47 6993394368615125679158619025868739646176627428942714419231588356
:-P 48 1339668210677412293217487363404882869372711615778226806430779622401274742304741465863705002834443740864312103263010820
:P 49 480582401619720537646656920202073836305075619950168356609076886751592579076
X-P 4a 1339668210677412293217487363404882869372711615778226806430779622401274742304741465863705002834443740864312103263010820
XP 4b 480582401619720537646656920202073836305075619950168356609076886751592579076
x-p 4c 106139450710743735866974305812967654395452374926269636151882916103781408783424759152063860493200820319248832042589635241181302648013187317734834180
xp 4d 38075660617022671579476518769663552728067973452989042093299814716384461810062736071474917385617320968196
:-p 4e 106139450710743735866974305812967654395452374926269636151882916103781408783424759152063860493200820319248832042589635241181302648013187317734834180
:p 4f 38075660617022671579476518769663552728067973452989042093299814716384461810062736071474917385617320968196
:-b 50 24133317017627572537770517058781400554710756961474006891849720910563839602997349891680610310959496091356602856328580683380392349138948
:b 51 8657402899421565866640894175739857184468740673080229065203596909756120523994181001279438852
d: 52 6513106048680027648022974865388814030379641269280309252
=p 53 38075660617022671579476518769663552728067973452989042093299814716384461810062736071474917385617320968196
>:P 54 736490387500841447075516267663006608725303598146701278260241040220479322532526226322067037926487695382287897020699710518663839748
:-/ 55 2113623754741593229160374554623988570426939399114064549163158714010349132347558049349636
:/ 56 758225336750041186812214421270044291203334148
:-. 57 207303614669421359115184191040952449991117919777870383109146320515198064030126482718877866076650545526414792977894485163640282912122988497207300
>:\ 58 50611234050151699002730515390857531736112755227379331206546096717183669115542976613049156656221700861013387765768337467429254229092240195588
>:/ 59 1161976947540975084822891808156236350343871260162019107609415971405328717636882880482535666496831492
:\ 5a 33025371167837394205630852415999821412920916263886371861280810965561372848488544468996
=/ 5b 758225336750041186812214421270044291203334148
=\ 5c 33025371167837394205630852415999821412920916263886371861280810965561372848488544468996
:L 5d 117329687895439584386390849658709432691668852526896571437762911804588036
=L 5e 117329687895439584386390849658709432691668852526896571437762911804588036
:S 5f 246058189629296915275088343143461804188198717414486198583847366016815400484868
:-| 60 7293847513888772822168269599023980293348777622941735976802502615789646282521863798956655547548863258104736206545909800151084276478317422502289177374449729540
:| 61 2616539473979320885190405006650161854243576435929346067793441358875692461388486642164228618488451429272315139981316
:$ 62 88269046595092069685018437596741636
:-X 63 22475902938868452364365120473114215354165767283620319228479378773424625026990985396952005392834074880328590847857837270368260
:X 64 8062834757772801319734094828124956399638895572237883755195510489639007043088023556
:-# 65 30757273703662114409386042892932725523524850710441599209489631379406624653316
:# 66 11033630824386508710627304699592708
:-& 67 15747724136275002577605653961181555468044723563746098795258691266256191822495748
:& 68 5649218982085892459841180006191464452
O:-) 69 12356258313025317139338504734096077084011903131684407032848168143843669217661859524670204261772879079170965450478974953193258440804270084
O:) 6a 4432590284503841723720137817978806878447995224617077284276641736623110647723704835825102487556
0:-3 6b 13267431338842966983371788226620956799431542106326127399808819977829395756624898061251158122488584656200472850638276239892043942732572982687825924
0:3 6c 4759457577127833947434564846207944091008496681623630264768167818876226427440672278456466089971021774852
0:-) 6d 12356258313025317139338504734096077084011903131684407032848168143843669217661859524670204261772879079170965450478974953193258440804270084
0:) 6e 4432590284503841723720137817978806878447995224617077284276641736623110647723704835825102487556
0;^) 6f 17635441167744220073677733420687434891802896487030356826420001439272855399824227332478064740691799715855116951261424132542286393800713533574133832361923633475307938715070413175521284
>:-) 70 12356258313025317139338504734096077084011903131684407032848168143843669217661859524670204261772879079170965450478974953193258440804270084
>:) 71 4432590284503841723720137817978806878447995224617077284276641736623110647723704835825102487556
}:-) 72 12356258313025317139338504734096077084011903131684407032848168143843669217661859524670204261772879079170965450478974953193258440804270084
}:) 73 4432590284503841723720137817978806878447995224617077284276641736623110647723704835825102487556
3:-) 74 12356258313025317139338504734096077084011903131684407032848168143843669217661859524670204261772879079170965450478974953193258440804270084
3:) 75 4432590284503841723720137817978806878447995224617077284276641736623110647723704835825102487556
>;) 76 35460722276030733789761102543830455027583961796936618253966333061189046605718849544410611318788
|;-) 77 98850066504202537114708037872768616672095225053475256206345501846339744503156212400486939296710743380901705521624650127283876034609414148
|-O 78 167458526334676536652185920425610358671588951972278350803847452800159342788092683232963125354305467608039012907876356
:-J 79 5110428660115861103887509778613597371569487059700877404902571191411112755984273780302829753244185412842987454468
#-) 7a 8062834757772801319734094828124956399638898464638002583172449928323170213117820932
%-) 7b 8062834757772801319734094828124956399638898464638002583172449928323170213117820932
%) 7c 2892400118827976939438684163170029797380
:-###.. 7d 63472263633935557923861736647125082748737134197688614613290540778155514115230551308688039019425910919616813001134916326957795000550316350938650788017945200937461476004474628334886705185455259784117223106102133685656049509651941592790179381411044907204635644645761089920625788481467539398532818999535942522921715094779750348520526769510592544772
:###.. 7e 22769557902708180570154032292525047244944529305685155554445656280981063526325050092172056931673139842713852077242156754930562874861800287931116285873505222881198972551491106610897147536510025664107567227744828946111351823651821405717420690800875100093349774665482097539926086501615885057530438321438724
<:-| 7f 11177788790790293702887103501120273414294472080999244458727694432909828650049566346015521682938653081799074785621881328429812576053504382165802153936498504910891056847057744922241561963821608276490675534388264964
',:-| 80 3894890932912594723800954614979778034738167705203999534297740046617805825001409260143039659396608186752825803082434011496463988584644917884342322616438404709718180718461226350290450773715077612074236332176364411401648796852480132979965285722014892425220
',:-l 81 13837432294794619465253598686799485174738918065898472542221995406271893447330289675331867938000869552982499765940481536206846117610229348870882129377116615066676461930445989701931533395349580971164855939208722231376387401455759135799771140
<_< 82 1658428917355370872921473528327619599928942763290765923893927134800978736248000485688913034091267225200427530628638653297304681376663135508758532
>_> 83 106139450710743735866974305812967654395452336850609019129211336627262639119872031084090434181841102412827361960232873811027499608106440672560545796

Okx

Posted 2018-07-15T15:35:38.703

Reputation: 15 025

Why not 132 though?! – Jonathan Allan – 2018-07-15T17:16:34.147

@JonathanAllan Because I was too lazy to work out a unicode character, I'll do it now though. – Okx – 2018-07-15T17:17:38.680

I didn't even notice the ×! – Jonathan Allan – 2018-07-15T17:19:32.850

@JonathanAllan Added. I used 2 different programming languages (Elixir + Java) to get this done as quickly as possible. Java to convert the emoticon to brainfuck because I know it best and Elixir to convert the brainfuck to binary and then to a number, since it has no number limit. – Okx – 2018-07-15T17:25:23.813

Check out this challenge for some languages being suitable for this challenge! (Unary is too classic...)

– user202729 – 2018-07-16T00:04:42.883

Sometimes, the most ridiculous language is the right tool for the job... – Skyler – 2018-07-16T14:20:23.513

7

Haskell, 3

Here is a start at a haskell solution.

xD

"xD"

Try it online!

This one is just a normal string it uses the characters "xD

:]

':':']':[]

Try it online!

This is a desugared string using cons to construct a list of characters. It uses the emoticon :] because both : and ] are already used. In total this uses the characters ':][.

8)

drop 8(show(88,8,8,8))

Try it online!

This is where things start to get a little more interesting. Since we need a way to make a string without the characters " or ' we use the show function. show takes something showable and makes a string out of it. Here we show the tuple (88,8,8,8). This in tuple in particular ends with 8), the string we want, so we drop the first 8 chracters from the string using drop 8. The unique characters in this solution are drop 8(shw,)


If we could find some other way to make Chars I'd probably be able to make a 4th. mempty, could be used instead of [] in answer 2, and there are ways of extracting the , from answer 3.

Post Rock Garf Hunter

Posted 2018-07-15T15:35:38.703

Reputation: 55 382

Perhaps if you could completely avoid square brackets in answer 2, you could use chr from Data.Char, turn each char into a string with :[] and then ++ them all together. – Asone Tuhid – 2018-07-15T20:03:48.143

@Asone That can't work since show and import both have an o. – Post Rock Garf Hunter – 2018-07-15T21:48:44.943

7

Charcoal, 10

These are just the ones I can do without using Charcoal's cat-like ability, which would allow me to add XP and |-0.

%)      ←)%
:(      ℅⁵⁸℅×±⁵±⁸
:-|     :¹↑¹
;]      ⮌];
<_<     <_‖O
=/      =↗÷χχ
8-0     I⊖⁹¬⁰I⁰
B^D     ↓ED^Bι
DX      §α³§α²³
xp      ↶⁴px

Try them online! I've added D⎚ commands to separate the snippets which sort of spaces them out, although it's not perfect, as the code should really be all on one line. Explanation:

←)%

The causes the string literal )% to be printed leftwards i.e. reversed.

℅⁵⁸℅×±⁵±⁸

The character code for : is 58. The characer code for ( is 5 times 8. (They are both negated here in case I needed a separator later.)

:¹↑¹

The : is a literal. The ¹ prints a line of length 1 horizontally, which is just a -. The causes the second line to be printed vertically, which gives the |.

⮌];

The reverses the string literal ];.

<_‖O

The <_ is a string literal and the ‖O causes the < to be reflected to the other side of the _.

=↗÷χχ

The = is a string literal and the ↗÷χχ draws a line of length 10/10 i.e. 1 diagonally, i.e. /.

I⊖⁹¬⁰I⁰

The numbers 9-1 and 0 are cast to string and so print as digits, while the 0 in the middle is logically negated turning it into 1 which is another way of printing a -. (And I haven't even used it as a literal yet!)

↓ED^Bι

This takes the string literal D^B and converts it into an array, which would normally print vertically, however the print direction is overriden to vertical which results in... reversed output again!

§α³§α²³

This looks up the characters at positions 3 and 23 in the upper case alphabet (0-indexed).

↶⁴px

The ↶⁴ rotates the print direction through 180° thus causing the string literal px to be printed reversed yet again.

Neil

Posted 2018-07-15T15:35:38.703

Reputation: 95 035

Some snippets seem to have unnecessary complexity like ↶⁴px when xp would work just as well. – Jonathan Allan – 2018-07-15T22:47:26.103

@JonathanAllan Yes well I could do about 8 without any code as such, but that would be boring. – Neil – 2018-07-15T23:57:27.887

5

Jelly, 6

+1 to come?? dylnan suggested the use of to free up Ȯ, but can it be used?

Six full programs:

;] “;]
xp ⁾xp
;D ⁽8Ạb⁹Ọ
:0 ”:®ṭ
XP 24,16ịØA
8-0 7‘.NṾṖ⁺

31 distinct bytes used, confirmation here.

Jonathan Allan

Posted 2018-07-15T15:35:38.703

Reputation: 67 804

1”:ṭ@¬ would allow you to use Ȯ in another program – dylnan – 2018-07-15T17:19:45.810

Nice, ”:®ṭ is shorter too. – Jonathan Allan – 2018-07-15T17:23:05.263

0”:0 works too freeing tack – dylnan – 2018-07-15T20:06:55.047

It would, but I've yet to think of any unused way to produce non digits or -. – Jonathan Allan – 2018-07-15T20:17:53.310

@Michael, Nope it is in fact bytes - Jelly does not become short by abusing character counting - see the code page linked by the word bytes in the header. Not any Unicode character may be used in Jelly code, only 256 (well strictly speaking 257 but two of them, and the newline character map to the same byte). – Jonathan Allan – 2018-07-16T14:41:17.930

@Michael, No worries, it's an oft raised concern and not all that obvious to the uninitiated. FWIW the hexadecimal byte code of the 31 in the same order are FE 3B 5D 8E 78 70 8D 38 AB 62 89 B5 FF 3A 08 E0 32 34 2C 31 36 D8 12 41 37 FC 2E 4E BA CB 8A. – Jonathan Allan – 2018-07-16T14:46:12.190

5

Ruby, 7

=\ Try it online! A string literal

'=\\'

>_> Try it online! Another string literal

">_>"

:p Try it online! Prints the :p symbol including the syntax (:) since it's using the p method

p:p

%) Try it online! Yet another string literal

%{%)}

XP Try it online! Here document notation (basically a multiline string literal)

<<A
XP
A

;] Try it online! Array of 2 characters (':' and ']') joined with '-'

[?;,?]]*?-

D8 Try it online! The source string of a regular expression

/D8/.source

__

Honorable mention Try it online! Executes the code in bash, returns emoticon with a trailing \n

`echo D8`

Asone Tuhid

Posted 2018-07-15T15:35:38.703

Reputation: 1 944

3

Python 2, 4

This answer is a pretty simple start. For the first two we just use python's two different string syntaxes. For the third we use the same method as my Haskell answer where we make a tuple get its string representation and slice it up. For the last part we use the chr function to make the characters : and ) and add them together.

xD

"xD"

=\

'=\\'

8)

`88,8,8`[8:]

:)

chr(11+11+11+11+11+1+1+1)+chr(11+11+11+1+1+1+1+1+1+1+1)

Post Rock Garf Hunter

Posted 2018-07-15T15:35:38.703

Reputation: 55 382

I just mentioned it, since the post used to say that is =/. – Erik the Outgolfer – 2018-07-16T06:28:12.727

3

R, 4

`!`<-`qu\157\164e`;!B^D
intToUtf8(c(88,80))
">_>"
'=]'

Try it online!

A first attempt at an R solution. The need to use brackets for any function call seriously reduces the possibilities. The first snippet is a call to quote which simply returns its argument - Thanks @BLT for showing me a way to do it without parenthesis, allowing me to use intToUtf8 on the following line.

I used another trick that @Giuseppe mentioned in a comment to another question once to spell quote without o and t.

JayCe

Posted 2018-07-15T15:35:38.703

Reputation: 2 655

I looked through some of the stock datasets for a field containing an emoticon (e.g. mtcars[4,5]) but no dice so far. – BLT – 2018-07-16T21:08:01.627

@BLT I've done the same... there is nothing but numbers unfortunately in these datasets :(. All the other thing I can think of (intToUtf8, etc.) use brackets. – JayCe – 2018-07-17T15:29:11.647

How about replacing the first line with +=quote;+XP to free up the parentheses? (not sure how to get it to show up without the Markdown formatting - the + is surrounded by backticks) – BLT – 2018-08-03T18:37:49.490

Try it online! – BLT – 2018-08-04T01:32:52.773

@BLT your suggestion contributed to improving this answer

– JayCe – 2018-08-07T20:19:38.597

thanks! I just stole it from you though. This challenge was the first one that I thought of when I read it. (I didn't notice that you had also written this tip until just now!)

– BLT – 2018-08-07T20:26:07.197

2

Fission, 3

|;-)

R"|;-)";

Try it online!

XP

V!P'!X'L

Try it online!

:o

/t<O/oO
U{\ {

Try it online!

There are only 3 ways to output something in Fission, so here we are

Dead Possum

Posted 2018-07-15T15:35:38.703

Reputation: 3 256

2

Javascript, 5

Three trivial ones, then two interesting ones:

xD

"xD"

XP

'XP'

<_<

`<_<`

:3

[[a=>0?0:0][0]+[]][0][6]+3

No characters for string literals left for the fourth one, so we get strings by concatenating with an array. The colon comes from writing a function which uses a colon, then converting it to a string.

8)

String((function(){(8)})).slice(12,14)

This one works very similarly to the fourth one, but uses slightly different methods to do everything.

Thanks to @steve-bennett for suggesting using the String constructor and .slice as an alternative to concatenating with arrays, and indexing. Managed to squeeze out +1 point from it.

Sasha

Posted 2018-07-15T15:35:38.703

Reputation: 431

String.fromCharCode(58)+String.fromCharCode(91) would probably be a more straightforward version of the last one. – Steve Bennett – 2018-07-17T03:01:26.757

1Or String(D=>1).slice(0,2) – Steve Bennett – 2018-07-17T03:15:55.013

A few of mine: />_>/.source new RegExp().toString().substring(3,5) [((new Date)+[]).charAt(18), ~2].join(name) 0+String(-3) – Anth12 – 2018-07-18T08:02:27.567

2

Perl 5, 6

:-)

':-)'

:)

v58.41

:-3

"\x3a\x2d\x33"

=]

<<A;
=]
A

B^D

q*B^D*

XP

`echo XP`

Try it online.

Denis Ibaev

Posted 2018-07-15T15:35:38.703

Reputation: 876