-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load config from file #510
Comments
NB: I've just edited the Config.hs and reran |
@teto hm.. I haven't looked at nix for a few months (apart from the day to day stuff) so thanks for the pointer to I think we built the application on the concept of building the main program based on the configuration. I would think @frasertweedale is probably not moving from that stand point. Out of curiosity tho... if I think about |
and there are the issues:
|
Hi @teto. One of the huge advantages of the current configuration approach is that it allows the configuration to use native data types, including things that are difficult to express in a config language, such as functions. It also makes plugin integration much less complex than the other approaches I know about. Yes, one big disadvantage is that you need the toolchain. It's a downside, I agree. For me, the upsides outweigh the downsides by a big margin. But I'm the sort of person who carries a Haskell toolchain everywhere I go, so the marginal cost for me is small. I acknowledge the plight of folks actually inconvenienced by the toolchain requirement. Because this is a hobby project, I personally am not motivated to solve the problem. But I am open to others tackling an alternative config approach. My main expectations would be:
|
All of my software is configured via files and I dont feel limited. In case I am or if one needs a function, he can provide a plugin (which purebred seems to have an architecture for already ?). I've had a look at src/Purebred/Config.hs and I haven't seen functions that could impede the change (IMO).
-dyre +config library :D I actually dont know the haskell ecosystem around that, I can ask on matrix. There seems to be https://hackage.haskell.org/package/conferer .
Now that is interesting. purebred has the interface I like the best close with alot. I believe haskell to be better suited to deal with the complexity of mail. I wouldn't mind contributing (lightly) to purebred, also despite being a hobby project it seems quite mature and also you've been working on it for quite some time already so I am not that worried ?! Is purebred your main MUA ? what happens if you decide to give up development ? do you think @romanofski (or any other contributor) would keep the flame burning :) ?
Agreed. A POC with aeson should be tractable. Not everything has to be converted it could be incremental since UserConfiguration is already split in nice subtypes. toml: https://github.com/kowainik/tomland |
Purebred is not my main MUA but I use it in anger probably several times a week (mainly for the power of
I don't love JSON as a config format. If we're going to do it, I think there are more ergonomic options. But if that's what the implementer chooses I will not oppose it. aeson is not currently a dependency, but most of its transitive dependencies (including large ones like attoparsec) are already in the purebred dependency path. That's acceptable to me. config-ini is already a dependency of purebred, via brick. So if INI is the way to go, I'd prefer config-ini over ini. Other formats (TOML, YAML) seem OK to me too, but I'm not familiar with the libraries. I know https://dhall-lang.org/ is another option popular in the Haskell/FP scene. With conferer, we would still have to choose exactly which format(s) to support and compile in the dependencies. I don't see much benefit. |
Yeah I use it as my daily driver and the config is currently the least of my problems. There still is a lot of UX missing even tho it's usable as bare bones as it is. |
Is your feature request related to a problem? Please describe.
I suppose there is already an existing ticket about this but couldn't find it. I am really interested in this project, mail is an area where haskell or rust could shine. I wanna use "alot" but I would prefer contributing to this project instead. My main problem with it is that I dont want to recompile a program just to change the config which is why I never tried Xmonad and went with i3/sway) and I think it prevents adoption outside the haskell circle. Right now I can't use purebred out of the box because of this line:
I am on nixos so such a path wont exist. What if I want to change this path ?
Describe the solution you'd like
Load config at runtime.
Describe alternatives you've considered
I think a better default might be just "sendmail" so that I can put it in PATH and purebred would work even on nixos without recompilation.
In general I wonder what the devs position are on this topic ?
The text was updated successfully, but these errors were encountered: