Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Comments on Generate Lewis Caroll's Jabberwocky

Parent

Generate Lewis Caroll's Jabberwocky

+4
−0

The task is to generate the text of Lewis Caroll's Jabberwocky.

The text, quoted from Wikipedia, is as follows (I've replaced a non-ASCII character with ASCII, otherwise it's direct copy&paste from the linked Wikipedia article):

'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe;
All mimsy were the borogoves,
And the mome raths outgrabe.

"Beware the Jabberwock, my son!
The jaws that bite, the claws that catch!
Beware the Jubjub bird, and shun
The frumious Bandersnatch!"

He took his vorpal sword in hand:
Long time the manxome foe he sought-
So rested he by the Tumtum tree,
And stood awhile in thought.

And as in uffish thought he stood,
The Jabberwock, with eyes of flame,
Came whiffling through the tulgey wood,
And burbled as it came!

One, two! One, two! And through and through
The vorpal blade went snicker-snack!
He left it dead, and with its head
He went galumphing back.

"And hast thou slain the Jabberwock?
Come to my arms, my beamish boy!
O frabjous day! Callooh! Callay!"
He chortled in his joy.

'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe;
All mimsy were the borogoves,
And the mome raths outgrabe.

The text above has to be produced verbatim, including newlines (you can use any of the common newline characters or character sequences, provided you stay consistent). Note that there is a newline character at the end of the last line.

This is code-golf, so the shortest entry per language wins.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

Post
+5
−0

Japt, 625 615 bytes

`'T°s ߍ¦g, „d e sҐy ‘vƒ
Did gyœ „d g‹½e ˆ e °¼;
A¥ Úßy ØÀ e ޒgovƒ,
A˜ e Ú  ÎÈs ŒtgŸ¼.
`
+i`
"BeØ e {=`Jab¼rwock`}, my s!
T” jaws È	 ßÒ, e claws È	 ¯t®!
BeØ e Jubjub bird, „d д
T” è–ムBÂrsn…®!"

He ‘ok –s vŽpal sÙ ˆ Ê@:
Lg ÈØ e µnxo´ foe ” Ñht-
So ΂ ” by e Tumtum ɇ,
A˜ ÐOd aؕe ˆ Èght.

A˜ † ˆ uff‰h Èght ” ÐOd,
T” {U}, ØP eyƒ  fla´,
Ca´ ²iffҁ È*ugh e tªgey wood,
A˜ ¿rÞB † Š ¯´!

Oš, two! Oš, two! A˜ È*ugh „d È*ugh
T” vŽpal Þue ØË sÍõ€-snack!
He ¤ft Š Ü%, „d ØP Šs Ê%
He ØË galumpʁ back.

"A˜ ÊQ È sÓ° e {U}?
Co´ ‘ my ‡ms, my ¼aÚÊ ¾y!
O fŸbjŒs »y! CÃ
oh! CÃy!"
He ֚t¤d ˆ –s joy.

-10 bytes thanks to @Shaggy

Dictionary compression, repeating the first paragraph. I can't really find any patterns to do anything else... words such as "Jabberwock" (which aren't in the dictionary) aren't compressed enough to try and save on, I think.

Test it

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

[622](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=YCdUsHMg342mZywghGQgkGUgc9KQe... (3 comments)
[622](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=YCdUsHMg342mZywghGQgkGUgc9KQe...
Shaggy‭ wrote over 3 years ago

622

Shaggy‭ wrote over 3 years ago

615

Shaggy‭ wrote over 3 years ago

Also, it looks like yours suffers from the same problems as mine did, not (de)compressing "Bandersnatch" & "Callooh" properly.