14
\$\begingroup\$

We all know scoring by characters is ripe for abuse. Let's prove this.

The Challenge

Output the following:

"m8V}G=D@7G1lAI,v08`
#(hNb0A8T!g;==SVaG5~
g"jUF!bmRY(3I@na?2S{
fJVzo/GQYU%ybpfUq3aG
Yza[jc,WJ$bP^7r};Da}
V-!Z+Nk:`/poc}d/X:G\
sWX{dbAUv6,i]%RG$hRp
),bd+?/{U1tU[;<;u.Nk
ZFPIOzJ/HimL!nexc,ls
HM%k3D$n2|R,8L?'eI_n
qs.kzbil$UQy_#Z)l#i%
*G4gr2<R^y#/iQ9,<+p%
}BYnb3_&:!m;#~QL1C?t
f.U>wIkTz=P>bf!uwb!d
z()rG)>~:q4#\}~pQEvZ
=OT8T4<i50%/8%eX^"3E
#Ks(8}OzZ&]RQ(-BLy<7
p7B~GEsF$)>?a"dtGCC'
H;:n&p&Z($ukNd,Et.$O
F*Uq0$dm,m%ejPT~u,qL

The characters inside the box are selected uniformly at random between the codepoints 0x21 and 0x7e. This means they should not be compressable much ordinarily. However, in this challenge, your code is scored by the number of characters, which can range in codepoint between 0x00 and 0x10ffff. Since this gives about 21 bits of information per character, and the box contains about 7 bits of information per character, approaching a 3:1 packing should be possible.

Note that:

  • As usual, you may output to STDOUT or return the string from a function;
  • A trailing newline on the last line is optional. Apart from this, the output must be exactly as given.
  • List representations are acceptable if returning from a function.

Scoring

The score is the length of your code in characters, expressed in the encoding of your language's interpreter. For most languages, this will be UTF-8. Note that languages that use an SBCS, such as most golfing languages, are at a huge disadvantage here as the number of characters is equal to the number of bytes.

Note that characters are not the same as grapheme clusters. For example, 👨‍🦲 is actually 3 characters (0x1f468 0x200d 0x1f9b2).

\$\endgroup\$
9
  • \$\begingroup\$ was CSPRNG used to generate this text, or could it possibly be reversed? If so, is that a loophole? \$\endgroup\$ Nov 14, 2020 at 4:48
  • \$\begingroup\$ @CommandMaster I used a secure random generator. \$\endgroup\$
    – Sisyphus
    Nov 14, 2020 at 6:43
  • 3
    \$\begingroup\$ What is an interpreter's encoding? It was my impression that encoding is just used for displaying text, for example in an ide. While interpreters (and compilers) just look at the raw data. How do I know what my interpreter's encoding is? \$\endgroup\$
    – Wheat Wizard
    Nov 14, 2020 at 13:24
  • 1
    \$\begingroup\$ The text is 420 characters (400 without whitespace) \$\endgroup\$
    – kangalio
    Nov 15, 2020 at 13:03
  • \$\begingroup\$ If the scoring is in characters then why even mention encoding? A character is a character, regardless what encoding is used. Talking about encoding just confuses thing, as some languages accept source code in different encodings. \$\endgroup\$
    – Abigail
    Nov 21, 2020 at 19:58

8 Answers 8

11
\$\begingroup\$

Python 3, 223 221 216 214 212 chars

ጸ=0
for 𢫌 in"ጸ򬺿򪔍񙔮󕦷𢑡󆪪򌊧򤗝𢫌򓭟񔢢󒛠򛜺񷈅𧡰󣽌򈬋󷲥𤛧𖏾򄷸ꛯ𼳈񋕅𚕵𵫵𿺸񑳥򣅑񙨫󖌪񗂽𫁫򥸴򨸪񏞢򭝨򴞇󯭱𛓢󫼾񓇹𩔞򅙄𸮿񔎛𓺠󷵔󗉻򾪫򳂮򏸛𙥇󲍷򵂺񍟙󢷖񡟑񉞂򷢱󍇒򽇹򽒞𲹙󚑵񂤮򔞱񍩇񿳑򪤶񩱞򵫮񼑖󫼧𪝿𱰬򥼙񮒑𙺴򳙀򮞱񦏱򗜡򙭴󈗲򽓹𴈵򡖮񲻪󭸻򷕺𱪾󗯵񹌒󅈫򅋐򒏒񋝴򬛝򪰜񙏝򊿌񕲎󪰯󉽱󯸋󰎭񳥝򤊶򰫻򆈻󻲛󞨘򒒪󫌞򫞇󕤕🂳󣕳񰱞񒵛𴘺󽿪򴫌𫷓񤿰󮠒񙪋𴭮𤌚򮩅򜕾񫇰󖩯񞮼󨚣򈋃𔻐򡆊󀸘񶖒񠻆𱶼裶𿶬󣚢":ጸ=ጸ<<20|ord(𢫌)
while ጸ:print(end=chr(ጸ%128));ጸ>>=7

Converts from base 2²⁰ (1048576) to base 128. Just for fun, I used some of the letters from the encoded string as variable names.


Edit 1: (221) I saved two characters by using base 128 rather than base 127, allowing me to use the bit-shift operation >>=7 rather than the integer division //=127.

Edit 2: (216) Thanks to ovs in the comments for suggesting a way to save a whopping five characters.

Edit 3: (214) Using base 2²⁰ allows us to save another two characters, because we can write the constant as 2**20 in the code, which only takes five characters to write rather than seven.

Edit 4: (212) We can write ጸ<<20|ord(𢫌) instead of ጸ*2**20+ord(𢫌).

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Welcome to the site! Nice first answer! \$\endgroup\$ Nov 14, 2020 at 18:54
  • 1
    \$\begingroup\$ You can save a few characters by directly printing from the loop with while à´¬:print(end=chr(à´¬%128));à´¬>>=7. Have you tried lower bases like 117 or 95? This might be shorter, but I'm not sure. \$\endgroup\$
    – ovs
    Nov 15, 2020 at 10:26
  • \$\begingroup\$ Thanks @ovs! Not sure why I didn’t think of that. \$\endgroup\$ Nov 15, 2020 at 11:36
  • \$\begingroup\$ I have tried a variety of bases, and this was the shortest overall, but there may be possibilities I’ve overlooked. \$\endgroup\$ Nov 15, 2020 at 11:37
6
\$\begingroup\$

Charcoal, 150 chars

⍘↨E¶󚰼򗁅񅬹񥐕𙋝󏚌񻚙󅉉𥏀󑞟򅲼𼕼󁓰𘫺𪦥󫮇󜾃񃦝󟠞󖿜򾜑󭨠󇙺󤥜򷅄󙹳򅣄񓁆򯄇󥱇󳕍񥤥񶠙񼈿󣠃𼭳𢌘𲒲񞶕򐲰𖙹涿񒜵𪽓񣘱򀋂򂢼򚇪򷀿򻮁󪣔񪭪𧮁򽳕燁񦦼񹹵񌶛𶑖񻍨񧿈񫀎𫜫񡒕⪆񃰁𵨏󂝱򢪭񫽼΅񡸋󤂵򛜎񾇠񲍼𛪙𬓬󄇀򨚭򶛓񶾓󘑋񸠑񺴫󈒥󝔎󆗲񨆲𾾌𤼔񎖅𖫐󈣁󍿑𕍇󡢡񚨇󃙎㓬򁩤񭏬򄄥󗝴򏨔񶚈󀆵𡻭񲹯򛀟򞋺񎒬🔹񥈞𤲽򍵭򋒆󨛌򸟳񣢜󘆒󞹼𧢮񈁳󉡾񈕢򱂂򻭰𛯭󝷹򣼃򲼺򢽔󨍹𧢖萾񮌌℅ι×φφ⁺γ¶

Try it online! No verbose version (but see encoder below); the succinct code that the deverbosifier generates doesn't work and is suboptimal anyway. Note that Charcoal actually defaults to Unicode, so this is the only case where I don't really mean charcoal -e (to use SBCS encoding). Explanation:

   ...          Long string (including leading newline)
  ï¼¥             Map over characters
       ι        Current character
      ℅         Take the ordinal
         φφ     Predefined variable 1,000
        ×       Multiply (i.e. 1,000,000)
 ↨              Decode array using that base
            γ   Printable ASCII
           ⁺    Concatenated with
             ¶  Literal newline
⍘               Encode integer using custom base
                Implicitly print

The encoded string was generated using the following program:

WS⊞υιUT⭆↨⍘⪫υ¶⁺γ¶×φφ℅ι

Try it online! Link is to verbose version of code. I was somewhat lucky that the encoded string uses no Charcoal characters (which would need quoting) and contains no unprintables (not counting newline as an unprintable).

\$\endgroup\$
1
  • 2
    \$\begingroup\$ FYI this compares to 348 bytes using Charcoal's SBCS string compression. \$\endgroup\$
    – Neil
    Nov 14, 2020 at 17:02
5
\$\begingroup\$

05AB1E, 152 chars

Converts between base 94 and base 1125000. The highest byte in the program is 0x10cd84.

"򾥥󌸂񑉲񼡥񿺏򡩹󧻅􂏰𘸠󏇼򪩞򨋙񩦠򮅟읋󄪸🴮􉌆󗪳􇸠󰓸񘅭􌶄󥋱𮿅󃀱򄶲񿷭𦩪򪥆𷂠򥭼𡋏𪲛񤴰񴂉𕇟𥎳򭐳𫘈𘝓񜩜񢗷򑿺򉉹󢱡𞷟𵬭񳺯񏼧򍔦򘘘󴕝񒸆񡼚񼼄񽒲񍩱񂨭쵩򍃅󉭣򨉕񉁚򭌛񠩅𙣲􄠞򧟄𺨭𮱗򤲆󛭸󻑈󤽿񹳬񇭮񅋎󷘮򄖕䉸󆙾蠠🗕񝋲𡀕򾑥󆞌񠯃󀎳򁈶殓󷴮򲙪񑋞񮒙򍶳񄔁򺡳򿚦𡔀򭮦񔤹󯏋񎢄򰳕􅮛򒱻𒴢󹬝󼉽򨳢񒺉󼁵񕊭󕂏𺕵綳𗵒򵰅񜱸򿟴𧣍󎕞𞧫𴐖򶨀𨿖񾈻􅙯"Ç•HтÄ•β94в33+ç20ôJ»

Try it online! For some reason I can't create a working TIO link for this, you will have to paste the code manually.

Commented:

"...􅙯"                    # long string
        Ç                   # convert to code points
         •HтÄ•β             # convert from base 1125000
               94в          # convert to base 94
                  33+       # add 33 to each digit
                     ç      # convert from code points
                      20ô   # split into groups of 20
                         J  # join each group into a string
                          » # join the groups by newlines

The long string is generated with this program. Note that this won't work for every base since some numbers like 0xdc00 can't be converted to a character.

\$\endgroup\$
5
\$\begingroup\$

JavaScript (ES6), 259 253 250 chars

f=
_=>"𶪭񘆠񇖙𦗡񛇴𥐆៘򞵃𤲼񳈽𽈵񱃓񗜼⋷򣇏㆐񯾇𪄄򬧗𨙔⇸񷾒𢹺񾯏󄎩򜆸𫰗຺򑔠򕖴񝴟񫒲򵎙񏾆⋄⡊񥧽򍨱򯻎򘀊𺥱ᙫ񼫴򓁙򾮢򡈓񮓊򞯫ᷢ򑬿񄤸񶹉񶮲𾕜𠴴ᰃ񪪄󇙴񘟣񢰈򙵸𜁁Ἑ선񏱼𩞈𛧶񅕋񛼋ᴱ𠲬򓡳ꦁ󅏽񿸖蘀Ȥ𬾗𩥇򉱨𡉅𸏑𘸻ȫ񾙴𫚟𹜓𽑯񮉖񍡞Ὃ񵇭񜗐󇡱񃎋㵽򓝠᤽𔂛𔰔𻞚熀󑒝񒫤ᗜ񳫂𭑸𯾈𡊺򘉸嶼෎򷸋󍞍򁹏񯥛𜵶󅈏ࢥ񋝻񒜼魱񅀊򕹃񎂰ʼ𹻇򰛘𒾔򧎚𜁶𠳟ᅵ񵁑鍅𜏣򘊭񳭎𜛵Ⴅ".replace(/./gu,c=>String.fromCharCode((n=c.codePointAt())%95+32,n/95%95+32,n/9025+32)).replace(/ /g,"\n")
;document.write(`<xmp>${f()}</xmp>`);

Explanation: Simply encodes three ASCII characters using one Unicode character. Edit: Saved 4 bytes thanks to @Arnauld. Saved 2 bytes by dividing by 9025 instead of by 95 twice. Saved 3 bytes by subtracting 32 in the encoder:

f=s=>s.replace(/\n/g, " ").replace(/.../g, c=>String.fromCodePoint(c.charCodeAt()-32+(c[1].charCodeAt()-32)*95+(c[2].charCodeAt()-32)*95*95));
o.textContent=f(i.value);
<textarea rows=20 cols=20 id=i oninput=o.textContent=f(this.value);>
"m8V}G=D@7G1lAI,v08`
#(hNb0A8T!g;==SVaG5~
g"jUF!bmRY(3I@na?2S{
fJVzo/GQYU%ybpfUq3aG
Yza[jc,WJ$bP^7r};Da}
V-!Z+Nk:`/poc}d/X:G\
sWX{dbAUv6,i]%RG$hRp
),bd+?/{U1tU[;<;u.Nk
ZFPIOzJ/HimL!nexc,ls
HM%k3D$n2|R,8L?'eI_n
qs.kzbil$UQy_#Z)l#i%
*G4gr2<R^y#/iQ9,<+p%
}BYnb3_&:!m;#~QL1C?t
f.U>wIkTz=P>bf!uwb!d
z()rG)>~:q4#\}~pQEvZ
=OT8T4<i50%/8%eX^"3E
#Ks(8}OzZ&]RQ(-BLy<7
p7B~GEsF$)>?a"dtGCC'
H;:n&p&Z($ukNd,Et.$O
F*Uq0$dm,m%ejPT~u,qL
</textarea><pre id=o></pre>

\$\endgroup\$
2
  • \$\begingroup\$ It's OK to pass floats to String.fromCharCode(), so you can remove both |0. \$\endgroup\$
    – Arnauld
    Nov 14, 2020 at 2:21
  • \$\begingroup\$ In Node, you could do .replace(/./gu,c=>Buffer([(n=c.codePointAt()-32)%95+32,n/95%95+32,n/9025+32])). \$\endgroup\$
    – Arnauld
    Nov 14, 2020 at 2:25
2
\$\begingroup\$

Julia 1.0, 210 200 bytes

_->0:19 .|>i->join(Int(c)÷95^i%95+' ' for i=0:2,c="𶪭񘆠񇖙𦗡񛇴𥐆膛񧁮񉆓㚥񀢩񸋀𯌏愹񔾛򫌌𒽡񇝪񅵌󉬚񷾒𢹺񾯏󄎩򜆸𫰗񾠳򃡴𜀳鳑򉯐󎴢򐃸𝺴𙥒𻂝򰨡󎟉񻰍򅇏񼫴򓁙򾮢򡈓񮓊򞯫𕬫򗗎𡱛𦭗򃏺𼉚񥬵񕅷񨡖𢂿򫗌򫹙򕫰򸩓선񏱼𩞈𛧶񅕋񛼋򴓂򥦐򢙡񴸽򌸷𕋒򠻲񖊢򶔿񮴨謈񭪗𽾩츀񾙴𫚟𹜓𽑯񮉖񍡞򜌑񃕗򦎙񁿷򒈔򻔺㰖𓮲񗵞󏴉𭼽󎓤񭵿򁳉񳫂𭑸𯾈𡊺򘉸嶼瞑𓤀񩮊񭈼񋍽𿱏𴢞񘇫񕪘񂓹廀񗹗𐏧𹻇򰛘𒾔򧎚𜁶𠳟񔴛򳭆򕻐򩽎򤩪󐕚򲱚򐯌")[20i.+(1:20)]

Try it online!

output is a list of strings

\$\endgroup\$
1
\$\begingroup\$

Vyxal j, 147 chars

`"񖘎󉟇󒰇疘񿛤򍃦𚪛󡨅򗭇򥙷𛳞󯐙󃫅暹򘂴񩑩񘔼󈀒񬷿ᠶ񱽑󫦠򞝣󌸪񿛁󡥯񂋋󡌅򲯛񷚗󇄻򱊏񳣬𰮙򽲊񌴯脭񸵵󛿒񛽙𛴭򻀉󦏜򫦝򗼨𿹀򵔾󱄩򎺼ﭮ򁻛򦪵򵁇񬑬𛷂󆯖򁜣𰵭񌅕񬌜򝣺񶞜󇛷񉛍󖭺񖓾񁬔񭆤򈺢蹝󩾶󜞲󀞆񪟴򭙚𜐧񧥉򏵓򪠲򩑟򧔣񔪧򐠒򨩿󘭂󨊅󕹹󋚈󗙧񇊦𑕛󀠉𓭍ੇ񥢴򰾷𸴕󖆖󫾆򁯞򖪅񀐰𬍛㈭򃉃񝒓򐙷򨖴𧘵񑍏򱱮𽿄񛅹첃򾿥򻚳𮃲򽞗񼙄񥺮򃶞򼎍򍘰񭔽򶸍񞟣𔛎򺞗򦔙񧰩񬴇`Ck4β94τ33+C∑²

Try it Online!

At least I think it's 130 chars - I had to count by hand...

\$\endgroup\$
1
  • \$\begingroup\$ This is 147 chars \$\endgroup\$
    – naffetS
    Feb 29 at 2:04
0
\$\begingroup\$

Deadfish~, 4347 bytes

{i}{i}{i}iiiic{{i}ddd}iiiiic{{d}iiiii}dddc{i}{i}{i}c{{i}dddddd}dc{{d}iiiii}ddddc{d}c{i}dddcddddc{d}ic{i}iiiiiic{d}{d}ddc{{i}dddd}dc{{d}iiiiii}dddc{i}ddc{d}{d}{d}ic{{i}ddd}iiiic{{d}iii}c{i}ddc{{i}dddddd}c{{d}ii}ddddddc{i}{i}iiiiiciiiiic{{i}dddd}iiiic{d}{d}ddddddc{i}{i}c{{d}iiiii}c{i}{i}dddc{d}ic{i}{i}{i}ddc{{d}iiiii}dc{{i}ddd}c{{d}iiiiii}ddddciicc{i}{i}iiciiic{i}ic{d}{d}ddddddc{d}{d}iic{{i}ddd}iiic{{d}}{d}ddddddc{{i}d}iiic{{d}iii}ic{{i}ddd}iic{d}{d}dc{d}dddddc{{d}iiiiii}iiic{{i}dddd}iiiiic{i}ic{d}{d}{d}iiic{i}dddc{{d}iiiii}ic{i}ic{i}{i}iic{d}ic{{i}dddddd}iiiiiic{d}dddc{d}{d}{d}ddddc{d}dddc{i}{i}{i}iiic{{i}dddddd}c{{d}}{d}dddc{{i}d}iic{d}{d}{d}iic{i}iic{i}{i}{i}iiiiiic{d}dc{{d}iiii}ddddc{i}{i}iiiic{i}c{i}ddcddddc{{d}iiiii}iic{{i}dd}iiiic{d}{d}dddc{i}iiiic{d}c{d}{d}iiic{i}{i}{i}ddc{{d}iiii}ddc{{i}dddddd}iiiiiic{d}{d}ddddddc{{d}iiii}dc{{i}dd}dc{i}{i}{i}iiic{d}{d}dddddcddddddc{i}iiiiic{d}iiic{{d}iiiii}dddddc{{i}dddddd}iiic{d}dddc{{d}iiiiii}iic{{i}dddd}iic{d}{d}iic{i}iiiic{{d}iiiiii}ic{{i}dddd}dc{i}ic{{d}iiii}ddddddc{i}dc{i}{i}{i}dc{i}{i}{i}ddc{{d}}{d}dddddc{{i}ddd}iiiiiic{{d}iiiiii}dc{d}ddc{{i}dddd}dddc{{d}iiiii}iiic{i}{i}{i}iiiiic{i}{i}{i}dc{{d}iiiii}ic{{i}dddddd}ddc{{d}iiiii}ic{{i}dddd}iiiiicdc{d}ddc{i}{i}iiiiiic{d}{d}dddddc{{d}iiiii}dddc{{i}dddddd}ic{d}{d}{d}c{i}iiic{i}{i}ic{{d}ii}ddc{{i}}iiiiic{d}{d}{d}iicic{i}{i}{i}iiiiic{d}{d}dddcddc{d}{d}{d}dddc{i}{i}c{i}{i}{i}iiic{{d}iiii}ddddc{d}c{{i}dddd}ic{d}ddc{{d}iiiii}ddddddc{{i}dddddd}iiiiic{d}dc{d}{d}{d}dddddc{{i}ddd}ddc{d}{d}ddc{i}{i}{i}c{{d}}ddc{i}{i}{i}iciiic{{i}ddddd}iiiiciic{{d}iiii}iiic{i}{i}c{d}ddddddc{{i}ddd}iiiiiic{{d}iiiiii}iic{d}{d}{d}ddddddc{{i}ddd}dddc{d}{d}{d}dciiiiiic{d}{d}{d}ddcicdc{{i}dddd}ddc{{d}iii}dc{i}{i}{i}iic{i}{i}{i}dc{{d}}iiic{{i}dd}c{d}{d}c{i}c{d}iiiciiiiiic{{i}dddddd}iiic{{d}iiiii}iic{d}{d}{d}iiic{i}{i}iiiiic{i}{i}{i}iiiciiiic{d}{d}{d}dddc{{d}iiiiii}dddc{{i}dd}dddc{d}ic{i}{i}dc{d}{d}dc{{d}iiiii}dddddc{{i}dddd}iiiic{i}dddc{{d}}dddddc{{i}dddd}iiciiiiic{{d}iiiiii}c{{i}ddd}c{{d}iiiii}ddddddc{i}{i}dddc{d}{d}{d}ddc{{i}ddd}iiiic{{d}iiii}c{{i}ddd}iiiic{{d}iiiiii}ddc{{d}iiiiii}iic{i}iic{i}{i}c{d}dddc{d}{d}ddddc{{i}dddd}iic{d}{d}{d}iic{i}{i}iic{i}iiiiic{{d}}c{{i}}iiiciic{{d}iii}ic{{i}dddd}ic{i}iiiiic{d}{d}ddddc{i}dddciiic{{d}iii}ddc{{i}ddddd}dcddddc{{i}dddddd}c{d}{d}ddddddc{{d}iiii}c{{i}ddddd}iiiiic{{d}iiiii}ic{{i}ddd}dddc{{d}iii}dddc{{i}ddd}c{{d}iii}iic{d}{d}{d}iiic{i}{i}{i}iic{i}{i}{i}dc{d}{d}ic{{i}ddddd}ic{i}ic{{d}iiii}ddddc{i}c{i}{i}iic{i}iic{i}{i}{i}dddc{{d}ii}ddddddc{i}iic{{i}dddd}ddc{d}{d}ddddc{d}{d}ddddc{d}dddc{i}iiiiiic{d}{d}iiic{{i}ddd}dc{{d}iii}dddddc{d}{d}{d}iiic{{i}}{i}iiiiic{{d}iiii}ic{i}{i}iiic{i}{i}ic{d}ddc{{d}iiiii}iiic{{i}dddddd}iiiic{{d}iiii}iiic{i}{i}c{d}{d}dddddc{{i}ddd}iiiiiic{{d}iiiii}c{d}{d}ddddc{{i}d}ic{{d}iiiiii}dddddcdddddc{d}{d}{d}iiic{i}{i}ddcddddc{{i}ddddd}iiic{{d}}ddddddc{{i}d}iic{{d}iiiii}ddddddc{{i}dddddd}dc{d}{d}dddc{{i}dddd}dddc{{d}iiiiii}ddddddc{i}{i}{i}iiiic{d}{d}dddc{{i}dddddd}ddc{{d}iiii}dc{i}{i}dc{d}{d}iic{i}{i}{i}iiiiiiciiiic{{d}iii}ic{{i}dd}iiiiciic{d}{d}dc{{d}iiii}dddddc{{i}ddd}dddc{{d}i}c{{i}}{i}iic{{d}ii}ddcic{{i}ddd}iiic{{d}iiiiii}dddc{d}{d}{d}c{i}{i}ic{{i}dddd}iiiic{{d}iii}iic{{i}ddddd}iiiiic{{d}iiii}dc{d}{d}iiic{{i}dddd}dddc{i}{i}{i}iiicic{d}ddddc{d}{d}{d}dc{d}ddc{{i}ddddd}dc{d}{d}{d}iic{{d}ii}c{{i}ddddd}ic{i}{i}ddciiiiic{d}{d}{d}iic{i}{i}{i}ddc{d}{d}{d}ddc{i}ddc{{i}dddddd}iiiiic{{d}iiiii}ddcdddddc{d}dc{i}c{i}dc{d}{d}ic{{i}dddd}iiiic{d}dddciiiiiic{{d}iiii}c{i}{i}dddc{i}{i}ddc{{d}iiii}ic{i}{i}iiiiic{{i}dddddd}c{{i}dddddd}c{{d}iii}dddddc{i}iiiiiic{{i}ddd}dc{{d}iiiiii}ddddddc{{i}dddddd}iiic{d}{d}{d}ddc{{d}iiiii}ddc{{i}ddddd}iiiiic{d}dcdc{{d}iiiiii}dciiiiic{i}{i}ic{i}c{{i}dddddd}iiiiic{{d}iiii}dcdddddc{{d}iiiiii}dddddc{{i}}iic{{d}iiii}iiic{i}ic{{i}dddd}c{{d}iiiii}dddddcddc{{i}dddddd}iiiiiic{{d}iiiiii}dddddc{d}{d}{d}ddddciiiiic{i}{i}icic{i}{i}{i}iiiic{{d}iiii}dddc{{i}dddd}iiiiiic{i}iiiiiic{{d}iiiiii}dddddcddddcc{d}{d}{d}iic{d}{d}{d}ic{{i}dddd}iic{d}dddcdc{{i}ddddd}iic{{d}iii}ddc{{i}ddd}iiiic{{d}iii}ddddc{{i}ddddd}iic{{d}iiiii}cddddc{{i}dd}ic{d}c{d}{d}{d}ic{i}{i}iic{{d}iiiii}ddddddc{i}{i}iiiiic{{i}ddddd}dddc{{d}iii}c{d}c{{i}dddddd}iiic{{d}iii}ic{{i}dddd}c{d}{d}{d}iic{{i}dddddd}iiic{i}{i}{i}ddc{{d}iiii}dddddc{d}ddc{{i}dddd}iiiic{i}dc{{d}iiii}dddddc{{i}dddd}iiiiic{{d}iii}ddc{{i}dddd}iiiiciiiiic{d}{d}ddddddciiiic{{i}dddddd}iic{d}ic{{d}iii}dddc{{i}ddd}dc{{d}iiiiii}iiic
\$\endgroup\$
0
\$\begingroup\$

Brainfuck, 100 + 140 bytes

,[<+++[>>++>+<<[->-[>+>>]>[[-<+>]+>+>>]<<<<<]>>,<[-<----[>>-<<----]>>-<]>.[-]<<<-[->>>+<<<]>>>]>>>,]

Attempt This Online!

Explanation: every 3 ASCII characters are encoded in 4 bytes (1 character). Counting bytes from left to right:

  • the least significant \$6\$ bits of each \$n\$-th ASCII char are stored in the least significant \$6\$ bits of the \$n+1\$-th byte of the Unicode char;
  • the \$6\$-th least significant bit of each \$n\$-th ASCII char is stored in the \$n\$-th bit of the first byte of the Unicode char.

Visually:

0abcdefg 0hijklmn 0opqrstu => 11110oha 10bcdefg 10ijklmn 10pqrstu 
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.