purr changed the topic of #elliottcable to: a _better_ cult || topics << 'gamedev'
<ELLIOTTCABLE>
or to rephrase that: is there a complete, textual representation of the source-code at all times? or does your tree representation *replace* it?
<ELLIOTTCABLE>
(i.e. ‘what can come out will always been limited to what the parser understood.’)
<Cheery>
the tree representation replaces it.
<Cheery>
otherwise you couldn't extend a language
<Cheery>
without some really hard constraints
<ELLIOTTCABLE>
‘couldn't extend a language’
<ELLIOTTCABLE>
well, if it replaces it, you can't *write* a language.y
<ELLIOTTCABLE>
you can only write the subset representation implemented by whoever's writing the language parser. and that will *always* be a subset (trust me, I have extensive experience with linters, transpilers, compilers, parsers, …)
<ELLIOTTCABLE>
They always, always fail to do what the user wants in some case.
<Cheery>
I've thought I've thought this out. :) Well I've got the thing here. it's just missing good input.
<Cheery>
and thought it's generic. I can write a new schema file, and a new layouter function.
<ELLIOTTCABLE>
so, what was your question?
<Cheery>
the question is how would I build up the keyboard input.
<ELLIOTTCABLE>
sorry, re-phrase that … language barrier
<ELLIOTTCABLE>
‘build up?’
<Cheery>
I know how to remove from my tree. how to add into the tree.
<Cheery>
I know how to show a selection that spans across the tree
<Cheery>
how to move the caret
<ELLIOTTCABLE>
regarding editing:
<Cheery>
also made a system that lets you fill in beginning symbols of a structure, it replaces it with a blank structure.
<ELLIOTTCABLE>
again, I suggest you have a textual representation stored internally, and constantly keep your tree-representation *mapped* to that textual representation;
<ELLIOTTCABLE>
and if you do so, then you get something else: an improved textual-style (as opposed to, say, click-and-drag, or tap, or etc) editing experience
<ELLIOTTCABLE>
everything that a user does text-wise (i.e. vim or emacs bindings, the usual movement commands and insertion/deletion, so on and so forth), can *literally* be applied exactly to the textual structure; then the effects in the visual structure can be inferred from there.
<ELLIOTTCABLE>
this lends precise adherence to user expectations, because they literally *are* editing a textual document, even if it's not rendered that way.
<Cheery>
that's something done by jetbrains MPS.
<ELLIOTTCABLE>
jetbrains MPS? wassat?
<Cheery>
jetbrains got a meta programming system, which does something like this, but the details are different.