Re: underscores vs hyphens (was Re: A new era for Temporal)

2010-04-12 Thread Richard Hainsworth
Damian Conway wrote: Personally, I'd prefer to see the English conventions carried over to the use of general use of hyphen and underscore in identifiers in the core (and everywhere else). By that, I mean that, in English, the hyphen is notionally a higher precedence word-separator than the

Re: A new era for Temporal

2010-04-12 Thread Mark J. Reed
On Sun, Apr 11, 2010 at 9:47 PM, Dave Rolsky auta...@urth.org wrote: On Sun, 11 Apr 2010, Moritz Lenz wrote: I've planned to add such a module to the Perl 6 spec, but some comments on #perl6 suggested it should be kept out of core to prevent bloat. Still if the overall opinion is that Perl

Re: A new era for Temporal

2010-04-12 Thread Mark J. Reed
On Mon, Apr 12, 2010 at 6:38 AM, Mark J. Reed markjr...@gmail.com wrote: I think that having a standard, minimal API for this defined in core as a Date role would be ideal. Agreed. In fact, I'd like to see DateTime be defined explicitly as a superset (subrole) of Date, with a method for

Re: A new era for Temporal

2010-04-12 Thread Moritz Lenz
Am 12.04.2010 03:47, schrieb Dave Rolsky: On Sun, 11 Apr 2010, Moritz Lenz wrote: I've planned to add such a module to the Perl 6 spec, but some comments on #perl6 suggested it should be kept out of core to prevent bloat. Still if the overall opinion is that Perl 6 should have such a module

r30364 - docs/Perl6/Spec/S32-setting-library

2010-04-12 Thread pugs-commits
Author: mberends Date: 2010-04-12 13:01:15 +0200 (Mon, 12 Apr 2010) New Revision: 30364 Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod Log: [Temporal.pod] remove invalid markup that may have blocked updating of the HTML version online, and minor cosmetic changes. Modified:

r30369 - docs/Perl6/Spec/S32-setting-library

2010-04-12 Thread pugs-commits
Author: masak Date: 2010-04-12 15:00:38 +0200 (Mon, 12 Apr 2010) New Revision: 30369 Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod Log: [S32/Numeric] removed method form of srand Overwhelming consent on #perl6 about this. Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod

r30370 - docs/Perl6/Spec/S32-setting-library

2010-04-12 Thread pugs-commits
Author: masak Date: 2010-04-12 15:12:54 +0200 (Mon, 12 Apr 2010) New Revision: 30370 Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod Log: [S32/Temporal] replaced underscores with dashes in method names Also decided to go with 'timezone' rather than 'time_zone' or 'time-zone', for a

Re: r30370 - docs/Perl6/Spec/S32-setting-library

2010-04-12 Thread Mark J. Reed
How are quarters defined? Where do(es) the extra day(s) go? On Monday, April 12, 2010, pugs-comm...@feather.perl6.nl wrote: Author: masak Date: 2010-04-12 15:12:54 +0200 (Mon, 12 Apr 2010) New Revision: 30370 Modified:   docs/Perl6/Spec/S32-setting-library/Temporal.pod Log:

Re: underscores vs hyphens (was Re: A new era for Temporal)

2010-04-12 Thread Peter Scott
Am I the only one who sees a hyphen and thinks binary minus? Just because the parser can disambiguate this use of it doesn't mean the reader's brain can do so as easily. (I assume we're talking about the same character, 0x2D, and not something from further afield in the Unicode tables,

Re: underscores vs hyphens (was Re: A new era for Temporal)

2010-04-12 Thread Moritz Lenz
Peter Scott wrote: Am I the only one who sees a hyphen and thinks binary minus? Just because the parser can disambiguate this use of it doesn't mean the reader's brain can do so as easily. It's all a matter of practice. Since variables begin with sigils, and you should put whitespace

Re: underscores vs hyphens (was Re: A new era for Temporal)

2010-04-12 Thread Shawn H Corey
Darren Duncan wrote: See http://perlcabal.org/syn/S02.html#Names for your answers. Thanks for the link but nowhere in it does it state tha Perl 6 names are case sensitive. The best the do is this, which implies it is but doesn't state it. Other all-caps names are semi-reserved. We may add

a more useful srand (was Re: r30369 - docs/Perl6/Spec/S32-setting-library)

2010-04-12 Thread Dave Whipp
masak wrote: Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod Log: [S32/Numeric] removed method form of srand Overwhelming consent on #perl6 about this. - multi method srand ( Real $seed: ) multi srand ( Real $seed = default_seed_algorithm()) Seed the generator Crand uses.

Re: underscores vs hyphens (was Re: A new era for Temporal)

2010-04-12 Thread Matthew Walton
On Mon, Apr 12, 2010 at 1:22 PM, Shawn H Corey shawnhco...@gmail.com wrote: Darren Duncan wrote: See http://perlcabal.org/syn/S02.html#Names for your answers. Thanks for the link but nowhere in it does it state tha Perl 6 names are case sensitive.  The best the do is this, which implies it

Re: a more useful srand (was Re: r30369 - docs/Perl6/Spec/S32-setting-library)

2010-04-12 Thread Mark J. Reed
On Mon, Apr 12, 2010 at 12:59 PM, Dave Whipp d...@dave.whipp.name wrote: 2a. If I spawn two threads (implicitly or explicitly), how do their RNGs interact? I.e. are Crand and Cpick thread-safe? I've noticed that this is a potentially-surprising source of lock contention in Java - all threads

Re: a more useful srand (was Re: r30369 - docs/Perl6/Spec/S32-setting-library)

2010-04-12 Thread Moritz Lenz
Dave Whipp wrote: masak wrote: Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod Log: [S32/Numeric] removed method form of srand Overwhelming consent on #perl6 about this. - multi method srand ( Real $seed: ) multi srand ( Real $seed = default_seed_algorithm()) Seed

Re: r30369 - docs/Perl6/Spec/S32-setting-library

2010-04-12 Thread yary
Tangentially, I'm a little surprised there isn't a random stream factory in the core. They're useful for reproducible testing. With a global random number generator, even if you seed it, another module can call rand and alter the sequence you get from your rand calls. I think something like srand

Re: a more useful srand (was Re: r30369 - docs/Perl6/Spec/S32-setting-library)

2010-04-12 Thread Dave Whipp
Moritz Lenz wrote: 1) A RNG class (don't really care what the name is, for now) 2) An instance of that in $*RAND (which you can temp()) 3) rand() and srand() act on $*RAND 4) It should be easy to create instances of the RNG to use in your own class. The sounds reasonable. The one thing I'd

Re: a more useful srand (was Re: r30369 - docs/Perl6/Spec/S32-setting-library)

2010-04-12 Thread Larry Wall
On Mon, Apr 12, 2010 at 07:24:37PM +0200, Moritz Lenz wrote: : Dave Whipp wrote: : masak wrote: : Modified: : docs/Perl6/Spec/S32-setting-library/Numeric.pod : Log: : [S32/Numeric] removed method form of srand : : Overwhelming consent on #perl6 about this. : : - multi method srand (

Re: underscores vs hyphens (was Re: A new era for Temporal)

2010-04-12 Thread Larry Wall
On Sun, Apr 11, 2010 at 03:47:18PM -0700, Darren Duncan wrote: : Damian Conway wrote: : The relevant suggestion regarding hyphens vs underscores is: : : ...to allow both characters, but have them mean the same thing. : : That is, any isolated internal underscore can be replaced with an :

Re: Documentaion Details (was: underscores vs hyphens)

2010-04-12 Thread Matthew Walton
On Mon, Apr 12, 2010 at 8:04 PM, Shawn H Corey shawnhco...@gmail.com wrote: Matthew Walton wrote: On Mon, Apr 12, 2010 at 1:22 PM, Shawn H Corey shawnhco...@gmail.com wrote: So, I'll ask again:  Where in the official documentation does it state that Perl 6 names are case sensitive? I

Re: underscores vs hyphens (was Re: A new era for Temporal)

2010-04-12 Thread Aaron Sherman
On Mon, Apr 12, 2010 at 2:23 PM, Larry Wall la...@wall.org wrote: On Sun, Apr 11, 2010 at 03:47:18PM -0700, Darren Duncan wrote: : : I see that making underscores : and hyphens to be equivalent is akin to having case-insensitive : identifiers, where Perl,PERL,perl mean the same thing.

Re: underscores vs hyphens (was Re: A new era for Temporal)

2010-04-12 Thread Geoffrey Broadwell
On Mon, 2010-04-12 at 11:23 -0700, Larry Wall wrote: The standard parser will likely be pointing out spelling errors and conjecturing emendations for near misses. Whole-program analysis can even do this for any method names that look wrongish. The difference between Acme-X and Acme_X is no

Re: a more useful srand (was Re: r30369 - docs/Perl6/Spec/S32-setting-library)

2010-04-12 Thread Aaron Sherman
On Mon, Apr 12, 2010 at 1:55 PM, Larry Wall la...@wall.org wrote: On Mon, Apr 12, 2010 at 07:24:37PM +0200, Moritz Lenz wrote: : 1. do all implementations of Perl6 generate the same sequence, given the : same initial seed. : : I don't think they should. If you want that, use confuse a RNG