Jump to content

Raku (programming language)

From Wikipedia, the free encyclopedia
(Redirected from .rakumod)

Raku
Camelia, the Raku mascot
Camelia, the Raku mascot[1]
ParadigmMulti-paradigm
FamilyPerl
Designed byLarry Wall
DeveloperRaku community
First appeared25 December 2015; 8 years ago (2015-12-25)
Stable release
6.d 'Diwali'[2] / 24 October 2020; 4 years ago (2020-10-24)
Typing disciplineDynamic, gradual
OSCross-platform
LicenseGNU General Public or Artistic 2
Filename extensions.raku, .rakumod, .rakudoc, .t, .rakutest[3]
Websiteraku.org
Major implementations
Rakudo
Influenced by
Perl, Ruby, Smalltalk, Haskell,[4] JavaScript
Influenced
Perl,[5] Haskell,[5] AntLang

Raku is a member of the Perl family of programming languages.[6] Formerly named Perl 6, it was renamed in October 2019.[7][8] 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.

History

[edit]

In Perl 6, we decided it would be better to fix the language than fix the user.

— Larry Wall[9]

The Raku design process was first announced on 19 July 2000, on the fourth day of that year's Perl Conference,[10] by Larry Wall in his State of the Onion 2000 talk.[11] At that time, the primary goals were to remove "historical warts" from the language; "easy things should stay easy, hard things should get easier, and impossible things should get hard"; and a general cleanup of the internal design and application programming interfaces (APIs). The process began with a series of Request for Comments (RFCs). This process was open to all contributors, and left no aspect of the language closed to change.[12]

Once the RFC process was complete, Wall reviewed and classified each of the 361 requests received. He then began the process of writing several "Apocalypses", using the original meaning of the term, "revealing".[13] While the original goal was to write one Apocalypse for each chapter of Programming Perl, it became obvious that, as each Apocalypse was written, previous Apocalypses were being invalidated by later changes. For this reason, a set of Synopses was published, each one relating the contents of an Apocalypse, but with any subsequent changes reflected in updates. Today, the Raku specification is managed through the "roast" testing suite,[14] while the Synopses are kept as a historical reference.[15]

There is also a series of Exegeses written by Damian Conway that explain the content of each Apocalypse in terms of practical usage. Each Exegesis consists of code examples along with a discussion of the usage and implications of the examples.[16]

There are three primary methods of communication used in the development of Raku today. The first is the Raku Internet Relay Chat (IRC) channel on Libera Chat. The second is a set of mailing lists.[17] The third is the Git source code repository hosted at GitHub.[18]

Initial goals and implications

[edit]

The major goal Wall suggested in his initial speech was the removal of historical warts. These included the confusion surrounding sigil usage for containers, the ambiguity between the select functions, and the syntactic impact of bareword filehandles. There were many other problems that Perl programmers had discussed fixing for years, and these were explicitly addressed by Wall in his speech.[citation needed]

An implication of these goals was that Perl 6 would not have backward compatibility with the existing Perl codebase. This meant that some code which was correctly interpreted by a Perl 5 compiler would not be accepted by a Perl 6 compiler. Since backward compatibility is a common goal when enhancing software, the breaking changes in Perl 6 had to be stated explicitly. The distinction between Perl 5 and Perl 6 became so large that eventually Perl 6 was renamed Raku.

Mascot

[edit]
Larry Wall and Camelia

The language's mascot is "Camelia, the Raku bug".[1] Her name is a nod to the camel mascot associated with Perl, and her form, in the pun-loving tradition of the Perl community, is a play on "software bug". Spiral designs embedded in her butterfly-like wings resemble the characters "P6", the favored nickname for Perl 6, and off-center eye placement is an intentional pun on "Wall-eyed".[19]

One of the goals behind the lively and colorful design of the logo was to discourage misogyny in the community and for it to be an opportunity for those of "masculine persuasion" to show their sensitive side.[20]

Implementations

[edit]

As of 2017, only the Rakudo implementation is under active development. No implementation will be designated as the official Raku implementation; rather, "Raku is anything that passes the official test suite."[21]

Rakudo Perl 6[22][23] targets a number of virtual machines, such as MoarVM, the Java Virtual Machine, and JavaScript. MoarVM is a virtual machine built especially for Rakudo[24] and the NQP Compiler Toolchain.[25] There is a layer between Raku and the virtual machines named Not Quite Perl 6 (NQP), which implements Raku rules for parsing Raku, and an abstract syntax tree and backend-specific code generation. Large portions of Rakudo are written in Raku, or in its subset NQP. Rakudo is not a completely self-hosting implementation, nor are there concrete plans at this point to make Rakudo a bootstrapping compiler.

Historical implementations

[edit]

Pugs was an initial implementation of Perl 6 written in Haskell, led by Audrey Tang. Pugs used to be the most advanced implementation of Perl 6, but since mid 2007, it is mostly dormant (with updates made only to track the current version of the Glasgow Haskell Compiler (GHC)). As of November 2014, Pugs was not being maintained.[26]

In 2007, v6-MiniPerl6 ("mp6") and its reimplementation, v6-KindaPerl6 ("kp6") were written as a means to bootstrap the Perl-6.0.0 STD, using Perl 5. The STD is a full grammar for Perl 6 and is written in Perl 6. In theory, anything capable of parsing the STD and generating executable code is a suitable bootstrapping system for Perl 6. kp6 is currently compiled by mp6 and can work with multiple backends.[27][28] mp6 and kp6 are not full Perl 6 implementations and are designed only to implement the minimum featureset required to bootstrap a full Perl 6 compiler.

Yapsi was a Perl 6 compiler and runtime written in Perl 6. As a result, it required an existing Perl 6 interpreter, such as one of the Rakudo Star releases, to run.[29]

Niecza, another major Perl 6 implementation effort, focused on optimization and efficient implementation research. It targets the Common Language Infrastructure.[30]

Module system

[edit]

The Raku specification requests that modules be identified by name, version, and authority.[31] It is possible to load only a specific version of a module, or even two modules of the same name that differ in version or authority. As a convenience, aliasing to a short name is provided.

CPAN, the Perl module distribution system, does not yet handle Raku modules. Instead a prototype module system is in use.[32]

Books

[edit]

Books published before Perl 6 version 1.0 (known as version 6.c)

[edit]
  • Randal, Allison; Sugalski, Dan; Tötsch, Leopold (2003). Perl 6 Essentials (1st ed.). O'Reilly Media. ISBN 978-0-596-00499-6.
  • Randal, Allison; Sugalski, Dan; Tötsch, Leopold (2004). Perl 6 and Parrot Essentials (2nd ed.). O'Reilly Media. ISBN 978-0-596-00737-9.
  • Walters, Scott (15 December 2004). Perl 6 Now: The Core Ideas Illustrated with Perl 5. Expert's Voice in Open Source. ISBN 978-1-59059-395-0.

Also, a book dedicated to one of the first Perl 6 virtual machines, Parrot, was published in 2009.

Books published after Perl 6 version 1.0 (known as version 6.c)

[edit]

Books published with the new Raku name

[edit]

References

[edit]
  1. ^ a b Jackson, Joab (23 July 2010). "Perl creator hints at imminent release of long-awaited Perl 6". IDG News Service. Retrieved 8 February 2015.
  2. ^ "Announce: Raku Perl 6 'Diwali' 6.d Language Specification Release". blogs.perl.org. Zoffix Znet. 5 November 2018. Retrieved 19 August 2022.
  3. ^ "Modules". docs.raku.org. Retrieved 19 August 2022.
  4. ^ "Glossary of Terms and Jargon". Perl Foundation Perl 6 Wiki. The Perl Foundation. 28 February 2011. Archived from the original on 21 January 2012. Retrieved 8 February 2015.
  5. ^ a b 唐鳳, a.k.a. Audrey Tang (21 April 2010). "How to Implement Perl 6 in '10".
  6. ^ "About Perl". perl.org. Retrieved 11 June 2020. "Perl" is a family of languages, "Raku" (formerly known as "Perl 6") is part of the family, but it is a separate language which has its own development team. Its existence has no significant impact on the continuing development of "Perl".
  7. ^ "Perl 6 renamed to Raku". LWN.net. 15 October 2019. Retrieved 16 October 2019.
  8. ^ "TPF response to Raku rename". 29 October 2019.
  9. ^ Biancuzzi, Federico; Warden, Shane (2009). Masterminds of Programming: Conversations with the Creators of Major Programming Languages. "O'Reilly Media, Inc.". ISBN 978-0596515171.
  10. ^ Kline, Joe (21 August 2000). "Report from the Perl Conference".
  11. ^ Wall, Larry (2000). "State of the Onion 2000". O'Reilly Network.
  12. ^ The Perl Foundation (2000). "About Perl 6 RFCs".
  13. ^ Wall, Larry (2 April 2001). "Apocalypse 1: The Ugly, the Bad, and the Good".
  14. ^ "Raku test suite". GitHub. 2019.
  15. ^ Wall, Larry; The Perl 6 designers (2015). "Perl 6 Design Documents".{{cite web}}: CS1 maint: numeric names: authors list (link)
  16. ^ The Perl Foundation (2001). "Exegeses".
  17. ^ The Raku Programming Language (2022). "Raku Community".
  18. ^ "Raku". GitHub. Retrieved 19 August 2022.
  19. ^ "Larry Wall in IRC chat log". 15 January 2016. Retrieved 10 November 2017.
  20. ^ "Archived "Logo considerations" email from Larry Wall". GitHub. 24 March 2009. Retrieved 10 November 2017.
  21. ^ Wall, Larry (10 August 2004). "Synopsis 1: Overview".
  22. ^ "rakudo/rakudo - GitHub". Github.com. Retrieved 21 September 2013.
  23. ^ Michaud, Patrick (16 January 2008). "The compiler formerly known as 'perl6'". Archived from the original on 18 February 2012.
  24. ^ Worthington, Jonathan (31 May 2013). "MoarVM: A virtual machine for NQP and Rakudo". 6guts. Retrieved 24 July 2013.
  25. ^ "NQP - Not Quite Perl at github". GitHub. 29 May 2022. Retrieved 29 May 2022.
  26. ^ "Feature comparison of Perl 6 compilers". Archived from the original on 7 February 2019.
  27. ^ Wall, Larry; et al. (2007). "Perl 6 STD". GitHub.
  28. ^ "mp6/kp6 FAQ". Perl 6 development team. 2006.
  29. ^ "Yapsi README". GitHub. 2011.
  30. ^ O'Rear, Stefan (29 November 2011). "Niecza README.pod". GitHub. Retrieved 12 January 2012.
  31. ^ Wall, Larry (2004). "Synopsis 11: Modules".
  32. ^ "Perl 6 Modules Directory". Modules.raku.org. Retrieved 17 May 2020.
[edit]