Folder

From Esolang
Jump to: navigation, search
This article is a stub, which means that it is not detailed enough and needs to be expanded. Please help us by adding some more information.

The Folder programming language is an esoteric programming language by User:Rdococ which has many interpreters already, like Windows Explorer, Finder, Nautilus and so on.

Structure

A Folder program contains states - which are subfolders, which themselves contain transitions - shortcuts - to other states. Usually, in the Folder program, all states are hidden and there is a direct shortcut to the starting state.

Some Folder programs contain states within states (this can occur ad infinitum), and these are called substates. This is useful for grouping states under certain rules, but I am uncertain whether this changes the computational class of the language.

Additionally, you can't embed programs in a Folder program. That would undermine the logical "beauty" of the idea.

Computational Class

As far as I know, the computational class of the Folder programming language is equal to, or just slightly above, that of a finite state automaton. Discuss it here, if you think you might be able to prove otherwise.

I have to remind you that embedding non-linear media like programs in a Folder program stops it from being a Folder program.

Input/Output

Any user can open one of the transitions - shortcuts - to send input to the program. This may change the state the program is in.

A Folder program can use a variety of methods to send output to the user -- the name of the state is shown in most interpreters, but if that won't cut it, you can embed Text programs in a state, which you can use to your advantage to add detailed descriptions of the state the program is in. If you really want to get complicated, you can put in a movie or media file - but be aware that the user will have to open the file to see and hear the media. This is a good thing, because cutscenes in a game can be annoying, and if the user knows what's happening, he can skip them.

Interpreter

To run a Folder program, all you need to do is to open it in your favorite file browser, and open the shortcut to the starting program state!

Examples

These are text formatted hierarchies of Folder programs.

  • lock
  • closed
  • unlock (=> opened)
  • opened
  • lock (=> closed)
  • start (=> closed)