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
Python library for ODE integration via Taylor's method and LLVM

heyoka.py Modern Taylor's method via just-in-time compilation Explore the docs » Report bug · Request feature · Discuss The heyókȟa [...] is a kind of

Francesco Biscani 45 Dec 21, 2022
Example code for the book Fluent Python, 1st Edition (O'Reilly, 2015)

Fluent Python, First Edition: example code This repository is archived and will not be updated.

Fluent Python 5.4k Jan 09, 2023
A Python package to request and process seismic waveform data from Hi-net.

HinetPy is a Python package to simplify tedious data request, download and format conversion tasks related to NIED Hi-net. NIED Hi-net | Source Code |

Dongdong Tian 65 Dec 09, 2022
A self contained invitation management system for gatekeeping.

Invitease Description A self contained invitation management system for gatekeeping. Purpose Serves as a focal point for inviting guests to a venue pr

מעגן מיכאל 7 Jul 19, 2022
Python implementation of Newton's Fractal

Newton's Fractal Animates Newton's fractal between two polynomials of the same order. Inspired by this video by 3Blue1Brown. Example fractals can be f

Jaime Liew 10 Aug 04, 2022
ArinjoyTheDev 1 Jul 17, 2022
A totally unrealistic cell growth/reproduction simulation.

A totally unrealistic cell growth/reproduction simulation.

Andrien Wiandyano 1 Oct 24, 2021
Architecture example simulator

SCADA architecture Example of a SCADA-like console application, used to serve as a minimal example of a standard architecture of an IIoT system. Insta

1 Nov 06, 2021
The little-endian version of MessagePack

MessagePackEL This is the little-endian version of MessagePack, except the endianness is different, the rest is exactly the same as MessagePack. C lib

dukelec 9 May 13, 2022
Python library for the Unmand APIs.

Unmand Python SDK This is a simple package to aid in consuming the Unmand APIs. For more help, see our docs. Getting Started Create virtual environmen

Unmand 4 Jul 22, 2022
A Linux webcam plugin for BGMv2 as used in our demos.

The goal of this repository is to supplement the main Real-Time High Resolution Background Matting repo with a working demo of a videoconferencing plu

Andrey Ryabtsev 144 Dec 27, 2022
Import modules and files straight from URLs.

Import Python code from modules straight from the internet.

Nate 2 Jan 15, 2022
API wrapper for VCS hosting system.

PythonVCS API wrapper for VCS hosting system. Supported platforms Gitea Github, Gitlab, Bitbucket support will not, until that packages is not updated

MisileLaboratory 1 Apr 02, 2022
This Program Automates The Procces Of Adding Camos On Guns And Saving Them On Modern Warfare Guns

This Program Automates The Procces Of Adding Camos On Guns And Saving Them On Modern Warfare Guns

Flex Tools 6 May 26, 2022
Larvamatch - Find your larva or punk match.

LarvaMatch Find your larva or punk match. UI TBD API (not started) The API will allow you to specify a punk by token id to find a larva match, and vic

1 Jan 02, 2022
Lagrange Interpolation Method-Python

Lagrange Interpolation Method-Python The Lagrange interpolation formula is a way to find a polynomial, called Lagrange polynomial, that takes on certa

Motahare Soltani 2 Jul 05, 2022
Web app to find your chance of winning at Texas Hold 'Em

poker_mc Web app to find your chance of winning at Texas Hold 'Em A working version of this project is deployed at poker-mc.ue.r.appspot.com. It's run

Aadith Vittala 7 Sep 15, 2021
NGEBUG is a tool that sends viruses to victims

Ngebug NGEBUG adalah tools pengirim virus ke korban NGEBUG adalah tools virus terbaru yang berasal dari rusia Informasi lengkap ada didalam tools Run

Profesor Acc 3 Dec 13, 2021
A simple and convenient build-and-run system for C and C++.

smake Smake is a simple and convenient build-and-run system for C and C++ projects. Why make another build system? CMake and GNU Make are great build

Venkataram Edavamadathil Sivaram 18 Nov 13, 2022
A simple weather app.

keather A simple weather app. This is currently not finished. Dependencies: yay -S python-beautifulsoup4 tk

1 Jan 09, 2022