Skip to content

Instantly share code, notes, and snippets.

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
use warnings;
use strict;
open my $fh, '<', 'input';
my @input = map {chomp; $_} <$fh>;
close $fh;
my %grid;
my $overlap = 0;
my @diag;
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);
[Foo.rakumod]
use v6;
use Bar;
use Baz;
[Bar.rakumod]
use v6;
use Inline::Python;
unit class Bar;
@ggoebel
ggoebel / scratch.faku
Created January 8, 2021 18:31
test simple mysql connection
#!/usr/bin/env raku
use v6.d;
use DBIish;
state $dbh = DBIish.connect('mysql', :host<localhost>, :user<covid>, :password<covid>, :database<covid>);
say $dbh;
@ggoebel
ggoebel / 14.raku
Created December 23, 2020 21:01
AoC 2020 Day 14
#!/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> }