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
{ | |
"header": { | |
"unk_version_1": 1, | |
"unk_version_2": 517 | |
}, | |
"items": [ | |
{ | |
"name": "Relay", | |
"guid": "DAA95265-FE3D-934B-84D4-FAAF5AF8F81F", | |
"unk1": "01000000-0000-0000-0000-0000EA070000", |
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
#pragma author bree | |
#pragma description UBJSON ( Universal Binary JSON) format | |
#pragma MIME application/ubjson | |
#pragma endian big | |
#include <std/io.pat> | |
#include <std/mem.pat> | |
#include <std/string.pat> |
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
#pragma endian big | |
#include <type/magic.pat> | |
#include <std/array.pat> | |
fn relative_to_parent(u128 offset) { | |
return addressof(parent) + offset; | |
}; | |
struct Header { | |
type::Magic<"PMPF">; |
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
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 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 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 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 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 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 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 |
NewerOlder