| Bytes | Lang | Time | Link |
|---|---|---|---|
| nan | Mornington Crescent | 250407T174108Z | Andrew B |
| 141 | ibe | 241121T200023Z | madeforl |
| 112 | Vyxal | 210529T125625Z | emanresu |
| 102 | Pip | 240316T011101Z | DLosc |
| 2561 | Actually | 210225T134959Z | PkmnQ |
| 213 | BRASCA | 210224T093339Z | SjoerdPe |
| 408 | Husk | 210224T060342Z | Leo |
| 162 | CJam | 201105T173142Z | 2014MELO |
| 109 | 05AB1E | 190924T143203Z | Grimmy |
| 091 | 80186 machine code + DOS | 190705T135003Z | anatolyg |
| 121 | Befunge98 FBBI | 190613T115814Z | att |
| 665 | 16bit x86 assembly code | 190628T231734Z | peter fe |
| 664 | 8086 Assembly on IBM PC | 190613T152135Z | Artelius |
| 122 | ><> | 190614T171152Z | Nitrodon |
| 787 | 80186+ machine code | 190615T095448Z | ErikF |
| 087 | Japt | 190612T220821Z | Shaggy |
| 903 | ><> | 190612T221743Z | mbomb007 |
| 338 | Ruby | 190613T181418Z | histocra |
| 209 | dc | 190614T133406Z | brhfl |
| 095 | Perl 5 | 190612T141549Z | Grimmy |
| 262 | CJam | 190614T042858Z | Esolangi |
| 835 | PostScript | 190613T195940Z | Grimmy |
| 074 | Japt | 190614T040736Z | Oliver |
| 240 | dc | 190613T204448Z | seshouma |
| 079 | Stax | 190612T055543Z | recursiv |
| 351 | Forth gforth | 190613T204428Z | 2xsaiko |
| 256 | x86 machine code 32bit | 190613T173706Z | anatolyg |
| 118 | MATL | 190612T231815Z | Luis Men |
| 265 | Whitespace | 190613T003048Z | a stone |
| 210 | Pyth | 190613T130616Z | trillian |
| 266 | Pepe | 190612T225423Z | OrangeCh |
| 1215 | Perl 6 | 190612T082122Z | bb94 |
| 163 | AlphaBeta | 190612T095620Z | Emigna |
| 198 | evil | 190613T021917Z | hyperneu |
| 064 | Width | 190612T225445Z | Stephen |
| 272 | Red | 190612T142520Z | Galen Iv |
| 943 | Deadfish~ | 190612T131216Z | a stone |
| 158 | MATL | 190612T085454Z | Sanchise |
Mornington Crescent, 20793 bytes
Take Northern Line to Euston
Take Victoria Line to Seven Sisters
Take Victoria Line to Euston
Take Victoria Line to Euston
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Cannon Street
Take District Line to Embankment
Take Northern Line to Euston
Take Victoria Line to Seven Sisters
Take Victoria Line to Euston
Take Victoria Line to Euston
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Cannon Street
Take District Line to Embankment
Take District Line to Embankment
Take District Line to Bank
Take District Line to Acton Town
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to Paddington
Take District Line to Notting Hill Gate
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Dagenham East
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Barons Court
Take District Line to Gunnersbury
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Gunnersbury
Take District Line to Mile End
Take District Line to Hammersmith
Take District Line to Mile End
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Southfields
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Hornchurch
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Elm Park
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to South Kensington
Take Piccadilly Line to Boston Manor
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Gunnersbury
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Gunnersbury
Take District Line to Mile End
Take District Line to Hammersmith
Take District Line to Mile End
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Notting Hill Gate
Take Central Line to Snaresbrook
Take Central Line to Notting Hill Gate
Take Central Line to Notting Hill Gate
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to South Kensington
Take Circle Line to Aldgate
Take Circle Line to South Kensington
Take Circle Line to South Kensington
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to South Kensington
Take Piccadilly Line to Ickenham
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Dagenham Heathway
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Embankment
Take District Line to Embankment
Take Northern Line to Charing Cross
Take Northern Line to Charing Cross
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Sloane Square
Take District Line to Gunnersbury
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Gunnersbury
Take District Line to Mile End
Take District Line to Hammersmith
Take District Line to Mile End
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Embankment
Take District Line to Embankment
Take Northern Line to Charing Cross
Take Northern Line to Charing Cross
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Bow Road
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Upney
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Tower Hill
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Embankment
Take Northern Line to Camden Town
Take Northern Line to Embankment
Take District Line to Embankment
Take District Line to Gunnersbury
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Gunnersbury
Take District Line to Mile End
Take District Line to Hammersmith
Take District Line to Mile End
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Embankment
Take Northern Line to Tooting Bec
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Embankment
Take Northern Line to High Barnet
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Embankment
Take Northern Line to Archway
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Embankment
Take Northern Line to Tooting Broadway
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Embankment
Take District Line to Embankment
Take Northern Line to Charing Cross
Take Northern Line to Charing Cross
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Embankment
Take Northern Line to South Wimbledon
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to South Kensington
Take Piccadilly Line to Covent Garden
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Gunnersbury
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Gunnersbury
Take District Line to Mile End
Take District Line to Hammersmith
Take District Line to Mile End
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Embankment
Take Northern Line to Hampstead
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to South Kensington
Take Piccadilly Line to Northfields
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Gunnersbury
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Gunnersbury
Take District Line to Mile End
Take District Line to Hammersmith
Take District Line to Mile End
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Stamford Brook
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to South Kensington
Take District Line to South Kensington
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to Hounslow Central
Take Piccadilly Line to South Kensington
Take Piccadilly Line to South Kensington
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Embankment
Take District Line to Embankment
Take Northern Line to Charing Cross
Take Northern Line to Charing Cross
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Paddington
Take District Line to Paddington
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Victoria
Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Victoria Line to Victoria
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Embankment
Take District Line to Embankment
Take Northern Line to Charing Cross
Take Northern Line to Charing Cross
Take Northern Line to Embankment
Take Northern Line to Embankment
Take District Line to Paddington
Take District Line to Embankment
Take District Line to Embankment
Take Northern Line to Mornington Crescent
That was an adventure! Brought back memories of living in London and riding the London Underground!
This was my first real Mornington Crescent program, so I'm sure there's room for golfing it some more!
Since the problem statement calls for alphabetical characters only, there are a few stations that would have been useful, that I couldn't visit, for example Chalfont & Latimer, which does multiplication. I had to make do with just addition from Upminster.
Also, some of the punctuation characters appear in station names (e.g. Earl's Court contains a single-quote), but I couldn't use that either for the same reason, so all punctuation marks had to be constructed from Unicode by visiting Charing Cross.
ibe, 141 bytes
(edit: I used the wrong command for output lol)
sluyslwwqslwqqslreslwwyslwqtslwqwslreslwwyslpislwqyslwqqslttslreslrpsluuslwwislwwuslreslwwuslwqtslpislwwuslrpslwwyslreslwqtslwqyslwwysltuslrp
I'm glad i made this language a while ago lol.
Vyxal, 112 bytes
kAhkHLnikhtnukWhkgTninukahkfuTikhtkTtnkekbhnuTdikWstnkWstkWhkahkWstkeunkWhkfuTiukekTyptWnuNIVunkiTdiVkekHLTCVuIj
This was created by hand and it's a mess that I won't explain.
Pip, 102 bytes
ndzshezsaidyutzthatxszhiswxPB AoADtYSTfYDQUWyRMsYyH U UoEoOPOAZkPB CxPBPOAZyRDQzsRDQzkRDQzCxRDQzPIRMXD
Explanation
Eagle-eyed readers will have noticed that the code begins with all the lowercase letters from the target string, plus a few others sprinkled in. We'll get back to that in a minute. For now, Pip treats them as no-ops, except the last one:
xPB AoADt
Ao ; ASCII code of "1" (49)
ADt ; Absolute difference with 10 (39)
xPB ; Push this result onto variable x (initially "")
This sets x to 39, the ASCII code of '. (Trick borrowed from Shaggy's Japt answer.)
YSTf
f ; The main function
ST ; Stringify
Y ; Yank into y variable
Stringifying the main function formats the code and wraps it in curly braces. This is the result:
"{n; d; z; s; h; e; z; s; a; i; d; y; u; t; z; t; h; a; t; x; s; z; h; i; s; w; x PB ((A o) AD t); YP (ST f); Y (DQ (UW (y RM s))); Y (y H ((U (U o)) E o)); O (PO AZ); (k PB (C x)) PB (PO AZ); (((y R (DQ z); s) R (DQ z); k) R (DQ z); (C x)) R (DQ z); (PI RM XD)}"
From here, we can extract the leading run of lowercase letters:
YDQUWyRMsYyH U UoEo
yRMs ; y with spaces removed
UW ; Unweave into two every-other-character strings
DQ ; Dequeue the last one, which has the letters in it
Y ; Yank that string into y
U Uo ; Increment o twice (was originally 1, now is 3)
Eo ; Take that value to the power of o (27)
yH ; Get that many characters from the start of y
Y ; Yank that string into y
Now y is "ndzshezsaidyutzthatxszhiswx".
OPOAZ
AZ ; Uppercase alphabet
PO ; Pop the first character ("A")
O ; Output it without a newline
Outputting the initial A separately is cheaper than making it part of the string.
kPB CxPBPOAZ
k ; Take k (initially ", ")
PB ; Push this onto it:
Cx ; Char(39) ("'")
PB ; Then push this onto it:
POAZ ; Pop the first character from AZ ("B")
Finally:
yRDQzsRDQzkRDQzCxRDQzPIRMXD
; z is preinitialized to the lowercase alphabet
yR ; In y, replace
DQz ; character dequeued from z ("z")
s ; with space
R ; Replace
DQz ; character dequeued from z ("y")
k ; with k (", 'B")
R ; Replace
DQz ; character dequeued from z ("x")
Cx ; with char(39) ("'")
R ; Replace
DQz ; character dequeued from z ("w")
; with:
PI ; Pi
XD ; with digits
RM ; removed (".")
This expression gives us the rest of our target string, which is autoprinted.
Actually, 2679 2618 2561 bytes
PPuPuPDDc uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuc buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuck D cHj
I'll golf each character one by one. So far I've golfed up to A.
Explanation
I'll golf pushing the numbers over time, so I'll only explain k D cHj for now.
k # Put all the characters into the list
D cH # Push the empty string
j # Join the list using the empty string
BRASCA, 213 bytes
DoluRlugoHoEoDuRxluxluxMgoldUxgollUxgoEoDuRxluxluxMgoholDUmxMgoHoduxduxgoEoEuxhuxgoDuxDuxgoluxluxhumxMgoluxluxDuxgoEoluxluxDuxgoldUxgoholuxluxDuxgoEuxhuxgoDuRxluxluxMgoEoldUxgolDUmxMgoDuRxluxluxMgoduxDuxgoEuxhuxgo
Explanation
At first I wanted to port the ><> answer, before realizing that stack length wont work with only alphabetical characters. That's when I remembered that BRASCA has some nifty things ><> does not have: The g and u operators!
Using the lLeEdDhHK built-ins for pushing numbers, u to seperate them into individual digits, R, m and M to rotate and shift the stack, x to discard digits, and then g to put them back together I can create and output any string using only the alphabet.
Breakdown
DoluRlugoHoEoDuRxluxluxMgoldUxgollUxgoEoDuRxluxluxMgoholDUmxMgoHoduxduxgoEoEuxhuxgoDuxDuxgoluxluxhumxMgoluxluxDuxgoEoluxluxDuxgoldUxgoholuxluxDuxgoEuxhuxgoDuRxluxluxMgoEoldUxgolDUmxMgoDuRxluxluxMgoduxDuxgoEuxhuxgo
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
A| Do
n| luRlugo
d| Ho
| Eo
s| DuRxluxluxMgo
h| ldUxgo
e| llUxgo
| Eo
s| DuRxluxluxMgo
a| ho
i| lDUmxMgo
d| Ho
,| duxduxgo
| Eo
'| Euxhuxgo
B| DuxDuxgo
u| luxluxhumxMgo
t| luxluxDuxgo
| Eo
t| luxluxDuxgo
h| ldUxgo
a| ho
t| luxluxDuxgo
'| Euxhuxgo
s| DuRxluxluxMgo
| Eo
h| ldUxgo
i| lDUmxMgo
s| DuRxluxluxMgo
.| duxDuxgo
'| Euxhuxgo
Husk, 408 bytes
mcJLQtDDQDsisNeJDDDDDisNeJDDDDDisNeJLDQQDDsisNeLtQtDDQDsisNLDDtDtDtDDDsisNJLtQDtDDDsisNeLtDDtDtDDDDsisNLttttQDtDDDsisNJLDDtDtDtDDDsisNeJLtDtDtDtDtDDDsisNeLtDDtDtDDDDsisNLQDtDDDsisNJDDDDDisNeDDiDsisNLtDDQDDsisNJLtDDQDDsisNeJLDDtDtDDDDsisNeJLDDtDtDDDDsisNeLtttPtDQDsisNDDDDDisNJLtDtDtDtDtDDDsisNeLtQDtDDDsisNLDDtDtDDDDsisNJLQDtDDDsisNeJDDDDDisNeLtDDtDtDDDDsisNLtQDtDDDsisNJLDtPDDsisNeLtDDtDtDDDDsisNLtDDQDDsisN
Well, that was an adventure.
The code was generated with this Python script. Not sure it's optimal, but it's good enough for me.
Explanation
So, limiting Husk to using only letters turned out to be a real pain... My first idea was to use s to convert a value to string, use t (drop first element) and D (double) to change the length of this string, then convert it to a number by computing its length with L: I could do this to generate the ASCII code of each character in the output string, and the convert them to characters with c.
That was complex enough for my tastes, but then I realized that all the builtins associated to letters in Husk are functions (which cannot be converted to string), except for N... which is the infinite list of natural numbers, good luck getting the length of that. Fortunately, i can take a string and return the first integer found in that string, which for N would be 1, so with sisN I can get my string of length 1 and I can manipulate that to get all other lengths.
I wrote a python script to bruteforce the shortest way to build strings of every needed length starting from sisN and using t, D, P (permutations, works like a factorial), and Q (substrings, works like n*(n+1)/2). I also realized that some values could be built more efficiently by working directly on numbers rather than strings, so isN is 1, DisN is 2, iDsisN is 11 (double the string "1" and read that as a number) and so on... those values were not too many, so I just hardcoded them as alternatives and kept for each the shortest between the hardcoded string and the bruteforced one.
Only after I did all that I realized that I didn't have a way to combine different characters into an output string. Strings are just lists of characters, and e can build a list of two arguments, but to build longer lists I would need :...
This time I was saved by J, join, which (among other things) can take a value and a list and insert that value between each pair in the list. If I want to concatenate three strings a b c I can do it with Jbeac. The script does this recursively starting from the desired output by choosing b as a single central element and a and c as the two halves separated by b. This was my first attempt an miraculously it worked (if the length of the string was different I could have to join only two strings together, but this doesn't happen here). I have tried other ways to compose the string, but this remains the shortest working result I could produce.
CJam, 162 bytes
KFmfbcACZbbcDsXbcSFseesicHsXbcEsXbcSFseesicAsXbcIsXbcDsXbcDFmfbcSHAmfbcBsXbceuHseesicGseesicSGseesicHsXbcAsXbcGseesicHAmfbcFseesicSHsXbcIsXbcFseesicSciBbIbcHAmfbc
Each letter is outputted individually and all the source codes are concatenated. The individual codes are:
(1 byte)
S e# Space
' (6 bytes)
HAmfbc
HA e# Push 17 and 10 17 10
mf e# Factorization 17 [2 5]
b e# Base conversion 39
c e# Convert to char ''
, (6 bytes)
DFmfbc
DF e# Push 13 and 15 13 15
mf e# Factorization 13 [3 5]
b e# Base conversion 44
c e# Convert to char ',
. (8 bytes)
SciBbIbc
Sci e# Push space as an integer 32
Bb e# Convert to base 11 [2 10]
Ib e# Convert from base 18 44
c e# Convert to char '.
A (6 bytes)
KFmfbc
KF e# Push 20 and 15 20 15
mf e# Factorization 20 [3 5]
b e# Base conversion 65
c e# Convert to char 'A
B (7 bytes)
BsXbceu
Bs e# Push 11 as a string "11" (i.e. [49 49])
Xb e# Convert from base 1 98
c e# Convert to char 'b
eu e# Uppercase 'B
a (5 bytes)
AsXbc
As e# Push 10 as a string "10" (i.e. [49 48])
Xb e# Convert from base 1 97
c e# Convert to char 'a
The codes for d, e, h and i work exactly the same way as for a. The codes are:
DsXbc -> 'd
EsXbc -> 'e
HsXbc -> 'h
IsXbc -> 'i
n (6 bytes)
ACZbbc
ACZ e# Push 10, 12 and 3 10 12 3
b e# Base conversion 10 [1 1 0]
b e# Base conversion 110
c e# Convert to char 'n
s (7 bytes)
Fseesic
Fs e# Push 15 as a string "15"
ee e# Enumerate [[0 '1] [1 '5]]
s e# Convert to string "0115"
ic e# Convert to char 's
The codes for t and u do the same thing but staring with G(16) and H(17):
Gseesic -> 't
Hseesic -> 'u
Most of these codes were found using another Cjam program to brute force all possible outputs for a given formula. If you want to use it, type some formula such as RTsbc, and it will show you how to get to each possible output by replacing R, T and U in the input by some 1 byte constant.
05AB1E, 145 121 109 bytes
TnVYTOUXZxNJTZXTZZZXYTYxMNYTTMNNNYRYNNYNNNNYTXZMNNYxXRZZZXTYXRZZXZYxTRMRNXRMRMXNNYxYMRNTYxTRYNTZMYXRXXXTZJCXB
80186 machine code + DOS, 91 bytes
Text version:
hm j j PPjzjzjgaAAA JSJJ RU Sq ReAA JdJJJ RfiJElK JEiS GtI And she said But that s his
Text version, with tabs (code 9) replaced by 9 and spaces (code 32) replaced by *:
hm9j9j9PPjzjzjgaAAA9JSJJ9RU9Sq9ReAA9JdJJJ9RfiJElK9JEiS*GtI*And*she*said***But*that*s*his***
Hexdump:
68 6D 09 6A 09 6A 09 50 50 6A 7A 6A 7A 6A 67 61
41 41 41 09 4A 53 4A 4A 09 52 55 09 53 71 09 52
65 41 41 09 4A 64 4A 4A 4A 09 52 66 69 4A 45 6C
4B 09 4A 45 69 53 20 47 74 49 20 41 6E 64 20 73
68 65 20 73 61 69 64 20 20 20 42 75 74 20 74 68
61 74 20 73 20 68 69 73 20 20 20
The machine code appears in a file with extension .com. When I run it, it prints the required message and then hangs (executing random data).
High-level explanation on what it does:
- Initializes registers with constant values
- Replaces spaces in the message by the required special symbols (
,'.$) - Patches the code to generate the
int 21instruction, which prints the message - Calls DOS
Assembly code (can be compiled with tasm):
my_bp equ 7ah
my_si equ 7ah
my_di equ 67h
my_msg equ 13bh
.model tiny
.code
.startup
.186
org 100h
push 96dh ; ax (ah = 0; al = don't care, but see below)
push 9 ; cx
push 9 ; dx
push ax ; bx = don't care
push ax ; don't care
push my_bp
push my_si
push my_di
popa
inc cx
inc cx
inc cx
or [bp+si+my_msg-my_bp-my_si+12], cx ; ,
dec dx
dec dx
or [bp+si+my_msg-my_bp-my_si+14], dx ; '
or [bp+di+my_msg-my_bp-my_di+23], dx ; '
or [bp+si+my_msg-my_bp-my_si+30], dx ; '
inc cx
inc cx
or [bp+si+my_msg-my_bp-my_si+29], cx ; .
dec dx
dec dx
dec dx
or [bp+si+my_msg-my_bp-my_si+31], dx ; $
; 0x2049 * 0x4b6c = 0x98301cc
; So this sets cx to 1cc (a temporary constant used to patch code)
imul cx, [bp+si+my_msg-my_bp-my_si-2], 4b6ch
; 0x1cc | 0x2049 = 0x21cd (the instruction which calls DOS int 21)
; Here ah = 9 ("print" mode)
or [bp+si+my_msg-my_bp-my_si-2], cx
; At address 101, there is the constant 96d, which was loaded into ax
; 0x96d * 0x7447 = 0x448013b
; So the following sets dx to 13b (adddress of the message)
imul dx, [bp+di+101h-my_bp-my_di], 7447h
int21:
dw 2049h
db 'And she said But that s his '
end
It uses the popa instruction to pop all registers, because regular pop cannot fill all needed registers (e.g. pop di is a forbidden opcode).
Addresses of bytes to patch are in the range 0x100...0x160. By luck, they can be represented as a sum of 3 bytes with allowed values:
- 0x7a in
bp - 0x7a or 0x67 in
siordi - Immediate value
Patching of bytes in the message works by doing logical OR on 0x20 (space character) and a small constant (4, 7, 12 or 14). The small constant is obtained by initializing cx and dx to 9 (tab character) and doing INC or DEC as needed.
Patching of code uses the IMUL instruction. I found the needed 16-bit constants to multiply using brute-force search.
Finally, the address of the message (0x13b) is obtained by multiplication. To save space, I took one of the constants from one of the instructions, which contains an immediate value 0x96d. Here the 9 part chooses a DOS print function, and the 6d part is a free parameter. It turns out that 6d is the only possibility which can give 0x13b after multiplication.
Disassembly of the code part:
06BA:0100 686D09 PUSH 096D
06BA:0103 6A09 PUSH +09
06BA:0105 6A09 PUSH +09
06BA:0107 50 PUSH AX
06BA:0108 50 PUSH AX
06BA:0109 6A7A PUSH +7A
06BA:010B 6A7A PUSH +7A
06BA:010D 6A67 PUSH +67
06BA:010F 61 POPA
06BA:0110 41 INC CX
06BA:0111 41 INC CX
06BA:0112 41 INC CX
06BA:0113 094A53 OR [BP+SI+53],CX
06BA:0116 4A DEC DX
06BA:0117 4A DEC DX
06BA:0118 095255 OR [BP+SI+55],DX
06BA:011B 095371 OR [BP+DI+71],DX
06BA:011E 095265 OR [BP+SI+65],DX
06BA:0121 41 INC CX
06BA:0122 41 INC CX
06BA:0123 094A64 OR [BP+SI+64],CX
06BA:0126 4A DEC DX
06BA:0127 4A DEC DX
06BA:0128 4A DEC DX
06BA:0129 095266 OR [BP+SI+66],DX
06BA:012C 694A456C4B IMUL CX,[BP+SI+45],4B6C
06BA:0131 094A45 OR [BP+SI+45],CX
06BA:0134 6953204774 IMUL DX,[BP+DI+20],7447
06BA:0139 CD21 INT 21 (after the code patches itself)
Fun fact: Normally, I would use offset message instead of the hard-coded 13bh, but in this case, because at the time of parsing its address is unknown, tasm generates 16-bit immediate offset, wasting 1 code byte:
06BA:0131 098A4600 OR [BP+SI+0046],CX
Befunge-98 (FBBI), 125 124 121 bytes
wab
And she said But that s his
wakekekaayyeapwayyaayybyapayybyapcyabcyaayycayyba
a
b
wayapapoq
Try it online!
Outputs to a file named \n (a single newline). Thanks to Jo King for his script.
Output includes 10 trailing newlines.
For only one trailing newline, +1 byte by changing the following line:
wakekekaayyeapwayydayybyapayybyapycyabcyaayycayyba
Explanation:
The instruction pointer moves as follows:
The program puts the non-alphabetic characters into position, before outputting that line to a file.
Befunge-98 includes instructions a...f, which push their corresponding hexadecimal value to the stack. To generate other numbers, it passes those values to y ("Get SysInfo") as arguments to obtain:
10 y-position
11 x-position
12 y-velocity (= 0)
13 x-velocity (= 1)
23* stack size
By placing the bulk of the code at y=23, ayy can be used for repeated access to the stack size, which is then used to generate character codes.
16-bit x86 assembly code, 665 bytes
(the binary is alphabetic, not the source)I somehow forgot about the rule allowing whitespace. Surely the code can be golfed as a result.
Bytecode:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXsBFVKZPFFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPFPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXkLAFQQZJJJRkDCGPLXDPDJRkDBEPZJJRLZDRDZAAAQPLYDQDYXXDQhishZhDRDhZsDQDhaththRDhuthZBDQDRhidhsaRDhhehZsDRDhndhZADTZPiDEFY
Source:
db 63 dup (58h) ;pop ax
jnb label1
dw 5646h ;magic #1
dw 5a4bh ;magic #2
dw 4650h ;magic #3
dw (42h-6)/2 dup ("PF")
label1:
db 416 dup (58h) ;more pop ax
imul cx,[si+41h],46h ;cl=24h (string sentinel)
push cx ;push string sentinel
push cx
pop dx ;dl=24h
dec dx
dec dx
dec dx ;dl=21h
push dx ;save for later
imul ax,[si+43h],47h ;al=0CDh
push ax ;push xxCDh
dec sp ;insert xx
pop ax ;ah=0CDh
inc sp ;discard xx
push ax ;push 0CDxx
inc sp ;discard xx
dec dx ;cl=20h (space)
push dx
imul ax,[si+42h],45h ;al=2Eh (dot)
push ax
pop dx ;dl=2Eh
dec dx
dec dx ;dl=2Ch (comma)
push dx ;push xx2Ch
dec sp ;insert xx
pop dx ;dl=2Ch
inc sp ;discard xx
push dx ;push 2Cxxh
inc sp ;discard xx
pop dx ;dx=202Ch
inc cx
inc cx
inc cx ;cl=27h (quote)
push cx ;push xx27h
push ax ;push xx2Eh
dec sp ;insert xx
pop cx ;ch=2Eh
inc sp ;discard xx
push cx ;push 2Exxh
inc sp ;discard xx
pop cx ;cx=272Eh
pop ax ;discard xxxx
pop ax ;ax=0CD21h
inc sp ;discard xx
push cx ;push ".'"
push 7369h ;push "is"
push 685ah ;push "h"+xx
inc sp ;discard xx
push dx ;" "+xx
inc sp ;discard xx
push 735ah ;push "s"+xx
inc sp ;discard xx
push cx ;push "'"+xx
inc sp ;discard xx
push 7461h ;push "at"
push 6874h ;push "th"
push dx ;push " "+xx
inc sp ;discard xx
push 7475h ;push "ut"
push 425ah ;push "B"+xx
inc sp ;discard xx
push cx ;push "'"+xx
inc sp ;discard xx
push dx ;push ", "+xx
push 6469h ;push "id"
push 6173h ;push "sa"
push dx ;push " "+xx
inc sp ;discard xx
push 6568h ;push "he"
push 735ah ;push "s"+xx
inc sp ;discard xx
push dx ;push " "+xx
inc sp ;discard xx
push 646eh ;push "nd"
push 415ah ;push "A"+xx
inc sp ;discard xx
push sp
pop dx ;dx=sp
push ax
imul ax,[si+45h],5946h ;ah=09h
It works this way:
moves the stack pointer to the end of the code, via POP AX (can't POP SP because it's not alphabetic);
constructs the instruction to dispatch a DOS call (algorithmically because it's not alphabetic);
constructs the non-alphabetic characters;
places the string on the stack;
places the dispatch instruction on the stack at the exact end of the code, so that execution flows directly to that instruction;
constructs the instruction to print a string;
displays the string and them promptly crashes. :-/ (A graceful exit would require more code)
8086 Assembly on IBM PC, 1463 845 664 bytes
Clarification: The actual assembly language source is the entry, not the generated machine code.
The difficulty is that most x86 instructions (like ADD, SUB, JMP, conditional jumps, memory access) have two arguments and thus need a comma, or need a memory address. So, we can't use addition, subtraction, ifs, or loops!
During my first attempt I was able to "construct" numbers using a combination of increment, decrement, multiplication, division, byte-tricks, and the obscure BCD instructions (like AAA, DAS). After that, I realised that this idea could be used to create self-inspecting and self-modifying code.
Attempt 1. (1463 bytes)
Used the available instructions to construct ASCII codes and the 0xb800 address of the screen buffer. The calculation of each character in the sequence was golfed by hand.
Attempt 2. (not complete)
Realised that there is an opcode for every integer in the range 0x40-0x5f. This range includes A-Z. So for example INC CX corresponds to 0x41 = 'A'. (This opcode table is very handy.)
I attempted to construct 3 "data" strings, and layer them on top of one another. The first as-is (uppercase), the second "shifted" into the 0x60-0x7f zone (lowercase) and the last "shifted" into the 0x20-0x3f zone (punctuation).
Self-modifying code would produce a loop or three to iterate over the data.
Attempt 3. (845 bytes)
Like previous approach but to cut down on data, the string would only be encoded once, with "control characters" mixed in to switch character sets.
Attempt 4. (664 bytes)
How to get rid of the control characters which require a whole lot of patched instructions to deal with branching? Given that only two uppercase letters are used, I wondered whether I could "flip" the opcode table to encode lowercase letters using the 0x40-0x4f range and punctuation using the 0x90-0x9f range (by subtracting from 0xc0). The "A" and "B" could get put in separately.
However only half the opcodes in the 0x90-0x9f range are usable and they didn't line up with the needed ones. Then I thought maybe I could shuffle them around using a XOR, and I found one that worked. And here it is.
Golfed:
REP LODSB
PUSH CX
PUSH CX
POP AX
INC CH
PUSH CX
POP DI
DEC AX
DEC AX
REPNE SCASB
REPNE SCASB
PUSH DI
REPNE SCASB
PUSH DI
REPNE SCASB
PUSH DI
POP SI
POP DI
DEC DI
LODSB
NOT AL
STOSB
POP CX
DEC CH
LODSB
NOT AL
STOSB
LODSB
AAA
STOSB
INC DI
LODSB
NEG AL
STOSB
LODSB
NOT AL
PUSH AX
PUSH AX
INC SP
POP ES
INC SP
POP DI
LODSB
NOT AL
PUSH AX
POP BX
NEG AL
STOSB
INC DI
LODSB
DEC AL
NEG AL
DIV BH
PUSH AX
POP DI
LODSB
STOSB
RET
DEC BL
PUSH CS
STOSB
PUSH DS
INC DI
INC AX
POP SI
PUSH SP
NOP
INC BP
POP AX
PUSH DI
NOP
INC BP
PUSH BX
POP BX
PUSH SP
PUSHF
NOP
CWD
PUSH DX
INC DI
INC SP
NOP
INC SP
POP AX
PUSH BX
INC SP
CWD
INC BP
NOP
POP AX
POP BX
INC BP
SAHF
CWD
SCASB
INC DX
Assemble with
nasm golf.asm -o golf.com
and run in DOSBOX (run CLS first). Looks like this:
Commented:
; ASSUME DS = ES = CS
; ASSUME IP = 0x0100
; true for .COM file
; We treat 0xFE as a special marker that we scan for
; This marks our patch zone and the start of our data
; We also use it as a cheap trick to get a constant 0x1f
; into CX
; 0xFE is the first byte of INC or DEC instructions
; that operate on half-word registers (AL, BL, CH etc.)
; WATCH OUT! Adding these breaks the scan
; Can't assume any register contains zero
; so use this trick to zero out CX
REP LODSB
PUSH CX ; needed later
; zero AX
PUSH CX
POP AX
INC CH
PUSH CX
POP DI ; 0x100, where our code starts
DEC AX
DEC AX ; AL = 0xFE, our marker (AH = 0xFF)
REPNE SCASB ; skip the INC CH above
REPNE SCASB ; find the DEC CH located at 0x10E
; we will later need 0xF, the char count minus the 'A'
PUSH DI ; DI = 0x10F
REPNE SCASB ; find the patch position
PUSH DI
REPNE SCASB ; find the next 0xfe; our data section
PUSH DI
POP SI ; load data from here
POP DI ; store data to the patch position
DEC DI
; patch in XOR
; XOR is 0x34, start with 0xCB
; second byte of DEC BL is 0xCB
LODSB
NOT AL
STOSB
POP CX ; get 0x0f in CX for our strlen
DEC CH
; patch in our XOR arg
; it is 0xF1 (take 0x0E and NOT it)
LODSB ; 0x0E (PUSH CS)
NOT AL
STOSB
; ADD is 0x00 (take 0xAA, apply weird AAA behaviour)
; this also zeroes AH
LODSB ; 0xAA (STOSB)
AAA
STOSB
INC DI ; skip next instruction byte
; LOOP is 0xE2
LODSB ; 0x1E PUSH DS
NEG AL
STOSB
; get b800 in ES (address of screen buffer)
; first get 0x47 in AL (INC DI)
LODSB ; get 0x47 (INC DI)
NOT AL ; NOT 0x47 = 0xb8
; AX = 0x00b8 (bytes backwards)
PUSH AX
PUSH AX
; stack contains 0xb8 0x00 0xb8 0x00
; stack off-by-1 trick
INC SP
; now POP gives you 0xb800
POP ES
INC SP ;and clean up after ourselves
; store 0 in DI ***** PUSHED AT START OF PROGRAM ***
POP DI
LODSB ; get our magic 0xC0 (0x40 INC AX)
NOT AL
PUSH AX
POP BX
NEG AL ; NOT and +1 to get 0x41 ("A")
; charloop:
STOSB
INC DI
LODSB
DEC AL ; XOR
NEG AL ; modify this into an ADD AL, BL
DIV BH ; modify this to LOOP back to charloop
; doesn't print the last character
; but the last character turns into the address where 'B'
; is supposed to go
PUSH AX
POP DI
LODSB ; "B"
STOSB
; graceful exit this time ;)
RET
; *** DATA SECTION ***
; PURPOSE
DEC BL ; 0xFE marks data section, 0xCB for XOR
PUSH CS ; for XOR arg
STOSB ; for ADD
PUSH DS ; for LOOP
INC DI ; 0x47 -> for 0xb800
INC AX ; for magic number but also "A"
POP SI ;n
PUSH SP ;d
NOP ;
INC BP ;s
POP AX ;h
PUSH DI ;e
NOP ;
INC BP ;s
PUSH BX ;a
POP BX ;i
PUSH SP ;d
PUSHF ;,
NOP ;
CWD ;'
PUSH DX ;B
INC DI ;u
INC SP ;t
NOP ;
INC SP ;t
POP AX ;h
PUSH BX ;a
INC SP ;t
CWD ;'
INC BP ;s
NOP ;
POP AX ;h
POP BX ;i
INC BP ;s
SAHF ;.
CWD ;'
SCASB ; treated as char but turns into screen address!
INC DX ; "B"
><>, 233 122 bytes
cdacaabbglccgpcbfbbcaacdebbafbebbcebdbealbcpcdbcccdlcdpacbbalccpaalacpbcfafbaab
g sandBe
o Aviuth
This started as a golf of mbomb's answer, but I discovered a fundamental shift that saves a huge number of bytes, so I'm posting it as my own answer.
Generating non-alphabetic characters to output is done by repeatedly pushing values to the stack, then using l to push the stack length. However, this does not need to be output immediately: using p, this character can be placed in any cell whose coordinates are both between 10 and 15 inclusive, to be retrieved later with g. Similarly, alphabetic characters can be placed in the initial source code and read this way: since the highest non-alphabetic character code in the input is 46 (.), this means the stack does not need to be pushed higher than the 62 needed to store all 31 characters of the output.
Additionally, a v is placed in the code at column 7. When the instruction pointer wraps around and hits that v, the sequence go is executed repeatedly to read from the pushed coordinates and output the corresponding characters. Eventually, the stack becomes empty, and g terminates the program with an error.
The first 7 bytes of code are reused as both the first 7 and last 7 coordinates pushed. Placing the v in column 9 would have theoretically saved two more bytes, but would have forced the characters Ainsv into a 2x2 square in the code, which is impossible. An earlier version used column 15, but that required an extra line in the source code and ended up six bytes longer.
80186+ machine code, MS-DOS .COM format, 822 787 bytes
Only tabs and spaces are used in addition to letters. Given that most of the opcodes in the allowed range are certain increments, decrements, pushes, pops, and register-indirect ANDs and ORs, in addition to IMUL, I make use of the fact that the stack register wraps around when it hits the end of the segment to modify the code in reverse! 80186+ assembly is required because I am pushing immediate values.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXjhX GXkOXYIQSX GXjdX GXkOXwIIIIIIIIIQhhihs kOXeQh ihutSXH GXHHHHHH GXSX GYkOXDAAAQSX GXjGX GXkOXtQhidhsahe hshhd hAnSX GXjTX GXkOXdIIIQkOXgAQSX GXHHHHHHHHHHHHHHHHHHHHH GXSX GYkOXbAAAAAAAAAAAAAAQhhlh Xhh qM
Annotated source (TASM format):
IDEAL
P186
MODEL TINY
CODESEG
ORG 100H
MAIN:
REPT 582
POP AX ; Set up stack to end of string
ENDM
PUSH 68H
POP AX
OR [BX+58H],AX
IMUL CX,[BX+58H],59H ; 68H*59H=2428H
DEC CX ; -1=2427H
PUSH CX
PUSH BX
POP AX
AND [BX+58H],AL
PUSH 64H
POP AX
OR [BX+58H],AX
IMUL CX,[BX+58H],77H ; 64H*77H=2E7CH
REPT 9
DEC CX ; -9=2E73H
ENDM
PUSH CX
PUSH 6968H
PUSH 2073H
IMUL CX,[BX+58H],65H ; 64H*65H=2774H
PUSH CX
PUSH 6920H
PUSH 7475H
PUSH BX
POP AX
DEC AX
OR [BX+58H],AX ; FFFFH
REPT 6
DEC AX
ENDM
AND [BX+58H],AL ; FFF9H
PUSH BX
POP AX
AND [BX+59H],AL ; 00F9H
IMUL CX,[BX+58H],44H ; 0F9H*44H=4224H
REPT 3
INC CX ; +3=4227H
ENDM
PUSH CX
PUSH BX
POP AX
AND [BX+58H],AL
PUSH 47H
POP AX
OR [BX+58H],AX
IMUL CX,[BX+58H],74H ; 47H*74H=202CH
PUSH CX
PUSH 6469H
PUSH 6173H
PUSH 2065H
PUSH 6873H
PUSH 2064H
PUSH 6E41H
;; CODE STARTS:
;; PUSH 0909H
;; POP AX
;; PUSH 046CH
;; POP DX
;; INT 21H
;; INT 20H
PUSH BX
POP AX
AND [BX+58H],AL
PUSH 54H
POP AX
OR [BX+58H],AX
IMUL CX,[BX+58H],64H ; 54H*64H=20D0H
REPT 3
DEC CX ; -3=20CDH
ENDM
PUSH CX
IMUL CX,[BX+58H],67H ; 54H*67H=21CCH
INC CX ; 21CDH
PUSH CX
PUSH BX
POP AX
AND [BX+58H],AL
REPT 21
DEC AX
ENDM
OR [BX+58H],AX ; 0FFEBH
PUSH BX
POP AX
AND [BX+59H],AL ; 0EBH
IMUL CX,[BX+58H],62H ; 0EBH*62H=59F6H
REPT 14
INC CX ; +14=5A04H
ENDM
PUSH CX
PUSH 6C68H
PUSH 5809H
PUSH 0968H
JNO $+4FH
END MAIN
ENDS
Japt, 87 bytes
Bs g caA
HzG
Ts caV
iWisiiihiSisiUitiaihitiSitiuibu iUiSiWcaV idiiiaisiSieihisiSidiniau
Explanation
The first line generates the ' and assigns it to variable U.
Bs g caA
B :11
s :To string
g :First character
c :Character code
a : Absolute difference with
A : 10
The second line assigns 2 to variable V.
HzG
H :32
z :Floor divided by
G :16
The third line generates the . and assigns it to variable W.
Ts caV
Ts :Convert 0 to a string
caV :Absolute difference of its charcode with V (2)
The last line, then, builds the string one character at a time in reverse.
iW...ibu ...iWcaV ...iau
iW :Start by prepending W (.) to U (')
... :Each i prepends the literal character that follows it to the string, with S being space and U being "'"
ibu :As B is the constant for 11 and it can't be quoted, here i prepends "b" to the string and u uppercases it
... :As above, each i is prepending the character/constant that follows it to the string
iWcaV :Gets the absolute difference of the charcode of W (.) and V (2) to get the "," and prepends that
... :Some more literals
iau :And, finally, the same trick is used for the "A" as was for the "B", as A is the constant for 10
><>, 916 915 903 bytes
At first I thought a solution in ><> was impossible, but then I realized... who needs conditionals or logic control? :D
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffloffffffffffffffffffffffffffffffffffffffffffffflopppgloppppppppppppppppppppppggloffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffflopppggloploppppppppppppppppppppppploffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffflopppppplofffffffflopggloppppppppppppppppppgglopppplofffffffloffffffffffffffffffffffffffflofffffffffffffffffffffffffffffffffffffffffffffffffffloglopppppppppppppppppppppppppppplofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffflopppploppgloffffffffffffffffffflopppppppppppppppppppppppppgglofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffflopppppppppppppppppppppppppppgglofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffflofloffffffffffloppppppppppppppppppppppploppgloio
I repeatedly push numbers (the number 15) to the stack, then push the length of the stack and print the character with that ASCII value. If I need to shrink the length of the stack, I shrink the stack three values at a time using p, or one at a time using g if I'm within three of the target. The program ends by calling i (input), which pushes a -1 since there's no input, then prints it to cause an error.
This is the Python 3 program I used to create the solution once I'd thought of how to do it:
s = "And she said, 'But that's his.'"
L = [0]+[ord(c) for c in s]
#print(L)
M = L[1:]+[0]
D = [x[1]-x[0] for x in zip(L,M)]
#print(D)
while D:
n=D.pop(0)
if not D:print('io',end='');exit()
if n>0:print('f'*n,end='lo')
else:
while n<-2:print('p',end='');n+=3
print('g'*-n,end='lo')
Ruby, 420 354 338 bytes
def P a
print String a
end
def Q a
p String a
end
class String
def inspect
putc sum size
q
end
end
def w
Q def hacked
end
rescue
end
P def And
end
w
P def she
end
w
P def said
end
Q def gadget
end rescue
w
def a
Q def afraid
end
rescue
end
a
P def But
end
w
P def that
end
a
putc String def s
end
w
P def his
end
Q def fierce
end rescue
a
In ascending order of jankiness:
Words starting with a capital letter can be printed by defining a class with that name and calling display within the class definition body.
Other words can be displayed by defining methods with that name, which returns a Symbol, then casting that to a String to remove the leading colon.
Other characters can be displayed by calling putc on their ASCII code. We can generate the appropriate numbers by reusing the String def trick to get a string, then taking the sum of its bytes using a modulus determined by its size. Unfortunately, we don't have any way to call methods on an object other than from within the class definition of that object, which makes it difficult to pass in arguments. So the final hack is to redefine String#inspect, which gets called implicitly when passing a String in to the p method, so that it calculates and outputs the appropriate character as a side effect, before raising an error so that p can't actually finish executing and print a newline. Then we need to rescue the error in the main code.
Edit: Jordan made the byte count much less, ahem, high with some clever control flow golfing, and I've cut a few more bytes by replacing raise with a one-letter nonexistent method call, which raises a NameError.
Edit 2: Noticed that with print String extracted into a method, it's cheaper to just use that with a method definition than to use the class definition trick, since methods are allowed to be title cased.
dc, 240 222 209 bytes
OOOOOziOOOOOOOOOOOOOOOOOOOOOOOOOOOzddddddzkdddzasBdzasAdzscdzdasCzsdOOlAxlAxPOBlBxdIlAxoPAdlBxddsrIlAxssPPOPlsIZlCxddspPOZlCxPPOPlrdZlCxPlsPlrPlcPPKPdZlBxdZlAxPOAZlAxdPIZlCxdPrPdPlpPlrdZlCxPPKPOPPlpPlsPOPldPKP
My first thought was the same as @seshoumara, just push enough stuff onto the stack to generate all of the characters' ASCII values. Then it occurred to me that since +, -, and * are single-character operators, I can just recreate them and have the ability to use arithmetic! Surely that would be smaller! And, I wouldn't be surprised if I'm able to golf off any more bytes, but for now... this convoluted approach has managed to tie the naïve(ish) one.
OOOOOziOOOOOOOOOOOOOOOOOOOOOOOOOOOzddddddzkdddzasBdzasAdzscdzdasCzsd is the part of the approach that's similar to @seshoumara's, but we only go up to 46, which is .. We do this because we need to go up to 45, -, and we also need a period in our string, so just going one further for the period is (I think) cheapest. Along the way, we store some values: 5, 32, 39 all come in handy later. 5 for utilitarian things, 32 and 39 for their ASCII values. Originally I did 1-5, but that was expensive, and I was able to simply avoid using 4; use Z (pop a value, push the number of digits it has) on a three-, two-, or one-digit number for those values. At 42, 43, and 45, we convert these to strings (*, +, and - respectively) and store them as macros (B, A, and C respectively). This means that without using the characters *+-, we can now use those operators.
From here we basically start generating the ASCII values using the power of math instead of sheer accumulation, storing some of the repeats along the way. 100, 105 and 115 come up enough that storing them (in registers or otherwise) made sense. Originally, I left the stack filled with 10s and used these to make 100s; it ended up saving bytes to fill the stack with 32s and use those as spaces later on. A slightly more readable version of the ASCII section: OOlAxlAxP OBlBxdIlAxoP AdlBxddsrIlAxssP P OP lsIZlCxddspP OZlCxP P OP lrdZlCxP lsP lrP lcP P KP dZlBxdZlAxP OAZlAxdP IZlCxdP rPdP lpP lrdZlCxP P KP OP P lpP lsP OP ldP KP.
Shaved off 18 bytes by: storing the number 5 as the input radix instead of a register; the number 32 as precision instead of a register; the number 115 as output radix instead of a register; then had to change KZ to IZ to generate 1s and OZ to KZ to generate 2s.
Shaved off 13 more bytes by flooding the stack with 32s; setting precision to 39; using stack manipulation to avoid storing 116; cutting out some double-work I accidentally left in.
Perl 5, 133 102 95 bytes
s qqAnd she saidZ ZBut thatZs hisZZGjGGfq x
s qZqchr oct oct oct ord chopqge x
y qGjfqqdx
print
Explanation:
Regexes, print, and chop all apply to the variable $_ by default.
s qqAnd she saidZ ZBut thatZs hisZZGjGGfq
Replaces the empty string with And she saidZ ZBut thatZs hisZZGjGGf.
s qZqchr oct oct oct ord chopqge
Replaces each Z with the result of evaling chr oct oct oct ord chop. This removes the last character of $_, takes its keycode, interprets it as octal thrice, and converts it back to a character. For example, j → 106 → 70 → 56 → 46 → ..
Due to the way replacement works, the modifications to $_ that happen while evaluating the replacement are lost, so $_ is now And she said, 'But that's his.'GjGGf.
y qGjfqqd
Deletes all G, j, and f in $_.
CJam, 262 bytes
KAbScibCmhc CZbsic GmQYbsic
S CmfYmeibc ImqmeKmhcel AZbAbc
S CmfYmeibc KAbScibCmhcel ImqmeKmhAmhcel GmQYbsic KAZbYbbBbc
S CGmQbDbc EYbTYtZbc FYbGmQbcel EYbGmQbcel
S EYbGmQbcel ImqmeKmhcel KAbScibCmhcel EYbGmQbcel CGmQbDbc CmfYmeibc
S ImqmeKmhcel ImqmeKmhAmhcel CmfYmeibc PYmhmeKmhc CGmQbDbc
Try it online! Newlines are only shown here for clarity; each line represents a character.
Whew, this was fun. Restricting ourselves to alphabetic commands poses some interesting challenges:
- Without
{and}, there's virtually no opportunity for control flow (exceptf, which I didn't find an opportunity to use). - Without
\,_,;, or$, we have no means for stack manipulation.
This means that the main goal is going to be getting the relevant code points on the stack and then converting them to characters with c.
The problem is that we also lack most basic arithmetic commands, as well as integer literals. This is fine though, as the m namespace contains numerous advanced mathematical operations, and there are many variables predefined to useful numbers.
I ended up making heavy use of square roots (mQ and mq), the exponential function me, and base conversion (b), which can also be used to emulate multiplication ([X 0] Yb computes X*Y). In addition, sometimes it is easier to construct the uppercase codepoint, in which case we can use el (convert to lowercase) on the resulting character.
I'm still not satisfied with some of the longer ones. Oh well.
Explanation
This is a character-by-character explanation of the output. Before I start, here are a few short ways to make numbers:
- 0, 1, 2, 3 are contained in variables
T,X,Y,Zrespectively. - Numbers 10 through 20 are contained in variables
AthroughK. - 32 can be made using
Sci(Spushes a string containing a space,cgets the first character of this string, andiconverts that character to its code point).Sis also used for spaces. - 4 is given by
GmQ(integer square root of 16). - 5 is given by
AZbYb(convert 10 to base 3, yielding[1 0 1], and convert the resulting array of numbers to base 2, yielding 5). - 7 is given by
Ymei(compute exp(2) and convert to integer).
A
K - push 20 | 20
Ab - convert to base 10 | [2 0]
Scib - convert from base 32 | 64
Cmh - hypot(TOS, 12) | 65.115
c - round down and convert to char | 'A
n
C - push 12 | 12
Zb - convert to base 3 | [1 1 0]
s - convert to string | "110"
i - convert to integer | 110
c - convert to char | 'n
d
GmQ - push 4 | 4
Yb - convert to base 2 | [1 0 0]
s - convert to string | "100"
i - convert to integer | 100
c - convert to char | 'd
s
C - push 12 | 12
mf - factors | [2 2 3]
Ymeib - base 7 | 115
c - convert to char | 's
h
I - push 18 | 18
mq - sqrt | 4.242
me - exp | 69.591
Kmh - hypot(TOS, 20) | 72.408
c - round down and convert to char | 'H
el - lowercase | 'h
e
A - push 10 | 10
Zb - convert to base 3 | [1 0 1]
Ab - convert from base 10 | 101
c - convert to char | 'c
a
KAbScibCmhc - push 'A (see above) | 'A
el - lowercase | 'a
i
I - push 18 | 18
mq - square root | 4.242
me - exp | 69.591
Kmh - hypot(TOS, 20) | 72.408
Amh - hypot(TOS, 10) | 73.095
c - convert to char | 'I
el - lowercase | 'i
,
K - push 20 | 20
AZbYbb - convert to base 5 | [4 0]
Bb - convert from base 11 | 44
c - convert to char | ',
'
C - push 12 | 12
GmQb - convert to base 4 | [3 0]
Db - convert from base 13 | 39
c - convert to char | ''
B
E - push 14 | 14
Yb - convert to base 2 | [1 1 1 0]
TYt - replace elem 0 with 2 | [2 1 1 0]
Zb - convert from base 3 | 66
c - convert to char | 'B
u
F - push 15 | 15
Yb - convert to base 2 | [1 1 1 1]
GmQb - convert from base 4 | 85
c - convert to char | 'U
el - lowercase | 'u
t
E - push 14 | 14
Yb - convert to base 2 | [1 1 1 0]
GmQb - convert from base 4 | 85
c - convert to char | 'T
el - lowercase | 't
.
P - push pi | 3.141
Ymh - hypot(TOS, 2) | 3.724
me - exp | 41.437
Kmh - hypot(TOS, 20) | 46.011
c - round down and convert to char | '.
PostScript, 889 874 837 835 bytes
currentflat string dup rrand
count dup count count mul mul xor count count mul count dup mul exch count
count copy count copy count copy count copy count copy
add and sub put print
and sub add put print
sub sub add put print
mul or xor put print
idiv xor add put print
or xor add put print
mod idiv add put print
mul or xor put print
idiv xor add put print
sub and add put print
or and add put print
sub sub add put print
pop add sub put print
mul or xor dup copy put print
mod mul sub put print
add or xor put print
idiv add add put print
add or add put print
put print
add or add put print
or xor add put print
sub and add put print
add or add put print
mod mul sub put print
idiv xor add put print
mul or xor put print
or xor add put print
or and add put print
idiv xor add put print
xor add sub put print
mod mul sub put print
quit
This uses 32 copies of the integers 89 25 20 6. All charcodes of the target string can be obtained with operations on those integers, in stack order: for example, 'A' (ASCII 65) is 89 - (25 & (20 + 6)). Many 4-tuples of integers have this property; this one was chosen because they’re particularly easy to generate.
currentflat string dup rrand
Flat defaults to 1, so this creates a string of length 1 (initialized to \0). dup is not a deep copy: it creates a second reference to the same string. rrand pushes the random seed, which defaults to 0. Stack is now ["\0", "\0", 0].
count dup count count mul mul xor
count pushes the number of items in the stack, so this computes 3 ^ (3 * (5 * 6)) = 89.
count count mul count dup mul exch count
4 * 5 = 20, 5 * 5 = 25, 6 = 6. The stack is now ["\0", "\0", 0, 89, 25, 20, 6].
count copy count copy count copy count copy count copy
Duplicate the entire stack, five times. Thus we end up with 32 copies of our initial 7-element stack. We only need 31 copies, since the target string is 31 characters long, but the extra copy doesn’t hurt.
add and sub put print
Compute a charcode from the top four integers, write it at index 0 of the string, then print the string.
quit
Suppresses the default prompt.
dc, 240 bytes
The main idea is to continuously grow the stack by 1 (K), saving (sX) the size of the stack (z) into custom registers when it matches each unique ASCII code. Printing (P) is done throughout.
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKzsSKKzsQKKKKKzsqKKKKKzsCKKzsDKKKKKKKKKKKKKKKKKKKzPKzsBKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKzsaKKKzsdKzseKKKzshKzsiKKKKKzPldPlSPKKKKKzsszPlhPlePlSPlsPlaPliPldPlCPlSPlqPlBPKzdstzPdPlSPdPlhPlaPPlqPlsdPlSPlhPliPPlDPlqP
I did some optimization, like not saving a letter if it is not used after that, like duplicating (d) a letter, e.g. t, on the stack to save a byte, since recall (lX) is 2 bytes.
Stax, 133 95 84 79 bytes
AHHvcAvSVvNvXvsrDhYcvxvZLcHxVahyvxxZVvHVChAHHvVAHhvZAJyVahxvVvDhZyvxvAJZcASVAhL
Forth (gforth), 351
CHAR A DUP EMIT
CHAR n EMIT
CHAR d EMIT
SPACE
CHAR s DUP EMIT
CHAR h EMIT
CHAR e EMIT
SPACE
EMIT
CHAR a EMIT
CHAR i EMIT
CHAR d EMIT
DUP CHAR m XOR EMIT
SPACE
CHAR f XOR DUP EMIT
CHAR B EMIT
CHAR u EMIT
CHAR t DUP EMIT
SPACE
DUP EMIT
CHAR h EMIT
CHAR a EMIT
EMIT
DUP EMIT
CHAR s EMIT
SPACE
CHAR h EMIT
CHAR i DUP EMIT
CHAR s EMIT
CHAR G XOR EMIT
EMIT
Too bad I can't redefine CHAR or EMIT to one-letter words, since that would require using either : and ; (e.g. : C CHAR ;) or ' (e.g ' CHAR ALIAS C)
In fact, if I could define words, I could do : P CHAR EMIT ; and then do P x to print x. Oh well.
I can't even create a buffer, write that char sequence to there and then use that as the input, since writing to memory requires using ! or C!
x86 machine code (32-bit), 256 bytes
When I print my code on my codepage 437 console, I see the following:
j XI a I a I a jbZ Q fiQ Gf a f Q I a I a I a I a h hisZ Q I a I a I a I a hBP Z Q iQ
y Q a I a I a I a h thaZ Q I a I a I a Ih ButZ Q a I a I a I a fhu fZf Q iQ g S Q a I a I a I a hsaidZ Q I a I a I a I a hshe Z Q I a I a I a I a hAnd Z Q TZBX b
This contains some whitespace characters, so here is the same code when I replace all tab characters by → and all nonbreaking space characters (with code 255) by *:
j XI a I a I a jbZ→Q fiQ Gf a f→Q I a I a I a I a h hisZ→Q I a I a I a I a hBP Z→Q iQ →→y →Q a I a I a I a h thaZ→Q I a I a I a Ih ButZ→Q a I a I a I a fhu fZf→Q iQ g→S →Q a I a I a I a hsaidZ→Q I a I a I a I a hshe Z→Q I a I a I a I a hAnd Z→Q TZBX*b*
Hexdump:
6a 20 58 49 20 61 20 49 20 61 20 49 20 61 20 6a
62 5a 09 51 20 66 69 51 20 47 66 20 61 20 66 09
51 20 49 20 61 20 49 20 61 20 49 20 61 20 49 20
61 20 68 20 68 69 73 5a 09 51 20 49 20 61 20 49
20 61 20 49 20 61 20 49 20 61 20 68 42 50 20 20
5a 09 51 20 69 51 20 09 09 79 20 09 51 20 20 61
20 49 20 61 20 49 20 61 20 49 20 61 20 68 20 74
68 61 5a 09 51 20 49 20 61 20 49 20 61 20 49 20
61 20 49 68 20 42 75 74 5a 09 51 20 20 61 20 49
20 61 20 49 20 61 20 49 20 61 20 66 68 75 20 66
5a 66 09 51 20 69 51 20 67 09 53 20 09 51 20 20
61 20 49 20 61 20 49 20 61 20 49 20 61 20 68 73
61 69 64 5a 09 51 20 49 20 61 20 49 20 61 20 49
20 61 20 49 20 61 20 68 73 68 65 20 5a 09 51 20
49 20 61 20 49 20 61 20 49 20 61 20 49 20 61 20
68 41 6e 64 20 5a 09 51 20 54 5a 42 58 ff 62 ff
Some explanations on how it works:
Useful instructions are:
push imm8,push imm16andpush imm32, followed bypopgenerate constants. This can also generate zero (inah) when pushing a byte (imm8).and [ecx+32], ah- assuming ah = 0, this sets the byte to zero. It just so happens that the length of the output string is 32, so the code fills the buffer from end to beginning.or [ecx+32], edx- assuming the output byte is set to zero, this copiesedx(4 bytes) to output. I use a variant withdxinstead ofedxnear the end of the buffer, because it should not write beyond the output buffer. The restriction on code makes it impossible to write single bytes this way!imul edx, [ecx+32], whatever- this is the main scrambling idea. With enough entropy in[ecx+32]and the whatever number, it can generate any output. I use it to generate 2 or 3 bytes of needed values. Some complication is, when writing it to the output, it must do logicalORwith whatever is already there. This sometimes made it necessary to zero the memory once again.- A variant of a
jmpinstruction is used to return. I chose it because its encoding is0xff, which corresponds to a non-breaking space in codepage 437. A bit of a stretch on the rules, but otherwise I think the task is impossible...
Assembly source code, together with a C program which runs it (uses Visual Studio syntax):
#include <stdio.h>
__declspec(naked) void __fastcall doit(char* buf)
{
__asm {
push ' '
pop eax
dec ecx
and [ecx+32], ah // terminating 0 byte
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
push 98
pop edx
or [ecx+32], edx
imul dx, [ecx+32], 26183
and [ecx+32], ah
or [ecx+32], dx // two bytes: [.']
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
push 'sih '
pop edx
or [ecx+32], edx // 4 bytes: [ his]
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
push 538988610
pop edx
or [ecx+32], edx
imul edx, [ecx+32], 544803081
or [ecx+32], edx // 1 junk byte and 3 good bytes: (t's)
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
push 'aht '
pop edx
or [ecx+32], edx // 4 bytes: [ tha]
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
push 'tuB '
pop edx
or [ecx+32], edx // 1 junk byte and 3 good bytes: [But]
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
push word ptr 8309
pop dx
or [ecx+32], dx
imul edx, [ecx+32], 542312807
or [ecx+32], edx // 1 junk byte and 3 good bytes: [, ']
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
push 'dias'
pop edx
or [ecx+32], edx // 4 bytes: [said]
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
push ' ehs'
pop edx
or [ecx+32], edx // 4 bytes: [she ]
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
dec ecx
and [ecx+32], ah
push ' dnA'
pop edx
or [ecx+32], edx // 4 bytes: [And ]
push esp
pop edx
inc edx
pop eax
jmp dword ptr[edx-1]
}
}
int main()
{
char buf[100];
doit(buf);
puts(buf);
}
MATL, 118 bytes
KEUQtVQsQKBFZAXHKUqyyhsXJyyhdQtQQQwOJIUEyhdtKEhsHKQYqEEKQyywhdXJKEUQQHKUhstQwOytHKhsKYqyhdbJyqOHKhstQHKUqhsKUqYqqJvlec
More readable version (each line corresponds to one character, except stack-rearranging operations).
Explanation
The program produces the code points of the required characters, as independent numbers. At the end all those numbers are concatenated into a column vector, reshaped as a row vector, and converted to characters. The result is implicitly displayed.
Some of the tricks used:
- Most code points below 32 are displayed as space. So
0is used for most spaces, because it only costs a byte (O). - For the first space, however,
15is used (generated asKUq), because it can then be reused by adding it to100(chard) to give115(s). On another occasion5is used for space (generated asKQ), so it can be later subtracted from44(,) to give39('). - Clipboard
Jis used for storing characters that will be repeated: firsts, then'. Similarly, clipboardHstores100, which is useful fordand for generating other characters. - Extensive use is made of functions
Q(add1),q(subtract1),E(multiply by2) andU(square), together with the predefined literals in clipboardsI(3) andK(4). - Arbitrary addition and subtraction are done by concatenating into a vector (
h) and computing its sum (s) or consecutive differences (d). 100(d) is generated as4in binary interpreted as a decimal number.110(n) is obtained from65(A) by converting to string ('65': code points[54 53]), adding1to the code points ([55 54]), summing them together and adding1.- The order in which numbers are generated is sometimes altered for convenience; and they then are reordered by stack-rearranging functions: swap (
w), bubble upb).
Whitespace, 417 414 349 265 bytes
265 bytes thanks to Kevin Cruijssen
Explained:
[S S T T T T T T T N
_Push_-63_'][S S T T T T S S S N
_Push_-53_.][S S S T T S T N
_Push_13_s][S S S T T N
_Push_3_i][S S S T S N
_Push_2_h][S S T T S S S T T S N
_Push_-70_space][S T S S T T N
_Copy_0-based_3rd_s][S T S S T T S N
_Copy_0-based_6th_'][S S S T T T S N
_Push_14_t][S S T T S T N
_Push_-5_a][S S S T S N
_Push_2_h][S T S S T S N
_Copy_0-based_2nd_t][S T S S T T S N
_Copy_0-based_6th_space][S T S S T N
_Copy_0-based_1st_t][S S S T T T T N
_Push-15_u][S S T T S S T S S N
_Push_-36_B][S S T T T T T T T N
_Push_-63_'][S T S S T S S N
_Copy_0-based_4th_space][S S T T T T S T S N
_Push_-58_,][S S T T S N
_Push_-2_d][S S S T T N
_Push_3_i][S S T T S T N
_Push_-5_a][S S S T T S T N
_Push-13_s][S T S S T S T N
_Copy_0-based_3rd_space][S S T T N
_Push_-1_e][S S S T S N
_Push_2_h][S T S S T T N
_Copy_0-based_3rd_s][S T S S T T N
_Copy_0-based_3rd_space][S S T T S N
_Push_-2_d][S S S T S S S N
_Push_8_n][S S T T S S T S T N
_Push_-37_A][N
S S N
_Create_Label_LOOP][S S S T T S S T T S N
_Push_102][T S S S _Add][T N
S S _Print_as_character][N
S N
N
_Jump_to_Label_LOOP]
Pyth, 210 bytes
pChyCdpCyhyhlGpCyytlGpdpChFhTyylGpCyylGpChyytlGpdpChFhTyylGpCtytytlGpChyylGpCyytlGpCyyhTpdpCtyyTpCyhCdpCtFyyCdhTpCyhFlGCdpdpCyhFlGCdpCyylGpCtytytlGpCyhFlGCdpCtyyTpChFhTyylGpdpCyylGpChyylGpChFhTyylGpCyhyhTpCtyyT
I found a few numbers which could be expressed using only letters (like T = 10, Z = 0, lG = length(alphabet) = 26, Cd = charcode(space) = 32), and a few functions that could be performed using only letters (like t = decrement, h = increment, hF = repeated application of increment = addition), and then just ran a brute force search to find the shortest combinations of those functions and numbers that resulted in each of the letters I needed.
Pepe, 266 Bytes
I keep the r stack empty, and have 's' on the R stack
reeEeeeeeE reeEEeEEEe reeEEeeEee reEe REeEEEeeEE Reee reeEEeEeee reeEEeeEeE reEe Reee reeEEeeeeE reeEEeEeeE reeEEeeEee reeeEeEEee reEe reeeEeeeEe reeEeeeeEe reeEEEeEeE reeEEEeEee reEe reeEEEeEee reeEEeEeee reeEEeeeeE reeEEEeEee reeeEeeEEE Reee reEe reeEEeEeee reeEEeEeeE Reee reeeEeEEEe reeeEeeeEe
This isn't on TIO, but you can try it here
Perl 6, 1299 1272 1220 1215 bytes
Thanks to Grimy for -27 bytes.
-52 bytes because we didn't need the rabbit ears in the first place.
Thanks to Jo King for -5 bytes.
print chr flip chars i x chars i xx pi
and print lc chr chars NaN x chars cis pi
and print lc chr chars e x e x e
and print chr chars i x e x e x e
and print lc chr flip chars exp i
and print lc chr chars NaN x tau x e x e
and print chr chars chop NaN x e lcm chars e
and print chr chars i x e x e x e
and print lc chr flip chars exp i
and print lc chr flip chars i x chars i xx pi
and print chr chars False x pi x ceiling tau
and print lc chr chars e x e x e
and print chr chars i xx chars NaN x pi
and print chr chars i x e x e x e
and print chr chars chop False x e x e x e
and print chr chars chop NaN xx chars e
and print lc chr chars e x chars False
and print lc chr chars chop e x chars False
and print chr chars i x e x e x e
and print lc chr chars chop e x chars False
and print lc chr chars NaN x tau x e x e
and print lc chr flip chars i x chars i xx pi
and print lc chr chars chop e x chars False
and print chr chars chop False x e x e x e
and print lc chr flip chars exp i
and print chr chars i x e x e x e
and print lc chr chars NaN x tau x e x e
and print chr chars False x pi x ceiling tau
and print lc chr flip chars exp i
and print chr chars NaN xx tau x e
and say chr chars chop False x e x e x e
Outputs the string with a trailing newline. If you don't want that, then replace the last say with a print. You can also replace the newlines in the source with spaces.
Explanation
This code prints the string character by character. Each character is formed by feeding the appropriate character code into the chr function and lowercasing it with lc if needed.
Currently, all of the values are generated by generating a string with the correct number of characters in it; in some cases, the number of characters is the reverse of the target character code. It should be theoretically possible to use mathematical functions such as log and exp directly, but I didn't find it very easy to use those.
For use as numbers, we have e, pi and tau; in the right side of x or xx, they are implicitly floored. They all have 17 characters in their string representations, so we use e for minimal character count. We also have i (4 characters), False (5 characters) and NaN (3 characters). We can multiply string lengths with x; xx multiplies one plus the string length by the right hand side and adds one. chop removes one character from the string in case we're one away from the target.
The print statements are chained together using and, which has quite a low precedence. It's almost a miracle it exists; otherwise, we would have to use illegal semicolons.
I found the expressions for the characters by hand. It might be worth searching for them programmatically to find shorter expressions.
AlphaBeta, 180 177 175 163 bytes
cccaaggtFgDILrFigggDLjDLCLigggggDLjhDLhhhDLCLiggggDLjjggDLihhDLhhhhhDLcaaCLdbbCLcbbbCLHgDLiiiiigDLhDLdaaaCLDLjhhDLjgggDLiihDLcbbbCLhDLdaaaCLjhDLgDLiDLcaaaaCLdaaaCL
WIP
evil, 198 bytes
aeeeannkhhwzuuuuuueaeuekwuuuuuuuuuunkhwzaeeeeehknwgueeywguuuuuuhhknnwuuuwhgwpwnngheeuwguuuuuwngwzaeeeaaaeeeeeewhhgwnguuuueewnngawpaawuwnngwpawhgwhhgeeuwpawhguuuueewpwhgwhgwawpwnngaaaaaaeeeewguuuueew
This was quite fun.
Width, 66 64 bytes
QaaGmwmiimaGcwWiimawAGawmfciiiGaFmAmFiimFGcwAmFiGmaiiGcGamafFiGQ
Prints to debug. To print to stdout, append ww to the end of the code, which pops and outputs the top of the stack.
Explanation
In Width, each letter correlates to a number, based on how "wide" it is, according to this table. This assigns each letter a number from 0 to 9. Then, those numbers are used to actually execute code.
In particular, a letter than matches 7 will start a string literal. It will read sets of two letters at once, until it reads the original letter again. Each set of two letters will be converted to their width numbers, read as a decimal number between 0 and 99, and the character they equal will be their index in the following string:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\n\t
For example, the index of ! is 1, so 01 will be the right width numbers. Thus, if, iI, jt, etc will all correlate to a string literal of !.
In this case, I translated the 31 characters of the required output to appropriate letters, using Q as the quotation marks. The top of the stack is printed to debug when the program finishes.
Red, 272 bytes
prin quote And prin sp prin quote she prin sp prin quote said prin comma prin sp prin subtract to sp mold quote G sp prin quote But prin sp prin quote that prin subtract to sp mold quote G sp prin quote s prin sp prin quote his prin dot prin subtract to sp mold quote G sp
If the double quotes are necessary:
Red, 344 bytes
prin subtract to sp mold quote B sp prin quote And prin sp prin quote she prin sp prin quote said prin comma prin sp prin subtract to sp mold quote G sp prin quote But prin sp prin quote that prin subtract to sp mold quote G sp prin quote s prin sp prin quote his prin dot prin subtract to sp mold quote G sp prin subtract to sp mold quote B sp
Doesn't work in TIO but works in the Red interpreter.
Explanation:
The words are trivial - I prin them (print with no newline) as literals with quote. Red has a built-in word for space - sp, as well as comma and dot. " and ' more interesting: I prin them by subtracting a space from B and G respectively, starting from a literal B and G, converting them first to string with mold and then to character (in order to use subtraction on them) wtih to sp (Red has conversion by prototype - convert the string to the type of sp, which is character).
Deadfish~, 943 bytes
iiisdsiciiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiicddddddddddcddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddcdddddddddddddddddddddsddddddcdddddddddddcdddcdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddcdddddddddddddddddddddsddddddcddddddddddddddddddciiiiiiiicdddddcddddddddddddddddddddddddddddddddddddddddddddddddddddddddcddddddddddddciiiiiiiciiiiiiiiiiiiiiiiiiiiiiiiiiiciiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiicdcddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddcdddddddddddddddddddddsdddddcddddddddddddcdddddddciiiiiiiiiiiiiiiiiiicdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddcddddddddddddddddddddddddddddsddddddcdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddcddddddddddddddddddddddsiiiiciciiiiiiiiiicdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddcdddddddc
No loops allowed :(
MATL, 187 158 bytes
IEWQKEtqhpEqqKQHhthpKWEyQKWEqqYqQQXJwtQQQwKWEJKQthpYqKQHhthptQQQQQwIIhKQhpqKWEIWKQhpqIEWQQJQQtqKWEyIIhIhpYqQXJyKQthpYqwIWKQhpqyqKWEyJtQwhhPIIhKQhpQIWKQhpqvlec
More readable version: Try it online! Manual attempt at building the string. There's probably plenty of room for golfing by cutting the string into convenient chuncks, using P and h to flip and build a string. I hope somebody will take up the challenge to outgolf me. The main challenge is that you cannot use + or -, so basic arithmetic is often not possible.
Highlights:
KQthpYq: the 25th (KQthp) primeYqis 97, corresponding to the lettera. The letters(115) is generated similarly from 113, the 30th prime number. It is then extensively re-used in clipboardJ.hisis shortened by storing thehfrom before in clipboardJ. Since that previously storeds, we buildhisin reverse so we can still retrieve the recentsusingy, and flip it after usingP.- A large number of bytes saved thanks to Luis Mendo (mostly by changing a bunch of
htovle)

