This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuring E/ET/ETHER/Moose-2.2011.tar.gz with Makefile.PL | |
In file included from HASCOMPILERElf4/TESTbL5Q.c:3: | |
In file included from /usr/local/lib/perl5/5.20.0/darwin-2level/CORE/perl.h:5152: | |
/usr/local/lib/perl5/5.20.0/darwin-2level/CORE/inline.h:311:9: warning: nonnull | |
parameter 'pv' will evaluate to 'true' on first encounter | |
[-Wpointer-bool-conversion] | |
if (pv && len > 1) { | |
^~ ~~ | |
/usr/local/lib/perl5/5.20.0/darwin-2level/CORE/proto.h:1791:4: note: declared | |
'nonnull' here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Perl6/Actions.nqp b/src/Perl6/Actions.nqp | |
index 44f8b80..b080f99 100644 | |
--- a/src/Perl6/Actions.nqp | |
+++ b/src/Perl6/Actions.nqp | |
@@ -3581,6 +3581,22 @@ class Perl6::Actions is HLL::Actions does STDActions { | |
elsif $<type_declarator> { make $<type_declarator>.ast } | |
elsif $<variable_declarator> { | |
my $past := $<variable_declarator>.ast; | |
+ | |
+ # got a 'my $*FOO', need to convert back to just a Var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Point { | |
has int $.x; | |
has int $.y; | |
method !SET($!x,$!y) { self } | |
method new(:$x is raw, :$y is raw) { self.CREATE!SET($x,$y) } | |
} | |
my $total = 0; | |
for ^1_000_000 -> int $_ { | |
my $p := Point.new(x => 2, y => 3); | |
$total += $p.x + $p.y; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $meta = "META6.json".IO.slurp; | |
my $old = Rakudo::Internals::JSON.new.from-json($meta); | |
use Test; | |
use MONKEY; | |
augment class Rakudo::Internals::JSON { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make install; ls -l CORE.setting.moarvm >> moarvm.sizes | |
/usr/local/bin/perl tools/build/check-nqp-version.pl /Users/liz/Github/rakudo.moar/install/bin/nqp-m | |
clang -c -fno-omit-frame-pointer -fno-optimize-sibling-calls -O3 -DNDEBUG -Wno-logical-op-parentheses -D_DARWIN_USE_64_BIT_INODE=1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -O3 -DNDEBUG -Wno-logical-op-parentheses -I/Users/liz/Github/rakudo.moar/install/include/libatomic_ops \ | |
-I/Users/liz/Github/rakudo.moar/install/include/dyncall -I/Users/liz/Github/rakudo.moar/install/include/moar \ | |
-I/Users/liz/Github/rakudo.moar/install/include/sha1 -I/Users/liz/Github/rakudo.moar/install/include/tinymt -I/Users/liz/Github/rakudo.moar/install/include/libtommath \ | |
-I/Users/liz/Github/rakudo.moar/install/include/libuv -I/Users/liz/Github/rakudo.moar/install/include -I3rdparty/libuv/include -I3rdparty/libuv/src -I3rdparty/libatomicops/src -I3rdparty/libtommath -I3rdparty/dyncall/dynload -I3rdparty/dyncall/dyncall -I3rdparty/dyncall/dyncal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit sub MAIN($show-from is copy = *, $filename = "-"); | |
# Get the words in a hash and an array from longest -> shortest | |
my @words; | |
my %words = $filename.IO.lines.map: { @words[.chars].push($_); $_ => True } | |
@words = @words.reverse.map: { |$_ if $_ } # flatten them out | |
my $lock = Lock.new; # to serialize pushes to @ldwl and deletes from %words | |
my @ldwl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find the sum of all the primes below two million. | |
use v6; | |
my int $max = 2_000_000; | |
# find all primes up to $max using The Sieve of Erathostenes | |
my int @a = 0..$max; | |
@a[1] = 0; # don't include 1 | |
for (2 .. ($max div 2)) -> int $i { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
=begin metadata | |
Name: primes | |
Description: generate primes | |
Author: Jonathan Feinberg, jdf@pobox.com | |
Author: Benjamin Tilly, ben.tilly@alumni.dartmouth.org | |
License: perl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub ListOfSeqsToSeq(**@seqs) { | |
Seq.new( class :: does Iterator { | |
has @.seqs; | |
has $!iterator; | |
method TWEAK() { $!iterator = @!seqs.shift.iterator if @!seqs } | |
method pull-one() is raw { | |
if $!iterator { | |
my $pulled := $!iterator.pull-one; | |
if $pulled =:= IterationEnd { | |
if @!seqs { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use NativeCall; | |
my class TimeStruct is repr<CStruct> { | |
has int32 $.tm_sec; | |
has int32 $.tm_min; | |
has int32 $.tm_hour; | |
has int32 $.tm_mday; | |
has int32 $.tm_mon; | |
has int32 $.tm_year; | |
has int32 $.tm_wday; | |
has int32 $.tm_yday; |