35
\$\begingroup\$

The goal of this challenge is to print the following tongue twister:

She sells seashells by the seashore,
The shells she sells are seashells, I'm sure.
So if she sells seashells on the seashore,
Then I'm sure she sells seashore shells.

This is more complicated than just calling your language's print equivalent. Since there are a lot of repeated words and phrases, you can greatly decrease the size of your code by using other tactics.

Rules:

  • No querying another website which will respond with the full twister
  • You must include all the punctuation and line breaks in the original text.
  • You can end with a trailing newline

This is , so the shortest code wins!

Good luck!

\$\endgroup\$
6
  • 11
    \$\begingroup\$ While there's a long history of natural-language text compression challenges coming down to a few built-in compression tools and tactics, I'm cautiously optimistic that this text's varied repetition and length will lead to some interesting solutions in at least some languages. \$\endgroup\$
    – xnor
    Jul 1 '20 at 10:44
  • 7
    \$\begingroup\$ Probably just a pet-peeve of mine, but it always annoys me when a sentence ends in a comma, and the sentence on the next line is capitalized regardless. (Although that might also be related to not being able to use a sentence-capitalize builtin, haha. ;p) \$\endgroup\$ Jul 1 '20 at 12:25
  • 1
    \$\begingroup\$ It would be easier if the first line used on instead of by. \$\endgroup\$
    – user92069
    Jul 1 '20 at 12:51
  • \$\begingroup\$ What I made to find optimal solution(s) \$\endgroup\$
    – branboyer
    Jul 9 '20 at 1:37
  • 1
    \$\begingroup\$ 142 bytes is far from being the shortest answer. That would be "my pronoun is monicareinstate"s Bubblegum answer with 78 bytes. Shortest non-eso answer is my 126 bytes PHP as far as I can see. \$\endgroup\$
    – Titus
    Jul 15 '20 at 16:19

33 Answers 33

1
2
1
\$\begingroup\$

Deadfish~, 1269 bytes

iiissiic{ii}icdddc{ddddddd}ic{dd}s{ddd}ic{d}ddddc{i}dddcc{i}dddc{{iiii}iii}dc{dd}s{ddd}ic{d}ddddcddddc{ii}ddc{d}dcdddc{i}dddcc{i}dddc{{iiii}iii}dc{dd}ddsddc{ii}iiic{ddddddddd}ic{dd}dsdddddc{d}ddcdddc{ddddddd}ic{dd}s{ddd}ic{d}ddddcddddc{ii}ddc{d}dc{i}dddciiic{d}dddc{{ii}}dc{ddd}ddddcdsiiic{ii}cdddc{ddddddd}ic{dd}s{ddd}ic{d}dcdddc{i}dddcc{i}dddc{{iiii}iii}dc{dd}s{ddd}ic{d}dcdddc{ddddddd}ic{dd}s{ddd}ic{d}ddddc{i}dddcc{i}dddc{{iiii}iii}dc{{iii}ii}ic{ii}dddc{d}dddc{ddddddd}ic{dd}s{ddd}ic{d}ddddcddddc{ii}ddc{d}dcdddc{i}dddcc{i}dddc{ddddddd}dc{d}ddc{iiii}ic{ddd}ddddc{iiiiiii}c{dddddddd}iiic{dd}s{ddd}iciicdddc{d}dddc{{ii}}ic{{ii}ii}cdsiic{iii}ddc{dddddddd}ic{{iii}iii}dcdddc{ddddddd}c{dd}s{ddd}ic{d}dcdddc{ddddddd}ic{dd}s{ddd}ic{d}ddddc{i}dddcc{i}dddc{{iiii}iii}dc{dd}s{ddd}ic{d}ddddcddddc{ii}ddc{d}dcdddc{i}dddcc{i}dddc{{iiii}iii}dc{dd}ds{d}cdc{dddddddd}iic{dd}dsdddddc{d}ddcdddc{ddddddd}ic{dd}s{ddd}ic{d}ddddcddddc{ii}ddc{d}dc{i}dddciiic{d}dddc{{ii}}dc{ddd}ddddcdsiiic{ii}cdddc{i}dc{dddddddd}iic{iiii}ic{ddd}ddddc{iiiiiii}c{dddddddd}iiic{dd}s{ddd}iciicdddc{d}dddc{ddddddd}ic{dd}s{ddd}ic{d}dcdddc{ddddddd}ic{dd}s{ddd}ic{d}ddddc{i}dddcc{i}dddc{{iiii}iii}dc{dd}s{ddd}ic{d}ddddcddddc{ii}ddc{d}dc{i}dddciiic{d}dddc{ddddddd}ic{dd}s{ddd}ic{d}dcdddc{i}dddcc{i}dddc{ddddddd}ic

Try it online!

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

Perl 5, 133 bytes

say"S5s0 10 by t513,
T5sh02are 10, 4.
So if210 on t513,
Then 4213 sh0."=~s/\d/(ells,seash," she sells ",ore,"I'm sure","he ")[$&]/ger

Try it online!

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

Splinter, 150 bytes

I{ECA}H{\ }G{\r\e}F{H\I\'\mC\uG}E{\h\e}D{H\tEB\oG\,\
\TE}C{H\s}B{C\e\a\s\h}A{\e\l\l\s}\SIBAH\b\yDC\hACIH\aGBA\,F\.\
\S\oH\i\fCIBAH\o\nD\nFCIB\oGC\hA\.

Try it online!

\$\endgroup\$
1
2

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.