Pugs (compiler) facts for kids
Original author(s) | Audrey Tang |
---|---|
Initial release | 1 February 2005 |
Last release |
Final / 21 April 2010
|
Written in | Haskell |
Platform | IA-32, x86-64 |
Type | compiler–interpreter |
Pugs was a special computer program that helped understand and run another programming language called Raku. When Pugs was first started on February 1, 2005, by Audrey Tang, Raku was known as Perl 6. Pugs worked like a translator, taking code written in Raku and turning it into something a computer could understand and use.
Development on Pugs stopped on April 21, 2010. After that, most of the work on Raku moved to a different project called Rakudo.
What Pugs Was All About
The main goal of the Pugs project was to build the Raku language from the ground up. It aimed to create a complete working version of Raku based on its official rules. Pugs was written using a programming language called Haskell, which is known for being very precise. It was made to work with a specific Haskell tool called the Glasgow Haskell Compiler.
Pugs had two main parts that you could run:
- Pugs itself was the main program. It could run Raku code and also had an interactive shell. An interactive shell is like a chat window where you can type commands and see the results right away.
- Pugscc was another part that could turn Raku programs into other types of code. It could change Raku code into Haskell code, Perl 5 code, JavaScript (which is used for websites), or even a special low-level language for a virtual machine called Parrot.
Pugs was also free and open-source software. This means that anyone could use it, share it, and even change it. It followed the same rules as the Perl language, which allowed people to use it under either the GNU General Public License or the Artistic License.
How Pugs Versions Were Numbered
Pugs used a unique way to number its versions. The numbers were designed to get closer and closer to the mathematical value of 2π (which is about 6.28318). Each new important number in the version showed that a big goal had been reached. The third number in the version simply went up with each new release.
Here are some of the main goals that were marked by the version numbers:
- 6.0: This was the very first version released.
- 6.2: This version added basic ways for the program to take in and give out information, and it could handle simple instructions and changeable data.
- 6.28: This version introduced classes and traits, which are ways to organize code and create blueprints for objects.
- 6.283: This version included rules and grammars, which are important for understanding the structure of programming languages.
- 6.2831: This version focused on the type system (how data types are handled) and linking (connecting different parts of the code).
- 6.28318: This version added macros, which are like shortcuts that let programmers create new commands.
- 6.283185: The final goal was to rewrite Pugs itself using the Raku language, if it became necessary.
How Pugs Was Developed
Several things helped Pugs make quick progress in its early days:
- Haskell's Design: Because Haskell is a "statically typed" language, many programming mistakes could be found early on, even before the program was run. Haskell code is also often very short and clear. Pugs used a special Haskell tool called Parsec, which made it easier to understand and process the Raku code.
- Test-Driven Development: The Pugs team used a method called test-driven development. This means they wrote tests for each part of the program before they wrote the actual code. This method is believed to help make software better. However, sometimes the team would temporarily ignore failed tests before releasing new versions, which reduced some of the benefits of this method.
- Open Access: Audrey Tang was very open about letting people help with the project. The Pugs code was stored in a system called Subversion, and many people were given access to add their own changes, especially if they wanted to write tests. Because of this, a very large collection of tests was built up. Many other projects working on Raku later used these tests to make sure their own versions worked correctly.
- Good Communication: Audrey Tang's way of communicating, especially through her online journal, attracted many people to join the project.
Even with these helpful factors, progress on Pugs slowed down in late 2006. This was because Audrey Tang had personal issues that kept her from spending as much time on the project as she had in 2005.
Many people who helped with Pugs later moved on to create other Raku-inspired tools. These tools were often made as special add-ons for Perl 5, like the Moose project.
See also
In Spanish: Pugs para niños