5 ms·
Show HN: A touch interface for tree editing
- Micoloth 9y agoWow, this is great good job! There is a small bug, where you can get a 2-wide block with only one 1-wide child, and when you pull it down a white square remains where it shouldn't. Anyway I really like this, it is so comfortable to use!
- fiatjaf 9y agoGreat interface.
- vanderZwan 9y agoVery cool, I like the simplicity of it. The Fibonacci example makes me wonder if it would make more sense to make the interface expand down instead of up, since that matches the reading direction of Lisp syntax more. Also, could we "remix" this to work for concatenative languages? That is, postfix notation. So something like Forth, Joy or Kitten?
- hcs 9y agoThanks! A big part of the idea is representing data flow, I don't think that makes as much sense with a concatenative language where things are irregularly moving on and off the stack. You'd have to show the relation of words to the stack, somehow, or rework it to be centered around control flow. I have only a passing knowledge of Forth, though, more modern concatenative languages might have a different texture. I did, however, take the RPN approach, which is why operations appear after/below their operands, which has always seemed more natural to me.
- vanderZwan 9y ago> I did, however, take the RPN approach Hah! I feel dumb for not noticing this now :) Regarding concatenative languages, for most words you how many elements of the stack it consumes and then drops back on the stack, so those should be easy. You're right that when that varies things get complicated. Not sure how to address that - perhaps manual annotations? But would it still be worth it then? I suspect something like Joy[0] or Cat[1] would be easier to handle though, being a more predictable, functional language. Kitten[2], while a lot cooler and the only one still being actively developed, requires type annotations, so would probably a pain to write out. BTW, sticking to the topic of programming language input (even though this interface is more general than that) if you add some kind of support for often and recently used keywords (kind of like the predictions in mobile soft-keyboards) that could save a lot of typing too! Maybe have a top three of both, one on the left, the other on the right. [0] https://en.wikipedia.org/wiki/Joy_(programming_language) https://en.wikipedia.org/wiki/Joy_(programming_language) [1] https://web.archive.org/web/20120723021444/http://www.cat-language.com https://web.archive.org/web/20120723021444/http://www.cat-la... [2] http://kittenlang.org/ http://kittenlang.org/
- beastcoast 9y agoThe demo doesn't work on iOS. Otherwise looks cool!
- hcs 9y agoSorry about that, it works OK on my iPad and in the iOS simulator, if you want to help me debug your system drop me a line!