37
\$\begingroup\$

The task

Today's special offer: consonants and punctuation for FREE!

Your program or function will be given as input the first 6 paragraphs of Lewis Carroll's famous novel Alice's Adventures in Wonderland, with all vowels [aeiouAEIOU] removed and all other characters left intact.

It must output the original text, byte-for-byte identical.

The shortest answer in bytes wins.

You may store your data in one or several files, as long as this is done under the rules for scoring multiple files. Please consider providing a way to access these files in your answer if you do so.

As a reminder, fetching data from any other external source is forbidden (this is a default loophole). If you do that, you'll be trapped in the Rabbit hole for 6 months.

Input

Your program or function will be given this exact ASCII string, where 703 vowels are missing:

lc ws bgnnng t gt vry trd f sttng by hr sstr n th bnk, nd f hvng nthng t d: nc r twc sh hd ppd nt th bk hr sstr ws rdng, bt t hd n pctrs r cnvrstns n t, "nd wht s th s f  bk," thght lc "wtht pctrs r cnvrstns?"
S sh ws cnsdrng n hr wn mnd (s wll s sh cld, fr th ht dy md hr fl vry slpy nd stpd), whthr th plsr f mkng  dsy- chn wld b wrth th trbl f gttng p nd pckng th dss, whn sddnly  Wht Rbbt wth pnk ys rn cls by hr.
Thr ws nthng s _vry_ rmrkbl n tht; nr dd lc thnk t s _vry_ mch t f th wy t hr th Rbbt sy t tslf, "h dr! h dr!  shll b lt!" (whn sh thght t vr ftrwrds, t ccrrd t hr tht sh ght t hv wndrd t ths, bt t th tm t ll smd qt ntrl); bt whn th Rbbt ctlly _tk  wtch t f ts wstct-pckt_, nd lkd t t, nd thn hrrd n, lc strtd t hr ft, fr t flshd crss hr mnd tht sh hd nvr bfr sn  rbbt wth thr  wstct- pckt, r  wtch t tk t f t, nd brnng wth crsty, sh rn crss th fld ftr t, nd frtntly ws jst n tm t s t pp dwn  lrg rbbt-hl ndr th hdg.
n nthr mmnt dwn wnt lc ftr t, nvr nc cnsdrng hw n th wrld sh ws t gt t gn.
Th rbbt-hl wnt strght n lk  tnnl fr sm wy, nd thn dppd sddnly dwn, s sddnly tht lc hd nt  mmnt t thnk bt stppng hrslf bfr sh fnd hrslf fllng dwn  vry dp wll.
thr th wll ws vry dp, r sh fll vry slwly, fr sh hd plnty f tm s sh wnt dwn t lk bt hr nd t wndr wht ws gng t hppn nxt. Frst, sh trd t lk dwn nd mk t wht sh ws cmng t, bt t ws t drk t s nythng; thn sh lkd t th sds f th wll, nd ntcd tht thy wr flld wth cpbrds nd bk-shlvs; hr nd thr sh sw mps nd pctrs hng pn pgs. Sh tk dwn  jr frm n f th shlvs s sh pssd; t ws lblld "RNG MRMLD", bt t hr grt dsppntmnt t ws mpty: sh dd nt lk t drp th jr fr fr f kllng smbdy ndrnth, s mngd t pt t nt n f th cpbrds s sh fll pst t.
  • Size: 1677 bytes
  • Paragraph separator: LF
  • SHA-256: df40659e07f6185ea348028dd22f137902fa50b9abcb790ff39353e189656c6f

Output

Your code must print or return this exact string.

Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, "and what is the use of a book," thought Alice "without pictures or conversations?"
So she was considering in her own mind (as well as she could, for the hot day made her feel very sleepy and stupid), whether the pleasure of making a daisy- chain would be worth the trouble of getting up and picking the daisies, when suddenly a White Rabbit with pink eyes ran close by her.
There was nothing so _very_ remarkable in that; nor did Alice think it so _very_ much out of the way to hear the Rabbit say to itself, "Oh dear! Oh dear! I shall be late!" (when she thought it over afterwards, it occurred to her that she ought to have wondered at this, but at the time it all seemed quite natural); but when the Rabbit actually _took a watch out of its waistcoat-pocket_, and looked at it, and then hurried on, Alice started to her feet, for it flashed across her mind that she had never before seen a rabbit with either a waistcoat- pocket, or a watch to take out of it, and burning with curiosity, she ran across the field after it, and fortunately was just in time to see it pop down a large rabbit-hole under the hedge.
In another moment down went Alice after it, never once considering how in the world she was to get out again.
The rabbit-hole went straight on like a tunnel for some way, and then dipped suddenly down, so suddenly that Alice had not a moment to think about stopping herself before she found herself falling down a very deep well.
Either the well was very deep, or she fell very slowly, for she had plenty of time as she went down to look about her and to wonder what was going to happen next. First, she tried to look down and make out what she was coming to, but it was too dark to see anything; then she looked at the sides of the well, and noticed that they were filled with cupboards and book-shelves; here and there she saw maps and pictures hung upon pegs. She took down a jar from one of the shelves as she passed; it was labelled "ORANGE MARMALADE", but to her great disappointment it was empty: she did not like to drop the jar for fear of killing somebody underneath, so managed to put it into one of the cupboards as she fell past it.
  • Size: 2380 bytes
  • Paragraph separator: LF
  • SHA-256: 86abbfeb5dfa10bd9b266ea91723b9f79ab49306e2e8266174a0aa4c49ba7d57

You can use this script to test your output.

\$\endgroup\$
  • \$\begingroup\$ What if I fetch data from external resources and only return it after 6 months? \$\endgroup\$ – RGS May 5 at 18:51
  • \$\begingroup\$ @RGS I'm afraid you can't fool the White Rabbit that easily... :-/ \$\endgroup\$ – Arnauld May 5 at 22:55
  • 6
    \$\begingroup\$ Mathematica has an useful built-in: ExampleData[{"Text", "AliceInWonderland"}]. Is it allowed? :) \$\endgroup\$ – the default. May 6 at 12:36
  • \$\begingroup\$ @mypronounismonicareinstate I should have seen it coming! But please ... no. :-) \$\endgroup\$ – Arnauld May 6 at 12:39
  • 1
    \$\begingroup\$ One thing I really like about this challenge is the scores aren't simply dominated by the choice of language: golfing languages first, regular languages next, weird esoteric languages like brainfuck last. Data encoding is the biggest factor here, so more of a level playing field. \$\endgroup\$ – Steve Bennett May 7 at 1:26

11 Answers 11

12
\$\begingroup\$

Python 2, 121 + 557 + 1 = 679 bytes

i=0
for c in open('a').read():i=i<<8|ord(c)
s=input();k=0
while i:s=s[:k]+'aeiouAEIO'[i/9%9]+s[k:];k+=i%9+1;i/=81
print s

Try it online!

This needs the following data saved in a file named a:

00000000: 7761 d548 fdb9 2ae6 f85b b98c e171 79b6  wa.H..*..[...qy.
00000010: ff19 d1aa 487f 2d27 03f5 030f 1fa1 df57  ....H.-'.......W
00000020: 0552 e6c3 df80 aeeb 75df 89a8 bd59 55ea  .R......u....YU.
00000030: 2244 fcfa b086 e85c 2835 be0a 230e 67a1  "D.....\(5..#.g.
00000040: adde 0f6d 2e92 b038 905b 5e7a cc04 c536  ...m...8.[^z...6
00000050: dd7a b912 9897 92c0 fe1a 64ff 04c1 7387  .z........d...s.
00000060: a782 f2c0 0510 1400 9724 876f de25 31af  .........$.o.%1.
00000070: f0c5 849d cd9b cca6 a32d 4808 e9b6 221c  .........-H...".
00000080: 3b1f ff7f 38e9 1e69 a42f b038 4b65 e694  ;...8..i./.8Ke..
00000090: 1d94 6743 e616 5b3b c510 d7c5 7b3e 4f31  ..gC..[;....{>O1
000000a0: df7d 2fe9 62df 55c1 3c45 2ea9 5777 2af1  .}/.b.U.<E..Ww*.
000000b0: 3d9c d752 3963 ffd8 7f7b a052 423d f38b  =..R9c...{.RB=..
000000c0: 181e 7562 2653 0a41 3fb4 9d57 9a3c d665  ..ub&S.A?..W.<.e
000000d0: 3bbd 5f5a 731e 4b93 3328 801d e1b0 04af  ;._Zs.K.3(......
000000e0: ab51 9126 0412 9eae 7b88 8dcc c99a 7624  .Q.&....{.....v$
000000f0: 0610 09d5 a8f1 e940 bf5e d281 2497 f372  .......@.^..$..r
00000100: 7d0d a1e6 8dea a6e6 381a a134 8981 998c  }.......8..4....
00000110: 6684 936b 637c 3d94 b287 8aa5 9186 3129  f..kc|=.......1)
00000120: c629 d9bd ac7a a10d 3178 2519 9a7e c45f  .)...z..1x%..~._
00000130: bdd1 e128 526c 8e53 cef1 cee8 5cb4 adb9  ...(Rl.S....\...
00000140: 4ad2 7f4f 3799 73f8 5629 215b 645d 8971  J..O7.s.V)![d].q
00000150: 0ef7 7286 04c2 f596 d27e cfa7 fb46 0ef7  ..r......~...F..
00000160: aeaa d39f f163 d729 d094 887e e7a5 6169  .....c.)...~..ai
00000170: ef50 94b9 85a0 848f 4d66 4314 c3a5 bf56  .P......MfC....V
00000180: 5d3d d6d9 a4bc 88c3 8da5 3393 06bc 6e60  ]=........3...n`
00000190: 9448 47f3 a01b 36e0 fe3a dc6e a7d7 aa6d  .HG...6..:.n...m
000001a0: b8e6 8354 aa38 039b 5788 6330 43d0 0b77  ...T.8..W.c0C..w
000001b0: 32a8 d419 b4b9 d1e1 ffe5 81bf e6a3 a54b  2..............K
000001c0: 725e 0850 3973 c4b2 31fb 5a5c c4cd c142  r^.P9s..1.Z\...B
000001d0: c851 0f57 acf9 12c6 de59 af38 83ee 5c50  .Q.W.....Y.8..\P
000001e0: eae2 0e1d f579 efe0 b871 3a29 6ec9 7167  .....y...q:)n.qg
000001f0: 4ca3 6379 b1b6 6b83 1f84 7e29 d4bc f36f  L.cy..k...~)...o
00000200: 1d61 d26d 519b 05c7 b8f7 2bb9 fa44 95ae  .a.mQ.....+..D..
00000210: 883f 9539 a924 bf6f 1297 dc83 74d5 9571  .?.9.$.o....t..q
00000220: 1345 b844 55b4 b423 3591 dd87 4b         .E.DU..#5...K

Python 3.8, 848 800 789 780 776 bytes

Function that prints the result.

def f(s,k=0):[print(end='AEIOaeiou'[c//9%9]+s[k:(k:=k+c%9)])for c in b"R7/'.8:A017/B8=08/C/('B%:A:AAA.C70/'-./8B/?B080'-%;J9'A8I/BA/%6B8:)&:.I.A&?E?LR708?K8I/BA/%6EB/'A7.99/C:'0(/?MC/B'%/0-02-0)I</10-%I.B%9&$<$9?L/E0?J.B/9J(8;/$7620J1'7/&9:9.0(@22./'A:B2.&&.:(B8R7099B2K?JC/'A-(/&9'@82o-'o-'f(/%310?L8@/&/)8AJ0A1(.?MA%/A./(:J(/7.8(-.0H7/%I)L1/&8&H*?A&(?JA:$9?'A1(?@/&9)0J6/BR70&0A0-1A:&/&C0;(/'.0.@/-/&&99-8/&$9?(A0A&)A%.?JA9(J::I6@</&&D/60&/9(AI%1'K97/A-.9BB&&/&9@.J1///e%A0@1C0R7.&/:./A/A7.:A:/E/'A/?J%$;/&9@/3$:B7.&J0B@/')080J2DAJ3&R7/'A&@1B9%?LA:/1.@0/?L/1&:B&1-01Z81/1'1-0C/12EC/(1B7.(/1CA?A%?K/(AA1''?:A&02=060A?BB(%.?L(/'@:BJ9'?A(A-.(<1/?@/(/7/C/1(@71(0./80:J?((?C/1..).0/''(8I0KIB3/?BB&(A@.C0//(/&09'%/0mS\SRR^KA1-'7&?909&5/9B7/BC/'B-&B8:@.BJ/-)A%%0AJ88@@.C/J?((/1'8"]

Try it online!

Observations: U does not occur in the original text, so there are only 9 distinct vowels. There are at most 8 characters between two vowels.

This means that the value and position of each vowel can be encoded in a single base-81 digit.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ wait, is reading from a file allowed? \$\endgroup\$ – ASCII-only May 8 at 7:02
  • 1
    \$\begingroup\$ @ASCII-only The post explicitly mentions this: You may store your data in one or several files, as long as this is done under the rules for scoring multiple files. Please consider providing a way to access these files in your answer if you do so. \$\endgroup\$ – ovs May 8 at 7:04
7
\$\begingroup\$

Charcoal, 496 bytes

UT≔⮌⪪⪫E⁶S⸿¹θF”}➙¬⬤"K9dSmD⸿¤{qW26↶s›P?⌕»´[↧!²⊖~ks×◨﹪§^“σ@{″¦YO↓⊞⊗←,÷@vⅈ8⎇▷➙↖✳H Σ⧴Z↘?γ↙&HQ⪫‖³↗↧¦rⅉ⭆&(\²≡›¹,↗&~H*oηoIs·D +N⍘q↑Tθ7FI#*Nr↔№↘№⊟º⁼¶⊞↶⌊ζR‴C﹪-➙∕⌕∕Π℅ΠJ→6◨∧%9¤ÀAσRH✂,&πC∨<I=À=≧d⊗↓‹YA‖Y%℅_⦃⁺»⌊ζ⟦J≦χ:K3» ,M±g±Φ→*›t»Sυ_¶pA‹↷e¿ ⁸2+∨X⁵SmWAL]FK÷)›¤1⭆ξp₂T>V§?″(↧⁴↙b⁸1E↘Vⅈ⊗Yb⮌¶¿%℅Π;⁴Hz⊙0.×℅BSUa⁻~e⁶⸿⍘ΦδDÀ»m±D±≕Ss⌈βA|QA⌕↥D¬μB→↔⌕◧E℅⊖HιVU⌈τ↶ZF1Sn⌕\¤�|üA§Qt⌈⮌ρ»≕↶⁵Ks3ψ→χ}⌈093⦄LgW‴ιO².huρ▷⊙�K[№ê←⁷D{π▶BêTBAvlIθn⧴P;⎇ÀPξ→↘υU>|⌕⁺;⪫ω∨⁵◨‽Z⧴﹪↓ΦLτ,‖&!,⊗αJ-κ·Z∧⁼1⁴8№✂τEΦχl}§SV'‽5⊗⸿β=¤|KCTG⦃”«§AEIOaeiou÷℅ι⁹F﹪℅ι⁹⊟θ

Try it online! Link is to verbose version of code. Based on @ovs's approach. Explanation:

UT

Turn off automatic padding.

≔⮌⪪⪫E⁶S⸿¹θ

Read in six lines of text, join them together (I could have used \n but \r made the code easier to write), split into characters, and reverse, thus resulting in a list that I can pop as I go.

F...«

Loop over a compressed data string.

§AEIOaeiou÷℅ι⁹

Take the ordinal of the character, divide it by 9, and cyclically index into the list of vowels. I used the character codes 36-111 for readability, making the uppercase vowels use codes 81-111, with the cyclic indexing mapping them to start of the list.

F﹪℅ι⁹

The remainder gives the number of non-vowels to print. Loop that many times.

⊟θ

Remove and print each character as needed from the list generated from the input.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ According to the prefix of the compressed string (}) and Charcoal's source code, it seems that the underlying compression algorithm is LZMA. Pretty efficient! \$\endgroup\$ – Arnauld May 6 at 14:50
  • \$\begingroup\$ If there is a prefix in the compressed string, wouldn't that mean it's inefficient? \$\endgroup\$ – the default. May 6 at 15:15
  • 2
    \$\begingroup\$ @mypronounismonicareinstate The 1-byte prefix tells how the string is encoded: RAW, DICTIONARY, CHARSET, RLE, BROTLI or LZMA. (Charcoal tries all methods and keeps the one that leads to the shortest result.) \$\endgroup\$ – Arnauld May 6 at 16:45
5
\$\begingroup\$

Perl 5, 862 bytes

$g=join'',<>;@v=('aeiouAEIOU'=~/./g,'');for('%21@Q2BcAQb1CRBZaRACa@`SP2cBcCCA3b1Q@Q!1BCQC#QRAPQ 2ZDBPSBD1CSA@2#RB`Z@Ba413@C#ZS$e21RC$RD1CSA@2#ZSQ@SB12RQCb`QPaC$ZCaCPP1AQ!QZA!PZD2ZQAaQ 413P2P@"ZP"S$aCZQS$A3QBT@bBZA@"2!ZATA`R1@BRbQ1Pc1ZAZA1@SBcQZA0@A2`cRE21RRSQZDS$Ca@SA a@BPS2AZHQ XQ WPa@1ZQaS$bC1@A@ZBCDASA`a3$ZC@1CA1@bd@aB12@a!1T"1@40ZDaa@B@D ZS#@@c$CB`"S SA`c#1@BPZATB!CU21PASAQ!cB`A@CaRZ@a@Q1Q31A!@@BRQ"A@@"S cAS@@ZC@13$CBPdBbd2#2ZQ@@CZAB!PABPcD01`TRR1CA!2SSP@A@BS14AaAAG@3AS1caU210ABa1CACB12cBaCZQ@SAC$@0"ZA@BS1AZP"cR10DASS1@PZARATAZCZCDAZPE21@S@C1cRP3$cBaAa31QC$aA`BcPAa!Qf"AaA`Qa!SaAaZCZSa@acR10aAccC#@3$Q@cCA`PS"c@AQZBZaR!SC#SP`13$`a@S2cTBPS#@cA!0bZQaC#1@aB1CaA`c21`aQ1BARdC `c#aAa10ZA1Q@PPbD1TT3QZQC#SP@cC13aQA@a@ARPP1AX5FEE56dSAa R0C"QRPAZqBSR1CSa@SQ CRBc13TAA ZC@01SDBBC313aDC `aA`R'=~/./g){$c=-32+ord;substr($g,$p+=int$c/16,0)=$v[$c%16]and$p++}print$g

Try it online!

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ You can save a few bytes using -p and moving some of the args around a bit, but keeping the same approach: Try it online! (I had to strip the long string to fit the URL here!) \$\endgroup\$ – Dom Hastings May 7 at 12:19
  • \$\begingroup\$ Thx @DomHastings Maybe I'll update later. I also think I can shave a bit off by doing some huffmanish stuff on the long data string unless it's eaten up by much longer unpacking code. \$\endgroup\$ – Kjetil S. May 14 at 14:36
5
\$\begingroup\$

C (gcc), 817 816 804 bytes

i;a;f(char*t){for(a=0;i="[A80:ABM9:D8KCB>C9K;02L1AMBMKK9JD8:0:78BK:KI:C91:.AWB1LBT8KL90AICB23B;S8J0KIOR_A8CKRCT8KL90AIO:0LB8AC:KD2:1;KRN;K1189:7:<71WA=9;:.S8J1A10@4@LR;K=LR9J:BU0DB<0@A7<U92C80BCD:81M8<<80LBM:</09A2MC]A8CCL:WLRK;0L9.;0B1LA9{:.y:.p1;08=;LRDK8090EKT9L92;JRN08K980DV0;B8A0;78U@80S/W;;0B0T.OI00MRKB2@L.L92MI80B1<UB7K^A819L9:7MB290K;C3;0:8:J89700BC:@900@L.M9L00N08JRKB1VBDVAIA=00K<B719B1MT/82UCC8K97ALL1090BL8S9;99o0J9L8M;^A8/9B;8K9KB8AMB;K=0L9KR0/@<0BL894@MC8/T9LL801<C9U9NNT94]A80L0K8MC1JRMB;9;J8:KR;92BM19;7:h@9;92:;7L;9;NO;0;MC8/;9MMKI0JR:0MK921L@M09:E>C7LKIL128JR2;0LAMUB1LI0M97/D=;KI80;B8K;92MA82;:8B9CVK.2MI;9;8/<8:011DT8UUJ:=KIL10MK8J;:90;09C1189y\\f]]\\eVL9;.C/K@:C19?BLC8KL;0L:.KCBM8JU99.N0/8LTBBKJ8J;TK.2;92C"[a++];t+=i%9)i-=46,printf("%.*s%s",i%9,t,L"aeiouAEIO"+i/9);printf("t.");}

Try it online!

12 bytes off thanks to ceilingcat.

The function f accepts the given text (without vowels) as an argument and it prints the desired text on stdout.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ @ceilingcat Remember that function submissions must be reusable. \$\endgroup\$ – S.S. Anne May 6 at 16:44
  • \$\begingroup\$ @ceilingcat Thanks -- I needed to add an initialization for a so that the function would be reusable, but it's still shorter that way than turning from a function into a full program. \$\endgroup\$ – Mitchell Spector May 6 at 17:26
  • \$\begingroup\$ @S.S.Anne I initialized a in ceilingcat's function before posting it, so that the function would be reusable. \$\endgroup\$ – Mitchell Spector May 6 at 17:27
  • \$\begingroup\$ @ceilingcat I like the wide char trick, by the way. \$\endgroup\$ – Mitchell Spector May 6 at 17:31
4
\$\begingroup\$

Stax, 568 bytes

ï¥æ£░iï╘◙±Γn♪º↔gïÇ┌#w¡▒ åñGD/U▄$╝·ñ}$◙d░╒≡%►Σ┘ô♦╙xWv‼╖♣╛Yn≤┼7F╛«hw¡9ⁿ─┤ê\Ω╜jo(⌠Å▌╩ó░W╙â≤↨7sp↨♪÷○|╫g₧ñ»Q█░╧║Ωτα¼óΘ(ZN⌐╥Uδ~♠*>¥1,╝ⁿf↓╓2à↑☼│Qp≡°▼σ§xó),┴₧ZÉvj┘ç_e└▬`;úpπ↔E¬ƒ▀╘W○ß╫ ì▬W○♪¡÷╥K@≤ZφÄó☼P+<☺øt│¥↨╪ ê▄kI[☺╟▀↨┐>t╦¢F-x╣F|h√ZiE3èâ¼⌠Hû);&Σî╩☺d4☺σi♂∞îóF:;▬╚↓┼F→C◄╓Ω!ß═xªÄ→δ½Gôº{E▲◄╩╫┘╘£o¡╟Ü¥_^+èê╬*φG╬æCH┬mfΣ±┬dï⌂¥àΩ¶ô}∞T▓$xÄú╤∙╪ué≥↕Γ"¢sÉ╬É↨v+gΔä╖§|9¥¶·¶üφ║⌂aΦx⌡-+Æ&bò╪A;Ä╙6╪âqë0Çv↔‼☺§msⁿùVz↨v☺ô╟òö┬♠╪X╢╗Δ√G2ñùP╛2ΩΓ∟↓¥}¿Γ¼t╒╩OS≥UD'_ç╩9b♂╚jy§─╒│42╨Éε░►ëφCº╬‼_ö█V/╖}Z↑2Δ^♪└∞ò1¿ö╨╗⌐╛┌I`π▓◙≈┌]▌#⌐◘Σ;Ç◙°╛vJΔÑ←│6éÆ*Ñ┬╒≥ε┼l&'W♠f┴]┴↓_┬╩ä╗▼╥r%ªè♣▓↔Φa»¬┌-↨d┤╛εE,↨²└╠YâVΦL⌂♣"╬b)╠é

Run and debug it

| improve this answer | |
\$\endgroup\$
4
\$\begingroup\$

ES2015 800 799 characters/bytes

(i,p=0)=>[..."2h`X_ikrabh`sinai`t`YXsVkrkrrr_tha`X^_`is`psaiaX^Vl{jXriz`sr`VgsikZWk_z_rWpvp}2haip|iz`sr`Vgvs`Xrh_jj`tkXaY`p~t`sXV`a^ac^aZzm`ba^Vz_sVjWUmUjp}`vap{_s`j{Yil`Uhgca{bXh`Wjkj_aYqcc_`Xrksc_WW_kYsi2hajjsc|p{t`Xr^Y`WjXqicO^XO^XFY`Vdbap}iq`W`Zir{arbY_p~rV`r_`Yk{Y`h_iY^_ayh`VzZ}b`WiWy[prWYp{rkUjpXrbYpq`WjZa{g`s2haWara^brkW`WtalY`X_a_q`^`WWjj^i`WUjpYrarWZrV_p{rjY{kkzgqm`WWu`gaW`jYrzVbX|jh`r^_jssWW`Wjq_{b```EVraqbta2h_W`k_`r`rh_krk`v`Xr`p{VUl`Wjq`dUksh_W{asq`XZaia{cur{dW2h`XrWqbsjVp}rk`b_qa`p}`bWksWb^ab:ib`bXb^at`bcvt`Ybsh_Y`btrprVp|`YrrbXXpkrWacnagarpssYV_p}Y`Xqks{jXprYr^_Ymb`pq`Y`h`t`bYqhbYa_`iak{pYYpt`b__Z_a`XXYiza|zsd`pssWYrq_ta``Y`WajXV`aM3<322>|rb^XhWpjajWf`jsh`st`Xs^Wsikq_s{`^ZrVVar{iiqq_t`{pYY`bXi"].map(r=>
(l=(v=r.charCodeAt()-49)%9,'AEIOaeiou'[(v-l)/9]+i.slice(p,p+=l))).join``

const f=

(i,p=0)=>[..."2h`X_ikrabh`sinai`t`YXsVkrkrrr_tha`X^_`is`psaiaX^Vl{jXriz`sr`VgsikZWk_z_rWpvp}2haip|iz`sr`Vgvs`Xrh_jj`tkXaY`p~t`sXV`a^ac^aZzm`ba^Vz_sVjWUmUjp}`vap{_s`j{Yil`Uhgca{bXh`Wjkj_aYqcc_`Xrksc_WW_kYsi2hajjsc|p{t`Xr^Y`WjXqicO^XO^XFY`Vdbap}iq`W`Zir{arbY_p~rV`r_`Yk{Y`h_iY^_ayh`VzZ}b`WiWy[prWYp{rkUjpXrbYpq`WjZa{g`s2haWara^brkW`WtalY`X_a_q`^`WWjj^i`WUjpYrarWZrV_p{rjY{kkzgqm`WWu`gaW`jYrzVbX|jh`r^_jssWW`Wjq_{b```EVraqbta2h_W`k_`r`rh_krk`v`Xr`p{VUl`Wjq`dUksh_W{asq`XZaia{cur{dW2h`XrWqbsjVp}rk`b_qa`p}`bWksWb^ab:ib`bXb^at`bcvt`Ybsh_Y`btrprVp|`YrrbXXpkrWacnagarpssYV_p}Y`Xqks{jXprYr^_Ymb`pq`Y`h`t`bYqhbYa_`iak{pYYpt`b__Z_a`XXYiza|zsd`pssWYrq_ta``Y`WajXV`aM3<322>|rb^XhWpjajWf`jsh`st`Xs^Wsikq_s{`^ZrVVar{iiqq_t`{pYY`bXi"].map(r=>
(l=(v=r.charCodeAt()-49)%9,'AEIOaeiou'[(v-l)/9]+i.slice(p,p+=l))).join``


console.log(f(`lc ws bgnnng t gt vry trd f sttng by hr sstr n th bnk, nd f hvng nthng t d: nc r twc sh hd ppd nt th bk hr sstr ws rdng, bt t hd n pctrs r cnvrstns n t, "nd wht s th s f  bk," thght lc "wtht pctrs r cnvrstns?"
S sh ws cnsdrng n hr wn mnd (s wll s sh cld, fr th ht dy md hr fl vry slpy nd stpd), whthr th plsr f mkng  dsy- chn wld b wrth th trbl f gttng p nd pckng th dss, whn sddnly  Wht Rbbt wth pnk ys rn cls by hr.
Thr ws nthng s _vry_ rmrkbl n tht; nr dd lc thnk t s _vry_ mch t f th wy t hr th Rbbt sy t tslf, "h dr! h dr!  shll b lt!" (whn sh thght t vr ftrwrds, t ccrrd t hr tht sh ght t hv wndrd t ths, bt t th tm t ll smd qt ntrl); bt whn th Rbbt ctlly _tk  wtch t f ts wstct-pckt_, nd lkd t t, nd thn hrrd n, lc strtd t hr ft, fr t flshd crss hr mnd tht sh hd nvr bfr sn  rbbt wth thr  wstct- pckt, r  wtch t tk t f t, nd brnng wth crsty, sh rn crss th fld ftr t, nd frtntly ws jst n tm t s t pp dwn  lrg rbbt-hl ndr th hdg.
n nthr mmnt dwn wnt lc ftr t, nvr nc cnsdrng hw n th wrld sh ws t gt t gn.
Th rbbt-hl wnt strght n lk  tnnl fr sm wy, nd thn dppd sddnly dwn, s sddnly tht lc hd nt  mmnt t thnk bt stppng hrslf bfr sh fnd hrslf fllng dwn  vry dp wll.
thr th wll ws vry dp, r sh fll vry slwly, fr sh hd plnty f tm s sh wnt dwn t lk bt hr nd t wndr wht ws gng t hppn nxt. Frst, sh trd t lk dwn nd mk t wht sh ws cmng t, bt t ws t drk t s nythng; thn sh lkd t th sds f th wll, nd ntcd tht thy wr flld wth cpbrds nd bk-shlvs; hr nd thr sh sw mps nd pctrs hng pn pgs. Sh tk dwn  jr frm n f th shlvs s sh pssd; t ws lblld "RNG MRMLD", bt t hr grt dsppntmnt t ws mpty: sh dd nt lk t drp th jr fr fr f kllng smbdy ndrnth, s mngd t pt t nt n f th cpbrds s sh fll pst t.`));

JavaScript (Node/Browser ES2015) 806 characters

(i,p=0)=>[...'3ypgoz|qrypzqzpphge||oyqpgnopzpqzqgne}{gzppexz|if|oof3yqzzppexpgyo{{p|gqhppgepqnqsnqi~prqneoe{fd~d{pqop{hz}pdyxsqrgypf{|{oqhssopg|soffo|hz3yq{{spgnhpf{gzsSngSngIhpetrqzpfpizqrhoepoph|hpyozhnoqypeirpfzfjfh|d{grhpf{iqxp3yqfqqnr|fpfq}hpgoqopnpff{{nzpfd{hqfieo{h||x~pffpxqfp{herg{ypno{ffpf{orpppHeqrq3yofp|oppyo||ppgped}pf{ptd|yofqpgiqzqstf3ypgfr{e|proqpprf|frnqr<zrprgrnqprsphryohprephrgg|fqsqxqheohpg|{ghnoh~rpphpypprhyrhqopzq|hhprooioqpgghzqtpfhoqpphpfq{gepqQ4>433@rngyf{q{fvp{yppgnfz|opnieeqzzophhprgz'].map(r=>
(l=(v=r.charCodeAt(0)-50)%10,'AEIOUaeiou'[(v-l)/10]+i.slice(p,p+=l))).join('')

In each character I pack both the vowel (including case) and number of source characters to copy. 10 vowels plus length of 0-8 makes 80 possible values to pack into a byte, which is ok.

JavaScript 1273 characters

i=>{n='A2i2ea4e2ii5oe4e5i2eo4ii8e4ieo5ea5a4o4a2i5oi5oooe2o5i2e4ea4e1e2eio4eo1o4e4ie4a4e1a2i6ui4a4oiu2eo4oea2i1o4ii5a6ai5e2u2e2oao1o7o1u5A2i2e4io1u4iu2eo4oea2i1o7o4ea4oi2e2i4i4eo5i5a4e4a5eo1u6o5eo4a4a2ee4e1e4e6e1e4a6u2i7ee5e4e1a2u2e2o4a2i4aa1i7a1i4o1u5eo7e4o1ue2o4ei4ua5ii6ea1i2i1e6e4ue5a4i2eai4i5i4e2e4a5o2e6e6e2ea4oi5o4e6e2aae2i5a5o4iA2i2e4i4i4o4e6u4o1uo5ea4oe1a5eai4a4o2ie6O4e1a4O4e1a4I4a5ea2e7e5e4o1u5io2eaea6ioue4oe5a5e2o1u6oa2eoe2ea5i5ua5ei2e2ia5e1e2e4u1i2ea2u2a6u5e5eaiau1a7o1oaa5o1uoi5a1i4o1a4oe5a5o1o2eai4a6e4ui1eo4A2i2e4ae4oe4e1e5oi5aeao5e4i6a5ea4e2e4e2o2ee1eaai4i4e1ieaa1i4o1a5oe4oaa6oa2e2o1uoi4a5ui5i5u2i1o2i7eaao6ei1e4aei4a5ou2a2e5a4u4i4i2eoe1e2i4o4o4aaeai4o2e2ue5eeeIa2oe4o2e5o5e4A2i2e2aei5e2eoeoi2e2i5oi5eo7ea4oeo1ua2a1i6eai4o2ee7a1i5o4i2e2aue4o4o2ea4a6e4ie4ue6o6oue7aA2i2ea4oao2e5o4i4a2o1u5oi5ee5e2o2e4eo1u5ee5ai5o4ae5e1e4e5E1ie5ee5a4e5e1e4o5ee5e6o7o5ea5e5o4i2e2a5ee5o5oo1oa2o1u4ea5ooe5a4a4o1i5oae4e6i8e4i1e4oo1o4o4a5a2e2o1u5a5ea4o2i5o4ui4a4o1oa5oe1e2a5i7e5eo1o2ea5ei2eo5ee5a5o2i2e5a5e4e2eie4i5uo1a5a5o1o5ee5e2e2a6e2e4ea4a4a5iu2e4u4u2o4e7eo1o4o4aa5oo2e2o5e4eea5eae4i4a4a2ee4O2AEAA2A2E5u4oe5e1a4i2ao1i4e4i4ae9ei4o4i2eo4o5ea4o4e1ao4ii5o2e2o4uee1a6oa2a2e4ouiio2o2e2o5euo1a5a5ee5a4i'
j=p=0
z=''
while (n[j])z += n[j++]+i.slice(p,p+=((+n[j++])||(j--,3))-1)
return z}

Great challenge! Not very impressive submission.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Yeah, maybe the site strips characters out? I'm not sure what the issue is - I can save and run it locally, and I can paste it in the snippet thing here and run it. But saving it mangles it. \$\endgroup\$ – Steve Bennett May 7 at 1:11
  • \$\begingroup\$ Ah, the problem was that some of the characters were backslashes, which broke things. Chose a different offset and now it works. \$\endgroup\$ – Steve Bennett May 7 at 1:21
  • \$\begingroup\$ Nice, glad it worked out. In the future you can try TIO which shouldn't have trouble with backslashes. Of course if you want a snippet, you'd need to do something else. You could probably double each backslash though I'm not sure that would work. \$\endgroup\$ – FryAmTheEggman May 7 at 2:55
  • \$\begingroup\$ Actually the backslashes were just a problem for me in any case, because they needed to be escaped. Blah, blah, blah. Boring story. Fixed. :) \$\endgroup\$ – Steve Bennett May 7 at 6:18
3
\$\begingroup\$

Retina 0.8.2, 1364 bytes

^
A1i1e2a3e1i2i4o2e3e4i1e2o3i2i7e3i2e2o4e2a4a3o3a1i4o2i4o2o2o2e1o4i1e3e2a3ee1e2i2o3e2oo3e3i2e3a3ea1i5u2i3a3o2i2u1e2o3o2e2a1io3i2i4a5a2i4e1u1e1o2a2oo6ou4A1i1e3i2ou3i2u1e2o3o2e2a1io6o3e2a3o2i1e1i3i3e2o4i4a3e3a4e2ou5o4e2o3a3a1e2e3ee3e5ee3a5u1i6e2e4e3ea1u1e1o3a1i3a2ai6ai3ou4e2o6e3ou2e1o3e2i3u2a4i2i5e2ai1ie5e3u2e4a3i1e2a2i3i4i3e1e3a4o1e5e5e1e2a3o2i4o3e5e1a2a2e1i4a4o3i2A1i1e3i3i3o3e5u3ou2o4e2a3o2ea4e2a2i3a3o1i2e5O3ea3O3ea3I3a4e2a1e6e4e3ou4i2o1e2a2e2a5i2o2u2e3o2e4a4e1ou5o2a1e2o2e1e2a4i4u2a4e2i1e1i2a4ee1e3ui1e2a1u1a5u4e4e2a2i2a2ua6oo2a2a4ou2o2i4ai3oa3o2e4a4oo1e2a2i3a5e3u2ie2o3A1i1e3a2e3o2e3ee4o2i4a2e2a2o4e3i5a4e2a3e1e3e1o1e2ee2a2a2i3i3ei2e2a2ai3oa4o2e3o2a2a5o2a1e1ou2o2i3a4u2i4i4u1io1i6e2a2a2o5e2ie3a2e2i3a4o2u1a1e4a3u3i3i1e2o2ee1i3o3o3a2a2e2a2i3o1e1u2e4e2e2e2I2a1o2e3o1e4o4e3A1i1e1a2e2i4e1e2o2e2o2i1e1i4o2i4e2o6e2a3o2e2ou2a1ai5e2a2i3o1e2e6ai4o3i1e1a2u2e3o3o1e2a3a5e3i2e3u2e5o5o2u2e6a2A1i1e2a3o2a2o1e4o3i3a1ou4o2i4e2e4e1o1e3e2ou4e2e4a2i4o3a2e4ee3e4Ei2e4e2e4a3e4ee3o4e2e4e5o6o4e2a4e4o3i1e1a4e2e4o4o2oo2a1ou3e2a4o2o2e4a3a3oi4o2a2e3e5i7e3ie3o2oo3o3a4a1e1ou4a4e2a3o1i4o3u2i3a3oo2a4o2ee1a4i6e4e2oo1e2a4e2i1e2o4e2e4a4o1i1e4a4e3e1e2i2e3i4u2oa4a4oo4e2e4e1e1a5e1e3e2a3a3a4i2u1e3u3u1o3e6e2oo3o3a2a4o2o1e1o4e3e2e2a4e2a2e3i3a3a1e2e3O1A2E2A2A1A1E4u3o2e4ea3i1a2oi3e3i3a2e8e2i3o3i1e2o3o4e2a3o3ea2o3i2i4o1e1o3u2e2ea5o2a1a1e3o2u2i2i2o1o1e1o4e2u2oa4a4e2e4a3i
\d
$*
+s`1(.*i)(.)
$2$1

Try it online! Simply encodes the vowels and distances between the vowels, which are used to slowly shuffle the consonants into place.

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

Bash, 10 bytes + 1151 bytes + 1-char file name = 1162 bytes

bzip2 -d a

Output in a.out

File a is the output of bzip2 alice.txt; mv alice.txt.bz2 a where alice.txt is the required output.

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ I get 1115 bytes for a zopfli-compressed file. Then this is also a Bubblegum answer as well! \$\endgroup\$ – the default. May 6 at 1:38
  • \$\begingroup\$ @mypronounismonicareinstate I get 1095 bytes with zopfli. \$\endgroup\$ – ovs May 6 at 14:46
  • \$\begingroup\$ @ovs I feel like I'm not using zopfli correctly. How many iterations did you use? \$\endgroup\$ – the default. May 6 at 14:46
  • \$\begingroup\$ @mypronounismonicareinstate I used 10,000 iterations, also tried with 100,000, but there was no improvement (I get 1105 bytes for a single iteration). My call looks like zopfli --deflate -c --i10000 original.txt | xxd, this directly outputs the hexdump for TIO. \$\endgroup\$ – ovs May 6 at 14:54
2
\$\begingroup\$

Keg, 1391 bytes

`?A2Ȋ1Ɛ2Ȧ3Ɛ1Ȋ2Ȋ4Ǫ2Ɛ3Ɛ4Ȋ1Ɛ2Ǫ3Ȋ2Ȋ7Ɛ3Ȋ2Ɛ2Ǫ4Ɛ2Ȧ4Ȧ3Ǫ3Ȧ1Ȋ4Ǫ2Ȋ4Ǫ2Ǫ2Ǫ2Ɛ1Ǫ4Ȋ1Ɛ3Ɛ2Ȧ3ƐƐ1Ɛ2Ȋ2Ǫ3Ɛ2ǪǪ3Ɛ3Ȋ2Ɛ3Ȧ3ƐȦ1Ȋ5Ȕ2Ȋ3Ȧ3Ǫ2Ȋ2Ȕ1Ɛ2Ǫ3Ǫ2Ɛ2Ȧ1ȊǪ3Ȋ2Ȋ4Ȧ5Ȧ2Ȋ4Ɛ1Ȕ1Ɛ1Ǫ2Ȧ2ǪǪ6ǪȔ4A2Ȋ1Ɛ3Ȋ2ǪȔ3Ȋ2Ȕ1Ɛ2Ǫ3Ǫ2Ɛ2Ȧ1ȊǪ49⑨,?1Ǫ3Ɛ2Ȧ3Ǫ2Ȋ1Ɛ1Ȋ3Ȋ3Ɛ2Ǫ4Ȋ4Ȧ3Ɛ3Ȧ4Ɛ2ǪȔ5Ǫ4Ɛ2Ǫ3Ȧ3Ȧ1Ɛ2Ɛ3ƐƐ3Ɛ5ƐƐ3Ȧ5Ȕ1Ȋ6Ɛ2Ɛ4Ɛ3ƐȦ1Ȕ1Ɛ1Ǫ3Ȧ1Ȋ3Ȧ2ȦȊ6ȦȊ3ǪȔ4Ɛ2Ǫ6Ɛ3ǪȔ2Ɛ1Ǫ3Ɛ2Ȋ3Ȕ2Ȧ4Ȋ2Ȋ5Ɛ2ȦȊ1ȊƐ5Ɛ3Ȕ2Ɛ4Ȧ3Ȋ1Ɛ2Ȧ2Ȋ3Ȋ4Ȋ3Ɛ1Ɛ3Ȧ4Ǫ1Ɛ5Ɛ29⑨,?2Ɛ1Ɛ2Ȧ3Ǫ2Ȋ4Ǫ3Ɛ5Ɛ1Ȧ2Ȧ2Ɛ1Ȋ4Ȧ4Ǫ3Ȋ2A2Ȋ1Ɛ3Ȋ3Ȋ3Ǫ3Ɛ5Ȕ3ǪȔ2Ǫ4Ɛ2Ȧ3Ǫ2ƐȦ4Ɛ2Ȧ2Ȋ3Ȧ3Ǫ1Ȋ2Ɛ5O4ƐȦ3O4ƐȦ3I4Ȧ4Ɛ2Ȧ1Ɛ6Ɛ4Ɛ3ǪȔ4Ȋ2Ǫ1Ɛ2Ȧ2Ɛ2Ȧ5Ȋ2Ǫ2Ȕ2Ɛ3Ǫ2Ɛ4Ȧ4Ɛ1ǪȔ5Ǫ2Ȧ1Ɛ2Ǫ2Ɛ1Ɛ2Ȧ4Ȋ4Ȕ2Ȧ4Ɛ2Ȋ1Ɛ1Ȋ2Ȧ4ƐƐ1Ɛ3ȔȊ1Ɛ2Ȧ1Ȕ1Ȧ5Ȕ4Ɛ4Ɛ2Ȧ2Ȋ2Ȧ2ȔȦ6ǪǪ2Ȧ2Ȧ4ǪȔ2Ǫ2Ȋ4ȦȊ3ǪȦ3Ǫ2Ɛ4Ȧ4ǪǪ1Ɛ2Ȧ2Ȋ3Ȧ5Ɛ3Ȕ2ȊƐ2Ǫ3A2Ȋ1Ɛ3Ȧ2Ɛ3Ǫ2Ɛ3ƐƐ4Ǫ2Ȋ4Ȧ2Ɛ2Ȧ2Ǫ4Ɛ3Ȋ5Ȧ4Ɛ2Ȧ3Ɛ1Ɛ3Ɛ1Ǫ1Ɛ2ƐƐ2Ȧ2Ȧ2Ȋ3Ȋ3ƐȊ2Ɛ2Ȧ2ȦȊ3ǪȦ4Ǫ2Ɛ3Ǫ2Ȧ2Ȧ5Ǫ2Ȧ1Ɛ1ǪȔ2Ǫ2Ȋ3Ȧ4Ȕ2Ȋ4Ȋ4Ȕ1ȊǪ1Ȋ6Ɛ2Ȧ2Ȧ2Ǫ5Ɛ2ȊƐ3Ȧ2Ɛ2Ȋ3Ȧ4Ǫ2Ȕ1Ȧ1Ɛ4Ȧ3Ȕ3Ȋ3Ȋ1Ɛ2Ǫ2ƐƐ1Ȋ3Ǫ3Ǫ3Ȧ2Ȧ2Ɛ2Ȧ2Ȋ3Ǫ1Ɛ1Ȕ2Ɛ4Ɛ2Ɛ2Ɛ19⑨,?I3Ȧ1Ǫ2Ɛ3Ǫ1Ɛ4Ǫ4Ɛ3A2Ȋ1Ɛ1Ȧ2Ɛ2Ȋ4Ɛ1Ɛ2Ǫ2Ɛ2Ǫ2Ȋ1Ɛ1Ȋ4Ǫ2Ȋ4Ɛ2Ǫ6Ɛ2Ȧ3Ǫ2Ɛ2ǪȔ2Ȧ1ȦȊ29⑨,?2Ɛ2Ȧ2Ȋ3Ǫ1Ɛ2Ɛ6ȦȊ4Ǫ3Ȋ1Ɛ1Ȧ2Ȕ2Ɛ3Ǫ3Ǫ1Ɛ2Ȧ3Ȧ5Ɛ3Ȋ2Ɛ3Ȕ2Ɛ5Ǫ5Ǫ2Ȕ2Ɛ6Ȧ2A2Ȋ1Ɛ2Ȧ3Ǫ2Ȧ2Ǫ1Ɛ4Ǫ3Ȋ3Ȧ1ǪȔ4Ǫ2Ȋ4Ɛ2Ɛ4Ɛ1Ǫ1Ɛ3Ɛ2ǪȔ4Ɛ2Ɛ4Ȧ2Ȋ4Ǫ3Ȧ2Ɛ4ƐƐ3Ɛ39⑨,?E1Ȋ2Ɛ4Ɛ2Ɛ4Ȧ3Ɛ4ƐƐ3Ǫ4Ɛ2Ɛ4Ɛ5Ǫ6Ǫ4Ɛ2Ȧ4Ɛ4Ǫ3Ȋ1Ɛ1Ȧ4Ɛ2Ɛ4Ǫ4Ǫ2ǪǪ2Ȧ1ǪȔ3Ɛ2Ȧ4Ǫ2Ǫ2Ɛ4Ȧ3Ȧ3ǪȊ4Ǫ2Ȧ2Ɛ3Ɛ5Ȋ7Ɛ3ȊƐ3Ǫ2ǪǪ3Ǫ3Ȧ4Ȧ1Ɛ1ǪȔ4Ȧ4Ɛ2Ȧ3Ǫ1Ȋ4Ǫ3Ȕ2Ȋ3Ȧ3ǪǪ2Ȧ4Ǫ2ƐƐ1Ȧ4Ȋ6Ɛ4Ɛ2ǪǪ1Ɛ2Ȧ4Ɛ2Ȋ1Ɛ2Ǫ4Ɛ2Ɛ4Ȧ4Ǫ1Ȋ1Ɛ4Ȧ4Ɛ3Ɛ1Ɛ2Ȋ2Ɛ3Ȋ4Ȕ2ǪȦ4Ȧ4ǪǪ4Ɛ2Ɛ4Ɛ1Ɛ1Ȧ5Ɛ1Ɛ3Ɛ2Ȧ3Ȧ3Ȧ4Ȋ2Ȕ1Ɛ3Ȕ3Ȕ1Ǫ3Ɛ6Ɛ2ǪǪ3Ǫ3Ȧ2Ȧ4Ǫ2Ǫ1Ɛ1Ǫ4Ɛ3Ɛ2Ɛ2Ȧ4Ɛ2Ȧ2Ɛ3Ȋ3Ȧ3Ȧ1Ɛ2Ɛ3O2A3E3A3A2A2E5Ȕ3Ǫ2Ɛ4ƐȦ3Ȋ1Ȧ2ǪȊ3Ɛ3Ȋ3Ȧ2Ɛ8Ɛ2Ȋ3Ǫ3Ȋ1Ɛ2Ǫ3Ǫ4Ɛ2Ȧ3Ǫ3ƐȦ2Ǫ3Ȋ2Ȋ4Ǫ1Ɛ1Ǫ3Ȕ2Ɛ2ƐȦ5Ǫ2Ȧ1Ȧ1Ɛ3Ǫ2Ȕ2Ȋ2Ȋ2Ǫ1Ǫ1Ɛ1Ǫ4Ɛ2Ȕ2ǪȦ4Ȧ4Ɛ2Ɛ4Ȧ3Ȋ2`÷⑷:`12345678`-[|ℤ`,`*]⑸⅀ß

Try it online!

Explanation

`...` # The huge to-be evaluated string
      # that says what the program should do in the encoding
÷     # Split the string into individual characters
 ⑷   # Map over the string
:`12345678`-[|ℤ`,`*]⑸
      # If the string is in 1-8, multiply the comma by that integer.

⅀     # Join the whole stack
ß     # Evaluate the generated code
| improve this answer | |
\$\endgroup\$
2
\$\begingroup\$

PHP, 2224 1592 bytes

for(;$a=$argv[1][$i];$i++){foreach(["A"=>"UHULUNUO","E"=>"LSUJUP","I"=>"=IG<","O"=>"===CUG","e"=>"1822313:3K4Z7B8?8V99:::H:I:Q;1;2;E;J=P=S?:?>?Z@4AAC@D9DHF1FQG8G:GEGMH1I?IRIYJ>K;MEN4NCOEOHP=QTRDRGRHRLS7S9S=S>SDSET7TNTVTXUBUDV<VDWHWNX<XO","a"=>"2:2D4R7>7A8G:L;F;H<L=2=L=R>C?A?K?U@6@8@K@WALB;BOBSD@DGE>E@EZFOG>HYJ1KEL=O7NOOCPBQ3Q:QMSJSMTGU6UAV7W6WWWXXS","i"=>"191H1N1Z2Z3<3I4T6J7X9H:9:E;V?EE5E6J<LSQSR;RJV6VNWAX8","o"=>"1?242O2Q3>45626F7;:P;=<9<O=5><>J>Q?7?<A?B3B@D7DEE5EWFAFGHSIIIXJMK?KFKJMNNKNPNYO1O=OAOZPPQ7T4UWVWTKTMVZWGWIWUX2X:X;","u"=>"4Y7W8>9B<A>L@7AYDTE4EYF8FZIPRSSZT3WLX4XC","ea"=>"3Q8=<Q=@=FV3W<WP","ou"=>"5;5F6Z8R97<D>6?2A1DIHWL3P>","ai"=>"8I8O9QA9CZHZIE","ie"=>"9RB1EIOW","ui"=>"@3","oi"=>"V9","ua"=>"@M","ei"=>"CT","oa"=>"A<D3RUXE","oo"=>"@SAINMP2Q1QJT?","ee"=>"397G7O?YBECHFCLLM<Q9"]as$c=>$b)for($j=-1;$d=$b[++$j];)if($i==(ord($d)-49)*42+ord($b[++$j])-49)$r.=$c;$r.=$a;}echo preg_replace(["/(\\s)(t|s)h(n)?(?= )/i","/(h(?=r)|g|d)(rs|r\\W|t)/","/wh(?!a)/","/ (w|h|s)(s |d |v)/","/(\\W)nd/","/(th|w(?=t)|m|F)(n|th|r)/","/b(o)?t/","/ (a)?nt/","/([^namlie])d(\\W)/","/(?<= )(t|n)(\\W|s)/","/(d(?!r|n)|c(?!r)|cr|m|h|w(?!n))(w|n|ss|m|r)/","/(\\W)s /","/ (n)?r /","/([^iu])ng/"],["$1$2he$3","$1e$2","whe"," $1a$2","$1and","$1i$2","b$1ut"," $1not","$1ed$2","i$1$2","$1o$2","$1as "," $1or ","$1ing"],str_replace(["lc","bb","dd"," f ","bfr","fr ","vr","nc","bk","ctr","stn","nsd","wll","mk","  ","tht","lf","ftr"," tm","hl","lk"],["Alice","abbi","udde"," of ","before","for ","ver","once","book","icture","sation","nside","well","mak"," a ","that","elf","after"," time","hole","like"],$r));

Try it online!

Haha this is such a longest mess :D well this takes a double approach by replacing some english generic syntaxes, then adding the missing vowels. Actually doing it the other way round so that some generic replacements are avoided because proper vowels were inserted first. Still optimizations to do I guess..

EDIT: saved 632 bytes by encoding the positions with the following:

  • each position is converted to base 42 (the answer! 41 would have been enough, doesn't change the count anyway)
  • gives 2 digits. Each digit is represented by the char code of the value + 49 (so it starts with "1" to prevent a falsey value)
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ You can save a bunch of bytes on this removing all the quoted strings and replacing them with ~barestring (or just removing the quotes for alphanum strings) and you get a 1417 byte count here's a program to build it and a TIO link to confirm it works in the comments. \$\endgroup\$ – Dom Hastings May 7 at 14:08
  • \$\begingroup\$ @DomHastings Thanks! it works in the keys too! I have a lot of other optimizations to do, now that positions are compressed many replace are longer than adding vowels positions. I will integrate your modification with it. More PHP notices!!! \$\endgroup\$ – Kaddath May 7 at 14:48
  • \$\begingroup\$ So many notices... it actually slowed the processing down on my machine whilst it was spewing them out! Good luck! \$\endgroup\$ – Dom Hastings May 7 at 19:10
  • \$\begingroup\$ @DomHastings actually bare strings only work with alphanumeric strings, chars such as = breaks it.. If I understand well, your use of ~ is to get UTF-8 chars such as ÎÇÍ and use ~ on it to get original chars? The problem with this method is that those chars take 2 bytes each, so that doesn't really lower the byte count :/ I haven't worked on the improvement yet, maybe today \$\endgroup\$ – Kaddath May 11 at 7:58
  • \$\begingroup\$ Ah, they shouldn't be UTF-8 byte strings, just high byte chars (so copy/pasting into TIO won't work - I think anyway). My understanding of ~ is that 01100001 (93 / a) becomes 10011110 (158 / ž in 1252 latin-1) which PHP treats as an undefined constant using the content. So removing the quotes and replacing with ~. It's ugly, but it works :) \$\endgroup\$ – Dom Hastings May 11 at 10:01
1
\$\begingroup\$

05AB1E, 575 574 568 563 bytes

•zʒβßαØä₁«&ƒa*O¶¾8ΓÍ₃Ê1eéÿ¡¸;‹nθ¯õ!šìLx‘Â0·äLègα&íΘ∞ÜΣ<Ã5U≠₄ˆδø¿»·V.A×Ø€ćꔀQý!¦:üÜ©zт8λóÞš÷—2Ô(9È∍,\&Ćø
æ—₃Ƶ“°R₁ƶмŠ₆wÎl£ΩfεjÍŒÒwœ'².yŵÓ:jÐδ-‰øεžƒt£„cçQ¨RXJα≠’§krèýF∊¥ï·ǝ('₄“©wGßÙKMв\Ƶ¢j«ŽÞí‹ÂâäÝ–Σ-…ëĀº< \¼·²QS²„;É2тT6%> Po,¶úÒ‰ðC”‡ÖζpH¬tŸÞbΩ`™¦š˜°ƶÔ¾ÉëÑηhÁbg>1©
zµÏ|-Bó
?₂Äo›]Iþd]dlÈ₄Ćθ)MιζŠ3_)U¾ǝ£ÜŽ8”ÏвƵ^Î₆»Θª∊eÞJ8JèO¶₁û∊Kƒ–q×L÷=£AγõиisoÃeþ¶åβв"\¨"ι>т&«ǝôŠe°Í.%+cÿ“ZS÷&(ι+›1ßΘF>é4”קoìÂ₄jœ´â¿¦Ÿ~ë^†¡ÎVÎÝα7eæ‚°?ôΛ¼èp
dŒΛ¡ˆĀ∞€—À¢<·»+¹ʒ”qmý∞âMZîPéƵáøԔ₄ðwƼaxæ₄UU≠³ý¡ÅΩ66yΘE±ðcƶceåι.üWv₁¤Ãi«Š41×β4ëαÐWΔaŠRùmàÝå=åÔ≠%Úм“Z½ŽæYÏα´ŒiݲÚ∞Iª\ã¡.&тèã×ùÜ•74вvy9‰`žÀè?Fć?

-6 bytes thanks to @Neil.

Try it online.

Explanation:

•zʒβ...×ùÜ•       # Compressed integer 224641896896148016938368561552335098644440638806788380400165012285773501511250520005365941174208862664146279830408159028683082511746603646891689033010607628801437815480712915937924652809275189770660278010281318902097091708373828682312372672780477399419735631443886176059155071050262476552107016396780364226771683546971818103868361088000198778349003798076521493395410165779115606867484976791281038122102473781863665290228860335504663518108519671908117249856499506351874454875954494300437192218659256356139029651017435075963148812076901839173173452741192124604287091826161488097642846505252520037487674529824294243076129434563729383043104197923479360824310056655097918512677989534664676292688146822517512437302732254580913876380548881065041539680195011501730965834481558588377458598325965058885027168108789089635332449928831687357681298337708316403895593386671522073867265788780974012285668758807646711339460091042314668721692971679186845632617647310449657373332887652449016140311441573605606672295627533091777550161610779991335347646888360976210146797195084763186022703803722123461953373745423277449265741179310520405868463753966730206640071346865760122413333839703653337550179608290258257704143816340134609444894565369164030543611560755320287705090985654855136258294063356183305469030387994762970933038946455313934
 74в              # Converted to base-74 as list: [14,11,19,27,10,20,38,21,28,37,11,19,30,20,65,28,20,19,39,19,36,27,30,9,38,21,38,21,21,21,10,39,11,28,19,27,1,10,19,20,30,19,3,30,28,20,28,27,1,9,47,22,29,27,21,20,13,19,30,21,19,9,2,30,20,38,45,18,38,10,13,10,21,18,3,57,3,40,14,11,28,20,3,31,20,13,19,30,21,19,9,2,57,30,19,27,21,11,10,29,29,19,39,38,27,28,36,19,3,49,39,19,30,27,9,19,28,1,28,46,1,28,45,13,56,19,37,28,1,9,13,10,30,9,29,18,0,56,0,29,3,40,19,57,28,3,22,10,30,19,29,22,36,20,47,19,0,11,2,46,28,22,37,27,11,19,18,29,38,29,10,28,36,12,46,46,10,19,27,21,38,30,46,10,18,18,10,38,36,30,20,14,11,28,29,29,30,46,31,3,22,39,19,27,21,1,36,19,18,29,27,12,20,46,35,1,27,35,1,27,34,36,19,9,55,37,28,3,40,20,12,19,18,19,45,20,21,22,28,21,37,36,10,3,49,21,9,19,21,10,19,36,38,22,36,19,11,10,20,36,1,10,28,4,11,19,9,13,45,40,37,19,18,20,18,4,54,3,21,18,36,3,22,21,38,0,29,3,27,21,37,36,3,12,19,18,29,45,28,22,2,19,30,14,11,28,18,28,21,28,1,37,21,38,18,19,18,39,28,47,36,19,27,10,28,10,12,19,1,19,18,18,29,29,1,20,19,18,0,29,3,36,21,28,21,18,45,21,9,10,3,22,21,29,36,22,38,38,13,2,12,56,19,18,18,48,19,2,28,18,19,29,36,21,13,9,37,27,31,29,11,19,21,1,10,29,30,30,18,18,19,18,29,12,10,22,37,19,19,19,25,9,21,28,12,37,39,28,14,11,10,18,19,38,10,19,21,19,21,11,10,38,21,38,19,57,19,27,21,19,3,22,9,0,47,19,18,29,12,19,55,0,38,30,11,10,18,22,28,30,12,19,27,45,28,20,28,22,46,48,21,22,55,18,14,11,19,27,21,18,12,37,30,29,9,3,40,21,38,19,37,10,12,28,19,3,40,19,37,18,38,30,18,37,1,28,37,6,20,37,19,37,27,37,1,28,39,19,37,46,57,39,19,36,37,30,11,10,36,19,37,39,21,3,21,9,3,31,19,36,21,21,37,27,27,3,38,21,18,28,46,65,28,2,28,21,3,30,30,36,9,10,3,40,36,19,27,12,38,30,22,29,27,3,21,36,21,1,10,36,56,37,19,3,12,19,36,19,11,19,39,19,37,36,12,11,37,36,28,10,19,20,28,38,22,3,36,36,3,39,19,37,10,10,45,10,28,19,27,27,36,20,13,28,31,13,30,55,19,3,30,30,18,36,21,12,10,39,28,19,19,36,19,18,28,29,27,9,19,28,17,23,24,23,14,14,42,31,21,37,1,27,11,18,3,29,28,29,18,73,19,29,30,11,19,30,39,19,27,30,1,18,30,20,38,12,10,30,22,19,1,45,21,9,9,28,21,22,20,20,12,12,10,39,19,22,3,36,36,19,37,27,20]
    v             # Loop over each integer `y` in this list:
     y9‰          #  Take the divmod-9 of the current integer
        `         #  Pop and push both y//9 and y%9 separated to the stack
         žÀ       #  Push builtin string "aeiouAEIOU"
           è      #  And (0-based) index y%9 into this string
            ?     #  Pop and print this character (without trailing newline)
             F    #  Then loop y//9 amount of times:
              ć?  #   And extract, pop, and print the first character of the string
                  #   (which will use the implicit input-string in the very first iteration)

See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer lists?) to understand why •zʒβ...×ùÜ• is 224...934 and •zʒβ...×ùÜ•74в is [14,11,19,...,37,27,20].

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ On the other hand, divmod-10 would allow you to use vyDžÀè?T÷Fć? as your loop. Oh well. Why do you manually add 5 to y//9 instead of adjusting the list values by 45 (mod 81)? That would at least allow you to use vy9‰`sžÀè?Fć? as your loop... \$\endgroup\$ – Neil May 7 at 22:47
  • \$\begingroup\$ @Neil The +5 was initially 5._ to change the string "aeiouAEIO" to "AEIOaeiou". As for your first suggestion with divmod-10 and vžÀyè?yT÷Fć?, it ends up at 576 bytes. As for the (...+45)%81 with vy9‰`sžÀè?Fć?, that indeed saves 6 bytes, so thanks. :) \$\endgroup\$ – Kevin Cruijssen May 8 at 6:59
  • \$\begingroup\$ I'm glad one of my suggestions was helpful at least :-) \$\endgroup\$ – Neil May 8 at 9:51
  • \$\begingroup\$ Ooh, you swapped the higher and lower base 9 digits anyway, a bit like my suggestion for divmod-10 did! \$\endgroup\$ – Neil May 8 at 9:54
  • \$\begingroup\$ @Neil Yeah, I noticed the swap in your suggestion with divmod-9, and tried it without that swap to see if the compressed list would be shorter, which was indeed the case. :) \$\endgroup\$ – Kevin Cruijssen May 8 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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