Live data from Hacker News

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

twitter.com

341–350 of 817 posts

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

#343
post #190

Earlier quoted context omitted.

You know, this makes me wonder.. tangentially speaking- I wonder how hard it would be to rearrange the folder structure in linux so that I have something like this: /Users/{root, user0, user1, ... }... /System/{Logs, Apps/{opt, container, ...}, Temp, Conf ...}... /Devices/{Mount, sda, sdb, null ...}... /Boot/...

GoboLinux does exactly that: https://en.m.wikipedia.org/wiki/GoboLinux

How do you deal with lack of being able to just point to "/usr/lib/include" or other things when saying "here's my directory of shared libs"?

This is definitely interesting though, and an improvement I would say

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

#344
post #145

I have an uneasy feeling whenever I see a path parameter declared as string. Path is not a string - it's a sequence of path components and should be treated as such by our APIs. A path should be parsed once - on user input - and then used in its "sequence form" throughout the software stack. And "path component" is not an arbitrary string either - e.g. appending a path component to the path should first require conve…

"Path is not a string - it's a sequence of path components and should be treated as such by our APIs." For maximum correctness, you want to turn it into a file handle as soon as possible, and do all operations through the variations of the file functions that end in "at", like: https://linux.die.net/man/2/openat The downside of this approach is that you still technically have to carry the path around with you if you…

This goes for most instances of user input. Timestamps is the other common one people get wrong. I've even seen programs that pass around timestamps as strings in multiple formats and as integers (Unix time).

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

#345

Earlier quoted context omitted.

You get all those space characters working and then some jerk comes along and uploads a file like this: ŗ̶̧̢͓̳͍͙͔̳̻̥͉̭͓̫̟͍̞̭͉͓͉̮̹͍͚̳̹̬͉͚̰͈̘̐̊̾̈̀̒͒̀͛̓̋̔͊̏͘̚ę̴̨̛̣͙̤̟̬̩̟͙͖̥̹̱̱̊͑͗̇̇͛̆̈́̃͋̓̀̔̍̍̌̐͊̎̓̅̀̕ͅģ̴̹̜̘͍̱̑͐̉̌̐̄̊͛̎́̐̌̅̈́͂͑̈́̋̔͂̊̊̒̒̔͛͆̚͘̕͠e̶̙͕̫̳̘͐̾́̑͆̓͂̿͊̊̍͛͐̌̆͗̌̅̅̔͊̂͛͗̅̕͝͝͝͝x̵̢̧̦̫͖̝̥̹͓̬͖̤̩͚̝̫̋̃̅̈́̆͋̌͑́̎̈́̊̾͒̀̒̎̓͛͊̿̓͊̀̍͐̆̚͝͝-̴̨̮̯͖͖̠̜̲̪͕̘͈͖̮̈́̓̐̃́̅̄̏́̍̉̐͌́̔̓̄͋͗̐̕͜͝ţ̴̢̧̖̗͖̞̮̫̦̼̝̺̼̱̳͓͉̜̟̤̲͖̻͙́̌̈̌̈͆̾̄͊̿̏̓͗̈́̕͜ͅh̶̽́͊̎͐͌̆̍̎̏̕͝…

Honest question - what the heck are those characters?

In digital typography, combining characters are characters that are intended to modify other characters. The most common combining characters in the Latin script are the combining diacritical marks (including combining accents).

https://en.wikipedia.org/wiki/Combining_character

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

#346

Earlier quoted context omitted.

If you hadn't heard kebob-case called that before there's a chance you haven't heard SCREAMING_SNAKE_CASE called that before, and I couldn't live myself if I didn't let you know.

that's hilarious, thanks for sharing that. Perennially relevant xkcd: https://xkcd.com/1053/

Awe, in turn I have never seen that particular xkcd—it's great! I learned to call it "feigning surprise" and I always try and be conscious of it (though I still catch myself doing it from time-to-time).

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

#347
I always format my filesystems (macOS) as case sensitive and I'm surprised by the software that has a hard time with that.

On Unix/Linux we've grown up with case sensitive by default but everywhere else it still seems to be a problem now and again.

I should qualify this...I'm en-US so I have no idea what the experience is like for anyone else.

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

#348
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?

Wherever you want. All of the above, or none. It really is up to you.

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

#349
post #348

Earlier quoted context omitted.

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?

Wherever you want. All of the above, or none. It really is up to you.

That's exactly the problem. This leads to mess. The Windows model of C:\Program Files\ is much better.

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

#350

Earlier quoted context omitted.

I wonder if code to this effect has ever been written before for (int i = 1; i

And that, children, is when marginalia_nu unlocked the seventh circle of the inferno. Tomorrow we'll read the story of how our new demon overlords forced us all back to Windows 3.1.

Win 3.1? on DOS 6.22? Actually, this sounds like heaven. Just don't put it on the public 'tubes.
Post reply on HN