Pugs (compiler)

Last updated

Pugs is a compiler and interpreter for the Raku programming language, started on February 1, 2005, by Audrey Tang. (At the time, Raku was known as Perl 6.)

Contents

Pugs development is now placed on hiatus, [1] with most Raku implementation efforts now taking place on Rakudo.

Overview

The Pugs project aimed to bootstrap Perl 6 by implementing the full Perl 6 specification, as detailed in the Synopses. It is written in Haskell, specifically targeting the Glasgow Haskell Compiler.

Pugs includes two main executables:

Pugs is free software, distributable under the terms of either the GNU General Public License or the Artistic License. [2] 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 a 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:

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/pugsusev6; useperl5: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(<PGE Patrick>); $sth.execute(<Pugs Audrey>); $sth.execute(<Parrot Leo>);  my$res = $dbh.selectall_hashref('SELECT * FROM Test', 'Pumpking'); # Just another Pugs hackersay"Just another $res<Audrey><Project> hacker"; 

Development model

Several factors have been suggested as reasons for Pugs's progress:

Despite these factors, progress on the Haskell implementation stalled in late 2006, as personal issues kept Audrey from devoting as much time to the project as she had in 2005.

Many Pugs contributors have since moved on to implement Perl6-inspired systems as CPAN modules on Perl 5, such as the Moose project.

Related Research Articles

The Comprehensive Perl Archive Network (CPAN) is a repository of over 250,000 software modules and accompanying documentation for 39,000 distributions, written in the Perl programming language by over 12,000 contributors. CPAN can denote either the archive network or the Perl program that acts as an interface to the network and as an automated software installer. Most software on CPAN is free and open source software.

<span class="mw-page-title-main">Perl</span> Interpreted programming language first released in 1987

Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language".

Parrot is a discontinued register-based process virtual machine designed to run dynamic languages efficiently. It is possible to compile Parrot assembly language and Parrot intermediate representation to Parrot bytecode and execute it. Parrot is free and open-source software.

Bytecode is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references that encode the result of compiler parsing and performing semantic analysis of things like type, scope, and nesting depths of program objects.

In computing, the Perl DBI offers a standardized way for programmers using the Perl programming language to embed database communication within their programs. The latest DBI module for Perl from CPAN can run on a range of operating systems.

Modular programming is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality.

<span class="mw-page-title-main">Raku (programming language)</span> Programming language derived from Perl

Raku is a member of the Perl family of programming languages. Formerly known as Perl 6, it was renamed in October 2019. Raku introduces elements of many modern and historical languages. Compatibility with Perl was not a goal, though a compatibility mode is part of the specification. The design process for Raku began in 2000.

<span class="mw-page-title-main">Audrey Tang</span> Taiwanese politician and software programmer

Audrey Tang Feng is a Taiwanese politician and free software programmer who has served as the 1st Minister of Digital Affairs of Taiwan since August 2022. She has been described as one of the "ten greatest Taiwanese computing personalities". In August 2016, Tang was invited to join Taiwan's Executive Yuan as a minister without portfolio, making her the first transgender person and the first non-binary official in the top executive cabinet. Tang has identified as "post-gender" and accepts "whatever pronoun people want to describe me with online." Tang is a community leader of Haskell and Perl and the core member of g0v.

<span class="mw-page-title-main">Catalyst (software)</span>

Catalyst is an open source web application framework written in Perl, that closely follows the model–view–controller (MVC) architecture, and supports a number of experimental web patterns. It is written using Moose, a modern object system for Perl. Its design is heavily inspired by frameworks such as Ruby on Rails, Maypole, and Spring.

<span class="mw-page-title-main">Syntax (programming languages)</span> Set of rules defining correctly structured programs

In computer science, the syntax of a computer language is the rules that define the combinations of symbols that are considered to be correctly structured statements or expressions in that language. This applies both to programming languages, where the document represents source code, and to markup languages, where the document represents data.

Raku rules are the regular expression, string matching and general-purpose parsing facility of the Raku programming language, and are a core part of the language. Since Perl's pattern-matching constructs have exceeded the capabilities of formal regular expressions for some time, Raku documentation refers to them exclusively as regexes, distancing the term from the formal definition.

The Parser Grammar Engine is a compiler and runtime for Raku rules for the Parrot virtual machine. PGE uses these rules to convert a parsing expression grammar into Parrot bytecode. It is therefore compiling rules into a program, unlike most virtual machines and runtimes, which store regular expressions in a secondary internal format that is then interpreted at runtime by a regular expression engine. The rules format used by PGE can express any regular expression and most formal grammars, and as such it forms the first link in the compiler chain for all of Parrot's front-end languages.

Perl Archive Toolkit (PAR) is a cross-platform packaging and deployment tool for computer applications and libraries written in the Perl programming language. Its name is inspired by Java's JAR technology. It was originally developed by Audrey Tang and is now maintained via the PAR development mailing list with help from numerous contributors.

Test::More is a unit testing module for Perl. Created and maintained by Michael G Schwern with help from Barrie Slaymaker, Tony Bowden, chromatic, Fergal Daly and perl-qa.

chromatic (programmer) American computer programmer

Chromatic is a writer and free software programmer best known for his work in the Perl programming language. He lives in Hillsboro, Oregon, United States. He wrote Extreme Programming Pocket Guide, co-wrote Perl Testing: A Developer's Notebook, is the lead author of Perl Hacks, and is an uncredited contributor to The Art of Agile Development. He has a music degree. Also, he has contributed to CPAN, Perl 5, Perl 6, and Parrot.

<span class="mw-page-title-main">Rakudo</span>

Rakudo is a Raku compiler targeting MoarVM, and the Java Virtual Machine, that implements the Raku specification. It is currently the only major Raku compiler in active development.

<span class="mw-page-title-main">Padre (software)</span> Perl software development platform

Padre is a multi-language software development platform comprising an IDE and a plug-in system to extend it. It is written primarily in Perl and is used to develop applications in this language.

Haskell is a general-purpose, statically-typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell has pioneered a number of programming language features such as type classes, which enable type-safe operator overloading, and monadic input/output (IO). It is named after logician Haskell Curry. Haskell's main implementation is the Glasgow Haskell Compiler (GHC).

In database management systems (DBMS), a prepared statement, parameterized statement, or parameterized query is a feature where the database pre-compiles SQL code and stores the results, separating it from data. Benefits of prepared statements are:

The following outline is provided as an overview of and topical guide to the Perl programming language:

References

  1. "How to Implement Perl 6 in '10".
  2. "Pugs Apocryphon 1". Archived from the original on 2007-03-05. Retrieved 2007-03-09.