(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=40841980

可视化编程语言有多种类型,具有不同的纯模型和混合模型。 它们的范围从流程图等框线系统,到无线互连的拼图,例如 Snap!、Scratch 和 Nassi-Schneider 图,以及电子表格和元胞自动机等网格系统。 一些可视化编程语言利用线条来描述控制或数据流,而其他语言则混合使用两者。 例如,快照! 是一个基于块的Scheme变体,允许用户操作函数,通过称为lambda表达式的垫片外壳传递它们。 它提供了诸如宏、延续、特殊形式、线程和用户定义的控制结构等功能,所有这些功能都与Scheme中的功能类似。 另一个例子是Max/MSP,主要关注控制和数据流调节的线路。 与众不同的是,Max/MSP 管理单独的速率:模拟刻度和信号处理速度。 模拟滴答声处理同时流动的大量音频样本,而沿其他线路移动的信号较少,以较低的模拟滴答率运行。 在数据流可视化编程语言中,数据输出框一次产生多个输出。 控制流盒生成有限的控制流输出,直到像叉子操作员一样起作用。 这些运算符支持多个控制流输出,支持并发活动。 示例包括 Petri 网。 条件组件、继电器充当选择器,根据给定的选择器输入在输出之间进行选择。 同时,纯数据流网络缺乏单一的程序计数器。 相反,它们根据部分依赖顺序处理节点,通常涉及循环结构并引入反馈延迟。 Body Electric 或 Bounce 等系统具有隐式“启用”输入,用于控制盒子功能,同时存储过去的结果并向后续节点提供锁存信息。 在 Blender 的几何节点中,数据从左到右进行; 然而,节点可以接收函数作为参数,从右到左执行,并相应地修改数据。 通过配置节点传递函数、创建新函数或有条件地应用函数,可以实现复杂的操作。 数据和功能在整个网络中无缝流动,促进数字内容创建软件中的高级创造力。

相关文章

原文


































Right, generally but not necessarily. There are many different kinds of visual programming languages, with vastly different pure and hybrid models, including boxes and lines like flow charts, interlocking puzzle-piece blocks without lines like Snap!, Scratch, and Nassi-Shneiderman diagrams, and grids of adjacent cells like spreadsheets and cellular automata.

https://en.wikipedia.org/wiki/Nassi%E2%80%93Shneiderman_diag...

Some visual programming languages use lines to represent control flow, others use them to represent data flow, and others use a mixture of both. Additionally, different kinds of control and data flow can operate at different frequencies within the same system.

Snap!, which is essentially a visual block based version of Scheme, allows you to pass functions or closures, by wrapping blocks in gray insulating "gaskets" like lambda expressions that delay evaluation, and even supports macros, special forms, continuations, user defined control structures, and threading, just like Scheme.

https://snap.berkeley.edu

Another example is Max/MSP, which primarily uses lines to represent control flow and data flow. However, it also distinguishes between data flow at "simulation tick frequency" and a much higher "signal processing frequency". This means thousands of audio samples can flow along one line at every simulation tick, while only a single piece of data or signal (like a pure data-less control flow "bang") may flow along other lines at a slower simulation tick frequency.

https://en.wikipedia.org/wiki/Max_(software)

In data flow visual programming languages, a data flow box can emit any number of data outputs at once in parallel.

A control flow box typically emits only one control flow output at a time, unless it acts like a "fork" operator. Fork operators, as seen in Petri nets, support concurrent processes by allowing multiple control flow outputs.

https://en.wikipedia.org/wiki/Petri_net

A data flow conditional works like a relay with three inputs (A, B, and Select) and one output. The Select input determines whether A or B is the output.

A control flow conditional, like a traditional flowchart "if", has one or more control flow inputs, a Select data input or embedded expression, and multiple control flow outputs. The Select input or expression chooses which control flow output the "program counter" branches to next.

Pure data flow networks do not have a single explicit "program counter." Instead, they typically evaluate nodes in partial dependency order, which may include loops (introducing a one-cycle feedback delay). Petri nets have multiple concurrent control flow "tokens" that flow between boxes along the lines in parallel.

Another example is Body Electric aka Bounce, which is a data flow visual programming system with relay-like data flow conditionals, but also each box has an implicit "enable" input that you can use to switch it on and off (like a power supply), so when it's turned off, the last calculated outputs are latched and buffered, and can be read by downstream dependencies, but the values are not recalculated during simulation frames when it's not enabled.

https://donhopkins.medium.com/bounce-stuff-8310551a96e3

In Blender geometry nodes, data flows from left to right, while functions can be passed and applied in a way that evaluates right to left against the data flow. That is, functions are passed on the left, but the data is then processed through the function, either once or iteratively.

https://docs.blender.org/manual/en/latest/modeling/geometry_...

New Blender 4.0 Loops!

https://www.youtube.com/watch?v=mr_nQBoJPXw

Functions or operations can be encapsulated within nodes and passed along the data flow. For example, a "Subdivide" node contains a function to subdivide geometry, and this function is applied to the geometry data passed into the node.

Nodes can pass functions as parameters to other nodes. For example, a "Function Input" node can be used to define a custom function that can be passed into another node, such as a "Map Range" node, which applies the function to its input data.

Functions are applied to the data as it flows through the nodes. For example, a "Set Position" node can apply a function that modifies vertex positions based on certain criteria (e.g., noise texture values).

Some nodes, like "Attribute Math" or "Attribute Vector Math," apply mathematical operations to attributes of the geometry, effectively using these operations as functions that transform the data.

Nodes can be configured to apply functions iteratively or conditionally. For example, a "Repeat" node can apply a function multiple times to achieve iterative processing, such as repeated subdivision or transformation.

Conditional nodes, like "Switch" or "Boolean Math," allow functions to be applied based on specific conditions, enabling selective processing of data based on attributes or other criteria.

While data flows left to right, some nodes can evaluate data in a right-to-left manner when applying functions. For instance, a "Function Output" node can send data back up through connected nodes for additional processing before final output.

This evaluation allows for more complex operations where data may need to be processed in multiple stages or cycles.

















































































联系我们 contact @ memedata.com