Implementation of the Folders📂 esoteric programming language, a language with no code and just folders.

Overview

Folders.py

Folders.py

A deep folders zoom

Folders is an esoteric programming language, created by Daniel Temkin in 2015, which encodes the program entirely into the directory structure.

All names of the folders as well as their contents are completely ignored. Instead, the commands are encoded in the nesting of folders within folders.

Let me say that again: THE SOURCE CODE IS THE DIRECTORY STRUCTURE. Lol.

This is a Python implementation of Folders for all to enjoy!

Folders is (was originally) implemented in C#.

Usage

Install from pip

Simply install the Folders command line interpreter

pip install Folders

Give the folder of the program you wish to run as an command line argument

Folders sample_programs/HelloWorld
# => Hello, World!

If instead you would like list the Python code to stdout, use the -l option

Folders -l sample_programs/HelloWorld
# => print("Hello, World!", end='', flush=True)

Run python

The implementation is just the python file, folders.py and has no dependencies, so if you'd like you can clone the repo and run python ./folders/folders.py instead of pip installing and use it the same as in the examples above.

Language details

The language details are on the esolangs wiki, but I've put it here for reference.

For example, take a look at the Fibonacci sample program.

The root folder contains a list of command folders - in this case labelled Nf1.., Nf2.., but the names don't actually matter except the alphabetical ordering - the first folder (which I've labelled with an init) is the first "sub-folder", the next is the second, etc.

Commands:

Commands take the following form

Command # of folders Details
if 0 folders Second sub-folder holds expression, third holds list of commands
while 1 folder Second sub-folder holds expression, third holds list of commands
declare 2 folders Second sub-folder holds type, third holds var name (in number of folders, ex. zero folders becomes "var_0")
let 3 folders Second sub-folder hold variable name (in number of folders), third holds an expression
print 4 folders Second sub-folder holds expression
input 5 folders Second sub-folder holds variable name

Expressions:

Expression folders take the following form:

Type # of folders Details
Variable 0 folders Second sub-folder holds variable name
Add 1 folder Second sub-folder holds the first expression to add, third holds second expression
Subtract 2 folders Second sub-folder holds the first expression to subtract, third holds second expression
Multiply 3 folders Second sub-folder holds the first expression to multiply, third holds second expression
Divide 4 folders Second sub-folder holds the first expression to divide, third holds second expression
Literal Value 5 folders Second sub-folder holds the type of the value (as described by types below, ex. two folders for a string)
Equal To 6 folders Second and third folders hold expressions to compare
Greater Than 7 folders Second and third folders hold expressions to compare (takes the form : second folder > third folder)

Types

And finally type folders take the following form:

Type # of folders
int 0 folders
float 1 folder
string 2 folders
char 3 folders

Note on this implemementation

The int, float, and char types are 8-bit only. But, you can add into their variables to arbitrary length, so to get a very large number you can simply multiply it a bunch of times.

This is what the fibonacci program does.

The absolute power of folders

Behold, the mighty Truth Machine program:

truth_machie

A mighty meme-worthy point

All Folders programs are 0 bytes if you're on windows as it interprets an empty folder as 0 bytes.

The ultimate code golf!

Links

You might also like...
sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character.
sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character.

ꦱꦮ sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character. sawa iku

Eros is an expiremental programming language built using simple Python code.

Eros is an expiremental programming language built using simple Python code. Featuring an easy syntax and unique features like type slicing, the language remains an expirement that grows in down time.

lets learn Python language with basic examples. highly recommended for beginners who just start coding.
lets learn Python language with basic examples. highly recommended for beginners who just start coding.

Lets Learn Python 🐍 Learn python from basic programs. learn python from scratch. 1.Online python compiler: https://www.onlinegdb.com/online_python_co

Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

guess-the-numbers Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Number guessing game

Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

password-generator Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Password generator

This repository containing cross-section cut and fill calculations using Python programming language.

cross-section This repository is containing cut and fill calculations for cross-section using Python programming language. This codes is made to calcu

The worst and slowest programming language you have ever seen

VenumLang this is a complete joke EXAMPLE: fizzbuzz in venumlang x = 0

A complex language with high level programming and moderate syntax.

zsq a complex language with high level programming and moderate syntax.

Short, introductory guide for the Python programming language
Short, introductory guide for the Python programming language

100 Page Python Intro This book is a short, introductory guide for the Python programming language.

Comments
  • Why no no work

    Why no no work

    i typed "Folders helloworld"

    Traceback (most recent call last):
      File "C:\Users\jerem\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "C:\Users\jerem\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "C:\Users\jerem\AppData\Local\Programs\Python\Python39\Scripts\Folders.exe\__main__.py", line 4, in <module>
    ModuleNotFoundError: No module named 'folders'
    
    opened by Jeremy5909 6
  • I just found out a bug

    I just found out a bug

    If you type your program named "Hello, World!" then the "Folders [-l] <Folder's name>" will not work

    It will say: "Folders: error: unrecognized arguments: World!

    Picture will maybe make everything clearer

    @SinaKhalili @georgewoodall82 Capture

    opened by TryHardCode1 2
  • Why does the info about commands in FOLDERS so confusing

    Why does the info about commands in FOLDERS so confusing

    I have a problem when making a program in FOLDERS

    Basically, if you want to print a string, you'll need 4 Folders inside a command folder to work. But the picture from https://danieltemkin.com/Esolangs/Folders/ shows that the print command actually needs 5 Folders. How is that possible???

    opened by TryHardCode1 0
  • more features

    more features

    folders is an epic programming language already so why not make it better? suggestion - make a v2 or just build onto the existing version where there are more commands and expressions examples - boolean data type, logic expressions (and/or/not), else/elif, etc.

    opened by ProfessorDragon 4
Releases(v0.0.5)
  • v0.0.5(Dec 13, 2021)

    • Thanks to @georgewoodall82 for integer number input support
    • Added github action workflow so now PyPI should update on new tag pushes 🚀

    👉🏽 https://pypi.org/project/Folders/0.0.5/

    Source code(tar.gz)
    Source code(zip)
Addons like multipages for streamlit webapp

streamlit_pages Installation $ pip install streamlit-pages Features Adding multiple pages to streamlit Sharing specific pages Usage import streamlit

36 Dec 25, 2022
Customizable-menu-python - User customizable menu in Python

Menu personalizável pelo usuário em Python A minha ideia com esse projeto pessoa

Renan Barbosa 4 Oct 28, 2022
laTEX is awesome but we are lazy -> groff with markdown syntax and inline code execution

pyGroff A wrapper for groff using python to have a nicer syntax for groff documents DOCUMENTATION Very similar to markdown. So if you know what that i

Subhaditya Mukherjee 27 Jul 23, 2022
Код файнтюнинга оригинального CLIP на русский язык

О чем репозиторий В этом репозитории представлен способ файтюнить оригинальный CLIP на новый язык Почему модель не видит женщину и откуда на картинке

Valentina Biryukova 7 Feb 06, 2022
Sudo type me a payload

payloadSecretary Sudo type me a payload Have you ever found yourself having to perform a test, and a client has provided you with a VM inside a VDI in

7 Jul 21, 2022
Control your gtps with gtps-tools!

Note Please give credit to me! Do not try to sell this app, because this app is 100% open source! Do not try to reupload and rename the creator app! S

Jesen N 6 Feb 16, 2022
A simple and easy to use Python's PIP configuration manager, similar to the Arch Linux's Java manager.

PIPCONF - The PIP configuration manager If you need to manage multiple configurations containing indexes and trusted hosts for PIP, this project was m

João Paulo Carvalho 11 Nov 30, 2022
Backend/API for the Mumble.dev, an open source social media application.

Welcome to the Mumble Api Repository Getting Started If you are trying to use this project for the first time, you can get up and running by following

Dennis Ivy 189 Dec 27, 2022
SWS Filters App - SWS Filters App With Python

SWS Filters App Fun 😅 ... Fun 😅 Click On photo and see 😂 😂 😂 Your Video rec

Sagar Jangid 3 Jul 07, 2022
Wrappers around the most common maya.cmds and maya.api use cases

Maya FunctionSet (maya_fn) A package that decompose core maya.cmds and maya.api features to a set of simple functions. Tests The recommended approach

Ryan Porter 9 Mar 12, 2022
Example python package with pybind11 cpp extension

Developing C++ extension in Python using pybind11 This is a summary of the commands used in the tutorial.

55 Sep 04, 2022
Coinloggr - A learning resource and social platform for the coin collecting community

Coinloggr A learning resource and social platform for the coin collecting commun

John Galiszewski 1 Jan 10, 2022
An advanced pencil sketch generator

Pencilate An advanced pencil sketch generator About : An advanced pencil sketch maker made in just 12 lines of code. Yes you read it right, JUST 12 LI

MAINAK CHAUDHURI 23 Dec 17, 2022
Add any Program in any language you like or add a hello world Program ❣️ if you like give us :star:

Welcome to the Hacktoberfest 2018 Hello-world 📋 This Project aims to help you to get started with using Github. You can find a tutorial here What is

Aniket Sharma 1.5k Nov 16, 2022
My solutions for Advent of Code 2021 🌟🎄

🌟 Advent of Code 2021 🎄 My solutions for Advent of Code 2021. About · What is Advent of Code? · Contents · Usage · Table of puzzles (TODO: add final

Amanda P. Pinha 2 Dec 05, 2022
ERPNext Easy Letterhead

ERPNext Easy Letterhead Intro Quality letterheads are a problem for non-technical users. So we've built (really hacked together) a slightly easier sol

Bantoo 3 Jan 02, 2023
An kind of operating system portal to a variety of apps with pure python

pyos An kind of operating system portal to a variety of apps. Installation Run this on your terminal: git clone https://github.com/arjunj132/pyos.git

1 Jan 22, 2022
Function Plotter✨

Function-Plotter Build With : Python PyQt5 unittest matplotlib Getting Started This is an list of needed instructions to set up your project locally,

Ahmed Lotfy 3 Jan 06, 2022
My Dotfiles of Arco Linux

Arco-DotFiles My Dotfiles of Arco Linux Apps Used Htop LightDM lightdm-webkit2-greeter Alacritty Qtile Cava Spotify nitrogen neofetch Spicetify Thunar

$BlueDev5 6 Dec 11, 2022