Shakespeare Programming Language, 327718 bytes
That's about 320 KiB, not 3 MiB.
Because the source code itself is too big, run this Bash program to generate the quine in quine.spl
file. Expect .input.tio
file to be the input in the TIO link.
cat << 'eof' > convert.ijs
9!:37 (0 _ _ _)
f =: (('the sum ofa cat ' #~ 2&|) , 'twice ' , [: f <.@%&2) ` ('zero'"_) @. (=&0)
g =: ([: toupper 'remember ' , f , '!'"_)"0
inp =: stdin''
NB. inp =: toupper inp rplc LF;' ';'!';'.'
out =: 'LET USSCENE D.' ,~ ; <@g 0, |. a. i. inp
NB. echo # out
echo out
exit ''
eof
cp .input.tio quine.spl
/opt/j/bin/jconsole convert.ijs < .input.tio | tr -d '\n' >> quine.spl
wc -c quine.spl
/opt/spl/spl2c < quine.spl > quine.spl.c 2> /dev/null
gcc -c -I /opt/spl -o quine.spl.o quine.spl.c
gcc -lm -o quine quine.spl.o /opt/spl/libspl.a
./quine < /dev/null > quine.spl.out
diff quine.spl quine.spl.out
The content of the .input.tio
file should be:
T.AJAX,.PAGE,.ACT I:.SCENE I:.[ENTER AJAX AND PAGE]AJAX:LET USSCENE II.SCENE D:.PAGE:REMEMBER A PIG.SCENE C:.AJAX:RECALL.PAGE:REMEMBER I.AJAX:BE YOU NICER A CAT?IF NOTLET USSCENE M.SPEAK THY.LET USSCENE C.SCENE M:.PAGE:RECALL.BE YOU WORSE ZERO?IF SOLET USSCENE IX.AJAX:YOU BE THE SUM OFTHE SQUARE OFTHE SUM OFA BIG BIG BIG CAT A CAT A CAT.SPEAK THY.YOU BE THE SUM OFTHE SUM OFA BIG BIG CAT A CAT THE CUBE OFA BIG BIG CAT.SPEAK THY.YOU BE THE SUM OFA BIG BIG BIG CAT YOU.SPEAK THY.YOU BE THE SUM OFA BIG BIG BIG PIG YOU.SPEAK THY.YOU BE THE SUM OFA BIG BIG BIG CAT YOU.SPEAK THY.YOU BE THE SUM OFTHE CUBE OFA BIG BIG CAT A BIG CAT.SPEAK THY.YOU BE THE SUM OFTHE SUM OFA CAT YOU A BIG CAT.SPEAK THY.YOU BE THE SUM OFTHE SQUARE ROOT OFTWICE YOU THE SUM OFA BIG CAT YOU.SPEAK THY.YOU BE A BIG BIG BIG BIG BIG CAT.SPEAK THY.SCENE V:.PAGE:BE YOU NICER ZERO?IF NOTLET USSCENE X.AJAX:YOU BE THE QUOTIENT BETWEENI A BIG CAT.REMEMBER YOU.BE I NICER TWICE YOU?IF NOTLET USSCENE L.YOU BIG BIG BIG BIG BIG CAT.PAGE:YOU BE TWICE THE SUM OFTWICE THE SQUARE ROOT OFI I.SPEAK THY.YOU BE TWICE THE SUM OFA BIG BIG CAT I.SPEAK THY.YOU BE THE SUM OFTHE SQUARE ROOT OFI TWICE I.SPEAK THY.AJAX:SPEAK THY.PAGE:YOU BE THE SQUARE ROOT OFTHE PRODUCT OFTHE SUM OFYOU I YOU.SPEAK THY.YOU BE THE SUM OFA BIG CAT YOU.SPEAK THY.YOU BE THE SUM OFA BIG BIG BIG PIG YOU.SPEAK THY.AJAX:SPEAK THY.PAGE:YOU BE THE SUM OFA BIG CAT YOU.SPEAK THY.YOU BE TWICE THE SUM OFTHE SUM OFA CAT I A BIG CAT.SPEAK THY.YOU BE THE SUM OFTWICE I A CAT.SPEAK THY.AJAX:SPEAK THY.PAGE:YOU BE THE SUM OFA BIG CAT YOU.SPEAK THY.YOU BE THE SUM OFTWICE I A CAT.SPEAK THY.YOU BE TWICE THE SUM OFTWICE THE SQUARE ROOT OFI I.SPEAK THY.AJAX:SPEAK THY.SCENE L:.PAGE:YOU BIG BIG BIG CAT.AJAX:YOU BE TWICE THE SUM OFTWICE THE SUM OFTWICE I A CAT I.SPEAK THY.YOU BE THE SUM OFTHE SUM OFA CAT YOU A BIG CAT.SPEAK THY.YOU BE THE SUM OFTHE SUM OFA CAT I THE SQUARE OFI.SPEAK THY.YOU BE THE SUM OFTWICE THE SUM OFA BIG PIG A PIG YOU.SPEAK THY.YOU BE THE SUM OFA BIG CAT YOU.SPEAK THY.YOU BE TWICE TWICE I.SPEAK THY.RECALL.PAGE:YOU BE I.LET USSCENE V.SCENE X:.PAGE:YOU BIG BIG BIG BIG CAT.AJAX:YOU BE THE SQUARE ROOT OFTWICE THE CUBE OFI.SPEAK THY.YOU BE THE SUM OFTWICE TWICE THE SUM OFA CAT I A CAT.SPEAK THY.YOU BE THE SUM OFTWICE THE SUM OFTWICE I A CAT I.SPEAK THY.YOU BE THE SUM OFTHE SUM OFA PIG YOU A BIG PIG.SPEAK THY.YOU BE THE SUM OFTWICE I A CAT.SPEAK THY.LET USSCENE M.SCENE IX:.PAGE:YOU BE TWICE TWICE THE SUM OFTWICE THE SUM OFA BIG BIG BIG CAT A CAT A CAT.SPEAK THY.YOU BE THE SUM OFTHE SUM OFA CAT YOU A BIG BIG BIG PIG.SPEAK THY.YOU BE THE SUM OFA BIG BIG BIG BIG CAT THE SUM OFA PIG YOU.SPEAK THY.YOU BE A BIG BIG BIG BIG BIG CAT.SPEAK THY.YOU BE THE SUM OFTWICE THE SUM OFTWICE THE SQUARE ROOT OFYOU YOU A CAT.SPEAK THY.YOU BE THE SUM OFA BIG PIG YOU.SPEAK THY.YOU BE YOU.SPEAK THY.YOU BE THE SUM OFA BIG BIG BIG BIG PIG YOU.SPEAK THY.YOU BE THE SUM OFA BIG CAT YOU.SPEAK THY.YOU BE THE SUM OFTHE SUM OFA CAT YOU A BIG BIG BIG CAT.SPEAK THY.YOU BE THE SUM OFTHE SUM OFA PIG YOU A BIG BIG BIG PIG.SPEAK THY.YOU BE A BIG BIG BIG BIG BIG CAT.SPEAK THY.YOU BE TWICE THE SUM OFA BIG CAT YOU.SPEAK THY.YOU BE TWICE THE SQUARE ROOT OFTWICE TWICE TWICE YOU.SPEAK THY.RECALL.SCENE II:.AJAX:
which is also the first part of the quine program. The second part is the first part converted through the convert.ijs
J script written above, starting with:
REMEMBER ZERO!REMEMBER TWICE THE SUM OFA CAT TWICE TWICE THE SUM OFA CAT TWICE THE SUM OFA CAT TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER TWICE TWICE TWICE THE SUM OFA CAT TWICE THE SUM OFA CAT TWICE TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER THE SUM OFA CAT TWICE TWICE TWICE TWICE TWICE TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER TWICE THE SUM OFA CAT TWICE TWICE THE SUM OFA CAT TWICE TWICE TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER THE SUM OFA CAT TWICE TWICE TWICE TWICE TWICE TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER TWICE THE SUM OFA CAT TWICE THE SUM OFA CAT TWICE THE SUM OFA CAT TWICE TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER TWICE THE SUM OFA CAT TWICE TWICE THE SUM OFA CAT TWICE THE SUM OFA CAT TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER THE SUM OFA CAT TWICE TWICE TWICE THE SUM OFA CAT TWICE TWICE TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER THE SUM OFA CAT TWICE TWICE TWICE THE SUM OFA CAT TWICE TWICE TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER TWICE TWICE TWICE TWICE TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER THE SUM OFA CAT TWICE TWICE THE SUM OFA CAT TWICE TWICE TWICE TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER TWICE THE SUM OFA CAT TWICE THE SUM OFA CAT TWICE THE SUM OFA CAT TWICE TWICE TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER THE SUM OFA CAT TWICE TWICE THE SUM OFA CAT TWICE TWICE TWICE TWICE THE SUM OFA CAT TWICE ZERO!REMEMBER THE SUM OFA CAT TWICE THE SUM OFA CAT TWICE TWICE TWICE TWICE TWICE
The constant generation part needs some more work.