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.

You might also like...
PyGo custom language, New but similar language programming

New but similar language programming. Now we are capable to program in a very similar language to Python but at the same time get the efficiency of Go.

A place where one-off ideas/partial projects can live comfortably

A place to post ideas, partial projects, or anything else that doesn't necessarily warrant its own repo, from my mind to the web.

This app converts an pdf file into the audio file.

PDF-to-Audio This app takes an pdf as an input and convert it into audio, and the library text-to-speech starts speaking the preffered page given in t

This an Anki add on that automatically converts Notion notes into Anki flash cards. Currently in development!

NotionFlash This is an Anki add on in development that will allow automatically convert your Notion study notes into Anki flash cards. The Anki deck c

The program converts Swiss notes into American notes
The program converts Swiss notes into American notes

Informatik-Programmieren Einleitung: Das Programm rechnet Schweizer Noten in das Amerikanische Noten um. Der Benutzer kann seine Note eingeben und der

Converts a base copy of Pokemon BDSP's masterdatas into a more readable and editable Pokemon Showdown Format.

Showdown-BDSP-Converter Converts a base copy of Pokemon BDSP's masterdatas into a more readable and editable Pokemon Showdown Format. Download the lat

It converts ING BANK account historic into a csv file you can import in HomeBank application.

ing2homebank It converts your ING Bank account historic csv file into another csv file you can import in HomeBank application

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.

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

Owner
Daniel Johnson
Daniel Johnson
An esoteric programming language that supports concurrency, regex, and web requests.

The Hofstadter Esoteric Programming Language Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's La

Austin Henley 19 Dec 27, 2022
NORETURN is an esoteric programming language, based around the idea of not going back

NORETURN NORETURN is an esoteric programming language, based around the idea of not going back Concept Program coded in noreturn runs over one array,

null 1 Dec 15, 2021
A gamey, snakey esoteric programming language

Snak Snak is an esolang based on the classic snake game. Installation You will need python3. To use the visualizer, you will need the curses module. T

David Rutter 3 Oct 10, 2022
Binary++ is an esoteric programming language based on* binary

Binary++ is an esoteric programming language based on* binary. * It's meant to be based on binary, but you can write Binary++ code using different mea

Supercolbat 3 Feb 18, 2022
A very terrible python-based programming language that uses folders instead of text files

PYFolders by Lewis L. Foster PYFolders is a very terrible python-based programming language that uses folders instead of regular text files. In this r

Lewis L. Foster 5 Jan 8, 2022
An implementation of an interpreter for the Brainfuck esoteric language in Python

Brainfuck Interpreter in Python An implementation of an interpreter for the Brainfuck esoteric language in Python. ?? The Brainfuck Language Created i

Carlos Santos 0 Feb 1, 2022
Find all solutions to SUBSET-SUM, including negative, positive, and repeating numbers

subsetsum The subsetsum Python module can enumerate all combinations within a list of integers which sums to a specific value. It works for both negat

Trevor Phillips 9 May 27, 2022
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Advent Of Code 2021 - Python English Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels th

Coral Izquierdo Muñiz 2 Jan 9, 2022
This program generates automatically new folders containing old version of program

Automated Folder Versions Generator by Sergiy Grimoldi - V.0.0.2 This program generates automatically new folders containing old version of something

Sergiy Grimoldi 1 Dec 23, 2021
Ingestinator is my personal VFX pipeline tool for ingesting folders containing frame sequences that have been pulled and downloaded to a local folder

Ingestinator Ingestinator is my personal VFX pipeline tool for ingesting folders containing frame sequences that have been pulled and downloaded to a

Henry Wilkinson 2 Nov 18, 2022