FACTOID # 162: You are more likely to be reported as having been killed by lightning in Cuba than in any other country.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Parrot virtual machine
This article or section contains information about computer software currently in development.
The content may change as the software development progresses.

Parrot is a register-based virtual machine being developed using the C programming language and intended to run dynamic languages efficiently. It uses just-in-time compilation for speed to reduce the interpretation overhead. It is currently possible to compile Parrot assembly language and PIR (an intermediate language) to Parrot bytecode and execute it. Image File history File links Current_event_marker. ... It has been suggested that this article or section be merged with Computer program. ... Software development stages In computer programming, development stage terminology expresses how the development of a piece of software has progressed and how much further development it may require. ... Image File history File links Nuvola_apps_kpager. ... In computer architecture, a processor register is a small amount of very fast computer memory used to speed the execution of computer programs by providing quick access to commonly used values—typically, the values being in the midst of a calculation at a given point in time. ... In computer science, a virtual machine is software that creates a virtualized environment between the computer platform and its operating system, so that the end user can operate software on an abstract machine. ... C is a general-purpose, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ... In computer science, a dynamic programming language is a kind of programming language in which programs can change their structure as they run: functions may be introduced or removed, new classes of objects may be created, new modules may appear. ... In computing, just-in-time compilation (JIT), also known as dynamic translation, is a technique for improving the performance of bytecode-compiled programming systems, by translating bytecode into native machine code at runtime. ... The Parrot assembly language or PASM is the basic assembly language used by the Parrot virtual machine, a part of the Perl 6 project. ... The Parrot intermediate representation or PIR, previously called Intermediate code (IMC), is one of the two assembly languages for the Parrot virtual machine. ...


Parrot was started by the Perl community, and is developed with help from the open source and free software communities. As a result, it is focused on license compatibility (Artistic License 2.0), platform compatibility across a broad array of systems, processor architectures compatibility across most modern processors, speed of execution, small size (around 700k depending on platform), and being flexible enough to handle the varying demands of Perl, and most, if not all, other modern dynamic languages. It is also focusing on improving introspection, debugger capabilities, and compile-time semantic modulation. Wikibooks has a book on the topic of Perl Programming Perl is a dynamic programming language created by Larry Wall and first released in 1987. ... Open source refers to projects that are open to the public and which draw on other projects that are freely available to the general public. ... Clockwise from top: The logo of the GNU Project (the GNU head), the Linux kernel mascot Tux the Penguin, and the FreeBSD daemon Free software is a term coined by Richard Stallman and the Free Software Foundation[1] to refer to software that can be used, studied, and modified without... The Artistic License is a software license used for certain free software packages, most notably the standard Perl implementation, most of CPAN modules and Parrot, which are dual-licensed under the Artistic License and the GNU General Public License (GPL). ... In computer science, a dynamic programming language is a kind of programming language in which programs can change their structure as they run: functions may be introduced or removed, new classes of objects may be created, new modules may appear. ...

Contents

History

The project started to implement Perl 6 and originally had the very dull name "The software we're writing to run Perl 6". The name Parrot came from an April Fool's joke in which a hypothetical language named Parrot was announced that would unify Python and Perl [1]. The name was later adopted by this project, which aims to support Perl and Python. Perl 6 is a planned major revision to the Perl programming language. ... April Fools Day or All Fools Day, though not a holiday in its own right, is a notable day celebrated in many countries on 1 April. ... Python is a high-level programming language first released by Guido van Rossum in 1991. ... Wikibooks has a book on the topic of Perl Programming Perl is a dynamic programming language created by Larry Wall and first released in 1987. ...


Several languages are being developed along with it which target the Parrot virtual machine.


The current version of the project is Version 0.4.15, codenamed "Augean Stable", released August 22, 2007. is the 234th day of the year (235th in leap years) in the Gregorian calendar. ... Year 2007 (MMVII) is the current year, a common year starting on Monday of the Gregorian calendar and the AD/CE era. ...


Previous version's release dates are documented on Parrot's website[2].


Languages

The goal of the Parrot virtual machine is to host client languages, and allow interoperation between them. A number of hurdles exist in accomplishing this goal.


Static and dynamic languages

The differing properties of statically and dynamically typed languages have motivated the design of Parrot. Current popular virtual machines such as the Java virtual machine and the Common Language Runtime have been designed for statically typed languages, while the languages targeted by Parrot are dynamically typed. In computer science, a type system defines how a programming language classifies values and expressions into types, how it can manipulate those types and how they interact. ... A Java Virtual Machine (JVM) is a set of computer software programs and data structures which implements a specific virtual machine model. ... The Common Language Runtime (CLR) is the virtual machine component of Microsofts . ...


Virtual machines like the Java virtual machine and the current Perl 5 virtual machine are also stack based. The developers see it as an advantage of the Parrot machine that it has registers, and therefore more closely resembles an actual hardware design, allowing the vast literature on compiler optimization to be used generating code for the Parrot virtual machine so that it will run bytecode at speeds closer to machine code. Simple representation of a stack In computer science, a stack is a temporary abstract data type and data structure based on the principle of Last In First Out (LIFO). ...


Functional concepts

Parrot has rich support for a number of features of functional programming including closures and continuations, both of which can be particularly difficult to implement correctly and portably, especially in conjunction with exception handling and threading. Solving such problems once at the level of the virtual machine thus offers a tremendous saving of effort when implementing them in any of Parrot's client languages. In programming languages, a closure is a function that refers to free variables in its lexical context. ... In computing, a continuation is a representation of some of the execution state of a program (often the call stack and the current Instruction pointer) at a certain point. ... Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of some condition that changes the normal flow of execution. ... For the form of code consisting entirely of subroutine calls, see Threaded code. ...


Compiler tools

Main article: Parser Grammar Engine

Parrot provides a suite of compiler-writing tools which includes the Parser Grammar Engine (PGE), a hybrid parser-generator that can express a recursive descent parser as well as a operator-precedence parser, allowing free transition between the two in a single grammar. The PGE feeds into the Tree Grammar Engine (TGE) which further transforms the parse-tree generated by PGE for optimization and ultimately for code generation. The Parser Grammar Engine (originally Parrot Grammar Engine) or PGE is a compiler and runtime for a Perl 6 rules for the Parrot virtual machine. ... The Parser Grammar Engine (originally Parrot Grammar Engine) or PGE is a compiler and runtime for a Perl 6 rules for the Parrot virtual machine. ... A recursive descent parser is a top-down parser built from a set of mutually-recursive procedures (or a non-recursive equivalent) where each such procedure usually implements one of the production rules of the grammar. ... An operator precedence parser is a computer program that interprets an operator-precedence grammar. ...


Existing client languages

Besides a subset of the planned Perl 6, an increasing number of languages can be compiled to Parrot assembly language including APL, BASIC, Befunge, Brainfuck, Cola, Forth, Jako, Lisp, m4, Miniperl, Parakeet, OpenComal, PHP, Plot, Pheme, Punie, Python, Ruby, Scheme, Span, Tcl (aka partcl), URM, YAL, and Zork Z-code. Most of these other language implementations are currently still incomplete and experimental. Perl 6 is a planned major revision to the Perl programming language. ... The Parrot assembly language or PASM is the basic assembly language used by the Parrot virtual machine, a part of the Perl 6 project. ... APL (for A Programming Language) is an array programming language based on a notation invented in 1957 by Kenneth E. Iverson while at Harvard University. ... BASIC (Beginners All-purpose Symbolic Instruction Code) is a family of high-level programming languages. ... Befunge is a stack-based, reflective, esoteric fungeoid programming language. ... The brainfuck language is an esoteric programming language noted for its extreme minimalism. ... Cola is a programming language similar to C. It can be compiled into Parrot assembly language, and then run on the Parrot virtual machine. ... Forth is a programming language and programming environment, initially developed by Charles H. Moore at the US National Radio Astronomy Observatory in the early 1970s. ... Jako is a programming language created by Gregor M. Purdy. ... Lisp is a family of computer programming languages with a long history and a distinctive fully-parenthesized syntax. ... m4 is a macro processing language designed by Brian Kernighan and Dennis Ritchie. ... Parakeet is object-oriented stack machine language inspired by Forth for Parrot virtual machine developed by Michel Pelletier. ... PHP is a reflective programming language originally designed for producing dynamic web pages. ... This article lacks information on the importance of the subject matter. ... Python is a high-level programming language first released by Guido van Rossum in 1991. ... Ruby is a reflective, object-oriented programming language. ... Scheme is a multi-paradigm programming language. ... Span is a programming language targeting the Parrot virtual machine. ... Tcl (originally from Tool Command Language, but nonetheless conventionally rendered as Tcl rather than TCL; and pronounced tickle) is a scripting language created by John Ousterhout. ... YAL (Yet Another Language) is an interpreted programming language designed by Leopold Tötsch by mixing C, Perl, and Python syntax, for testing Parrot AST interface. ... Zork universe Zork games Zork Anthology Zork trilogy Zork I • Zork II • Zork III Beyond Zork • Zork Zero Enchanter trilogy Enchanter • Sorcerer • Spellbreaker Other games Wishbringer • Return to Zork Zork: Nemesis • Zork Grand Inquisitor Zork: The Undiscovered Underground Topics in Zork Encyclopedia Frobozzica Characters • Kings • Creatures Timeline • Magic • Calendar Zorkmid... The Z machine at Sandia National Laboratory. ...


Possible future languages and projects

There is strong interest in parts of the Ruby community. The Python community is taking more of a wait-and-see attitude, due to already having Psyco, a just-in-time Python-to-machine-code compiler, Jython, a Python-to-Java-bytecode compiler, and IronPython to compile to the .NET platform, as well the in-development PyPy, a rewrite of Python in Python itself aimed to provide static code generation as well as high-level optimization. Psyco is a specializing compiler / just-in-time compiler for Python. ... Just In Time (JIT) is an inventory strategy implemented to improve the return on investment of a business by reducing in-process inventory and its associated costs. ... Jython, formerly known as JPython, is an implementation of the Python programming language written in Java. ... IronPython is an implementation of the Python programming language, targeting . ... The Microsoft . ... PyPy is an interpreter for the Python programming language written in Python itself. ...


Internals

Parrot code has three forms. Bytecode is natively interpreted by Parrot. Parrot Assembly Language (PASM) is the low level language that compiles down to bytecode. Parrot Intermediate Representation (PIR) is a slightly higher level language than PASM and also compiles down to Bytecode. It is the primary target of language implementations. PIR transparently manages Parrot's inter-routine calling conventions, provides improved syntax, register allocation, register spilling, and more. PIR code is usually stored in files with the suffix ".pir". The Parrot assembly language or PASM is the basic assembly language used by the Parrot virtual machine, a part of the Perl 6 project. ... The Parrot intermediate representation or PIR, previously called Intermediate code (IMC), is one of the two assembly languages for the Parrot virtual machine. ...


IMCC is the Intermediate Code Compiler for Parrot and compiles PIR.


Examples

Registers

Parrot is register-based like most hardware CPUs, unlike most virtual machines, which are stack-based. Parrot provides four types of registers: Die of an Intel 80486DX2 microprocessor (actual size: 12×6. ...

  • I: native integer type
  • N: floating point numbers
  • S: advanced string registers with Unicode support
  • P: PMC, or Parrot Magic Cookie — Parrot object type

Parrot provides an arbitrary number of registers; this number is fixed at compile time per subroutine. Unicode is an industry standard allowing computers to consistently represent and manipulate text expressed in any of the worlds writing systems. ...


Arithmetic operations

In PASM

 set I1, 4 inc I1 # I1 is now 5 add I1, 2 # I1 is now 7 set N1, 42.0 dec N1 # N1 is now 41.0 sub N1, 2.0 # N1 is now 39.0 print I1 print ', ' print N1 print "n" end 

In PIR

 .sub 'main' :main $I1 = 4 inc $I1 # $I1 is now 5 $I1 += 2 # $I1 is now 7 $N1 = 42.0 dec $N1 # $N1 is now 41.0 $N1 -= 2.0 # $N1 now 39.0 print $I1 print ', ' print $N1 print "n" .end 

Culture

The tagline of the Parrot project is "one bytecode to rule them all," a reference to Tolkien's One Ring from The Hobbit and The Lord of the Rings. John Ronald Reuel Tolkien CBE (3 January 1892 – 2 September 1973) was an English philologist, writer and university professor, best known as the author of The Hobbit and The Lord of the Rings. ... The One Ring, also known as the Ruling Ring, The Doom of Man, the Great Ring of Power, The Ring, or Isildurs Bane, is an artifact from J. R. R. Tolkiens fictional Middle-earth universe. ... This article or section contains a plot summary that is overly long or excessively detailed compared to the rest of the article. ... The Lord of the Rings is an epic high fantasy novel written by the English academic J. R. R. Tolkien. ...


Until late 2005, Dan Sugalski was the lead designer and chief architect of Parrot. Chip Salzenberg, a longtime Perl, Linux kernel, and C++ hacker, took over until mid-2006, when he became the lead developer. Allison Randal, the lead developer of Punie and chief architect of Parrot's compiler tools, is now the chief architect. Chip Salzenberg is an American programmer mostly noted for his involvement in the Perl and Free Software communities. ... Allison Randal Allison Randal is a linguist, software developer and author. ... This article lacks information on the importance of the subject matter. ...


Development discussions take place primarily on the parrot-porters mailing list, hosted by perl.org. In addition, there are weekly moderated meetings for Parrot and language developers hosted in #parrotsketch on irc.perl.org. The #parrot channel on the same network is often full of Parrot hackers.


Design discussions exist in the form of Parrot Design Documents, or PDDs, in the Parrot repository [3]. The chief architect or another designated designer produces these documents to explain the philosophy of a feature as well as its interface and design notes. Parrot hackers turn these documents into executable tests, and then existing features.


License

Parrot is a free software project, distributed under the terms Artistic License Version 2.0. Clockwise from top: The logo of the GNU Project (the GNU head), the Linux kernel mascot Tux the Penguin, and the FreeBSD daemon Free software is a term coined by Richard Stallman and the Free Software Foundation[1] to refer to software that can be used, studied, and modified without... The Artistic License is a software license used for certain free software packages, most notably the standard Perl implementation, most of CPAN modules and Parrot, which are dual-licensed under the Artistic License and the GNU General Public License (GPL). ...


See also

free software Portal

Image File history File links This is a lossless scalable vector image. ... The Common Language Runtime (CLR) is the virtual machine component of Microsofts . ... A Java Virtual Machine (JVM) is a set of computer software programs and data structures which implements a specific virtual machine model. ... The title given to this article is incorrect due to technical limitations. ...

External links

  • Parrot homepage
  • Perl 6 and Parrot links

  Results from FactBites:
 
Parrot virtual machine at AllExperts (722 words)
Parrot is a register-based virtual machine being developed using the C programming language and intended to run dynamic languages efficiently.
Current popular virtual machines such as the Java virtual machine and the Common Language Runtime have been designed for statically typed languages, while the languages targeted by Parrot are dynamically typed.
Parrot is a free software project, distributed under the same terms as Perl; that is, dual-licensed under both the GNU General Public License and the Artistic License.
sociology - Parrot (623 words)
Parrots have a characteristic curved beak shape with the upper mandible having slight mobility in the joint with the skull and a generally erect stance.
Birds of the parrot family can be found in most of the warm parts of the world, including India, South East Asia and West Africa, with one species, now extinct, in the United States (the Carolina Parakeet).
Other scholars claim that parrots are only repeating words with no idea of their meanings and point to Pepperberg's results as being nothing but an expression of operant conditioning.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.