Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Why isn't [matrix multiply] * [instead of something else]

I think you added this question after I responded, or maybe I missed it. It's a good question.

Because inner product (apl: +.×) is row-wise multiplication then column-wise summation. You can do a row-wise = then a column-wise > to see if the bottoms of a column end in a value (2>.=M).

There's also an outer-product (apl: ∘.×) which is the left-argument currying times the right row-wise.

* usually means power in APL. Not multiply. APL uses the standard × character for multiplication.

APL is designed to be read, but it's still describing numerical methods and operations as opposed to a mathematical notation which frequently hides complexity.

> in Julia, if I were to write a numerical type for galois fields (and I have), I could write compile-time optimized code for performing reed-solomon erasure coding using the builtin matrix operators - the code would be exactly the notation you see in the papers describing erasure coding.

That sounds great, but I don't understand any of that or why it's valuable.

Maybe that's because I don't typically read mathematical journals and type in the algorithm presented.

However you gave me an idea. Take a trie as a simple data structure with a great deal of literature about it. Some googling leads me here:

http://users.monash.edu/~lloyd/tildeAlgDS/Tree/Trie/

Now I can write "find" in k/q as @/ if I implement a 256-trie. Maybe the author doesn't know APLish languages and that's why they chose a poor notation. Maybe not.

But having to decode some paper like this occurs much more frequently than even wanting to implement a bunch of type code that the compiler can optimise so I can copy and paste mathematical notation.



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

Search: