Live data from Hacker News

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

twitter.com

61–70 of 817 posts

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

#61
post #33

Earlier quoted context omitted.

Hmmm, I thought I was fluent in Romanian (born there and lived there for 26 years), but I only know 5 of those 8 words...

According to Google Translate the first two are "girl" and the rest are "face". =)

Google Translate is a horrible tool for "translating" single words or lists of unrelated words.

Use a proper dictionary for that. The very nature of statistical models makes proper translation without context impossible for these systems, especially when uncommon words and diacritics are involved.

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

#62
post #5

Slightly off topic but I find myself stuck at being "please for the love of god don't use spaces in git branch names" old. Anno dazumal this might not even have been an issue and I'm just cargo culting.

And on that topic, git branches are case sensitive but windows filesystem API isn't. Git branches are materialized on the filesystem as files and directories.

The Windows filesystem API supports CS file- and directory names just fine.

It can be enabled on a per-directory basis like so:

> fsutil.exe file setCaseSensitiveInfo C:\folder enable

NTFS had support for this for decades now - it was designed that way to be POSIX-compliant.

It's shoddy software that lacks support for it, not the OS or the file system.

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

#63
post #22

This is a UI/UX problem that I only face when dealing with shells and shell scripts. Never had any issues when spawning processes from within languages/runtimes that support sane argument arrays. sh , bash and cmd.exe are shit. The shell needs serious rethinking.

This is a difference between $@ and "$@" (note the quotes):

  $ cat proba.sh 
  #!/bin/sh
  echo "Using quotes:"
  for i in "$@"; do echo "$i"; done
  echo "No quotes:"
  for i in $@; do echo "$i"; done
  $ ./proba.sh "ho ho ho"
  Using quotes:
  ho ho ho
  No quotes:
  ho
  ho
  ho

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

#64

Remember when we put + instead of %20? Spaces in URL's are still a nightmare IMO. I still get strange access log entries where some encoding went lose, especially in heavy Javascript enviroments. Same goes for capitalisation. All filenames should be lowercase. Maybe it's not strictly necessary, it can avoid headaches.

Plus sign actually came from https://en.wikipedia.org/wiki/Query_string#Indexed_search

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

#65

I'm hardly afraid but I just think it's poor ergonomics. Same as the move from xset m 0 0 to xinput --set-prop 'pointer:Logitech USB Receiver' 'libinput Accel Profile Enabled' 0, 1 Everything seems to be going this way in Linux land. Longer names, harder to type names, camelcase names, spaces... I'm looking forward to an OS that treats command line ergonomics as a first class feature and where camelcase & spaces are…

I've a feeling you will hate powershell

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

#66
post #13

All because we use programmatically interfaces that were intended for humans to write: command line, sql, html, email headers.

It's worse than that. Whitespace is a hellish invention in the world of computers: there are multiple characters that may or may not render as whitespace with no way to distinguish them by just looking at the output.

Yet to the machine (script, shell, program, ...) it matters a lot, since u0020≠u0009≠u00A0≠u2000≠u2001, etc. whereas the aforementioned codepoints render like this: " " (and yes, that's indeed the five codepoint in that order - at least I typed them that way).

(Ab)Using whitespace like that can lead to all sorts of funny business, not just when dealing with shell scripts and variable expansion.

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

#68

Earlier quoted context omitted.

I could infer a lot about the second and what those params mean and what they do. The first one is some magical incantation.

Sure. One could also make "move-down-one-line" be the incantation to move the cursor down a line in vi, but I prefer j. Ergonomics isn't all about making everything self-descriptive for someone seeing the thing for the first time. It's about making things comfortable to actually use. If it's so long and complicated that you can't even remember how to do it, it's not very comfortable to use. Even if I could remember,…

It should be based on frequency of usage. I can tell you that moving down a line in vim is a little more common than toggling the mouse acceleration.

I would never even type such a command. I would just copy paste it once.

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

#69
post #24

I'm hardly afraid but I just think it's poor ergonomics. Same as the move from xset m 0 0 to xinput --set-prop 'pointer:Logitech USB Receiver' 'libinput Accel Profile Enabled' 0, 1 Everything seems to be going this way in Linux land. Longer names, harder to type names, camelcase names, spaces... I'm looking forward to an OS that treats command line ergonomics as a first class feature and where camelcase & spaces are…

What's wrong with camelCase? It's easier to type than snake

camelCase is objectively harder to read than snake_case or kebab-case, though familiarity can mitigate that.

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

#70
post #29

One of the main reasons why Windows used "Program Files" and "Documents and Settings" was to force the programs (and programmers) to deal with paths with spaces. And you know, for the most part it kinda, more or less worked out although of course even today you will find programs that ask you to install them in a folder without spaces in the path.

VFAT and stuff like that actually provided alternate names like PROGRA~1

Yes, I was doing code to quickly read FAT folders (on a micro controller) and got to the bit about filenames more than 8.3. I decided my life was too short (and processing time) to go and sort out what the "real" file name is. Enforced 8.3 as a requirement!
Post reply on HN