Pugs

Pugs

Pugs is a compiler and interpreter for the Perl 6 programming language, started on February 1 2005 by Audrey Tang.

Overview

The Pugs project aims to bootstrap Perl 6 by implementing the full Perl 6 specification, as detailed in the [http://dev.perl.org/perl6/synopsis/ Synopses] . It is written in Haskell, specifically targeting the Glasgow Haskell Compiler.

Pugs includes two main executables:
* "pugs" is the interpreter with an interactive shell.
* "pugscc" can compile Perl 6 programs into Haskell code, Perl 5, JavaScript, or Parrot virtual machine's PIR assembly.

Pugs is free software, distributable under the terms of either the GNU General Public License or the Artistic License. [ [http://svn.pugscode.org/pugs/docs/01Overview.html Pugs Apocryphon 1 ] ] These are the same terms as Perl.

Version numbering

The major/minor version numbers of Pugs converges to 2π (being reminiscent of TeX and METAFONT, which use similar scheme); each significant digit in the minor version represents a successfully completed milestone. The third digit is incremented for each release. The current milestones are:
* 6.0: Initial release.
* 6.2: Basic IO and control flow elements; mutable variables; assignment.
* 6.28: Classes and traits.
* 6.283: Rules and Grammars.
* 6.2831: Type system and linking.
* 6.28318: Macros.
* 6.283185: Port Pugs to Perl 6, if needed.

Perl 5 compatibility

As of version 6.2.6, Pugs also has the ability to embed Perl 5 and use CPAN modules installed on the system. The example below demonstrates the use of the popular Perl DBI module to manage a database:

#!/usr/bin/pugs use v6; use perl5:DBI;

my $dbh = DBI.connect('dbi:SQLite:dbname=test.db'); $dbh.do("CREATE TABLE Test (Project, Pumpking)");

my $sth = $dbh.prepare("INSERT INTO Test VALUES (?, ?)"); $sth.execute(); $sth.execute(); $sth.execute();

my $res = $dbh.selectall_hashref('SELECT * FROM Test', 'Pumpking'); # Just another Pugs hacker say "Just another $res hacker";

Development model

Several factors have been suggested as reasons for Pugs's progress:
* Pugs' use of Haskell. Haskell's static typing can make it easier for program bugs to be detected at compile time. Haskell code is also often thought to be concise. The Parsec library [http://www.cs.uu.nl/~daan/parsec.html] , a monadic combinatorial parser written entirely in Haskell, simplifies parsing. Because Haskell is a purely functional language, making the functional code interact with the real world (inputs/outputs and time-driven environment) requires thought. To achieve this, Pugs makes extensive use of monads.
* Pugs's use of test-driven methodology (a tenet of Extreme Programming). This methodology dictates that every module should have test code, even before the modules are implemented. Advocates of this methodology argue that it improves software quality. However, the project often silenced failed regression tests before releases, removing much of the benefit of test-driven developmentFact|date=May 2008.
* Tang's liberal granting of the commit bit. Pugs development is currently based around a Subversion repository, and access is freely given - especially to people wishing to write tests. Because of this, a huge library of tests has accumulated. Other Perl 6 implementations rely on many tests developed for Pugs as an executable specification for Perl 6.
* Tang's communication style; her journal (linked below) attracted many people to the project. Pugs developers also gather on the #perl6 freenode IRC channel.

Despite these factors, progress on Pugs itself stalled in 2006 as personal issues kept Audrey from devoting as much time to the project as she had in 2005. Though development continues, few contributors actively work on the Haskell-based interpreter, making its progress much slower than many people had hoped at the start of the project.

References

External links

* [http://www.pugscode.org pugscode.org - Pugs homepage]
* [http://pugs.blogs.com Pugs Journal]
* [http://www.oreillynet.com/pub/wlg/7996 -Ofun: Optimizing for Fun]
* [http://search.cpan.org/~autrijus/Perl6-Pugs/ Perl6::Pugs on CPAN]
* [http://www.nntp.perl.org/group/perl.perl6.language/19263 Kudos from Perl 6 Design Team]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Pugs — est une mise en œuvre expérimentale de Perl 6 en langage Haskell, et utilisant les spécificités les plus avancée de GHC. Selon le dorsal de génération et d exécution de code, Pugs peut être considéré soit comme un compilateur, soit comme un… …   Wikipédia en Français

  • Pugs — Saltar a navegación, búsqueda Pugs es un compilador y un intérprete del lenguaje de programación Perl 6, cuyo desarrollo comenzó el 1 de febrero de 2005 por Audrey Tang. Contenido 1 Sumario 2 Versiones …   Wikipedia Español

  • Pugs — Audrey Tang ist Initiatorin und Leiterin des Pugs Projektes Pugs ist ein alternativer Interpreter und Compiler für Perl 6, der in Haskell (GHC) geschrieben wird. Das Softwareprojekt wurde am 1. Februar 2005 von Audrey Tang begonnen, um die… …   Deutsch Wikipedia

  • PUGS — Propellant Utilization & Gaging System NASA …   Acronyms

  • PUGS — Propellant Utilization & Gaging System ( > NASA Acronym List ) …   Acronyms von A bis Z

  • pugs — pÊŒg n. small turned up nose; clay prepared for brickmaking; footprints of an animal; breed of small short haired dog v. fill with caulk; follow footprints, track footprints …   English contemporary dictionary

  • pugs — plural of pug present third singular of pug …   Useful english dictionary

  • Pals and Pugs — Infobox Film name = Pals and Pugs image size = caption = director = Jess Robbins producer = Albert E. Smith writer = Jess Robbins narrator = starring = Oliver Hardy music = cinematography = editing = distributor = released = 10 May, 1920 runtime …   Wikipedia

  • Pug — For other uses, see Pug (disambiguation). Pug A fawn pug, the most common coloring Other names Chinese pug Dutch bulldog Dutch mastiff Mini mastiff Country of origin China[1] …   Wikipedia

  • Perl 6 — Infobox programming language name = Perl paradigm = Multi paradigm year = 2000 designer = Larry Wall latest release version = pre release latest release date = typing = dynamic, static influenced by = Perl 5, Haskell, Smalltalk influenced =… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”