SATySFiでQuine
やってるのを見かけなかったので.output,pdfともにquineになってるはずです.
↓のリンクを開いてpdfのコードをコピーするか,Chromeやお使いのOSに入っているpdf viewerで開いてコピーしてお手元のsatysfiコンパイラかplaygroundに食わせると同じ文字列が出力されるはずです.
permlink
let code = `let code = $@$ let (ss,sl,su) = (string-sub,string-length,string-unexplode) let-rec s2cl s = if sl s == 0 then [] else ss s 0 1 :: s2cl (ss s 1 (sl s - 1)) let q s = let-rec qa cl = match cl with | [] -> su [] | c :: l -> let f d = string-same c (su [d]) in (if f 64 then s else if f 36 then su [96] else c) ^ qa l in let s = qa (s2cl s) in let () = display-message s in s let-inline \d _ = {} let gic l = get-initial-context l (command \d) let qb = (read-inline (gic 4pt) (embed-string (q code))) let (w, h, d) = get-natural-metrics qb let (w, h) = (w +' 12pt, h +' d +' 12pt) in page-break (UserDefinedPaper(w +' 12pt, h)) (fun _ -> (|text-origin = (6pt, 6pt); text-height = h;|)) (fun _ -> (|header-origin = (0pt, 0pt); header-content = block-nil; footer-origin = (0pt, 0pt); footer-content = block-nil;|)) (line-break true true (gic w) qb)` let (ss,sl,su) = (string-sub,string-length,string-unexplode) let-rec s2cl s = if sl s == 0 then [] else ss s 0 1 :: s2cl (ss s 1 (sl s - 1)) let q s = let-rec qa cl = match cl with | [] -> su [] | c :: l -> let f d = string-same c (su [d]) in (if f 64 then s else if f 36 then su [96] else c) ^ qa l in let s = qa (s2cl s) in let () = display-message s in s let-inline \d _ = {} let gic l = get-initial-context l (command \d) let qb = (read-inline (gic 4pt) (embed-string (q code))) let (w, h, d) = get-natural-metrics qb let (w, h) = (w +' 12pt, h +' d +' 12pt) in page-break (UserDefinedPaper(w +' 12pt, h)) (fun _ -> (|text-origin = (6pt, 6pt); text-height = h;|)) (fun _ -> (|header-origin = (0pt, 0pt); header-content = block-nil; footer-origin = (0pt, 0pt); footer-content = block-nil;|)) (line-break true true (gic w) qb)