News for hackers. Stuff that matters.
Re:The brain maps out ideas and memories like spaces by breck on Thursday May 13, 2021 @09:01PM (#27149419)
This is why I think 2D and 3D languages are the future (and of course, are a big part of the present and past, just not in traditional programming languages). Human minds are highly evolved to work in 2D and 3D.

Further reading: 1972 - Mark Wells' A Review of Two-Dimensional Programming Languages

https://github.com/breck7/wells/blob/main/wells1972.pdf

Re:The brain maps out ideas and memories like spaces by MrPatan on Friday May 14, 2021 @05:29AM (#27152421)
I think they are already. I don't see a file with code as linear text but as a shape. And several files are the other dimension.

And I think not everybody is like this, though! I think there's a difference between "visual programmers" and "text programmers", and this is what causes the flamewars between people who want to "remove noise" by getting rid of parens, braces and semicolons, and people like me who use them as a sort of "signage".

The real problem is that I bet the "text programmers" also write more, well, normal text, and are overrepresented in blogs, articles, and whatnot. (Even though they're wrong XD)

Re:The brain maps out ideas and memories like spaces by hansvm on Friday May 14, 2021 @11:49AM (#27155529)
> between people who want to "remove noise" by getting rid of parens, braces and semicolons, and people like me who use them as a sort of "signage"

I'm not sure this characterization appropriately divides "text" from "visual" programmers. The argument I usually see for removing symbols is that the general shape and flow of your program should be able to stand on its own and that minutiae like a misplaced semicolon shouldn't be allowed to play tricks on your eyes -- it's not that the visuals are unimportant, but that they _are_ important and that too many extra symbols lead to hard-to-parse visual clutter and more easily facilitate deceptive control flow.

Whether that argument has any merit or not is its own debate of course.

Re:The brain maps out ideas and memories like spaces by Swizec on Thursday May 13, 2021 @09:33PM (#27149639)
A benefit of consistently programming since I was a kid is that a lot of programming, especially code architecture, feels very plastic to me. Not quite visualized in a way I could draw, but sort of using the same circuitry as imagining a 3D model of mechanical engineering.

It’s sort of there in my mind and I can see how things are connected, grab stuff and move it around, etc. Super handy for dealing with systems complexity

Re:The brain maps out ideas and memories like spaces by psalminen on Friday May 14, 2021 @01:59AM (#27151201)
I thought developing these mantal maps was fairly common? Or maybe it's just me.
Re:The brain maps out ideas and memories like spaces by king_magic on Friday May 14, 2021 @07:31AM (#27153089)
I think it is common for many of us here, but I do think that the inability to construct these kinds of mental maps and manipulate them in one’s mind is one of the reasons that not everyone can code.
Re:The brain maps out ideas and memories like spaces by beaconstudios on Friday May 14, 2021 @06:00AM (#27152591)
yeah I'm not sure if I could work effectively if I wasn't imagining a list interface like an actual list, a hashmap like a pigeonhole cabinet etc. Not literally in the sense of imagining those physical manifestations, but in the sense of relating to objects by their metaphorical interface.
Re:The brain maps out ideas and memories like spaces by robotresearcher on Thursday May 13, 2021 @09:53PM (#27149756)
Spreadsheets are a specialized spatial DSL. They are phenomenally successful, and have been around for more than 40 years.
Re:The brain maps out ideas and memories like spaces by keithalewis on Friday May 14, 2021 @12:27AM (#27150687)
A purely function language people can understand and use to solve problems they find important without dealing with their IT department. What a subversive notion!
Re:The brain maps out ideas and memories like spaces by 11235813213455 on Friday May 14, 2021 @02:33AM (#27151388)
Spreadsheets look 3-dimendional to me, but the first 2 dimensions are just about data (rows/columns), the 3rd dimension is the language itself (cell value), even though you can specify data ranges in the cell value, the language still looks 1D to me
Re:The brain maps out ideas and memories like spaces by breck on Thursday May 13, 2021 @09:55PM (#27149763)
Yup. The most successful PL by pretty much 2 OOMs (1B spreadsheet users vs 20M JS programmers). I think the future will be the best ideas from traditional 1D programming languages merged into a spatial hybrid like spreadsheets.
Re:The brain maps out ideas and memories like spaces by enchiridion on Friday May 14, 2021 @01:39AM (#27151105)
Seems like notebook programming is a trend in this directing.
Re:The brain maps out ideas and memories like spaces by nexuist on Thursday May 13, 2021 @09:09PM (#27149460)
Oh man I'm excited to read the replies to this thread. I'm working on my own 2D language right now as a layer above JS. Let me know if you'd be interested to beta test! I have a sense that the programming community at large will reject it at first, but if it helps non-technical people ship it's a win in my book.
Re:The brain maps out ideas and memories like spaces by pugio on Thursday May 13, 2021 @11:14PM (#27150277)
I would love to beta test such a thing. My number one current frustration with programming languages is my inability to represent core language concepts / objects in a 2D space. There's constant overhead mapping from my internal spatial representation of a program to the linear 1D that text provides.

EDIT: Ahh, I see another comments that this is more of a block based no code kind of thing. I'm not looking to replace my program with purely visual constructs, I'm more interested in representing the file, object, and function layout on a 2D space. Nested folders of files seems so limiting when I want to put particular functions next to each other, and grouped over _here_, while another set of functions should be placed over _there_.

I don't think the greatest power comes from doing away with textual code, I would just prefer that the units which compose a program can be organized, described, and related to each other in a richer way.

Re:The brain maps out ideas and memories like spaces by nexuist on Friday May 14, 2021 @01:40AM (#27151114)
For what it's worth, I do plan to support code blocks where you can drop in arbitrary code where you need it, and you can integrate it with the rest of the diagram by defining the input and output types itself. The goal isn't to replace textual programming entirely, but to build an integrated environment where you reach for visual constructs first and drop down into text when necessary.

For your file example, you could have a "File Open" block that takes a filename as input and outputs a "File Reference" datatype, and then wire that reference to various file blocks (File Read / File Seek / File Write / etc) to perform operations on the file. When needed you could wire a reference to an arbitrary code block, perform whatever operations you want on the file using textural programming, and then output the reference to continue putting it through other blocks. Objects (as in JSON objects) could be represented in the same way, twisting and turning throughout your program as they are manipulated. Ditto for databases, file storage (like S3 or hard drives), sensors and their values, etc. As for functions, you'd be able to build your own blocks from existing ones, so you could take a textual function and turn it into a visual block that integrates with the rest of your code.

You could group blocks together in the editor so that they are literally next to each other as you said, but one feature I'm particularly excited about that was inspired by SmallTalk is the Block Search: instead of searching by name, you describe the input and output types of the block, and the editor will search through the global database for any kind of block that matches your description. For example, you could describe a block that takes two strings and outputs one, and you could get a block back like "String Append." For our hypothetical file example, you would just search for blocks that take in File References, and you'd be able to find every block that does anything to a file, including your own.

I know it's hard to imagine, which is why I'm working on building a demo ASAP so I can show and not tell. I saw from your bio that you're interested in STEM edutech so if this doesn't scratch your itch it may still be helpful for students to get started with software a la Scratch! Let me know if you're still interested - no worries if not though!

Re:The brain maps out ideas and memories like spaces by oh_sigh on Thursday May 13, 2021 @09:27PM (#27149596)
Is it better the befunge? If so, how?
Re:The brain maps out ideas and memories like spaces by nexuist on Thursday May 13, 2021 @09:50PM (#27149734)
Befunge is very cool, although a bit difficult to onboard users onto :)

My language is a lot simpler: it uses functional programming principles to transform input to output without storing state. The programmer would place down blocks on the screen and draw lines between them to indicate where they want data to flow. They'd start on the left (input side) and end on the right (output side). The cool benefit of this paradigm is that it's recursive; you can build blocks that contain blocks that contain blocks etc... all of which shuttle and transform data from the left to the right.

The other part of this is that it won't just be a language, I'm planning on building an actual cloud environment where you can click a button to deploy your code onto a REST endpoint, so you can integrate it with your existing websites + scripts + apps.

Re:The brain maps out ideas and memories like spaces by pabs3 on Thursday May 13, 2021 @10:37PM (#27150060)
That sounds a bit like Pure Data but on the web.

https://puredata.info/

Re:The brain maps out ideas and memories like spaces by sdenton4 on Thursday May 13, 2021 @10:15PM (#27149894)
pitch: 'buzz tracker for data transforms.'

https://en.wikipedia.org/wiki/Jeskola_Buzz

(which is admittedly a terrible pitch, unless you're trying to hook an old demo scenester...)

Re:The brain maps out ideas and memories like spaces by LargoLasskhyfv on Friday May 14, 2021 @06:55PM (#27160531)
Hm. You can have that in modern and multiplatform from:

https://warmplace.ru/soft/sunvox/

Re:The brain maps out ideas and memories like spaces by sdenton4 on Saturday May 15, 2021 @01:14AM (#27162604)
Oh, yes, sunvox is great, and probably less obscure than the long defunct buzz tracker at this point in history...
Re:The brain maps out ideas and memories like spaces by nexuist on Thursday May 13, 2021 @10:39PM (#27150075)
My vision is closer to Yahoo Pipes / LabView / GNU Radio, but yeah I think you've got the right idea!
Re:The brain maps out ideas and memories like spaces by loa_in_ on Friday May 14, 2021 @06:41AM (#27152805)
Have a look at NodeRed and VVVV
Re:The brain maps out ideas and memories like spaces by resource0x on Thursday May 13, 2021 @10:34PM (#27150037)
It's not obvious how representing your program in 2D or 3D can help the brain to reconstruct its inner workings in its own version of 2D or 3D, even if it really needs to do this transformation. There might be a subtle difference between a program and a coffee cup.
Re:The brain maps out ideas and memories like spaces by dopidopHN on Friday May 14, 2021 @12:44AM (#27150762)
Program have majors business flow, happy paths, that would be rivers of transformations. Then small affluents attach to it as branches appears.

Not so far fetched but I’m not sure you need a new language to support that. You could press a button and get this view. But I think the idea is to build with always this view on sight ? I have no idea.

Re:The brain maps out ideas and memories like spaces by taeric on Thursday May 13, 2021 @11:20PM (#27150316)
This resonates well! Is there even a reason to think that a single version of a representation is all the brain works with?
Re:The brain maps out ideas and memories like spaces by harperlee on Friday May 14, 2021 @04:02AM (#27151894)
This is why Powerpoint has been so popular, imho. It can lead to information atrocities but a sensible use of layout can provide a lot of information that the brain can parse much more quickly than text, and directly provides a spacial layout for recalling it later as a mental model (for example, if you paint subsequent phases as actual boxes, instead of describing how something follows something).

The idea also rhymes a lot with George Lakoff theory that we build concepts as towers of analogies and metaphors, whose bases are quite instinctive and frequently spacial (high is good, broad space gives you options, etc.)

Re:The brain maps out ideas and memories like spaces by andyxor on Thursday May 13, 2021 @09:41PM (#27149672)
interesting, so 2D would be a "matrix language" somewhat similar to Matlab/Octave?

it would be interesting to evolve a language from 2D or 3D to more abstract, higher dimensional representation of objects and topologies, like the cognitive spaces described in the article which operate on sparse vectors in a multidimensional system of coordinates (aka "grid cells").

i'm wondering if there is a language for defining network topologies like that, having some abstractions for JOIN/LINK operators to form & evolve a network [0] and FIND or FIND_SIMILAR operator for traversing that graph (looking for similar objects or clusters of objects), and something that allows to simulate "small world networks" effects, heuristics and shortcuts we see in real world graphs (including neural connectivity and distributed communication we observe in the brain)

[0] Leslie Valiant, Memorization and Association on a Realistic Neural Model https://web.stanford.edu/class/cs379c/archive/2012/suggested...

Re:The brain maps out ideas and memories like spaces by breck on Thursday May 13, 2021 @09:53PM (#27149755)
> interesting, so 2D would be a "matrix language" somewhat similar to Matlab/Octave?

Not only are the data structures 2D/3D, but the language itself is homoiconic.

I'm thinking of things like 2D+ spreadsheets.

Like this from Alan Kay in 1984 (https://pbs.twimg.com/media/E1UAukcUYAAI9lS?format=png&name=...).

A more recent things along these lines that I worked on: https://www.youtube.com/watch?v=0l2QWH-iV3k

Re:The brain maps out ideas and memories like spaces by dmos62 on Friday May 14, 2021 @05:56AM (#27152573)
Programs are already cyclic trees. It's just that code is a somewhat cumbersome representation. Or rather, it's not a very natural one.

At first I actually thought you meant human languages, which are already 3d to a large extent, because they're full of movement metaphors.

Re:The brain maps out ideas and memories like spaces by isaacimagine on Friday May 14, 2021 @06:38AM (#27152787)
A cyclic tree is a graph, fwiw.
Re:The brain maps out ideas and memories like spaces by dmos62 on Friday May 14, 2021 @06:56AM (#27152895)
A cyclic tree is a cyclic directed graph.
Re:The brain maps out ideas and memories like spaces by tigerBL00D on Friday May 14, 2021 @10:41AM (#27154817)
Is python not sufficiently 2D? You could see it as characters in a grid.
Re:The brain maps out ideas and memories like spaces by breck on Friday May 14, 2021 @12:34PM (#27156202)
It only uses a tiny bit of 2D (the indenting of parent child nodes). Most of it is still 1D (parens, quotes, etc).

Python programs to not copy/paste well into spreadsheets (a simple test for "2Dness").