<commit_before># Rooby

[![Join the chat at https://gitter.im/Rooby-lang/Lobby](https://badges.gitter.im/Rooby-lang/Lobby.svg)](https://gitter.im/Rooby-lang/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Build Status](https://travis-ci.org/rooby-lang/Rooby.svg?branch=master)](https://travis-ci.org/rooby-lang/Rooby)
[![Code Climate](https://codeclimate.com/github/rooby-lang/Rooby/badges/gpa.svg)](https://codeclimate.com/github/rooby-lang/rooby)
[![GoDoc](https://godoc.org/github.com/rooby-lang/Rooby?status.svg)](https://godoc.org/github.com/rooby-lang/Rooby)
[![Go Report Card](https://goreportcard.com/badge/github.com/rooby-lang/Rooby)](https://goreportcard.com/report/github.com/rooby-lang/Rooby)
[![codecov](https://codecov.io/gh/rooby-lang/Rooby/branch/master/graph/badge.svg)](https://codecov.io/gh/rooby-lang/Rooby)
[![Readme Score](http://readme-score-api.herokuapp.com/score.svg?url=rooby-lang/rooby)](http://clayallsopp.github.io/readme-score?url=rooby-lang/rooby)

Rooby is a Ruby-like object oriented language written in Go. You can think it as a simplified, compilable Ruby for now.
   

Here's my expectation about Rooby:

- Has Ruby-like syntax and object system.
- Rooby program will be compiled at first place and then executed through VM. 
- It's compilation and evaluation are separated, it can firstly compile your program into bytecode and execute it later. This will work like python.
- **Maybe** it can gain some improvement on concurrency since it's based on Go.
- Any special idea comes to my mind or proposed by you 😄 

**Join me to build Rooby together!**

## Features
- **Can be compiled into bytecode (with `.robc` extension)**
- **Can evaluate bytecode directly**
- Everything is object
- Support comment
- Object & Class
    - Top level main object
    - Constructor
    - Support class method
    - Support inheritance
    - Support instance variable
    - Support self
- Variables
    - Constant
    - Local variable
    - Instance variable
- Method
    - Support evaluation with arguments
    - Support evaluation without arguments
    - Support evaluation with block
- BuiltIn Data Types (All of them are classes 😀)
    - Class
    - Integer
    - String
    - Boolean
    - nil (has this type internally but parser hasn't support yet)
    - Hash
    - Array
    - **Not** support symbols. Since string is already immutable, supporting symbols is not that necessary.
- Flow control
    - If statement
    - while statement
    - Haven't support `for` yet
- IO
    - Just `puts` for now
    
**(You can open an issue for any feature request)** 
    
## TODO

See [github progjects](https://github.com/rooby-lang/Rooby/projects)

## Install

1. You must have Golang installed
2. You must have set $GOPATH
3. Add your $GOPATH/bin into $PATH
4. Run following command 

```
$ go get github.com/rooby-lang/Rooby
```

## Usage

**Execute Rooby file using VM**

(might see errors on sample-6 since vm hasn't support block yet)<commit_msg>Update readme with new goal.<commit_after># Rooby

[![Join the chat at https://gitter.im/Rooby-lang/Lobby](https://badges.gitter.im/Rooby-lang/Lobby.svg)](https://gitter.im/Rooby-lang/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Build Status](https://travis-ci.org/rooby-lang/Rooby.svg?branch=master)](https://travis-ci.org/rooby-lang/Rooby)
[![Code Climate](https://codeclimate.com/github/rooby-lang/Rooby/badges/gpa.svg)](https://codeclimate.com/github/rooby-lang/rooby)
[![GoDoc](https://godoc.org/github.com/rooby-lang/Rooby?status.svg)](https://godoc.org/github.com/rooby-lang/Rooby)
[![Go Report Card](https://goreportcard.com/badge/github.com/rooby-lang/Rooby)](https://goreportcard.com/report/github.com/rooby-lang/Rooby)
[![codecov](https://codecov.io/gh/rooby-lang/Rooby/branch/master/graph/badge.svg)](https://codecov.io/gh/rooby-lang/Rooby)
[![Readme Score](http://readme-score-api.herokuapp.com/score.svg?url=rooby-lang/rooby)](http://clayallsopp.github.io/readme-score?url=rooby-lang/rooby)

Rooby is a Ruby-like object oriented language written in Go. You can think it as a simplified, compilable Ruby for now.
   

## Goal

I want to build a language that focuses on developing micro-services. Which should be performant and easy to write. This is why Rooby has Ruby's user friendly syntax and is written in Go.

## Supported features
- **Can be compiled into bytecode (with `.robc` extension)**
- **Can evaluate bytecode directly**
- Everything is object
- Support comment 
- Object and Class
    - Top level main object
    - Constructor
    - Support class method
    - Support inheritance
    - Support instance variable
    - Support self
- Variables
    - Constant
    - Local variable
    - Instance variable
- Method
    - Support evaluation with arguments
    - Support evaluation without arguments
    - Support evaluation with block (closure)
- BuiltIn Data Types (All of them are classes 😀)
    - Class
    - Integer
    - String
    - Boolean
    - nil (has this type internally but parser hasn't support yet)
    - Hash
    - Array
- Flow control
    - If statement
    - while statement
    - Haven't support `for` yet
- IO
    - Just `puts` for now
    
**(You can open an issue for any feature request)** 
    
## TODO

See [github progjects](https://github.com/rooby-lang/Rooby/projects)

## Install

1. You must have Golang installed
2. You must have set $GOPATH
3. Add your $GOPATH/bin into $PATH
4. Run following command 

```
$ go get github.com/rooby-lang/Rooby
```

## Usage

**Execute Rooby file using VM**

(might see errors on sample-6 since vm hasn't support block yet)
{'fraction_non_alphanumeric': 0.1266560678325384, 'fraction_numerical': 0.0017664723547076487, 'mean_word_length': 3.6220408163265305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 28, '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': '3764054', 'n_tokens_mistral': 1860, 'n_tokens_neox': 1808, 'n_words': 510}