Live data from Hacker News

Unit: A visual programming system [video]

youtube.com

11–20 of 41 posts

Re: Unit: A visual programming system [video]

#11

This is awesome! I have been working on a similar tool. My focus has been keeping as much as possible in a single binary (benefits of using go) so that local development and deployment to production is super easy. It can orchestrate different grpc methods together which is pretty neat. I have been digging using the Protobuf type system to express the data transfer between nodes.

What are you using for the GUI parts?

Re: Unit: A visual programming system [video]

#12
Thanks for sharing. Definitely interesting!

I have a number of thoughts on this area.

* We need Graph paging: Nodal editors have too much data to present for large systems. Navigating/panning/scrolling a large screen of data is painful. I started writing a C parser (completely incomplete) with the desire to render simple diagrams for the Postgres codebase. But you know that the diagram would be too large to present every method and its relationship, so you need to paginate the graph. I was thinking of paging each method at a time.

* We can render graphs that are incomplete and additive, we can render a grid of graphs like tiles each all live and interactable separate graphs but also subsets of the available data. It's okay to present the same node again, with different children or connections.

* I've been playing around with what I call "movement programming" which is the idea we step through state of memory step-by-step and grab data to be fed into operators or functions, this generates the instruction (inferred) and the next state is displayed. The goal is that btrees and quicksort could be implemented with point and click. We visualise context on the screen at all times, which are local variables and contextual data.

Re: Unit: A visual programming system [video]

#13
post #8

Earlier quoted context omitted.

We never quite lost it, just the startup SV culture lost sight of them, https://www.embarcadero.com/products/delphi https://dotnet.microsoft.com/en-us/ https://www.outsystems.com/ Or in the game industry, https://docs.unrealengine.com/5.2/en-US/blueprints-visual-sc...

Delphi yes but moving to enterprise costing models lost the market. .Net no they lost because .NET ios not as easy as VB6 - VB6 is more like a GUI shell language linking controls together. Easy to quickly do something but if you need more detail then not a good language you have to write the controls and that requires another language. .Net threw that ease away, if you are at the level of wanting to alter controls th…

I will argue .NET's Windows Forms is an easier and so much better successor to VB in all aspects. It has even survived through the .NET Core and .NET era.

Re: Unit: A visual programming system [video]

#14
post #8

Earlier quoted context omitted.

We never quite lost it, just the startup SV culture lost sight of them, https://www.embarcadero.com/products/delphi https://dotnet.microsoft.com/en-us/ https://www.outsystems.com/ Or in the game industry, https://docs.unrealengine.com/5.2/en-US/blueprints-visual-sc...

Delphi yes but moving to enterprise costing models lost the market. .Net no they lost because .NET ios not as easy as VB6 - VB6 is more like a GUI shell language linking controls together. Easy to quickly do something but if you need more detail then not a good language you have to write the controls and that requires another language. .Net threw that ease away, if you are at the level of wanting to alter controls th…

Delphi still has a big enough market to host an yearly conference in Germany, and otherwise there are occasional tracks on .NET/Windows conferences like BASTA.

.NET Forms is definitly as easy as VB6, even more so, because C++ was out of the picture.

VB required delving into VBX (C++), and even VB6 OCX doesn't support everything in COM, meaning some kind of controls also required diving into C++ for VB 6.

Re: Unit: A visual programming system [video]

#18
Interesting, and clearly a lot of work's gone into this (60,000 lines of Typescript), particularly the UI, which is impressive (if, sometimes, over the top). I've been developing a similar system (http://www.fmjlang.co.uk/fmj/tutorials/TOC.html) and it's interesting to note the similarities and differences.

Similarities: code as directed graphs (less obvious in FMJ); can only connect outputs to units of compatible type; if and wait (looping is handled differently); sticky values; sliders. These design decisions are practically forced on you, but are often absent in earlier visual dataflow languages (e.g. Prograph, LabVIEW).

Differences: (1) inputs are named in Unit, ordered in FMJ (though they're named in formulas and edges can be labelled). (2) I experimented with automatic code layout but found this was too slow and not always what I wanted. Well done for getting this to work. (3) FMJ is now fully homoiconic - this maybe isn't a priority for Unit.

The Unit design philosophy is explained in https://github.com/samuelmtimbo/unit/blob/main/src/docs/conc... . This doesn't mention earlier approaches (e.g. the Manchester Dataflow Computer, Prograph) and it seems to be based on vaguely similar ideas developed more recently (Morrison's Flow Based programming; possibly React and similar systems for web development - I'm unfamiliar with these).

I have a number of questions:

(1) How does the type system work? Is it Dependently typed, Hindley-Milner, or something more basic? (FMJ is Hindley-Milner, with dependent typing partially implemented). How are new types be defined?

(2) How is the visual representation stored? One criticism I faced was that people wanted a readable textual representation which would work well with existing version control systems, a problem I have now largely solved.

(3) How are runtime errors handled?

(4) Is recursion supported? (I assume yes, but I didn't see any examples.) What about macros?

(5) What does Unit compile to? (FMJ has an experimental compiler where programs are compiled by running their source without evaluating their inputs, output is Lisp.)

Re: Unit: A visual programming system [video]

#20

This is so eerily similar to a concept I've been thinking about for years. I want to base it off equations not functions though. Bidirectional value propagation. Figuring out how to make that work always stumped me.

I've thought about bidirectional value propagation too, but except for cases where no information is lost (e.g. cons) I'm similarly stumped (e.g. append). I've got bidirectional type propagation working though. There are bidirectional logic gates, e.g. Fredkin gate, but they operate on individual bits.
Post reply on HN