3 people following this project (follow)

Project Description

OliveScript is a dynamically typed, interpreted scripting language written in C#. It is designed for running scripts with a high degree of control over their execution including individual Statement and Expression stepping. It can easily be embedded in .Net applications.

Purpose

OliveScript was created to meet a couple of requirements:
  • Interpreted
  • Entirely Managed
  • Low per Script Instance Overhead
  • Explicit Instruction Control
  • Reasonably Fast Execution
  • Easy and friendly syntax

Interpreted

ScriptInstances are interpreted by the runtime, they are not compiled, do not generate assemblies that can't be unloaded etc. They exist only as normal .Net objects which can be cleaned up like anything else and reparsed from source whenever they are updated. Scanning and parsing a script is generally very, very fast. The first invokation of the Scanner and Parser (cold invokation) has an overhead of about ~40 ms. On subsequent invokations (warm) the scanning and parsing takes about ~2 ms. Using SharpDevelop's AvalonEdit for syntax highlighting, code folding etc while scanning and parsing the script file while editing feels smooth, even on a netbook.

Entirely Managed

The scanner, parser and runtime are all contained within a single .Net assembly. There are no calls to any other libraries except for the BCL for .Net. This means that the project should run with little to no modification on Mono and other implementations of .Net. It also means that applications using OliveScript can run with lower privileges.
Currently tested with Mono under windows and Linux, runs well, a bit slower than Microsoft's .Net.

Low Instance Overhead

Sometimes there are needs to have many hundreds or thousands of instances of scripts in memory at once. In these cases, a large bulky runtime state is unacceptable.
Simple Program, ~100 parsed statements, x86 runtime
  • ~3.1 KB / ScriptDefinition instance
  • ~0.3 KB / RuntimeState instance

Explicit Runtime Control

Most scripting runtimes are fire-and-forget, or have difficult ways of controlling runtime. OliveScript was designed from the beginning to allow explicit execution, on a step-by-step basis. A ScriptInstance object can be executed to the end or walked through each Step of execution. This is important when synchronization or manual time sharing need to be applied.

Reasonably Fast

This is a general requirement, work towards acceptable performance characteristics but performance is not the first priority. See: Performance

Easy and Friendly Syntax

Use or create a syntax that is powerful and familiar to experienced programmers but simple and straight forward enough for those with less experience. OliveScript borrows on many conventions used by JavaScript, Lua, PHP and others. At it's core it has a C style syntax and some of the niceties provided by other languages.

Last edited Sep 17 2010 at 2:14 AM by Billknye, version 27