I hereby claim:
- I am gatlin on github.
- I am marcus4realius (https://keybase.io/marcus4realius) on keybase.
- I have a public key whose fingerprint is 5B99 A8B5 30FB 7B4E 8676 A642 06EA 942B A243 5748
To claim this, I am signing this object:
| // inspiration: | |
| // https://www.schoolofhaskell.com/user/bartosz/understanding-algebras | |
| /** | |
| * Higher-kinded Types. | |
| * A higher-kinded type is a type that abstracts over some type that, in turn, | |
| * abstracts over another type. | |
| * | |
| * To support them in TypeScript we have to write a few types first. | |
| */ | |
| declare const Type: unique symbol; |
| #!/usr/bin/env bash | |
| ############################ | |
| # Unicode Character Viewer # | |
| # v1.0 # | |
| # ~*~*~*~*~*~*~*~*~*~*~*~* # | |
| # Author: Gatlin Johnson # | |
| # <[email protected]> # | |
| # ~*~*~*~*~*~*~*~*~*~*~*~* # | |
| # Runtime dependencies: # | |
| # - fzf # |
I hereby claim:
To claim this, I am signing this object:
| import { readFile } from "fs/promises"; | |
| import { createInterface } from "readline"; | |
| import type { Interface } from "readline"; | |
| import { CESKM, parse_cbpv, scalar, continuation, topk } from "precursor-ts"; | |
| import type { State, Value, Store } from "precursor-ts"; | |
| import { | |
| createMachine, | |
| state, | |
| transition, | |
| reduce, |
| /** | |
| * outputs: | |
| * a { a: 3, b: 6, c: 12 } | |
| * b { a: 5, b: 10, c: 18 } | |
| * c { a: 8, b: 16, c: 27 } | |
| * { a: '25', b: '196', c: '900' } | |
| * c 900 | |
| */ | |
| // todo: use type system to statically verify the key exists in the object. |
| import { _, Functor, Fix, _in, cata, Algebra } from './base'; | |
| import { strict as assert } from 'assert'; | |
| // The type parameter goes where the grammar would otherwise reference itself. | |
| type ArithF<A> | |
| = { tag: 'add' ; lhs: A ; rhs: A } | |
| | { tag: 'mul' ; lhs: A ; rhs: A } | |
| | { tag: 'num' ; n: number } | |
| | { tag: 'paren' ; e: A } ; |
| {- cabal: | |
| build-depends: base | |
| -} | |
| module ContT | |
| ( ContT | |
| , reset | |
| , shift | |
| , liftIO | |
| ) |
| #!/usr/bin/env bash | |
| ### | |
| # Usage | |
| ### | |
| # twitch <path-to-file> | |
| PATH_TO_TWITCH_KEY="$HOME/.config/twitch.key" | |
| if [ ! -f "$HOME/.config/twitch.key" ]; then | |
| echo "Please write your twitch key to $PATH_TO_TWITCH_KEY" |
| class cont: | |
| def __init__(self, fn): | |
| self.fn = fn | |
| def __call__(self, *args, **kwargs): | |
| return (lambda: self.fn(*args, self, **kwargs)) | |
| class tailrec: |
| /* Helper function which writes a string to a file descriptor. | |
| */ | |
| static gboolean | |
| write_to_fd (int fd, const gchar *message) { | |
| gsize bw; | |
| GIOChannel *channel = g_io_channel_unix_new (fd); | |
| GString *message_str = g_string_new (message); | |
| g_string_append (message_str, "\n"); | |
| g_io_channel_write_chars (channel, | |
| message_str->str, |