Array-Programming the Mandelbrot Set
Posted2 months agoActiveabout 2 months ago
jcmorrow.comTechstory
calmpositive
Debate
20/100
Array ProgrammingMandelbrot SetUiua Language
Key topics
Array Programming
Mandelbrot Set
Uiua Language
The post showcases an implementation of the Mandelbrot set using array programming in Uiua, sparking discussion on the benefits and challenges of array programming languages.
Snapshot generated from the HN discussion
Discussion Activity
Moderate engagementFirst comment
5d
Peak period
9
Day 5
Avg / period
3.8
Comment distribution19 data points
Loading chart...
Based on 19 loaded comments
Key moments
- 01Story posted
Nov 6, 2025 at 11:38 PM EST
2 months ago
Step 01 - 02First comment
Nov 11, 2025 at 12:25 PM EST
5d after posting
Step 02 - 03Peak activity
9 comments in Day 5
Hottest window of the conversation
Step 03 - 04Latest activity
Nov 16, 2025 at 10:02 PM EST
about 2 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45843600Type: storyLast synced: 11/20/2025, 7:35:46 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
"Uiua" is pronounced like "oo-ee-oo-ah", with the sounds flowing together. The "u" sound is like in "boo," and the "i" sound is like in "see," while the final "ua" is a combination of the "oo" sound and the "ah" sound.
It is by far the easiest way to learn an array based language; thanks largely to the web based “Pad” and the clever text to symbol way of writing the code. Do some of the tutorial stuff, it’s fun and all inline on the web. Works great on mobile! Think of it like sudoku, but for programming. You can do real stuff with it also, but for me it’s just for fun.
Btw, here's the identity matrix of size 3:
˙⊞=⇡3
(It takes the range [0,1,2] then outerproducts it with itself through equality.)
- The "array"-ish solution to a problem is usually a very data-oriented solution. Even if you aren't working in an array-oriented language (and just to be clear, I'm not advocating that people write production code in array languages), "thinking in arrays" helps me come up with more elegant solutions.
- Learning array programming is a little like learning to program all over again. If you really enjoyed the process of learning to program, it lights up those same brain circuits, which I found really enjoyable.
- If you ever want to do any graphics programming the mental model can be very helpful. Array programming really helped me wrap my mind around how shader programs are executed.
Uiua is little unique in that it is also a stack-based language, so learning both paradigms at the same time can definitely be a little challenging, but I think it's well worth it.
> The advantage of array languages in my experience has always been their immediacy.
They seem to have a lot in common with regexes in that regard. Super useful for interactive use cases in editors, search engines, etc. But if you find yourself saving a regex it's at least code smell and probably a red flag.
Some of the array language people seem to think it's sane to write an entire program in regex-lang, which is less red flag and more red banner flying through the sky.
I've never found it hard to come back to reading K after long absences, in no small part because the set of primitives in K is a small fraction of the set in J (or uiua) and the notation, while terse, is more suggestive and legible to me than J's emphasis on digraphs and forks, or the "unicode-soup" of mismatched characters that some modern APL descendants reach for. K is an equally excellent notation for experimenting in a REPL or discussing ideas on a whiteboard.
Edit: I just realized that you are the creator of https://beyondloom.com/tools/specialk.html and https://beyondloom.com/decker/index.html. I just want to say that your work is awesome! I've really enjoyed reading through your website many a time.
oK is a slow browser-based FOSS implementation of k6, with fun bells and whistles like "iKe", a visual livecoding environment. ngn/k and oK have diverged a bit, but are largely similar: https://github.com/JohnEarnest/ok
Q is a K-derived language built into kdb+; this is probably the most commercially viable dialect to learn, with the best educational materials (I recommend Nick Psaris' Q Tips), but it is proprietary, with (last I checked) free licenses available for personal use.
If you've seen Decker you may also have been exposed to Lil, which is similar in many ways to Q. It is more verbose and less expressive than Q or K, but I've generally heard people say they find it comparatively accessible: http://beyondloom.com/tools/trylil.html
Feels like the same would be true for the array languages. Obviously code golfing it all down to be an array manipulation is going to be unreadable. But if you are legit doing manipulations on an array of data, probably going to be pretty hairy in the expanded version, as well. I can see wins from not necessarily naming every intermediate part of the process.
My experience is with APL, but I think it is capable of producing some of the most readable and maintainable codebases out there. I've worked for years in various projects using Python, Java, C, Scheme, and a smattering of many other languages. However, it's really hard to overstate the clarity that comes from data-oriented design and dogged elimination of API boundaries.
It just takes a long time to learn to write good software in good APL style. In many ways all the in vogue best practices these days around declarative and functional programming tend to work antithetically to writing good array code. This means that the learning curve for experienced programmers is, perhaps paradoxically, higher than that of a totally naive beginning coder.
I really wish I knew some way to directly convey the experience of working with APL at a high level. There's really nothing else much like it.
Cool! Do you have any public examples to point to? I would be curious to see how a larger project looks, given that I only use array languages for side projects, so my code is often not very legible (e.g. https://github.com/jcmorrow/advent_of_code/blob/master/day_2...).
That said, it's specifically written for an audience that is familiar with YAML detail in particular, parsing more generally, and of course APL expressions of ideas. In fact, that is a big part of what makes the code readable and maintainable: it is optimized for communicating to the expert worker not for on-boarding new developers. The latter is more appropriately handled via other means IMHO.
The poster child for this style of APL is Co-dfns[0]. It's a production APL compiler and a much larger example of the code I'm talking about. The entrypoint to read is cmp/PS.apl.
If you're interested, I'm willing to have a chat and talk more about what makes this kind of APL imminently workable, in which case there are also some personal private examples I could share as well. Feel free to reach out to the contact info on my profile here.
[0]:https://github.com/xelxebar/dayaml/blob/master/Y.apln.
[1]:https://github.com/Co-dfns/Co-dfns
seems like it wasn't array-combinator codegolfed enough
2 more comments available on Hacker News