started at 11:55AM cloned https://github.com/joelburget/ghcjs-box ff react-haskell
seems like I got a copy of pigment here too? seems up to date
make
cp src-web/index.html build/
cp: directory build does not exist
started at 11:55AM cloned https://github.com/joelburget/ghcjs-box ff react-haskell
seems like I got a copy of pigment here too? seems up to date
make
cp src-web/index.html build/
cp: directory build does not exist
var nodemailer = require('nodemailer'); | |
var fs = require('fs'); | |
// create reusable transporter object using SMTP transport | |
var transporter = nodemailer.createTransport({ | |
service: 'Gmail', | |
auth: { | |
user: '[email protected]', | |
pass: 'yourpasswordhere' | |
} |
### Keybase proof | |
I hereby claim: | |
* I am zgotsch on github. | |
* I am zgotsch (https://keybase.io/zgotsch) on keybase. | |
* I have a public key whose fingerprint is 5A5D F20F 8B8B 4B21 2D02 8105 C09C A697 501A 4F19 | |
To claim this, I am signing this object: |
// flow-typed signature: 20156f0acaa7b756a5b17b397b8b8220 | |
// flow-typed version: <<STUB>>/aphrodite_v1.2.x/flow_v0.56.0 | |
declare module "aphrodite" { | |
declare type SheetDefinition = {[id: string]: any}; | |
declare opaque type SheetEntry; | |
// declare export type AphroditeExtension = { | |
// selectorHandler: SelectorHandler | |
// }; |
import * as React from "react"; | |
import Form, {FormErrors, FormError, FeedbackStrategy} from "formula-one"; | |
import {Draft, Person, Iso, Faction, Ship} from "../types"; | |
import Select from "./Select"; | |
function validateName(name: string | null): null | string { | |
if (name === null || name === "") { | |
return "Name is required"; |
class Form extends React.Component { | |
state = {name: ""}; | |
handleNameChange = e => { | |
this.setState({ | |
name: e.currentTarget.value | |
}); | |
}; | |
render() { |
import {sql} from "@vercel/postgres"; | |
import assertNever from "./assertNever"; | |
import invariant from "small-invariant"; | |
type Identified = {id: unknown}; | |
type IdentifierOf<T extends {id: unknown}> = T["id"]; | |
type Node<T extends Identified> = { | |
id: IdentifierOf<T>; | |
version: number; |
I was thinking some today about long-running computations on function-as-a-service (hereafter FaaS) platforms. FaaS platforms have relatively strict runtime constraints (e.g. 10s on Vercel's unpaid plan, but up to 15m on AWS Lambda, with others usually falling somewhere in-between). When doing computations that are either interruptable (a sequence of less expensive operations) or take place remotely (e.g. expensive API calls to something like an AI service), the ability to suspend and resume these long-running/blocking computations may make it possible to run them on FaaS platforms.
A quick web search told me what I was looking for is called "serializable first-class continuations" and, unfortunately, JS doesn't have support for first-class continuations, much less serializable ones. However, since I was primarily interested in interrupting and serializing computations at await
-points, I thought I might be able to get somewhere by leveraging generators. Unfortunately generators aren't serializable either,
// Typescript 5.2.2 | |
// https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBDAnmYcBCUCGA7AJgHgBUAadAPjgF45C4AyOAbwH1mAjLPALnQF96mrAO4BLGNmABnST0K8A3ACgkKOAEFsiDDlxV0nAgFdsAa2wQh2UsbMXsZJStQBVbBx340cUDGB5J6praeBTUaADaAETCYhLSkQC6SoqgkLBwAGbGAMYwIhDYcO54RKRoZAAUILIAlDzBBCTkTIpwcFDAMIZQhSBwmAE4iEq8iing0PBZ2Ln5hcW4AMKelXVwRJXVNDVUFA2lzYytbe2d3YVVO5QUfQP9miNj2QWSUxAQepEZ75H9Ac-YV6OZCoACi2DySAAkrpqCx2AYeJFwZDEDDIgplCC4CixGjcAAmPT7V5QETYADmpGRELx6LITxe8D61AWFW+EB2kkweUkGREUjgACUzj1CCD8E4IBkigZ8DZzJZqbjobhImQHIoAPRak5wAB6AH5GYD4Ig9GyOVyeSI+QKAvsFXZlbTVeqlDq9UaTa84AAvC0GZY01H0io1dnvGoe3Unb2KPrc3n8wUq-GKc1J20pgJpmGKANZu2p13phNwIs5nGlmEEjMVm3F3M1wkFhvJ+3V0OtrGqZx6VwLSUg6VwEAMz1teMA30wCB52GynTBhfq8NKGfwTB6OcLyOcmNew1AA | |
export type Brand<T, B> = T & {__brand: B} & {__witness: T}; | |
type AnyBrand = Brand<unknown, unknown>; | |
type Unbrand<B extends AnyBrand> = B["__witness"]; | |
export function brand<T, B>(x: T): Brand<T, B> { | |
return x as any; | |
} |