exercism / cpp

Exercism exercises in C++.
https://exercism.org/tracks/cpp
MIT License
251 stars 205 forks source link

docs: add approach for all your base #822

Closed vaeng closed 4 months ago

vaeng commented 4 months ago

The only other way to handle this would be to have one approach use what you feel is the most relevant option of these two approaches, and then convert these two approaches to articles which the approach can then refer to.

I had that as a first version. Approaches for simple loops, loops that can work in parallel, and parallel algorithms. But the second one was superfluous without the last, so I mashed them together and it got really long, so I cut a different way.

I waded through ~100 solutions from the community solutions and did some research on solving base transfers in general. However, I could not find anything that would work without an intermediate step over base 10.

siebenschlaefer commented 4 months ago

I waded through ~100 solutions from the community solutions and did some research on solving base transfers in general. However, I could not find anything that would work without an intermediate step over base 10.

I don't want to toot my own horn, but ... https://exercism.org/tracks/cpp/exercises/all-your-base/solutions/siebenschlaefer

vaeng commented 4 months ago

I don't want to toot my own horn, but ... https://exercism.org/tracks/cpp/exercises/all-your-base/solutions/siebenschlaefer

This is surprising. When I sort the solutions by "highest rep users" I get results for users with +103 rep. You have 32143, but your solution is not displayed. It looks interesting, I will have a look.

ErikSchierboom commented 4 months ago

I don't want to toot my own horn, but ... https://exercism.org/tracks/cpp/exercises/all-your-base/solutions/siebenschlaefer

Then we might have at least two approaches after all :)

siebenschlaefer commented 4 months ago

Then we might have at least two approaches after all :)

I think they can be written as three approaches:

ErikSchierboom commented 4 months ago

That sounds like a great plan!

vaeng commented 4 months ago

I made the changes. Maybe you can add an extra approach for your method to my short outline @siebenschlaefer

ErikSchierboom commented 4 months ago

Maybe you can add an extra approach for your method to my short outline @siebenschlaefer

I'll wait for that for my final review, okay?

BTW, the snippets are too long: https://github.com/exercism/cpp/actions/runs/8103278818/job/22147568424?pr=822

vaeng commented 4 months ago

Maybe you can add an extra approach for your method to my short outline @siebenschlaefer

I'll wait for that for my final review, okay?

I don't want to force other people to do extra work on my approaches 😄 So currently I have mentioned and outlined the big integer approach, and we can add the link and the approach with better and more detailed explanations later.

As far as I am concerned, this version can go live. Although I am sure there are still typos and things. That can be fixed over times, when someone sees them. If no new issues arise with these docs in the next few days, I will push them and adjust things on the road.