The language Whitespace is written in space, tab, and return, allowing for files with seemingly no content. Most languages ignore whitespace characters (something the creators of Whitespace joked to be "a great injustice“); Whitespace ignores everything else, meaning programs can hide in the spaces between words in, say, a C program (and likewise we can hide a C program around the spaces of Whitespace), called a polyglot.
Whitespace has always been a favorite of mine, in part because the visual blankness of Whitespace reflects the very immateriality of esolangs themselves. As an open-ended form (just a list of rules, with no implementation necessary), they are conceptual works first, sometimes – but not always – to be embodied in compilers or in programs written for the language. To have one embodied in spaces and tabs – what ordinarily we don’t read as content at all – has a certain beauty.
I created Folders (the first language I made just for this blog) in asking the question "what is more immaterial than an empty file?” My answer was an empty folder. A file has a materiality in the desktop metaphor that a folder doesn’t. We think of a file as a thing; it can hold information or have behaviors. A folder’s value is in its role organizing files and other folders; a set of folders holding only each other, with no files inside, is ridiculous: an organizational structure organizing nothing.
The other nice thing about folders is that their structure is very much like the structure of procedural code as it’s parsed; it looks like an abstract syntax tree. In the Folders language, code is structured just this way, with each command a folder containing subfolders with their expressions or contained commands.
For example, here is a “Hello, World” program:
How does this work?
The outermost folder is the name of the program, “Hello World.” Folders are read in alphabetical order; the first (only) subfolder of “Hello World” is “Setup." "Setup” is an alternate name for print; a list of the alternate names is below – they are drawn from the most common folder names in Windows (discounting ones like “Program files” which we would not expect to see outside its normal place in the root of C:).
From there, we hit a number of Img folders. The “(2),” “(3),” etc are ignored – these are allowed for in Folders so that we can have the same command at the same level in a program. Also ignored are “ - Copy” (added to folder copies in Windows) and leading numerals, which allow the programmer to control program flow. So all these are identical:
New folder (2)
New folder - Copy
New folder - Copy (2)
if - Copy (1)
The string “Hello, World!” is broken up into four strings, to make it a bit less obvious how it will be read. The %20; is an encoding of a space, as it appears at the end of a folder name (which truncates trailing spaces).
Folders is a vocabulary-oriented esolang, as opposed to a logic-oriented one: its weirdness is in how the text of the code is expressed, less so in the strange leaps of logic a programmer must tackle in order to write code in it. Underneath this odd form of communication, it is an imperative language very much like Java.
Folders can, of course, contain working programs in other languages within its programs. All files inside are ignored. Also, in order to carry the folder metaphor further, Folders does not store variables in memory. It maintains another set of folders (in the user’s Application Data folder) where the variable name, type, and data, are all maintained as another set of folders. One can watch that directory and see folders appear as the program is running. Folders does not clean up after itself, leaving behind evidence of its run.
Here is “99 Bottles of Beer” in Folders. 99 Bottles is often provided as the simplest sample code that deals with looping and variables. You can see here some oddness in the strings to deal with spaces or periods at the end of folder names:
Currently, Folders is Windows-only. The compiler is open-source and can be found on github. https://github.com/rottytooth/Folders