-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multipiles #1078
Comments
I don't want the ability to "swap out" an entire stack, or else we'd need ensure every stack has something fit as the standard plane. Instead, I'm thinking that you can extract an To reinsert an extracted plane (and any bound planes), you'll reparent it. This handles the case where a bound plane is reinserted by itself -- the act of reparenting will decouple it from the extracted stack. The "root" plane of an extracted stack will be bound to itself, just like the standard plane. This maintains the invariant that all planes are bound, without making a reference into the main stack. This seamlessly facilitates multiple extracted stacks. So, extracting a plane:
The one thing I don't like about this is that we lose z-axis information. Let's say we have planes 1, 2, 3, 4 from top to bottom. 2 is bound to 4; 1 and 4 are bound to 3; 3 is bound to itself. We extract 4. This gives us: zaxis1: 1, 3 when we reparent 4, we now have 2, 4, 1, 3 (assuming reinserted planes go to the top of the z-axis). 3 is no longer between them. That's just how it goes, I suppose, when you're stuck fuck out of luck and lost in the ghetto. |
https://www.youtube.com/watch?v=3CE3fXWXwtg probably going to go ahead and move on this |
what happens if you call |
This could just be |
Yes, together with #1109 we will pursue a glorious new era. There will be no standard plane, and there will be no default stack. There will be planes and stacks, created as the user deems fit. Have a single plane occupying a single cell, forming the entirety of your single stack. Have thousands of stacks with millions of planes. Render as you see fit. |
I like very much the ongoing ncplane refactor. This one specially... It will make planes a lot more fun to use. Do you think maybe there's a simpler API for horizontal alignment that doesn't involve a union? Or do you like the current solution a lot? |
i do not like it a lot. i can't just map them onto the negatives, since you can place a place in the negatives. i could eliminate the union aspect, and just treat it as two different "number lines" based on the flag, since ints and enums are handwave-equivalent-enough-for-this. then you're doing i think this might require c++ to throw some https://getyarn.io/yarn-clip/3998758f-e3f0-4485-9ef4-c0b6c54ea476 @joseluis i say we take this sad old |
oh btw i know i wrote "stack" a lot above, but we're actually calling them "piles" because a) stack has a very definite CS meaning and this is not it if it was good enough for fermi it's certainly good enough for us |
for those (not) following along at home, here's what's brewing in the increasingly-inaccurately named
|
i might not purge |
The ...which suggests, of course, a is this stupid and overthinking in response to what's only really a rather small departure from orthogonality? i will ponder it. all input welcome. |
the more i think about it, this is absolutely the right thing to do. i don't like the fact that you can't reparent an entire level at once, but that's true for our current situation, also (you can't fix this with e.g. an oooooh what we could add is some kind of e.g. so now if you have a root level with a single plane, and two planes are bound to it, and you do an i'm glad i typed this all out, this is much, much, much better. |
Hrmmm actually there's a problem with this. So we've proposed decoupling a plane by reparenting against itself. This makes it a new pile. Under the proposal above, how would we extract a plane and add it to a root level of an existing pile? There's no way to do so. I don't think it particularly important, but it undermines the conceptual elegance of the entire approach--in which case the added complexity probably isn't worth it. Hrmmm. (currently, you join a level by reparenting to the plane to which that level is bound. the planes of a root level are bound to themselves; you can only reparent underneath them). |
I think it's perfectly acceptable to have the limitation of only one plane for the root of a plane pile. As long as we can have multiple planepiles detached from the main pile being rendered, and the flexibility of shuffling planes between piles I don't see a problem with that really. |
It would be nice to have the option of inserting a plane between two others, like adding a chain slab, on one side, and being able to insert a plane as a child and becoming a sibling of the preexisting children of the new parent, on the other... |
to insert c between a and b, reparent b to c and c to a. but maybe you meant as one call? |
i just really don't like that |
Yeah I meant in one call. Ideally (in my mind) the notcurses object would be the one having any plane appointed to render (does it need a particular size?). You could make And maybe only allow destroying either childless planes or the whole tree of descendants? You could also either reparent any plane (alongside its children) or make it an orphan. |
Hrmmmm, I was writing out the rules, and realized something else: the The fundamental problem arises from A far-out idea running counter to general trends (i.e. eliminating the standard plane): what if every pile was rooted by a standard plane? Reparenting something to itself would create a new pile AND a new standard plane for that pile: We could of course have a hyperspecialized Hrmmmm.... |
If a plane is created with {y, x}=={1, 1}, and it is bound to a plane at {2, 2}, it is logically at {3, 3}. when we reparent it (especially as a root plane), does it remain at {3, 3}? or go to {1, 1}? i think the answer is {1 + i think we could just redefine
becomes
and when a plane becomes a root plane, throw |
yeah, that appears to work. |
Closing this as done; I've moved the rendering changes to new bug #1135. |
It would presumably be sometimes useful to be able to scribble on an
ncplane
while still rendering one's other planes. Currently, one can only safely do this by stashing the scribble plane underneath all others, and ensuring that every cell gets solved above you. Introducencplane_decouple()
or some way to create a decoupled one inncplane_create()
, and also a method by which it can come back into the stack (ncplane_move_top()
etc. might be sufficient).Note that this means all links must be severed:
above
orbelow
linksthis kinda suggests that you can't have interplane structure outside the stack, or else you'd have to move everything back at once. think this through before moving on it.
ncpile
and replacenotcurses
link inncplane
ncpile_destroy()
ncpile
s innotcurses
, free them innotcurses_stop()
make_ncpile()
ncpile_create()
ncplane_reparent()
ncplane_reparent_family()
ncplane_reparent_family()
notcurses_drop_planes()
to drop all pilesncpile_destroy()
for emptied ncpile inncplane_reparent_family()
ncpile_destroy()
for emptied ncpile inncplane_destroy()
ncplane_move_top()
to use plane's pilencplane_move_bottom()
to use plane's pilencplane_move_above()
to reject cross-pile movesncplane_move_below()
to reject cross-pile movesncplane_reparent_family()
ncpile_create()
ncplane_pile()
differs as expectedThe text was updated successfully, but these errors were encountered: