Live data from Hacker News

Why Don't We Have a General-Purpose Tree Editor? (2014)

pcmonk.me

131–140 of 222 posts

Re: Why Don't We Have a General-Purpose Tree Editor? (2014)

#131
I have a startup called Wizely, which is a social wisdom network. The iOS (phone) app (in development) will have a tree editor. I'm also developing a tablet version that would be bigger and more "touch-friendly". A full browser/desktop version isn't in the works, but if things roll out according to plan, it would be an important addition to our process.

Re: Why Don't We Have a General-Purpose Tree Editor? (2014)

#132
We do, it's called "the file system". Folders and directories galore. If you dont like folder icons and rectangular windows, navigate with MC.

The problem is not trees, they are readily available in many formats. The problem is schemas. If there are no rules on the branches everything becomes "Old_stuff" or "important_work" or whatever people do to their document folders as the tide turns.

You need trees layered over trees to provide some structure and get that sweet workflow QC. Graph-homomorphisms between trees that is, or slice categories over whatever structure you need to maintain. Trees (or graphs) in semantic/syntactic relationships stacked as high as you can muster. Usually this is presented as a two-layered structure-tree+data-tree system in end user applications, with a fixed semantic tree depending on the domain in application. The trick is finding the balance between end-user configurability of layers n+1 and the required knowledge to design useful structures. People who edit layer 2 should probably be domain experts, and layers 3 and above are best left to programmers and computer scientists. If this was a solved problem, nobody would buy CRUD-software, and a good half of us would be looking for work.

Re: Why Don't We Have a General-Purpose Tree Editor? (2014)

#133

I think it's important to distinguish between "tree-structured data" and "tree-structured UI"; many of the suggestions here and in the article's comments mention s-expressions (or alternatives e.g. using indentation or similar); many others mention diagramming/mindmapping tools. I think the real issue is how disconnected such approaches are from each other: why can't I press a key and have my parenthesised expression…

> Fold/unfold terms/trees (code folding, but for expressions rather than lines)

Emacs can hide/show blocks in Lisp expressions (and others). Install HideShow (https://www.emacswiki.org/emacs/HideShow). I personally never use it, generally the right solution is to refactor (but there might be good use cases too).

> As a more elaborate idea, we could allow plugins to extend the tree/graph structure with "virtual" nodes, e.g. linking names to their definitions, documentation, tests, etc. as if they were code-folded parts of the source code.

Basically, when working from Emacs through Slime, the Common Lisp backend (called Swank) injects such metadata to the runtime objects (source file if a file exists, original code, documentation). You could define your very own properties if you want, like how a particular form should be displayed to the user. What already exists, for example, is a way to define custom indentation rules for macros, which are used on the Emacs side to indent your code as you wish.

Slime also decorates values in the buffer so that they act as "presentation" objects (https://www.common-lisp.net/project/slime/doc/html/Presentat...).

Re: Why Don't We Have a General-Purpose Tree Editor? (2014)

#134
A tree is a pair of a value and a list of trees.

The "list of trees" part is what's constant about trees; the value is what makes it hard. What's a value? A name? A string? A text? Either a text, or a name and a map of strings to strings (simplified HTML)? A General Purpose Tree Editor would have to handle all those cases, and a whole lot more.

Re: Why Don't We Have a General-Purpose Tree Editor? (2014)

#135
post #93

One huge question to ask is why you need an editor specifically for a tree. Do you want a gui, or a format? If you need a gui, you are automatically in domain-specific territory. If you only need a format, maybe you don't need a tree editor at all. Excel is a great tool for making trees; just add a column that names your parent. I used Excel to create a prototype of an event driven animation sequencing engine for a D…

> If you need a gui, you are automatically in domain-specific territory.

The author specifically describes a platform in which domain specific concerns are facilitated by plugins, so I don't see why we are "automatically in domain-specific territory". One could easily envision classes of plugins for drawing nodes and edges (perhaps a canvas DSL), plugins for enforcing the domain's specific rules, etc.

Re: Why Don't We Have a General-Purpose Tree Editor? (2014)

#136

Surprised nobody's mentioned Boxer, or some other boxes-in-boxes representation http://web.media.mit.edu/~mres/papers/boxer.pdf Blockly ( https://developers.google.com/blockly ) is also similar, but I think it's a bit too specific: - Only one type of block is needed, to represent a generic "node" in the tree. Distinctions can be added by plugins, if desired for some particular language. - The idea of "interlocking" c…

It's funny how bad I really want to go to the foobar line and hit Tab (or M-q near it).

Re: Why Don't We Have a General-Purpose Tree Editor? (2014)

#137

See to me the problem is the notion of tree structure itself. Forgive me because I don't know the correct mathematical way to talk about this: a tree is a particular type of network in which nodes can have only one direct parent and thus only share siblings with the descendants of that single parent. What we are really lacking is a good network editor, which would encompass not only trees but also more complex rhizom…

The author does mention such networks (AKA "graphs"), and there's a lot of discussion in the article's comments. Whilst networks/graphs in general are very expressive, they can also be tricky to manage in some situations; e.g. think of a graph containing a cycle: A -> B ^ | | V D How do we handle the order of these nodes and edges, e.g. for display or for serialising/deserialising? If we parse the graph from the text…

What's wrong with (A (B C) C D) ?

For circular structures, you could also have:

    '#1=(A . #1#)
Which is:

     (A A A A A A A ....)

Re: Why Don't We Have a General-Purpose Tree Editor? (2014)

#138
post #62

Little Outliner 2 is pretty good. http://littleoutliner.com/ Made by Dave @ scripting.com

Went to try it out but it requires signing into your twitter account and they get access to: - Update your profile. - Post Tweets for you. That's not cool.

OWL is a nifty fork of Dave Winer's work that stores all data locally and doesn't require a Twitter account.

https://github.com/interstar/OWL

Re: Why Don't We Have a General-Purpose Tree Editor? (2014)

#140
And then there is Gingko[1], a beautiful, keyboard-shortcutted, markdown-enabled tree editor that exports to html, markdown, LaTeX, docx, impress.js, and json.

Gingko provide templates for Timelines, Screenplays, GTD and Academic papers, but I can imagine using it for complex formal proofs — I mostly use it for Microscope[2] and worldbuilding[3].

Right now it doesn't have any programmatic/computing capacity, but Gingko is eminently user friendly, so if Adriano[4] ever implemented a plugin system (or if someone wrote a Gingko-node-crunching chrome extension) I would imagine it to be a very enjoyable interface for editing trees.

1. https://gingkoapp.com/?ref=f32636d1

2. http://www.lamemage.com/microscope/

3. https://www.reddit.com/r/worldbuilding

4. https://twitter.com/adrianoferrari

Disclosure: I don't have any affiliation with Gingko, but that is my referral link. ;)

Post reply on HN