# Show Xojo: Roo - A programming language written in Xojo

**URL:** <https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649>\
**Category:** General\
**Created:** [January 18, 2018, 1:10pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649 "2018-01-18T13:10:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [January 18, 2018, 1:10pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/1 "2018-01-18T13:10:47Z")

</div>

Hi everyone.

I thought I’d share my latest project: [Roo](https://github.com/roolang/roo). Roo is an object-orientated dynamically-typed interpreted scripting language written entirely in Xojo. The syntax is a mix between Python (indentation control block scoping, etc) and Ruby (everything is an object). The project is open source and I’ve prioritised code readability over performance so people can try to learn how a programming language is made. The lexer, parser and interpreter are all hand written from scratch in Xojo. It currently supports the following:

- Variables (Text, Numbers, Booleans, arrays)
- Functions (with/without parameters) and closures
- Loops (let…do…until and while)
- if…elif…else constructs and the ternary operator
- Classes (including static methods, inheritance and method overloading)
- Modules

It’s extensively documented over at ([GitHub](https://github.com/roolang/roo)).

It’s a command line tool so just either compile it from source or download one of the prepared binaries from the [releases page](https://github.com/roolang/roo/releases). It can either be used as a REPL in a Terminal (interpreting things line by line as you enter them) or it can execute a script (text file with the .roo extension) by passing it as an argument.

I’d really appreciate any feedback. Happy to answer any questions on it.

---

<div class="post-metadata">

**Author:** ![Phillip\_Zedalis](https://forum.xojo.com/user_avatar/forum.xojo.com/phillip_zedalis/32/1151_2.png) [@Phillip\_Zedalis](https://forum.xojo.com/u/Phillip_Zedalis)\
**Post date:** [January 18, 2018, 4:10pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/2 "2018-01-18T16:10:53Z")

</div>

Very cool - will check it out.

---

<div class="post-metadata">

**Author:** ![Louis\_D](https://forum.xojo.com/letter_avatar_proxy/v4/letter/l/cab0a1/32.png) [@Louis\_D](https://forum.xojo.com/u/Louis_D)\
**Post date:** [January 18, 2018, 4:26pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/3 "2018-01-18T16:26:31Z")

</div>

Very cool indeed. Just make sure that this is not going against the Xojo EULA.

---

<div class="post-metadata">

**Author:** ![ChristopheDV](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@ChristopheDV](https://forum.xojo.com/u/ChristopheDV)\
**Post date:** [January 18, 2018, 5:27pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/4 "2018-01-18T17:27:34Z")

</div>

> [@369582:@Louis Desjardins](#):
>
> Very cool indeed. Just make sure that this is not going against the Xojo EULA.

Yes, I don’t think it is allowed to make another language with Xojo.

---

<div class="post-metadata">

**Author:** ![Geoff\_Perlman](https://forum.xojo.com/user_avatar/forum.xojo.com/geoff_perlman/32/48_2.png) [@Geoff\_Perlman](https://forum.xojo.com/u/Geoff_Perlman)\
**Post date:** [January 18, 2018, 5:49pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/5 "2018-01-18T17:49:01Z")

</div>

> [@369601:@Christoph De Vocht](#):
>
> Yes, I don’t think it is allowed to make another language with Xojo.

There’s nothing in our EULA that prohibits creating a language with Xojo. What would be prohibited would be if you provided a runtime or other ability to distribute a stand alone application that didn’t rely on the user having a Xojo license. That’s where you’d run afoul of our EULA.

---

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [January 18, 2018, 6:01pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/6 "2018-01-18T18:01:43Z")

</div>

@Geoff Perlman: I have binaries for the interpreter in the GitHub repo. Is that allowed? The interpreter only executes scripts and can’t create standalone applications. Plus I wouldn’t recommend using Roo for anything too demanding - the code is executed by walking the AST after all so don’t expect break neck speeds 🙂

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [January 18, 2018, 6:17pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/7 "2018-01-18T18:17:26Z")

</div>

regarding the EULA, you can make anything with Xojo, just a word in the about box “made with xojo” is needed if it is a programming tool.

---

<div class="post-metadata">

**Author:** ![Nicholas\_Loveday](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@Nicholas\_Loveday](https://forum.xojo.com/u/Nicholas_Loveday)\
**Post date:** [January 19, 2018, 5:45am UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/8 "2018-01-19T05:45:06Z")

</div>

Ooh very cool.

---

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [January 26, 2018, 10:13pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/9 "2018-01-26T22:13:29Z")

</div>

Just pushed a [big update](https://github.com/gkjpettet/roo/releases/tag/1.1.1) to Roo to [GitHub](https://github.com/gkjpettet/roo). Many, many changes, most significantly you can now include any number of files in a script using the `require statement`. This makes the creation of third party libraries possible. I’ll be looking to flesh this out over the next couple of point releases. I’m also looking at making it easier to install, probably using [Homebrew](https://brew.sh) on macOS and [Linuxbrew](http://linuxbrew.sh) on Linux.

Feedback welcome as always!

---

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [January 28, 2018, 10:13pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/10 "2018-01-28T22:13:59Z")

</div>

It’s now possible to easily install Roo and keep it updated using the brilliant [Homebrew](https://brew.sh/) package manager on macOS. Once Homebrew is installed, you can install Roo quickly with the following terminal commands:

`brew tap roolang/homebrew-roo
brew install roo`

I’m going to start working on supporting quick Linux installation with either `apt` or [Linuxbrew](http://linuxbrew.sh/). After that, I’ll tackle Windows with [Scoop](https://scoop.sh).

---

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [January 28, 2018, 11:17pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/11 "2018-01-28T23:17:51Z")

</div>

I don’t seem to be able to edit the original post but I’ve changed the GitHub homepage and releases page away from my personal GitHub account and to the language’s own GitHub account. The new details are as below:

[Homepage](https://github.com/roolang/roo)  
[Releases](https://github.com/roolang/roo/releases)

---

<div class="post-metadata">

**Author:** ![Mathias\_Maes1](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/4da419/32.png) [@Mathias\_Maes1](https://forum.xojo.com/u/Mathias_Maes1)\
**Post date:** [January 29, 2018, 7:43am UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/12 "2018-01-29T07:43:25Z")

</div>

Pretty impressive Garry!

---

<div class="post-metadata">

**Author:** ![Nicholas\_Loveday](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@Nicholas\_Loveday](https://forum.xojo.com/u/Nicholas_Loveday)\
**Post date:** [January 29, 2018, 11:35am UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/13 "2018-01-29T11:35:44Z")

</div>

Garry I’ve converted this to run as a desktop app in a window for evaluation. OK its slow as it walks the AST tree as someone pointed out earlier, but highly instructive for someone needing an interpreter - I had started on my own but you’ve caused me to ditch it and start afresh.

My coding time is unfortunately highly constrained between a day job and a 3-year old at home.

---

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [January 29, 2018, 1:00pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/14 "2018-01-29T13:00:25Z")

</div>

[quote=371240:@Nicholas Loveday]Garry I’ve converted this to run as a desktop app in a window for evaluation. OK its slow as it walks the AST tree as someone pointed out earlier, but highly instructive for someone needing an interpreter - I had started on my own but you’ve caused me to ditch it and start afresh.

My coding time is unfortunately highly constrained between a day job and a 3-year old at home.[/quote]  
Glad you’re finding it instructive. I totally hear you vis a vis a kids! I’m just trying to nail down the language syntax at the moment and get the interpreter fully baked before I look to optimise it. Once I’ve optimised the interpreter I’m going to make a start on a bytecode VM (like Java) for it - again written in Xojo.

If you need any pointers, happy to help out.

Also note the [updated URL](https://github.com/roolang/roo).

---

<div class="post-metadata">

**Author:** ![Bernardo\_Monsalve](https://forum.xojo.com/letter_avatar_proxy/v4/letter/b/d07c76/32.png) [@Bernardo\_Monsalve](https://forum.xojo.com/u/Bernardo_Monsalve)\
**Post date:** [January 29, 2018, 1:18pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/15 "2018-01-29T13:18:09Z")

</div>

[quote=371179:@Garry Pettet]…  
I’m going to start working on supporting quick Linux installation with either `apt` or [Linuxbrew](http://linuxbrew.sh/). After that, I’ll tackle Windows with [Scoop](https://scoop.sh).[/quote]

you can use [Chocolatey](https://chocolatey.org/) as package manager in Windows, I use it, may be I could upload it for you.

It’s interesting the Project, you have thinking about async operations? it would be really nice.

---

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [January 29, 2018, 2:19pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/16 "2018-01-29T14:19:10Z")

</div>

> [@371262:@Bernardo Monsalve](#):
>
> you can use [Chocolatey](https://chocolatey.org/) as package manager in Windows, I use it, may be I could upload it for you.

If you could help with packaging it for Chocolatey that would be great! The interpreter expects the folder `packages` to be in the same folder as the executable `roo`. This is easily achieved with Homebrew as `roo` is symlinked into the user’s path. Not sure if that’s how Chocolatey works. If not, I could alter the expected path for `packages` from within the interpreter.

---

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [January 29, 2018, 2:20pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/17 "2018-01-29T14:20:04Z")

</div>

> [@371262:@Bernardo Monsalve](#):
>
> It’s interesting the Project, you have thinking about async operations? it would be really nice.

Thanks. async is on the agenda but I want to nail down the base language syntax first. Then add IO operations, then async.

---

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [January 30, 2018, 4:35pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/18 "2018-01-30T16:35:30Z")

</div>

[Version 1.1.9 is out!](https://github.com/roolang/roo/releases)

In addition to some new Array methods, this now adds support for installing Roo not only with [Homebrew](https://brew.sh) on macOS but also with [Scoop](http://scoop.sh) on Windows.

Installing on Windows is now as easy as typing this in the Powershell or Command Prompt:

```auto
scoop install https://raw.githubusercontent.com/roolang/scoop-roo/master/roo.json
```

and on macOS in the Terminal:

`brew tap roolang/homebrew-roo
brew install roo`

Additionally, weird characters are no longer printed to the console on Windows. This was due to Roo trying to colourise the output of errors but this doesnt seem to be supported on Windows (a Shell limitation). Colouring continues to work fine on macOS and Linux.

---

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [February 1, 2018, 12:08am UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/19 "2018-02-01T00:08:39Z")

</div>

Right, I think I’ve got package management sorted. It’s now a doddle to install Roo on macOS, Linux (64-bit) and Windows (64-bit) using Homebrew, Snaps and Scoop. Full instructions are provided in the [README](https://github.com/roolang/roo#installing-and-using). I recommend uninstalling Roo and using these package managers to keep up to date as it makes things a lot easier.

---

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [February 1, 2018, 11:17pm UTC](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649/20 "2018-02-01T23:17:22Z")

</div>

[Release 1.2.1](https://github.com/roolang/roo/releases/tag/1.2.1) is out. In addition to adding `Array.find(obj as Object)` and `Array.insert!(index as Integer, obj as Object)` methods, I’ve laid the foundations for supporting built-in modules. This will allow me to namespace internally which means I can soon add native file system manipulation. Currently you can see these native modules in action with `Roo.version()` and `Maths.PI`.

If you’ve installed Roo with one of the packages managers described in the [README](https://github.com/roolang/roo/blob/master/README.md#installing-and-using) then updating to the latest version is as easy as:

macOS

`brew update
brew upgrade`

Linux (64-bit)

```auto
sudo snap refresh roo
```

Windows

`scoop update
scoop update roo`

[Next page](https://forum.xojo.com/t/show-xojo-roo-a-programming-language-written-in-xojo/41649.md?page=2)
