Needle: ASCII-fied arrow notation
scrambledeggsontoast.github.io
scrambledeggsontoast.github.io
assert( ( o-------------o
|L \
| L \
| L \
| o-------------o
| ! !
! ! !
o | !
L | !
L | !
L| !
o-------------o ).volume == ( o-------------o
| !
! !
! !
o-------------o ).area * int(I-------------I) );
http://www.eelis.net/C++/analogliterals.xhtmlReally hope that was a joke, because the immediately preceding mishmash of ASCII art is pretty much the OPPOSITE of clearer.
I'm also imagining the source-code diffs from editing one of these. Yow.
But perhaps that's the idea: make circuitous functions so painful to write that people refactor to smaller ones.
Good luck having your program structure limited by the need to force it into a rectangular 2D grid.
Also rewriting half of your program because one of your tracks changed sounds like huge fun.
The thing is of course that the basic idea of "visually" representing the function graph is extremely fascinating. I just think that a real graphical editor would be better suited for this. Trying to shoehorn it back into a text representation does more damage than good.
could be worse. I remember seeing a method for... visualizing the size of integers in code, '|---------|' being the 1d example, and an ascii square to describe 2d, and I believe a cube would work for 3d (1,2, and 3 integers respectively)
I think it was either ruby or C that it was done in, but I havn't seen it in a long time
Do you really think it's a joke or are you just being nasty? I thought it was quite clear (although perhaps the choices of visual ascii characters could be tweaked a little), and it certainly makes the structure of the circuit more apparent than in the original arrow notation. Obviously this is an experiment, and a quite clever one in my opinion.
I can't tell if this is intentional or not, but it's a prime example of when programmers should Stop Writing Code and use a high-level flow diagramming tool, for the same reason that large projects shouldn't be done in assembler, that chip designers long ago gave up doing layout by hand, and architects use drawings instead of writing out step-by-step instructions. Code is a really terrible medium for defining structural relationships.
Sticking with the architecture metaphor, if you look at the plan for a building it requires skill and effort to understand properly - and for large buildings, a capacity for understanding abstraction - but even to the untrained eye there's a clear isomorphism between the plan and the actual structure. When you first encounter a large body of code it's more like a jigsaw puzzle without the reference picture. There are some standard reference points you can rely on - analogous to identifying edge and corner tiles, and knowing about different conventions of interlocking tiles - but you have to do a good bit of reading before the flow of the program emerges and you get a sense of where most of the computational effort takes place. My mental representation of a program is as a causal network, somewhere between the operation of a clock and a Rube Goldberg machine (probably because I spent a lot of time dismantling clocks as a child); reading code in order to figure out the operational structure often feels to me like closing my eyes and trying to infer the structure of something through my hands.
http://www.reddit.com/r/haskell/comments/2hpzpu/announcing_n...
I have found that it is a horrible way to do easy things[1], but it can be a useful way to put together fairly complicated programs with multiple concurrent pieces and a nice UI.
[1] Hello world is something like find the graphic that creates an integer box and add it to the UI. Then repeat for a second and third number. Find the plus sign and connect the first two with wires as inputs and the third as the output. Change to the UI view and organize everything and add appropriate labels. You now have a display that will show x=a+b. For a programmer that is painful.
I both adore and hate the language for that weirdness.
It's like 10 times harder to read.