News for hackers. Stuff that matters.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by fezfight on Thursday August 11, 2022 @03:33PM (#32430660)
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 *.*
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by chasil on Thursday August 11, 2022 @03:58PM (#32430977)
As 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');
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by fezfight on Thursday August 11, 2022 @04:38PM (#32431430)
Good tips, thanks! I love sqlite3.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by NavinF on Thursday August 11, 2022 @04:18PM (#32431207)
Yes! 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.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by codedokode on Thursday August 11, 2022 @04:49PM (#32431527)
You 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.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by hsbauauvhabzb on Thursday August 11, 2022 @04:28PM (#32431298)
No need to get passive aggressive, parent has a legitimate point. Grep is a huge part of my workflow.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by NavinF on Thursday August 11, 2022 @05:45PM (#32432101)
Ah 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.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by fezfight on Thursday August 11, 2022 @09:49PM (#32433953)
I 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!
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by fezfight on Thursday August 11, 2022 @04:37PM (#32431404)
Snowflakes are beautiful.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by flukus on Thursday August 11, 2022 @11:40PM (#32434486)
Better yet, put it in a .rec file for the best of both worlds: https://www.gnu.org/software/recutils/