logoalt Hacker News

Towaway69today at 4:11 PM2 repliesview on HN

So the textual representation of the Mona Lisa would actually be more suitable and beautiful?

It's surprising that there is any art at all if 1D textual representation is the ultimate way of representing concepts of the world around us. Incredible really that folks waste their time define colours for such thing as the sunshine.

Oh sorry, of course, you were talking of code - meaning that algorithm concepts are best represented in text? Again, I doubt that very much. Laziness of humans is probably the bigger reason why we're stuck with an inefficient textual representation of higher dimensional concepts.


Replies

jerftoday at 9:16 PM

See: https://news.ycombinator.com/item?id=49051595

Of course, if you're sure that the entire rest of the industry is just lazy, then by all means feel free to join the set of people who have spent vast amounts of time trying to prove out these obviously better ideas. You've got AI now, I'm sure that will make it easier to prove it out. I imagine it can bang together a visual programming language nowadays in a few prompts whereas earlier generations actually had to rather laboriously put one together. You can get right to the part where you actually get to play with the ideas and try to make it fix programming in probably 1% of the time as the efforts that have periodically made HN's front page.

My standard challenge[1] is to make a visual quicksort algorithm that people will generally agree is nicer to read than a textual representation, where the textual representation may include comments (though so can the visual replacement). It's chosen to still not be fundamentally impossible, but to get past the sorts of "look, I can interate on a list and increment each value" demos they tend to come with.

[1]: https://news.ycombinator.com/item?id=25332761

skydhashtoday at 4:28 PM

You're saying that text are 1D, while we're saying that it's not. If it were, we would write text on a long rolling tape. If it were, we would write matrices like this:

  [1 2 3; 4 5 6; 7 8 9]
Instead of

  |1 2 3|
  |4 5 6|
  |7 8 9|
The concept of vertical space to separate blocks of text is important. The concept of physically moving the next chapter to a separate sheets of paper in books is equally important.

In code we split the code into files. Then within the files we arrange the code with lines and indentation. That's all for humans. The computer eagerly throws those away.

ADDENDUM

> meaning that algorithm concepts are best represented in text? Again, I doubt that very much.

One of the (most?) important things that algorithms encode is time. Because an algorithm is a description of a process. The only good representation would have been to snapshot the evolution of state.

But that's wasteful. So instead we have statements and expressions that we assume are atomic. Then we have identifiers for referencing and finally we have procedures and functions to cluster those statements and the associated call/return pattern or the single jump/goto to economize on writing.

So code is at least 2D as operations are described in a line and the lines are arranged by time. But the lines are not linear, instead they are grouped into labelled units and the proper evolution are functions call and jump instructions.

show 3 replies