Add direct support for primative merge, split, and mix in DML #294
Labels
4 imporant
Important issue
in: DML
issues related to the macro language
is: feature
Issue proposes a new feature
Probably the most urgent ask for protocols is the ability to simply merge and split drops. At the moment, merging can only be done using
unsafe_walk
:This is ugly (as, of course, it should be), but we can definitely do better.
In the code I've sketched out for OSU, I simply have drops get into position relative to one another, and then have one drop say
while the other says
"In position", in this case means that
d2
is two pads north ofd1
. By putting a pad in between, the code can use normal (rather than unsafe) motion. The resulting drop will be atd1
's current location and will haved1
's identity, and thed2
drop ceases to exist.My initial thought was that
accept merge
returns the new drop whilemerge into
doesn't return anything, but I'm now thinking that they should probably both return the new drop. This will allow the user to continue whichever path makes the most sense, noting thatIn addition, if the drops say, in parallel
when they're in position, the drops will merge to the center and then split back into their original positions, each retaining its own identity.
Finally, we also need a way to split a drop (likely one that was merged earlier and then walked) into two smaller one. For that, we can say
As with the
merge
operations, the resulting drop will be two pads to the east.We can take advantage of the
future drop
notion (#283) by adding an optional clause that takes a variable name:This will allow us to say things like
Here, a large drop is split into four:
lower_left
splits offlower_right
to the south andupper_left
to the north before moving into position.lower_right
is split off, it moves into position and splits offupper_right
.upper_right
andupper_left
are split off, they move into position.Migrated from internal repository. Originally created by @EvanKirshenbaum on Aug 02, 2023 at 4:47 PM PDT.
The text was updated successfully, but these errors were encountered: