Kamis, 24 Mei 2018

Sponsored Links

Whitespace programming language Wikipedia - talart.ru
src: d3awy9hqkleb4r.cloudfront.net

Whitespace is an esoteric programming language developed by Edwin Brady and Chris Morris at the University of Durham (also developers of the Kaya and Idris programming languages). It was released on 1 April 2003 (April Fool's Day). Its name is a reference to whitespace characters. Unlike most programming languages, which ignore or assign little meaning to most whitespace characters, the Whitespace interpreter ignores any non-whitespace characters. Only spaces, tabs and linefeeds have meaning. An interesting consequence of this property is that a Whitespace program can easily be contained within the whitespace characters of a program written in another language, except possibly in languages which depend on spaces for syntax validity such as Python, making the text a polyglot.

The language itself is an imperative stack-based language. The virtual machine on which the programs run has a stack and a heap. The programmer is free to push arbitrary-width integers onto the stack (currently there is no implementation of floating point numbers) and can also access the heap as a permanent store for variables and data structures.


Video Whitespace (programming language)



History

Whitespace was created by Edwin Brady and Chris Morris in 2002. Slashdot gave a review of this programming language on 1 April 2003.

The idea of using whitespace characters as operators for the C++ language was facetiously suggested five years earlier by Bjarne Stroustrup.


Maps Whitespace (programming language)



Syntax

Commands are composed of sequences of spaces, tab stops and linefeeds. For example, tab-space-space-space performs arithmetic addition of the top two elements on the stack. Data is represented in binary using spaces (0) and tabs (1), followed by a linefeed; thus, space-space-space-tab-space-tab-tab-linefeed is the binary number 0001011, which is 11 in decimal. All other characters are ignored and thus can be used for comments.

Code is written as an Instruction Modification Parameter (IMP) followed by the operation. The table below shows a list of all the IMPs in Whitespace.

Each IMP is followed by one of several operations defined for that IMP. See the Whitespace Tutorial for the list of operations supported in Whitespace.


Whitespace programming language Wikipedia - talart.ru
src: unitedfox.com


Sample code

The following is a commented Whitespace program that simply prints "Hello, world!", where each Space, Tab, or Linefeed character is preceded by the identifying comment "S", "T", or "L", respectively:

S S S T	S S T	S S S L  T	L  S S S S S T	T	S S T	S T	L  T	L  S S S S S T	T	S T	T	S S L  T	L  S S S S S T	T	S T	T	S S L  T	L  S S S S S T	T	S T	T	T	T	L  T	L  S S S S S T	S T	T	S S L  T	L  S S S S S T	S S S S S L  T	L  S S S S S T	T	T	S T	T	T	L  T	L  S S S S S T	T	S T	T	T	T	L  T	L  S S S S S T	T	T	S S T	S L  T	L  S S S S S T	T	S T	T	S S L  T	L  S S S S S T	T	S S T	S S L  T	L  S S S S S T	S S S S T	L  T	L  S S L  L  L    

Note that when Whitespace source code is displayed in some browsers, the horizontal spacing produced by a Tab character is not fixed, but depends on its location in the text relative to the next horizontal tab stop. Depending on the software, Tab characters may also get replaced by the corresponding variable number of Space characters.


Whitespace programming language Wikipedia the free 7148090 ...
src: asio5.ru


See also

  • Polyglot, a program valid in more than one language
  • Steganography, the technique of concealing a message within another message
  • Off-side rule languages, where blocks are expressed by whitespace indentation
    • Python, the best-known example of a language with syntactically significant whitespace
  • Esoteric programming languages
    • Brainfuck, which consists of only eight simple commands and an instruction pointer
    • INTERCAL, the "Compiler Language With No Pronounceable Acronym"
    • LOLCODE, which is patterned after a series of Internet memes
    • Malbolge, which is specifically designed to be nearly impossible to program in

Java Whitespaces - Whitespace Characters in your Program - Java ...
src: i.ytimg.com


References


php - Double quotes inside html from no where displaying white ...
src: i.stack.imgur.com


External links

  • Official website
  • Release announcement on Slashdot
  • Collection of Whitespace interpreters in various script languages
  • Acme::Bleach A Perl module that rewrites the body of your module to a whitespace-only encoding ("for really clean programs").

Source of the article : Wikipedia

Comments
0 Comments