A programming language is a formal language that specifies a set of instructions that can be used to produce various kinds of output.

From Esolang
Jump to: navigation, search

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 that specifies a set of instructions that can be used to produce various kinds of 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 5,570 programs written in its current version.

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 that specifies a set of instructions that can be used to produce various kinds of output.

Implementation

Here is a Python implementation by User:M654 (no longer current):

 import sys

 def parse(command):
     if command == "A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer.":
         print("A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer.")

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

 parse(code)

Source here