News for hackers. Stuff that matters.
Re:Ask HN: Why isn’t visual programming a bigger thing? by adrianN on Thursday May 21, 2020 @03:22AM (#23255697)
Could you go into detail why you think that a hypergraph is needed? I think every program can be represented by a directed graph of basic blocks.
Re:Ask HN: Why isn’t visual programming a bigger thing? by Ace17 on Thursday May 21, 2020 @04:15AM (#23255983)
First-order functions maybe?

The following function has an obvious visual representation as a processing block:

    int add(int a, int b);
But how do you represent a function allowing other functions in its signature, e.g:

    void transformInPlace(int* input, int (*func)(int));
Re:Ask HN: Why isn’t visual programming a bigger thing? by negentropicdev on Friday May 22, 2020 @02:27AM (#23269211)
In LabVIEW I wire in a reference to a VI that provides the functionality or I use a design similar to the command pattern where there's an override method and I specify the class instance as the argument. Depends on the granularity of the design needed and how many different classes I want to define (usually not that many).
Re:Ask HN: Why isn’t visual programming a bigger thing? by adrianN on Thursday May 21, 2020 @04:22AM (#23256033)
The same way the processor does. The function argument becomes a pointer you jump to when you want to call the function.
Re:Ask HN: Why isn’t visual programming a bigger thing? by wrnr on Thursday May 21, 2020 @04:00AM (#23255896)
I don't think you are wrong about the DAGs, though in programming language parlance they are called abstract syntax trees (AST). Sure you can do like Scratch, which is basically an AST editor instead of a code editor. Not a bad idea in of itself, but what if you start writing those basic blocks in your language of choice? Keep looking up the function definition in your IDE and at some point you end at some assembly with long jumps all over the place.

The point I wanted to make was that no matter what design choice you make as a language author, to make this DAG/AST as palatable for the end user, be it with a imperative, functional, logic or concatenive style of programming, a price is aways payed, in terms of complexity at some level (time, space, ergonomics), no matter what you do.

Re:Ask HN: Why isn’t visual programming a bigger thing? by adrianN on Thursday May 21, 2020 @04:21AM (#23256026)
I'm not thinking of the AST, but of a graph of https://en.wikipedia.org/wiki/Basic_block
Re:Ask HN: Why isn’t visual programming a bigger thing? by gridlockd on Thursday May 21, 2020 @04:22AM (#23256031)
You didn't answer the question. ASTs are not DAGs, they are just trees. They also do not represent the computation, but the language syntax.

Many visual programming languages are based around DAGs and they do represent the computation itself. The edges are usually not nodes either, so those DAGs are not hypergraphs.