Unary Filesystem

From Esolang
Jump to navigation Jump to search

Unary Filesystem is a Unary-derived OS and esolang by User:PythonshellDebugwindow.

OS

Unary Filesystem is a unique OS, as it has no concept of file content, only folder content. Each folder is nameless and can contain either one folder, one file, or no folder. When the OS is first booted, there is one folder, which can't be deleted. Deleting a folder results in all its "children folders" being deleted as well. Each folder has no folder by default, but the user can create one.

Command language

The Unary Filesystem OS can be run as a program. When this happens, a folder P is passed to the interpreter, and its deepest folder (folder F) is located. F should have an empty file, and its depth (including the topmost folder and F, depth is 1 if it is the topmost folder) is interpreted as a Unary program.

Turing-completeness proof

Since Unary is Turing-complete, Unary Filesystem is also Turing-complete.

Code golfing potential

Unary Filesystem can technically solve any problem in 0 bytes, making it the ultimate golfing language.

Examples

Cat program for 1 char

Here is the directory structure of the folder to be passed to the interpreter:

  •  
    •  
      •  
        •  
          •  
            •  
              •  
                •  
                  •  
                    •  
                      •  
                        •  
                          •  
                            •  
                              •  
                                •  
                                  •  
                                    •  
                                      •  
                                        •  
                                          •  
                                            •  
                                              •  
                                                •  
                                                  •  
                                                    •  
                                                      •  
                                                        •  
                                                          •  
                                                            •  
                                                              •  
                                                                •  
                                                                  •  
                                                                    •  
                                                                      •  
                                                                        •  
                                                                          •  
                                                                            •  
                                                                              •  
                                                                                •  
                                                                                  •  
                                                                                    •  
                                                                                      •  
                                                                                        •  
                                                                                          •  
                                                                                            •  
                                                                                              •  
                                                                                                •  
                                                                                                  •  
                                                                                                    •  
                                                                                                      •  
                                                                                                        •  
                                                                                                          •  
                                                                                                            •  
                                                                                                              •  
                                                                                                                •  
                                                                                                                  •  
                                                                                                                    •  
                                                                                                                      •  
                                                                                                                        •  
                                                                                                                          •  
                                                                                                                            •  
                                                                                                                              •  
                                                                                                                                •  
                                                                                                                                  •  
                                                                                                                                    •  
                                                                                                                                      •  
                                                                                                                                        •  
                                                                                                                                          •  
                                                                                                                                            •  
                                                                                                                                              •  
                                                                                                                                                •  
                                                                                                                                                  •  
                                                                                                                                                    •  
                                                                                                                                                      •  
                                                                                                                                                        •  
                                                                                                                                                          •  
                                                                                                                                                            •  
                                                                                                                                                              •  
                                                                                                                                                                •  
                                                                                                                                                                  •  
                                                                                                                                                                    •  
                                                                                                                                                                      •  
                                                                                                                                                                        •  
                                                                                                                                                                          •  
                                                                                                                                                                            •  
                                                                                                                                                                              •  
                                                                                                                                                                                •  
                                                                                                                                                                                  •  
                                                                                                                                                                                    •  
                                                                                                                                                                                      •  
                                                                                                                                                                                        •  
                                                                                                                                                                                          •  
                                                                                                                                                                                            •  
                                                                                                                                                                                              •  
                                                                                                                                                                                                •  
                                                                                                                                                                                                  •  
                                                                                                                                                                                                    •  
                                                                                                                                                                                                      •  
                                                                                                                                                                                                        •  
                                                                                                                                                                                                          •  
                                                                                                                                                                                                            •  
                                                                                                                                                                                                              •  
                                                                                                                                                                                                                •  
                                                                                                                                                                                                                  •  
                                                                                                                                                                                                                    •  
                                                                                                                                                                                                                      •  
                                                                                                                                                                                                                        •  
                                                                                                                                                                                                                          • (empty file)

This works because the file is 108 folders deep, and the cat program in Unary is 108 characters long.

See also