Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Ruby->Python compiler

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README.md
Octocat-spinner-32 amacros.rb
Octocat-spinner-32 emit.rb
Octocat-spinner-32 pmacros.rb
Octocat-spinner-32 prooby.rb
Octocat-spinner-32 rmacros.rb
Octocat-spinner-32 test.rb
README.md

Introduction

Prooby is a Ruby-inspired syntax for Python. At the moment, it uses Ruby itself to parse the code and compile to a Python AST. In the future, it is planned to be completely self-bootstrapping.

What Prooby is not

Prooby is not a Ruby implementation. When writing Prooby code, you're in Python's world. You can't use Ruby's standard library, and writing code as if you're writing for Ruby simply won't fly. Use blocks, implicit returns, nested control-flow structures, etc, but don't forget you're playing in Pythonland.

Installation

First, install prereqs:

gem install ruby_parser pp

Clone the Prooby repos

Usage

Standard prooby usage is as follows:

ruby prooby.rb input.rb | python

Notice, a great deal of debugging information is dumped to a comment at the beginning of the generated Python code. It's invaluable for development.

Todo

  • Multiple-assignment support
  • Static/class methods
  • Decorators
  • Nested control-flow structures
  • Hash constants
Something went wrong with that request. Please try again.