A programming language is a formal language comprising a set of strings that produce various kinds of machine code output.

From Esolang
Jump to navigation Jump to search

A programming language is a formal language comprising a set of strings that produce various kinds of machine code output., formerly known as A programming language is a formal language, which comprises a set of instructions that produce various kinds of output., formerly known as A programming language is a formal language, which comprises a set of instructions used to produce various kinds of output., formerly known as A programming language is a formal language that specifies a set of instructions that can be used to produce various kinds of output., formerly known as A programming language is a formal computer language designed to communicate instructions to a machine, particularly a computer., formerly known as A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer., formerly known as A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer., was created by User:Rottytooth in early 2014.

Overview

The sentence "A programming language is a formal language comprising a set of strings that produce various kinds of machine code output." serves as the language, the program, and the output of that program as interpreted by that language. There is only one possible program, and that program is a quine. Inspired by the Fluxus event scores, it eliminates the distinction between code, the performance of that code, and the system that determines that performance. Generally speaking, programs are only written in Programming Language (as it's abbreviated) unintentionally.

Each time someone uses the first sentence of this Wikipedia article, they are unwittingly writing a successful program in Programming Language, one which reiterates the very definition they lifted, ignoring (symbolically deleting) any other content they've written that might attempt to provide context for its use. While Programming Language itself fits the definition of a programming language according to Wikipedia, it sits outside most peoples' commonsensical understanding of what a programming language is or how it behaves.

Previous Versions

If the first sentence of the English entry for Programming language changes, the name of this language will also change to match, although adaptation may be slow. According to Google, there are about 15,500 programs written in its November 2018 version, 2,000 programs written in its July 2017 version, and about 7,220 programs written in its November 2020 version (as of November 8th, 2020).

Variations

There is no reason other programs, corresponding to the first sentences of other Wikipedia entries, could not also be code -- but technically each entry would belong to its own programming language, distinct from A programming language is a formal language comprising a set of strings that produce various kinds of machine code output.

Quine

A programming language is a formal language comprising a set of strings that produce various kinds of machine code output.

Implementation

Here is a Python implementation (original version by User:M654):

 import sys

 def parse(command):
     if command == "A programming language is a formal language comprising a set of strings that produce various kinds of machine code output.":
         print("A programming language is a formal language comprising a set of strings that produce various kinds of machine code output.")

 with open(sys.argv[1], 'r') as f:
     code = f.read()

 parse(code)

Source here (no longer current)