You are viewing archived messages.
Go here to search the history.

Ivan Reese 2023-03-01 00:16:02

Thinking about building some visual programming tools after taking a break for a while. One fun idea that popped up: hybrid text + node-wire environment where you can ~wire to the text~ . Like, a word in the text can act as a node. Probably been done somewhere, but I haven't seen it, so I'm kinda jamming on the thought. Like, what if Natto but you exploded the frames, brought some of Bret's Tangle in there, little bit of that style of annotating an image+paragraph by coloring a word the same as a corresponding thing in the image. Constants in the text live-update, etc etc.

Paul Tarvydas 2023-03-01 01:22:33

FWIW - here’s how I think about it... You are programming a MACHINE. Every bit of syntax has to DO something (have a meaning). [The meaning of comments is “to be ignored by the machine”. A lot of other syntactic baubles have that same meaning - e.g. stick people and clouds]. What does it mean to connect a wire to a word? What happens if you connect that same wire to a different word?

Ivan Reese 2023-03-01 01:30:51

One issue I have with comments is that they are monochromatic / monotonous. Not many programming environments let you be expressive with your comments. You can't distinguish a "what" comment from a "why" comment by any means other than verbose writing or pidgin syntax.

I'm big on finding ways for person-to-person expression within a codebase to be a lot richer.

Ivan Reese 2023-03-01 01:35:15

One reason to allow wiring to text would be that it enables a bit more flexibility as you move between a text paradigm and a node paradigm. Like, let's say you have an existing textual codebase written in some traditional language. You want to use a node-based programming tool to expand on that codebase. If the node tool is smart about integrating with text, it can be layered-in atop the existing text — the text can be incorporated as an element within the new graphical node canvas. Wiring directly to text might be a nice way to make that transition feel more.. node-y.

Ivan Reese 2023-03-01 01:36:43

A common alternative is just treating either the nodes or the text as an FFI, or communicating over some network-like abstraction. That's arms-length. It's invisible.

Jason Morris 2023-03-01 01:40:01

I would like to have better tools for annotating code with its relationships to legal text that it models. I don't need there to be a visual line (though it might not hurt), but I do need a convenient way to create an "annotation" which includes disjoint segments of text, where annotations can overlap one another, and can be linked from symbols in the code, so that when I mouse-over the relevant code, the linked sections of text are highlighted, or something. There's a lot of room to improve the way code and text relate to each other. If you could even implement something like that inside Jupyter I think it would be illustrative.

Eli Mellen 2023-03-01 01:53:42

Ivan Reese oh oh oh! I dig this idea a lot! I’ve been playing with a way to allow text/files to exist in relation to one another — at first I thought about doing this through a bespoke editor, but realized I didn’t wanna reinvent that particular wheel — I was aiming someplace between text files…I didn’t care about how they were generated. I care about finding a way to make multiple text files touch and look at each other and reference each other.

My mental model for this is something like the talmud, where you’ve got a core text (maybe your executable program) but then all these layers of commentary around it, in orbit. The commentary is held in place by the core text, but may not actually only be about that core text, it is also in context and talking to other commentaries and other pieces of text that are core to other stuff.

…sorta rabbit hole around “all text is hypertext” and pleading with a tool to let it happen.

Kartik Agaram 2023-03-01 04:15:48

I use 3 different colors for comments, though I hadn't thought to distinguish what from why comments: news.ycombinator.com/item?id=21665105#21665366

Paul Tarvydas 2023-03-01 10:17:21

Agreed: coments suck. The Goal should be to never need to write comments.

FWIW: my solution is to begin with software components. A Component is asynchronous and owns input ports (green circles) and output ports (yellow circles) and may contain other Components or be attached (via the ports and wires) to other Components. My syntax for a Component is a rectangle (as drawn, say, on a physical whiteboard on a wall). Synchronous code cannot be componentized (easily), so I mark synchronous code by putting it into red-coloured rectangles and dropping the red rectangles inside of non-red rectangles (async Components). There are two separable issues - (1) explaining to the machine (aka “computer”) what to do and (2) explaining to other humans why 1 was written the way it was. Frothing aside: operating system processes are simply Greenspun’s 10th Rule bloatware versions of Components. Code libraries are always red-boxed. Lisp 1.5 anonymous functions are less bloatware-y versions of the basic idea. Closures are optimized anonymous functions (optimized along exactly one axis (i.e. the fervent, religious belief that “efficiency” can mean only one thing)). So-called “programming languages” are 1950s IDEs for explaining to stupid machines what to do. Later, these old-fashioned IDEs were given double-duty by conflating the issues of communicating with dumb machines and of communicating with other humans. I find it more fruitful to fully separate these 2 issues, then to drape “syntax” (sugar sprinkles) over the manifestations to provide less-glaring results that cover both issues (syntax, to me is: hybrid diagrams (such as Excalidraw, draw.io, SVG, etc. that encompass text), i.e. text-based programs are but a subset of less-textual programs)

Paul Tarvydas 2023-03-01 10:21:12

[*] meta - ugh I did it again. My comment should have been a thread attached to the original note, but, instead it is a note unto itself. I would normally delete my comment and move it to a thread hung off of the original note, but there are now comments attached to my what-should-have-been-a-comment and I don’t know what to do. This is an example of bad UI design (Slack’s fault). Commenting is mode-ful. Entering the first comment requires a different action than entering subsequent comments.

Lu Wilson 2023-03-01 10:28:38

Ivan Reese I would love to see this!

Tudor Girba 2023-03-02 06:00:10

Ivan Reese You would need a reasonably flexible graphical support for that 🙂

Marcel Weiher 2023-03-03 13:00:36

For a while, NeXT’s gcc supported RTF input files. Fun times….

🕰️ 2023-02-19 09:15:53

...

Kartik Agaram 2023-03-01 07:14:29

Since I built this, my thoughts have been running in the direction of turning it into a full graph editor.

However, all the graphs I want to create also have other constraints. Sometimes I want a sort of activity diagram (plantuml.com/activity-diagram-beta), other times I want some edges always be horizontal and to line up with similar edges.

I've also been thinking about the clunky drawing primitives I chose in akkartik.name/lines.html. Writing text inside shapes doesn't really work, which is like literally the first thing one might want to do with line drawings.

Putting these thoughts together, I've been imagining a 2-level tool with a tray on the left like in Recursive Drawing or Crosscut, where I can draw some primitives into the tool tray and then attach hotkeys to them to compose them into pictures in the main area.

Jared Forsyth 2023-03-03 05:44:35

Hi friends! This is my first time posting in the devlog, but here's today's progress on my structured editor -- autocomplete for object attribute access!

Jack Rusher 2023-03-03 07:27:37

Would love to see a longer demo and read/hear about the plan 🙂

Jared Forsyth 2023-03-03 20:56:03

thanks! yeah I hope to do something like that soon

Jared Forsyth 2023-03-04 04:34:59

trying out "file attachment" as a first-class AST node type