Skip to content

Instantly share code, notes, and snippets.

View jnthn's full-sized avatar

Jonathan Worthington jnthn

View GitHub Profile
t\spec\S02-literals\listquote.rakudo (Wstat: 256 Tests: 9 Failed: 0)
Non-zero exit status: 1
Parse errors: Bad plan. You planned 23 tests but ran 9.
t\spec\S02-types\lists.rakudo (Wstat: 256 Tests: 17 Failed: 0)
Non-zero exit status: 1
Parse errors: Bad plan. You planned 29 tests but ran 17.
t\spec\S02-types\whatever.rakudo (Wstat: 256 Tests: 73 Failed: 0)
Non-zero exit status: 1
t\spec\S04-statements\for.rakudo (Wstat: 256 Tests: 56 Failed: 0)
Non-zero exit status: 1

Hi,

Carl and I met to discuss the next event, and came up with some ideas. We came up with one talk that we'd give jointly, 2 proposals for Carl to give, and 3 proposals for me to give. From here, it depends on how many slots we have; if we were to have 5 slots, then the joint one plus Carl's two and the choice of 2 out of the 3 I suggested would work. If we are going to have a guy come along and do a couple of JavaScript ones, that'd take us up to 7 sessions, which is enough for an event. :-)

Anyway, here's the ideas.

Git for the Enterprise

Presented jointly by Carl Mäsak and Jonathan Worthington

grammar SalesExport {
token TOP { ^ <country>+ $ }
token country {
<name> \n
<destination>+
}
token destination {
\t <name> \s+ ':' \s+
<lat=.num> ',' <long=.num> \s+ ':' \s+
<sales=.integer> \n
diff --git a/src/Perl6/Actions.pm b/src/Perl6/Actions.pm
index 8fa291b..c7a610b 100644
--- a/src/Perl6/Actions.pm
+++ b/src/Perl6/Actions.pm
@@ -3862,7 +3862,8 @@ class Perl6::Actions is HLL::Actions {
if $seen_dot {
return $*ST.add_constant('Rat', 'type_new',
$*ST.add_numeric_constant('Int', $iresult)<compile_time_value>,
- $*ST.add_numeric_constant('Int', $fdivide)<compile_time_value>
+ $*ST.add_numeric_constant('Int', $fdivide)<compile_time_value>,
diff --git a/src/6model/reprs/P6opaque.c b/src/6model/reprs/P6opaque.c
index b04bac1..c794499 100644
--- a/src/6model/reprs/P6opaque.c
+++ b/src/6model/reprs/P6opaque.c
@@ -873,11 +873,11 @@ static void change_type(PARROT_INTERP, PMC *obj, PMC *new_type) {
PMC_data(obj) = new_body;
Parrot_gc_free_fixed_size_storage(interp, cur_repr_data->allocation_size, instance);
instance = new_body;
- PARROT_GC_WRITE_BARRIER(interp, obj);
}
diff --git a/src/Perl6/ModuleLoader.pm b/src/Perl6/ModuleLoader.pm
index 6800c88..d31f437 100644
--- a/src/Perl6/ModuleLoader.pm
+++ b/src/Perl6/ModuleLoader.pm
@@ -85,6 +85,7 @@ class Perl6::ModuleLoader {
method load_module($module_name, $cur_GLOBALish) {
# Locate all the things that we potentially could load. Choose
# the first one for now (XXX need to filter by version and auth).
+pir::say("# Looking for $module_name ...");
my @prefixes := self.search_path();
C:\Consulting\rakudo>type TestRole.nqp
role TestRole {
method foo() {
say("hi from NQP");
}
}
my module EXPORT {
our module DEFAULT {
$?PACKAGE.WHO<TestRole> := TestRole;
}
C:\Consulting\rakudo>type b.p6
sub foo($x) { say("hi $x"); }
foo("from run time");
CHECK { foo("from check time!") }
BEGIN { foo("from begin time!") }
C:\Consulting\rakudo>perl6 b.p6
hi from begin time!
hi from check time!
hi from run time
class RegSub {
has $!parrot_sub is parrot_vtable_handler('invoke');
}
my $y := RegSub.new(:parrot_sub(
sub () { say("ukrajinky su krasne") }));
$y();
method scalar_wrap($obj) {
my $scalar_type := self.find_symbol(['Scalar']);
my $scalar := nqp::create($scalar_type);
my $slot := self.add_object($scalar);
nqp::bindattr($scalar, $scalar_type, '$!value', $obj);
# XXX we do deserialization later...
$scalar;
}