370 karma · joined August 11, 2014
From an economic perspective, we live in a world of supra-national companies. To have leverage when negotiating with the likes of Amazon or Google the UK needs to work with other countries to avoid a race to the bottom on working conditions, taxes and so on.
Its the same for trade. When we're not tied by EU legislation, the UK may keep going economically, by building a low tax imitation of the US with shorter holidays, poorer healthcare, welfare etc. But I think the world is a better place for having the EU as standard bearer for a fairer kinder society. Not perfect for sure, wasteful definitely (as is all government). But also holding hope that as human beings we're able to identify with a bigger picture than the tribal nationalisms we grew up with.
e.g.
SELECT sum(bytes) FROM files
GROUP BY extension
ORDER BY sum(bytes) DESC;
You can GROUP BY any file attributesThe set based paradigm of SQL lends itself very well to reporting and processing files, and is known by 7 million people.
SELECT extension, count(*) FROM files GROUP BY extension ORDER BY extension;
We built a tool, free for personal use, that does SQL at the command line
We built a SQL tool to run at the shell prompt, Crab. It's free for personal use, and designed to make this easier.
The theoretical limit is around 9PB, but we don't know what performance would be like at this scale.
A one TB spinning disk drive takes about 30 mins to scan, several thousand files per second, and query performance is very good. Most people scan project directories on demand, and the whole disk once a week or so. SSDs are much faster of course.
There is a restriction on the maximum number of files acted on by one query (e.g. moved, deleted, renamed), as the exec() function caches the list of files in memory. On macOS we're ok with tens of millions of files, but the first Windows release, due any day now is 32bit (we're fighting compiler issues), so the limit is around a million files.
Bash is such a pain because of all the incompatible utilities. Its much nicer just to think about logic than to be searching for command switches and dealing with corner cases like .. file names that contain spaces(!)
Free for personal use, $5 / month commercial
Finding files is pretty straight forward using the LIKE operator against text in the filename, path or file contents. And the set-based logic of SQL works very well for identifying sets of files to work with: we have an exec() command that lets you run commands on file paths returned in query results.
License terms are free for personal use and $5/month commercial.
We don't have good general theories about how brains work, so a good place to start is from the bottom up.
For me the benefit is that for lots of problems, whether databases or the filesystem, thinking in terms of sets feels really natural. I can't imagine why you'd want to pipe grep results to grep -v rather than say "and not"
I guess we all prefer the language whose syntax we know the best.
etia.co.uk
Really it shouldn't have to be this hard.
There is a wrapper function 'metadata' which returns a specific metadata item from a file at a given path at query run time, but this basically runs mdls under the hood.
Crab can handle extended attributes using the EVAL function function which runs an OS command and returns the result as a string. But you have to parse the string, for example to return the size of a resource fork:
select bytes + coalesce(matchedgroup(eval('ls','-l@',fullpath),'.com.apple.ResourceFork\t(\d+)'),0)
We can scan mounted drives, and Crab has a command line switch to treat names as case sensitive or not. SHA-1 calls are probably not practical across a network to compare file contents, even scans can be a bit slow, but you might do something by comparing file sizes.
It didn't use string matching to identify subsets of files to query.
And maybe the most important thing, it doesn't have the exec function to run operating system commands on the files you get back in your query results.
For example wildcard matching on paths, combined with the exec function to run OS commands on the files you get back.
It's especially handy to see what is going on if you wrote it a month ago, and don't remember all the command line switches.