I was disappointed at the lack of really good, in depth Chapel tutorials that weren't also the spec, so I wrote my own.
Looking for feedback on what could make this a better read.
Full disclosure: I am currently an intern with the Chapel team at Cray, and I am no shame trying to sell this open source language to the masses. However this is not a product of the internship; one can get surprisingly bored in Seattle, and I wrote this on unoccupied weekends.
It's easy enough to skip ahead. I like that it doesn't leave any of that out; it's not so tedious that you can't scan for interesting bits, with the rest as reference material. Maybe I am biased from reading on a laptop where scrolling and scanning is easy?
> Maybe I am biased from reading on a laptop where scrolling and scanning is easy?
Probably. I first looked at the page on a tablet, where the viewport is much smaller and so scanning/skimming is much harder. I later got back to the page on a laptop, and I scrolled past uninteresting parts without any problems.
One thing I think would be good on learnxinyminutes is an ability to link to a specific line. Is it possible and I just missed it?
Any hints about what makes Chapel special and useful. A short section with links to relevant parts of the full documentation that highlights what one might use Chapel for. I saw some nice features but nothing that really struck me as decisive.
As gberger says, that should go at the top of the page.
I don't have the time to read the whole thing right now and it's a first time I'm seeing Chapel, so I may be wrong.
After skimming the page it looks rather similar to Nim. Chapel looks like it wants to be a systems programming language with special focus on concurrency and parallel computation. It's statically typed with local type inference. It supports product types with tuples, but I don't see sum types or (G)ADTs in general. It has numeric types with explicit range, like Ada or Nim (that is without dependent types). It supports generics, with a very lightweight syntax (ie. lack of any syntax). Supports in/out/inout parameters like C#. Supports operator overloading. Has iterators. Supports class-based OO with destructors (so probably is not GCed?). Has coroutines as a main concurrency construct. It has "sync" keyword, but I don't have the time to look at it in depth to know how it works.
It looks like it's somewhere between C and Java, like Nim, Rust and a couple other languages. From a quick glance I can't tell if the language is garbage collected and I don't really know how the concurrency and parallelism really work in the language. Still, it looks rather nice and I suspect you'd use it any time you otherwise use C with pthreads.
At least in my exposure, Chapel is a language built for partitioned global address space (PGAS) cluster computing. So instead of a distributed model like MPI where each node has its own memory and you pass messages, or a shared memory model like OpenMP where you use threads and rely on the hardware to produce consistent memory state, PGAS presents all the memory in the cluster as an address space with special partition semantics that you write to to share data. The actual transfer between physical memory partitions is transparent to the programmer and largely handled by the fabric.
It's a language for high performance computing (HPC). I think it's the only one that survived out of three languages competing at the time: Fortress (Sun), Chapel (Cray), and X10.
// We can also enforce a form of polymorphism with the 'where' clause
// This allows the compiler to decide which function to use.
// Note: that means that all information needs to be known at compile-time.
// The param modifier on the arg is used to enforce this constraint.
This sounds like it means that I cannot supply a variable as the argument to whereProc. Is that correct?
I don't know anything about Chapel beyond what's on this page, but while I'd guess that you're correct, that where clauses only work with constants, given Chapel's widespread use of range types, it's possible that it might be able to prove when numbers are withing a certain range. A lot of languages do this to avoid inserting bounds-checking code to array access where a number can be trivially shown to always be within range. Once you start doing interesting things with numbers though, your ranges start to become to wide to be useful.
Full disclosure: I am currently an intern with the Chapel team at Cray, and I am no shame trying to sell this open source language to the masses. However this is not a product of the internship; one can get surprisingly bored in Seattle, and I wrote this on unoccupied weekends.