For those wondering what it's for: it's basically NumPy + a JIT compiler with standard Haskell syntax (you mostly just need to change the type signatures, not the code).<p>It can vectorize, parallelize on the CPU, or offload to the GPU automatically.<p>It's a very mature project, maybe 10+ years old.
One big difference compared to NumPy (which you may or may not care about depending on how picky you are), is that Accelerate is a higher-order programming model. Basically, you can have 'map' (with a user-provided function), and it will go fast, in contrast to NumPy's model where only first-order operations go fast.
Can you say a bit more about this?<p>In particular, compare you JAX’s vmap — one model for vmap is that it is a program transformation on first order functions, that returns a first order function (“function” is a bit wonky here: but it’s JAX’s Jaxpr representation), but vmap itself is not a primitive in the Jaxpr language.<p>Is the same true here about map (can I think of it like vmap)? Or is it true that I can define higher order functions and Accelerate will handle them? What about functions with recursion?<p>Thanks! If you happen to see this - Futhark is very cool.
I wrote a bit about this some years ago: <a href="https://futhark-lang.org/blog/2020-05-03-higher-order-parallel-programming.html" rel="nofollow">https://futhark-lang.org/blog/2020-05-03-higher-order-parall...</a> - but note that Jax isn't subject to these constraints; it's more like Accelerate and Futhark.<p>I'm not a Jax expert. Accelerate's 'map' allows for almost arbitrary sequential code - there is some fine print, because it's an embedded language, and the biggest fine print is that nested parallelism is not allowed. You can define your own Haskell-level higher order functions, and Accelerate will handle them just fine, because essentially all the Haskell-level computation is "compiled away" (by being run) before the Accelerate code is JIT-compiled at run-time. You can consider Haskell to be a meta-language in which you ultimately construct Accelerate program terms, and then <i>those</i> are compiled and run - not too dissimilar from how Jax does it, actually.<p>Recursion works, but for an uninteresting reason: the recursion is on the Haskell side, and will essentially be unrolled before Accelerate gets its hand on it. This allows you to do some fun things (like partially evaluating a ray tracer on its scene description), but it's often not what you want, and Accelerate provides some combinators (that look like higher-order Haskell functions) for expressing sequential looping.
I think this is only the fifty millionth time I've said this: get rid of the FOMO clickbait "project name only title" submissions, particularly since it is almost always something very few people have heard of.<p>I'd go so far as to say that any submission with a title that is less three words should get automatically binned, and posts to software projects should be required to explain in the title what the software is/does.<p>Is it just me or is this post also clearly vote-manipulated? Either that or a lot of NumPy people are hanging around on HN early on a Saturday morning.
If the weird syntax of APL and J bothers you, you can use the familiar Haskell syntax!<p>Jokes aside, types should help a lot.
aren't there like dozens of similar things with pretty much the same name?
Yes, and that’s fine. There are many notable Michael Jordans for instance. Maybe they could have taken the opportunity to call this one Haccelerate or Haskellerate or something like that but there is no reason for everything to have a distinct name. Context has sufficient namespacing.
Maybe. Nothing else in Haskell named similarly, so it's not confusing.<p>also, accelerate was first published to Hackage in 2009 though so it isn't an especially new thing.
I think we ran out of `$NameFast` and `Fast$Name`, so people are just using plain verbs as names now, ideally as similar to something existing as possible, so you can attempt to steal their SEO and similar nifty "growth hacking" stuff.
What’s the main use case for this?
Making Haskell programs go faster. I will say that Accelerate is in most cases not faster than similar libraries for other languages (e.g. Jax), but the integration with normal Haskell is very pleasant. As Haskell is a very nice and practical language for general-purpose programming, it's convenient to be able to use Accelerate for those parts where numerical performance is critical (but not so critical that you rewrite the entire program in CUDA or C).
I guess the author is unaware of Accelerate.framework, the vector library that has shipped with Mac OS since Jaguar.
Were the authors of Accelerate.framework unaware of the word Accelerate, which has shipped with the English language since the 1500s?<p>/s<p>Overlaps in naming happen, especially when we all want to choose simple and catchy words like "Accelerate."