Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Pugs (compiler)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Use dmy dates|date=August 2024}} {{Infobox software | title = Pugs | logo = <!-- File name only, no 'File:' --> | logo caption = | logo alt = | logo size = | screenshot = <!-- File name only, no 'File:' --> | screenshot alt = | caption = | author = [[Audrey Tang]] | developer = | released = {{Start date and age|2005|02|01|df=yes}} | discontinued = Yes | latest release version = Final | latest release date = {{Start date and age|2010|04|21|df=yes}} | programming language = [[Haskell]] | operating system = | platform = [[IA-32]], [[x86-64]] | size = | language = | genre = [[compiler]]β[[Interpreter (computing)|interpreter]] | license = <!-- or |licence= --> | website = <!-- {{URL|example.org}} --> | AsOf = }} '''Pugs''' is a [[compiler]] and [[Interpreter (computing)|interpreter]] for the [[Raku (programming language)|Raku]] [[programming language]], begun on 1 February 2005, by [[Audrey Tang]]. Raku was then called Perl 6. As of 21 April 2010, Pugs development was placed on hiatus,<ref>{{Cite news |last1=Tang |first1=Audrey |author1-link=Audrey Tang |date=21 April 2010 |url=http://pugs.blogs.com/pugs/2010/04/how-to-implement-perl-6-in-10.html |title=How to Implement Perl 6 in '10 |work=Pugs Blogs}}</ref> with most Raku implementation efforts moving to [[Rakudo]]. ==Overview== The Pugs project aimed to [[Bootstrapping (compilers)|bootstrap]] Perl 6 by implementing the full Perl 6 specification, as detailed in the [https://web.archive.org/web/20050222013737/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 [[Parrot intermediate representation]] (PIR) [[assembly language]]. Pugs is [[free and open-source software]], distributable under the terms of either the [[GNU General Public License]] or the [[Artistic License]].<ref>{{Cite web |url=http://svn.pugscode.org/pugs/docs/01Overview.html |title=Pugs Apocryphon 1<!-- Bot generated title --> |access-date=2007-03-09 |archive-date=2007-03-05 |archive-url=https://web.archive.org/web/20070305173601/http://svn.pugscode.org/pugs/docs/01Overview.html |url-status=dead}}</ref> 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: * 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: <syntaxhighlight lang="perl6"> #!/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(<PGE Patrick>); $sth.execute(<Pugs Audrey>); $sth.execute(<Parrot Leo>); my $res = $dbh.selectall_hashref('SELECT * FROM Test', 'Pumpking'); # Just another Pugs hacker say "Just another $res<Audrey><Project> hacker"; </syntaxhighlight> ==Development model== Several factors have been suggested as reasons for Pugs's progress: * 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 [https://web.archive.org/web/20060807052639/http://www.cs.uu.nl/~daan/parsec.html], a [[Monad (functional programming)|monadic]] [[combinatorial]] parser written fully in Haskell, simplifies parsing. Because Haskell is a [[purely functional programming]] language, making the functional code interact with the real world ([[input/output]] and time-driven environment) requires thought. To achieve this, Pugs makes extensive use of [[Monad (functional programming)|monads]]. * Pugs's use of [[test-driven development]] 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 development.{{Citation needed|date=May 2008}} * Tang's liberal granting of the [[commit bit]]. Pugs development is currently based around a [[Apache Subversion|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. 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 (Perl)|Moose]] project. ==References== {{Reflist}} ==External links== * [https://web.archive.org/web/20050221223310/http://www.pugscode.org/ pugscode.org: Pugs] * [http://pugs.blogs.com Pugs Journal] * [http://www.onlamp.com/pub/wlg/7996 Ofun: Optimizing for Fun] {{Webarchive|url=https://web.archive.org/web/20141221232712/http://www.onlamp.com/pub/wlg/7996 |date=2014-12-21}} * [https://metacpan.org/module/Perl6::Pugs Perl6::Pugs on CPAN] * [http://www.nntp.perl.org/group/perl.perl6.language/19263 Kudos from Perl 6 Design Team] {{Perl}} {{Haskell programming}} {{Portal bar|Free and open-source software}} [[Category:Raku (programming language)]] [[Category:Free and open source compilers]] [[Category:Free and open source interpreters]] [[Category:Free software programmed in Haskell]] <!-- Hidden categories below --> [[Category:Articles with example Perl code]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation needed
(
edit
)
Template:Cite news
(
edit
)
Template:Cite web
(
edit
)
Template:Haskell programming
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Main other
(
edit
)
Template:Perl
(
edit
)
Template:Portal bar
(
edit
)
Template:Reflist
(
edit
)
Template:Template other
(
edit
)
Template:Use dmy dates
(
edit
)
Template:Webarchive
(
edit
)