From: Christopher Browne <cbbrowne@gmail.com>
To: "Michael Kjörling" <michael@kjorling.se>
Cc: tuhs@minnie.tuhs.org
Subject: Re: [TUHS] A question about ls(1)
Date: Mon, 29 Apr 2019 16:44:59 -0400 [thread overview]
Message-ID: <CAFNqd5UPm_U22wYda5HjVQRQiM_85fq5JLR+24Y0NteipQ99Og@mail.gmail.com> (raw)
In-Reply-To: <20190429180512.q2jrlsyhvb7cx4ev@h-174-65.A328.priv.bahnhof.se>
[-- Attachment #1: Type: text/plain, Size: 3554 bytes --]
On Mon, 29 Apr 2019 at 14:15, Michael Kjörling <michael@kjorling.se> wrote:
> On 28 Apr 2019 13:00 -0700, from bakul@bitblocks.com (Bakul Shah):
> > IMHO separate files are fine but it would've been nice to
> > a) have a place other than $HOME to store these files and
>
> XDG already does that. At least Norman already mentioned ~/.config in
> this thread.
>
> https://www.freedesktop.org/wiki/Software/xdg-user-dirs/
>
> Not sure how common that is on non-Linux systems, but it seems pretty
> common on modern Linux distributions.
>
That's application-specific, not distribution or OS specific.
I have 58 subdirectories of ~/.config on my workstation at work; that's not
deviating much from your case; 58 directories (indicating about 58 apps),
2047 subdirectories, 7422 files, 481MB of data, the largest bits being
cache data for Google Chrome web browser.
> My workstation Debian system has a staggering 3467 files in that
> directory, spread around 444 directories (75 directories directly
> under ~/.config). Plus another 142 dot-directories and 66 dotfiles in
> ~/. Now, ~/.config typically uses multiple files per application, and
> at a glance there's some stuff there that could definitely go, but I
> still shudder to think of having all of those directly under ~/, so
> it's clearly doing _some_ good in that regard.
>
I have had little reason to worry about this; I tend to concur.
> > b) a standardized plain text format
>
> I'm not sure about that; different applications have very different
> needs, and trying to shoehorn one into another would be ugly; quite
> possibly even more ugly than just having different formats.
Yeah, the time they tried doing that, we got "XML everywhere," and
that wasn't a notable improvement.
What you see on mobile devices these days is that the ".config/" file
is a SQLite database, which is where both configuration and application
data are captured.
As someone that spends a great deal of his time writing SQL code,
I find that not too heinous; others might disagree. I think having a
SQLite file is better than getting some heinous XML file.
(Especially if the XML file is some thinly disguised serialization of
a hierarchy of COM objects, where modifying element order would be
liable to make your Windows application blow up.)
The "mobile platforms" have gotten quite a lot of milage out of using
SQLite databases (true both on Android and on iOS); there could
be worse things.
The SQLite web site does have a page somewhat proselytizing
this: https://sqlite.org/appfileformat.html
I heard D Richard Hipp (author of SQLite, now head of the dev team)
explain this at PGCon 5 years ago <
https://www.pgcon.org/2014/schedule/events/736.en.html>
He also contended that the world might be a better place if LibreOffice
documents were captured as SQLite databases rather than being bundles of
XML stored in a .zip archive. That's a nice lively argument to have.
Actually poke at the slides at PGCon 2014; he makes similar arguments
about git repos (what if metadata were in a database?) and ePub book
files.
If we were going to forcibly shoehorn everything into one thing, I think I'd
rather that than a lot of the alternatives. But I'm admittedly excessively
comfortable with SQL ;-)
I can live with us having a number of data formats, particularly if
they remain simple.
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"
[-- Attachment #2: Type: text/html, Size: 5102 bytes --]
next prev parent reply other threads:[~2019-04-29 20:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-28 16:54 Norman Wilson
2019-04-28 19:45 ` Jon Forrest
2019-04-28 20:00 ` Bakul Shah
2019-04-29 18:05 ` Michael Kjörling
2019-04-29 20:37 ` Warner Losh
2019-04-29 20:44 ` Christopher Browne [this message]
2019-04-30 6:44 ` Michael Kjörling
2019-04-30 7:24 ` Kurt H Maier
2019-04-30 10:35 ` Wesley Parish
2019-04-29 22:32 ` Bakul Shah
2019-04-30 11:52 ` Theodore Ts'o
2019-04-28 22:16 ` Thoma Paulsen
2019-04-29 0:53 ` John P. Linderman
-- strict thread matches above, loose matches on Subject: below --
2019-04-27 23:03 Noel Chiappa
2019-04-27 20:11 Norman Wilson
2019-04-27 14:16 Anthony Martin
2019-04-27 15:38 ` Warner Losh
2019-04-27 15:42 ` Larry McVoy
2019-04-28 23:59 ` Warner Losh
2019-04-28 11:47 ` Dan Cross
2019-04-28 12:00 ` arnold
2019-04-28 14:44 ` jcs
2019-04-28 16:15 ` Bakul Shah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFNqd5UPm_U22wYda5HjVQRQiM_85fq5JLR+24Y0NteipQ99Og@mail.gmail.com \
--to=cbbrowne@gmail.com \
--cc=michael@kjorling.se \
--cc=tuhs@minnie.tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).