Stream: roctoberfest

Topic: idea: commonly used functions


view this post on Zulip Anton (Oct 03 2022 at 14:09):

I think @Georges Boris mentioned that it took a while to find the name of a builtin function to do something you have in mind.
It might be good to keep track of functions commonly used for advent of code, so we can list them in a document, perhaps with minimal examples as well.

view this post on Zulip Anton (Oct 03 2022 at 14:10):

A general AdventOfCode.md with tips would probably be valuable as well.

view this post on Zulip Brendan Hansknecht (Oct 03 2022 at 14:13):

Something like https://aplcart.info/ might be useful, even if just a static list for now. Otherwise, maybe a list of common other names for functions would be useful (i think we have a partial list like this). Also, we probably should promote roc-lang.org/builtins/List more. Probably should make the link work directly instead of making it a requirement to go to a specific module.

view this post on Zulip Georges Boris (Oct 03 2022 at 14:21):

@Anton yup! both List.walk and List.len - it was easy finding them but the short name for length tricked me a bit and I've never seen "walk" used before as foldl/reduce but I could sort of guess.

view this post on Zulip Mike Kalvas (Oct 03 2022 at 14:41):

Another piece of this that would be nice is searching for specific functionality. Popular languages have the power of Google on their side, but things like Hoogle help too. For instance, I was trying to find if any of the Str -> Num functions have the option of taking a radix param to parse a binary string representation to a decimal integer. e.g. elixirs String.to_integer(n, 2). I couldn't find one, but correct me if I'm wrong.

view this post on Zulip jan kili (Oct 03 2022 at 15:01):

We have a docs site?! If I knew this before, I forgot it. We should link it somewhere...

view this post on Zulip Mike Kalvas (Oct 03 2022 at 15:04):

It's linked in the github README under "some docs for the standard library", which is where I found it.

view this post on Zulip jan kili (Oct 03 2022 at 15:05):

Oh, awesome, my bad

view this post on Zulip Anton (Oct 03 2022 at 15:16):

I've made a PR to make the docs link stand out more.


Last updated: Jul 06 2025 at 12:14 UTC