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
credit: chatgpt came up with this recipe for me | |
**The problem:** Modern package managers like lazy vim require you to restart neovim before any plugin changes can take effect. Doing `:wq, up arrow, enter` to reload neovim gets old quick when you are developing. | |
**Solution:** | |
First, write a bash script that automatically restarts vim if it exits with a specific exit code. Start all your vim sessions with this script: | |
``` | |
#!/bin/bash |
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
Blue Picasso, pink Picasso, cubist Picasso, society Picasso, surreal Picasso, ceramist Picasso, late Picasso. Picasso in his underwear, Picasso in a bow tie. Harlequin Picasso, bullfight Picasso, the poets’ Picasso, the GIs’ Picasso. Anti-fascist Picasso, communist Picasso, peace dove Picasso. Prankster Picasso, heartsick Picasso, lecherous Picasso. | |
Yes, Pablo Picasso was all over the place. He died 50 years ago this month at 91,and we’re still trying to clean up his mess. | |
Where America’s celebrated postwar artists — Jackson Pollock, Mark Rothko, Helen Frankenthaler, Roy Lichtenstein — had the good manners to settle on a tidy, signature style and stick to it, Picasso was the ultimate shapeshifter. As an artist — and as a man — he was so astonishingly manifold that we are left with little choice, it can seem, but to reduce him to a kind of sign. Picasso equals protean genius. | |
It’s no longer necessary that he connect in people’s minds with any actual art. It’s enough that he stands for that bigger thing: unf |
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 Raku Recipes and Idioms | |
Here's a collection of Raku code snippets I use with explanations. Maybe you'll | |
also find them useful or If you find them useful you know better ways to accomplish things, | |
just let me know in the comments. | |
## Object construction | |
### Simpler construction |
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
Last updted: Jan 18, 4:07 PM EST | |
"archive/6/6pm/6pm:ver<0.0.11>:auth<github:FCO>.tar.gz".IO | |
"archive/A/ABC/ABC:ver<0.6.13>:auth<zef:colomon>.tar.gz".IO | |
"archive/A/ADT/ADT:ver<0.5>:auth<github:timo>.tar.gz".IO | |
"archive/A/AI::Agent/AI::Agent:ver<0.2.10>:auth<cpan:KOBOLDWIZ>:api<1>.tar.gz".IO | |
"archive/A/AI::FANN/AI::FANN:ver<0.2.0>:auth<zef:jjatria>.tar.gz".IO | |
"archive/A/AI::NLP/AI::NLP:ver<0.1.5>:auth<cpan:KOBOLDWIZ>:api<1>.tar.gz".IO | |
"archive/A/ANTLR4/ANTLR4:ver<0.0.5>:auth<github:drforr>.tar.gz".IO | |
"archive/A/ANTLR4::Grammar/ANTLR4::Grammar:ver<0.6.2>:auth<cpan:JGOFF>.tar.gz".IO |
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
multi sub trait_mod:<is>(Method $obj, Bool :$path-checked) { | |
$obj.wrap: -> $inv, $path, |c { | |
if $path.starts-with: $inv.root { | |
callsame; | |
} else { | |
callwith $inv, $inv.root ~ $path, |c; | |
} | |
} | |
} |
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 v6.d; | |
use Test; | |
use Injector; | |
use Distribution::Resources::Menu; | |
use Distribution::Resources::Distribution; | |
BEGIN { | |
bind dist(), :name<dist>; | |
} |
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 v6.d; | |
unit module Simple; | |
class Menu { ... } | |
class Option { | |
has Str $.display-string is required; | |
has Int $.option-number; | |
has Menu $.submenu is rw; |
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 v6.d; | |
unit module Doc::Examples::Resources; | |
class Resource { | |
has Str $.name; | |
} | |
class Lesson is Resource { | |
has IO $.file; |
NewerOlder