Live data from Hacker News

I'm “still afraid to use spaces in file names” years old

twitter.com

751–760 of 817 posts

Re: I'm “still afraid to use spaces in file names” years old

#751

Earlier quoted context omitted.

I'm not sure I'm a fan of the capitalization and spaces, other than that I'm all for more self-explanatory names.

Why not? That's how proper English text is written. Of course there are many programs that can't handle it properly (or handles it inconveniently) so in practice it might be problematic at times, but otherwise I see nothing wrong with it.

Generally just because typing it out with tab completion in zsh sucks, and I don't see a good solution (if it was solved nicely it'd be solved already)

Re: I'm “still afraid to use spaces in file names” years old

#752
post #320

Earlier quoted context omitted.

Behold! https://en.m.wikipedia.org/wiki/Filesystem_Hierarchy_Standar...

I've read that a handful of times (whenever trying to figure out where to put some new random thing), and still have never come to a clear conclusion. Even better, because there are so many similar places, you might choose completely different ones depending on the day of the week and your current mood. Too much choice for things like this is harmful IMO. Deep down I truly couldn't care less where the files end up, a…

> I've read that a handful of times (whenever trying to figure out where to put some new random thing), and still have never come to a clear conclusion.

So, given some data, say a file and/or directory, maybe from saving a Web page, that is relevant to subjects A, K, T, and Z, where in the file system directory trees to put that data?

My solution: Put the data in a directory for one of the subjects A, K, T, or Z without thinking very hard about which of these. Then go to a file I call FACTS.DAT (right, an old idea with an old 8.3 file name!). I maintain that file with a few, simple editor macros. So, sure, the file is a catch-all for entries of random short facts. And each entry starts with a time-date stamp and a list of key words. So, in the case of subjects A, K, T, or Z, include the key words appropriate for each of those. Then in the body of the entry, put the tree name of the file/directory where did store the data.

In a few seconds with my favorite text editor I can append an entry or search for an entry.

So far this year I have put 686 entries in the file FACTS.DAT for about 2.1 entries per day. For anything like current personal computers, handling such a file is trivial.

The idea works great!

Re: I'm “still afraid to use spaces in file names” years old

#753
post #631
post #480

Earlier quoted context omitted.

It’s not just you: Every distro is its own special snowflake and patches the programs they distribute to store files in a different place. The “standard” doesn’t tell you what directory structure to use inside /etc to group related config files. The “standard” doesn’t tell you where an HTTP server should serve its files. Everyone just does their own thing which makes upstream docs incorrect and useless for newcomers.

> The “standard” doesn’t tell you what directory structure to use inside /etc to group related config files. The “standard” doesn’t tell you where an HTTP server should serve its files. Everyone just does their own thing which makes upstream docs incorrect and useless for newcomers. The FHS, does actually answer both of of those questions. Files inside /etc/ should be grouped in subdirectories[0] andd the HTTP server…

"use subdirectories" is probably the most handwavey answer possible, aside from maybe "just put it somewhere, lol". I feel like the standard could provide some sort of guidance on how to name folders or something.

Re: I'm “still afraid to use spaces in file names” years old

#754
post #320

Earlier quoted context omitted.

Behold! https://en.m.wikipedia.org/wiki/Filesystem_Hierarchy_Standar...

Yeah, except that tells me nothing useful... The question is exactly the same: So where do I install this random binary I downloaded from the internet or compiled myself? Is it /opt, /usr/bin, /usr/local/bin, or /bin? Where do I put the dependencies I compiled for this software - /usr/lib, /usr/local/lib, /lib, /opt/lib, /opt/ /lib, or what?

Where?

See my post to this thread at

https://news.ycombinator.com/item?id=29198222

Re: I'm “still afraid to use spaces in file names” years old

#755
post #503

Earlier quoted context omitted.

"Persistent Temp" should be /var/tmp. "Persistent Temp" is also an oxymoron.

Basically no one uses /var/tmp for anything (and nobody should either). World writable directories are a mistake and only continue to exist because apps assume they are available. /tmp and friends are poorly named. They really should be /shared or /dmz or /freeforall or something. * If you need service-specific tmp space use RuntimeDirectory or PrivateTmp if your app is hardcoded to /tmp. * If you need service-specif…

> Basically no one uses /var/tmp for anything

Gentoo does, at least by default: https://wiki.gentoo.org/wiki//etc/portage/make.conf#PORTAGE_...

Re: I'm “still afraid to use spaces in file names” years old

#756
post #408

Earlier quoted context omitted.

All win32 functions that accept or return strings come in two varieties, with A and W suffixes, MessageBoxA/MessageBoxW. The A works with the system default 8-bit encoding (cp1251 in case of Cyrillic), the W works with unicode in wide chars. There shouldn't be much of a problem with string handling if you stick exclusively with W functions.

Using the W functions has been the advice from Microsoft's documentation for ages. But people still use the A functions because they're easier, especially when writing cross-platform software since Windows is the only major OS that made the unfortunate choice of having the base character type 16 bits wide. Fortunately the future of the Windows API does look better since Microsoft has now added proper UTF-8 support si…

> All you have to do is request it in the application manifest and the A functions will accept and return UTF-8.

They really should have gone with WTF-8 [0] since the W functions generally accept WTF-16 and not just the valid UTF-16 subset.

[0] https://simonsapin.github.io/wtf-8/

Re: I'm “still afraid to use spaces in file names” years old

#757
post #729

Earlier quoted context omitted.

So do I. I have a language, and I'm not afraid to use it. My computer should speak it just as well as I do.

There's a server at work that name with a non-ascii character. I've run into compatibility issues lots of times where I can't connect. I prefer to just use English with ASCII and be happy

Server names are different. They are by and large machine-facing identifiers, whereas filenames have a 50-50 split of whether they are machine-facing, human-facing, or both. They makes their support of Unicode a much more critical (and appealing) proposition.

Re: I'm “still afraid to use spaces in file names” years old

#758

Earlier quoted context omitted.

Seems like MS had the same idea according to an answer in the link: > Microsoft intentionally made programs install to C:\Program Files on Windows 95+ to force programmers to deal with spaces in filenames.

I just wish they had a decent way to execute programs with arguments that might include spaces. But no, every program can do argument delineation differently.

And Microsoft even provides three different slightly incompatible ways to parse arguemnts: CommandLineToArgvW, the CRT and cmd.exe.

Re: I'm “still afraid to use spaces in file names” years old

#759

Earlier quoted context omitted.

I mean, that's precisely my thoughts on copyright and licensing in general but what can you realistically do?

Realistically, on an individual scale, you can pretend it doesn't exist and go on with living your life?

I very much would if only that pesky State didn't persecute me for that. Apparently, when I refuse to acknowledge the copyright and software license terms, other people get upset to the point of bringing the wrath of that Leviathan of oppression upon me! The nerve of some people!

Re: I'm “still afraid to use spaces in file names” years old

#760
post #320

Earlier quoted context omitted.

Behold! https://en.m.wikipedia.org/wiki/Filesystem_Hierarchy_Standar...

Yeah, except that tells me nothing useful... The question is exactly the same: So where do I install this random binary I downloaded from the internet or compiled myself? Is it /opt, /usr/bin, /usr/local/bin, or /bin? Where do I put the dependencies I compiled for this software - /usr/lib, /usr/local/lib, /lib, /opt/lib, /opt/ /lib, or what?

Follow your distribution. For example Arch Linux provides PKGBUILDs for official repos and AUR. Most of the time someone has already published PKGBUILD, but if not I just patch accordingly.

And conditions that formed separation are long gone, Arch Linux symlinks most of it:

    /bin -> /usr/bin
    /sbin -> /usr/bin
    /usr/sbin -> /usr/bin

    /lib -> /usr/lib
    /lib64 -> /usr/lib
    /usr/lib64 -> /usr/lib
Post reply on HN