Chapel: a parallel programming language designed for productivity at scale
chapel.cray.com
chapel.cray.com
Of all the languages out there, Julia may be the one to be used for this eventually.
I really see Julia 'winning' in the longevity sense, but it makes me nervous sometimes seeing people misunderstand that. Do you think that similar misunderstandings have prevented Chapel and company from a more widespread success?
Also, Erlang is fairly successful. According to Wikipedia, Chapel was started in 2009, and Erlang was around back then too, what does Chapel provide that obsoletes Erlang? What problem does DARPA think that Chapel/x10/etc could solve that Erlang couldn't?
[1] https://en.wikipedia.org/wiki/High_Productivity_Computing_Sy...
I love Julia--it's so thoughtfully constructed, incorporating parallelism as a fundamental, and expressive but performant. Compared to something like MATLAB or R, it solves all my problems.
But for someone coming from Python or C, Julia can seem unnecessary and crippled by odd conventions. To someone used to the expressiveness and libraries of Python, why would you need Julia? To someone coming from C, which can do everything and is the speed standard, why would you need Julia?
Languages do really serve different roles, but we often assume otherwise. That assumption is often implicit, though, which leads to discussions where people are talking past one another.
I watched and toyed with all the HPCS languages for awhile, along with OCaml, and saw that they never got the traction I was hoping for, and none seemed to become something I could just use, practically speaking. Fortress was amazing in concept, but maybe bit off more than it could chew, at least with the support at hand and situation at Sun. Things seemed dormant for awhile, and then Julia showed up, which seemed like what everyone was looking for all along.
Honestly, Stanza seems really promising as well, but I wonder if it's too late to the party (although I thought that about Python long ago as well and was obviously wrong about that).
http://www.embedded.com/design/other/4375616/ParaSail--Less-...
Meanwhile, functional approaches like Erlang and Haskell have been most impressive. Still a need to improve with languages already there. Cilk (below) was one for C. I've also included a list on Wikipedia for people interested in this topic.
http://supertech.csail.mit.edu/cilk/
https://en.wikipedia.org/wiki/Category:Concurrent_programmin...
config const n = 100000; // override default using ./a.out --n=<val>
What? I smell anti-pattern. `const` should promise or specify to the compiler that this value doesn't change, so it can be baked into code.Automatic translation of command line arguments to variables is useful (I have implemented this in shell scripts past as a nicer alternative to getopts). But the variables which receive command line overrides should be set apart in some way for that purpose.
If someone were to patch your C# compiler such that it didn't substitute, and instead pulled from a read-only memory location, would it in any way harm the correctness of your code?
In C# you can't assign a const to a value not known at compile time for this very reason. However, you can assign a variable value to a static readonly field.
RAAI: Really, assignment ain't initialization.
A file scope const object in C can have a value which is not known at the point of declaration.
extern const int var;
This one is not known until either a definition is supplied later in the same translation unit, or else not until linkage with another translation unit which supplies a definition. static const int var;
In this case, the value is not determined until either a definition is seen which provides an initializer, or else the the end of the translation unit is reached (whereupon the tentative definition becomes actual, with a value of zero).In this situation, though, the static value can be propagated as a true literal constant into code which precedes the point where the value is known. Just not in a "one-pass compiler".
This is also the case when a block-scoped const is initialized with a literal constant:
{ const int x = 5; /* almost "true" constant */ ... }
In C, x isn't considered a constant expression, but de facto it is, which is good enough for optimizing.Like by calling them "config" variables?
To specify values that must be known at compile-time, Chapel uses the 'param' keyword, where 'config param' symbols can be set on the compiler's command-line (as can 'config type' symbols, used to specify type aliases). 'param's and 'type' symbols tend to lead to compile-time specialization, similar to C++ template variables.
That just leaves 'config var' which indicates that a symbol can be set on the execution-time command-line and re-assigned over its lifetime.