A partial-transpiler that converts a subset of Python to the Folders esoteric programming language

Overview

Py2Folders

A partial-transpiler that converts a subset of Python to the Folders esoteric programming language

Folders

Folders is an esoteric programming language created by Daniel Temkin where the instructions are represented completely by the structure of folders. That is, there are NO FILES. The names of the folders and any files within are COMPLETELY IGNORED. For example, the Hello World of Folders can be found in this file and a simpler example of printing "h" is as follows (Yes, literals have to be encoded in hexidecimal encoded in folders).

py_tests/print_h/
└── 0 - F_PRINT
    ├── 00printdecl
    │   ├── 0
    │   ├── 1
    │   ├── 2
    │   └── 3
    └── 01printexpr
        ├── 00litdecl
        │   ├── 0
        │   ├── 1
        │   ├── 2
        │   ├── 3
        │   └── 4
        ├── 01littype
        │   ├── 0
        │   └── 1
        └── 02litvalue
            └── 0h
                ├── hexchar0
                │   ├── 0
                │   ├── 1
                │   │   └── 1
                │   ├── 2
                │   │   └── 1
                │   └── 3
                └── hexchar1
                    ├── 4
                    │   └── 1
                    ├── 5
                    ├── 6
                    └── 7

31 directories, 0 files

The Transpiler

Py2Folders transpiles a subset of Python's source code constructs into Folders "source code". Why I mention a subset is that not every Python construct can be directly translated. So, this begs a large question:

What's Allowed?

Statements:

  1. If
  2. While
  3. Single Assignment
  4. Printing a Single Expression
  5. Input

Expressions (May not be nested):

  1. Variable
  2. Add
  3. Subtract
  4. Multiply
  5. Divide
  6. Num and Str Literals
  7. Equals
  8. Greater Than
  9. Less Than

If your .py file adheres to these large restrictions, it can be transpiled.

Usage

  1. Clone this Repo
  2. Create your Python file to transpile
  3. Note: You must have a Python 3.10 installation to run the transpiler
  4. run Python3 py2Folders.py which will create a new directory in the same folder
  5. (Optional) Install Folders.py and run Folders

Congrats! You have translated your Python source file to a construct of entirely folders that still runs.

Owner
Daniel Johnson
Daniel Johnson
Dev-meme - A repository that contains memes just for people like us

A repository that contains memes just for people like us. Coders are constantly

Padmashree Jha 4 Oct 31, 2022
Windows Task Manager with special features, written in Python.

Killer That damn Chrome ⬇ Download here · 👋 Join our discord Tired of trying to kill processes with the default Windows Task Manager? Selecting one b

Nathan Araújo 49 Jan 03, 2023
We are building an open database of COVID-19 cases with chest X-ray or CT images.

🛑 Note: please do not claim diagnostic performance of a model without a clinical study! This is not a kaggle competition dataset. Please read this pa

Joseph Paul Cohen 2.9k Dec 30, 2022
MobaXterm-GenKey

MobaXterm-GenKey 你懂的!! 本地启动 需要安装Python3!!!

malaohu 328 Dec 29, 2022
This repository holds those infrastructure-level modules, that every application requires that follows the core 12-factor principles.

py-12f-common About This repository holds those infrastructure-level modules, that every application requires that follows the core 12-factor principl

Tamás Benke 1 Dec 15, 2022
List of short Codeforces problems with a statement of 1000 characters or less. Python script and data files included.

Shortest problems on Codeforces List of Codeforces problems with a short problem statement of 1000 characters or less. Sorted for each rating level. B

32 Dec 24, 2022
8 Nov 04, 2022
Tomador de ramos UC automatico para Windows, Linux y macOS

auto-ramos v2.0 Tomador de ramos UC automatico para Windows, Linux y macOS Funcion Este script de Python tiene como principal objetivo hacer que la to

Open Source eUC 13 Jun 29, 2022
A compilation of useful scripts to automate common tasks

Scripts-To-Automate-This A compilation of useful scripts for common tasks Name What it does Type Add file extensions Adds ".png" to a list of file nam

0 Nov 05, 2021
For when you really need to rank things

Comparisonator For when you really need to rank things. Do you know that feeling when there's this urge deep within you that tells you to compare thin

Maciej Wilczyński 1 Nov 01, 2021
Think DSP: Digital Signal Processing in Python, by Allen B. Downey.

ThinkDSP LaTeX source and Python code for Think DSP: Digital Signal Processing in Python, by Allen B. Downey. The premise of this book (and the other

Allen Downey 3.2k Jan 08, 2023
Simple Python script I use to manage and build my Reflux themes.

Simple Python script I use to manage and build my Reflux themes. Built for personal use, but anyone can easily fork and tweak to suit thier needs.

Ire 3 Jan 25, 2022
PREFS is a Python library to store and manage preferences and settings.

PREFS PREFS is a Python library to store and manage preferences and settings. PREFS stores a Python dictionary in a total human-readable file, the PRE

Pat 13 May 26, 2022
Laurence Billingham 1 Feb 16, 2022
Clear merged pull requests ref (branch) on GitHub

GitHub PR Cleansing This tool is used to clear merged pull requests ref (branch) on GitHub. GitHub has no feature to auto delete branches on pull requ

Andi N. Dirgantara 12 Apr 19, 2022
Awesome Cheatsheet

Awesome Cheatsheet List of useful cheatsheets Inspired by @sindresorhus awesome and improved by these amazing contributors. If you see a link here is

detailyang 6.5k Jan 07, 2023
Simple Assembler with python

Assembler with python converts assembly source code to machine code Requirements Python 3 🐍 Usage python main.py [source] [output] [source] : Path t

Amir mohammad 1 Dec 24, 2021
A python module for DeSo

DeSo.py A python package for DeSo. Developed by ItsAditya Run pip install deso to install the module! Examples of How To Use DeSo.py Getting $DeSo pri

ItsAditya 0 Jun 30, 2022
Nimbus - Open Source Cloud Computing Software - 100% Apache2 licensed

⚠️ The Nimbus infrastructure project is no longer under development. ⚠️ For more information, please read the news announcement. If you are interested

Nimbus 194 Jun 30, 2022
Pomodoro timer by the Algodrip team!

PomoDrip 🍅 Pomodoro timer by the Algo Drip team! To-do: Create the script for the pomodoro timer Design the front-end of the program (Flask or Javasc

Algodrip 3 Sep 12, 2021