https://github.com/SinaKhalili/Folders.py Skip to content Sign up * Why GitHub? + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} SinaKhalili / Folders.py Public * Notifications * Fork 18 * Star 333 * Implementation of the Folders esoteric programming language, a language with no code and just folders. www.youtube.com/watch?v=igh-vbi2lxc&lc=ugzim9qqtg02nmpk-8v4aaabag MIT License 333 stars 18 forks Star Notifications * Code * Issues 3 * Pull requests 0 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 5 tags Code Latest commit @SinaKhalili SinaKhalili v0.0.8 ... 0bec545 Dec 17, 2021 v0.0.8 0bec545 Git stats * 33 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows v0.0.5 Dec 13, 2021 folders Move folders to package folder... lol Dec 17, 2021 sample_programs Add Sample to Sample Programs Dec 13, 2021 .gitignore Add the gitignore.io python gitignore Dec 13, 2021 LICENSE Remove random stuff in License Jul 22, 2021 README.md Merge remote-tracking branch 'origin' Dec 17, 2021 setup.py v0.0.8 Dec 17, 2021 truth_machine.png Add picture for README Nov 12, 2020 View code [ ] Folders.py Usage Install from pip Run python Language details Commands: Expressions: Types Note on this implemementation The absolute power of folders A mighty meme-worthy point Links README.md 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 Details folders if 0 Second sub-folder holds expression, third holds list folders of commands while 1 Second sub-folder holds expression, third holds list folder of commands 2 Second sub-folder holds type, third holds var name declare folders (in number of folders, ex. zero folders becomes "var_0") let 3 Second sub-folder hold variable name (in number of folders folders), third holds an expression print 4 Second sub-folder holds expression folders input 5 Second sub-folder holds variable name folders Expressions: Expression folders take the following form: Type # of Details folders Variable 0 Second sub-folder holds variable name folders Add 1 Second sub-folder holds the first expression to add, folder third holds second expression Subtract 2 Second sub-folder holds the first expression to folders subtract, third holds second expression Multiply 3 Second sub-folder holds the first expression to folders multiply, third holds second expression Divide 4 Second sub-folder holds the first expression to folders divide, third holds second expression Literal 5 Second sub-folder holds the type of the value (as Value folders described by types below, ex. two folders for a string) Equal To 6 Second and third folders hold expressions to compare folders Greater 7 Second and third folders hold expressions to compare Than folders (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 * Folders on esolang * Folders homepage About Implementation of the Folders esoteric programming language, a language with no code and just folders. www.youtube.com/watch?v=igh-vbi2lxc&lc=ugzim9qqtg02nmpk-8v4aaabag Topics python folders esolang esoteric-programming-language Resources Readme License MIT License Stars 333 stars Watchers 3 watching Forks 18 forks Releases 1 Better torture Latest Dec 13, 2021 Used by 5 * @Lunik * @szbianka * @CCI-Studios * @colectic Contributors 2 * @SinaKhalili SinaKhalili Sina Khalili * @georgewoodall82 georgewoodall82 Languages * Python 100.0% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.