N oodle
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

UI Concepts

I’ve been thinking a lot about how best to interact with noodle. There’s a lot of temptation to make a vector-graphics-based visualizer, or something with physics like in the [[netx]] python library, or even move away from a readline style commandline program and do a modern TUI like neovim, maybe even in golang.

Interactive Cluster

The current UI is a readline style program at the base. Then when the tree view is displayed, it’s a like a little TUI in the readline. I call it an interactive cluster. It’s just a group of lines that update with keybindings. Ctrl + , , `→`, will let you manipulate the tree view and update the interactive cluster. This breaks with ordinary readline style programs. The interactive cluster style is like when you listen to music with mpv. Each song has a group of lines that update as the song plays. Then when the next song comes on, the previous lines get pushed up as a new cluster appears.

I didn’t want to dive into making a full fledged TUI because I believe I would end up having to make decisions. Interactive cluster just lets me throw as many lines onto the screen as needed. It’s not great for larger numbers of doodles though.

Colour in the Terminal

I’d like noodle to work in monochrome. So I’ll need to make some updates to the tree view. Adjacencies in the current layer will be shown with solid lines. Adjacencies on other layers will be shown with dotted lines.

There is an inherent difficulty here however. The tree structure beyond the first breadth-first layer is difficult to show in a terminal given that the doodles are not cannonically ordered. We want to preserve the current order when rotating the root otherwise it gets really confusing.

How Many Abstraction Layers?

I like to think that less is more in UI. I may be dead wrong about that. I just personally like knowing few things that are widely applicable. So knowing a handful of powerful UIs is preferable. Then again the right tool for the job is hard to beat. When you think about it, it’s a lot like language. You create words and stick to words that fit your context even though there’s a lot of other words.

The terminal has stuck around since the old days of computing in all likelihood because it’s a simple yet powerful abstraction layer. But people find the terminal alienating for good reason. The simplicity can be rather superficial. Even staple terminal programs have multiple abstraction levels from a UI perspective.

Take Neovim for instance. There are multiple “layers” you have to understand to use it:

  • terminal: Sequential character symbols with escapes for newline, colours, cursor motion, etc.
  • vim buffer: Characters are organized into a grid. Colouring accroding to the syntax of the file format. Keys are bound to useful functions for manipulating and changing the text. We can think of the vim modes as existing in this layer too.
  • commandline: Neovim also has a commandline if you type : in normal mode.

Let’s break down noodle in a similar way:

  • terminal: Noodle runs in the terminal.
  • REPL: A promp is displayed
  • interactive cluster: like a mini embedded tui

Obsidian’s plugins give it a lot of layers. Too many IMO.

I’m not sure how flexible I should make the cli. At some point it just makes sense to make another program.

In Personal Computing

  • global context (best if it offers broad interoperability)
  • global context control (e.g. window manager, virtual machines, app picker)
  • isolated virtual environments (best if they align with user use-cases)
  • local context control (user can optimally manipulate the local data for their use-case)

For noodle the glocal context is the terminal.