Pugs (compiler)

Last updated

Pugs
Original author(s) Audrey Tang
Initial release1 February 2005;19 years ago (2005-02-01)
Final release
Final / 21 April 2010;14 years ago (2010-04-21)
Repository
Written in Haskell
Platform IA-32, x86-64
Type compilerinterpreter
Website www.pugs.com   OOjs UI icon edit-ltr-progressive.svg

Pugs is a compiler and interpreter for the Raku programming language, begun on 1 February 2005, by Audrey Tang. Raku was then called Perl 6.

Contents

As of 21 April 2010, Pugs development was placed on hiatus, [1] with most Raku implementation efforts moving to 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 and open-source 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 converge 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 software 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.

Programming languages can be grouped by the number and types of paradigms supported.

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.

<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 named 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 is a Taiwanese politician and free software programmer who served as the first Minister of Digital Affairs of Taiwan from August 2022 to May 2024. 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 gender 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 leader of the Haskell and Perl programming language communities, and is the core member of g0v.

<span class="mw-page-title-main">Catalyst (software)</span> Open-source web application framework

Catalyst is an open-source web application framework written in Perl. It 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.

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 system 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 and the lead author of Perl Hacks, co-wrote Perl Testing: A Developer's Notebook, 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 several 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. Tang, Audrey (21 April 2010). "How to Implement Perl 6 in '10". Pugs Blogs.
  2. "Pugs Apocryphon 1". Archived from the original on 5 March 2007. Retrieved 9 March 2007.