Today's demo is a half-baked snapshot of what a sp...
# two-minute-week
k
Today's demo is a half-baked snapshot of what a spreadsheet for trees might look like: https://archive.org/details/akkartik-2min-2020-07-25 Lately I'm most excited by two ideas: * "Show all the data," as Pane puts it (http://joshuahhh.com/projects/pane) * Embodied instruction pointer, as championed by https://github.com/batman-nair/IRCIS and @ogadaki's https://futureofcoding.slack.com/archives/C0120A3L30R/p1594669872107700 This demo kinda engages with the first. I'm still noodling on how to whether there's a clean way to work in the second.
❤️ 5
👍 1
😎 2
i
It reminds me of mind-mapping software or the Gingko app: https://gingkoapp.com/
👍 2
g
awesome! i really like all these prototypes of like... alternate history of desktop applications. one thing that was a little confusing is that you’re always affecting the objects to the right of your highlighted box, so it took me a second to understand the “create a child” command. i think @Ionuț G. Stan ‘s ginkgo suggestion has an interface that’s slightly easier to understand in terms of what’s changing—i think the cursor moves to children when you create a child
👍 2
k
Good idea! Thank you, I have no idea what I'm doing 🐶
o
I like the idea of creating an horizontal hierarchy. And that it fills all the space (compared to mindmap nodes).
And I also like that prototyping with text force you to go to essential things!
d
@Kartik Agaram - If saving the instruction pointer includes saving the execution state at that point as well, then I think you're talking about continuations. There are multiple ways those can be modeled. The options I'm aware of are: 1. Store and recreate the machine (or VM) state (registers, call stack, etc.) 2. Some abstract representation of execution state (apart from the actual underlying one) that everything you care about saving runs on top of / is evaluated in terms of. (In other words, something like the demo you referred to). 3. Something using coroutines (I don't remember the details) 4. In language where code can be serialized and later parsed and executed at runtime, and the execution context of each function call is reified into an object that can also be saved and restored in like manner, and the language itself (not just the code being written in it) is implemented in Continuation Passing Style (CPS), then the continuation itself can just be serialized and then deserialized and invoked as a function. ... I'm not sure to what a degree that necessarily just translates into "if you are programming in Scheme" (or at least a homoiconic language); but anyway, this is one way to do it.
g
if we’re talking continuations i’m going to insert my compulsive plug for concatenative programming: a continuation is just the state of the stack plus the rest of the tokens in the program. and you could absolutely implement it with a tree instead of a stack
y
This is really cool! I also once designed(but never implemented) a spreadsheet for trees. For the use-cases I was imagining, it felt important that authors have control over the layout(I like how PANE is free-form too)- I'm curious what your thoughts/inklings there are. I'm super intrigued by the notion of having an embodied instruction-pointer in a spreadsheet, I'm rooting for you to figure it out! ObservableHQ kinda does this with their cells, which highlight when the value changes. I wonder if a minimap might be helpful here? https://www.notion.so/Dango-b46c07f3dc224f968c768885abe70e70
❤️ 7
o
@yoshiki I really like Dango. It feels like a good balance between document like presentation and dynamic data injection. I like that a record is inserted and modified in the document but that it can also relate to a database. I also like a lot the way you render the structure (with the light red lines/trees): it is very expressive yet not to much intrusive. It is also a good balance between constraints placement with some bit of freedom in layout (horizontal/vertical). Why didn't you implement it? Do you plan to use some of it in the future? Anyway, it is a good source of inspiration, thanks a lot for sharing! 🙂
y
@ogadaki at the time I didn’t have the skills or the energy to implement it, seemed like it would be a major undertaking(I was operating in a startup/app frame of mind). I remain very interested in the general idea of tree editors like what Kartik is exploring tho.
👍 2
k
@yoshiki That's a compelling argument! That layout matters, and that adjusting opacity is key. Mostly I'm just trying to do something with the extreme constraints I'm forced to operate under at the moment. Thank you for giving me new ideas.
👍 1
c
Nice 🙂 One comment was that I was initially confused that the first box was 'empty' because of all the |||||. I guess you use those to indicate 'current selection'. Maybe you could draw the bounds of the current box with * or something to make it clearer.
👍 1
l
@yoshiki @Kartik Agaram I've been thinking about a related idea. It seems to me you could unify tables and documents using nested arrays. I've been looking at Nial and other APL-family languages. This is Nial nested array ("tree") output:
Copy code
+-+--+----------------------+--+
|1| 2|                     3| 4|
+-+--+----------------------+--+
|5| 6|                     7| 8|
+-+--+----------------------+--+
|9|10|+-+--+------------+--+|12|
| |  ||1| 2|           3| 4||  |
| |  |+-+--+------------+--+|  |
| |  ||5| 6|           7| 8||  |
| |  |+-+--+------------+--+|  |
| |  ||9|10|+-+--+--+--+|12||  |
| |  || |  ||1| 2| 3| 4||  ||  |
| |  || |  |+-+--+--+--+|  ||  |
| |  || |  ||5| 6| 7| 8||  ||  |
| |  || |  |+-+--+--+--+|  ||  |
| |  || |  ||9|10|11|12||  ||  |
| |  || |  |+-+--+--+--+|  ||  |
| |  |+-+--+------------+--+|  |
+-+--+----------------------+--+
```
But while Nial's array manipulation tools abilities are awesome it seems better to make the document/structure editable in place, like a spreadsheet.
❤️ 2
k
That reminds me of Boxer, where boxes could contain other boxes. https://eurologo.web.elte.hu/lectures/dis.htm One of my favorite papers! I'm going to think about this more. I've been noodling lately on 2D notations for postfix languages.
❤️ 1
g
wow! i hadn’t heard of boxer OR nial! both very cool
❤️ 1