

Learn Chapel in Y minutes - ianbertolacci
http://learnxinyminutes.com/docs/chapel/

======
ianbertolacci
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.

~~~
gberger
Read it for 2 minutes and it taught me how to do basic vars, if, case, for,
while...

I think this tutorial should show me the unique parts of the language without
boring me first.

~~~
klibertp
That wouldn't be consistent with other Xs on the site. Alhough I do agree that
it would be better to skip the trivialities.

~~~
sirclueless
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?

~~~
klibertp
> 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?

~~~
ianbertolacci
I havent seen anything like that, but I like that idea.

------
kwhitefoot
>What this tutorial is lacking:

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.

~~~
hellodevnull
I had never heard of Chapel and was looking for something along those lines.

What's interesting about it that makes it worth taking a look?

~~~
nimrody
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.

See
[https://www.cs.indiana.edu/~achauhan/Teaching/B629/2010-Fall...](https://www.cs.indiana.edu/~achauhan/Teaching/B629/2010-Fall/StudentPresns/HPCS.pdf)

Designed mostly for scientific computing on highly parallel machines. Not your
typical web-application development :)

------
kwhitefoot
// 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?

~~~
adrusi
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.

