37
4
Your task is to output the exact string
The Jabberwocky
without taking input. Normal rules for input and output apply, so both functions and programs are allowed.
Of course there is a catch, it wouldn't be fun without a catch. Your program, when stripped of non-alphabetic characters, must start the poem The Jabberwocky (case insensitive). To start the poem it must be a continuous substring of the poem starting at the beginning. The empty string is fine (although you probably won't score very well).
Here is the text for reference:
twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewarethejabberwockmysonthejawsthatbitetheclawsthatcatchbewarethejubjubbirdandshunthefrumiousbandersnatchhetookhisvorpalswordinhandlongtimethemanxomefoehesoughtsorestedhebythetumtumtreeandstoodawhileinthoughtandasinuffishthoughthestoodthejabberwockwitheyesofflamecamewhifflingthroughthetulgeywoodandburbledasitcameonetwoonetwoandthroughandthroughthevorpalbladewentsnickersnackheleftitdeadandwithitsheadhewentgalumphingbackandhastthouslainthejabberwockcometomyarmsmybeamishboyofrabjousdaycalloohcallayhechortledinhisjoytwasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabe
Here is a program you can use to test this property.
If you run out of poem to use you may not use any additional alphabetic characters.
Alphabetic characters are characters a
-z
and A
-Z
here is the complete list:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
Scoring
Your program will be scored in the number of non-alphabetic bytes used with fewer being better.
Here is a Haskell program that scores answers. (This assumes inputs are valid)
Example program
The following program would be valid:
twas&*brilliga77812nd Thesli thyt Oves didgy reand Gim bleinth ewab eal lmims ywe""""""""
ret h eb or o g o ve sa n dthemomerAthsoutgrabebewaretheJABBERWOCKmysonthe)(*)()((*98980908(()*(jawsthatbit
When stripped down to alphabetic characters it is:
twasbrilligandTheslithytOvesdidgyreandGimbleinthewabeallmimsyweretheb orogovesandthemomerAthsoutgrabebewaretheJABBERWOCKmysonthejawsthatbit
Which matches the first bit of the poem (case insensitive).
This program would score 59 because it contains these non-alphabetic characters:
&*77812 """"""""
)(*)()((*98980908(()*(
6What do you mean by "Start the poem"? – Pavel – 2018-03-02T20:53:31.630
2I think he means when stripped of all non-alphabetic characters, all the characters must be a subset of the jabberwocky, starting at the beginning – FantaC – 2018-03-02T21:00:18.493
7This is trivial to do in languages without letters. – NoOneIsHere – 2018-03-02T21:02:42.340
@Pavel Sorry, I lost internet for a moment. The program included specifies exactly what I mean. tbfninja's interpretation is also exactly correct. – Post Rock Garf Hunter – 2018-03-02T21:07:21.023
2I get a score of 59 for your example program, including 22 bytes of whitespace (which are certainly not alphabetic). – Nitrodon – 2018-03-02T21:46:56.453
@Nitrodon Yes, I made a mistake there. Thanks. – Post Rock Garf Hunter – 2018-03-02T21:48:42.340
In this case I strongly suggest that you add a score to the output of your validating Haskell snippet. – Weijun Zhou – 2018-03-02T21:51:34.543
@WeijunZhou I've gone ahead and added it. – Post Rock Garf Hunter – 2018-03-02T21:53:25.370
2You can edit it into the question. Personally I prefer a single script rather than two. – Weijun Zhou – 2018-03-02T21:55:01.227
5The pedant in me feels obligated to remind you that the name of the poem is
Jabberwocky
(with no article), while the name of the beast isthe Jabberwock
(with no -y). Of course you can't change the required output now, but... – DLosc – 2018-03-03T04:55:58.913Thanks, @DLosc, I was about to mention the exact same thing. – Arturo Torres Sánchez – 2018-03-03T05:50:46.350
6Why so many votes to close as unclear? The "Here is a program you can use to test this property." part completely and unambiguously determines the valid criteria. – user202729 – 2018-03-03T08:44:36.813
2@user202729 I did not vtc as I don't think it is unclear, but it's worth noting that code in some language is only good to specify a problem for those who understand that language so cannot make a question here clear. – Jonathan Allan – 2018-03-03T13:19:20.130
3@JonathanAllan Their being unable to understand the question doesn't necessary mean that the question is unclear... – user202729 – 2018-03-03T13:24:23.053
@user202729 well that's just unavoidable, but the language used here is English - if someone posts a question in Catalan I'm pretty sure it'll be closed as unclear even if it is perfectly written. – Jonathan Allan – 2018-03-03T13:26:18.013