From 4edb920f518327325d092f76a99f901821f35c76 Mon Sep 17 00:00:00 2001 From: Ian Bertolacci Date: Fri, 17 Jul 2015 10:09:21 -0700 Subject: capitalization and attempt to fix lists --- chapel.html.markdown | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'chapel.html.markdown') diff --git a/chapel.html.markdown b/chapel.html.markdown index d4ce4dfa..f308d1d8 100644 --- a/chapel.html.markdown +++ b/chapel.html.markdown @@ -1,11 +1,11 @@ --- -language: chapel +language: Chapel filename: learnchapel.chpl contributors: - ["Ian J. Bertolacci", "http://www.cs.colostate.edu/~ibertola/"] --- -You can read all about chapel at [Cray's official Chapel website](http://chapel.cray.com). +You can read all about Chapel at [Cray's official Chapel website](http://chapel.cray.com). In short, Chapel is an open-source, high-productivity, parallel-programming language in development at Cray Inc., and is designed to run on multi-core PCs as well as multi-kilocore supercomputers. More information and support can be found at the bottom of this document. @@ -762,7 +762,7 @@ timer.clear( ); ``` Who is this tutorial for? ------------------------- -This tutorial is for people who want to learn the ropes of chapel without having to hear about what fiber mixture the ropes are, or how they were braided, or how the braid configurations differ between one another. +This tutorial is for people who want to learn the ropes of Chapel without having to hear about what fiber mixture the ropes are, or how they were braided, or how the braid configurations differ between one another. It won't teach you how to develop amazingly performant code, and it's not exhaustive. Refer to the [language specification](http://chapel.cray.com/language.html) and the [library documentation](http://chapel.cray.com/docs/latest/) for more details. @@ -793,22 +793,27 @@ Installing the Compiler ----------------------- Chapel can be built and installed on your average 'nix machine (and cygwin). [Download the latest release version](https://github.com/chapel-lang/chapel/releases/) -and its as easy as - 1. ```tar -xvf chapel-1.11.0.tar.gz``` - 2. ```cd chapel-1.11.0``` - 3. ```make``` - 4. ```source util/setchplenv.bash # or .sh or .csh or .fish``` +and its as easy as + +1. ```tar -xvf chapel-1.11.0.tar.gz``` + +2. ```cd chapel-1.11.0``` + +3. ```make``` + +4. ```source util/setchplenv.bash # or .sh or .csh or .fish``` You will need to ```source util/setchplenv.EXT``` from the chapel directory every time your terminal starts so its suggested that you drop that command in a script that will get executed on startup (like .bashrc). Chapel is easily installed with Brew for OS X - 1. ```brew update``` - 2. ```brew install chapel``` + +1. ```brew update``` + +2. ```brew install chapel``` Compiling Code -------------- Builds like other compilers ```chpl myFile.chpl -o myExe``` -A notable argument: - * ``--fast``: enables a number of optimizations and disables array bounds checks. Should only enable when application is stable. +A notable argument, ``--fast`` enables a number of optimizations and disables array bounds checks. Should only enable when application is stable. -- cgit v1.2.3 From 4ae7b4921979998152c828a2b70576258a1f1468 Mon Sep 17 00:00:00 2001 From: Ian Bertolacci Date: Fri, 17 Jul 2015 10:13:51 -0700 Subject: Changed bash examples from block code Bash examples were in block code form (triple tick), should have been in inline mode (single tic) --- chapel.html.markdown | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'chapel.html.markdown') diff --git a/chapel.html.markdown b/chapel.html.markdown index f308d1d8..5a0c3920 100644 --- a/chapel.html.markdown +++ b/chapel.html.markdown @@ -795,25 +795,25 @@ Chapel can be built and installed on your average 'nix machine (and cygwin). [Download the latest release version](https://github.com/chapel-lang/chapel/releases/) and its as easy as -1. ```tar -xvf chapel-1.11.0.tar.gz``` +`tar -xvf chapel-1.11.0.tar.gz` -2. ```cd chapel-1.11.0``` +`cd chapel-1.11.0` -3. ```make``` +`make` -4. ```source util/setchplenv.bash # or .sh or .csh or .fish``` +`source util/setchplenv.bash # or .sh or .csh or .fish` -You will need to ```source util/setchplenv.EXT``` from the chapel directory every time your terminal starts so its suggested that you drop that command in a script that will get executed on startup (like .bashrc). +You will need to `source util/setchplenv.EXT` from the chapel directory every time your terminal starts so its suggested that you drop that command in a script that will get executed on startup (like .bashrc). Chapel is easily installed with Brew for OS X -1. ```brew update``` +`brew update` -2. ```brew install chapel``` +`brew install chapel` Compiling Code -------------- Builds like other compilers -```chpl myFile.chpl -o myExe``` +`chpl myFile.chpl -o myExe` -A notable argument, ``--fast`` enables a number of optimizations and disables array bounds checks. Should only enable when application is stable. +A notable argument, `--fast` enables a number of optimizations and disables array bounds checks. Should only enable when application is stable. -- cgit v1.2.3 From 77c4ddb522881b4975bff0e6b34e46566336e266 Mon Sep 17 00:00:00 2001 From: Ian Bertolacci Date: Fri, 17 Jul 2015 10:15:29 -0700 Subject: Put lists back in Pretty sure what was causing the 'back end' error was my bad markdown skills --- chapel.html.markdown | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'chapel.html.markdown') diff --git a/chapel.html.markdown b/chapel.html.markdown index 5a0c3920..c6c4a191 100644 --- a/chapel.html.markdown +++ b/chapel.html.markdown @@ -794,26 +794,21 @@ Installing the Compiler Chapel can be built and installed on your average 'nix machine (and cygwin). [Download the latest release version](https://github.com/chapel-lang/chapel/releases/) and its as easy as - -`tar -xvf chapel-1.11.0.tar.gz` - -`cd chapel-1.11.0` - -`make` - -`source util/setchplenv.bash # or .sh or .csh or .fish` + 1. `tar -xvf chapel-1.11.0.tar.gz` + 2. `cd chapel-1.11.0` + 3. `make` + 4. `source util/setchplenv.bash # or .sh or .csh or .fish` You will need to `source util/setchplenv.EXT` from the chapel directory every time your terminal starts so its suggested that you drop that command in a script that will get executed on startup (like .bashrc). Chapel is easily installed with Brew for OS X - -`brew update` - -`brew install chapel` + 1. `brew update` + 2. `brew install chapel` Compiling Code -------------- Builds like other compilers + `chpl myFile.chpl -o myExe` A notable argument, `--fast` enables a number of optimizations and disables array bounds checks. Should only enable when application is stable. -- cgit v1.2.3 From e7fe0b267a4c11136f4703493206d5862fa0fb76 Mon Sep 17 00:00:00 2001 From: Ian Bertolacci Date: Fri, 17 Jul 2015 10:24:16 -0700 Subject: Spellcheck --- chapel.html.markdown | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'chapel.html.markdown') diff --git a/chapel.html.markdown b/chapel.html.markdown index c6c4a191..b03aee7b 100644 --- a/chapel.html.markdown +++ b/chapel.html.markdown @@ -117,7 +117,7 @@ a = thisInt ^ thatInt; // Bitwise exclusive-or a += thisInt; // Addition-equals ( a = a + thisInt;) a *= thatInt; // Times-equals ( a = a * thatInt; ) b &&= thatBool; // Logical-and-equals ( b = b && thatBool; ) -a <<= 3; // LEft-bit-shift-equals ( a = a << 10; ) +a <<= 3; // Left-bit-shift-equals ( a = a << 10; ) // and many, many more. // Unlike other C family languages there are no // pre/post-increment/decrement operators like @@ -190,7 +190,7 @@ if ( a % 3 == 0 ) { var maximum = if ( thisInt < thatInt ) then thatInt else thisInt; // Select statements are much like switch statements in other languages -// However, Select statements dont cascade like in C or Java +// However, Select statements don't cascade like in C or Java var inputOption = "anOption"; select( inputOption ){ when "anOption" do writeln( "Chose 'anOption'" ); @@ -201,8 +201,6 @@ select( inputOption ){ otherwise { writeln( "Any other Input" ); writeln( "the otherwise case doesn't need a do if the body is one line" ); - writeln( "Oh, and when statements dont cascade like the case statements" ); - writeln( "of other languages" ); } } @@ -246,7 +244,7 @@ for x in 1..10 { // define an index set that can be iterated over. // Ranges are single dimensional // Domains can be multi-dimensional and can -// represent indicies of different types as well. +// represent indices of different types as well. // They are first-class citizen types, and can be assigned into variables var range1to10: range = 1..10; // 1, 2, 3, ..., 10 var range2to11 = 2..11; // 2, 3, 4, ..., 11 @@ -452,7 +450,7 @@ writeln( myChangingArray ); // We can query the type of arguments to generic procedures // Here we define a procedure that takes two arguments of -// the same type, yet we dont define what that type is. +// the same type, yet we don't define what that type is. proc genericProc( arg1 : ?valueType, arg2 : valueType ): void { select( valueType ){ when int do writeln( arg1, " and ", arg2, " are ints" ); @@ -620,10 +618,10 @@ class GenericClass { } // Copy constructor - // Note: We still have to put the the type as an argument, but we can + // Note: We still have to put the type as an argument, but we can // default to the type of the other object using the query (?) operator // Further, we can take advantage of this to allow our copy constructor - // to copy classes of different types + // to copy classes of different types and cast on the fly proc GenericClass( other : GenericClass(?otherType), type classType = otherType ) { this.classDomain = other.classDomain; -- cgit v1.2.3 From 6a54bca6ee74486b6eddadec17b6fc7f0c8bf43b Mon Sep 17 00:00:00 2001 From: Ian Bertolacci Date: Fri, 17 Jul 2015 10:31:32 -0700 Subject: Capitalization, Chapel Directory. --- chapel.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chapel.html.markdown') diff --git a/chapel.html.markdown b/chapel.html.markdown index b03aee7b..fb54d5a1 100644 --- a/chapel.html.markdown +++ b/chapel.html.markdown @@ -797,7 +797,7 @@ and its as easy as 3. `make` 4. `source util/setchplenv.bash # or .sh or .csh or .fish` -You will need to `source util/setchplenv.EXT` from the chapel directory every time your terminal starts so its suggested that you drop that command in a script that will get executed on startup (like .bashrc). +You will need to `source util/setchplenv.EXT` from within the Chapel directory (`$CHPL_HOME`) every time your terminal starts so its suggested that you drop that command in a script that will get executed on startup (like .bashrc). Chapel is easily installed with Brew for OS X 1. `brew update` -- cgit v1.2.3 From bad5266d05485cd61ab1aa0884180ab78738cd9b Mon Sep 17 00:00:00 2001 From: Ian Bertolacci Date: Sat, 18 Jul 2015 14:16:08 -0700 Subject: Slight modifications. --- chapel.html.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'chapel.html.markdown') diff --git a/chapel.html.markdown b/chapel.html.markdown index c97a5f2b..7ac73bbb 100644 --- a/chapel.html.markdown +++ b/chapel.html.markdown @@ -1,6 +1,6 @@ --- language: Chapel -filename: learnchapel.chpl +filename: learnChapel.chpl contributors: - ["Ian J. Bertolacci", "http://www.cs.colostate.edu/~ibertola/"] --- @@ -27,7 +27,7 @@ writeln( "There are ", 3, " commas (\",\") in this line of code" ); stdout.writeln( "This goes to standard output (just like plain writeln( ) does)"); stderr.writeln( "This goes to standard error" ); -// Variables dont have to be explicitly typed as long as +// Variables don't have to be explicitly typed as long as // the compiler can figure out the type that it will hold. var myVar = 10; // 10 is an int, so myVar is implicitly an int myVar = -10; @@ -540,7 +540,7 @@ class MyClass { var memberInt : int; var memberBool : bool = true; - // Classes have default constructors that dont need to be coded (see below) + // Classes have default constructors that don't need to be coded (see below) // Our explicitly defined constructor proc MyClass( val : real ){ this.memberInt = ceil( val ): int; @@ -771,7 +771,7 @@ Occasionally check back here and on the [Chapel site](http://chapel.cray.com) to ### What this tutorial is lacking: * Modules and standard modules - * Synchronize and atomic variables + * Synchronize variables and atomic operations * Multiple Locales (distributed memory system) * ```proc main(){ ... }``` * Records -- cgit v1.2.3 From fe0c14b8ad0f04b1d493fa6612a14d6cc7a48650 Mon Sep 17 00:00:00 2001 From: Ian Bertolacci Date: Sun, 19 Jul 2015 16:01:04 -0700 Subject: De-capitalization Changed language name and filename back to lower case 'chapel' in keeping with previous name to avoid possible site breakage. --- chapel.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chapel.html.markdown') diff --git a/chapel.html.markdown b/chapel.html.markdown index 7ac73bbb..53e9747c 100644 --- a/chapel.html.markdown +++ b/chapel.html.markdown @@ -1,6 +1,6 @@ --- -language: Chapel -filename: learnChapel.chpl +language: chapel +filename: learnchapel.chpl contributors: - ["Ian J. Bertolacci", "http://www.cs.colostate.edu/~ibertola/"] --- -- cgit v1.2.3