10 years ago, I thought "programming is too hard, I'll make tools to make it easier"
5 years ago, I thought "I'll make a new language to make it easier"
now I'm working on tools to make "making new languages" easier 😂
Drag-and-drop makes the digital graspable, but building it well is fiddly enough that many don’t bother. Declarative Dragging (with Josh Horowitz & Jeff Heer, #uist2026 best paper award), lets you make an element draggable just by listing the states dragging it can reach.
Here's what lenses look like in a "guess my number" game. This compiles to linear immutable code, where state (in this case) is threaded into and out of every function that needs it.
(if pat hasn't been used up yet, that's a linearity violation, so swap only works on used-up vbls)
- and `block` is of the form `block{let stmts}{result}{cleanup}`, where cleanup swaps are performed after result is computed but before it is 'returned'. a bit like go's defer
To make linear-flow/lenses easier to understand, I've developed an intermediate representation that compiles out the lenses, leaving (relatively) straightforward linear code.
I think the only two things that need explaining are:
- swap(pat,val) returns the current value of pat
@TaylorPetrey I'd love to see a question to non-religion folks that replaced "God" with "morality" or "a just society". I'd be curious to see how it landed among folks on the left that talk about "the paradox of tolerance"
Delighted that "Flow Typing: A New Lens on Linearity" has been (conditionally) accepted for POPL 2027. Fantastic work by Sky Wilshaw! https://t.co/crZsYnN8us
@haskellhutt I think the body of the final `withFile` on page 20 needs to be wrapped in a tilde `~(let h ...)`, as `lens x <- y in z` only exists in the lens syntax, not the linear syntax.