Hacker News new | past | comments | ask | show | jobs | submit login

Here's how iteration works (http://web.onetel.com/~hibou/fmj/tutorials/Iteration.html):

"Iteration uses two special linked vertices called start+ and repeat+. The start+ vertex has an equal number of inputs and outputs. When a value is received on every input of start+, each value is output on the corresponding output. The repeat+ vertex has the same number of inputs as start+, each of which has the same type. An edge connected to an input on repeat+ really sends its values to the corresponding input on start+.

So repeat+ is just an extension of start+, and has no independent existence. Its inputs can be treated as the inputs of the start+ vertex to which it is linked."

Reading this, I was curious how we disambiguate nests with multiple loops. For example, at http://web.onetel.com/~hibou/fmj/tutorials/DampedHarmonicOsc... the repeat+ on the right is connected to data from both start+ vertices. The types too are the same for both loops. How does the software decide which one to send data to? It must be using some information that isn't visible in the figure.




That's correct. The start+ and repeat+ vertices are linked to each other, so there's no possibility data will be sent to the wrong start+ after it is sent to a repeat+. If you hover over one, the other it's linked to is highlighted.


It seems like there must be some way to indicate that a particular start+/repeat+ pair are connected, even just an edge in a different color seems like it'd be a big help.


Thanks. I decided that layout, along with being able to hover over the vertex to see the one it's connected to would be sufficient, but I'm open-minded and may indicate it some other way as well if it becomes an issue.

Edge colors are a crude indication of data type, e.g. Lists are red whatever their subtype, Booleans are green, and Integers blue.


I've been working on using graphs to model logic as well and it seems like encoding information in color should be avoided. It's tempting, but it doesn't degrade gracefully or scale.

There's no non-arbitrary connection between any of the colors and any of the ideas they represent, so if the user's just going to have to memorize them you might as well use symbols. At least then you can make use of more preexisting memorization and scale to whatever complexity is necessary.

Also, it's hard to predict how colors will be perceived. Between the renderer, the display, and the eye there's an unfair amount of variation. Patterns are better, but they have the same memorization problem as colors.


I took a look at your profile and was intrigued. Check out http://akkartik.name/about and feel free to drop me a line!




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: