Mode:
Duration:
1
2
3
4
5
6
var steps = 10;
var pos = 0;
for i in 1..steps {
if random(0,1) < 0.5 then pos += 1 else pos -= 1;
writeln(pos);
}Coding works best on desktop or with an external keyboard.
var steps = 10;
var pos = 0;
for i in 1..steps {
if random(0,1) < 0.5 then pos += 1 else pos -= 1;
writeln(pos);
}Coding works best on desktop or with an external keyboard.
Simulates a 1D random walk.
var steps = 10;
var pos = 0;
for i in 1..steps {
if random(0,1) < 0.5 then pos += 1 else pos -= 1;
writeln(pos);
}Chapel is a parallel programming language designed for high-performance computing (HPC). Developed by Cray Inc., it provides productivity features for writing scalable and portable parallel programs, combining high-level abstractions with fine-grained control over concurrency and data distribution.
Origin & Creator
Developed by Cray Inc. as part of the Cray Cascade project, first released in 2009.
Industrial Note
Chapel is mainly used in research, supercomputing centers, and scientific computing environments requiring scalable parallel execution.