Mariano Guerra
Other languages that inspired this one: APL, Joy, Haskell, Piccola, Nyquist, SuperCollider.
Bill Mill
01/31/2025, 4:20 PMBill Mill
01/31/2025, 4:20 PMAPL and FORTH (from which Joy derives) are both widely derided for being write-only languages. Nevertheless, there has yet to be a language of such concise expressive power as APL or its descendants. APL is powerful not because of its bizarre symbols or syntax, but due to the way it automatically maps operations over arrays and allows iterations at depth within arrays. This means one almost never needs to write a loop or think about operations one-at-a-time. Instead one can think about operations on whole structures.
Konrad Hinsen
02/01/2025, 7:15 PMguitarvydas
02/01/2025, 9:35 PMElement Bridge
02/01/2025, 9:40 PMKonrad Hinsen
02/02/2025, 8:10 AMBill Mill
02/03/2025, 1:47 PMBeni Cherniavsky-Paskin
02/04/2025, 11:12 AMAll my exercises started with "remember: no loops!", and yet, most solutions implemented by the students had at least one explicit loop.There is a duality between per-element vs. aggregate code. `if`<->`filter`, `for`<->`map` etc. But textually and mentally they look pretty different. I'm curious if there are any languages/notations seeking to minimize that gap — to make it easy to see both perspectives? [I think I've asked this before, and I suppose LINQ is a start] 🤔 Part of this gap though is not about element vs. aggregate. It's executable code that can do whatever vs. analyzable code explicitly composed from a core set of patterns. cf. SQL queries that are not simply executed but get analyzed & transformed in a query optimizer. And it's not like C++ loops don't undergo impressive compiler optimizations — but there is some different "feel" to the languages... 🤔 Perhaps the gap is also about dataflow? Patterns like
filter
constrain it significantly; capturing the whole flexibility you have with variables in loops requires something like Haskell's do notation <-> a whole zoo of combinators? Indeed, listening to Array Cast, they keep going on about a gazilion combinators to know. Which, let's face it, is hard to teach 😞
🍰 OK then, are there visual languages that expose this duality?
Node-and-wire promise seeing dataflow directly without having to name all the patterns! It gets interesting with how to present data crossing element/aggregate domains — reductions like max
or sum
, broadcasts of single value into many iterations etc...Konrad Hinsen
02/04/2025, 6:39 PMKonrad Hinsen
02/04/2025, 6:43 PMBeni Cherniavsky-Paskin
02/05/2025, 12:27 PMx
,y
,t
inputs (plus some interactivity like mouse position).
There is no cross-pixel interactions (iiuc; I see there is some statefulness via ! / @ small RAM).
In this limited model though, duality is easy: can read the same per-pixel code as if it's operating on whole images at a time.
E.g. I can formulate mouse xy distance
to produce a radial field around the mouse, then 0.2 <
to apply a threshold producing a circle.
But that's simple forced vectorization; Uiua can express a circle in similar way.Beni Cherniavsky-Paskin
02/05/2025, 12:49 PM