@steveruizok
@JungleSilicon
Random idea i’ve had for a while is to wrap perfect arrows in a custom element + resize observer for declarative HTML arrows
This was written about 25 years ago... it's continues to be the prevalent way that user interfaces are built and as argued in this book likely the source of many bugs and edge cases that exist today.
@OrionReedOne
One topology to scrape are any URI fragments on a web page and create arrows between the anchor and the element it’s referencing. Particularly interesting when combined with your web canvas explorations!
Touching up the Xanadu rendering. If the link targets an element with `display: inline` then the associated text will be outlines accordingly. Also the entire link is now a single `clip-path` so it should look smoother.
Touching up the Xanadu rendering. If the link targets an element with `display: inline` then the associated text will be outlines accordingly. Also the entire link is now a single `clip-path` so it should look smoother.
What if visual connection could be declaratively expressed in HTML? What if there was a tiny toolkit that enabled all kinds of connection/arrows to be built? What if arrows were not trapped in canvases as they historically have been?
That is what I'm exploring with `quiver`!
"InterState: A Language and Environment for Expressing Interface Behavior" by Oney, Myers, and Brandt (2014)
A live programming environment for defining user interfaces using state machines and data model constraints!
The scope of what I called "perfect-arrow" has changed since I first started working on it! This project is now called `quiver` and it's tagline is:
"Your quiver of declarative arrows for the web. ⤵"
“Achieving Self-Sustainability in Interactive Graphical Programming Systems” by Joel Jakubovic (2024)
Love this framing of finding “notational freedom”!
Attachable arrows have been on web for a while now so on the surface there is nothing that new here. But the key insight is that arrows have been trapped in canvases b/c their auto layout has been tightly coupled to the dragging/resizing events of the elements they attach to.
Let's compare the "noise" of that different textual formats impose on authoring statecharts, particularly JSON, SCXML, and
@StateML_org
's DSL. Here is a comparison between JSON and StateML:
Started prototyping hyperedges with
@OrionReedOne
.
Undirected hyperedges are more or less synonymous with sets. The one below is using rendered using a convex hull algorithm:
I loved these fading scroll animations that
@azlenelza
made in this demo. If both parts of a link aren't on a screen, then they shouldn't be as prominent. I recreated the effect using the new scroll-driven animations coming to browsers soon.
`perfect-arrow` is now on NPM!
🚧 Beware though it's still in active development... expect bugs and breaking changes until it hits 1.0.0.
Check out a demo here:
Just published part one of a series figuring out what "behavioral paradigm for building web UIs" looks like. I walk through a demo exploring patterns that decouple where events originate in the UI from where they are handled by behavior. The patterns are:
This is a custom element that wraps around
@steveruizok
's `perfect-arrow` library and
@samthor
's `viz-observer` library (to observe element movement and resizing).
Early repo here:
1/ Component frameworks like React, Vue, ect. are moving towards aggressively co-locating behavior within components. For new developers, simple apps, and low-level components this is great! Let’s try to unpack where this tends to fall apart and what we should do about it! 🧵
okay I may have just cataloged all of the papers/talks/essays I've posted on twitter over the overs and put them into one repo.
80 papers, 80 links to essays/talks
Added View Transition API to a POC of a potential
@StateML_org
visualizer! Took 10 LOC to add, a little polish on the animations would make this legit.
I guess one of the things I’m exploring is how to leverage the DOM (via custom elements) as MVC widgets, which is close to the original conceptions of MVC/smalltalk.
Would anyone be interested in the story of how statecharts have influenced client-side routing? I’ve been doing some research on it lately, the connection is quite interesting!
Been noodling with
@ncthbrt
on a new primitive for defining routes using tagged template literals! It's composable, requires no regex, encodes/decodes data to/from the route, has great type-inference, and is less than 500 bytes compressed.
Touching up the Xanadu rendering. If the link targets an element with `display: inline` then the associated text will be outlines accordingly. Also the entire link is now a single `clip-path` so it should look smoother.
This diagram gets a little into the weeds. To take a step back, the premise of these explorations is that with the current component paradigm has helped us have a consistent view layer, but we lose an holistic understanding of the system’s behavior.
“You’ve reached computer programming nirvana. Your journey has led you down many paths, including believing that God wrote the universe in LISP, but now the truth is clear in your mind: every problem can be solved by writing one more compiler.”
Noodling on the "Swiss cheese model for software robustness"!
The point is that leveraging varying forms of static analysis and formal methods prevents the existence of entire classes of bugs before you start testing.
Brewing an idea for a blogpost on Statechart Driven Development.
The problem:
1. Task estimation is broken
2. User stories are brittle and hard to change
3. Discovery/refinement of implicit states must be a first-class part of any project
Perf testing arrows ⤵️
JS execution time and memory consumption is surprisingly okay for this type of "observer an element move". Plus there's already a lot of low-hanging fruit to optimize 🍊
Extended
@tobyshooters
self-modifying html page using the File System Access API and IndexDB. Once a save file is chosen we persist the file handler across sessions. (it only works in chromium browsers atm, but it can be progressively enhanced)
A first attempt—a self-modifying html page with inlined base64 images. Since it's just raw html, MacOS is able to preview it with quicklook. Since the images are base64, it's all contained in a single file.
One of the last parts of this conversation was how visual programming representations can best make use of 2D space. To me, this is broadly one of the unresolved problems in the space. I don't think or want a strict framework, but I can see some broad guidelines going a long way.
In this part we discuss: paradigm shifts in programming tools, the viability of visual programming for general purpose programming, …usability possibilities that have not been explored for visual programming systems…”
I want to see a community re-emerge around little languages. Mainly, how can we make it easier to build small, multi-modal notations that embody a specific paradigm? With a focus on notations that can executed across many computing environments and be composed with each other.
A lightning talk by
@chrisshank23
Towards a topological interchange format for executable notations, hypertext, and spatial canvases:
a vision of an interchange format rooted in describing topological relationships
An *intention* is a semantically meaningful description of a raw user event. Declaratively mapping raw events to intentions in HTML and using event delegation opens up new tradeoffs for component and application architectures. Here is a simple example:
Oh wow CSS `attr()` will eventually be able to be used on any css property 👀
```html
<div length="5"></div>
<style>
div {
width: attr(length em, 0px);
}
</style>
```
Fun fact, we can use event delegation with custom elements without having to deal with cleaning up event listeners or dealing with memory leaks using this pattern:
What other types of arrows/connection would you be interested to see? ⤵️
These are already in the works:
- Curved Arrows
- Orthogonal Edges
- Xanadu Links
- Hyperedges
@chrisshank23
If you’re taking requests I’ve been thinking about a “HyperArrow” which is a (directed or undirected) hyperedge, 1-N in, 1-N out…
Wondering what the generic approach to this is without lots of complex routing logic…
One *possible* convergent evolution between biology and software is selective message-passing. Particularly the parallels between cells and communicating state machines!
If you want to use statecharts as a tool to reveal complexity then I highly recommend naming/externalizing actions, guards, ect. The point is to *ease* into implementing behavior not trying comprehend all of the behavior at once.
Built a tiny router on top of this new routing primitive.
- 1.3kb compressed (I haven't started to code golf yet 😈)
- 100% type-safe
- Isomorphic (supports SSR)
- Decoupled from any particular component framework or state mangamgent library
- URLs are opaque
@sliminality
To me what differentiates statecharts is that it is both a *visual* mental model and a data structure. As a mental model they make you draw a map of your logic as opposed to handwritten directions. It fundamentally inverts how we usually build out UIs.
I wonder if progressive typography could be used as a proxy for these evergreen ratings?
Seedling -> scribbly notes
Budding -> default markdown style
Evergreen -> beautifully set and illustrated like “Timeful Texts” ()
Despite popularising the horticultural metaphor of Seedling > Budding > Evergreen ratings on digital garden notes, I wish there were other varieties out there.
Baking and carpentry metaphors would work just as well. Notes could be raw, half-baked, or roasted.
Been thinking about how programming languages are higher-dimensional entities and their textual representation is a 2D projection. 🤔 Maybe a visual metaphor for this is anamorphic art! 🎨
Just published part one of a series figuring out what "behavioral paradigm for building web UIs" looks like. I walk through a demo exploring patterns that decouple where events originate in the UI from where they are handled by behavior. The patterns are:
The first principles of these canvas interactions are the ability to define topological relationships (e.g. connectedness) between entities and to annotation those relationships.
Hidden in terminology of statecharts is a metaphor based on chemistry. I've been thinking about how we can expand on this metaphor to better foster understanding of these concepts!
One example that I am working on right now is a web component for an embeddable
@StateML_org
visualizer. If JavaScript is disabled or fails to load, the browser will fallback to rendering the semantic HTML in the slot.
I have been working on a cool side project that is "actorfying" Web APIs so they are easier to integrate into xstate. It's not close to being complete, but I am considering publishing what I have very soon!
A tangent thread is about how spatial canvases come into play. Particularly thinking about
@tldraw
's early vision to provide a platform for other to build spatial canvases...
(Note: I'm not extremely knowledgeable about how spatial canvases are implemented)
One principal I've found helpful is to start by defining topological relationships like connection and containment between different concepts of a VPL. Visual syntax can be derived from those relationships as can textual syntax.