

Needle: ASCII-fied arrow notation - lelf
http://scrambledeggsontoast.github.io/2014/09/28/needle-announce/

======
zokier
Somehow I'm reminded of "Multi-Dimensional Analog Literals" project for C++:

    
    
          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.xhtml](http://www.eelis.net/C++/analogliterals.xhtml)

------
al2o3cr
"Hopefully this is a lot clearer."

Really 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.

~~~
jberryman
> Really hope that was a joke, because the immediately preceding mishmash of
> ASCII art is pretty much the OPPOSITE of clearer.

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.

~~~
jrochkind1
I thought it was a joke, and a cool hack, but not actually intended for real
use. But I wasn't sure, and came here to post "So... is this a joke?"

------
anigbrowl
_Tunnels can overlay each other. The following arrow swaps the outer two
elements of a 3-tuple._

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.

------
thu
There was a thread on /r/haskell with 116 comments. In particular there were
alternative Unicode character sets that made the rendering clearer.

[http://www.reddit.com/r/haskell/comments/2hpzpu/announcing_n...](http://www.reddit.com/r/haskell/comments/2hpzpu/announcing_needle_asciified_arrow_notation/)

------
chrisBob
Anyone who likes this notation should look into Labview. It is a visual
language where you draw the network the data will follow, and is in use in a
lot of university labs. There are even companies that sell equipment
programmed this way. People who have done much programming usually hate it,
but you can get non-programmers to build the interface for a scanning confocal
microscope this way and expect it to actually work in a few weeks.

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.

~~~
HCIdivision17
My college roommate made the observation that "Everything is equally hard to
do in LabView." He was a physicist and generalizing, but it holds up nicely.
You can either sum up and divide a few numbers, or automatically collect data
from a sensor every five seconds and store to an Excel file with about the
same difficulty.

I both adore and hate the language for that weirdness.

------
CGamesPlay
The concept is very interesting, but I feel like building actual software with
this would be better-implemented not with a 1-dimensional text stream, but
with a 3-dimensional VR environment, moving wires and such between tangible
machines. Redstone programming in Minecraft comes to mind.

------
petercooper
This is clever, whatever the intent. Are there any truly visual programming
environments that are functionally based in this way? I don't think ASCII is
the right venue for this sort of idea, but such ideas must have been tried
before for functional languages.

------
nijiko
I cannot even...

It's like 10 times harder to read.

------
RubyPinch
it seems like something that would be good for visualizing/gui editing, then
unicode could be supported easily and the parsing troubles wouldn't be so bad

