fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

SmokeMachine

I've been seeing some different projects using configuration on the same language the project was written with. I think that's very interesting and decided start playing with that idea for . Here is my first try: github.com/FCO/Configuration Please let me know your thoughts.

GitHubGitHub - FCO/Configuration: Use configuration written in Raku (*.rakuconfig)Use configuration written in Raku (*.rakuconfig). Contribute to FCO/Configuration development by creating an account on GitHub.

@smokemachine Your examples seem to only cover the (weird-to-me) case where you want your software to monitor the config file and react to changes? If you just want to run it once when your program starts, would it be

config-run(Test1Config, :file<./my-conf.rakuconfig>);

?

@colomon no, you would use `single-config-run(Test1Config, :file<./my-conf.rakuconfig>)` and it returns the config object. (Thanks, I need to add that as an example)

@colomon but yes… I think calling it without :$watch, :$signal nor any other reload method should run once. And you could use that as an waitable.

@colomon please, take a look to see the examples are better now.

@smokemachine That certainly has the example I would have expected to see! Though I'm still a bit confused about the difference between “await config-run" in the example and "single-config-run" you mentioned here.

@colomon single-config-run just returns the config object, config-run always returns an Supply, but if it has no ways to reload the config, that Supply will only emit a single config object and close.