
Show HN: A touch interface for tree editing - hcs
https://github.com/hcs64/tiramisu
======
Micoloth
Wow, 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!

~~~
Micoloth
It happens when you take a white square and pull it diagonally to the bottom
right or bottom left

~~~
hcs
Good catch, it shouldn't be possible to drag the white sqaures ("handles") any
direction but up.

------
vanderZwan
Very 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
Thanks!

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
> 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-
la...](https://web.archive.org/web/20120723021444/http://www.cat-language.com)

[2] [http://kittenlang.org/](http://kittenlang.org/)

------
beastcoast
The demo doesn't work on iOS. Otherwise looks cool!

~~~
hcs
Sorry 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!

------
fiatjaf
Great interface.

