Re: Perl 6 Parrot Essentials as project documentation
thats great because i actually use some parts for the article i currently write about perl6 and i think some musings about perl6 in theory could in this way flow back to the book because i think its not written the easiest way in some corners. but will see. great step herbert proton-ce.sf.net Allison Randal wrote: I just signed an agreement with O'Reilly that assigns the full copyright in the book Perl 6 and Parrot Essentials to The Perl Foundation. The text is out-of-date, but can be updated much more rapidly than it can be rewritten from scratch. Sounds great. Does TPF have a license for it already? Where do you want the text for the Perl 6 parts of the book? Maybe: http://svn.perl.org/perl6/doc/trunk/books/p6tut If you want many potential committers, use the pugs tree. I think the number of committers of svn.perl.org/perl6/doc is very low. I'd suggest something beneath http://svn.pugscode.org/pugs/docs/, perhaps essentials/ Moritz
Re: Perl 6 Parrot Essentials as project documentation
Allison Randal wrote: I just signed an agreement with O'Reilly that assigns the full copyright in the book Perl 6 and Parrot Essentials to The Perl Foundation. The text is out-of-date, but can be updated much more rapidly than it can be rewritten from scratch. Sounds great. Does TPF have a license for it already? Where do you want the text for the Perl 6 parts of the book? Maybe: http://svn.perl.org/perl6/doc/trunk/books/p6tut If you want many potential committers, use the pugs tree. I think the number of committers of svn.perl.org/perl6/doc is very low. I'd suggest something beneath http://svn.pugscode.org/pugs/docs/, perhaps essentials/ Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/
Re: Perl 6 Parrot Essentials as project documentation
On Jun 18, 2007, at 8:13 PM, Moritz Lenz wrote: Allison Randal wrote: I just signed an agreement with O'Reilly that assigns the full copyright in the book Perl 6 and Parrot Essentials to The Perl Foundation. The text is out-of-date, but can be updated much more rapidly than it can be rewritten from scratch. Sounds great. Does TPF have a license for it already? Allison and I discussed this today. TPF are releasing it under Artistic 2. Where do you want the text for the Perl 6 parts of the book? Maybe: http://svn.perl.org/perl6/doc/trunk/books/p6tut If you want many potential committers, use the pugs tree. I think the number of committers of svn.perl.org/perl6/doc is very low. I'd suggest something beneath http://svn.pugscode.org/pugs/docs/, perhaps essentials/ We discussed this too. I'll be branching it into pugs/docs/ tonight. (I need to write a README with license and source and copyright info) Best, Jesse P6PM Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ PGP.sig Description: This is a digitally signed message part
Re: Perl 6 Parrot Essentials as project documentation
I'm pleased to announce that the Perl 6 parts of /Perl 6 and Parrot Essentials/ are now available at http://svn.pugscode.org/pugs/docs/tutorial/ [1] for your hacking pleasure. Thanks to Allison for navigating the sometimes murky waters of copyright assignment and licensing to get this documentation opened. I hope it will be a great base for Perl 6 hackers and documenters to build upon. If you're interested in hacking the docs and can shoot me mail within the next 24 hours, I'll sort you out a pugs commit bit. After that, ask around on #perl6 on irc.freenode.net and someone should be able to set you up. Best, Jesse [1] A pristine copy of the content of the book is also available in the official Perl Foundation SVN repository at http://svn.perl.org/perl6/doc/trunk/ books/tutorial/ PGP.sig Description: This is a digitally signed message part
Query regarding Java/perl interface
Hi I am sameer and am new to this group. It would realy help if any body can let me know is there a book or reference guiode where in i can get help regarding the perl/java interface and also about the tool named Java perl lingo.
Request for kp6 compiler architecture review
I'm working on the development plan for the next generation of the Perl6-in-Perl6 compiler kp6. kp6 is implemented in mp6, a basic version of Perl 6 which is written in mp6 itself, and bootstrapped on Perl 5. kp6, while incomplete, runs today and can already parse and compile a subset of Perl 6. * Accessing kp6: The kp6 directory (Pugs /v6/v6-KindaPerl6/) contains the tools you need for bootstrapping the compiler and for running programs. Compiler source code can be compiled with: $ perl mp6.pl lib/Some/File.pl lib5/Some/File.pl Programs written in Perl 6 can be compiled and run with: # run a test $ perl kp6-perl5.pl t/kp6/01-tap.t | perl -Ilib5 # show the compiled code $ perl kp6-perl5.pl hello.pl | perltidy # show the AST $ perl kp6-perl5.pl --ast hello.pl | perltidy There are shortcut scripts for some common operations: $ perl recompile.pl # recompiles all kp6 source $ sh run_tests.sh # runs all kp6 tests Only the Perl 5 backend is fully implemented; Parrot (through Perl6-in-Parrot), JVM (through Groovy), and Python (possibly through RPython) are experimental. * Development Plan: The most up-to-date document for the kp6 architecture is this drawing: http://svn.pugscode.org/pugs/v6/docs/kp6.jpg # simplified version http://svn.pugscode.org/pugs/v6/docs/kp6-overview.jpg kp6 currently implements the compiler almost exactly as drawn. The current development plan can be accessed from here: http://pugs.blogs.com/pugs/2007/06/kindaperl6_proj.html I'm looking for comments on how to improve the compiler internals. For example: - One of my basic design principles was to implement AST transformations as pluggable modules, using a visitor pattern. Do you see potential problems with this approach? - BEGIN block side-effects are recorded in a hash. This adds an overhead to all assignment operations. Do you see a better way to check for side-effects? I'd appreciate if I can get a compiler architecture review. I'm available on #perl6 in freenode (my timezone is -03:00). You can find me there as 'fglock'. Please share your comments either here on the mailinglist or via IRC. I look forward to your feedback thanks! - Flavio S. Glock (fglock)
Re: Generalizing ?? !!
[ Sorry to fall off the net for several days . . .] On 6/13/07, Larry Wall [EMAIL PROTECTED] wrote: On Wed, Jun 13, 2007 at 05:08:34PM -0400, Charles Bailey wrote: : I'm concerned that the relevant precedent isn't just Perl5. The ?: spelling : of the ternary is pretty deeply embedded in programming languages -- I'm : hard pressed to think of a widely used language in the past 10-15 years that : spells it differently (though that may say more about my experience than the : universe of widely used languages). It's really just the C-based languages. Lots of popular languages don't even give you a conditional operator, and seem to get by okay without it. Granted, but that's 8 of the top 10 languages on the current TIOBE list. Lies, damned lies, and statistics . . . That had to be one of the main design considerations for Perl 1, but now we've got the design capital to fix some things. The Perl 6 mandate is not universal compatibility (which Perl 5 still represents in a way), but the chance to fix everything that needs fixing. And this one of the things I think C got wrong. Perl 6 is looking more for You may well be right here -- you're certainly more qualified than I in language building -- but this line of reasoning leaves me with something of an uneasy feeling. I'm not sure Perl6 has all that much of what I'll call practical design capital, by which I mean ability to change practice by making new ideas common usage. I'm distinguishing that from what I'll call formal design capital -- the ability to change practice by having good ideas to which people will listen -- of which I think Perl6 has a good amount. I think this distinction can be important for several reasons, not the least of which is that they may antagonize one another. I'd argue that Perl's FDC arises from its current widespread acceptance, showing that many people think it currently implements good solutions to some of the problems they need to solve, and from the respect given to [EMAIL PROTECTED], because they've implemented those solutions, discussed them intelligently, and are in general good people. This sort of capital works best for big ideas, whether by putting them out for discussion (read: persuasion), or by implementing them in a new language. OTOH, I'd argue that PDC is more of a transient phenomenon, and arises from the comfort users have with the language, whether it's that it feels natural overall, or that they recall being able to accomplish some necessary task(s) easily or elegantly. In some respects, it's the net-equivalent of what have you done for me lately? I think Perl 6 has less of a reserve here, partly because of its long gestation, partly because of its informal reputation as a small step up from APL in readability (cue the JAPH culture), and partly because of its reputation for being disorganized and unsecure. (As an aside, let me take pains to emphasize -- this being email -- that I am not arguing that these claims are true, not that, to the extent they're true they're Perl's fault. Nonetheless, they exist, in the minds of potential users, and of the managers/vendors/spinners that specify what language choices are allowed.) I also think that one wins or loses in this arena as often due to the little things -- whether something is easy and intuitive -- as to the big things -- whether something is possible and clean. Why do I belabor the obvious so? Because I think the discussion about the ternary operator, like several others recently on these lists, might be conflating the two, and might be missing an opportunity thereby. In some cases, Perl6 will want to be the language on a hilltop, beckoning others to follow into the land of elegance and orthogonality. But there's also something to be said for ingratiating and subverting. That, in turn, implies that there will be cases where it's better to make a suboptimal choice in a small matter -- not sacrificing major principles, and not jumping through hoops inside the box to save the user two keystrokes, but inculturating in order to better be able to make the really important points. Whether ?: is a better choice in this respect than ??!! is perhaps a matter of taste, and I'm not going to argue that either is the Platonic spelling of the ternary operator. As best I can articulate it, I think I'm arguing for a more explicit balance of better with comfortable in making these choices. I don't mean by any of this to devalue the extensive community input into the early stages of Perl6 design. If anything, I may be undervaluing it, since it occurred during a time when RL required that I essentally drop out of the Perl community, and I missed much of the detail. I also don't mean to ignore the ongoing input via these lists, and I'm sure several other channels. It's also true that at some point, to get a working result, The Cabal has to make design decisions whether or not The Masses have come to consensus. That can be hard for both sides,
assign-if-uninitialized [Was: Generalizing ?? !!]
On Tue, Jun 19, 2007 at 11:50:35AM -0400, Charles Bailey wrote: : Yep. For that matter, if I had to pick one change in this area that'd : have maximum impact, I'd say a good assign-if-uninitialized idiom : would be way ahead of an if-then-else idiom. Depending on how you mean uninitialized, that would be either: $x //= 42; # init if undefined or state $x = 42; # init first time through Both of which are getting borrowed back into Perl 5, as it happens. Larry
Re: [svn:perl6-synopsis] r14421 - doc/trunk/design/syn
I'm quite surprised by this debate... To me it seems a clear rule that state that if a line begin with = then it starts a POD section is way easier to understand than a line beginning by = will start a POD section except if it is in a Perl statement, or in a :to section, or in a string literal, etc The Learning Perl 6 argument seems equally contrived to me since anyway you don't need POD to understand programming in Perl and I never actually learned POD until I wanted to do a real module and document my little console utilities in Perl. You don't need to understand POD to read a program where POD is used : it's usually quite clear from the content where it is POD and where it is doc and each section that don't look like Perl is usually POD. Even if you never heard of POD the first few samples would be a dead giveaway that those weird things are actually documentation and not code (it's my experience speaking here). I seriously doubt most programmer will start including POD section in confusing places because now they can do it, so the situation should not be any different from before. And if some do it, hell, I seriously doubt that their program would be in the scope of the beginning of Learning Perl 6 !! You didn't put -+- there in previous versions, did you ? The other problem is that if somehow a braindead guy (where would he get the idea from, I never saw such a style) put his = in first column expecting a assignment he won't get it... Seriously ? Are you really allowing for such weirdness in introductory material to a Language course ? So in my opinion, it would be fine to let slip that you can also create some kind of comment/doc by putting a = in the first column in the first chapter, and let the subject of POD for a later chapter. Of course some of you have far more experience teaching languages, but as a language _student_ I don't feel this would be any inconvenience, in fact I would have been very happy if all the Perl5 rules were that easy. -- Jedaï
Parrot 0.4.13 Clifton Released
On behalf of the Parrot team, I'm proud to announce Parrot 0.4.13 Clifton. Parrot (http://parrotcode.org/) is a virtual machine aimed at running all dynamic languages. Parrot 0.4.13 can be obtained via CPAN (soon), or follow the download instructions at http://parrotcode.org/source.html. Parrot 0.4.13 News: - Languages: + Updated Lisp, Lua, PHP (Plumhead), Python (Pynie), ABC, WMLScript, and Tcl (ParTcl). + Perl 6 passes all of the sanity tests. + PGE supports latest Perl 6 grammar syntax. Perl 6, Python (Pynie), and ABC parsers updated to match. + Updated PHP (Plumhead) to Antlr 3.0. + Lua added the beginnings of a PGE/TGE based compiler (not yet replacing the Perl/Yapp compiler). + Lisp updated for current features, added a test suite. - Core Implementation: + Filled in features and backward compatibility for PDD 15 objects. New object metamodel passes 85% of old test suite. + GCC API symbols are visible externally only when explicitly exported. + Added generated GCC compiler attributes to increase warnings, and cleaned up resulting warnings. + Code cleanup efforts and fixed memory leaks by the cage cleaners, resulting in notable speed increases. - Misc: + Updated Parrot distribution to Artistic License 2.0, from dual Artistic 1/GPL license. + SDL examples brought up-to-date with current features. For those who would like to develop on Parrot, or help develop Parrot itself, we recommend using Subversion or SVK on the source code repository to get the latest and best Parrot code. The next scheduled release is July 17, 2007. Thanks to all our contributors for making this possible, and our sponsors for supporting this project. Enjoy! Allison
Perl6 new features
Hi everyone, I am working with perl 5.8 at the moment after developping web apps in PHP. I know that perl doesn't only focus on web apps and my question might seem irrelevant but I've been searching the web in order to find the new features of perl6 regarding new functions, core module lists (not perl grammar itself) but couldn't find any thing... I would like to develop web apps with perl too but having to download modules from CPAN every time makes me feel these apps will never be able to evoluate in different environments. (environments you don't have control of) I am a bit amazing to see that perl doesn't include a bunch a set theory functions too. Instead, need to reinvent the wheel making things easy possible and hard things unconvenient. I am not blaming perl but only hopes that perl6 will allow to make things easy for the programmer. as for the web, maintaining state thru server side cookies and DBI are the very minimum I would recommend. more hash and array functions a minimum too. if there are such things in perl6, I'll be very happy to work with this language ! I may not know enough about perl and my 'complain' might be absolutely unfounded. I know this is an open source language and that people are busy and if the answer is DIY ! I'll pass my way^^; Anyway, this is an outside view from 2007 hoping to help perl6 becoming popular amongst people.
Re: Query regarding Java/perl interface
On 6/19/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi I am sameer and am new to this group. It would realy help if any body can let me know is there a book or reference guiode where in i can get help regarding the perl/java interface and also about the tool named Java perl lingo. For the Java to Perl 5 interface, see Inline::Java on CPAN: http://search.cpan.org/dist/Inline-Java/ For a Java to Perl 6 API translator, see Java::Javap: http://search.cpan.org/perldoc?Java::Javap The author's journals may be helpful too: http://use.perl.org/~philcrow/journal Cheers, agentz
Referring to source code within Perldoc: the new A code
Here's the first draft (documented in Pod 6, of course ;-). Feedback and suggestions are most welcome. (But please don't bother explaining to me this feature won't suffice as the high-level automatic code-to-documentation mechanism that Markov has been championing. I promise that I'm very well aware of that fact. This new formatting code isn't intended to replace such advanced autodocumentation tools...only to make such tools unnecessary in the simple cases and--in the non-simple cases--to make such tools easier to create, by providing a symbolic intermediate-level representation for interwoven code and Pod.) Damian -cut--cut--cut--cut--cut- =head3 Ambient aliases The CA formatting code specifies an Balias to an ambient antecedent. This is like a Lplacement link|#Placement links, except that the text that is inserted to replace the CA formatting code is some portion of the Lambient section(s)|#General syntactic structure of the current document, rather than the entire contents of some external document. Hence, the CA code makes it possible to incorporate pieces of ambient text (typically source code) into Pod documentation. Specifically, the CA code is replaced by searching backwards through all preceding non-Pod parts of the document, to locate the nearest prior substring that matches the contents of the CA code. The contents of an CA code can specify a back-reference of this type in one of two ways: =item as a Iprefix keyword, or =item as a Idelimited text range. By default, CA aliases are keyword oriented. That is, the contents of an CA block are treated as a keyword or prefix that introduces the desired text. That text is located by searching backwards from the location of the CA code, to find the nearest preceding instance of the specified prefix in any previous ambient block. The text that is then used to replace the CA is the first symbol following that located prefix. In this context, a symbol is defined as a sequence of non-whitespace characters terminated by a transition from an identifier character to a non-identifier character. For example, in the following: =begin code class Pet { has $name; =DESCRIPTION The class Aclass provides a Ahas attribute. =end code the CAclass formatting code would be replaced by Pet, since that is the sequence of non-whitespace characters that immediately follows class in the preceding ambient source code. Likewise, the CAhas formatting code would be replaced by $name, because that is the longest sequence of non-whitespace characters that follows a has and terminates in an identifier-to-nonidentifier boundary. =begin para =config C :allowR In other words, any formatting code of the form CARprefix is replaced by the substring of the nearest preceding ambient block that matches the pattern: =end para =for code :allowR / .* Rprefix \s* ( \S*? \w ) [\W | $] / This default is designed to work well for the commonest kind of back-reference in ambient text: a reference to a code construct that was defined using a prefix keyword and whose name ends in an identifier. The second and more general way of specifying an alias is to specify both a prefix and a postfix delimiter for the replacement text. If the contents of an CA formatting code include a range marker (C..), the sequence before the C.. is treated as the left delimiter of the replacement text, and the sequence after the C.. is the right delimiter. In this case, there are no other constraints on the replacement text. In particular, it may contain any number of non- identifier or whitespace characters. For example: class Pet { method eat(Food $meal) {...} =for DESCRIPTION The Amethod() method has the following argument list: A(..) This would be interpreted as: The eat() method has the following argument list: Food $meal because the CA(..) specifies an alias to the closest preceding ambient text that is left-delimited by a '(' and right-delimited by a ')'. To specify an alias in which the sequence C.. is itself a left- or right-delimiter (rather than the separator between the two), use a CV code: constant @range = 0..99; =para The maximum value is AV; =head4 Explicit aliasing The replacement strings for CA formatting codes are normally specified implicitly, by the closest preceding ambient text that matches the contents of the CA code. However, it is possible to override this behaviour and create an Iexplicitly defined alias, using the C=alias directive: class Agent {...} =alias component Agent class Transaction is Activity { =DESCRIPTION The Aclass class represents a transaction activity between two Acomponent objects. In the preceding example, CAclass is a normal keyword alias (which would be replaced by the closest preceding prefixed match: Transaction). However, CAcomponent is a defined alias (which would be replaced by the explicitly
And for those who prefer their design documents pre-cooked...
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN html head title/title style type=text/css !-- th, td { padding-right: 2em; } th p{ margin: 3pt; text-align: left; border-bottom: thin solid; } td p{ margin: 3pt; } -- /style /head body h3a name=Ambient aliasesa name=25524540Ambient aliases /a/a/h3 pThe codeAlt;gt;/code formatting code specifies an strongalias to an ambient antecedent/strong. This is like a a href=#Placement linksplacement link/a, except that the text that is inserted to replace the codeAlt;gt;/code formatting code is some portion of the a href=#General syntactic structureambient section(s)/a of the current document, rather than the entire contents of some external document. /p pHence, the codeAlt;gt;/code code makes it possible to incorporate pieces of ambient text (typically source code) into Pod documentation. Specifically, the codeAlt;gt;/code code is replaced by searching backwards through all preceding non-Pod parts of the document, to locate the nearest prior substring that matches the contents of the codeAlt;gt;/code code. /p pThe contents of an codeAlt;gt;/code code can specify a back-reference of this type in one of two ways: /p ullias a emprefix keyword/em, or /li lias a emdelimited text range/em. /li /ulpBy default, codeAlt;gt;/code aliases are keyword oriented. That is, the contents of an codeAlt;gt;/code block are treated as a keyword or prefix that introduces the desired text. That text is located by searching backwards from the location of the codeAlt;gt;/code code, to find the nearest preceding instance of the specified prefix in any previous ambient block. The text that is then used to replace the codeAlt;gt;/code is the first symbol following that located prefix. In this context, a symbol is defined as a sequence of non-whitespace characters terminated by a transition from an identifier character to a non-identifier character. /p pFor example, in the following: /p blockquotepreclass Pet { has $name; =DESCRIPTION The class Alt;classgt; provides a Alt;hasgt; attribute. /pre/blockquotepthe codeAlt;classgt;/code formatting code would be replaced by Pet, since that is the sequence of non-whitespace characters that immediately follows class in the preceding ambient source code. Likewise, the codeAlt;hasgt;/code formatting code would be replaced by $name, because that is the longest sequence of non-whitespace characters that follows a has and terminates in an identifier-to-nonidentifier boundary. /p pIn other words, any formatting code of the form codeAlt;varprefix/vargt;/code is replaced by the substring of the nearest preceding ambient block that matches the pattern: /p blockquotepre/ .* varprefix/var \s* lt;( \S*? \w )gt; [\W | $] / /pre/blockquotepThis default is designed to work well for the commonest kind of back-reference in ambient text: a reference to a code construct that was defined using a prefix keyword and whose name ends in an identifier. /p pThe second and more general way of specifying an alias is to specify both a prefix and a postfix delimiter for the replacement text. If the contents of an codeAlt;gt;/code formatting code include a range marker (code../code), the sequence before the code../code is treated as the left delimiter of the replacement text, and the sequence after the code../code is the right delimiter. In this case, there are no other constraints on the replacement text. In particular, it may contain any number of non- identifier or whitespace characters. For example: /p blockquotepreclass Pet { /pre/blockquoteblockquotepremethod eat(Food $meal) {...} /pre/blockquoteblockquotepre=for DESCRIPTION The Alt;methodgt;() method has the following argument list: Alt;(..)gt; /pre/blockquotepThis would be interpreted as: /p blockquotepreThe eat() method has the following argument list: Food $meal /pre/blockquotepbecause the codeAlt;(..)gt;/code specifies an alias to the closest preceding ambient text that is left-delimited by a '(' and right-delimited by a ')'. /p pTo specify an alias in which the sequence code../code is itself a left- or right-delimiter (rather than the separator between the two), use a codeVlt;gt;/code code: /p blockquotepreconstant @range = 0..99; /pre/blockquoteblockquotepre=para The maximum value is Alt;Vlt;..gt;..;gt; /pre/blockquoteh4a name=Explicit aliasinga name=25834848Explicit aliasing /a/a/h4 pThe replacement strings for codeAlt;gt;/code formatting codes are normally specified implicitly, by the closest preceding ambient text that matches the contents of the codeAlt;gt;/code code. /p pHowever, it is possible to override this behaviour and create an emexplicitly defined/em alias, using the code=alias/code directive: /p blockquotepreclass Agent {...} =alias component Agent /pre/blockquoteblockquotepreclass Transaction is Activity { /pre/blockquoteblockquotepre=DESCRIPTION The Alt;classgt; class represents a