Turns out, Futhark != https://en.wikipedia.org/wiki/Futhark (runes, old germanic alphabet)
That's like calling your programming language Latin?! The title could use some disambiguation...
More accurately it would be like calling it Alphabet, since that takes its name from Alpha Beta (AB) just like the Futhark takes its name from the first letters in it.
Also the very first line on that page is "The Futhark Programming Language" so if you were still confused after that I think it's on you.
concat(Vec<T, n>, Vec<T, m>) -> Vec<T, n+m>
matmul(Mat<T, n, m>, Mat<T, m, l>) -> Mat<T, n, l>
head(Vec<T, n+1>) -> (T, Vec<T, n>)
This would have saved me so much headache debugging CUDA kernels and numpy!! I wish it were a first-class feature in those frameworks, and even general-purpose languages, but alas. val concat [n] [m] 't : (xs: [n]t) -> (ys: [m]t) -> *[n + m]t
val matmul [n] [m] [l] 't : (xs: [n][m]t) -> (ys: [m][l]t) -> *[n][l]t
val head [n] 't : (x: [n]t) -> t
And here's the pathological case (length cannot be determined at compile time): val filter [n] 'a : (p: a -> bool) -> (as: [n]a) -> *[]a
Other pathological cases include conditionals and loops.Both of these "make it available". Just because people don't know how to use/find them doesn't mean they're not "available".
> Eigen
This is not an ML anything, it's a linear algebra library.
> like commenting '# (b, n, t)' on every line, or suffixing shapes to variable names
There's a difference between tracking shapes in the compiler and specifying shapes in the model.
argv: Vec<String, argc>
If I want to map these to ints, then I'd like a compile-time guarantee that the resulting array nums: Vec<Int, argc>
is the same length as argv. Lean and Idris can do this, but AFAIK no commonly used languages can. But unlike general dependent types, these are not hard to wrap one's head around and would save a lot of frustration, in my experience.For those that don't know, Futhark is comes from the first 6 letters of the runic alphabet (F, U, Þ, A, R, K)
Now I'm thinking about "Smalltalk by Example" and "Slang by Example"
[1] https://archive.org/details/karlsson-thomas-uthark-nightside...
[2] https://www.84cxrarebooks.com/pages/books/090763/t-ketola-th...
[3] https://www.miskatonicbooks.com/product/thursakyngi-iv-svart...
Futhark appears in the first paragraph! i don't think i ever read the term before