::News
Squirrel 3.0 beta 2 has been released, check it out.

"Squirrel is a high level imperative, object-oriented programming language, designed to be a light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games."
  Overview

Squirrel is a high level imperative, object-oriented programming language, designed to be a light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games. Although Squirrel offers a wide range of features like:

  • Open Source zlib/libpng licence
  • dynamic typing
  • delegation
  • classes & inheritance
  • higher order functions
  • lexical scoping
  • generators
  • cooperative threads(coroutines) 
  • tail recursion
  • exception handling
  • automatic memory management (CPU bursts free; mixed approach ref counting/GC)
  • both compiler and virtual machine fit together in about 7k lines of C++ code.
  • optional 16bits characters strings

Squirrel is inspired by languages like Python,Javascript and expecially Lua(The API is very similar and the table code is based on the Lua one)


What Does it look like?
squirrel's syntax is similar to C/C++/Java etc... but the language has a very dynamic nature like python/Lua etc...

local table = {
	a = "10"
	subtable = {
		array = [1,2,3]
	},
	[10 + 123] = "expression index"
}
 
local array=[ 1, 2, 3, { a = 10, b = "string" } ];
 
foreach (i,val in array)
{
	::print("the type of val is"+typeof val);
}
 
/////////////////////////////////////////////
 
class Entity
{	
	constructor(etype,entityname)
	{
		name = entityname;
		type = etype;
	}
									
	x = 0;
	y = 0;
	z = 0;
	name = null;
	type = null;
}
 
function Entity::MoveTo(newx,newy,newz)
{
	x = newx;
	y = newy;
	z = newz;
}
 
class Player extends Entity {
	constructor(entityname)
	{
		Entity.constructor("Player",entityname)
	}
	function DoDomething()
	{
		::print("something");
	}
	
}
 
local newplayer = Player("da playar");
 
newplayer.MoveTo(100,200,300);			

Development state
    The current stable release is 2.2.4
    The project has been compiled and run on Windows(Windows XP/2000 on Intel x86) and Linux(Slackware 9.0 on Intel x86).
    Has been tested with the following compilers:

    MS Visual C++ 6.0,7.0 and 7.1
    MinGW gcc 3.2 (mingw special 20020817-1)
    Cygwin gcc 3.2
    Linux gcc 3.2.3


    The documentation has to be improved.

    I'd like to have some feed back and maybe help to design/port/test it.


Work in Progress

In the next release(3.0 beta2):

  • api impovements
  • performance tuning
  • additional documentation


Documentation

Squirrel 2.x

Squirrel 2.0 reference manual(PDF/HtmlHelp/Html Online)

Squirrel 2.0 Standard Libraries manual(PDF/HtmlHelp/Html Online)

both manuals are included in the language distribution


Download

stable release

You can download Squirrel 2.2.4 stable here
Released November 15, 2009.

You can download Squirrel 3.0 beta2 here
Released August 12, 2010.

Author

My name is Alberto Demichelis if you want to know more about me, this is my personal homepage