Re: Project Idea: Perl 6 Syntax Explainer

2007-07-19 Thread Aaron Trevena
This looks like it could 2 different things - 1 is a doxygen type markup where you provide extra stuff, the other could just extract the relevent pod or pod6 for a function/method/operator from standard pod. IME, people write the bare minimum documentation - standard perl5 pod is pretty much

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-12 Thread Moritz Lenz
Larry Wall wrote: On Tue, Jul 10, 2007 at 04:37:13PM -0700, Dave Whipp wrote: : One approach would simply be to edit Perl-6.0.0-STD.pm and add some : markup. To pick a token at random: : : =p6explain * : An asterix in a version expression matches any version : =end : token whatever { '*'

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-12 Thread Moritz Lenz
Dave Whipp wrote: Moritz Lenz wrote: You're probably right about that, but somebody who writes his own macros and operators probably doesn't need such a tool anyway. And should write very good documentation, otherwise he has lost outright. (I was thinking that your tool would provide a

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-12 Thread Steve Pitchford
Moritz Lenz wrote: Dave Whipp wrote: One approach would simply be to edit Perl-6.0.0-STD.pm and add some markup. To pick a token at random: =p6explain * An asterix in a version expression matches any version =end token whatever { '*' {*} } You convinced me, in-place documentation

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-12 Thread Moritz Lenz
Steve Pitchford wrote: Moritz Lenz wrote: Dave Whipp wrote: One approach would simply be to edit Perl-6.0.0-STD.pm and add some markup. To pick a token at random: =p6explain * An asterix in a version expression matches any version =end token whatever { '*' {*} } You convinced me,

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-12 Thread Steve Pitchford
Moritz Lenz wrote: Steve Pitchford wrote: Moritz Lenz wrote: First of all I hope there are no objections against fiddling with STD.pm. My approach so far (see http://svn.pugscode.org/pugs/misc/perlhints/) has been to write blocks for each token like so: key: * name: Regex

Re: Project Idea: Perl 6 Syntax Explainer: Status

2007-07-12 Thread Moritz Lenz
A small status update: The name of the project currently is 'perlhints', as suggested by pmurias++ and [particle]++. Some files can be found in the pugs repository in misc/perlhints/ (repository URL: http://svn.pugscode.org/pugs/misc/perlhints/) There is a command line interface called

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-12 Thread David Cantrell
On Tue, Jul 10, 2007 at 12:43:05PM +0200, Moritz Lenz wrote: considering the vast number of Operators and the like, I had the idea to implement a tool where you can enter a small piece of p6 syntax, and it explains what that might mean. (like a perldoc -f for operators/syntax elements instead

Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Moritz Lenz
Hi, considering the vast number of Operators and the like, I had the idea to implement a tool where you can enter a small piece of p6 syntax, and it explains what that might mean. (like a perldoc -f for operators/syntax elements instead of functions) A short example: $ p6explain '[]' [...] can

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Juerd Waalboer
Moritz Lenz skribis 2007-07-10 12:43 (+0200): $ p6explain '[]' [...] can be * '[$expression]': access to one or more array elements if used as postcircumfix Example: @a[2]; # access the third element of an array @a * '[$operator]': the 'reduce' hyper operator

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Amir E. Aharoni
* Anything else that should go into the requirements? It would be even cooler if the command $ p6explain 'some_user_defined_sub' would display prettily-formatted pod for that sub and would work transparently, regardless of whether this sub is defined in the Perl standard library, CPAN

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Moritz Lenz
Hi Amir, Amir E. Aharoni wrote: * Anything else that should go into the requirements? It would be even cooler if the command $ p6explain 'some_user_defined_sub' would display prettily-formatted pod for that sub and would work transparently, regardless of whether this sub is defined

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Moritz Lenz
(Sorry for personal message previously, now my answer to the list) Juerd Waalboer wrote: Moritz Lenz skribis 2007-07-10 12:43 (+0200): $ p6explain '[]' [...] can be * '[$expression]': access to one or more array elements if used as postcircumfix Example: @a[2]; # access

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Steffen Schwigon
Moritz Lenz [EMAIL PROTECTED] writes: Hi, considering the vast number of Operators and the like, I had the idea to implement a tool where you can enter a small piece of p6 syntax, and it explains what that might mean. (like a perldoc -f for operators/syntax elements instead of functions) I

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Moritz Lenz
Steffen Schwigon wrote: Moritz Lenz [EMAIL PROTECTED] writes: considering the vast number of Operators and the like, I had the idea to implement a tool where you can enter a small piece of p6 syntax, and it explains what that might mean. (like a perldoc -f for operators/syntax elements

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Dave Whipp
Steffen Schwigon wrote: Do you think it's possible to extract and collect all the operators and descriptions from the synopses into one common place? The problem with that is that it wouldn't scale to user-defined operators/macros. I think the way to approach it would be to define a POD6

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Moritz Lenz
Dave Whipp wrote: Steffen Schwigon wrote: Do you think it's possible to extract and collect all the operators and descriptions from the synopses into one common place? The problem with that is that it wouldn't scale to user-defined operators/macros. You're probably right about that, but

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Dave Whipp
Moritz Lenz wrote: You're probably right about that, but somebody who writes his own macros and operators probably doesn't need such a tool anyway. And should write very good documentation, otherwise he has lost outright. (I was thinking that your tool would provide a mechanism for them to

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Larry Wall
On Tue, Jul 10, 2007 at 04:37:13PM -0700, Dave Whipp wrote: : One approach would simply be to edit Perl-6.0.0-STD.pm and add some : markup. To pick a token at random: : : =p6explain * : An asterix in a version expression matches any version : =end : token whatever { '*' {*} } Indeed, the