16
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 06 Jan 2025
16 points (100.0% liked)
TechTakes
1562 readers
154 users here now
Big brain tech dude got yet another clueless take over at HackerNews etc? Here's the place to vent. Orange site, VC foolishness, all welcome.
This is not debate club. Unless it’s amusing debate.
For actually-good tech, you want our NotAwfulTech community
founded 2 years ago
MODERATORS
I personally disagree. I think in the era of "a megabyte is big," this made sense, but in my opinion after parsing a config file with missing config data, we should print something indicating they are missing then error out. The existence of a reference config file with all options included would definitely help, but I think it's no coincidence that there is no such config for mpv
why bother creating and maintaining one if the program will use the default value anyway?
tl;dr explicit is better than implicit
I dunno, MPV has like a million config options and I've set like three of them in my config. I would not prefer to maintain an enormous config file where I need to include a bajillion options I don't care about just to play a video. Would I have to update my config every single time MPV adds, removes or renames an option, too?
At the end of the day you shouldn't have to maintain anything in order to use a program, in my opinion (at least ideally). I think a "everything must be present in the file" type of config would require ~~less~~ no extra maintenance (assuming devs don't do anything too silly). Additionally, while noting that my primary programming language is TeX and also that I am a dipshit, this just strikes me as an API-design problem. Alternative solutions could be:
I have thought about doing #3 for Sway (a sort of Sway-config editor). This does give me an idea, though: define a meta-format for specifying the variables, default values, allowed values, etc., for an arbitrary^[0]^ program's config file, and create a program that reads a meta-format file and presents a GUI for editing the config.
tbh i just lost my config file, forgot what i changed, and now i have to read documentation (and figure out which file the mpv flatpak uses for config)
[0]: maybe not too arbitrary
I’d kinda love this even if I’m editing config files in a text editor. emacs could use this with a major-mode or LSP to provide suggestions, validity checking, various rendered versions of the config, and guarantee interoperability with graphical tools (so that changes you make in an editor don’t get trampled by the UI, and vice versa)
I need an excuse to learn Rust and have wanted to do a "parse, don't validate / make invalid states unrepresentable" project for a while. I will definitely share it if I get anything done.
definitely! that sounds like a great first Rust project.