About

Overview

Pika, named after the North American lagomorph of the same name is a dynamic, object-oriented programming language. It has a friendly, easy to use syntax. Code is executed inside a stack-oriented byte-code based virtual machine. The interpreter can be embedded making Pika an ideal extension language for native C++ applications including video games. Pika's command-line interpreter can use the built-in REPL, allowing interactive programming sessions. The runtime environment is sandboxed with automatic memory management and an incremental mark and sweep garbage collector.

Features:

  • Class based object system
  • Ability to overload operators
  • Incremental Mark and Sweep Garbage Collector
  • Duck Typing
  • Properties with get & set accessor functions
  • Packages
  • Enumerators
  • Labeled break and continue statements
  • Native API for binding C++ shared libraries, classes, functions and variables
  • Unified import system works with Scripts and native C/C++ Modules
  • Exception Handling (try, catch, finally and raise)
  • finally can be used as a Block finalizers for loops, functions and more
  • First class functions
  • Lexical Scoping
  • Closures
  • Lambda expressions: \(x, y)=> x + y
  • Anonymous function expressions function(x, y) return x + y end
  • Default values for functions
  • Variable argument functions
  • Multiple return and yield values
  • Optional Keyword Arguments
  • Coroutines (aka Cooperative Threads)
  • Annotation syntax for Classes, Functions, Properties and Packages

License

Pika is released under the terms of the zlib License. The zlib License is not copyleft. This means the code can be used for personal, educational and commercial projects without releasing the source code. It is also compatible with a majority of the other Open-Source licenses, including the GPL, LGPL, MIT and BSD.

the zlib License

Pika
Copyright (c) 2008, Russell J. Kyle <>

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
    claim that you wrote the original software. If you use this software
    in a product, an acknowledgment in the product documentation would be
    appreciated but is not required.
    
    2. Altered source versions must be plainly marked as such, and must not be
    misrepresented as being the original software.
    
    3. This notice may not be removed or altered from any source
    distribution.

As you can see the license is simple and straight forward. It means you cannot claim authorship of the code and if you distribute or change the source code the original copyright must remain in place. If you distribute a binary that contains Pika then credit does not need to be given but it would be nice.

Downloads

There are two ways obtain Pika. The first is to download one of the files hosted on SourceForge.net. The second is the check out a copy from the Mercurial repository. What you decide to do will depend on your level of expertise. If you are not an experienced programmer, I recommend downloading one of the installers to get you started.

The older Windows installers might complain about missing dlls, this is because you do not have the Visual Studio 10 Redistributable Runtime. Starting with version 0.8.1 the correct dlls will be included with the installer.

Most Recent Downloads

Mercurial Repository

If you do not have Mercurial installed you will need to do so before you can access the online repository. Go to http://mercurial.selenic.com/ and follow the directions. It might be helpful to reference the Mercurial guide book if you run into trouble. Once installed you can access and clone the Mercurial repository with a single command. From the command line navigate to the directory you want to download Pika to and type the following:

> hg clone http://pika.hg.sourceforge.net:8000/hgroot/pika/pika

Now you have a local copy of the code that you can build and modify. The repository is read-only meaning any local changes cannot be pushed upstream.

Documentation

  • The Pika 0.10.1 - Programming Guide (html)
  • Pika 0.10.1 - Documentation (coming soon)
  • The Pika Language wiki (link)
  • The build guide is now locate on the Pika Language wiki (Build Guide)

Contact

If you end up using Pika for any projects or find any bugs please let me know.

Address all questions and comments to Russell at: . Please include the word Pika in the subject line, otherwise the e-mail may be treated as SPAM.

Although I would prefer to talk via e-mail there are forums hosted by SourceForge located at https://sourceforge.net/projects/pika/forums. They can be used for questions and general discussions but you must be logged in with your SourceForge account to post.