HackerTrans
TopNewTrendsCommentsPastAskShowJobs

jcmorrow

no profile record

Submissions

Array-programming the Mandelbrot set

jcmorrow.com
92 points·by jcmorrow·8 เดือนที่ผ่านมา·21 comments

[untitled]

1 points·by jcmorrow·10 เดือนที่ผ่านมา·0 comments

comments

jcmorrow
·7 เดือนที่ผ่านมา·discuss
I have both felt and seen this at work and I would add to this the meta-technique of binary search. Once it is added to your light and heavy technique you can solve what seems intractable at first glance faster than many people can even orient to the problem.
jcmorrow
·8 เดือนที่ผ่านมา·discuss
> My experience is with APL, but I think it is capable of producing some of the most readable and maintainable codebases out there.

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...).
jcmorrow
·8 เดือนที่ผ่านมา·discuss
Haha, I think I understand what you mean, but also, how else would you say uiua? I was at a total loss when I first read it.
jcmorrow
·8 เดือนที่ผ่านมา·discuss
I know that you are joking, but in fact I have further golfed it down to reduce the repetition : )
jcmorrow
·8 เดือนที่ผ่านมา·discuss
Thanks for sharing that perspective! I have not delved too far into k, though I have been a few times confused and discouraged by the fact that there are different versions of the language that are not compatible with each other, and some are proprietary (if I understand the state of the language correctly). Is there a specific version that is best to learn first?

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.
jcmorrow
·8 เดือนที่ผ่านมา·discuss
100% agree. Even when I am working with J or Uiua enough that I can comfortably read them, I can't really imagine trying to work on a large (even just thousands of lines, let alone larger) project in them. I know that they exist, and I assume that with a team of competent programmers some different mechanisms would evolve to make things easier to understand, but given the choice between Java and uiua, I would much rather maintain a multi-person multi-year project in Java. The verbosity/boilerplate becomes a strength in that setting, rather than a weakness.
jcmorrow
·8 เดือนที่ผ่านมา·discuss
You should definitely check out uiua (https://www.uiua.org/)! Array programming can certainly be intimidating, but I think it's worth doing for a few reasons:

- 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.