Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'nom' into ex-hardening
  • Loading branch information
moritz committed Jun 25, 2012
2 parents 57d251f + 53fc0ae commit 2fdf4bc
Show file tree
Hide file tree
Showing 11 changed files with 112 additions and 97 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -14,6 +14,7 @@ lib/Test.pir
lib/Pod/To/Text.pir
lib/lib.pir
CORE.setting.pbc
RESTRICTED.setting.pbc
SAFE.setting.pbc
perl6
perl6.pbc
Expand Down
3 changes: 3 additions & 0 deletions docs/ChangeLog
@@ -1,5 +1,7 @@
New in 2012.07
+ Deprecated SAFE.setting in favor of RESTRICTED.setting
+ Ranges can now interpolate in argument lists
+ The built-in meta-objects (such as Metamodel::ClassHOW) now inherit from Any

New in 2012.06
+ Rakudo is now compiled with the same regex engine as user-space regexes use
Expand All @@ -19,6 +21,7 @@ New in 2012.06
+ compile time errors in loaded modules now show a module loading backtrace
+ improved list and .map handling
+ can now use | to flatten a pair into an argument list as a named argument
+ Changed &dir to return IO objects, not Str objects

New in 2012.05
+ meta ops //=, ||= and &&= now short-circuit properly
Expand Down
126 changes: 54 additions & 72 deletions docs/release_guide.pod
Expand Up @@ -93,13 +93,13 @@ release name, etc.

=item *

Verify that the Parrot trunk head is able to build Rakudo
Verify that the Parrot master branch is able to build Rakudo
and run the spectest suite. Also check the smolder reports
at L<http://smolder.parrot.org/app/projects/smoke_reports/5>.

=item *

If Parrot's trunk exhibits any problems building or running
If Parrot's master branch exhibits any problems building or running
Rakudo (that require changes to Parrot to fix), immediately
report them to the Parrot development team so they can be
fixed prior to Parrot's release.
Expand All @@ -113,25 +113,25 @@ that has a large impact on users is worth addressing either
as a fix or as prominent documentation (the README and/or
the release announcement).

=back

=item 2.
=item *

Once Parrot issues its monthly release, tag NQP for release
according to the year and month of the release:
Create a draft release announcement in docs/announce/YYYY.MM .
You can often use the previous release's file as a starting point,
updating the release number, version information, name, etc. as
appropriate.

$ git clone https://github.com/perl6/nqp.git
$ cd nqp
$ git add docs/announce/YYYY.MM
$ git commit docs

Follow the steps in NQP's F<docs/release_guide.pod>.
=back

=item 3.
=item 2.

The short period following the Parrot release until the
Rakudo release is generally intended for fixing bugs,
updating documentation, and so on.

=item 4.
=item 3.

Update Rakudo's leap-second tables:

Expand All @@ -147,22 +147,22 @@ will be unchanged.

B<Note>: this program requires the perl module L<Time::y2038> be installed.

=item 5.
=item 4.

As the actual release date nears, review the git log history
to see if any additional items need to be added to the ChangeLog.
This can be conveniently done with "git log --since=yyyy-mm-dd --reverse".

$ git commit docs/ChangeLog

=item 6.
=item 5.

When it's time to cut the release, create a new release announcement
in docs/announce/YYYY.MM. It's often a good idea to use the
previous month's file as a starting point for this. Highlight areas
in which the new release is significant. If possible, also give
some small details about the choice of release name. (If the
details are a bit lengthy, this can often best be done as a separate
When it's time to cut the release, finalize the new release
announcement in docs/announce/YYYY.MM. (If one hasn't already
been created, see step 1 above.) Highlight areas in which the
new release is significant. If possible, also give some small
details about the choice of release name. (If the details
are a bit lengthy, this can often best be done as a separate
section at the bottom of the announcement.)

Include a list of contributors since the last release in the announcement.
Expand All @@ -185,7 +185,33 @@ you find any steps that are missing.

$ git commit docs/release_guide.pod

=item 8.
=item 8.

Create an NQP release with the same C<YYYY.MM> version number
as Rakudo. Follow NQP's C<docs/release_guide.pod> file to do that.

=item 9.

Go back to the Rakudo repository, and update the NQP dependency:

$ echo YYYY.MM > tools/build/NQP_REVISION
$ git commit -m '[release] bump NQP revision' tools/build/NQP_REVISION

=item 10.

Enter the new version into the F<VERSION> file, and commit the changes:

$ echo YYYY.MM > VERSION
$ git commit -m '[release] bump VERSION' VERSION

=item 11.

Make sure any locally modified files have been pushed back to github.

$ git status
$ git push

=item 12.

Make sure everything compiles and runs from a known clean state:

Expand All @@ -209,51 +235,7 @@ Often this means fixing a bug, fudging a test, or (temporarily?)
commenting out a test file in t/spectest.data . Use your best
judgment or ask others if uncertain what to do here.

=item 9.

=over 4

=item *

B<Note>: these steps overlap with the steps in NQP's release guide.

Go to the NQP repository, tag it and push the tags

$ git tag -a -m"tag release YYYY.MM" YYYY.MM # e.g., 2010.02

Check the NQP revision

$ git describe # should come out as YYYY.MM
# if not, contact your local git vendor or #perl6

If you got the same version back as you entered, proceed with

$ git push --tags

=item *

Go back to the Rakudo repository, and update the NQP dependency:

$ echo YYYY.MM > tools/build/NQP_REVISION
$ git commit -m '[release] bump NQP revision' tools/build/NQP_REVISION

=item *

Enter the new version into the F<VERSION> file, and commit the changes:

$ echo YYYY.MM > VERSION
$ git commit -m '[release] bump VERSION' VERSION

=back

=item 10.

Make sure any locally modified files have been pushed back to github.

$ git status
$ git push

=item 11.
=item 13.

Create a tarball by entering C<make release VERSION=YYYY.MM>,
where YYYY.MM is the month for which the release is being made.
Expand All @@ -262,38 +244,38 @@ This will create a tarball file named C<rakudo-YYYY.MM.tar.gz>.
B<Caution>: this step removes any untracked files in F<t/spec>.
So please make a backup if you have any important data in there.

=item 12.
=item 14.

Unpack the tar file into another area, and test that it
builds and runs properly using the same process in step 8.
If there are any problems, fix them and go back to step 8.

=item 13.
=item 15.

Tag the release by its release month ("YYYY.MM") and its code name.

$ git tag -a -m"tag release #nn" YYYY.MM # e.g., 2010.02
$ git tag -a -m"tag release #nn" CODENAME # e.g., "Bratislava"
$ git push --tags

=item 14.
=item 16.

Upload the release tarball to github's download area at
L<http://github.com/rakudo/rakudo/downloads>.

=item 15.
=item 17.

To avoid public confusion with Rakudo Star releases, we now publish
compiler release announcements ONLY to perl6-compiler@perl.org.
(We may restart widespread announcements of compiler releases
once they are known, or we may begin publishing a single
announcement for both.)

=item 16.
=item 18.

Update the Wikipedia entry at L<http://en.wikipedia.org/wiki/Rakudo>.

=item 17.
=item 19.

You're done! Celebrate with the appropriate amount of fun.

Expand Down
2 changes: 2 additions & 0 deletions src/SAFE.setting
@@ -1,3 +1,5 @@
# SAFE.setting is deprecated, use RESTRICTED.setting instead.

sub restricted($what) {
die "$what is disallowed in safe mode"
}
Expand Down
6 changes: 6 additions & 0 deletions src/core/Any.pm
Expand Up @@ -246,6 +246,12 @@ my class Any {
}

method reduce(&with) { self.list.reduce(&with) }

method FLATTENABLE_LIST() {
my $list := self.list;
nqp::findmethod($list, 'FLATTENABLE_LIST')($list);
}
method FLATTENABLE_HASH() { nqp::hash() }
}
Metamodel::ClassHOW.exclude_parent(Any);

Expand Down
15 changes: 15 additions & 0 deletions src/core/Bool.pm
Expand Up @@ -24,6 +24,10 @@ my class Bool {
}
}

multi prefix:<++>(Bool:U \$a is rw) { $a = True; }
multi prefix:<-->(Bool:U \$a is rw) { $a = False; }
multi postfix:<++>(Bool:U \$a is rw) { $a = True; False; }
multi postfix:<-->(Bool:U \$a is rw) { $a = False; }

proto prefix:<?>($) { * }
multi prefix:<?>(Bool:D \$a) { $a }
Expand Down Expand Up @@ -69,6 +73,16 @@ multi infix:<||>(Mu \$a, Mu \$b) { $a || $b }
proto infix:<^^>(|$) { * }
multi infix:<^^>(Mu $x = Bool::False) { $x }
multi infix:<^^>(Mu \$a, Mu \$b) { $a ^^ $b }
multi infix:<^^>(*@a) {
my $a = shift @a;
while @a {
my $b := shift @a;
next unless $b;
return Nil if $a;
$a := $b;
}
$a;
}

proto infix:<//>(|$) { * }
multi infix:<//>(Mu $x = Any) { $x }
Expand All @@ -85,6 +99,7 @@ multi infix:<or>(Mu \$a, Mu \$b) { $a || $b }
proto infix:<xor>(|$) { * }
multi infix:<xor>(Mu $x = Bool::False) { $x }
multi infix:<xor>(Mu \$a, Mu \$b) { $a ^^ $b }
multi infix:<xor>(*@a) { &infix:<^^>(@a); }

proto infix:<orelse>(|$) { * }
multi infix:<orelse>(Mu $x = Any) { $x }
Expand Down
2 changes: 1 addition & 1 deletion src/core/EnumMap.pm
Expand Up @@ -40,7 +40,7 @@ my class EnumMap does Associative {
}

multi method perl(EnumMap:D:) {
'EnumMap.new('
self.^name ~ '.new('
~ self.keys.map({ .perl ~ ', ' ~ self.at_key($_).perl ~ ', '}).join
~ ')';
}
Expand Down
4 changes: 0 additions & 4 deletions src/core/Int.pm
Expand Up @@ -46,10 +46,6 @@ my class Int does Real {
nqp::p6box_s(nqp::chr(nqp::unbox_i(self)));
}

method succ(Int:D:) { self + 1 }

method pred(Int:D:) { self - 1 }

method sqrt(Int:D:) { nqp::p6box_n(nqp::sqrt_n(nqp::tonum_I(self))) }

method base(Int:D: Cool $base) {
Expand Down
3 changes: 3 additions & 0 deletions src/core/Numeric.pm
Expand Up @@ -20,6 +20,9 @@ my role Numeric {
multi method Bool(Numeric:D:) { self != 0 }

multi method gist(Numeric:D:) { self.Str }

method succ() { self + 1 }
method pred() { self - 1 }
}

multi sub infix:<eqv>(Numeric $a, Numeric $b) {
Expand Down
3 changes: 0 additions & 3 deletions src/core/Real.pm
Expand Up @@ -78,9 +78,6 @@ my role Real does Numeric {
$int_part == 0 && self < 0 ?? '-' ~ $r !! $r;
}

method succ() { self.Bridge.succ }
method pred() { self.Bridge.pred }

method Real(Real:D:) { self }
method Bridge(Real:D:) { self.Num }
method Int(Real:D:) { self.Bridge.Int }
Expand Down

0 comments on commit 2fdf4bc

Please sign in to comment.