« first day (3839 days earlier)      last day (1108 days later) » 

5:54 PM
@ilkkachu: That statement actually seems to properly (not) use the oxford comma
- Brace expansion
- tilde expansion
- parameter and variable expansion
- arithmetic expansion
- command substitution
- word splitting
- pathname expansion
actually nvm I see what you mean
 
6:14 PM
@jesse_b see also the comment I just wrote there
 
yeah I just feel it's kind of a weird question. One could also say why doesn't the shell try to treat echo $(ls) as the expansion of a variable named (ls). As if the shell is incapable of doing a little bit of logic on what follows $ in order to know how to treat it
 
I would have expected the same longest prefix match that makes cat <<(echo foo) an error instead of a redirection from a process substitution.
But other than Dash and Busybox, the shells I have actually do some guesswork with $( vs $((. In the others, echo $((echo hi); (echo ho)) prints hi ho instead of dropping an error for a totally broken arithmetic substitution.
 
interesting
I feel like a supreme court justice analyzing the grammar of the bash manual to this detail. You have the right to bear arithmetic expansion
 
6:38 PM
Hello
 
wat it do
 
Many of Apple's applications have files named with UUIDs. Often, they will put them into folders based on the prefix. For example, the "A" folder will contains all files with UUIDs starting with "A", the "B" folder with contain all files with UUIDs starting with "B". I am wondering why they do this. Does it somehow make file accessing quicker?
Does the file system take longer to read directories with large numbers of files?
 
17
Q: Millions of (small) text files in a folder

user1717828We would like to store millions of text files in a Linux filesystem, with the purpose of being able to zip up and serve an arbitrary collection as a service. We've tried other solutions, like a key/value database, but our requirements for concurrency and parallelism make using the native filesys...

7
Q: What is the "cost" of deeply nested folders in ext4?

MartinI was running into performance problems with hundredthousands of files in single directories when I needed to do certain wildcard matches. From my applications point of view, a simple solution is to place the files in deeply nested folders. The expected upper bound for the total number of fol...

(I'm unfamiliar with the filesystem(s) that Apple uses, so the above are just examples)
 
interesting, thank you @JeffSchaller
Apple uses a proprietary file system
 
I don't know if the question would be on-topic, but there's Ask Different
"why" is hard, unless one of Apple's developers is a regular there
 
6:48 PM
why apple does anything is hard
 
Yes. I figured it was something related to file systems which I thought would fit more in Unix/Linux.
Also they ban "why apple" questions :D
 
it seems less likely that /dev/chat's inhabitants have more insight, but... you never know! :)
 
 
1 hour later…
7:55 PM
4
Q: Storing thousands of files in one directory

rinchikI have a web-site that I'm checking for performance issues and bugs, and i came across a caching code that caches thousands of files into one single directory. I understand that this is not good and that I/O will degrade and i also heard about potential inode problem. And i know how to fix the ...

In general, you want to avoid storing many thousands of files in a single directory. The approach with hashing the data and storing the files in two or three levels of subdirectories is a common workaround. It's not just Apple that does this.
The first time I came across this was when using the squid web proxy (in the 1990s?). It stores its cache files in this manner. The most recent example that I've come across is the backup repository managed by restic, in which the deduplicated data blobs are stored in a similar manner.
 
it's really, really, really common. In some systems you even see users' home directories stored like that, e.g. I could be /home/i/l/ilkkachu.
(ok, maybe not double really, but definitely not exceptional.)
 
8:41 PM
@ilkkachu This seems to be a POSIX incompatibility for Dash which they really ought to fix (even though a conformant script could never encounter it)
 
8:52 PM
another reason to hate dash
 
9:19 PM
@MichaelHomer mm. On the other hand, every shell I tried gives an error for $((echo true)). I can't tell how that could be parsed as an arithmetic either, but I'm also not sure how that "shall only parse [as CS] [if can't parse as AE]" should be read...
 
9:42 PM
@ilkkachu All the implementations seem to be just looking for unmatched ) prior to )), which doesn't really seem to go all the way there either, but it's an attempt. Interesting cases are echo $((echo 1;(:)) ) and $((foo(){ :;}))
 
@MichaelHomer no offense, but can I just say "yuck" to those two expressions? :D
 
@Kusalananda now that you mention it, git blobs also reside in 2-length hexadecimal subdirectories
 
personally, I wouldn't mind if $(( was always an arithmetic, even if it results in an error later...
 
I learned about "thousands of files in one directory (on ext4)" the hard way. Took me half an hour to find out where that 40 MB came from in an empty directory.
 
@ilkkachu Yeah it would make more sense and if you really had to open a command substitution with a subshell you could do $( (
which actually works
$ echo $( ( 1+1 ) )
1+1: command not found
 

« first day (3839 days earlier)      last day (1108 days later) »