I’m thinking if it would make sense and be feasibl...
# present-company
j
I’m thinking if it would make sense and be feasible to create a “two-way” editor, where the ground truth would be in code, but you could edit the elements visually, too. Any examples of: 1. Two-way editors, where you could edit the same data in both visual (think Sketch, Blockly, nodes, etc) and code format (JS, Python, custom markup)? Ideally something, where formatting would be preserved when moving between these two domains. 2. Papers related to “two-way” transformations, either from a parser point-of-view or on some higher abstraction level (strategies in general, UI:s, etc)?
m
Sketch and Sketch is working on that: http://ravichugh.github.io/sketch-n-sketch/
👍 4
j
Thanks! I realized I tried that back in 2018 but had already forgotten about it.
s
not specifically related to editors, but a great recent piece of work related to two-way data transformation was Cambria: https://www.inkandswitch.com/cambria.html
k
Here's another recent idea in this space from the Racket universe: https://www2.ccs.neu.edu/racket/pubs/oopsla20-abf.pdf
👍 2
d
k
MVC is just two-way data-binding between your models (your data) and your views. Just represent your code as models and then have multiple views, some of which are textual, and some of which are graphical. That's what I do with FOAM (foamdev.com). Just treat code as data, and the MVC it.
👍 4
w
I always find the complication is what to do with intermediate ill-formed states.
👍 1
t
In the database world, this is called the View-update problem (http://www.cedanet.com.au/relational-model/view-update-problem.php). Just do a Google search on the terms for more details.
☝️ 2
j
Super, thanks!
j
A bunch of projectional editors have tried to give more than one view on some underlying representation. If you google around you'll find many dead but interesting projects in this space 🙂
👍 1
m
@jaukia forgot to mention https://enso.org/
👍 1
a
You might find something to get inspiration from in this. It's targeted at education. https://vizzcode.itch.io/vizzcode
👍 1
👀 1