Paul Tarvydas 2025-01-27 03:09:27 Created yet another diagram-to-json converter in Javascript by asking Claude 3.5 nicely to convert the existing Odin version to Javascript.
Paul Tarvydas 2025-01-30 19:41:01 I got live update messages to work in DPLWB. Draw.io -> choreographer.py -> spawn transpiler -> choreographer.py -> dplwb.html. The transpiler, while working, sends little updates (JSON objects (an array of one object consisting of a pair of strings)) to the choreographer which are immediately sent to dplwb.html. Final result is sent to dplwb.html as an array of JSON objects. Turn-around is "fast enough" (seconds) to be usable in bootstrapping and debugging this stuff more deeply. [DPLWB == Diagrammatic Programming Language WorkBench]
Ivan Reese 2025-02-01 22:35:35 I've been tinkering on a way to handle continuous numeric input. Or, in plainspeak, a knob … that you can turn. But it's, like, good , as far as knobs go. (Fake computer knobs, at least.)
- It does the usual thing… you can drag up-and-down to turn the knob. Classic.
- Oh! You can also drag left and right to turn the knob. That's nice.
- Wait… you can crank in circles around the knob? And that works well too?
- But but but… you can also crank in circles, like, anywhere on the screen!
The goal is "do what I mean" gestural input. Granted, it's currently dumb and could be better, which is why I'm still tinkering on it.
You can play with it here. Code is here.
Tom Larkworthy 2025-02-01 23:04:23 I tried making one once and yeah, its really hard mapping the polar look to mouse. I just did the up or right for +ve and it just seems wrong when its at certain angles. If you do a drag it can be really sensitive to the singularity that exists near the center which is where you naturally start a drag so its pretty interesting you are removing that singularity with a local center of rotation. How are you tracking that?
observablehq.com/@tomlarkworthy/audio-inputs#cell-906
Ivan Reese 2025-02-01 23:11:14 I remember the path that the mouse has moved, take a bounding box of that path, take the center of the box, and use that as the local center of rotation. I also discard older segments of the path, keeping roughly 4pi*r of them, since that's enough to figure out roughly where the local center ought to be.
The logic for switching between modes on the fly (horizontal, vertical, or angular) is a bit dodgy. That's something that could be better, but there are also unavoidable edge cases — like when dragging rightward at the bottom of the circle (which could mean "increase the value" when treating the input as horizontal or "decrease the value" when treating it as angular), so my current approach is just to pick whichever one seems most likely and kinda lock-in on it after a handful of samples.
Paul Tarvydas 2025-02-02 04:48:45 for me on my mac: works on Chrome, doesn't work on Firefox (looks like it's loading forever), doesn't work on Safari (same).
Christopher Shank 2025-02-02 08:03:19 Is this licensed? I have a couple of ideas to riff on this
William Taysom 2025-02-03 07:03:49 Versatile. Interesting contrast to what I usually see in fancy knobs (and sliders) that use the second dimension for tuning. For example, a radial knob where distance from the center decreases the amount of turning that happens. I was just using this in OmniGraffle a second ago to precisely rotate a shape.