Plaster
New
List
Login
text
default
anonymous
2019.11.25 05:33:00
(* How to open a portal to Hell using Standard ML ---------------------------------------------- A simple program, utilising SMLofNJ.Cont to open a gateway to the underworlds in a very succinct and easy-to-understand manner. This program should be run with <https://www.youtube.com/watch?v=OfNwIvO6YpU> playing, but it should still work if you do not play that video. Please ignore any demons attempting to communicate to you through this literate program. *) (* Step 1: Confuse the type checker guard so it cannot stop you from ruining the purity of its process *) datatype 'a cont = Circle of ('a Cont.cont) (* Step 2: Gather the necessary functions to activate the portal *) fun uncircle (Circle x) = x (* Without the Circle wrapper, the type checker would fail with an error like: yͦo͒͒ͨ͗̓͛́u̅҉ ́̓͌f̋̈͋õͨ̐ͮ͂ơ͛͊ͪͣ̂̓l̅̉́̂ͨ̏̈́,̨̿̍ͭ̍̾ͬ ͬͩ͆ͧ̔ͩw̏ͪͧͬ̀ȟ̋̈́ͣy ̶̇̒ͮ͑ͥd̡̏́ͨ͛̐̾o͐̑̎ ͭ͟y͛̿̋̽̋̾̐̀o͐̓́ų̋ͩ͐ͨͨ ͫ̽͆ͣ͑̚͞d҉a̸̎ͮͯͬr͊̉̌͜ë̄ͫ̆t̸̃ͯͮ̄h̵̑̄̈́ͤ̾ ̔ẗ́o̔̇ ̢ͭͩo̷ͧͥ͆̀̌̉̚p̨͒ͯ̒e̷ͭ̄̈nͨ͆ͬ͛ͥ̒̈͟ ̎͌͊̊̍̓tͧhͮͭ͗͛̂̚e ͨͦ̈́ͧ̀ͤp͆̉҉o̊͑r̐ͥ̊ͬ̑tͣ̐̉̋ͥȃ̢ͣ̋̋l̈́̆̍ [circularity] operator domain: 'Z Cont.cont -> 'Z operand: 'Z Cont.cont -> 'Z Cont.cont It is less effort to add the Circle wrapper over our continuation rather than take it off later. *) fun here () = uncircle (Cont.callcc Circle) (* Step 3: Activate the portal. . . Ą̧̡͈̥̗̞͖̦̤̄͋̅͂͞͠n̢̫͇̱̻̹̐̾͐̊͒̌͘͡͡ď̴̥͕͚̟̲̜̳̺̮͉̽̐̏͐̉͝ o̸̢̥̞̳̟̝͙͉̤̅̊̄̀̂̕ͅn̛̘͕̩̖̖͓̮̺̒̎̌̑͂̾̕͟ͅc̢̲̲̮͈͔̈̾͊͡͠e̸̢̡̱̱̱̘͂́̇͛̎̐̚ ą̵͉̜̘̼̘̘̀̂͂̒̂ğ̷͎̯͓̻̱̎̆̎͘͞͡a̛͓̙͔̱͍̗͎̯͒͒̓̏̕i̙͇̣̻̤͈͔̊͌̂̈́̂͛̽̉͞n̶̤̤͈͓̤̰̠̰̍̌̔͘͝͞͞͠ͅ,̡̧̱͇̮͎̙̑͂͛̈͑͗͜ ý̸̢͖̺̭̼̝͈̣͈̑̽̓͑́̇́̄͟͡o̸̡̹̙͖̟̹͙̠̎̓͗̇͡ṷ̡̨̹̗̺̒̆̐̎̂̒͗̚̚͠ c̵̜̝̜̹̠̣̑͆̒̔͝a̷̮̣͓̗͍̐̿̽̍͊̀̾̉͠͞ń̵̢̮̦̫̩̂̄͑̍̉̽́ ĥ̶̭̥̪͇̩͇͕͍̑͌̋̋́͊́͝͞ę̡̖͍͖̦̺̺̙̿̊̀͐̅̍͟ą̴̧̼̺̰̤͓̀͂̑͂̓r̛̪̯̙̟͇͊͑̏́͌̇̓͝͞ h̥̩̹̫̦͒́̎̄̽̊͂̒̈e̷̡̛̪̣̭̣̻̺͓̣̜͛̉̽̿̒l̴͓͚̘͓̭̣̤̟͓̿̍̀̐̌̎̾͛͊l̦͉̣̫̹͎͉̱̼̔̑̈́̇̐̐̃͗͛͠'̨̦̻̬̫̦͊̿̊̃̉͠s̸̢̛̱̬̗̼̱̣̣̋̄͂͋͆̇̆̓̚͜ h̠͔̪̪̙̽̎͂̀͐̒̂̕͘ȩ̴̘̲͇̲̗̠̠́̾̇́̓̉͘͜͟͞͝͡ą̲̗̼̥̬͉̬͊̑̌̒͘͠t͍͓̠͖̞̎̓̋̔̕͟͝͞͠ͅ . .) let val loop = here () in (print "ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn"; (Cont.throw loop (Circle loop))) end
Raw
Annotate
Repaste
Edit