Skip to content(if available)orjump to list(if available)

Recto – A Truly 2D Language

Recto – A Truly 2D Language

61 comments

·August 12, 2025

quuxplusone

Upvoted for the likelihood of producing interesting conversations on HN. But fundamentally this Recto language looks 1D, not 2D. As IsTom said below, it looks like "braces/parens with extra steps."

If there were any actual "in-game effect" of the rectangles — e.g. a "rotate rectangle" primitive that would change the order in which atoms were evaluated; or some meaning given to overlapping rectangles as in OgsyedIE's comment — then it would be much more interesting, because it would no longer be exactly isomorphic to Lisp/Scheme.

psychoslave

>Virtually all the languages we humans use—spoken, written, or artificial (such as programming languages)—are fundamentally one-dimensional.

Anyone having a look at a musical score can conclude this is wrong.

Even when it comes to spoken language, intonation is conveying a lot, even in languages which are not classified as tonal.

All that said, that's nice to see an exploration of exotic expression form. It doesn't need to down other approach to make shine its own.

mhagiwara

Hi! Author here. You're right that music and speech carry more than just raw symbols such as intonation, pitch, dynamics, etc. all add important information. But in the framework I'm using, both are still fundamentally “1D” because their core structure unfolds sequentially in time: notes in a score, words and phrases in speech. Even when additional features like accent or dynamics are present, they're layered onto a linear stream.

Recto, by contrast, makes two dimensions part of the syntax itself: elements and rects can expand horizontally or vertically, and they can nest recursively. That's the difference I wanted to highlight.

ofalkaed

Western harmony can not be understood in one dimension, it is very much in two dimensions.

impulsivepuppet

I find it quite intriguing to introduce "language-native" matrices and 2d blocks (which I still find difficult to wrap my head around.)

The reason why most people would more intuitively consider a music score as multidimensional has to do with parallelism or concurrency.

In theory, nothing is stopping you from creating a hyperarray language a la BQN++ (or dare I say QRP). Maybe I glossed over an example, but having proper pointwise application to hyperscalars feels like a must-have.

Second idea is to introduce process parallelism, which could actually make this form of syntax into an execution graph of sorts--could be quite promising!

Ferret7446

It's all about semantics and representation. All data is (can be represented as) one dimensional. Musical scores are definitely on the one dimensional side of the spectrum however (e.g., see Lilypond).

gmueckl

Music notation is definitely not one-dimensional because it encodes simultaneous occurrence and simultaneous time-progression of independent pitches (e.g. a sequence of cords played legato).

Ferret7446

And text encodes multiple bits per character. That's a meaningless distinction (or it means as much as you want it to mean in a subjective semantic debate)

efskap

Yet that maps to MIDI, which is a linear sequence of events

almostgotcaught

> musical score

sheet music isn't a language, it's a notation. it's just a concise way to represent a waveform (a song). and it's certainly one dimensional because you either play the song forwards or backwards.

ghssds

>sheet music isn't a language

of course not a language in the same way English or Spanish are languages, but certainly a language in the same way mathematical formula, Lisp, or Java are languages.

>certainly one dimensional

The X axis represent time and the Y axis represent pitch. Moreover, you can have multiple pitches at the same time. I'm not a musician nor a geometrician but it does seems 2D to me, in a way regular text is not.

almostgotcaught

> of course not a language in the same way English or Spanish are languages, but certainly a language in the same way mathematical formula, Lisp, or Java are languages.

It is mostly certainly not - the defining feature of all languages (human, formal, mathematical, programming) is that you can define new words/concepts/primitives. Sheet music is notation.

mpalmer

"Virtually all" about covers it, though.

jacksonslipock

The author and his family are in the middle of a harrowing battle with cancer. Here are links to his go fund me and caringbridge: https://gofund.me/19bb7ee3 https://www.caringbridge.org/site/b0895f78-5320-39d6-96ad-8b...

joshmarinacci

I love this concept but I feel it is hamstrung by the need to write it using a text editor. If the rectangles were defined by actual graphical shapes it would be a lot easier to read and understand.

Also I wonder if positional parameters would need to be replaced by named arguments.

xigoi

Having only the corners marked out with weird markers makes it hard to visualize the rectangles. It would be nicer to have the entire rectangle laid out of Unicode box drawing characters.

abraxas

I consider Unreal Blueprints to be essentially a 2D language with the data flow and the execution flow modelled in separate dimensions.

dkersten

Max/MSP actually kinda encodes this into the language too: when all else is equal (eg if you connect the same data output to the input of two print nodes), nodes on the left happen before nodes on the right (normal input/output connections go from top to bottom in Max, unlike Blueprints and most others where its left to right).

flyinghamster

I'm guessing the author doesn't speak Spanish. :)

gus_massa

At least here in Argentina you can say "recto" with a straigh face everywhere. And it means straigh or perpendicular.

The other meaning of "recto" is used only in medical literature or in mean jokes where you pretend to talk seriously.

I worked with teachers of other countries of Latam, sometimes in geometry problems for children. For example, it's usual "ángulo recto". I don't have it in my list of taboo or problematic words.

For example a kite-like cuadrilateral has a different names in each country, none in offensive, but you must be very cautios to ensure everyone understand the same meaning.

Also, ur kids dont understand am/pm that is usual in other countries. To avoid problems everything must be between 1:01 and 11:59.

f1shy

Seems from japan. I often see names from japan to be Spanish words that often are not the best. e.g. verso (can be a poetry verse, but also in some countries a cheap lie), pajero (a car that can drive over hay, but in some countries wanker)

mlajtos

I thought the name was intentional. :)

anthk

The other geometrical meaning :)

nymiro

My thoughts exactly lol

explodes

Amazing. I love how heptopods have a role in this. Best of luck to you and your family.

IsTom

Isn't this just braces/parens with extra steps?

fnordlord

I started to think the same thing when it got down to the for-loop example. Is Python 2-d because it uses indentation for blocks?

kkkqkqkqkqlqlql

Everything is just braces/parens with extra steps.

recursive

Not befunge

rickcarlino

Has this paradigm been explored as a basis for visual programming languages? It seems like it could do a better job of handling the “density” of a program, which is often a problem in VPLs.

manugo4

Not the best name, as a spaniard

apgwoz

In the very early 2000s, a coworker of mine, who was frequently banned from the Something Awful forums, shared with me a language, which I think was called “Path”, that was 2D. IIRC, execution of code followed a textual path through the file. I seem to remember it being sort of like a 2D brainfuck. You essentially drew a map to compute.

When I look at Orca (https://100r.co/site/orca.html) I’m reminded of it, but it was definitely unique. Anyone happen to remember / have a link to a successor?

archargelod

A very simple query "PATH programming language" with SearXNG returns [1]. I think it matches your description perfectly.

> 2003

> PATH is a programming language that is similar to Brainfuck. This intuitive language requires a simple grasp of two dimensional space, one requirement that almost no other programming languages have.

[1] https://sourceforge.net/projects/path/

[2] https://pathlang.sourceforge.net/