I would like some assistance reviewing a number of examples I have written for roc-lang/examples
. The PR is #9 and I have also uploaded the site assets to a github pages site for easier viewing, and inclided relevant links below.
I would really appreciate any assistance improving the Roc code.
The purpose of the examples site is to be centralized place to find your up-to-date, roc-expert-approved answer for "How to X in roc". However, I don't have a lot of experience and wouldn't call myself an expert.
I've spent some time polishing these examples for the site, but it's possible that I've missed something really obvious, and or these are really bad examples to use for Roc and should be scrapped altogether.
I'll definitely try to give some feedback tomorrow. Probably will be kinda nit, but i guess that is kinda what you are looking for.
Yep, all nits welcome!
I unfortunately had to close this PR due to the problematic license of rosetta code.
It's a shame to develop such a massive database and then severely restrict how it can be used.
Can't just the examples be licensed as GFDL? It doesn't mean the whole project needs to be GFDL does it?
True, but then people can't just copy the examples into their project anymore unless their project is GFDL licensed
If you want to avoid derivative works, you just have to write solutions from scratch and not translate answers.
We should be fine to have examples like this in the repo
Rosetta code doesn't magically own all answers to their problems. I can even write proprietary answers to their questions and sue someone if they copy it.
Anyway, all that to say, I think we should re-open the PR.
If you want to avoid derivative works, you just have to write solutions from scratch and not translate answers.
We should be fine to have examples like this in the repo
Rosetta code doesn't magically own all answers to their problems. I can even write proprietary answers to their questions and sue someone if they copy it.
Uhu, I was aware of that, I should have expressed myself better. I mainly wanted to close the PR to have a clean do-over and so that we never have any verbatim text of rosetta code in our commits. We can do the same problems as in the PR.
That is totally fair
Its a shame, happy to fix it. FizzBuzz, TowersOfHanoi, and LeastSquares could all just point at the wiki page. In fact that was where I got the description for TowersOfHanoi from. The other two arithmetic ones are just too basic it's really not possible to claim you own the task "sum two integers". I'll make another PR that doesn't reference Rosetta Code at all, and just points to the wiki page for classical CS problems.
Still interested in any feedback on the code if possible?
left some comments
Last updated: Jul 06 2025 at 12:14 UTC