Perl6 and Tang Zonghan

xiaoxiao2021-03-06  22

Most texts are sorted from Perlchina 2005-03-05 Beijing gatherings, Tang Zonghan's oral, other part of the text finishing translated from Perl's related sites.

Writing Purpose: To tell a strange Chinese to the world's open source, describe the grand blueprints of open source code authors.

Tang Personal Resume:

Tang Zong Han Dynasty 1981 students born in Taiwan.

Tang's appearance: long hair, white, ten finger.

Tang's behavior: Powerful talk, clear words, fast speech speed (explained intelligence), bring your own laptop, including the toilet, the purpose is to record your own ideas.

Tang Title: That is known as the top ten computer masters in Taiwan.

Tang Personal Website: http://www.Autrijus.org/

Tang's work attitude: Try to work every day until it is tired (tired, it means that it feels very fatigue, the feeling of sleeping is sleeping).

Tang's educational experience:

14-year-old, have been exhausted with self-study computer knowledge (claiming to have a computer since 8086, now uses a Huasuo 1.8G, plan to buy a mini-mac), is an absolute self-study Free Software. I went to the university to listen to the class, the interrogation of the Chinese Department and the Philosophy Department. The knowledge of the old professor who self-feeling listening to the Chinese is very beneficial.

English learning: I was obsessed with Magic Chick. In order to make a good card, IRC and foreigners exchanged, discuss the skills, after a period of IRC, IRC. Moreover, I have also ranked first in Taiwan's university points.

Tang's current life:

I like to travel, and I have been to many places around the world (essential are at their own expense).

To promote Perl everywhere, participate in the open source conference. Just in the mainland to give Perlchina members, promote Perl.

Opening a small computer company 2-3 years, there is no official employee, everyone is a friend who knows online. After receiving the work, allocate to everyone according to the evaluation of everyone in the past, then everyone will pay. If you do your own, you will pay according to the hour. Every hour's software is charged $ 100 or the euro. The product written to the customer requires open source, open source allows customers to enjoy a lot of open source community upgrade updates. Of course, if the customer does not agree, he explains the price to receive twice. If the customer requires the software's copyright to be all owned by himself, he will ask 6 times the price (there is still a customer is willing to receive 6 times the price).

From 2005-02-01, he started to write a development team at night to prepare the PUGS in the next day. This team has approximately 15 six people, one of which is from the Taipei Perl Extension Group.

Usually, a large amount of caffeine (coffee, later replaced with Coke, Coke is actually more hurtful, so it seems that you want to change to tea now.).

Tang's experience in Perl:

Learning Perl is just because of the rise of the positive Internet, there is a company if he has developed CGI in the past, which started the career of Perl. Later, a large number of Perl modules were written, more than 100, can be found on the CPAN (see appendix).

Website: http://search.cpan.org/~autrijus/

It turned out that it was originally written in Perl, but after a long time, I found that many of the software were written with Perl. There were many big companies in using Perl, for example: Microsoft employees are using Perl, Microsoft sponsored the development of Perl version ActivePerl under Windows; Morgan Stanley's entire company is using Perl, and they sponsored about half of the Perl Foundation in 2003; many Wall Street financial institutions are using Perl. The treatment of financial data; Due to the contribution to the CPAN, the reward of the Perl Foundation 2 times in 2003, 2000 dollars each time.

Website: http://www.perlfoundation.org/gc/gravest/2003.html

Established the Taipei Perl promotion group with Taipei, organized a party every month, about more than 30 people, everyone see each other, and find a new Perl problem to let someone will speak to everyone. This activity has become a routine event in the last half of the year. (Everyone who writes Perl in Taiwan is very familiar, learned from Tang Dou, the developer of Dong Zhongkai, OpenWebmail, one for 8 years of doctoral students, put their energy in OpenWebmail development, a Perl Written web mail, very nice).

Website: http://taipei.pm.org/

When I participated in the open source conference in 2001, I need to do a 5-minute speech at the time of the meeting. At that time, I took over the relevant management of CPAN, so he took himself the most likely used module on the CPAN. Out of Chinese created a number of treasures (CPAN several treasures, there is a bit of Chinese RAP's taste), and finally there is a summary song that I sing in English, which caused the participant's full Hutang. So after the Tang Datu, Germany, the United Kingdom will perform a period of time.

Text URL: http://wagner.elixus.org/~autrijus/favcpan/start.html

Video URL: http://www.perl.org/tpc/2003/movies/perl-lt/

Perl6 development:

The reason and history of initial development of Perl6:

In 2000, in 2000, Larry Wall proposed Perl6 development plan on the annual open source code (OSCON2000).

At that time, Perl5.6 was just released, but the Perl development community at the time did it feel that it is difficult to come again. Perl This language has been 13 years of history. Since it is always compatible, and the test core of Perl5 is already mature, it can be said to be a bitter, so it hinders us to add new features because each time Adding new features may break the operation of the old code.

Perl5 is the core written by C. It runs very quickly, the function is also strong, but its core code is so huge, full of macro modes that are difficult to understand. Modifying the core to add a new feature is an extremely complex and difficult job for any one. Especially when developing Perl5.6, I added UNICODE and multi-threaded support, but during the addition, the developer found that this addition is a painful thing, because every time you add new features to extract old The function is added. Perl5 developers compare this phenomenon as a building block game: superimposition (a pile of small wood is stacked into a tower, there are three pieces per layer, each player turns into one piece under the bottom. In this way, the bottom of this tower is getting more and more fragile, and this tower is getting higher and higher, who took the last piece of the person who left the tower is the lost home), everyone thinks that Perl5's core is more and more like a stacked music, the more The more fragile, unable to further improve, Perl5 has reached its limits. So Larry Wall proposed a plan to develop Perl6.

Website: http://www.perl.com/pub/a/2000/07/perl6.html

The purpose of the time is to be added from the new design, thread, unicode, and reliable signal control when designing, the new core is smaller, faster, the external expansion API is more clear, in the past Binary compatibility issues should also be completely solved.

However, while the new Perl6 developed in Larry, other languages ​​such as Python have also encountered the same problem: the problems they want to solve when they originally designed, but they have to add new features now. It will be found when the original design does not imagine this kind of demand, so add new features is also very difficult.

Since everyone encounters the same problem, then two open source communities have set a new underlying platform on the proposed cooperation, using this underlying fundamentally solved the problems encountered by these everyone, this underlying platform is Perl6 Parrot.

At 2001-04-01 Larry Wall, the Parrot development plan is announced along with Guido Van Rossum (Python designer).

Website: http://www.perl.com/pub/a/2001/04/01/parrot.htm

This news makes the entire open source community very excited, and everyone is very expected to success in the new project.

The entire program of the Perl6 project has become a multi-level design project from the original independent Perl6 design.

Perl6 envision of the entire project:

The entire project of Perl6 is based on the underlying Parrot.

The programs or modules written by Perl5 in the past cannot be restore, if you want to accusstrate, you must use some bad ways, so they first designed a bottom platform called Parrot (Parrot, like like .NET running period or Java virtual machine).

We write the PERL6 code, then we compile the PERL6 code into a byte code through a compiler, this byte size can be run directly on Parrot, and Parrot is responsible for specific translations of these bytecodes. The machine code on the platform such as Intel or SPARC is executed.

That is to say, you can write programs in any language, then translate the bytecode of uniform rules through a compiler, run on a unified virtual CPU platform Parrot.

This way you can use any language to write a program. Finally, everyone compiles the bytecode of unified rules. Because everyone's bytecode follows the same rule, the mutual calls between the byhengez code can be very smooth. Implementation, so that no matter how language you use, you can use each other (this technology is Just In Time). This way you can use the module written by Perl to call with Python, and the various languages ​​have been common. And programs planned by Perl5 can also be used to use to Parrot, which means that thousands of Perl modules on the CPAN can still be used, and other languages ​​can also call these Perl modules.

And the problems encountered in the past, if it is difficult to expand, there is no thread support, etc., in Parrot is resolved.

The execution process of the entire program under the Perl6 architecture, as shown below (under tops):

Source Code

----------

| The Parser |

----------

Syntax Tree

------------

| The compiler |

------------

Byte Code

------------------

| BYTECode Optimizer |

------------------

Better Byte Code

-------

| Runtime |

-------

Source Code source code can be the source code for various languages.

The Parser is a parser in various languages ​​(such as Python's parser, C is a parser), which is responsible for converting the source code into a syntax tree.

Syntax Tree grammar tree.

The Compiler compiler, compile various grammar trees into a zona code according to the Calling Convien rules.

Byte Code Bytecode, just like the assembly language above the virtual CPU, and this virtual CPU is Parrot.

Bytecode Optimizer byte an optimizer.

Better Byte Code Optimized bytecode.

Runtime is here Parrot.

Therefore, the entire Perl6 project of the final molding is actually consisting of two parts: one is the underlying Parrot, one is the upper-level Perl6 language. The language of Perl6 can be divided into: language design (Perl6 grammar, rule, also Source Code), the implementation of the language (through a parser and the compiler converts the PERL6 language into one-character code).

The idea of ​​Perl6's entire project is basically simultaneous, and the whole concept is actually very similar to Java and .net.

Parrot Features:

Paroot is like a software CPU, and its design is very similar to the hardware CPU design, for example, it also has a register structure, which also supports the underlying operation. Its design also refers to the design of the hardware CPU.

Parrot is designed to meet the needs of various dynamic languages, and special pay special attention, like Unicode, multi-threaded, etc. is directly built-in support.

Parrot's abstraction layer is higher than .NET and Java, you can write less code to run more complex operations. There is a corresponding mechanical code in Parrot in Parrot.

Parrot's current size is between 250k to 700K, which will have enough speed and have sufficient flexibility. Parrot supports a variety of platforms, including handheld devices, such as Palm.

Website: http://www.parrotcode.org

Perl6 language design features:

Perl6 language design ideas: Easy Things Should Stay Easy, Hard Things Should Get Easier, And Impossible Things Should Get Hard.

For example: Larry is designed in Perl6's language, which uses Huffman code: Commonly used features use shorter words to indicate that uncommon features use longer words, so you can significantly improve your input. The speed of the program. For example: Print "... / n" in Perl5 in the past, now you can use Say "..." to replace it in Perl6, because printing is the most commonly used function in the program, so use fewer code to indicate, so You can help you reduce the input of your code.

There is also a feature of Perl to set up the most popular functions of other languages ​​that are most popular, uniformly integrate into their own language. This is called multiple models in Perl.

Larry Wall likes to compare this situation as English, and in English is a language that absorbs a lot of other languages. Larry's idea is that Perl is best like English: Every locator will take some local dialect when studying English, bringing some local speech habits, but everyone can understand, mix and put into other languages, to form Ourselves.

In summary, put all the most popular elements, form a Perl6 language.

Perl6 has a strong flexibility (a motto of Perl: Article Road Tong Rome):

If you especially like oo, Perl6 feels like Java, you can special oo.

If you don't like to force type declaration, that perl6 can not declare.

If you especially like logical language, for example: make, then Perl6 will let you write a program in a logical language.

Perl6 absorbs a lot of other languages, so you can program with your favorite programming in Perl6, but the ability to be related to the context in Perl6, and the Perl6 program written by different programming methods can still match. together.

The intent of this is to let programmers for different issues, with different solutions, to achieve the best solution to all problems encountered.

The two features of Perl6 language are: contexts and multiple models.

The comparison of Perl6 and Perl5: The language itself feels like the Perl5 language, just in the process of running with Perl5. Many syntax Perl6 in the past Perl5 language continue to use, and improved the unreasonable part of Perl5 grammar.

Website: http://dev.perl.org/perl6

Perl6 and its related software being developed:

Parrot, Perl6 execution engine. It has been developed to version 0.1.2, and now you can actually run Python, Basic.

Website: http://www.parrotcode.org

There is already a lot of semi-finished products in Parrot:

For example, Ponie is a software that can compile Perl5 into Parrot.

Website: http://www.poniecode.org/

Some people are transplanting PHP, Ruby to Parrot.

Some people claim to port GCC (GNU's open source C / C compiler) to Parrot, so that all procedures that can be compiled with GCC can be directly compiled into the bytecode above the Parrot. Even someone decided to transplant .NET to Parrot.

This is of course a crazy decision, but the business is to rely on madness, and the madman and the genius are determined by the final success or failure. He may not succeed, but if success is very great (Tang's original words).

Pugs, no matter the development of other Perl6, just make a real implementation for Perl6, with this to test the characteristics of Perl6 language, help the further design of Perl6 language, and finally plan to transform into Perl6 compilers to Parrot.

Website: http://www.pugscode.org

Perl6 The entire project has been developed in the past 4 years:

Perl6 language design:

When the initial design of Perl6 language, a RFC (Request for Comments) project is to be sent to all people who care about Perl6 language. Everyone will write itself to RFC in the Perl6 language, and then send it to LARRY WALL, LARRY WALL will find a way to help you in Perl6. Finally, Larry took a whole year to integrate the features described in various RFCs into new Perl6 languages ​​(when developing Perl5, they also integrated many other languages ​​for a long time. In Perl5, Perl's past versions are also like this, and they are stealing, adopting various language good ideas).

After the Larry Wall collected, after the RFC was completed, from 2001, he continued to write an envelope (ApocalyPses, Greek), describing the new features of Perl6. The format of the revelation of the PROGRAMMING Perl written by Larry Wall is the same, for example: The subroutine is described in the subroutine in Chapter 6 in ProGramming Perl. The six chapters are also written.

Since the inspiration is not very detailed for Perl6, and the writing time has passed for 3 years, Larry starts according to its own revelation program in 2004, summarizes the corresponding revelation chapter. And more professional. By December 2004, most of the performance of Perl6 language has been written in a range of outlines, and has stabilized to the extent that can be applied.

Development of Perl6 compiler:

In the October 2000, Perl Foundation raised $ 75,000 in two weeks to hire Damian Conway (Perl core developers) 2001, allowing him to develop Perl6. Among them, 20,000 dollars let Damian go to a speech to promote Perl6. Damian has made a speech for Linux and free software enthusiasts from all over the United States, so that everyone is full of PERL6.

In 2002, Damian continued to be responsible for developing Perl6.

In 2003, Damian completed the Perl6 :: Rules module, which is a prototype of Perl6 Rules on Perl5, which is a critical part of the entire Perl6 compiler. However, the developed products are very immature and cannot be operated stable.

So three years have passed, there is no mature Perl6 to Parrot compiler. In the past, the route to develop the Perl6 compiler is wrong.

In February 2005, Tang began PUGS and the development of another Perl6 compiler.

Parrot development:

In 2001, Dan Sugalski is responsible for the development of Parrot. From August 2001, the code was released, the first version was 0.0.2, and 14 versions have been released in January 2005, the latest version is 0.1.2.

Now some languages ​​can be compiled into a Parrot's bytecode. You can now write some simple programs on the test parser with Parrot, and Parrot has supported most mathematical operations, some basic characters and some conditional operations.

The entire PARROT development is still in progress.

Problem in the development of Perl6 compiler:

When initially announced this Perl6 development plan, the entire PERL6 community is very happy, everyone is waiting for the success of Perl6. But 2002-2004 three years has passed, no perL6 proceeds run. Now Parrot's procedures are actually very stable, but Perl6 language to Parrot's compiler has not been implemented (Parrot can now run Python). So the end of 2004, everyone is desperate, and it feels that the actual operation of Perl6 is coming. During the 3rd year, Larry still wrote an envelope. The Damian article is written to the revelation record (for the actual use of the content in the revelation), but there is no real perl6 Language implementation.

There is a little joke: Where is anyone who worked in Perl6? Damian will say: "Run in my mind". However, he will take him from Australia to run the Perl6 program is too expensive, and he can't run the Perl6 program in the evening. :) Parrot was originally designed to run Perl6, but now it seems that PARROT can run, it is not a way to run Perl6.

The key is what is the problem?

The problem is that the design of Perl6 is to achieve self-hosting. For so-called self-sufficient examples, the compiler is written by C, C compiler is written by C , and the compiler of Java has some compiler written by Java, C # compiler is made from C # written. With this type, very many compilers use themselves to write their own compilers, with their own execution environment, this is the so-called self-sufficient execution. However, the scripting language of our familiarity is mostly implemented in c, which is not self-sufficient, this is the problem that you have to implement any new features to go to another language, and change it later Impact all languages. You can't write a new feature in your own language. So when designing Perl6, Larry said that Perl6 is committed to implement themselves, and Perl6 is to execute himself. This has produced the problem bootstrapping (like a person wants to mention his own laces to mention themselves, it is the problem of chicken egg egg growth. If you don't have anything, you can't activate it.

The syntax of Perl5 is YACC syntax, YACC

Website: http://www.lysator.liu.se/c/ansi-c-grammar-y.html

It is a syntax parser written with C. He can help you analyze your program to understand the grammar tree that can be understood.

But this grammar is flexible. Therefore, when developing Perl6, I decided to use Perl6 Rules to parse the syntax of Perl6.

The question is to write the rules:

The initial plan is to use Perl 5 to boost: first expand Perl 5, so that it is executed on the PARROT virtual machine (through B :: Parrot or Ponie), then actually writes Perl 6 compiler with Perl 5, finally The P5-TO-P6 converter translates the compiler into Perl 6. However, although the Perl6 :: Rules module written by Damian has realized the roect of Rules on Perl 5, it is still not mature enough for the construction compiler. So in the past three years, Perl6 has been developed, and a wrong road, the entire development of the Perl6 compiler must be revised from the new correction.

Perl6 Transfer - Development of PUGS:

At 2005-2-1 Tang also started a crazy thing: For past Perl6 development, no matter, from the newly written an interpreter PUGS directly run Perl6. PUGS's root of Perl5, Parrot has no relationship. When it starts, Tang has not informed the original Perl6 developers, it is completely stovetop, and everyone is very confused. Do you think that Tang is going to replace it? Did Tang still Larry? Do you want to give it a tamping?

So Tang wrote an eDC (apocrypha, greek, here is a reasons why you have developed PUGS for Larry's apocalypses.

Website: http://svn.perl.org/perl6/pugs/trunk/docs/en-cn/01overview.html

The meaning of ease is to indicate that it is not written by Larry, but Tang himself is on the basis of Larry.

The development of this project is very fast, and at day 7, we can run most of the computing procedures. On day 20, there is a module, and there are thousands of tests in the 22nd day, from March 5, except Other Perl6 programs can be implemented outside of certain new features in Rules.

Therefore, the entire project is developed in a very horrible speed, and the team now has 16 people.

There is already a small example of Perl6, and some people have transplanted BLOSXOM (a lightweight blog system) to Perl6, this thing is basically running on the PUGS, and there are many common computers. For example, river tower, rapid sorting, Mandbrot set, etc. can be run on the PUGS, and the speed of execution is still very fast.

Tang Development This project did not receive the financial support of the Perl Foundation. It is mainly comparable to the recent PERL Foundation's financial resources. Tang believes that we have financial resources to complete this project independently, so there is no Sponsorship to the Perl Foundation.

The purpose of PUGS is to help Perl6 activation.

Perl6 (Perl6 described in Larry Revelation) is a very complex and huge language. When Pugs is actually developed, it will find Perl6 language (Perl6 described in the Larry Revelation) has a lot of contradictory places, Don development The team reported these questions to Larry, and Larry continued to resolve these conflicts in the actual development of PUGS. Such PUGS can actually help Perl6 language to further improve language design.

PUGS development plan: I hope that one version can be released every month, and the PUGS can be transplanted to the Parrot after half a year.

6.0: Released for the first time

6.2: Basic input and output and process control components, can overwritten variables and assignments.

6.28: Classes and traits (object system of Perl6). 6.283: Rules and grammars.

6.2831: Role Composition and other implementation period functions.

6.28318: Macro (Macros).

6.283185: If necessary, transplant the PUGS to Perl 6.

When the last version is 6.283185, it is necessary to complete the basic mission of PUGS, and Perl6 activation.

Pugs This project is written in a pure functional programming language with Haskell, a pure functional programming language.

Website: http://www.haskell.org/

Most people don't understand Haskell, Tang is just two months of Haskell.

Tang is encourageing everyone of the Perl community to learn Haskell, including larry.

Website: http://www.pugscode.org

PERL Appendix:

PERL brief introduction:

Perl is a powerful and flexible computer language that is very easy to start.

Perl's famous name originated from the Internet of Web CGI programming.

The biggest advantage of Perl is character processing (PERL has powerful regular expression support).

Perl's advantage in recent years reflects up to more than 7,000 modules on the CPAN, each module can help you complete some of the work you want to complete.

The main versions of Perl have experienced five, and Perl's current version is Perl5.

Perl is an open source software that you can learn freely, use even improve it.

Perl is one of the most common tools of Hacker, and Perl is also your belief in the system administrator. But when you really start using Perl, you will find that you want to use Perl to complete any questions you encountered.

Perl official website introduction:

Perl's official homepage is a link-type page, only a variety of PERL connections on the homepage, can be said to be a portal of Perl. By linking the links above, you can go to the relevant sites of various Perl.

Website: http://www.perl.org

CPAN introduction:

CPAN is a Web site with a lot of Perl modules. Perl is now only used for everyone, mostly because of the power of CPAN, now there is approximately more than 7,000 modules in the CPAN. About more than 1,000 are commonly used. These models can be used directly to achieve a variety of functions. So and big convenience for people to develop Perl software. Because many implementations only need you to download a corresponding module to CPAN, then install on your machine, write a small number of code can be done. So using Perl development speed is very fast. This is why Perl is the preferred tool for Hacker. He can quickly help you make the implementation you want.

Website: http://www.cpan.org

Presentation with perl core developers and photos:

Larry Wall, Dan Sugalski, Damian Conway.

Website: http://www.perlfoundation.org/gc/gravest/2002.html

Introduction to PerlChina:

A group of communities established in a group of domestic Perl enthusiasts committed to developing Perl in China.

Website: http://www.PerlChina.org

About the Author:

Alexe, an unemployed free computer, love free software, is striving to write IM and web-related protocols. MSN: alexe_com@msn.com

Editor: I spent more than 5 days to organize this article, and I have a little contribution to my favorite Perl.

Perl has been a 15-year history as a language. Perl has been constantly innovating, and the development of Perl6 is to make this innovation to the ultimate, so that Perl can finally become a perfect language.

The development of Perl6 may make Perl6 a third largest platform after .NET and Java, but open source code author does not have a magnificent market imperative, they just want to perfect the language of their favorite to the extreme. Although there is a major mistake in the development of Perl6, this cannot block people with ideals, these people's efforts are not counted, but in order to create better Perl to everyone, just to complete their own beautiful ideals.

I hope that the above efforts can make everyone more understanding this unique language, more understanding of the great ideals and hard work of open source code authors, let everyone know that there are people who have created better software for everyone, hope Domestic can also have more people to join this camp, after all, this means that we will develop well in terms of good aspects.

Completed in the early morning of 05-3-22

PDA in home

Alexe

转载请注明原文地址:https://www.9cbs.com/read-43373.html

New Post(0)