Pinned
Arnaud Spiwack
Arnaud Spiwack
@aspiwack.bsky.social
Multi-classed Software Engineer/Constructive Mathematician. Sometimes plays video games sort of fast. Puts topoi in your computer.
224 followers23 following1.4K posts
This is important dl.acm.org/doi/10.1145/... . For instance, when you have a linear Int# in Haskell, it's the same as having an unrestricted Int#. You want the type system to understand that, that's what the authors call mode crossing.
What I'm suggesting is that we can, and probably should, take this as the *definition* of multicategories (it's a tad more general: ordinary multicategories correspond to the case where contexts are a PROP generated by the pures).
I noticed something the other day. If you have a monoidal category, and a subset P of objects, then arrows from arbitrary objects to objects of P form a multicategory. We'll say that this is a category of context and P are pure objects.
Something I realised while working on sheaves (because it turns out to be relevant) is that the multicategorical definition of coproduct is stronger than the categorical one. Because in the multi case, the branches have access to the context. In the cat case they don't.
From a mathematics perspective, it may be a friendlier setting to speak about multicategories (which tend to be notationally heavy). Though I don't think it makes the definition of coproducts much less of a chore (see p92 in Shulman's tutorial).
In June, Ocaml 5.5 was released ocaml.org/changelog/20... , whose headline change is module-dependent functions (aka modular explicits). The Ocaml mailing list is no longer online, but I found in my emails me from May 2012, trying (and failing) to garner support for this feature.
From a PLT perspective, this is a friendlier re-analysis of the contextuals CCC bsky.app/profile/aspi... . See also Shulman's multicategorical logic tutorial mikeshulman.github.io/catlog/catlo... .
Well, there's a restriction of CCC, which doesn't seem to have a standard name but Altenkirch, Hofmann, and Streicher call it “contextual CCC” in Categorical reconstruction of a reduction free normalization proof. 5/8
I wonder don't know what notions of generalised multicategory are captured thus. Cruttwell and Shulman arxiv.org/abs/0907.2460 have a crazy general notion (and review of pre-existing notions). But I'm not motivated enough to try and figure this out.
I don't think this works super well for arbitrary relation equipments. First let's say that F is a functor if both: it maps arrows to arrows, and it maps composite relations R(f,g) to F(R)(F(f),F(g)).
That is, for any object A, we have an arrow α_A : F A -> G A, such that for all R∈Rel(A,B), F(R) ⊆ G(R(α,α)) If F is a functor, parametric arrows should be natural, for instance. This should give us an algebraic framework to talk about what we've been doing in PLT. 6/7
I rather like this, it's quite clever people.cs.nott.ac.uk/pszgmh/flow-... . It was already decently documented that borrowing can be thought as a lens operation. What Wilshaw and Hutton add is that you have to consider how those lenses are composed.
I rather like this, it's quite clever people.cs.nott.ac.uk/pszgmh/flow-... . It was already decently documented that borrowing can be thought as a lens operation. What Wilshaw and Hutton add is that you have to consider how those lenses are composed.
I rather like this, it's quite clever people.cs.nott.ac.uk/pszgmh/flow-... . It was already decently documented that borrowing can be thought as a lens operation. What Wilshaw and Hutton add is that you have to consider how those lenses are composed.
It's this time of the year. Every year on the 1st Octobre, the Gboard team from Google Japan puts up a hilarious video on a hilariouser concept. www.youtube.com/watch?v=DAn3...
I quite like the idea in this talk (I couldn't find a matching paper) www.youtube.com/watch?v=5bHR... to distinguish type □ A (computes a value of type A) and type ◇ A (computes a value of type A OR has a type error).
When we came up with Topiary our goals weren't too ambitious: make it cheap to write decent formatters for new languages, reducing the amount of stuff you have to maintain.
Topiary v0.8.0 -- Irresistible Ironwood -- is out! 🌳 New: Tree-sitter language injections (Markdown code blocks, OCaml in OCamllex and Menhir), much richer error reporting, better multi-line strings and a --check flag for CI. github.com/topiary/topi...
One year later. I found this proposal dl.acm.org/doi/full/10.... . Idea: add a rule e⇓e to big-step semantics. Except you can't do that, because most rules only make sense when you evaluate to a value. So you do the dual thing: allow big-step under (unevaluated) evaluation contexts.
And either way, big-step semantics doesn't tell you anything about partial evaluation. Partial evaluation is somewhat important (like it's 90% of GHC's optimisation). We need to find a way out of this mess. 6/6
Certainly a challenge is to make this observation less handwavy. The program doesn't blow up if you use a seed several times. It just doesn't have the desired distribution. But… what is the desired distribution? Does linearity show up in the semantics of probabilistic programs?
Something popped back up from the back of my mind. Splitting random-number generators seem to be an example of linear comonoid. In that it's imperative that you don't use the same seed twice. And the natural associated monad is a linear reader monad.