Re: r24737 - docs/Perl6/Spec

2009-01-03 Thread Aristotle Pagaltzis
* jerry gay  [2009-01-02 21:30]:
> the most likely short names, C<< < -d -o -c > >> are all taken
> by either p5 or p6 command-line.

Is `-q` taken?

Regards,
-- 
Aristotle Pagaltzis // 


Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread jason switzer
On Fri, Jan 2, 2009 at 8:12 PM, Geoffrey Broadwell wrote:

> On Fri, 2009-01-02 at 12:27 -0800, jerry gay wrote:
> > oh, yes, whoops! i responded to someone else in #pugs earlier, and
> > forgot to address the item here. C replaces p5's
> > C (that's the latest idea from damian, although it seems not
> > to be published yet).
>
> Ah, I get it!  What about perldoc's special modes?  Will these go in
> ++DOC ... ++/DOC sections?


Jerry mentioned in IRC that he intends on documenting the metasyntax options
more. I'm guessing this is sort of a special meta argument given perldoc's
modes, so it should probably be documented there. I would like to raise the
question of whether implementations must be required to fully parse/present
perldoc or just recognize it's presence. This would allow for POD "fluffers"
like pod2html and for streamlined perl6 implementations to skip things like
--doc.

-Jason "s1n" Switzer


Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread Geoffrey Broadwell
On Fri, 2009-01-02 at 12:27 -0800, jerry gay wrote:
> oh, yes, whoops! i responded to someone else in #pugs earlier, and
> forgot to address the item here. C replaces p5's
> C (that's the latest idea from damian, although it seems not
> to be published yet).

Ah, I get it!  What about perldoc's special modes?  Will these go in
++DOC ... ++/DOC sections?

> the most likely short names, C<< < -d -o -c > >> are all taken by
> either p5 or p6 command-line. i don't want to use C<-d>, because that
> has to do with the debugger in p5, so makes it harder for p6 to catch
> accidental usage. C<--doc> probably warrants a short name, since it
> will be called frequently--i hope, reducing irc traffic :) but i
> haven't decided on a good name yet. i'm open to suggestions.

Don't have any yet.  Will let my subconcious ruminate on it.


-'f




Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread jerry gay
On Fri, Jan 2, 2009 at 11:24, Geoffrey Broadwell  wrote:
> Thank you for the quick turnaround!
>
> On Fri, 2009-01-02 at 10:55 -0800, jerry gay wrote:
>> On Fri, Jan 2, 2009 at 09:27, Geoffrey Broadwell  wrote:
>> > It's also not
>> > obvious what a boolean named $doc does -- which probably means either
>> > that it's not supposed to be a boolean, or it needs a somewhat more
>> > descriptive long name (or both).
>
> I think this is the only remaining item you had not yet responded to --
> er, unless I missed it.
>
oh, yes, whoops! i responded to someone else in #pugs earlier, and
forgot to address the item here. C replaces p5's
C (that's the latest idea from damian, although it seems not
to be published yet).

the most likely short names, C<< < -d -o -c > >> are all taken by
either p5 or p6 command-line. i don't want to use C<-d>, because that
has to do with the debugger in p5, so makes it harder for p6 to catch
accidental usage. C<--doc> probably warrants a short name, since it
will be called frequently--i hope, reducing irc traffic :) but i
haven't decided on a good name yet. i'm open to suggestions.

~jerry


Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread Geoffrey Broadwell
Thank you for the quick turnaround!

On Fri, 2009-01-02 at 10:55 -0800, jerry gay wrote:
> On Fri, Jan 2, 2009 at 09:27, Geoffrey Broadwell  wrote:
> > It's also not
> > obvious what a boolean named $doc does -- which probably means either
> > that it's not supposed to be a boolean, or it needs a somewhat more
> > descriptive long name (or both).

I think this is the only remaining item you had not yet responded to --
er, unless I missed it.


-'f




Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread jerry gay
On Fri, Jan 2, 2009 at 09:27, Geoffrey Broadwell  wrote:
> On Fri, 2009-01-02 at 17:08 +0100, pugs-comm...@feather.perl6.nl wrote:
>> +=head2 Synopsis
>> +
>> +  multi sub perl6(
>> +Bool :a($autosplit),
>> +Bool :c($check-syntax),
>> +Bool :$doc,
>> +:e($execute),
>> +:$execute-lax,  #TODO fix illegal -e6 syntax. -6? not legal. -x? hrmm
>> +Bool :F($autoloop-split),
>> +Bool :h($help),
>> +:I(@include),
>> +#TODO -M,
>> +Bool :n($autoloop-no-print),
>> +:O($output-format) = 'exe',
>> +:o($output-file) = $*OUT,
>> +Bool :p($autoloop-print),
>> +:S(@search-path),
>> +Bool :T($taint),
>> +Bool :v($version),
>> +Bool :V($verbose-config),
>> +  );
>
> I find this a little difficult to skim, because parallel things are not
> aligned.  Aligning on ':' should make things much easier on the eyes:
>
> multi sub perl6(
>Bool :a($autosplit),
>Bool :c($check-syntax),
>Bool :$doc,
> :e($execute),
> :$execute-lax,
>Bool :F($autoloop-split),
>Bool :h($help),
> :I(@include),
> #TODO -M,
>Bool :n($autoloop-no-print),
> :O($output-format) = 'exe',
> :o($output-file)   = $*OUT,
>Bool :p($autoloop-print),
> :S(@search-path),
>Bool :T($taint),
>Bool :v($version),
>Bool :V($verbose-config),
> );
>
thanks, done.

> Ah, that's a bit better.  Looking at the above, is $execute-lax supposed
> to be a boolean, or is it really a generic scalar?  It's also not
> obvious what a boolean named $doc does -- which probably means either
> that it's not supposed to be a boolean, or it needs a somewhat more
> descriptive long name (or both).
>
--execute-lax is gone, since -e6 is just an idiomatic shortcut for
--execute '6', which is outlined in Synopsis 11.

> Also, in Perl 5 taint is tri-valued, because it has a warnings-only
> mode.  How will that be supported by Perl 6?
>
well, perl 5 uses two flags for this, and i'm as yet undecided what to
do about it.one argument is that i should keep the syntax from perl 5
consistent where possible. another argument is that taint warnings
mode is relatively unused (and for development only) so doesn't
deserve its own flag. maybe -t goes away, and -T takes a param that
defaults to C but can be set to something like
C.

> Finally, how do the defaults of $output-file and $output-format interact
> so that the default behavior remains compile-and-execute?  Changing the
> default to compile-to-exe seems unperlish to me 
>
i've gotten rid of default values for these options. they're strictly
implementation-dependent. the syntax exists to allow rakudo to emit
pbc files, and pugs to emit javascript, and i think is flexible enough
for other implementations. maybe i'll remove them entirely, since they
are implementation-dependent and can be done with ++metasyntax.

in any case, the default behavior of perl 6 is unchanged from perl 5,
which is compile-and-execute.

~jerry


Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread Geoffrey Broadwell
On Fri, 2009-01-02 at 17:08 +0100, pugs-comm...@feather.perl6.nl wrote:
> +=head2 Synopsis
> +
> +  multi sub perl6(
> +Bool :a($autosplit),
> +Bool :c($check-syntax),
> +Bool :$doc,
> +:e($execute),
> +:$execute-lax,  #TODO fix illegal -e6 syntax. -6? not legal. -x? hrmm
> +Bool :F($autoloop-split),
> +Bool :h($help),
> +:I(@include),
> +#TODO -M,
> +Bool :n($autoloop-no-print),
> +:O($output-format) = 'exe',
> +:o($output-file) = $*OUT,
> +Bool :p($autoloop-print),
> +:S(@search-path),
> +Bool :T($taint),
> +Bool :v($version),
> +Bool :V($verbose-config),
> +  );

I find this a little difficult to skim, because parallel things are not
aligned.  Aligning on ':' should make things much easier on the eyes:

multi sub perl6(
Bool :a($autosplit),
Bool :c($check-syntax),
Bool :$doc,
 :e($execute),
 :$execute-lax,
Bool :F($autoloop-split),
Bool :h($help),
 :I(@include),
 #TODO -M,
Bool :n($autoloop-no-print),
 :O($output-format) = 'exe',
 :o($output-file)   = $*OUT,
Bool :p($autoloop-print),
 :S(@search-path),
Bool :T($taint),
Bool :v($version),
Bool :V($verbose-config),
);

Ah, that's a bit better.  Looking at the above, is $execute-lax supposed
to be a boolean, or is it really a generic scalar?  It's also not
obvious what a boolean named $doc does -- which probably means either
that it's not supposed to be a boolean, or it needs a somewhat more
descriptive long name (or both).

Also, in Perl 5 taint is tri-valued, because it has a warnings-only
mode.  How will that be supported by Perl 6?

Finally, how do the defaults of $output-file and $output-format interact
so that the default behavior remains compile-and-execute?  Changing the
default to compile-to-exe seems unperlish to me 


-'f




r24737 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle
Date: 2009-01-02 17:08:51 +0100 (Fri, 02 Jan 2009)
New Revision: 24737

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[spec] add signature for perl6, and make --output-format entirely 
implementation-specific

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-02 15:50:03 UTC (rev 24736)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-02 16:08:51 UTC (rev 24737)
@@ -312,6 +312,30 @@
 
 Perl 6 options, descriptions, and services.
 
+=head2 Synopsis
+
+  multi sub perl6(
+Bool :a($autosplit),
+Bool :c($check-syntax),
+Bool :$doc,
+:e($execute),
+:$execute-lax,  #TODO fix illegal -e6 syntax. -6? not legal. -x? hrmm
+Bool :F($autoloop-split),
+Bool :h($help),
+:I(@include),
+#TODO -M,
+Bool :n($autoloop-no-print),
+:O($output-format) = 'exe',
+:o($output-file) = $*OUT,
+Bool :p($autoloop-print),
+:S(@search-path),
+Bool :T($taint),
+Bool :v($version),
+Bool :V($verbose-config),
+  );
+
+=head2 Reference
+
 =over 4
 
 =item --autosplit, -a
@@ -441,12 +465,11 @@
 
 Notes: Desugars to C<++PARSER --prelude=Perl6-autoloop-no-print ++/PARSER>.
 
-=item --output-format, -O [format]
+=item --output-format, -O format
 
 Specify the file format for the output file requested with C<--output-file>.
-Defaults to 'exe', which represents the target platform's idea of an
-executable. Other valid values are implementation-specific, so consult the
-documentation for your compiler toolchain.
+This option is implementation-specific, so consult the documentation for your
+Perl 6 implementation.
 
 =item --output-file, -o [filename]