New Ziglings exercise, threads in practice - calculation of PI

//
// Now that we are familiar with the principles of multi threading, we
// boldly venture into a practical example from mathematics.
// We will determine the circle number PI with sufficient accuracy.
//
// There are different methods for this, and some of them are several
// hundred years old. For us, the dusty procedures are surprisingly well
// suited to our exercise. Because the mathematicians of the time didn’t
// have fancy computers with which we can calculate something like this
// in seconds today.
// Whereby, of course, it depends on the accuracy, i.e. how many digits
// after the decimal point we are interested in.
// But these old procedures can still be tackled with paper and pencil,
// which is why they are easier for us to understand.
// …

Ziglings - Learn the :zap:Zig programming language by fixing tiny broken programs.

7 Likes

I think you intend to link to here? exercises/exercises/105_threading2.zig at main - ziglings/exercises - Codeberg.org

When I click your link, it’s just taking me to the main page :slight_smile:

1 Like

Yes, of course, so that you can simply download or update the entire repo. The exercise is embedded in the platform and can then be started separately using zig build -Dn=105.
Or do you think it is more important to refer directly to the new exercise?

1 Like

I’d link to both, honestly. There’s an old rule of thumb with getting people to follow links - after about two clicks, you lose people.

You have great examples, and I want people to see them - that’s all :slight_smile:

As an aside, I really like the standard thread API - it looks really good.

2 Likes