From Esolang
Jump to navigation Jump to search

Magritte is a language invented by Marc Hamann, approximately 2005. In Magritte, the only legal program is

Ceci n'est pas un programme.

Programs in Magritte are very strongly semantically guaranteed never to terminate.


The following is an implementation in Common Lisp:

 (defun interpret-Magritte (code)
   "Interprets the Magritte CODE, signaling an error upon encountering an
    invalid instruction."
   (declare (type string code))
     (unless (string= code "Ceci n'est pas un programme.")
       (error "Invalid program. Expected \"Ceci n'est pas un programme.\""))))

External resources