<commit_before>Coffee-JVM: A JVM in Coffeescript
=================================
[Mid-term project](http://plasma.cs.umass.edu/emery/grad-systems-project-1) 
for [CS 691ST, Spring 2012](http://plasma.cs.umass.edu/emery/grad-systems).

Use the [wiki](https://github.com/int3/coffee-jvm/wiki) for TODOs, links to resources, etc.

Getting & Building the Code
---------------------------

After `git clone`, do

    git submodule update --init --recursive

Most programs need the Java Class Library. On OS X Lion it can be found at

    /System/Library/Frameworks/JavaVM.framework/Classes/classes.jar

Unzip it into `third_party/classes`.

Use [Coffeescript v1.2.0](http://coffeescript.org/) (which is the default version you get from npm).
Run `coffee -wc */*.coffee &` to auto-gen scripts as you go.

Usage
-----

Run `python -m SimpleHTTPServer 8000` in the project root, 
then access the browser frontend at [localhost:8000](http://localhost:8000/).

The code can also be run from the console. E.g.

    coffee console/disassembler.coffee <test/Println.class
    coffee console/runner.coffee <test/Println.class

It requires the `optimist` node module.

Testing
-------

Run the automated test-runner to check disassembly output:

    ./tools/run_tests.rb

To run the VM itself on all test files, do `make run`. No automatic
checks are done on the correctness of the output.<commit_msg>updating instructions<commit_after>Coffee-JVM: A JVM in Coffeescript
=================================
[Mid-term project](http://plasma.cs.umass.edu/emery/grad-systems-project-1) 
for [CS 691ST, Spring 2012](http://plasma.cs.umass.edu/emery/grad-systems).

Use the [wiki](https://github.com/int3/coffee-jvm/wiki) for TODOs, links to resources, etc.

Getting & Building the Code
---------------------------

After `git clone`, do

    git submodule update --init --recursive

Most programs need the Java Class Library. On OS X Lion:

    cd third_party/classes
    unzip /System/Library/Frameworks/JavaVM.framework/Classes/classes.jar

Use [Coffeescript v1.2.0](http://coffeescript.org/) (which is the default version you get from npm).
Run `coffee -wc */*.coffee &` to auto-generate javascript sources if you make any changes to the code.

If you want to run the console-based frontend, you'll need the `optimist` node.js library:

    npm install optimist
    
Usage
-----

Run `python -m SimpleHTTPServer 8000` in the project root, 
then access the browser frontend at [localhost:8000](http://localhost:8000/).

The code can also be run from the console. For example:

    ./console/disassembler.coffee test/Println.class
    ./console/runner.coffee test/Println.class

Testing
-------

Run the automated test-runner to check runtime and disassembler output:

    ./tools/run_tests.rb

{'fraction_non_alphanumeric': 0.15063063063063062, 'fraction_numerical': 0.017297297297297298, 'mean_word_length': 3.4274322169059013, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4163109', 'n_tokens_mistral': 907, 'n_tokens_neox': 840, 'n_words': 287}