37
\$\begingroup\$

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(()*(
\$\endgroup\$
15
  • 6
    \$\begingroup\$ What do you mean by "Start the poem"? \$\endgroup\$
    – Pavel
    Commented Mar 2, 2018 at 20:53
  • 7
    \$\begingroup\$ This is trivial to do in languages without letters. \$\endgroup\$ Commented Mar 2, 2018 at 21:02
  • 6
    \$\begingroup\$ The 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 is the Jabberwock (with no -y). Of course you can't change the required output now, but... \$\endgroup\$
    – DLosc
    Commented Mar 3, 2018 at 4:55
  • 6
    \$\begingroup\$ Why 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. \$\endgroup\$
    – user202729
    Commented Mar 3, 2018 at 8:44
  • 4
    \$\begingroup\$ @JonathanAllan Their being unable to understand the question doesn't necessary mean that the question is unclear... \$\endgroup\$
    – user202729
    Commented Mar 3, 2018 at 13:24

39 Answers 39

44
\$\begingroup\$

oOo CODE, score 0

Thanks to Dennis for golfing the Brainfuck code.

TwASbRIlLIgAnDthEsliTHyTOvEsdiDgyreaNdgImbleinthEwaBeaLlmimSywEreThEBoroGoveSAndTheMOmERaTHSoutGRabEbeWArEthEjaBbeRWockMYsONtHEJawsTHaTBiTEThecLawSthATcaTChBeWAReTHeJuBJuBBiRDAndsHUNtHeFRuMIoUSbANdERSnatchheTooKHisvORpaLswORdinhAndLonGtiMetHEmanXomEFoEHeSOUg

Try it online!

I've got bad news for this challenge... :(

oOo CODE is just a binary encoding of brainfuck which uses the case of a letter for each bit. So yeah, since the poem is long enough (or the output short enough) to cover a Brainfuck program that prints The Jabberwocky (without actually trying hard to golf it), this becomes a trivial optimal answer.

\$\endgroup\$
4
  • 4
    \$\begingroup\$ Golfed. \$\endgroup\$
    – Dennis
    Commented Mar 3, 2018 at 0:44
  • \$\begingroup\$ @JoKing Try it online! (generated with BF-Crunch) \$\endgroup\$
    – Dennis
    Commented Mar 3, 2018 at 1:30
  • \$\begingroup\$ "bad news" ... yes, that's bad. I predicted Unary will get 0 bytes, the rule changed, and there are still score 0 submissions. \$\endgroup\$
    – user202729
    Commented Mar 3, 2018 at 8:47
  • 6
    \$\begingroup\$ I don't think it's bad news at all. This has zero implications on how fun it is to golf in other languages. \$\endgroup\$
    – lynn
    Commented Mar 6, 2018 at 0:34
25
\$\begingroup\$

C, score  104   79  74

Thanks to @gastropner for lowering the score to 79 and thanks to @wizzwizz4 for lowering it further to 74!

*t,w;a(s,b,rilligand){*(t//he
=s++)="lithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewareThe Jabberwock\0mysonthejawsthat"[b++]?//i
:121;*t>12e1?*++t//hecl
=0:a//wsthatcatchbewarethejubjubbirdandshunthefrumiou
(s,b);}an;der(s,n){a(//tchhetookhi
s,88);}

Try it online!

\$\endgroup\$
3
  • \$\begingroup\$ Score 79 \$\endgroup\$
    – gastropner
    Commented Mar 3, 2018 at 15:43
  • 2
    \$\begingroup\$ Wouldn't //abcdefgh\n be 1 fewer characters than /*abcdefgh*/? \$\endgroup\$
    – wizzwizz4
    Commented Mar 4, 2018 at 12:15
  • \$\begingroup\$ @wizzwizz4 Yes, it would. Thanks! \$\endgroup\$
    – Steadybox
    Commented Mar 4, 2018 at 14:26
21
\$\begingroup\$

Fission 2, score 3

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewaRe"The Jabberwock"mysonthejawsthatbitetheclawsthatcatchbewarethejubjubbirdandshunthefrumiousbandersnatchhetookhisvorpalswordinhandlongtimethemanxomefoehesoughtsorestedhebythetumtumtreeandstoodawhileinthoughtandasinuffishthoughthestoodthejabberwockwitheyesofflamecamewhifflingthroughthetulgeywoodandburbledasitcameonetwoonetwoandthroughandthroughthevorpalbladewentsnickersnackheleftitdeadandwithitsheadhewentgalumphingbackandhastthouslainthejabberwockcometomyarmsmybeamishboyO

Try it online!

Explanation

We can ignore most of the lowercase letters, they just set an atom's energy to their code point.

...Re"The Jabberwock"my...oyO

The uppercase R is the program's entry point, as it creates an atom going right. As I said, we can ignore the e. Then " toggles string mode, which just prints all characters it encounters to STDOUT, which gives us The Jabberwock. That only leaves the y. We could use the y that's coming up immediately in y, but then we'd have to waste at least one non-letter byte on printing it (!) and possibly another on terminating the program.

Instead, we patiently wait for y to show up immediately before o in the poem. Because that lets us use O which prints the character and destroys the atom, terminating the program. This way, the only non-letter characters we need are the space and the two quotes.

\$\endgroup\$
1
  • \$\begingroup\$ Very very impressive. \$\endgroup\$ Commented Mar 2, 2018 at 23:18
15
\$\begingroup\$

Alice, score 7

"T/was"bri@lligandtheslithytovesdidgyreandgimbleinthewabeallmimsywe
rethe borogovesandthemomerathsoutgrabebewarethejabberwockmysonthejawsthatbitetheclawsthatcatchbewarethejubjubbirdandshunthefrumiousbandersnatchhetookhisvorpalswordinhandlongtimethemanxomefoehesoughtsorestedhebythetumtumtreeandstoodawhileinthoughtandasinuffishthoughthestoodthejabberwockwitheyesofflamecamewhifflingthroughthetulgeywoodandburbledasitcameonetwoonetwoandthroughandthroughthevorpalbl
adewentsn

Try it online!

The / makes the IP move diagonally and bounce off the edges, so the instructions actually executed are "The "ono@. The n command (in ordinal mode) pushes the string "Jabberwocky" if the top of the stack is empty, and o outputs the top of the stack.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Very nice answer! \$\endgroup\$ Commented Mar 3, 2018 at 19:30
  • 3
    \$\begingroup\$ Right tool for the job. \$\endgroup\$ Commented Mar 4, 2018 at 2:45
  • \$\begingroup\$ Nice, I tried several things but didn't find any layout that scored nearly as well as this. \$\endgroup\$ Commented Mar 4, 2018 at 9:58
13
\$\begingroup\$

Jelly, score  6  4

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathSOUTGRABEBEWARE“The Jabberwock”m”y

A full program printing the result
(as a monadic link it prints The Jabberwock as a side-effect and returns the character y)

Inserts the characters “ ”” into a case-changed prefix of the poem.

This works because:

  1. The last h before SOUTGRABEBEWARE“The Jabberwock”m”y is (at least at the time of writing!) an undefined atom, which makes that all become a new link which takes the default input of 0 and performs some monadic functions, SOUTGRABEBEWARE, which yield 1 (see below).

  2. 1“The Jabberwock”m then performs m, modulo slicing, on "The Jabberwock" with a slice size of 1, yielding "The Jabberwock".

  3. The trailing ”y is a new leading constant chain so Jelly prints that list of characters and then yields the character y, and since it's now the end of the program this then gets printed.

 implicit input = 0
S sum             0
O cast to ordinal 0
U upend           [0]
T truthy indices  []
G group           []
R range           []
A absolute value  []
B to-binary       []
E all-equal?      1
B to-binary       [1]
E all-equal?      1
W wrap            [1]
A absolute value  [1]
R range           [[1]]
E all-equal?      1

Previous 6 byter:

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware
“The Jabberwock”m1“y

Try it online!

The six non-poem characters are a newline plus “ ”1“.


Alternative 6s:

“T“wasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewaret“he Jabberwock”m2“y

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewaret
“The Jabberwockmy”ṪṭṖ
\$\endgroup\$
2
  • \$\begingroup\$ Is the first program not valid without m1“y? It still prints The Jabberwock and begins with a subset of the poem \$\endgroup\$
    – dylnan
    Commented Mar 3, 2018 at 18:00
  • 1
    \$\begingroup\$ No, the m1“y (or it could be m1”y) is needed because we must print The Jabberwocky, not The Jabberwock. \$\endgroup\$ Commented Mar 3, 2018 at 19:25
7
\$\begingroup\$

Charcoal, score 3

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware⎚The Jabberwock⌈my

Try it online!

Inserted the three characters: ⎚ ⌈

...it also works with the whole poem.

How?

twas ... ware⎚The Jabberwock⌈my - no input
twas ... ware                    - print this text     >  twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware
             ⎚                  - clear the screen    >
               The Jabberwock    - print this text     > The Jabberwock
                             ⌈   - (print) maximum of:
                              my -   this text         > The Jabberwocky
\$\endgroup\$
5
\$\begingroup\$

Ruby (-p), Score 12

$_=#twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware
'The Jabberwock'+#m
?y

Try it online!

Abuse all the comments!

With the -p flag, ruby will print whatever stored in $_. Requires a single line of any input.

\$\endgroup\$
4
  • \$\begingroup\$ I don't think you can use -p here, because of the required line of input. "Your task is to output the exact string The Jabberwocky without taking input." \$\endgroup\$
    – benj2240
    Commented Mar 2, 2018 at 21:41
  • \$\begingroup\$ @benj2240 -p is a command line flag, not an input. \$\endgroup\$
    – Mr. Xcoder
    Commented Mar 2, 2018 at 21:42
  • 2
    \$\begingroup\$ @benj2240 Taking unused empty input when no input is required is allowed, by meta concencus. This takes an empty line. \$\endgroup\$
    – Pavel
    Commented Mar 2, 2018 at 21:43
  • \$\begingroup\$ @Pavel I see, thank you \$\endgroup\$
    – benj2240
    Commented Mar 2, 2018 at 22:15
5
\$\begingroup\$

Charcoal, score: 5 4

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware⎚The Jabberwock¿m¦y

Try it online! Edit: Saved 1 byte thanks to @ASCII-only. Explanation: Translates to the following verbose code:

Print("twas...beware");
Clear();
Print("The Jabberwock");
if ("m") Print("y");
\$\endgroup\$
2
  • \$\begingroup\$ whole poem :P \$\endgroup\$
    – ASCII-only
    Commented Mar 3, 2018 at 12:20
  • \$\begingroup\$ @JonathanAllan Fixed! \$\endgroup\$
    – Neil
    Commented Mar 3, 2018 at 20:37
4
\$\begingroup\$

Foo, score 5

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware"The Jabberwock"m"y"

Try it online!

\$\endgroup\$
4
\$\begingroup\$

><>, Score: 13 12

\twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware
\"The Jabberwockmy"$~\sonthejawsthatbitetheclawsthatcatchbewarethejubjubbirdandshunthefrumiousbandersnatchhetookhisvorpalswordinhandlongtimethemanxomefoehesoughtsorestedhebythetumtumtreeandstoodawhileinthoughtandasinuffishthoughthestoodthejabberwockwitheyeso
fflamecamewhifflingth>ro<

Try it online!

Verification and scoring.

Immediately redirects to the second line, which pushes "The Jabberwockmy" in reverse to the stack. $~ pops the excess m and >ro< prints the whole stack, reversing it beforehand.

\$\endgroup\$
3
\$\begingroup\$

Retina 0.8.2, score: 21 20 18 16 13 8 6

|twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware
The Jabberwock0$*my

Try it online! Edit: Score reduced by 2 thanks to @MartinEnder.

\$\endgroup\$
1
  • \$\begingroup\$ You can score 6 like this: tio.run/… and then 5 by switching to Retina 1.0 (and using * instead of $*). \$\endgroup\$ Commented Mar 3, 2018 at 1:00
3
\$\begingroup\$

C, score 23

twasbrilligandtheslithytovesdidgyreandgimble(int**h){//ewabeallmimsyweretheborogovesandthemomerat
*h//soutgrabebeware
="The Jabberwock"//m
"y";}

Try it online!

\$\endgroup\$
3
\$\begingroup\$

PowerShell, Score: 19 10

#twasbrilligandTheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewarethe
'The Jabberwock'+#m
'y'

Try it online!

Port of Pavel's Ruby answer. Thanks to Jo King for -9 points.

The strings are + concatenated together. Once the comments are removed and the code parsed, PowerShell sees this as 'The Jabberwock'+'y'. That string is left on the pipeline and output is implicit.

\$\endgroup\$
3
  • \$\begingroup\$ I was just about to post this exact answer :P \$\endgroup\$
    – Pavel
    Commented Mar 2, 2018 at 21:31
  • \$\begingroup\$ Can’t you combine The and Jabberwock into one string? Try it online! \$\endgroup\$
    – Jo King
    Commented Mar 5, 2018 at 22:29
  • \$\begingroup\$ @JoKing Indeed, thanks. Funny how you're getting by without the line continuation character. I wonder when that parsing rule changed... \$\endgroup\$ Commented Mar 6, 2018 at 13:26
2
\$\begingroup\$

05AB1E, score 14

"twasbrilligand""The ""slithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewarethe"Š"Jabberwock"+"my"Š

Try it online!

\$\endgroup\$
0
2
\$\begingroup\$

Yabasic, 13

Thanks for @Pavel's Ruby answer!

#twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware
?"The Jabberwock";//m
?"y"

Try it online!

\$\endgroup\$
6
  • \$\begingroup\$ I count a score of 20, I think you forgot to count newlines. \$\endgroup\$
    – Pavel
    Commented Mar 2, 2018 at 21:51
  • \$\begingroup\$ Yes, there are problems with scores of other answers as well. \$\endgroup\$ Commented Mar 2, 2018 at 21:53
  • \$\begingroup\$ Just a note: Yabasic is available for use at Try It Online, you should consider adding a link to your solution at TIO such as this one \$\endgroup\$ Commented Mar 2, 2018 at 22:12
  • \$\begingroup\$ @TaylorScott How can I fail to notice that! Fixed. \$\endgroup\$ Commented Mar 2, 2018 at 22:14
  • \$\begingroup\$ I think you have an extra "the" at the end of the first line. \$\endgroup\$
    – 12Me21
    Commented Mar 3, 2018 at 15:33
2
\$\begingroup\$

VBA, score 5

Run in the Immediate Window:

?twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware"The Jabberwock"m"y

How it works:

? - This prints out output as a string

-

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware - without Explicit declaration, this is treated as an empty string

-

"The Jabberwock" - String. When you put 2 variables/strings next to each other, VBA will automatically concatenate them. (2 non-variable strings would require a space so as not to add a double-quote)

-

m - Another implicit empty-string, automatically concatenated

-

"y - Another string. Left open, the Immediate Window will automatically close this when it hits the end of the line - again, automatically concatenated

-

1 question-mark, 1 space and 3 double-quotes. VBA sees this as ?"" & "The Jabberwock" & "" & "y" or ?"The Jabberwocky"

\$\endgroup\$
2
\$\begingroup\$

Haskell, score 12

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware="The Jabberwock"++{-m-}"y"

Try it online!

Defines a zero-argument function twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware :: String whose output is "The Jabberwocky".

\$\endgroup\$
2
\$\begingroup\$

Java (OpenJDK 9), score 11

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware->"The Jabberwock"+//m
"y"

Try it online!

Credits

\$\endgroup\$
5
  • 1
    \$\begingroup\$ -2 score by changing () to t (unused Void null parameter), and removing the leading t from the comment. \$\endgroup\$ Commented Mar 5, 2018 at 8:17
  • 2
    \$\begingroup\$ @KevinCruijssen Thank you for the insights. :-) However, regarding the <s>16</s> 14 I prefer, as always on any StackExchange network to provide a final answer. The changes themselves are listed in the revision page, making it easy for everybody to see the actual changes, and how the answer evolved over time, rather than putting all past and current information in one big unreadable post. \$\endgroup\$ Commented Mar 5, 2018 at 9:43
  • \$\begingroup\$ Ah ok, fine by me. :) The edit was mainly meant to fix 'bytes' to 'score'. \$\endgroup\$ Commented Mar 5, 2018 at 10:06
  • 1
    \$\begingroup\$ @KevinCruijssen Indeed, I saw your change in the credits and they were welcome. In my previous comment, I only meant the title. I even created a meta-post on that topic. ;-) \$\endgroup\$ Commented Mar 5, 2018 at 10:08
  • 1
    \$\begingroup\$ Now that you have removed the comment on the first line you don't need the line break any longer. \$\endgroup\$
    – Wheat Wizard
    Commented Mar 6, 2018 at 3:38
1
\$\begingroup\$

Jelly, score: 8

“ĠȥṘ®ṖȤ»

Try it online!

Just compresses the string, and is an empty string when all non-alphabet characters are removed. Annoyingly, the shortest compressed form, “81Iȯd» has alphabetical characters, neither of which are t or w

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

Stax, 11

£«≡¿«_→Ä:£◘

Run and debug online!

Just a compressed string literal that is in turn packed.

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

Canvas, score 5

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware∙The Jabberwockpm∙yp

Try it here!

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

SOGL V0.12, score 9

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware”The” Jabberwock”:⁄m+ y+

Try it Here!

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

Pip, score 5

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewarethejabberwockmysonthejawsthatbitetheclawsthatcatchbewarethejubjubbirdandshunthefrumiousbandersnatchhetookhisvorpalswordinhandlongtimethemanxomefoehesoughtsorestedhebythetumtumtreeandstoodawhileinthoughtandasinuffishthoughthestOOD|"The Jabberwock"witheyesofflamecamewhifflingthroughthetulge'y

Try it online!

Fortunately, lowercase letters in Pip are all variables, which are no-ops in expressions by themselves. The interesting part of the code:

OOD|"The Jabberwock"

The scanner breaks up OOD as O followed by OD. OD is an undefined variable, which evaluates as nil (falsey); we then logical-or this with "The Jabberwock", and O outputs it without a newline.

'y

Single-character string y. Since it is the last expression in the program, it is printed.

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

SmileBASIC, score 10

@twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware?"The Jabberwock";
@m?"y

This was pretty much taken directly from the Yabasic answer, and since SB is a better language, we can shorten it by using labels rather than comments, which eliminates the need for some of the line breaks

There is also this alternative solution, for the same size:

@twasbrillig ... ?"The Jabberwock"+@my[2]

A label inside an expression is treated as a string. (@my == "@my"), so taking character 2 gives "y".

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

C (gcc), score 58

The useful fact that // style comments + newlines are cheaper than old-style ones comes straight from @wizzwizz4's comment for @Steadybox's answer.

The -m32 flag is required.

Some might be brought to a frumious mood by the lengthy name of the function to call, whereas others might rightly find such objections mimsy; in the end, we must all of us heed the siren song of low scores.

twasbrilligan;d(t,h,e,slithytovesdidgyreandgimble)int*h,*e;//wabeallmimsywere
{t--?*h++=*e++,//borogovesan
d(t,h,e):0;}momerathsoutgrabebewar;*e="The Jabberwock\171";mysonthejawsthatbitetheclawsthatcatchbewarethejubjubbirdandshunthefrumiousbandersnatchhetookhisvorpalswordinhandlongtimethemanxomefoehesoug(h,tsoreste){d(4,h,e);}

Try it online!

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

Batch, score 15 11

:twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewarethejabberwockmysonthejawsthatbiteth
@ec%lawsthatcatchbewarethejubjubbirdandshunthefrumiousbandersnatchhetookhisvorpalswordinhandlongtimethemanxomefoehesoughtsorestedhebythetumtumtreeandstoodawhileinthoughtandasinuffisht%ho%ughthestood% The Jabberwock%withe%y

Basically just echo The Jabberwocky with unused variables and labels.

Old version (score 24):

:twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewarethejabberwockmysonthejawsthatbitetheclawsthatcatchbewarethejubjubbirdandshunthefrumiousbandersnatchhetookhisvorpalswordinhandlongtimethemanxomefoehesoughtsorestedhebythetumtumtreeandstoodawhileinthoughtandasinuffishthoughthestoodthejabberwockwitheyesofflamecamewh
@if %1%fl%i==%ngthroughthetulgeywoodandburbledasitcameonetwoonetwoandthroughandthroughthevorpalbladewentsnickersnackheleftitdeadandwithitsheadhewentgalumphingbackandhastthousla%i n The Jabberwock%cometom%y
:armsmybeamishboyofrabjousdaycalloohcallayh
@echo %*

Requires code to be saved in a file named n.bat and run from the same directory.

Alternate version which can have any name (score 27):

:twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewarethejabberwockmysonthejawsthatbitetheclawsthatcatchbewarethejubjubbirdandshunthefrumiousbandersnatchhetookhisvorpalswordinhandlongtimethemanxomefoehesoughtsorestedhebythetumtumtreeandstoodawhileinthoughtandasinuffishthoughthestoodthejabberwockwitheyesofflamecamewh
@if %1%fl%i==%ngthroughthetulgeywoodandburbledasitcameonetwoonetwoandthroughandthroughthevorpalbladewentsnickersnackheleftitdeadandwithitsheadhewentgalumphingbackandhastthousla%i %~n0 The Jabberwock%cometom%y
:armsmybeamishboyofrabjousdaycalloohcallayh
@echo %*

Explanation (with variables removed):

:twas...                         Label (No labels were used, no goto in the poem)
@if %1i==i %~n0 The Jabberwocky  If no command line arguments, run this batch file again
:arms...                          with the arguments 'The Jabberwocky'
@echo %*                         Echo all arguments
\$\endgroup\$
1
\$\begingroup\$

Perl 5, subroutine, score 11

{twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware;'The Jabberwock'.~'X'}

but with the character \x86 (v134) instead of the X.

(perlsub says "The signature is part of a subroutine's body. Normally the body of a subroutine is simply a braced block of code.")

\$\endgroup\$
2
  • \$\begingroup\$ Does this print the y? \$\endgroup\$
    – Jo King
    Commented Mar 4, 2018 at 20:22
  • \$\begingroup\$ @JoKing oops! Now it does; thanks. \$\endgroup\$
    – msh210
    Commented Mar 4, 2018 at 20:37
1
\$\begingroup\$

Ruby, 9 non letter bytes

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewarethejabberwockmysonthejawsthatbitetheclawsthatcatchbewarethejubjubbirdandshunthefrumiousbandersnatchhetookhisvor=p alswordinhandlongtimethemanxomefoehesoughtsorestedhebythetumtumtreeandstoodawhileinthoughtandasinuffishthoughthestood="The Jabberwock"+withe=?y

Try it online!

Golfed version (for readability):

x=p z="The Jabberwock"+w=?y

Uses a few long and useless variables. In ruby, you can put whatever_you_want= before an expression, and it will still return that expression, just with the side effect of creating an oddly-named variable.

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

Self-modifying Brainfuck, score 16

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware␀The Jabberwock␀my<[<<]>[.>]>>.

Try it online!

Explanation

Initially the tape is set up like this:

$$ \begin{aligned} \dots\ \texttt{␀}\ \texttt{T}\ \texttt{h}\ \texttt{e}\ \texttt{␠}\ \texttt{J}\ \texttt{a}\ \texttt{b}\ \texttt{b}\ \texttt{e}\ \texttt{r}\ \texttt{w}\ \texttt{o}\ \texttt{c}\ \texttt{k}\ \texttt{␀}\ \texttt{m}\ \texttt{y}\ \texttt{<}\ \texttt{[}\ \texttt{<}\ \texttt{<}\ \texttt{]}\ \texttt{>}\ \texttt{[}\ \texttt{.}\ \texttt{>}\ \texttt{]}\ \texttt{>}\ \texttt{>}\ \texttt{.}\ & \texttt{␀}\ \texttt{␀}\ \dots \\ & \uparrow \end{aligned} $$

Since we want to move to the beginning of the string we use <[<<] such that we jump over the first \$\texttt{␀}\$ character.

Now we can just move to the \$\texttt{T}\$ with > and print the whole string with [.>] and since we picked the substring where the next \$\texttt{y}\$ is not far, we can just jump to it directely and print it with >>..

\$\endgroup\$
0
\$\begingroup\$

Fission, score 6

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewaRe"The Jabberwock"m"y";

Try it online!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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