What is the state of the art in graphical (nodes a...
# thinking-together
m
What is the state of the art in graphical (nodes and edges) programming? Anything general purpose? Or is this limited to a few domains?
i
I'm working on a project in this area. It's ostensibly general purpose, but it's best at a few domains (animation and music). I've also put together this collection that you may find helpful: ivanish.ca/codex
I'd say Max/MSP is the current torch bearer. A recent project called Nodes had some great design thinking invested in it: http://nodes.io/story/#how-do-i-get-nodes
Luna got a fair amount of buzz when they announced their project, but they've gone quiet since then. I found their beta unusable, but I'm holding out hope that they eventually reach their goal. https://luna-lang.org
The unfortunate norm for visual programming languages is what I'd call insincerely graphical. They take traditional code pieces, wrap them in boxes, and draw S-curves between the boxes. There are no tools added that leverage the visual medium. So I'd say any visual language that advances the state of the art needs to do something more with visual communication. The Nodes folks I linked to above seem to be on the same page — they're giving much thought to deepening communication. (Paging @Nick Nikolov). My project (Hest) is coming at the problem from the other side — it is an art tool, which imbues the visual primitives (the points and edges of 2d vectors or 3d polygons) with computational purpose.
👍 3
d
✋🏻 Working on Flowcode here. Very early stage, so there isn’t much there yet in terms of documentation, intros, blog posts, but a working prototype is available at flowcode.kwaia.com.
👍 3
y
@Ivan Reese "_insincerely graphical"_ nice!
👍 1
I mentioned reactable elsewhere, it's old hat really, but I think it's way ahead of it's time as a visual dataflow language https://en.wikipedia.org/wiki/Reactable
🍰 1
multi-user, plus proximity, relative orientation is meaningful
I wonder if there is really such a thing as a 'general purpose' language, as any computer language will always have a set of purposes/affordances built into its design. Maybe we mean a low level 'systems language'?
1
d
@tbabb is working on a general purpose node-based visual programming language: https://lynxtool.com/
👍 4
i
Yeah, Lynx looks very interesting. Really good design thinking there.
@yaxu I take "general purpose" to mean something like "readily Turing-complete". It's a statement about capability. Max/MSP isn't fully general purpose because you can't easily do recursion. Reactable is a neat UI, but there's no reprogramability within that UI — it's always a synthesizer, never a JSON parser, can't use it to clone Tetris.
(Good you mentioned Reactable, though. It's exciting and worth appreciating for a lot of reasons, despite not being a general language)
d
@yaxu I take "general purpose" to mean it is used in multiple disparate domains by more than one community. No language is best for all domains. Python is general purpose without being a low-level systems language. There are many domain-specific languages that are Turing-complete, and powerful enough to be used outside their domain, but probably never will be. (Like my language Curv.) Are these languages general purpose? At best they are aspirationally general purpose.
❤️ 2
a
What are the ways (if any) visual languages show recursion? Have any done recursion over time in the FRP sense (precisely defining the future of values in terms of the current value of other values)? Steve's paper is a good illustration of why that's useful: https://2018.splashcon.org/details/rebls-2018-papers/7/Explicitly-Comprehensible-Functional-Reactive-Programming
y
@Doug Moen A fair point but I've seen Max/MSP applied to a range of domains, e.g. analysing EEG data, audio synthesis, mapping sensors to actuators to make live interfaces.. all involving working with signals/data flows, but applied to a variety of domains. I think it's somewhere between domain-specific and general purpose.
Reactable is definitely domain-specific though, agreed @Ivan Reese
I agree with @Doug Moen that Turing completeness (or maybe best to say equivalence, as we don't have infinite storage) can be a bit of a red herring
But then again it's difficult to write patches about patches in Max/MSP, whereas it's quite easy to write scripts about scripts in python
☝️ 1
d
@yaxu it's difficult to write patches about patches in Max/MSP
Reminds me of the previous discussion about "visual" vs "linguistic" thinking. Linguistic thinking emphasizes words, syntax, hierarchy, while visual thinking emphasizes images, shape/texture/colour, spacial relationships, and part/whole relationships. I've thought about how to turn my project Curv from a text based to a visual language, and that's one direction. I also thought about recasting Curv as a term-rewrite system, so that programs can be manipulated as data, so that more of the Curv system can be written in Curv. But that latter idea moves Curv even farther into the realm of linguistic representation. It's challenging to reconcile that with redesigning Curv as a visual language, where 2D layout and spacial relationships are the primary organizing principle, and rich, non-linear visual imagery replaces words as the means of signifying concepts. How does pattern matching work in a visual language?
t
> programs can be manipulated as data > How does pattern matching work in a visual language? In Lynx, all data, including functions, are passed through wires to the call sites that work on them. Basically, it's straight-up functional programming with a loose equivalence between "variables" and "wires". There isn't really a need for pattern matching. Basically it looks like this:
The labels are added for clarity and to show correspondence to the syntactic representation, but the labels aren't semantically meaningful (or required)
d
@tbabb What you show above is good for writing functions over scalar values. Pattern matching is useful for decomposing data structures. Lynx has lists. I assume there is a general N-list constructor: N wires in, 1 wire out. An N-list pattern would be the reverse: 1 wire in, N wires out.
t
@Doug Moen I don't (currently) opt for lisp's homoiconicity approach—
list
is its own data type distinct from expressions (though that's not necessarily set in stone). So there will be natural functions over lists (append, reverse, extract, ...), and functions over functions (map, apply, reduce, ...); and eventually introspection functions on functions, which will probably work like graph-walking ops. But a list/tree/struct/etc. can flow through those wires just as easily as a scalar. In the above diagrams, there are already wires carrying functions to their application sites.
Ops on composite structures:
r
@Doug Moen @Adriaan Leijnse There are a number of visual languages based on Haskell that represent recursive functions and pattern matching: Visual Haskell (chapter four of https://ptolemy.berkeley.edu/~johnr/papers/pdf/thesis.pdf), Viskell (https://github.com/viskell/viskell/blob/master/viskell-nlfpday.pdf), and Glance (https://github.com/rgleichman/glance). Glance can have recursive unnamed functions (lambdas), I'm not sure if that's possible in the other visual languages.
a
Thanks for the suggestions @Robbie Gleichman!