Exercises and a course in Red.
Tooling:
- Test Runner
- Analyzer (not ready)
- Representer (not ready)
Please, see the official contributing guide's Building Tracks section. This track is already published, but there are many things to improve:
- We want to complete basic concepts.
- You also can always add a new practice exercise.
- Walk through the track, proofread any docs, report problems, or just give us any suggestions and thoughts you have on your mind.
There is also some interesting general info about Exercism, but remember it's a legacy documentation and can be outdated and official docs always take precedence:
Generally, practice exercises are best taken from Exercism's problem-specifications repository, so the experience is similar for students in every language track. But in case you need some fresh ideas, here are some links with script examples you can check for inspiration, especially in topics specific to Red:
- http://www.mycode4fun.co.uk/red-beginners-reference-guide
- http://redprogramming.com/Short%20Red%20Code%20Examples.html#section-2
- https://github.com/red/red/wiki/%5BLINKS%5D-Scripts-collection
Scripts in Rebol (it's very similar to Red)
First, read official documentation for background.
Now, here's how we do this in the Red track:
- Create an issue to let everybody know which exercises are being worked on,
- Clone this repo,
- Run our exercise generator; it will create all necessary files for the exercise:
$ red _tools/generate-practice-exercise.red <exercise-slug>
- In
exercises/practice/<exercise-slug>/<exercise-slug>-test.red
make a change like this, to test your example solution:
; test-init/limit %exercise-slug.red 1
test-init/limit %.meta/example.red 1
- Solve the exercise example, by editing
exercises/practice/<exercise-slug>/.meta/example.red
, - Run the tests. You'll need to change the second argument of the
test-init
function from1
to how many tests you want to run in<exercise-slug>-test.red
.
$ cd exercises/practice/<exercise-slug>
$ red <exercise-slug>-test.red
- Once your solution passes all the tests, remember to revert the changes made ↑ at point 4 in the
test-init
line: uncomment solution file, comment example file and changelimit
to1
(second argument). - Change the exercise's difficulty in track's
config,json
. If you want, addpractices
andprerequisites
concepts. Copy the exercise's config to the proper position, so that all exercises are sorted from easiest to toughest. - Make a commit to a fresh branch and make a Pull Request.
Useful for concepts and concept exercises
Concepts are being developed in a separate branch. More info is in GitHub task: #37 . There is no common source or list for concepts. Existing ones were created simply from looking at the practice exercises' example solutions and deducing what's needed to create and understand them.
There is a tool that counts and prints exercises unlocked by each concept, and exercises that practice the concept:
_tools/concepts-practice.red
Besides creating issues and commenting in this repository, you are welcome to post on Red's "training" Gitter channel.