Felix Kohlgrüber
03/10/2019, 4:04 PMyairchu
03/10/2019, 4:33 PMstevekrouse
yairchu
03/10/2019, 4:37 PMyairchu
03/10/2019, 4:43 PMduncanawoods
03/10/2019, 5:06 PMexport to text -> mangle -> import text
.Felix Kohlgrüber
03/10/2019, 5:16 PMyairchu
03/10/2019, 5:24 PMJake Brownson
03/11/2019, 4:01 AMNick Smith
03/11/2019, 5:26 AMDan Swirsky
03/11/2019, 7:28 AMyairchu
03/11/2019, 7:32 AMNick Smith
03/11/2019, 7:45 AMjaukia
03/11/2019, 9:32 AMyairchu
03/11/2019, 9:57 AMDavid Piepgrass
03/11/2019, 10:19 AMduncanawoods
03/11/2019, 11:02 AMduncanawoods
03/11/2019, 11:11 AMIf text is really such a natural way of working why don't we use it more for non-programmer UIs?I've thought about this too. I think for a constrained task, a constrained high level UI is the best. A lot of end user UI is task specific so that is the better choice. For creative tasks however, the use case is more like putting a lump of clay on a potter's wheel and then massaging it into your end result with the ability to explore lots of different paths. If a high level editor adds constraints and abstractions that means you can't do this, it becomes a bad editor. I am quite interested in the philosophy of craftsmanship which has a lot to do with interaction between a craftsman and material. I think a structured editor can achieve the same certainty as text if it's fundamental unit of material has the right properties. I'm not sure what these properties are but it's something like: - predicatable rules of combination - always possible to add or remove anything - no hidden state - can act on groups as you can on individuals Spreadsheets work quite well with cells as materials. It's not perfect but you know where they are and how to combine them so it feels solid. Spreadsheet formulas however, eh, not so much!
Brian Hempel
03/11/2019, 2:03 PMDavid Moon
03/11/2019, 6:09 PM2 * 3 + 4
. We get to 2 * [3]
, where 3
is selected because we just constructed it. Then we hit plus. A simple structure editor implementation would lead to 2 * (3 + [_])
, which is not what we want. In this implementation, we’d have to first navigate up to select the multiplication expression ([2 * 3]
) and then hit plus. This kind of mode switching is annoying. http://www.cs.ox.ac.uk/bernard.sufrin/edit.pdf gives a solution to this that leverages online precedence parsing on insertion commands. Hazel does a form of this, I believe Lamdu and mbeddr do as well. Independently of whether we’re switching modes, AST navigation via ‘parent node’ and ‘child node’ commands can also be at odds with an interface that presents things as a linear sequence of characters.David Moon
03/11/2019, 6:11 PM1 + 2 + 3
in parentheses. Because we’re creating a single node, it seems to make sense that this should be a single ‘parenthesize’ command. This requires the user first to select the entire expression 1 + 2 + 3
, then do ‘parenthesize’. So this requires the expression selection cursor UI, which has issues as described above. One thing that’s nice about a text interface is you can break up expression node construction into multiple insertions. Given |1 + 2 + 3
, I can type (
, then move over to the end of the desired subexpression, then type )
. One approach I’m exploring and implementing in Hazel is having an expression construction mode, where you can similarly rely on multiple keystrokes to specify how to construct an expression node. Given |1 + 2 + 3
, I type (
. This gives me (1[)] + 2 + 3
in expression construction mode, where the right parentheses is selected for moving to the appropriate spot. I hit right, that gives me (1 + 2[)] + 3
. Hit right again, I get (1 + 2 + 3[)]
. I then hit enter or )
and that returns me to the regular edit mode. People like to hate on modes, but it’s not that different from selecting autocomplete suggestions, which people like. The important thing is for that mode to be made visually clear and to be automatically entered/exited at expected times. This is what distinguishes this expression construction / autocomplete modality from the classical structure editing modality described above.Felix Kohlgrüber
03/11/2019, 8:33 PMNick Smith
03/12/2019, 5:40 AMstevekrouse
robenkleene
03/12/2019, 9:42 PMwtaysom
03/13/2019, 12:15 AMNiko Autio
03/13/2019, 10:58 PM( 2 * [{] )
-> ( 2 * { 1 + 3 [}] )
-> ( 2 * ( 1 + 3 )[] )
(suggestions will upgrade automatically as real parenthesis when match is found). Therefore editor is aware which parenthesis are connected and structure won't be completely broken in middle way. Or maybe selection itself can be considered by inputting that {} and adding node is separated concern.shalabh
03/13/2019, 11:24 PMDavid Moon
03/14/2019, 12:30 AM2 * (3 + 4
, should I assume there is no parentheses and compute 2 * 3 + 4
, or should I assume some default position for the closing parentheses and compute 2 * (3 + 4)
? I wonder if there would always be such a reasonable default position.David Moon
03/14/2019, 12:45 AMyairchu
03/14/2019, 12:01 PMduncanawoods
03/14/2019, 1:46 PMNiko Autio
03/14/2019, 9:51 PMshalabh
03/14/2019, 11:02 PMDavid Moon
03/15/2019, 1:44 AMshalabh
03/15/2019, 4:02 AMshalabh
03/15/2019, 4:06 AM