Skip to content
Pull request Compare This branch is 19 commits ahead, 4353 commits behind master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
..
Failed to load latest commit information.
benchmarks
c
compilers
config/file
embed
io
json
languages
library
mops
namespace
nci
opengl
pasm
past
pge
pir
sdl
shootout
streams
subs
tcl
tge
tools
tutorial
README

README

== NAME ==

examples - helpful examples of common tasks with Parrot

== DESCRIPTION ==

The 'examples' directory provides examples of some of the more common - and
sometimes hillarious - uses of the Parrot virtual machine. If you are new to
the world of Parrot, browsing through some of these examples can be incredibly
helpful. Most of these examples are tested by the test files in 't/examples'.

== SUBDIRECTORIES ==

* benchmarks

Benchmark test examples. They can be run with `make benchmark_tests`.
     
* c

Examples in C that demonstrate the embedding API and how the Parrot frontend
interprets bytecode.

* compilers

Example of a compiler called JAPH.

* config

An example demonstrating how Configure.pl works.

* embed

An example of how the embedding API can be used.

* io

Examples of Parrot's IO subsystem in PIR.

* json

Examples demonstrating how to generate a JSON representation of a PMC.

* languages

Contains the source files for the demo languages abc and Squaak.
Demonstrates how to use the Parrot Compiler Toolkit (PCT).

* library

Examples demonstrating how to use Parrot's runtime libraries in PIR.

* mops

Contains an example called "million ops per second" in various languages which
calculates a value for M ops/s using integer arithmetic.

* namespace

Examples demonstrating how to use namespaces in PIR.

* nci

Examples demonstrating Parrot's Native Call Interface (NCI).

* opengl

Examples demonstrating how to use the OpenGL library in PIR and Perl 6.

* pasm

Examples of common tasks in Parrot Assembly Language (PASM).

* past

Examples of a PAST to PIR translation.

* pge

Contains an example PIR generated file using the Parrot Grammar Engine (PGE).

* pir

Examples of common tasks in Parrot Intermediate Representation (PIR).

* sdl

Examples demonstrating how to use the Simple DirectMedia Layer (SDL) library in
PIR.

* shootout

Contains the PIR files used for The Computer Language Benchmark Game or The
Great Computer Languages Shootout.

* streams

Examples demonstrating how to use the Stream library.

* subs

Examples demonstrating how to call subroutines in PIR and PASM.

* tcl

Examples demonstrating how to create a Tcl/Tk GUI using the NCI.

* tge

Examples demonstrating the Tree Grammer Engine (TGE).

* tools

Examples of miscellaneous tools such as a bytecode checker and a grep-like
utility.

* tutorial

A PIR tutorial by example.

== COPYRIGHT ==

Copyright (C) 2011, Parrot Foundation.

Something went wrong with that request. Please try again.