gplz.:
The .: language consists of a file-and-directory structure. It is probably the most powerful and ambitious use of a filesystem yet.
Variables
If you want to assign integer values to variables, you must create a file: the filename is the name of the variable, the filesize is the content of the variable, and the file must have a creation date in 1991 to make it an integer variable.
If you want to assign string values to variables, you must create a file: the filename is the name of the variable, the file data is the content of the variable, and the file must have a creation date in 1992 to make it a string variable.
Files with creation dates outside [1991,1992] are ignored and can be used as comments.
At some point I had some confused ideas about representing more abstract data types such as "freedom", "justice", "equality for all" and "ass & tits" in JPGs, but then that would've probably created compatibility problems with female users.
Program Structure
A .: program is a directory tree with files. So, basically all your harddrives already out there are already potential .: programs. Maybe you've been unsuspectingly having a flexible word processor on your machine all the time and just didn't know it !
The files in each directory are sorted alphanumerically. Everything before a '.' in a filename (or directoryname) is ignored, so the following two expressions are really the same:
something.=
=
You can utilize this to force a sort order when you repeat the same instruction several times.
Assignment and Logico-Mathematical Operations
All the standard operations
=
- equal, assign
+
- add (also in the obvious
+=
form) -
- subtract (also in the obvious
-=
form) _
- multiply (also in the obvious
_=
form) .
- divide (also in the obvious
.=
form) Apfelstrudel
- = nand
are supported.
So, now that you've declared two variables (see
above), how do you add them ? Simply, by creating a directory named
+=
, which contains two subdirectories with the names of the
variables to add.
How do you add a constant to a variable ? Similar, only one subdirectory and a file, sorted by filename.
Program Logic
What is known commonly as a WHILE-construct in
many a language, is called the KURT-construct in .:. This is Kurt
Weills fault - you know, Weill
pretty much sounds like
While
at least when I pronounce it, and if you're friends with Kurt
Weill, you can probably call him Kurt, so this is why the construct is called
Kurt
and not While
. It is the only program logic construct
supported in .: besides Apfelstrudel, which is not really a program logic
construct but rather a fine desert. (Even without sand).
The first subdirectory in a KURT directory specifies the actual condition, which can be either
=
- equal
=
- less than equal
Note: For less than
, there is a
single space before the equal sign. That is actually more, so its a kind of
contradiction, which in turn is less than optimal. So there you go. Even if
you're still sitting in front of this.
There are other logic constructs, too:
eiffelturm | if-then. The first subdirectory is the if-condition. |
niemals! | until-do.The first subdirectory is the until-condition. |
seltsam | if-then-else. The first subdirectory is the if-condition, the last subdirectory the else-statement. |
sonderbar | if-then-unless. The first subdirectory is the if-condition, the last subdirectory the unless-statement. |
sinnlos | if-then-provided. The first subdirectory is the if-condition, the last subdirectory the provided-statement. |
nutzlos | while-do-unless. The first subdirectory is the if-condition, the last subdirectory the unless-statement. |
Example Programs
Somewhat unsurprisingly, there are none. But
you can take a look at this Python
program that will create a .:
fibonacci program for you.
And here
is Hello, World in .: