<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>success</status>
  <result>
    <project>
      <id>47378</id>
      <name>pejs</name>
      <created_at>2008-12-16T04:46:48Z</created_at>
      <updated_at>2009-08-23T00:59:36Z</updated_at>
      <description>PEJSPython Executed by JavaScriptThe project aims at implementing a Python VM in JavaScript, enabling Python on web pages in browsers all over the world :) 

For now, this is done by executing Python Byte Code Instructions as outputted by the standard CPython implementation, but the perspectives are laid out by HotRuby, where nested Ruby code is run straight out of the HTML. 

This project is sort of a Python equivalence to HotRuby. 

School projectAt the moment, this is a school project as part of the course Design of Virtual Machines for Object Oriented Languages at DAIMI, the computer science department at University of Aarhus. The course is held by Lars Bak and his staff at Google Aarhus, the V8 team. 

DetailsOur aim is to implement an object-oriented subset of Python bytecode. 

Our approach is as follows: 

We've started by implementing a simple interpreter (src/interpreter.js) which simply switches over the bytecodes and implements only some very basic language constructs. The Python bytecode is actually generated by a Python program (tools/pejs.py) which outputs it in JavaScript arrays.The JavaScript file containing the bytecodes is then referenced in an HTML-file which also references our interpreter and thus the Python code is executed in the browser. 

For a complete Python implementation we would have to write a Python compiler as well as the virtual machine we are doing. 

Milestones

 Week  Milestone  Details   44  Up and running  Simple interpreter operating on a stack   45  Basic constructs  Implemented jumps and loops   46  Object and Memory model  Decide on object representation and heap layout   47  Object and Memory model  Implement classes and objects   48  Garbage collector  Simple garbage collector if needed   49  Library calls  Handle calls to python library somehow   50  Performance evaluation  Report   51  Deadline  Report  

We aim to finish the basic language features (variables, conditionals, loops, functions) and then design and implement classes and objects which implies designing an object and a memory model. This is the most important part of the project. 

After that, we would like to handle garbage collection as well as library calls. It is not yet clear how far we will get with regard to these two issues. That depends on how complex the object implementation turns out to be. 

Finally we document our implementation with performance evaluations where we would like to consider different JavaScript VM's for executing our own VM as well as implementation alternatives inside our VM.</description>
      <homepage_url>http://code.google.com/p/pejs</homepage_url>
      <download_url></download_url>
      <url_name>pejs</url_name>
      <user_count>0</user_count>
      <average_rating></average_rating>
      <rating_count>0</rating_count>
      <analysis_id>419638</analysis_id>
      <analysis>
        <id>419638</id>
        <project_id>47378</project_id>
        <updated_at>2009-11-25T12:16:46Z</updated_at>
        <logged_at>2009-11-25T12:16:42Z</logged_at>
        <min_month>2008-10-01T00:00:00Z</min_month>
        <max_month>2008-12-01T00:00:00Z</max_month>
        <twelve_month_contributor_count>3</twelve_month_contributor_count>
        <total_code_lines>22392</total_code_lines>
        <main_language_id>9</main_language_id>
        <main_language_name>Python</main_language_name>
      </analysis>
      <licenses>
        <license>
          <name>gpl</name>
          <nice_name>GNU General Public License 2.0</nice_name>
        </license>
      </licenses>
    </project>
  </result>
</response>
