Hacker News new | past | comments | ask | show | jobs | submit login

I wish* exist a simplified implementation of this (or APL) in "normal" looking code.

Array languages are the most "obscure" of all paradigms I have looked into. Even concatenative ones have some few resources about how work.

Also, the community live in a parallel world! So when asked about stuff, redirect me to https://code.jsoftware.com/wiki/Essays/Incunabulum or https://github.com/kevinlawler/kona as if it somehow make everything so obvious ...

P.D*: Because I'm building a language that try to draw some ideas from kdb




You have ivy, for example: https://github.com/robpike/ivy by Rob Pike and, of course, gofmted. I have had a quick look at a few APL implementations and some of them are very readable code (by normal standards).

However, although I totally get your point (I've been there), I have to say there is much more to learn if you try to understand that parallel world. It can take a while, but I think it is worth it.


> Array languages are the most "obscure" of all paradigms I have looked into. Even concatenative ones have some few resources about how work.

Have you tried looking at APL books? There are dozens of books on APL you can find. There are journals and conference proceedings from ACM, IBM, Dyalog, and Vector UK. I started to get into APL more seriously last year and lack of resources is definitely not a problem in my experience, lack of time to read them all is. Also, it's more about thinking of algorithms in terms of matrix and array operations. A lot of the techniques and algorithms can be easily adapted from Matlab.


Well there are books like "Mastering Dyalog APL", but they don't help you think in the language. There is the "Finnish APL Idioms" book which helps a bit. APL and J certainly have libraries, but a lot of functions and libraries that are builtin to most languages are omitted from APL as you can replicate with 3 characters. That's where knowing idioms helps. I am just a novice, but really enjoy writing APL & J. Aaron Hsu has been on a couple of APL related posts on HN that I have linked to multiple times. He is a scheme guru that switched to APL a few years back and wrote the Co-Dfns parallel GPU compiler for Dyalog APL. He has some enlightening talks on YouTube as well. I mention him here as his APL code is extremely terse and similar to Whitney's C, and he did an excellent job defending it in the HN post which changed the way I look at code. Second, as a University TA, he's taught multiple courses on APL as a first programming language and has talked about writing a book that tries to teach how to THINK in APL and not just this is how you transpose the matrix using this symbol...etc. My problem is that I know what the symbols do, but don't know how to switch from imperative/OO thinking to how to think in terms of array primitives (inverse, transpose, sort, outer product...etc).


"J for C programmers" is, in my opinion, an excellent resource for how to think in array-oriented style. http://www.jsoftware.com/help/jforc/contents.htm


I've flipped through it before, but didn't remember it being very enlightening (note that I didn't read the full thing and do all the excercises). I'll have to give it another shot. Thanks for the tip!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: