timewarp-ide


Nametimewarp-ide JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/James-HoneyBadger/Time_Warp
SummaryEducational Programming IDE with Multi-Language Support
upload_time2025-10-09 21:29:10
maintainerNone
docs_urlNone
authorJames-HoneyBadger
requires_python>=3.9
licenseMIT
keywords education programming ide basic logo pilot compiler turtle-graphics educational
VCS
bugtrack_url
requirements pygame pytest black flake8
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ⏰ TimeWarp Compiler

**Compile Educational Programming Languages to Native Executables**

TimeWarp Compiler is a command-line tool that compiles educational programming languages (PILOT, BASIC, Logo) to native Linux executables. Transform your educational code into standalone programs that run without interpreters.

[![PyPI version](https://badge.fury.io/py/timewarp-ide.svg)](https://pypi.org/project/timewarp-ide/)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## ✨ Features

### 🎯 Multi-Language Compilation
Compile 3 educational programming languages to native executables:

- **PILOT** - Educational language with turtle graphics (1960s)
- **BASIC** - Classic line-numbered programming (1960s)
- **Logo** - Educational turtle graphics language (1960s)

### 🚀 Native Performance
- **GCC Compilation** - Generate optimized C code and compile to native executables
- **Cross-Platform** - Linux executables (easily extensible to other platforms)
- **No Runtime Dependencies** - Standalone binaries that run anywhere

### 📚 Rich Sample Programs
Comprehensive examples demonstrating language features:
- **BASIC**: Hello world, arrays, functions, loops
- **Logo**: Shapes, complex drawings, fractals
- **PILOT**: Math quizzes, interactive adventures

## 🚀 Quick Start

### Installation

#### Option 1: PyPI (Recommended)
```bash
pip install timewarp-ide
```

#### Option 2: From Source
```bash
git clone https://github.com/James-HoneyBadger/Time_Warp.git
cd Time_Warp
pip install -e .
```

### System Requirements
- **Python**: 3.9 or higher
- **GCC**: GNU C Compiler (build dependency)
- **OS**: Linux (executables), macOS/Windows (compilation)

## 📖 Usage

### Basic Compilation
```bash
# Compile a BASIC program
timewarp-compiler hello.bas -o hello

# Compile a Logo program
timewarp-compiler drawing.logo -o logo_app

# Compile a PILOT program
timewarp-compiler quiz.pilot -o math_quiz
```

### Command Line Options
```bash
timewarp-compiler [OPTIONS] INPUT_FILE

Options:
  -o, --output OUTPUT    Output executable name (default: same as input)
  --list-languages       List supported languages and exit
  --version              Show version information
  -h, --help             Show help message
```

### Supported File Extensions
- `.bas` - BASIC programs
- `.logo` - Logo programs
- `.pilot` - PILOT programs

## 📚 Sample Programs

### BASIC Examples

#### Hello World
```basic
10 PRINT "HELLO WORLD BASIC PROGRAM"
20 PRINT "This demonstrates basic BASIC features"
30 LET ANSWER = 21 * 2
40 PRINT "The answer is: "; ANSWER
50 INPUT "Enter your name"; NAME$
60 PRINT "Hello, "; NAME$
70 PRINT "Counting from 1 to 5:"
80 FOR I = 1 TO 5
90 PRINT I
100 NEXT I
110 PRINT "Done!"
120 END
```

#### Array Operations
```basic
10 DIM SCORES(10)
20 FOR I = 1 TO 10
30 SCORES(I) = I * 10
40 NEXT I
50 PRINT "Scores:"
60 FOR I = 1 TO 10
70 PRINT "Score"; I; ": "; SCORES(I)
80 NEXT I
90 END
```

### Logo Examples

#### Simple Shapes
```logo
TO SQUARE :SIZE
  REPEAT 4 [FORWARD :SIZE RIGHT 90]
END

TO TRIANGLE :SIZE
  REPEAT 3 [FORWARD :SIZE RIGHT 120]
END

TO CIRCLE :RADIUS
  REPEAT 36 [FORWARD (2 * 3.14159 * :RADIUS / 36) RIGHT 10]
END

SQUARE 100
TRIANGLE 80
CIRCLE 50
```

#### Fractal Tree
```logo
TO TREE :SIZE
  IF :SIZE < 5 [STOP]
  FORWARD :SIZE
  RIGHT 25
  TREE :SIZE * 0.7
  LEFT 50
  TREE :SIZE * 0.7
  RIGHT 25
  BACK :SIZE
END

TREE 100
```

### PILOT Examples

#### Math Quiz
```pilot
R: PILOT Math Quiz
R: Test your arithmetic skills

*START
T: Welcome to the Math Quiz!
T: Answer the following questions:

T: What is 5 + 3?
A: Your answer
C: #CORRECT = 8
J: (#ANS = #CORRECT) *CORRECT
T: Sorry, 5 + 3 = 8
J: *NEXT

*CORRECT
T: Correct! 5 + 3 = 8

*NEXT
T: What is 10 - 4?
A: Your answer
C: #CORRECT = 6
J: (#ANS = #CORRECT) *CORRECT2
T: Sorry, 10 - 4 = 6
J: *END

*CORRECT2
T: Excellent! 10 - 4 = 6

*END
T: Quiz complete!
E:
```

#### Interactive Story
```pilot
R: Choose Your Own Adventure

*BEGIN
T: You find yourself in a dark forest.
T: Do you go LEFT or RIGHT?

A: Your choice (LEFT/RIGHT)
J: (*ANS = LEFT) *LEFT_PATH
J: (*ANS = RIGHT) *RIGHT_PATH
T: Please choose LEFT or RIGHT
J: *BEGIN

*LEFT_PATH
T: You find a treasure chest!
T: Congratulations!
E:

*RIGHT_PATH
T: You encounter a dragon!
T: Game Over!
E:
```

## 🏗️ Architecture

### Compilation Pipeline
1. **Parse Source** - Language-specific parsing of source code
2. **Generate C Code** - Convert to optimized C with runtime libraries
3. **Compile Executable** - GCC compilation to native binary
4. **Standalone Binary** - No external dependencies required

### Language Compilers
- **BaseCompiler** - Abstract framework for language implementations
- **BasicCompiler** - Line-numbered BASIC with arrays and functions
- **LogoCompiler** - Turtle graphics with procedures and recursion
- **PilotCompiler** - Educational language with branching and variables

### Runtime Libraries
Each language includes optimized C runtime libraries for:
- String manipulation and I/O
- Mathematical operations
- Turtle graphics rendering (PPM format)
- Variable management and scope

## 📚 Documentation

### Language References
- [BASIC Language Reference](docs/languages/basic.md)
- [Logo Language Reference](docs/languages/logo.md)
- [PILOT Language Reference](docs/languages/pilot.md)

### Compiler Documentation
- [Compiler Usage Guide](docs/compiler.md)

## 🔧 Development

### Building from Source
```bash
# Clone repository
git clone https://github.com/James-HoneyBadger/Time_Warp.git
cd Time_Warp

# Install in development mode
pip install -e .

# Run tests
python -m pytest

# Build package
python -m build
```

### Testing Compilers
```bash
# Test all compilers
python -m pytest tests/

# Test specific language
python -c "from timewarp_ide.compiler import compile_file; compile_file('samples/basic/hello.bas', 'test_output')"
```

### Adding New Languages
1. Create compiler class inheriting from `BaseCompiler`
2. Implement `parse_source()` and `generate_c_code()` methods
3. Add file extension mapping in `compiler.py`
4. Include runtime library functions
5. Add comprehensive tests

## 🤝 Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md).

### Areas for Contribution
- **New Languages** - Add support for additional educational languages
- **Performance** - Optimize compilation and runtime performance
- **Platforms** - Extend support to Windows/macOS executables
- **Features** - Enhanced language features and capabilities
- **Documentation** - Improve guides and examples

## 📄 License

TimeWarp Compiler is open source software licensed under the MIT License. See [LICENSE](LICENSE) for details.

## 🙏 Acknowledgments

- **PILOT**: Inspired by the original educational programming language
- **BASIC**: Based on classic BASIC implementations
- **Logo**: Built on the turtle graphics paradigm
- **GCC**: For the excellent C compilation toolchain
- **Python Community**: For the robust packaging ecosystem

---

**⏰ TimeWarp Compiler** - Transform educational code into native executables.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/James-HoneyBadger/Time_Warp",
    "name": "timewarp-ide",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "James-HoneyBadger <timewarp-ide@example.com>",
    "keywords": "education, programming, ide, basic, logo, pilot, compiler, turtle-graphics, educational",
    "author": "James-HoneyBadger",
    "author_email": "TimeWarp Development Team <info@timewarp-ide.org>",
    "download_url": "https://files.pythonhosted.org/packages/f6/cd/14ebe5dae310e877762d2f927871fba44f249fb590e48b3d28a045cc6d89/timewarp_ide-1.0.0.tar.gz",
    "platform": null,
    "description": "# \u23f0 TimeWarp Compiler\n\n**Compile Educational Programming Languages to Native Executables**\n\nTimeWarp Compiler is a command-line tool that compiles educational programming languages (PILOT, BASIC, Logo) to native Linux executables. Transform your educational code into standalone programs that run without interpreters.\n\n[![PyPI version](https://badge.fury.io/py/timewarp-ide.svg)](https://pypi.org/project/timewarp-ide/)\n[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## \u2728 Features\n\n### \ud83c\udfaf Multi-Language Compilation\nCompile 3 educational programming languages to native executables:\n\n- **PILOT** - Educational language with turtle graphics (1960s)\n- **BASIC** - Classic line-numbered programming (1960s)\n- **Logo** - Educational turtle graphics language (1960s)\n\n### \ud83d\ude80 Native Performance\n- **GCC Compilation** - Generate optimized C code and compile to native executables\n- **Cross-Platform** - Linux executables (easily extensible to other platforms)\n- **No Runtime Dependencies** - Standalone binaries that run anywhere\n\n### \ud83d\udcda Rich Sample Programs\nComprehensive examples demonstrating language features:\n- **BASIC**: Hello world, arrays, functions, loops\n- **Logo**: Shapes, complex drawings, fractals\n- **PILOT**: Math quizzes, interactive adventures\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\n#### Option 1: PyPI (Recommended)\n```bash\npip install timewarp-ide\n```\n\n#### Option 2: From Source\n```bash\ngit clone https://github.com/James-HoneyBadger/Time_Warp.git\ncd Time_Warp\npip install -e .\n```\n\n### System Requirements\n- **Python**: 3.9 or higher\n- **GCC**: GNU C Compiler (build dependency)\n- **OS**: Linux (executables), macOS/Windows (compilation)\n\n## \ud83d\udcd6 Usage\n\n### Basic Compilation\n```bash\n# Compile a BASIC program\ntimewarp-compiler hello.bas -o hello\n\n# Compile a Logo program\ntimewarp-compiler drawing.logo -o logo_app\n\n# Compile a PILOT program\ntimewarp-compiler quiz.pilot -o math_quiz\n```\n\n### Command Line Options\n```bash\ntimewarp-compiler [OPTIONS] INPUT_FILE\n\nOptions:\n  -o, --output OUTPUT    Output executable name (default: same as input)\n  --list-languages       List supported languages and exit\n  --version              Show version information\n  -h, --help             Show help message\n```\n\n### Supported File Extensions\n- `.bas` - BASIC programs\n- `.logo` - Logo programs\n- `.pilot` - PILOT programs\n\n## \ud83d\udcda Sample Programs\n\n### BASIC Examples\n\n#### Hello World\n```basic\n10 PRINT \"HELLO WORLD BASIC PROGRAM\"\n20 PRINT \"This demonstrates basic BASIC features\"\n30 LET ANSWER = 21 * 2\n40 PRINT \"The answer is: \"; ANSWER\n50 INPUT \"Enter your name\"; NAME$\n60 PRINT \"Hello, \"; NAME$\n70 PRINT \"Counting from 1 to 5:\"\n80 FOR I = 1 TO 5\n90 PRINT I\n100 NEXT I\n110 PRINT \"Done!\"\n120 END\n```\n\n#### Array Operations\n```basic\n10 DIM SCORES(10)\n20 FOR I = 1 TO 10\n30 SCORES(I) = I * 10\n40 NEXT I\n50 PRINT \"Scores:\"\n60 FOR I = 1 TO 10\n70 PRINT \"Score\"; I; \": \"; SCORES(I)\n80 NEXT I\n90 END\n```\n\n### Logo Examples\n\n#### Simple Shapes\n```logo\nTO SQUARE :SIZE\n  REPEAT 4 [FORWARD :SIZE RIGHT 90]\nEND\n\nTO TRIANGLE :SIZE\n  REPEAT 3 [FORWARD :SIZE RIGHT 120]\nEND\n\nTO CIRCLE :RADIUS\n  REPEAT 36 [FORWARD (2 * 3.14159 * :RADIUS / 36) RIGHT 10]\nEND\n\nSQUARE 100\nTRIANGLE 80\nCIRCLE 50\n```\n\n#### Fractal Tree\n```logo\nTO TREE :SIZE\n  IF :SIZE < 5 [STOP]\n  FORWARD :SIZE\n  RIGHT 25\n  TREE :SIZE * 0.7\n  LEFT 50\n  TREE :SIZE * 0.7\n  RIGHT 25\n  BACK :SIZE\nEND\n\nTREE 100\n```\n\n### PILOT Examples\n\n#### Math Quiz\n```pilot\nR: PILOT Math Quiz\nR: Test your arithmetic skills\n\n*START\nT: Welcome to the Math Quiz!\nT: Answer the following questions:\n\nT: What is 5 + 3?\nA: Your answer\nC: #CORRECT = 8\nJ: (#ANS = #CORRECT) *CORRECT\nT: Sorry, 5 + 3 = 8\nJ: *NEXT\n\n*CORRECT\nT: Correct! 5 + 3 = 8\n\n*NEXT\nT: What is 10 - 4?\nA: Your answer\nC: #CORRECT = 6\nJ: (#ANS = #CORRECT) *CORRECT2\nT: Sorry, 10 - 4 = 6\nJ: *END\n\n*CORRECT2\nT: Excellent! 10 - 4 = 6\n\n*END\nT: Quiz complete!\nE:\n```\n\n#### Interactive Story\n```pilot\nR: Choose Your Own Adventure\n\n*BEGIN\nT: You find yourself in a dark forest.\nT: Do you go LEFT or RIGHT?\n\nA: Your choice (LEFT/RIGHT)\nJ: (*ANS = LEFT) *LEFT_PATH\nJ: (*ANS = RIGHT) *RIGHT_PATH\nT: Please choose LEFT or RIGHT\nJ: *BEGIN\n\n*LEFT_PATH\nT: You find a treasure chest!\nT: Congratulations!\nE:\n\n*RIGHT_PATH\nT: You encounter a dragon!\nT: Game Over!\nE:\n```\n\n## \ud83c\udfd7\ufe0f Architecture\n\n### Compilation Pipeline\n1. **Parse Source** - Language-specific parsing of source code\n2. **Generate C Code** - Convert to optimized C with runtime libraries\n3. **Compile Executable** - GCC compilation to native binary\n4. **Standalone Binary** - No external dependencies required\n\n### Language Compilers\n- **BaseCompiler** - Abstract framework for language implementations\n- **BasicCompiler** - Line-numbered BASIC with arrays and functions\n- **LogoCompiler** - Turtle graphics with procedures and recursion\n- **PilotCompiler** - Educational language with branching and variables\n\n### Runtime Libraries\nEach language includes optimized C runtime libraries for:\n- String manipulation and I/O\n- Mathematical operations\n- Turtle graphics rendering (PPM format)\n- Variable management and scope\n\n## \ud83d\udcda Documentation\n\n### Language References\n- [BASIC Language Reference](docs/languages/basic.md)\n- [Logo Language Reference](docs/languages/logo.md)\n- [PILOT Language Reference](docs/languages/pilot.md)\n\n### Compiler Documentation\n- [Compiler Usage Guide](docs/compiler.md)\n\n## \ud83d\udd27 Development\n\n### Building from Source\n```bash\n# Clone repository\ngit clone https://github.com/James-HoneyBadger/Time_Warp.git\ncd Time_Warp\n\n# Install in development mode\npip install -e .\n\n# Run tests\npython -m pytest\n\n# Build package\npython -m build\n```\n\n### Testing Compilers\n```bash\n# Test all compilers\npython -m pytest tests/\n\n# Test specific language\npython -c \"from timewarp_ide.compiler import compile_file; compile_file('samples/basic/hello.bas', 'test_output')\"\n```\n\n### Adding New Languages\n1. Create compiler class inheriting from `BaseCompiler`\n2. Implement `parse_source()` and `generate_c_code()` methods\n3. Add file extension mapping in `compiler.py`\n4. Include runtime library functions\n5. Add comprehensive tests\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md).\n\n### Areas for Contribution\n- **New Languages** - Add support for additional educational languages\n- **Performance** - Optimize compilation and runtime performance\n- **Platforms** - Extend support to Windows/macOS executables\n- **Features** - Enhanced language features and capabilities\n- **Documentation** - Improve guides and examples\n\n## \ud83d\udcc4 License\n\nTimeWarp Compiler is open source software licensed under the MIT License. See [LICENSE](LICENSE) for details.\n\n## \ud83d\ude4f Acknowledgments\n\n- **PILOT**: Inspired by the original educational programming language\n- **BASIC**: Based on classic BASIC implementations\n- **Logo**: Built on the turtle graphics paradigm\n- **GCC**: For the excellent C compilation toolchain\n- **Python Community**: For the robust packaging ecosystem\n\n---\n\n**\u23f0 TimeWarp Compiler** - Transform educational code into native executables.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Educational Programming IDE with Multi-Language Support",
    "version": "1.0.0",
    "project_urls": {
        "Changelog": "https://github.com/James-HoneyBadger/Time_Warp/blob/main/CHANGELOG.md",
        "Documentation": "https://timewarp-ide.readthedocs.io/",
        "Homepage": "https://github.com/James-HoneyBadger/Time_Warp",
        "Issues": "https://github.com/James-HoneyBadger/Time_Warp/issues",
        "Repository": "https://github.com/James-HoneyBadger/Time_Warp"
    },
    "split_keywords": [
        "education",
        " programming",
        " ide",
        " basic",
        " logo",
        " pilot",
        " compiler",
        " turtle-graphics",
        " educational"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c3bd876db7d3ec6396e245e9b7a62c535c569290e6c040d2990fad721f0ba554",
                "md5": "180123e9e8fbacba7d6aed4e56cfdc6a",
                "sha256": "8823f826cf8004cf19f5c62bd18dca3648bd27a32464bb700a0843fa50352a6e"
            },
            "downloads": -1,
            "filename": "timewarp_ide-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "180123e9e8fbacba7d6aed4e56cfdc6a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 351753,
            "upload_time": "2025-10-09T21:29:08",
            "upload_time_iso_8601": "2025-10-09T21:29:08.667219Z",
            "url": "https://files.pythonhosted.org/packages/c3/bd/876db7d3ec6396e245e9b7a62c535c569290e6c040d2990fad721f0ba554/timewarp_ide-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f6cd14ebe5dae310e877762d2f927871fba44f249fb590e48b3d28a045cc6d89",
                "md5": "4137da75dff8644d18ebf0d6ec88e99e",
                "sha256": "3073491222729df8e8ad9bf952e736b9465c122ca01e2f5eaa100196889cc60d"
            },
            "downloads": -1,
            "filename": "timewarp_ide-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4137da75dff8644d18ebf0d6ec88e99e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 329147,
            "upload_time": "2025-10-09T21:29:10",
            "upload_time_iso_8601": "2025-10-09T21:29:10.302333Z",
            "url": "https://files.pythonhosted.org/packages/f6/cd/14ebe5dae310e877762d2f927871fba44f249fb590e48b3d28a045cc6d89/timewarp_ide-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-09 21:29:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "James-HoneyBadger",
    "github_project": "Time_Warp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pygame",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "7.0.0"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    ">=",
                    "22.0.0"
                ]
            ]
        },
        {
            "name": "flake8",
            "specs": [
                [
                    ">=",
                    "4.0.0"
                ]
            ]
        }
    ],
    "test_requirements": [
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "7.0.0"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    ">=",
                    "4.0.0"
                ]
            ]
        },
        {
            "name": "pytest-xdist",
            "specs": [
                [
                    ">=",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "pytest-mock",
            "specs": [
                [
                    ">=",
                    "3.10.0"
                ]
            ]
        },
        {
            "name": "coverage",
            "specs": [
                [
                    ">=",
                    "7.0.0"
                ]
            ]
        },
        {
            "name": "unittest-xml-reporting",
            "specs": [
                [
                    ">=",
                    "3.2.0"
                ]
            ]
        },
        {
            "name": "pytest-html",
            "specs": [
                [
                    ">=",
                    "3.1.0"
                ]
            ]
        },
        {
            "name": "pytest-benchmark",
            "specs": [
                [
                    ">=",
                    "4.0.0"
                ]
            ]
        },
        {
            "name": "factory-boy",
            "specs": [
                [
                    ">=",
                    "3.2.0"
                ]
            ]
        },
        {
            "name": "faker",
            "specs": [
                [
                    ">=",
                    "18.0.0"
                ]
            ]
        },
        {
            "name": "pytest-qt",
            "specs": [
                [
                    ">=",
                    "4.2.0"
                ]
            ]
        },
        {
            "name": "flake8",
            "specs": [
                [
                    ">=",
                    "6.0.0"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    ">=",
                    "23.0.0"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "hypothesis",
            "specs": [
                [
                    ">=",
                    "6.75.0"
                ]
            ]
        },
        {
            "name": "parameterized",
            "specs": [
                [
                    ">=",
                    "0.9.0"
                ]
            ]
        }
    ],
    "lcname": "timewarp-ide"
}
        
Elapsed time: 2.32282s