Squirrel (programming Language)
   HOME

TheInfoList



OR:

Squirrel is a high level imperative,
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pro ...
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
, designed to be a
lightweight Lightweight is a weight class in combat sports and rowing. Boxing Professional boxing The lightweight division is over 130 pounds (59 kilograms) and up to 135 pounds (61.2 kilograms) weight class in the sport of boxing. Notable lightweight boxe ...
scripting language A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled. A scripting ...
that fits in the size, memory bandwidth, and real-time requirements of applications like
video game Video games, also known as computer games, are electronic games that involves interaction with a user interface or input device such as a joystick, controller, keyboard, or motion sensing device to generate visual feedback. This fee ...
s. MirthKit, a simple toolkit for making and distributing open source, cross-platform 2D games, uses Squirrel for its platform. It is used extensively by Code::Blocks for scripting and was also used in '' Final Fantasy Crystal Chronicles: My Life as a King''. It is also used in ''
Left 4 Dead 2 ''Left 4 Dead 2'' is a 2009 first-person shooter game developed and published by Valve. The sequel to Turtle Rock Studios's ''Left 4 Dead'' (2008) and the second game in the ''Left 4 Dead'' series, it was released for Microsoft Windows and Xbox ...
'', ''
Portal 2 ''Portal 2'' is a 2011 puzzle-platform video game developed by Valve Corporation, Valve for Windows, Mac OS X, Linux, PlayStation 3, and Xbox 360. The digital PC version is distributed online by Valve's Steam (service), Steam service, while al ...
'' and ''
Thimbleweed Park ''Thimbleweed Park'' is a point-and-click adventure game developed by Ron Gilbert and Gary Winnick for Linux, macOS, Windows, Xbox One, PlayStation 4, iOS, Nintendo Switch, Android, and Amazon Luna. The game was revealed on November 18, 2014, a ...
'' for scripted events and in NewDark, an unofficial '' Thief 2: The Metal Age'' engine update, to facilitate additional, simplified means of scripting mission events, aside of the regular C scripting.


Language features

*
Dynamic typing In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a type to every "term" (a word, phrase, or other set of symbols). Usually the terms are various constructs of a computer progra ...
* Delegation * Classes,
inheritance Inheritance is the practice of receiving private property, Title (property), titles, debts, entitlements, Privilege (law), privileges, rights, and Law of obligations, obligations upon the death of an individual. The rules of inheritance differ ...
*
Higher order functions In mathematics and computer science, a higher-order function (HOF) is a function that does at least one of the following: * takes one or more functions as arguments (i.e. a procedural parameter, which is a parameter of a procedure that is itse ...
* Generators *Cooperative threads ( coroutines) *
Tail recursion In computer science, a tail call is a subroutine call performed as the final action of a procedure. If the target of a tail is the same subroutine, the subroutine is said to be tail recursive, which is a special case of direct recursion. Tail recur ...
*
Exception handling In computing and computer programming, exception handling is the process of responding to the occurrence of ''exceptions'' – anomalous or exceptional conditions requiring special processing – during the execution of a program. In general, an ...
*Automatic memory management (mainly
reference counting In computer science, reference counting is a programming technique of storing the number of references, pointers, or handles to a resource, such as an object, a block of memory, disk space, and others. In garbage collection algorithms, referenc ...
with backup
garbage collector A waste collector, also known as a garbageman, garbage collector, trashman (in the US), binman or (rarely) dustman (in the UK), is a person employed by a public or private enterprise to collect and dispose of municipal solid waste (refuse) and r ...
) *
Weak reference In computer programming, a weak reference is a reference that does not protect the referenced object from collection by a garbage collector, unlike a strong reference. An object referenced ''only'' by weak references – meaning "every chain of ref ...
s *Both
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
and
virtual machine In computing, a virtual machine (VM) is the virtualization/emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized hardw ...
fit together in about 7k lines of
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
code *Optional
16-bit 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two mos ...
character
strings String or strings may refer to: *String (structure), a long flexible structure made from threads twisted together, which is used to tie, bind, or hang other objects Arts, entertainment, and media Films * ''Strings'' (1991 film), a Canadian anim ...


Syntax

Squirrel uses a C-like syntax. ;Factorial in Squirrel: function factorial(x) ;Generators: function not_a_random_number_generator(max) local randtor = not_a_random_number_generator(100); for(local i = 0; i < 10; i += 1) print(">"+resume randtor+"\n"); ;Classes and inheritance: class BaseVector class Vector3 extends BaseVector local v0 = Vector3(1,2,3) local v1 = Vector3(11,12,13) local v2 = v0 + v1; v2.Print();


Applications


Applications using Squirrel

* Code::Blocks, integrated development environment *
Enduro/X Enduro/X is an open-source middleware platform for distributed transaction processing. It is built on proven APIs such as X/Open group's XATMI and XA. The platform is designed for building real-time microservices based applications with a cl ...
, cluster application server * Electric Imp, an end-to-end IoT platform


Games using Squirrel

* ''
Alien Swarm ''Alien Swarm'' is a multiplayer top-down shooter video game developed by Valve. It is a remake of a mod for ''Unreal Tournament 2004'', and it was developed by the original team, who were hired by Valve during the course of the development pro ...
'' * '' Antinomy of Common Flowers'' * ''
Apex Legends ''Apex Legends'' is a free-to-play Battle royale game, battle royale-hero shooter game developed by Respawn Entertainment and published by Electronic Arts. It was released for PlayStation 4, Windows, and Xbox One in February 2019, for Nintendo ...
'' * '' Battle Brothers'' * '' Contagion'' (PC) * '' Counter Strike: Global Offensive'' * '' CRSED: F.O.A.D.'' * '' Final Fantasy Crystal Chronicles: My Life as a King'' * ''
GTA IV ''Grand Theft Auto IV'' is a 2008 action-adventure game developed by Rockstar North and published by Rockstar Games. It is the sixth main entry in the ''Grand Theft Auto'' series, following 2004's '' Grand Theft Auto: San Andreas'', and the e ...
s IV-MP * ''
Left 4 Dead 2 ''Left 4 Dead 2'' is a 2009 first-person shooter game developed and published by Valve. The sequel to Turtle Rock Studios's ''Left 4 Dead'' (2008) and the second game in the ''Left 4 Dead'' series, it was released for Microsoft Windows and Xbox ...
'' * ''Liberty Unleashed'' * ''
Mafia II ''Mafia II'' is a 2010 action-adventure game developed by 2K Czech and published by 2K Games. It was released in August 24 2010 for PlayStation 3, Windows, and Xbox 360. The game is a standalone sequel to 2002's ''Mafia (video game), Mafia'', an ...
s M2-Multiplayer * '' Nuclear Dawn'' * '' OpenTTD'' * ''
Portal 2 ''Portal 2'' is a 2011 puzzle-platform video game developed by Valve Corporation, Valve for Windows, Mac OS X, Linux, PlayStation 3, and Xbox 360. The digital PC version is distributed online by Valve's Steam (service), Steam service, while al ...
'' * ''
Shadow Warrior ''Shadow Warrior'' is a series of first-person shooter video games that focuses on the exploits of Lo Wang, a modern ninja warrior who fights through hordes of demons. The original series is made up of one game, '' Shadow Warrior'' (1997), and t ...
'' * ''
Simutrans ''Simutrans'' is a cross-platform simulation game in which the player strives to run a successful transport system by constructing and managing transportation systems for passengers, mail and goods by land (rail, road, tram, monorail, maglev), ai ...
'' * ''
Sonic Unleashed ''Sonic Unleashed'' is a 2008 platform video game in the ''Sonic the Hedgehog'' series. The story follows Sonic the Hedgehog (character), Sonic as he attempts to restore the world after his nemesis Doctor Eggman shatters it with a powerful laser ...
'' (PS2/Wii) * ''
SuperTux ''SuperTux'' is a free and open-source two-dimensional platform video game published under the GNU General Public License (GPL). The game was inspired by Nintendo's '' Super Mario Bros.'' series; instead of Mario, the hero in the game is Tux, ...
'' * ''
Team Fortress 2 ''Team Fortress 2'' is a 2007 multiplayer first-person shooter, first-person shooter game developed and published by Valve Corporation. It is the sequel to the 1996 ''Team Fortress'' Mod (video gaming), mod for ''Quake (video game), Quake'' and ...
'' * ''
Thimbleweed Park ''Thimbleweed Park'' is a point-and-click adventure game developed by Ron Gilbert and Gary Winnick for Linux, macOS, Windows, Xbox One, PlayStation 4, iOS, Nintendo Switch, Android, and Amazon Luna. The game was revealed on November 18, 2014, a ...
'' * ''
Thief II ''Thief II: The Metal Age'' is a 2000 stealth video game developed by Looking Glass Studios and published by Eidos Interactive. Like its predecessor '' Thief: The Dark Project'', the game follows Garrett, a master thief who works in and arou ...
'' (unofficial NewDark engine update) * ''
Titanfall ''Titanfall'' is a series of video games that mainly feature first-person shooter games. The series was created by Respawn Entertainment and debuted on Xbox and Microsoft Windows; it has expanded to other consoles and platforms. Gameplay In ''T ...
'' * ''Vice City Multiplayer'', a mod for '' Grand Theft Auto: Vice City'' * ''
War Thunder ''War Thunder'' is a free-to-play vehicular combat multiplayer video game developed and published by Gaijin Entertainment. Announced in 2011, it was first released in November 2012 as an open beta with a worldwide release in January 2013; it had ...
'' * ''
Zero no Tsukaima - Maigo no Period to Ikusen no Symphony 0 (zero) is a number representing an empty quantity. In place-value notation such as the Hindu–Arabic numeral system, 0 also serves as a placeholder numerical digit, which works by multiplying digits to the left of 0 by the radix, usual ...
'' (PS2) * '' Zero no Tsukaima - Muma ga Tsumugu Yokaze no Nocturne'' (PS2) * '' Zero no Tsukaima - Shou-akuma to Harukaze no Concerto'' (PS2)


History

The language was made public in 2003 under the zlib/libpng license. In November 2010, the license was changed to the
MIT license The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts only very limited restriction on reuse and has, therefore, high license comp ...
to enable the project to be hosted on
Google Code Google Developers (previously Google Code) , application programming interfaces (APIs), and technical resources. The site contains documentation on using Google developer tools and APIs—including discussion groups and blogs for developers usin ...
. It is developed and maintained by Alberto Demichelis.


See also

*
Lua Lua or LUA may refer to: Science and technology * Lua (programming language) * Latvia University of Agriculture * Last universal ancestor, in evolution Ethnicity and language * Lua people, of Laos * Lawa people, of Thailand sometimes referred t ...
*
AngelScript AngelScript is a game-oriented compiled scripting language. AngelScript features static typing, object handles (similar to C++ pointers but garbage collected via reference counting), object-orientation, single inheritance, multiple inheritance ...
*
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
*
ECMAScript ECMAScript (; ES) is a JavaScript standard intended to ensure the interoperability of web pages across different browsers. It is standardized by Ecma International in the documenECMA-262 ECMAScript is commonly used for client-side scripting o ...
*
Ruby A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sa ...


References


External links

* {{DEFAULTSORT:Squirrel (Programming Language) 2003 software Cross-platform free software Free computer libraries Free software programmed in C Object-oriented programming languages Procedural programming languages Programming languages Programming languages created in 2003 Scripting languages Software using the MIT license