Hast Thou Slain the Jabberwock?

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(()*(

Post Rock Garf Hunter

Posted 2018-03-02T20:50:45.887

Reputation: 55 382

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 is the Jabberwock (with no -y). Of course you can't change the required output now, but... – DLosc – 2018-03-03T04:55:58.913

Thanks, @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

Answers

42

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.

Martin Ender

Posted 2018-03-02T20:50:45.887

Reputation: 184 808

3Golfed. – Dennis – 2018-03-03T00:44:16.773

@JoKing Try it online! (generated with BF-Crunch)

– Dennis – 2018-03-03T01:30:36.733

"bad news" ... yes, that's bad. I predicted Unary will get 0 bytes, the rule changed, and there are still score 0 submissions.

– user202729 – 2018-03-03T08:47:10.793

5I don't think it's bad news at all. This has zero implications on how fun it is to golf in other languages. – Lynn – 2018-03-06T00:34:44.497

22

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!

Steadybox

Posted 2018-03-02T20:50:45.887

Reputation: 15 798

Score 79 – gastropner – 2018-03-03T15:43:01.000

2Wouldn't //abcdefgh\n be 1 fewer characters than /*abcdefgh*/? – wizzwizz4 – 2018-03-04T12:15:13.533

@wizzwizz4 Yes, it would. Thanks! – Steadybox – 2018-03-04T14:26:41.640

20

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.

Martin Ender

Posted 2018-03-02T20:50:45.887

Reputation: 184 808

Very very impressive. – Weijun Zhou – 2018-03-02T23:18:50.050

14

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.

Nitrodon

Posted 2018-03-02T20:50:45.887

Reputation: 9 181

1Very nice answer! – Jonathan Allan – 2018-03-03T19:30:23.320

3Right tool for the job. – Robert Fraser – 2018-03-04T02:45:56.050

Nice, I tried several things but didn't find any layout that scored nearly as well as this. – Martin Ender – 2018-03-04T09:58:59.060

13

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”ṪṭṖ

Jonathan Allan

Posted 2018-03-02T20:50:45.887

Reputation: 67 804

Is the first program not valid without m1“y? It still prints The Jabberwock and begins with a subset of the poem – dylnan – 2018-03-03T18:00:25.320

1No, the m1“y (or it could be m1”y) is needed because we must print The Jabberwocky, not The Jabberwock. – Jonathan Allan – 2018-03-03T19:25:47.180

7

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

Jonathan Allan

Posted 2018-03-02T20:50:45.887

Reputation: 67 804

5

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.

Pavel

Posted 2018-03-02T20:50:45.887

Reputation: 8 585

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." – benj2240 – 2018-03-02T21:41:39.720

@benj2240 -p is a command line flag, not an input. – Mr. Xcoder – 2018-03-02T21:42:03.387

2

@benj2240 Taking unused empty input when no input is required is allowed, by meta concencus. This takes an empty line.

– Pavel – 2018-03-02T21:43:46.733

@Pavel I see, thank you – benj2240 – 2018-03-02T22:15:47.610

5

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");

Neil

Posted 2018-03-02T20:50:45.887

Reputation: 95 035

whole poem :P – ASCII-only – 2018-03-03T12:20:53.773

@JonathanAllan Fixed! – Neil – 2018-03-03T20:37:06.617

4

Foo, score 5

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware"The Jabberwock"m"y"

Try it online!

Steadybox

Posted 2018-03-02T20:50:45.887

Reputation: 15 798

4

><>, 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.

Jo King

Posted 2018-03-02T20:50:45.887

Reputation: 38 234

3

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.

Neil

Posted 2018-03-02T20:50:45.887

Reputation: 95 035

You can score 6 like this: https://tio.run/##JYwxDgIxDAR7XkFBRcU7qPmATVaJhZ1IjiGKxN9D0LUzO@sIqbTWNwZ1dlGVTDVFQVeJMqN90JOkPB2bZzFWSN1@EINUTazPAcdG3Lzlf3A8WDM4RentHdn3nHfkOD0Kzndiho/2fN0uV5tr/QA and then 5 by switching to Retina 1.0 (and using * instead of $*).

– Martin Ender – 2018-03-03T01:00:07.273

3

C, score 23

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

Try it online!

Thomas Padron-McCarthy

Posted 2018-03-02T20:50:45.887

Reputation: 501

2

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.

AdmBorkBork

Posted 2018-03-02T20:50:45.887

Reputation: 41 581

I was just about to post this exact answer :P – Pavel – 2018-03-02T21:31:33.467

Can’t you combine The and Jabberwock into one string? Try it online!

– Jo King – 2018-03-05T22:29:33.750

@JoKing Indeed, thanks. Funny how you're getting by without the line continuation character. I wonder when that parsing rule changed... – AdmBorkBork – 2018-03-06T13:26:54.000

2

Yabasic, 13

Thanks for @Pavel's Ruby answer!

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

Try it online!

Weijun Zhou

Posted 2018-03-02T20:50:45.887

Reputation: 3 396

I count a score of 20, I think you forgot to count newlines. – Pavel – 2018-03-02T21:51:41.820

Yes, there are problems with scores of other answers as well. – Weijun Zhou – 2018-03-02T21:53:03.253

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

– Taylor Scott – 2018-03-02T22:12:12.843

@TaylorScott How can I fail to notice that! Fixed. – Weijun Zhou – 2018-03-02T22:14:18.340

I think you have an extra "the" at the end of the first line. – 12Me21 – 2018-03-03T15:33:57.550

@12Me21 Yes. Pasted the wrong version. Thank you for correcting me. – Weijun Zhou – 2018-03-03T17:59:17.157

2

Java (OpenJDK 9), score 11

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

Try it online!

Credits

Olivier Grégoire

Posted 2018-03-02T20:50:45.887

Reputation: 10 647

1-2 score by changing () to t (unused Void null parameter), and removing the leading t from the comment. – Kevin Cruijssen – 2018-03-05T08:17:29.313

2

@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.

– Olivier Grégoire – 2018-03-05T09:43:04.230

Ah ok, fine by me. :) The edit was mainly meant to fix 'bytes' to 'score'. – Kevin Cruijssen – 2018-03-05T10:06:21.577

1

@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. ;-)

– Olivier Grégoire – 2018-03-05T10:08:36.603

1Now that you have removed the comment on the first line you don't need the line break any longer. – Post Rock Garf Hunter – 2018-03-06T03:38:51.903

2

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"

Chronocidal

Posted 2018-03-02T20:50:45.887

Reputation: 571

2

Haskell, score 12

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

Try it online!

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

Lynn

Posted 2018-03-02T20:50:45.887

Reputation: 55 648

1

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

caird coinheringaahing

Posted 2018-03-02T20:50:45.887

Reputation: 13 702

1

Stax, 11

£«≡¿«_→Ä:£◘

Run and debug online!

Just a compressed string literal that is in turn packed.

Weijun Zhou

Posted 2018-03-02T20:50:45.887

Reputation: 3 396

1

05AB1E, score 14

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

Try it online!

Mr. Xcoder

Posted 2018-03-02T20:50:45.887

Reputation: 39 774

1

SOGL V0.12, score 9

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

Try it Here!

dzaima

Posted 2018-03-02T20:50:45.887

Reputation: 19 048

1

Canvas, score 5

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware∙The Jabberwockpm∙yp

Try it here!

dzaima

Posted 2018-03-02T20:50:45.887

Reputation: 19 048

1

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.

DLosc

Posted 2018-03-02T20:50:45.887

Reputation: 21 213

1

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".

12Me21

Posted 2018-03-02T20:50:45.887

Reputation: 6 110

1

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!

gastropner

Posted 2018-03-02T20:50:45.887

Reputation: 3 264

1

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.")

msh210

Posted 2018-03-02T20:50:45.887

Reputation: 3 094

Does this print the y? – Jo King – 2018-03-04T20:22:00.773

@JoKing oops! Now it does; thanks. – msh210 – 2018-03-04T20:37:49.667

1

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

user2033427

Posted 2018-03-02T20:50:45.887

Reputation: 111

1

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.

MegaTom

Posted 2018-03-02T20:50:45.887

Reputation: 3 787

1

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 >>..

ბიმო

Posted 2018-03-02T20:50:45.887

Reputation: 15 345

0

BF, 143 bytes (score 143)

-[--->+<]>-.[---->+++++<]>-.---.--[--->+<]>-.+++++[->++<]>.--[--->++++<]>+.+..+++.+++++++++++++.+++++.--------.------------.++++++++.[--->+<]>.

Try it online!

No letters means no poem.

Alternate (BF, 861 bytes, score 143)

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewarethejabberwockmysonthejawsthatbitetheclawsthatcatchbewarethejubjubbirdandshunthefrumiousbandersnatchhetookhisvorpalswordinhandlongtimethemanxomefoehesoughtsorestedhebythetumtumtreeandstoodawhileinthoughtandasinuffishthoughthestoodthejabberwockwitheyesofflamecamewhifflingthroughthetulgeywoodandburbledasitcameonetwoonetwoandthroughandthroughthevorpalbladewentsnickersnackheleftitdeadandwithitsheadhewentgalumphingbackandhastthouslainthejabberwockcometomyarmsmybeamishboyofrabjousdaycalloohcallayhechortledinhisjoytwasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabe-[--->+<]>-.[---->+++++<]>-.---.--[--->+<]>-.+++++[->++<]>.--[--->++++<]>+.+..+++.+++++++++++++.+++++.--------.------------.++++++++.[--->+<]>.

Now with 100% more poem

NoOneIsHere

Posted 2018-03-02T20:50:45.887

Reputation: 1 916

@cairdcoinheringaahing I don't think the rules are clear enough in order to determine if this is valid or not. – Pavel – 2018-03-02T21:05:50.827

2@cairdcoinheringaahing it passes the test program (would you prefer I cut and paste the poem before the code? its just a no-op) – NoOneIsHere – 2018-03-02T21:06:11.853

5I've also downvoted this answer. It is valid, as you pointed out but it chooses a language for which the challenge is as uninteresting as possible. (also your second submission has the same score as the first one) – Post Rock Garf Hunter – 2018-03-02T21:10:47.790

2

It's also an extremely lazy answer, as you've just pasted the required text into a brainfuck text generator

– Jo King – 2018-03-03T00:41:11.450

1@WheatWizard Did you also downvote the 1k answers that are just a comment with the poem, a non-alphanumeric print function, "The Jabberwock" a comment with "m", and then printing "y"? – NoOneIsHere – 2018-03-05T02:24:15.000

@NoOneIsHere I'm a little confused by the syntax of your question. I'm not sure what a 1k answer is, but I have downvoted a number of answers here. – Post Rock Garf Hunter – 2018-03-05T02:27:17.033

@WheatWizard 1k means 1,000 (the number, not rep) – NoOneIsHere – 2018-03-05T02:51:42.587

Please include score ty – ASCII-only – 2018-03-06T23:30:30.213

0

Fission, score 6

twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewaRe"The Jabberwock"m"y";

Try it online!

Steadybox

Posted 2018-03-02T20:50:45.887

Reputation: 15 798

0

C# (Mono C# Shell), Score 12

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

Try it online!

Mono comes with a program called, well, csharp, that lets you run C# programs as a script. It's essentially a wrapper for the REPL, and supports implicit printing.

Pavel

Posted 2018-03-02T20:50:45.887

Reputation: 8 585

0

APL (Dyalog), score 21 14

1⌽1↓¯2⌽106↓'twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebewareThe Jabberwockmy'

Try it online!

Uriel

Posted 2018-03-02T20:50:45.887

Reputation: 11 708

0

JavaScript (SpiderMonkey), score 12

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

Try it online!

Credits

Shamelessly ripped from this answer for Java.

-2 points from Brian H.

Pureferret

Posted 2018-03-02T20:50:45.887

Reputation: 960

1get rid of the first comment and put it in the input variable name to save some chars. twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware=>"The Jabberwock"+//m "y". This saves two / and a newline. – Brian H. – 2018-03-05T16:00:24.640

0

dc, score 14 12

#twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware
[The Jabberwock]#myso
n121#thejawsthatbitetheclawsthatcatchbewarethejubjubbirdandshunthefrumiousbandersnatchhetookhisvor
P

Try it online!

Rather uninteresting solution, but I'm not sure it can be optimized much more beyond uninteresting. Just comments everything out until the first part of the string, comments out until we hit an n to print, then inputs 121 as the ASCII value of 'y' and comments out until we hit a P to print.

-1 point thanks to Jo King (and no thanks to my inattention…)

-1 more point when I realized using the ASCII value for 'y' was ultimately shorter.

brhfl

Posted 2018-03-02T20:50:45.887

Reputation: 1 291

You don’t need the second half of the poem (and therefore one of the comments) if you’re not using it – Jo King – 2018-03-05T22:12:16.530

@JoKing Thanks, in my mind there was a scoring penalty for missing bits of poem — not sure where that came from. – brhfl – 2018-03-06T01:27:54.303

0

APL (Dyalog Unicode), score 10

'twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware'⊢'The Jabberwock',⊢/'my'

Try it online!

'my' the character vector "my"

⊢/ rightmost element; "y"

'The Jabberwock', prepend the main part; "The Jabberwocky"

'twaare'⊢ yield that and discard the beginning of the poem

Adám

Posted 2018-03-02T20:50:45.887

Reputation: 37 779

0

PHP, score 12

<?=#twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesandthemomerathsoutgrabebeware
"The Jabberwock".#m
y;

Try it online!

It's interesting that in the poem, it says "he chortled" which contains the word echo (ignoring the white space). I tried to use this to my advantage instead of having the <?=, but always came out with a higher score that way.

Jo.

Posted 2018-03-02T20:50:45.887

Reputation: 974

0

Befunge-93, 33 17 score

^twasbrilligandtheslithytovesdidgyreandgimbleinthewabeallmimsyweretheborogovesan
<dthemomerathsoutgrabebeware>:#,_@#:"The Jabberwock"m#"y"

Try it online!

Golfed 16 score thanks to the suggestion by W W

ItsJ0el

Posted 2018-03-02T20:50:45.887

Reputation: 95

116 if you delete the trailing bits of the poem – Post Rock Garf Hunter – 2018-08-08T15:51:21.940