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
| https://flems.io/#0=N4IgtglgJlA2CmIBcA2ATAOgBwoDQgDMIEBnZAbVADsBDMRJEDACwBcxYR8BjAeytbwByEAB5uNKgDcaJAAQB3aK2YBeFABY5zeBADmbdVoD0APi4gS8BN1YR+ZRgAYkaFCAC+uanQZMAVmQ8-ILCjHxUJKxytgAecqpyULzcAK70AhgARrxQAJ4YAI6p8ABOeQDK1vC2vKUAFADkEtKyjQCUGHrwrADCIfCxrE1oUB0AOlSTBKlUtvZUct2sALK8qVYACrwk9S0yJLhy8O1ywJNycjKlcjmzUPKJ+7JdPQBC61RQEFR6vbAQISsABKNWG7QA3Bc5NCIlE5LIAA5ghJnaGXJRQFRIW6fB4YTEqOTGGKsWIYZ4kAnKZhyAA+dLkTlw6O0ugMrBxdy+VJ0+jYxNJ5MpLHZAoZTJZizkHihU2lCGi8USKxoKgwpTx9XgGF4BAIVlYAA1BUiwdSscxIdDFXI8qjVerNfdtbr9YaAJqmkjI2yi-msa3S2EOaJRGhZBCo87Sy6xHEQEgAMR+EEE9VipwA-HJ4jjmay8gnk6n03ls3a5PmpZdZdDoaUeqlSotw5H4HKPJNJnEMERYLAKqw8lHEo0AMT6pzTpyNHtkvvEWCg2z1ACMRw3ci3a-a3aotqgpRoej0Pz0qIINFgVjlvZF-ERvB+glKyQUi0S2tOqlMaOlR4nmevyoqwpQlHKlxwtEwC5kc9oeKiyxrBs8DbLs96SAcRwnLCC79suYIZvBm6bnuVBdvKmGtFSj7PgIZRgLwUjwKi34JH+MaXBABD1IBp7nqcXGXDEoZnHBlaIYkyHrFsOx7AulI4eRIlCouA4rsMsQkduZHQpRlHzsKWEvHRL5lKkiJsScHH-pc-HAReiRXjeHaTIZVAzHMdj8Ekx4KPUQkhpE0RpKUjYCEmx70KivbLAAkmAJ7wAAImqND1MykpqSKhLMEc1EHP6HIqTC0rQUsPSbBAsTWGx2l2j+f5hRFrBRb4GBQO |
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
| float round(float n) { | |
| return floor(n) + step(-0.5, n - ceil(n)); | |
| } |
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
| contents |
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
| <!DOCTYPE html> | |
| <html data-bs-theme="dark"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <title>Bootstrap demo</title> | |
| <link | |
| href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" | |
| rel="stylesheet" | |
| integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" |
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
| const TOKENS = | |
| /(?<name>[\w_-]+)|(?:"(?<string>.+?)")|(?<whitespace>\s+)|(?<symbol>.)/g; | |
| type Token = { | |
| name?: string; | |
| string?: string; | |
| whitespace?: string; | |
| symbol?: string; | |
| }; |
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
| // deno-lint-ignore-file no-unused-vars prefer-const no-cond-assign no-empty | |
| import { | |
| assert, | |
| assertEquals, | |
| assertExists, | |
| assertInstanceOf, | |
| equal, | |
| } from "https://deno.land/std@0.168.0/testing/asserts.ts"; | |
| type LiteralT = |
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
| const file = Deno.readTextFileSync('days/06/input.txt') | |
| const map = file.split('\n').map(line => line.split('').map(char => parseInt(char))) | |
| const cols = map[0].length | |
| const rows = map.length | |
| const visible = new Set<string>() | |
| // top to bottom | |
| for (let x = 0; x < cols; x++) { | |
| let prev = -1 |
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
| // Utils | |
| type Fn<T = void> = () => T | |
| type None = typeof None | |
| const None = Symbol() | |
| const $batched: Set<Fn> = new Set() | |
| // The behavior for batches will be different from wires | |
| // unsure why but it feels right |
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
| # Basic Formatting | |
| **bold** | |
| *italic* (friendly) | |
| //italic// | |
| __underline__ | |
| ~~strikethrough~~ |
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
| https://flems.io/#0=N4IgtglgJlA2CmIBcBmATAOgBwHYA0IAzvAgMYAu8UyIGphhIBAZhAo0gNqgB2AhmERJaAC3JhYTEKQD2PSvJoB6JQCp1AIwBO8eOtUqAOjwB6AAgCS5PrAiljZs+YBCM2FAeOnl67dJmAdz5CMxsdPigATzNmGQBXHig8M0IAawgABwyIHgBzTy9Ck2MpYjJyCDkOEABWJAAGEABfPF4BIVoAK0YCWXl4RWFm1pB+QRo6Bik+hXIaMQkzYE8NPlJU3K14xKQzAGIUQ4BuT1j5AFpmATZI3bA5GUIMtfgTnkdZWBktXYCRCEob2Mai8q3Wm22UF2th48D4WnOmwiEAG5AAFABOepQeC5ZIHFAAFhqZhq9QApPiAGxUnBoUkUgCUeAKZhhcIRSKgKPkaOxuOphKpDMp+ypNWFZPJjKOZgMKzWGy2CShbJyHMRWmRqMx-Lx+xqEpF1NpIplCvBysS50IEAAXvBdjUMDVSCIzABGFDwAAebyaxmMGhkUSWnjA8NyOV29TejmeMByuRjcbMnj+APgNuepEdZgyOlTZ3INvteddIlTCHIlARTzWSZTxiapRI8AolR41RwSEJHuaAF0mkA |