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/env raku | |
use v6.d; | |
#use Grammar::Tracer; | |
my $input = 'input'.IO.slurp; | |
grammar PCS { | |
rule TOP { [ <update> | <write> ]+ } | |
rule update { <.maskpre> <mask> } | |
rule write { <.memd> <loc> <.mema> <val> } |
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/env raku | |
use v6.d; | |
use DBIish; | |
state $dbh = DBIish.connect('mysql', :host<localhost>, :user<covid>, :password<covid>, :database<covid>); | |
say $dbh; |
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
[Foo.rakumod] | |
use v6; | |
use Bar; | |
use Baz; | |
[Bar.rakumod] | |
use v6; | |
use Inline::Python; | |
unit class Bar; |
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 v6d; | |
my @input = 'input'.IO.lines; | |
my %grid; | |
my $overlap = 0; | |
my @diag; | |
for @input { | |
my ($x1, $y1, $x2, $y2) = .split(/\D+/, :skip-empty); |
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 warnings; | |
use strict; | |
open my $fh, '<', 'input'; | |
my @input = map {chomp; $_} <$fh>; | |
close $fh; | |
my %grid; | |
my $overlap = 0; | |
my @diag; |
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
565,190 -> 756,381 | |
402,695 -> 402,138 | |
271,844 -> 98,844 | |
276,41 -> 276,282 | |
12,93 -> 512,593 | |
322,257 -> 157,422 | |
485,728 -> 685,528 | |
216,137 -> 593,514 | |
96,897 -> 984,897 | |
822,842 -> 70,842 |