This file contains hidden or 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
| # Conway's Game of Life | |
| # | |
| # Initialises the canvas randomly | |
| # | |
| # nimble install sdl2 | |
| # nim c -r life.nim | |
| from random import randomize, rand | |
| import sdl2 |
This file contains hidden or 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 std::collections::VecDeque; | |
| use itertools::Itertools; | |
| #[derive(PartialEq)] | |
| enum AddressingMode { | |
| Position, | |
| Immediate, | |
| } |
This file contains hidden or 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 perl | |
| # A hex dumping function I use for work purposes. | |
| use warnings; | |
| use strict; | |
| hex_dump("ABCDEFGHIJKLMNOPQRTUVWXYZ0123456789"); | |
| sub hex_dump { | |
| my ($payload) = @_; |
This file contains hidden or 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
| palette = 0=#161616 | |
| palette = 1=#262626 | |
| palette = 2=#393939 | |
| palette = 3=#525252 | |
| palette = 4=#dde1e6 | |
| palette = 5=#f2f4f8 | |
| palette = 6=#ffffff | |
| palette = 7=#08bdba | |
| palette = 8=#3ddbd9 | |
| palette = 9=#78a9ff |
This file contains hidden or 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 | |
| # hexdump.raku -- simple hex viewer | |
| # @[email protected] | |
| # no-color.org | |
| my constant $NO_COLOR = %*ENV<NO_COLOR>:exists; | |
| my $color_reset = "\x1b[0m"; | |
| my $color_bold = "\x1b[1m"; | |
| sub color_black(Str $s) { "\x1b[90m" ~ $s ~ $color_reset } |
OlderNewer