Skip to content

Instantly share code, notes, and snippets.

uidsynth: noteon 0 57 64 00354 719.703 719.867 0.000 6
fluidsynth: noteon 0 57 64 00354 719.703 719.867 0.000 7
fluidsynth: noteoff 0 40 0 00351 720.239 8
fluidsynth: noteoff 0 40 0 00351 720.239 8
fluidsynth: noteoff 0 47 0 00352 720.239 8
fluidsynth: noteoff 0 47 0 00352 720.239 8
event_post_prog 0 0
event_pre_noteon 0 57 80
use Audio::PortMIDI;
use Audio::MIDI::Note;
use Music::Helpers;
sub MAIN(Str :$mode = 'major', Str :$root = 'C') {
my $Mode = Mode.new(:$mode, root => ::($root));
my $pm = Audio::PortMIDI.new;
my $stream = $pm.open-output(3, 32);
use nqp;
class A { has num $.foo; has num $.baz };
class B { has str $!bar };
class C is A is B {
method new(Num $a, Str $b) {
my \SELF = nqp::create(self);
nqp::bindattr_n(SELF, A, '$!foo', nqp::unbox_n($a));
nqp::bindattr_n(SELF, A, '$!baz', nqp::unbox_n($a));
nqp::bindattr_s(SELF, B, '$!bar', nqp::unbox_s($b));
SELF
# code being debugged
$ ./perl6-jdb-server -e'use nqp; A: for 1 { nqp::debugnoop(1); last A };'
# jdb stuff:
main[1] print tc.handlers
tc.handlers = "[]"
main[1] dump tc.curFrame.caller.codeRef.staticInfo.handlers
tc.curFrame.caller.codeRef.staticInfo.handlers = {
instance of long[4] (id=1911), instance of long[4] (id=1912), instance of long[5] (id=1913)
}
Test Summary Report
-------------------
t/spec/S04-declarations/smiley.t (Wstat: 0 Tests: 60 Failed: 5)
Failed tests: 10, 22, 28, 34, 46
t/spec/S05-mass/properties-general.rakudo.jvm (Wstat: 0 Tests: 606 Failed: 3)
Failed tests: 596-598
t/spec/S06-other/main-usage.rakudo.jvm (Wstat: 0 Tests: 29 Failed: 1)
Failed test: 29
t/spec/S12-attributes/smiley.t (Wstat: 0 Tests: 54 Failed: 5)
Failed tests: 7, 19, 25, 31, 43
$ /usr/bin/perl t/harness --jvm t/04-nativecall
t/04-nativecall/01-argless.t ............. ok
t/04-nativecall/02-simple-args.t ......... ok
t/04-nativecall/03-simple-returns.t ...... ok
t/04-nativecall/04-pointers.t ............ Failed 1/12 subtests
t/04-nativecall/05-arrays.t .............. No subtests run
t/04-nativecall/06-struct.t .............. No subtests run
t/04-nativecall/07-writebarrier.t ........ No subtests run
t/04-nativecall/08-callbacks.t ........... ok
t/04-nativecall/09-nativecast.t .......... No subtests run
#!/usr/bin/env perl6
use v6;
role FooeyRole {
method bar {
say "stub soon";
!!!
}
}
use Audio::PortMIDI;
multi sub MAIN(:$server) {
my $pm = Audio::PortMIDI.new;
my $stream = $pm.open-output($pm.default-output-device.device-id, 32);
constant MfID = 0x7d; # Manufacturer ID 'Educational'
my $step = 1/((120/60)*2);
$ perl6 -I. clock.pl6
0000011011011010100010011001010100000101101001101000011011011111
0000011011011010100010011001010100001011100111000110011111011111
0000011011011010100010011001010101000001010000010101000011011111
0000011011011010100010011001010101000111001101110011000111011111
0000011011011010100010011001011101011001101100100110101011011111
0000011011011010100010011001010101000111001101110011000111011111
0000011011011010100010011001010101000001010000010101000011011111
0000011011011010100010011001010100001011100111000110011111011111
0000011011011010100010011001010100000101101001101000011011011111
#!perl6
use v6.c;
use Audio::PortMIDI;
class Mode {
my %modes = ionian => [0,2,4,5,7,9,11,12],
dorian => [0,2,3,5,7,9,10,12],
phrygian => [0,1,3,5,7,8,10,12],
lydian => [0,2,4,6,7,9,11,12],