โHello, World!โ will get you writing some Crystal and familiarize yourself with the Exercism workflow. Completing it unlocks the rest of the Crystal Track.
Watch our "Introduction to Hello, World" video to get started ๐
The classical introductory exercise. Just say "Hello, World!".
"Hello, World!" is the traditional first program for beginning programming in a new language or environment.
The objectives are simple:
If everything goes well, you will be ready to fetch your first real exercise.
src
contains your solution to the exercisespec
contains the tests to run for the exerciseIf you're in the right directory (i.e. the one containing src
and spec
), you can run the tests for that exercise by running crystal spec
:
$ pwd
/Users/johndoe/Code/exercism/crystal/hello-world
$ ls
GETTING_STARTED.md README.md spec src
$ crystal spec
This will run all of the test files in the spec
directory.
In each test file, all but the first test have been skipped.
Once you get a test passing, you can unskip the next one by changing pending
to it
.
Be sure to submit the source file in the src
directory when submitting your solution:
$ exercism submit src/hello_world.cr
Sign up to Exercism to learn and master Crystal with 26 concepts, 133 exercises, and real human mentoring, all for free.