Whitespace Language - Online Decoder/Interpreter/Translator (2024)

Search for a tool

Whitespace Language

Tool to decode / code in whitespace, an exotic programming language that only uses blank / invisible characters like space, tab or newline/line feed.

Results

Whitespace Language - dCode

Tag(s) : Programming Language

Share

Whitespace Language - Online Decoder/Interpreter/Translator (2)

dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!

  1. Informatics
  2. Programming Language
  3. Whitespace Language

Interpret/Execute Whitespace code

Code some text with Whitespace

Answers to Questions (FAQ)

What is Whitespace language? (Definition)

The Whitespace programming language gets its name from the fact that it uses only the 3 white characters: space, tab and newline. The source code of programs written in Whitespace are therefore invisible.

In order to make the code visible, it is common to use 3 characters: S for space (Space), T for tabulation (Tab), and L for new line (Line feed).

All visible characters are ignored by the program and can be used as comments (or to catch attention). This is exactly the opposite operation of most programming languages or spaces are generally ignored.

How to code in Whitespace?

The whitespace uses a stack, a heap and 22 structured instructions, which start with an IMP (Modification Parameter Instruction) among 5 possible: S (space) modifies the stack, TS (tab + space) performs a calculation, TT (tab + tab) accesses the heap, L (line feed) manages the goto / jump of the program and TL (tab + line feed) manages I / O.

The complete list of 22 Whitespace instructions:

IMP + CommandParameterDescription
S SNumberStacks the number
S LSCopy top of stack
S LTReverse the top two items of the stack
S LLRemove top of stack
TS SSAddition
TS STSubtraction
TS SLMultiplication
TS TSInteger Division
TS TTModulo
TT SSave to heap
TT TGet the heap
L SSLabelCreate a label in the program
L STLabelLabel call
L SLLabelJump to the label
L TSLabelJump to label if top of stack is 0
L TTLabelJump to the label if the top of the stack is <0
L TLEnd of the subroutine, and return
L LLEnd of program
TL SSShow top of stack as ASCII character
TL STDisplay top of stack as an integer
TL TSRead a character and save it at the address described by the top of the stack
TL TTRead a number and store it at the address described by the top of the stack

The numbers respect a specific syntax: sign + absolute values in binary + line feed. The sign is S (space) for positive or T (tabulation) for negative. The value of the number is written in binary with S (space) for 0 and T (tabulation) for 1.

Example: The number +97 is positive (coded S) and has the binary value 1100001 (coded TTSSSST), so it is coded as S TTSSSST L

Example: SS STTSSSSTL TLSS corresponds to the instruction stacks the number 97 and displays it as an ASCII character, so the program displays a.

How to decode Whitespace?

The interpretation of white-space corresponds to the reading and application of coded instructions.

On dCode, it is possible to read a file (generally with the extension .ws) or to copy and paste a program (be careful not to add a space or a new line unintentionally because this could cause errors)

The execution is done in the browser, with JavaScript.

dCode uses WS2JS, a Javascript interpreter by Luilak (MIT License) here

How to recognize a Whitespace code?

The message is invisible, consisting only of spaces, tabs and newlines.

Sometimes the characters S, T and C accompany the code.

It is possible to accompany the code with any text (visible characters only) without affecting it, so it is an excellent method of steganography.

Why the Whitespace language even exists?

Whitespace language was designed as an esoteric programming language, meaning it is not intended to be used as a practical tool, but rather as a way to challenge and amuse programmers.

When Whitespace was invented?

Whitespace was described on April 1, 2003 by Edwin Brady and Chris Morris (as an April Fool) at Durham University.

Source code

dCode retains ownership of the "Whitespace Language" source code. Except explicit open source licence (indicated Creative Commons / free), the "Whitespace Language" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Whitespace Language" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Whitespace Language" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.

Cite dCode

The copy-paste of the page "Whitespace Language" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Whitespace Language on dCode.fr [online website], retrieved on 2024-08-02, https://www.dcode.fr/whitespace-language

Summary

  • Interpret/Execute Whitespace code
  • Code some text with Whitespace
  • What is Whitespace language? (Definition)
  • How to code in Whitespace?
  • How to decode Whitespace?
  • How to recognize a Whitespace code?
  • Why the Whitespace language even exists?
  • When Whitespace was invented?

Similar pages

  • Brainf*ck
  • Javascript
  • Zero-width Space (ZWSP)
  • LOLCODE Language
  • Blub!
  • Pikalang
  • Reversef*ck
  • DCODE'S TOOLS LIST

Support

Forum/Help

Whitespace Language - Online Decoder/Interpreter/Translator (4)

Keywords

whitespace,white,space,tabulation,line,feed,ws,blank,empty,invisible

Links


https://www.dcode.fr/whitespace-language

© 2024 dCode — El 'kit de herramientas' definitivo para resolver todos los juegos/acertijos/geocaching/CTF.

Whitespace Language - Online Decoder/Interpreter/Translator (2024)

FAQs

Is whitespace ignored by the interpreter? ›

Whitespace Programming Language

Compared to almost every other programming language, where whitespace is ignored by the interpreter, Whitespace ONLY recognizes whitespace inputs (spaces, tabs, line breaks). Every other character is ignored.

Is whitespace a real programming language? ›

Whitespace is an imperative, stack-based language. The programmer can push arbitrary-width integer values onto a stack and access a heap to store data. An interpreter, along with its Haskell source code, is provided by the Whitespace creators.

What is the whitespace code? ›

Whitespace, designed in 2003 by Edwin Brady and Chris Morris, is an imperative, stack-based, esoteric programming language that uses only whitespace characters—space, tab, and linefeed—as syntax. All other characters are ignored.

Which programming language is sensitive to whitespace? ›

Python is a Whitespace sensitive programming language that uses “spaces” and indenting instead of curly braces or “begin/end” keywords. The version of Python used in Earth Volumetric Studio requires that spaces be used instead of a mix of tabs and spaces for indenting.

Are all whitespaces ignored by compiler? ›

Compilers ignore whitespace, but not all spaces. An example is Python. You must put spaces for code blocks! Considering note above, they aren't same (int main() and intmain()).

What are the disadvantages of whitespace? ›

What are the disadvantages of white space? While the right amount of whitespace can give a page a cool and confident feel, too much can make it seem empty and dull.

What language does NASA use to code? ›

NASA relies on Fortran for computationally intensive tasks, such as orbital mechanics and simulation of complex physical phenomena. Its efficiency in handling mathematical operations makes it a preferred choice for certain scientific applications.

Does whitespace make code slower? ›

Whitespace and indentation are important because they help us humans see a piece of code as a single unit of code. Because of this useful function, we spend less time on maintenance. It helps us interpret, read and understand code faster.

What are the hardest programming languages to learn? ›

Most esoteric programming languages like Malbolge, Cow, Whitespace, etc. are considered the hardest coding languages to learn with close to no applications or advantages.

What is whitespace example? ›

White space commonly refers to negative space—the unmarked area around and within visual web design elements such as imagery, logos and text. The following exemplify different types of white space: Wide margins on a page. Spaces between text blocks and those between each letter (also known as kerning in typography)

What is the whitespace rule? ›

White space is one of the 13 basic design principles and refers to any blank or empty space surrounding all the other elements in a design composition. It is the space between text, images, buttons and other objects that a user can see on a page or a screen.

What is whitespace answer? ›

White space is all the blank areas in a design. It's also known as negative space, empty space, and sometimes spelled as whitespace. A plain background, the border around images, and even the spaces between letters are all white space.

Where is whitespace used? ›

It covers everything from line and letter spacing, to the space surrounding text and images, to margins and gutters. Think of it as the adhesive that holds a mosaic together or the silence in music. Without it, things are left unstructured and cluttered—a little like white noise.

Does Python use whitespace? ›

In Python, characters that are used for spacing are called as whitespace characters. They include newline, spaces, tabs, carriage return, feed, etc.

Does JavaScript use whitespace? ›

Whitespace refers to characters which are used to provide horizontal or vertical space between other characters. Whitespace is often used to separate tokens in HTML, CSS, JavaScript, and other computer languages.

Is whitespace ignored in Python? ›

In Python, trailing whitespaces are ignored except one case: in triple-quoted string literals. Then they are a part of the string value, and removing them changes that value. For these reasons, trailing spaces are removed in triple-quoted string literals in Java (where they are called text blocks).

Is whitespace ignored in HTML? ›

In HTML, any blank space we type in HTML other than a single space between two words is ignored.

Does git ignore whitespace changes? ›

Whitespace differences can clutter your Git diffs, making it harder to focus on substantial changes in your code. Fortunately, Git provides options to ignore these insignificant whitespace changes when comparing files.

Does SQL care about whitespace? ›

It's important to note that SQL is not whitespace sensitive in its interpretation and that means that any principles we apply here are entirely for the benefit of humans. Your database doesn't care.

References

Top Articles
Latest Posts
Article information

Author: Kareem Mueller DO

Last Updated:

Views: 6186

Rating: 4.6 / 5 (46 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Kareem Mueller DO

Birthday: 1997-01-04

Address: Apt. 156 12935 Runolfsdottir Mission, Greenfort, MN 74384-6749

Phone: +16704982844747

Job: Corporate Administration Planner

Hobby: Mountain biking, Jewelry making, Stone skipping, Lacemaking, Knife making, Scrapbooking, Letterboxing

Introduction: My name is Kareem Mueller DO, I am a vivacious, super, thoughtful, excited, handsome, beautiful, combative person who loves writing and wants to share my knowledge and understanding with you.