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/[email protected]/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 |
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
// 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 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 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 |
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
# Basic Formatting | |
**bold** | |
*italic* (friendly) | |
//italic// | |
__underline__ | |
~~strikethrough~~ |
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
struct TweetRoute: Route { | |
@EnviromentObject var db: Database | |
@Path var user: User | |
@Path var tweet: Tweet | |
var pattern: Pattern { | |
.GET | |
"user" | |
User.ID | |
"status" |
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 COLLIDABLE = document.getElementsByClassName('collidable') | |
const Direction = { | |
None: 0, | |
Left: -1, | |
Right: 1 | |
} | |
const State = { | |
Walking: 0, |
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
{ | |
"openapi": "3.0.0", | |
"info": { | |
"title": "Revolt API", | |
"description": "Open source user-first chat platform.", | |
"termsOfService": "https://revolt.chat/terms", | |
"contact": { | |
"name": "Revolt Support", | |
"url": "https://revolt.chat", | |
"email": "[email protected]" |