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
1..7 | |
ok 1 - no lastcall, so we defer up the inheritance tree | |
ok 2 - sanity test for clearing | |
ok 3 - lastcall means nextsame causes Nil return of method | |
ok 4 - lastcall meant nextsame failed, no deferal happened | |
00000 checkarity 1, 1 | |
00001 param_rp_o loc_0_obj, 0 | |
00002 paramnamesused | |
annotation: gen/moar/BOOTSTRAP/v6c.nqp:5248 | |
00003 const_s loc_5_str, 'dispatcher-get-resume-state' |
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
Notes: nursery is set to 20k. It seems as if adding MVM_SPESH_OSR_DISABLE=1 makes the problem go away. | |
dogbert@dogbert-VirtualBox:~/repos/rakudo$ MVM_SPESH_NODELAY=1 MVM_SPESH_BLOCKING=1 ./rakudo-gdb-m -Ilib --ll-exception t/spec/S12-methods/lastcall.t | |
================================================================================================ | |
This is Rakudo running in the debugger, which often allows the user to generate useful back- | |
traces to debug or report issues in Rakudo, the MoarVM backend or the currently running code. | |
This Rakudo version is 2021.09.282.g.6.d.45.da.84.c built on MoarVM version 2021.09.676.g.8.c.7.b.734.d.8, | |
running on linuxmint (20.Ulyana) / linux |
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; | |
use SDL2::Raw; | |
my int ($w, $h) = 320, 240; | |
SDL_Init(VIDEO); | |
my SDL_Window $window = SDL_CreateWindow( | |
"White Noise - Raku", | |
SDL_WINDOWPOS_CENTERED_MASK, SDL_WINDOWPOS_CENTERED_MASK, |
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
# What is the value of the first triangle number to have over five hundred divisors? | |
use v6; | |
my $numFactors = 500; | |
my $sum = 0; | |
for (1...*) -> $term { | |
$sum += $term; | |
my $factors = (1..floor(sqrt($sum))).grep( -> $x { $sum % $x == 0} ).elems * 2; | |
$factors-- if floor(sqrt($sum)) == sqrt($sum); | |
if $factors > $numFactors { |
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 %objects; | |
my Lock $ol .= new; | |
class Bar { | |
submethod TWEAK (|) { | |
$ol.protect: { | |
my $obj-id = self.WHICH; | |
die "DUPLICATE FOUND: ", $obj-id if %objects{$obj-id}; | |
%objects{$obj-id} = True; | |
say $obj-id; |
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
dogbert@dogbert-VirtualBox:~/repos/rakudo$ gdb install/bin/moar core.moar.1000.76f4e7648b41411e930b2edf5cc63bb4.2709599.1633277864000000000000 | |
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2 | |
Copyright (C) 2020 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. | |
Type "show copying" and "show warranty" for details. | |
This GDB was configured as "x86_64-linux-gnu". | |
Type "show configuration" for configuration details. | |
For bug reporting instructions, please see: |
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
# What is the largest prime factor of the number 600851475143 ? | |
use v6; | |
my $num = 600_851_475_143; | |
my $val = $num; | |
my @factors = (); | |
while ([*] @factors) != $num { | |
push @factors, (2...*).first(-> $x { $val %% $x && $x.is-prime }); | |
$val = $val div @factors[*-1]; | |
} | |
say @factors.max; # remove max to see all prime factors |
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 Test; | |
# R#1781 | |
{ | |
my $seen; | |
multi sub a() { ++$seen if callframe(1).my.EXISTS-KEY(<$seen>) }; | |
# call a 300 times | |
a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a; | |
a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a;a; |
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
dogbert@dogbert-VirtualBox:~/repos/rakudo$ MVM_SPESH_NODELAY=1 ./rakudo-m --ll-exception -Ilib t/spec/S09-typed-arrays/native-shape1-num.rakudo.moar | |
1..333 | |
# Testing num array | |
ok 1 - num array is Positional | |
... | |
ok 206 - does re-initializing a num32 array work | |
ok 207 - List-assigning num32 array to untyped works (1) | |
ok 208 - List-assigning num32 array to untyped works (2) | |
ok 209 - List-assigning num32 array to untyped works (3) | |
const_iX NYI |
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
dogbert@dogbert-VirtualBox:~/repos/p6-concurrent-stack$ while perl6 -Ilib --ll-exception t/stress.t; do :; done | |
ok 1 - Pushed/popped correct values | |
1..1 | |
ok 1 - Pushed/popped correct values | |
1..1 | |
ok 1 - Pushed/popped correct values | |
1..1 | |
ok 1 - Pushed/popped correct values | |
1..1 | |
ok 1 - Pushed/popped correct values |