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

Dashboard
Notifications
Mark all as read
Challenges

Generate Lewis Caroll's Jabberwocky

+3
−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.

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comments

2 answers

+3
−0

Japt, 625 bytes

=`'T°s ߍ¦g, „d e sҐy ‘vƒ
Did gyœ „d g‹½e ˆ e °¼;
A¥ Úßy ØÀ e ޒgovƒ,
A˜ e Ú  ÎÈs ŒtgŸ¼.
`U+`
"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” Jab¼rwock, Ø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 Jab¼rwock?
Co´ ‘ my ‡ms, my ¼aÚÊ ¾y!
O fŸbjŒs »y! CÃ
oh! CÃy!"
He ֚t¤d ˆ –s joy.

`+U

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

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comments

+1
−0

Bubblegum, 769 bytes

074cd1dc7fb6baed2f568915ffeb6aa5c775264a9a6f77eb418f0793da59b234599dadb6804269dbb5a213a05c807b0723f79512c284f46e8dbb6b0274f1b36606988b67ea58cf68beabe10f158702fcbf4c2b30d7b4f26190901aa713e125aee132d76940aff74588831a1908d8541c09f042556a7c7e24e80370734855cd398797d016c22627e54bec7c76034f141610fcbb8edb9ab6194c5914680b4c735f7a0e804b213dda7380469109d3a1296f04212cc5106e1282560971c3d4d357f330585209d924545a0e5180ccc1a01c8c65df7f29bb9fe3a5aeba8bf97781d60194f34bdfdbfc9aecfc49e8bd6896dc202d92830dd0ff31a115567bcec156ce21f705909b873eff8795764f24a6823f95b6c9548d2398cc1befecbf9298e3ec1211fea9615a9654746eb5defaafd70bd96ea6bff3d587ee01d7d631c5a613883afc25c7f9da67a7f185f19f3378d8790b173393344c2e66af508d63798be175f56178e5402ab07c8b97bc0c2c582010154a71c59acf175c4f2974b68cf319cace4de83e37d6d6f93b58f000033ed0accc7a742292780c5eb2fa87daa61a2e7794911787de40abed55f872483fa776e5d6158229577ec58b9a7b2e1f7c71930d8655491025808ceed9f960a4ecfcc69787bc965fc29852e77d6b6713b3e6d3b5e992d710a775464c9e3c7cc82d6bf7866f2b985e549a8b81dd5803f0746cd41dbe5f016d65f40f1efc4aa7ea204e73f9c47a9c2f9ce9b5d46b018c0bc2d68ae15635fa967be70cd7cc9d47a62da62e0546ae68a912cae2408e4c9b5dbeddb218cc3c70c69f11175cdc61c8a7422d50bb8038fcbd7d9dff05bdd821931c0e083a9f4f509b776106219099f616a8a439d12491bff97f31222881cbafe273680ae34d59ca5536f25c308e6402b31191d235bbfdcfa4bb681410c0d84c0f1f4d008b591ddc7d3d2c32c9da15554d51a6355686eb9afe64c45f96a5f83dbae78545b9daf1118e600878eadec76d3a26cee9ed3e817b4be1d7e95380ab13c6d2a32cea2370208925c736e41288a04658380d6e86cb07ed7b08e2c8efa76234fb18e3b25e00                                            .

Try it online!

Why does this post require moderator attention?
You might want to add some details to your flag.

3 comments

An explanation would be nice. celtschk‭ 4 months ago

@celtschk Bubblegum is used to provide constant output, generally from SHA-256, LZMA or TAR compressed files. This answer is probably a valid SHA256 hash. Read here Razetime‭ 4 months ago

Basically, it is the most boring(and oftentimes most efficient) kolmogorov complexity language. Razetime‭ 4 months ago

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!