During the YCP Killer project, Y2R didn't translate most YCP operators and builtins into equivalent Ruby constructs but into library calls. This was necessary to preserve behavior in various edge-case situations, mostly when nil was passed around. The resulting code is often long and hard to work with.

Example from SlideShow.rb:

total_time = Ops.add( total_time, Ops.divide(Ops.get_integer(stage, "value", 0), 3495) )

The goal of this project is to find patterns in Y2R-generated code which can be safely translated into more native Ruby code and translate them. In many cases this will require proving that the edge cases mentioned above can't happen (e.g. that passed parameters can't be nil). This will be done using static analysis on the code.

The rewriting will be performed using the Parser library.

A prototype exists already.

Looking for hackers with the skills:

Nothing? Add some keywords!

This project is part of:

Hack Week 11

Activity

  • almost 10 years ago: locilka liked this project.
  • almost 10 years ago: rneuhauser liked this project.
  • almost 10 years ago: KGronlund liked this project.
  • almost 10 years ago: michal-m liked this project.
  • almost 10 years ago: dmajda joined this project.
  • almost 10 years ago: mfilka liked this project.
  • almost 10 years ago: mvidner liked this project.
  • almost 10 years ago: mvidner started this project.
  • almost 10 years ago: mvidner originated this project.

  • Comments

    • mvidner
      almost 10 years ago by mvidner | Reply

      Go!!1! You can watch the progress on the Zombie Killer board on Trello.

    Similar Projects

    This project is one of its kind!