Futhark by Example

(futhark-lang.org)

27 points | by tosh 1 hour ago

2 comments

  • ethanlipson 44 minutes ago
    Futhark is really such a great idea. I'm not convinced that dependent types are worth the cognitive overhead in general, but it's definitely worth it to include the length as part of the type information for dynamic arrays, e.g.:

      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.
  • rowanG077 31 minutes ago
    Futhark is pretty great! And I have to say that the maintainer is insanely quick. It has happened on more than one occasion that I reported a bug and it's solved within the day. I have been using Futhark in prod for two years now and never had serious problems.