Hacker News new | ask | show | jobs
by kustosz 3286 days ago
We store them in a separate section in the source file, which is hidden by default when editing. So a bare .luna file is a readable text file, containing some metadata at the bottom, which is not shown when editing with our editor. This way we achieve clear representation and full portability of the source files.
3 comments

Nice.

A few more questions:

Is does z-ordering just follow the painter's model?

As a user am I allowed to place two nodes at the same x/y coordinate?

As a user am I allowed to position nodes in a way that creates a visual ambiguity in the diagram (e.g., two or more perfectly overlapping edges among nodes)?

Edit: As a user am I allowed to place a node at an x/y that lies within the bbox of another node?

1) it uses painters model 2) you are allowed to place in the same x/y, but we're looking for a way to indicate it to you. 3) you are able to place nodes so the edges overlap, but we also are looking for a way to indicate it to you.

Keep in mind, that point 2 and 3 does not happen during your workflow normally, so these are very rare situations. We want to support them just from the "purity" perspective, but they are very low on our priority list currently.

So in terms of git, Luna users won't be able to comprehend the visual z-order and positional changes by glancing at a diff. And those types of changes will come freely in the normal course of development.

That means that Luna requires some kind of visual diffing step to reach parity with the development flow of text-based languages. Otherwise developers will get comfortable interpreting metadata changes as noise. In specialized languages like Max/MSP that leads to spaghetti programs. In more general visual languages it could probably even lead to security issues if an overlap suggest a different visual data flow than the source code. (And judging by Pharmaceutical TV commercials, people blithely favor the visual over the written when there's a discrepancy.)

Why do you store the visual node positions? For me it is hard to imagine anyone want to edit those. Why not just automatic layout?
This way we are also compatible with git etc! :)
How about conflict resolving? Is it some base64-like snippet or human readable representation?