homotopy-io / homotopy-rs

A Rust/WASM implementation of homotopy.io
https://homotopy.io
BSD 3-Clause "New" or "Revised" License
84 stars 7 forks source link

Duplicate generators #197

Open vinnylarouge opened 3 years ago

vinnylarouge commented 3 years ago

it would be useful to have the ability to make a duplicate of a folder and all contained cells.

jamievicary commented 3 years ago

Interesting, why would you want to do this?

vinnylarouge commented 3 years ago

suppose i have a 0-cell upon which I've defined some symmetric monoidal signature. for a use case I have in mind, I'd like to have another SMC with the same structure but defined on a different 0-cell, so then I can further specify how processes from two "contexts" can talk to each other.

calintat commented 2 years ago

This is related to #523. I think it is a good idea, we should be able to duplicate folders as well as individual generators.

regular-citizen commented 1 year ago

This feature was requested by Hei Li as well.

kram1032 commented 1 year ago

A variant of this I'd really like is what amounts to polymorphism. I'm guessing this can get real complicated real fast, but what I'm imagining right now is basically to allow to assign specific cells to a sort of template set of rules which are defined as "some cell A and some cell B transform to some cell C" (etc.) where the colors aren't prespecified.

That way, if I want to introduce another cell that behaves in the same way to previously established cells, I don't have to add the structurally exact same set of rules to all the combinations of such cells (something that grows exponentially with every additional cell color) - I'd only have to specify the likely much fewer ways in which they behave uniquely.