Live data from Hacker News

Spatial languages: Writing code in 2D

shukla.io

41–48 of 48 posts

Re: Spatial languages: Writing code in 2D

#42

Earlier quoted context omitted.

> The power of computers is that they can do the tedious part of symbolic manipulations, repeatedly and without failing. And with peripherals interfacing, they can translate symbols from/to reality. Exactly what I am implying: using the computer to provide a better abstraction is what is needed. I agree that text has a certain universality however as you also say, a lot folks don't work with symbols, they work with i…

> Now "Oh but it's not possible to represent those concepts that we work with visually, only text will do" argument doesn't really hold water since it just demonstrates a lack of imagination to find a way to use other representations for those concepts that are essential to programming I did not say that. I said that we do not have good representations of those concepts. The thing is that programming is rarely the en…

> And the genius of the Turing Machine (and equivalent) is that at the foundation of things, you do not need a lot of symbols and a lot of rules.

I think at the core of our arguments lies this. Turing representation, i.e., the Turing Machine is the fundamental computing engine that can represent any problem and provide a solution to that problem, in whatever n-space dimension the problem finds itself in. It is the binary representation of any problem space.

Yet no one uses it to do the real world problem solving. Why? Because its symbolism is to verbose for even the simplest solution.

Herein lies what I have come to realise: its verbosity that a 2D representation can reduce at the expensive of flexibility. As the textual representation is a trade-off, so is the visual one.

Text happens to be extremely flexible for problem representation and solution but it is less verbose than a Turing Machine and based on the self principles, so we can be assured of its universality. Yet textual representation can still become very verbose and hard to understand (hence version control and diff'ing tools).

A 2D solution can be even less verbose at the price of flexibility - a 2D representation is more bound to the problem space being addressed.

I think the win comes when a recognition arises that points to a visual representation as being less verbose and therefore more understandable because the problem space is confined and well understood that there is no longer a need for texts flexibility. This being akin to a DSL definition for the problem space.

Re: Spatial languages: Writing code in 2D

#44

> Cube is a three-dimensional, visual, statically typed, higher-order logic programming language, designed to be used in a virtual-reality-based programming environment. In this paper, we give an informal overview of the language and describe a prototype implementation. https://marc.najork.org/papers/jvlc1996.pdf

I didn't know this paper existed and I'm excited to devour this. I've got my 3D glyph rendering system at glyph3d.dev, and use cases like this help accelerate layout and relationship development immensely. I greatly appreciate your sharing this! Would you happen to have a trove of similar research or papers I could sponge off of you? Or maybe even a few minutes of your time in some chats / emails to discuss how these…

Interesting, I'm relying on Troika (and a-troika-text for AFrame for WebXR) for https://git.benetou.fr/utopiah/text-code-xr-engine

Re: Spatial languages: Writing code in 2D

#45
A use case for unicode bidirectional algorithm[1] at language implimentation level.

(vs. more traditioinal abstraction/logic level planes & normal to plane concepts: apl - hide it all in the language; spreadsheet - hide nothing/any information at any abstraction level is displayable[2][3][4][5]6])

--------------------------------------------------------------------------------

[1] Unicode bidirectinal algorithm : https://www.unicode.org/reports/tr9/

[2] spreadsheet : http://en.wikipedia.org/wiki/Spreadsheet

[3] sc-im - an ncuses spreadsheet program for the terminal: https://news.ycombinator.com/item?id=24318367

[4] Excel as a Turing-complete functional programming environment : https://eusprig.org/wp-content/uploads/2309.00115.pdf

[5] lambda the ultimate excell worksheet function : https://www.microsoft.com/en-us/research/blog/lambda-the-ult...

[6] escher circuits : https://esoteric.codes/blog/escher-circuits-using-vision-to-...

Re: Spatial languages: Writing code in 2D

#46
λ-2D: An Exploration of Drawing as Programming Language, Featuring Ideas from Lambda Calculus [0]

One can use intensional calculus concepts to model non-lambda languages[3]. A live 'CoC'[6] / rocq[7] layer to hightlight/note 'correctness' issues (auotmated suggestion of proof of correctness/unresolved ANTLER freevars take on ast editors 'valid' language statement(s)/language block(s))

ast editor with gui nodes (panograph[1]) / code block with "user shape" construction using 3DILG[2]?

3d bar codes could be taken as a 'multi-statement' token.

Piet[4][5] programming language might be more useful than 3d barcode as langauge token though (condensed spreadsheet).

-----------------------------------------------------

[0] : https://www.media.mit.edu/projects/2d-an-exploration-of-draw...

[1] : https://github.com/jeprinz/pantograph/blob/main/README.md

[2] : https://1zb.github.io/3DILG/

[3] : [video] Beyond Lambda-Calculus: Intensional Computation calculus : https://news.ycombinator.com/item?id=49067361

[4] : piet examples : https://www.dangermouse.net/esoteric/piet/samples.html

[5] : esolang Piet : https://esolangs.org/wiki/Piet

[6] : calculus of constructions : https://en.wikipedia.org/wiki/Calculus_of_constructions

[7] : rocq : https://en.wikipedia.org/wiki/Rocq

Re: Spatial languages: Writing code in 2D

#47

Earlier quoted context omitted.

An image is not a good representation either. Where is heat? Where is size? Where is gravity? Images are useful, but so is text, each in a different way. The nice thing about text is that it encodes a much larger representation of something in only a few. So I can type 'sun' and it's useful enough to get my meaning without me showing you a picture every once in a while. So yes in certain context, a diagram may be mor…

> The power of computers is that they can do the tedious part of symbolic manipulations, repeatedly and without failing. And with peripherals interfacing, they can translate symbols from/to reality. Exactly what I am implying: using the computer to provide a better abstraction is what is needed. I agree that text has a certain universality however as you also say, a lot folks don't work with symbols, they work with i…

Like atlas code?[0]

[0] : https://github.com/gearscrafter/atlas_code

Re: Spatial languages: Writing code in 2D

#48
post #38
post #5

"All this time we’ve been writing expressions in 1D space, but what happens when we unlock an extra dimension?" Text is a serialization of an n-dimensional work space. "N-dimensional" doesn't have a formal definition I'm aware of but the major characteristic of it is that a new dimension can pop up anywhere. If you feel like you want to double-click on that, you can see my earlier comment here: https://news.ycombinat…

Code is natively tree like and hyperbolic. We unfortunately can't embed a 2d hyperbolic space on a computer screen.

Umm.....

Hypertools[0] used to display a 'standard program' mapped to '4d' esolang piet might be interesting. A window of 'text breakout of piet segment' relevant to 'standard programming line' would be sorta like mapping set of assembler to corresponding source code line.

piet whylines : https://www.cs.cmu.edu/~NatProg/whyline.html

[0] : hypertools : https://news.ycombinator.com/item?id=31816024

Post reply on HN