4 ms·
Better yet, a flat file structure that you can grep with standard utilities. We can put it somewhere convenient, like in dot files in the users home directory.
by fezfight 4y ago
Better yet, a flat file structure that you can grep with standard utilities. We can put it somewhere convenient, like in dot files in the users home directory. We can even add them to git with something simple like git add *.*
- chasil 4y agoAs tempting as that may be, the ability to enforce ANSI SQL constraints (not null, unique, check, foreign key, etc.) could prevent many types of configuration errors. If you want to grep everything in a sqlite database, then ".dump" it. $ echo "create table myconfig(param text, value text); insert into myconfig values('scrollbar', 'wide'); insert into myconfig values('verbose', 'no');" | sqlite3 myconfig.db $ sqlite3 myconfig.db '.dump myconfig' | grep verbose INSERT INTO "myconfig" VALUES('verbose','no');
- fezfight 4y agoGood tips, thanks! I love sqlite3.
- NavinF 4y agoYes! Let's also make every config file is its own special snowflake with its own syntax, keywords, and escape characters. That way, it's much harder for software to interact with these files and humans will have to write config templates for each deployment. Oh and we might as well store these config file in a different place on each distro and move them around once in a while just to keep things interesting. Users can ignore upstream documentation and just strace the process if they wanna know where the files are this year.
- deleted 4y ago[deleted]
- hsbauauvhabzb 4y agoNo need to get passive aggressive, parent has a legitimate point. Grep is a huge part of my workflow.
- NavinF 4y agoAh I left out a few sentences. My passive aggressiveness is directed at the state of Linux distros today, not at the parent. I agree that his scheme is a lot better than the mess we deal with today. > Grep is a huge part of my workflow. You can flatten and grep structured binary formats too.
- fezfight 4y agoI honestly feel like you were just matching the tone of my comment so no harm done really. Mine was smarmy, yours passive aggressive. Its like a 90s sitcom in here!
- fezfight 4y agoSnowflakes are beautiful.
- codedokode 4y agoYou are suggesting good ideas, but we should go further. Let us write configuration files in Turing-complete exotic programming languages that almost nobody knows! This way malicious programs won't be able to parse them or perform automated edits, and many malicious humans too.
- flukus 4y agoBetter yet, put it in a .rec file for the best of both worlds: https://www.gnu.org/software/recutils/ https://www.gnu.org/software/recutils/