« first day (3300 days earlier)      last day (21 days later) » 

cas
2:28 AM
@FaheemMitha Norman Invasion, 1066. The Normans (French) won and spoke French because they were French. so, yeah, there are historical reasons for French being the language of the elite in England.
and, yeah, many of the ruling classes of french normandy were descendants of vikings, but the majority of the remainder - peasants and soldiers, etc - weren't.
 
 
6 hours later…
8:19 AM
@cas I see. That's interesting.
 
8:34 AM
Was there a question (and answer) about properly quoting arbitrary filenames for shell processing? i.e. change single quotes to '\'' and surround with single quotes and how to do that? Or did even that leave issues...?
 
cas
@ilkkachu general consensus is to use NUL to separate filenames. anything else is problematic and/or tediously difficult to get right. also, most attempts tend to result in ugly/unreadable code.
in short -not worth the effort, use NULs.
 
@cas That's not what I asked.
 
cas
i know. it's the best answer you're going to get though. trying to escape and/or properly quote filenames is a pita that isn't worth the effort. using NUL as separator is trivially easy and works painlessly with any filename, not just those that you remembered to handle correctly.
 
@cas Except that you can't use NUL separators if you're passing something for the shell to process. I know the issues, I know it would be better to not have to do that. But I didn't ask for how to do it, or if there are better ways to do it, I asked if there was a question and answer on the site about that.
I'm pretty sure there is, I just couldn't find it.
 
cas
you CAN use NUL separators when processing filenames in sh. You just can't store a NUL in a string.
 
8:43 AM
Gilles has a canonical Q&A here:
287
Q: Why does my shell script choke on whitespace or other special characters?

GillesOr, an introductory guide to robust filename handling and other string passing in shell scripts. I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names). I encountered a problem such as the following: I have a file name containing a spa...

 
cas
There are hundreds of such questions and answers. Most of them link back to Why not parse ls (and what to do instead)? and/or Why does my shell script choke on whitespace or other special characters?
 
This is also worth bearing in mind:
207
Q: Security implications of forgetting to quote a variable in bash/POSIX shells

Stéphane ChazelasIf you've been following unix.stackexchange.com for a while, you should hopefully know by now that leaving a variable unquoted in list context (as in echo $var) in Bourne/POSIX shells (zsh being the exception) has a very special meaning and shouldn't be done unless you have a very good reason to....

 
@StephenKitt duh of course. The problem with that answer is that it contains everything, so it's hard to link to some specific part.
And I've read it, I still don't remember everything it does contain.
 
@ilkkachu yes, it’s a lot to parse in one go :-/
 
@cas the questions where you can do something more sensible aren't very good as reference points if you're trying to discuss the issues of doing it (and how to do it right) in this particular way.
And that "Why not parse ls" question should be shot and buried in a back yard and never linked to any new user. Why? Because the Q starts with a multi-page rant about a seriously convoluted way of actually doing it safely with ls, and that's not really something one should suggest to anyone, let alone newbies!
 
cas
8:50 AM
1. there is no right way of doing it. it's a "don't do that, then" problem. and usually an XY problem too.
2. the why not parse ls Q is useful because it does start with a rant, listing most of the bogus excuses for parsing ls instead of doing something sane....and then all those excuses are systematically demolished and disproven.
 
All of these are Q&As full of useful content but presented in a way which doesn’t work; they should really be multiple Qs&As, all connected (maze of twisty little passages, anyone?). They would make good chapters in a book, with a connecting narrative...
 
@cas I violently disagree. I'm talking about newbies, the run-of-the-mill questions here where the user in question isn't very well versed in all this. They won't be able to parse all that. What they would need is "just use for f in ./* instead of for f in $(ls)". That doesn't even require any demolishing, it just works. And it doesn't help that the accepted answer there forks off to Python instead. IMO, Greg's wiki has a way better source, here: mywiki.wooledge.org/ParsingLs
 
cas
good for you. i violently disagree with your violent disagreement.
(the word you are looking for is, i hope, "vehemently", not "violently").
 
No, it's "violently".
 
cas
++good for you then. I hope you have something breakable within reach, then.
 
8:58 AM
plain vehemence doesn't suffice to describe my feelings on that ls-torturing rant :D
@StephenKitt yeah. Anyway, thank's for reminding me to look in the obvious place.
 
 
3 hours later…
12:23 PM
@ilkkachu there's unix.stackexchange.com/a/67820/117549 perhaps?
 
 
4 hours later…
4:04 PM
@JeffSchaller the quoting for xargs? I'm not sure if it's the same quoting with it and the shell. And that .//. trickery shouldn't be needed with the shell. I mean, if you have the filenames as distinct strings at hand, and just need to embed them correctly in a shell script.
 
4:20 PM
@ilkkachu that was the extent of my google-fu today; sorry!
 
 
4 hours later…
8:12 PM
@FaheemMitha just heard of another open source project being funded by taxpayers... trustedreviews.com/news/… browser.mt cordis.europa.eu/project/rcn/219608/factsheet/en to the tune of €3 million
 
@derobert Machine translation? I.e AI?
 
Goes under that umbrella, yeah.
(Though I don't think anyone has ever mistaken machine translation for intelligent, or even intelligible.)
 
@derobert It's leftover terminology from a more hubristic time.
Still think someone should give money to the folks in the trenches.
Jordi on #mercurial just introduced me to something called the Fediverse.
I'd not heard of it before, but then, I don't get out much.
 
@FaheemMitha It would be nice. Feel free to try to convince your government :-/
 
Sounds like a SF/Fantasy thing, but apparently it's a decentralized social networking thing.
@derobert Who, India? You've got to be kidding.
They're mostly interested in cows, statue building, and baiting the Pakistanis.
Oh, and their rich pals. Mustn't forget about them.
 
8:27 PM
@FaheemMitha There are a couple like that, but personally I've never really gotten the huge appeal of social networks...
 
@derobert They can be occasionally useful. It's what people have been using to organize support for that bank thing. Personally I find they make rather dreary reading.
BTW, looks like this bank this is escalating. The govt is still not talking. Interesting times.
My working theory is that the BJP wants to destroy the cooperative bank system. It doesn't fit in their vision of a new India, or something.
It would explain their unusually ham-handed handling of this crisis. Actually, it would go some way towards explaining demonetization too.
In "Understanding Power", Noam Chomsky said something like: if you want to know why something was done, a good start is to see what effect it had.
That's not the exact quote, but close.
bank this -> bank thing
Personally, I think he gives people like the US Govt too much credit, but he does have a point.
 
8:47 PM
@derobert BTW, my question was downvoted and put on hold. Presumably closed now, though I haven't checked.
 
@FaheemMitha on hold == closed
It's just a different label, forget the exact conditions (first few days, low enough rep, etc., some combination of stuff like that)
 
Well, this is unfortunate. Apparently even local (Indian) branches of foreign banks operating in India only have the 1 lakh cover from DICGC.
Then again, I suppose there is nothing to stop the foreign banks from providing their own cover for account holders in their bank.
Something to check on...
@derobert Yes, I realise the difference is cosmetic.
 
@FaheemMitha Question would be whether you're covered by the foreign country's deposit insurance.
 
@derobert Exactly. And it might depend on stuff like whether the foreign bank in India is really the foreign bank or some kind of separate thing. Like a franchise. Though I know little about how banks work.
 
(E.g., you don't have to be a US citizen or resident for the FDIC to cover your deposits; search fdic.gov/deposit/deposits/brochures/… for resident)
@FaheemMitha A subsidiary or someone licensed to use the name, or something like that
 
9:00 PM
@derobert Happily, I'm in one of the best places in India to use foreign banks.
So I probably have some choices.
@derobert Right.
 
I would assume that if foreign deposit insurance is available, those banks would advertise it. (And of course you should check with the foreign insurance to confirm)
 
@derobert Thank you for the link. That's helpful.
@derobert Right. One would hope that those banks wouldn't depend on Indian insurance to cover their Indian account holders in case of a problem. But that's obviously an important question to ask. Hopefully they won't lie about it. I guess I'd just need to ask to see the paperwork.
I would imagine something like that would need to be mentioned, one way or the other.
 
Ask to see it, and confirm it with the insurer.
 
@derobert The insurer? You mean in the foreign country? Are they usually private or govt?
 
@FaheemMitha Yeah, the foreign country (well, the particular government agency). Up to you whether you're OK with a private insurer vs. one backed by a government.
 
9:05 PM
@derobert Dunno. Does private vs govt make a difference?
 
@FaheemMitha Well, a random insurance company going bankrupt is a lot more likely than, say, the US government.
 
The FDIC appears to be state-owned at least. Which presumably is a good thing.
 
Yeah, FDIC is part of the US Federal Government.
 
@derobert Right. So a govt, like, say, the Singapore Govt., would be better than some Asian insurance company. For example.
I thought that homework ended with school. But actually, it just gets worse afterwards.
Also, in school, they don't lie about the answers.
 
@FaheemMitha Well, I don't know the details of the Singapore government. There are definitely insurance companies more stable than some governments.
In this case, you can outsource some of your research to bond markets. Broadly speaking, higher yields = more risky government
(Or insurance company, for that matter)
 
9:10 PM
@derobert I don't understand what you mean. You mean, I should look at the bond yields issued by the govt in question?
To determine how likely the govt is to fold/collapse?
 
Yep, basically.
Fold or take other action that might hurt (e.g., devaluing their currency by going on a printing spree)
 
So that would be roughly the market's determination of that.
 
And well, governments seldom just fold, but they do just sometimes stop paying their debts.
 
Singapore was just an example. But not a random one. DBS has a branch here. I actually talked to someone there a few months ago.
@derobert Right. Has the US govt ever done that?
For some reason, a lot of foreign banks have branches at Nariman Point. Which happens to be almost walking distance from here.
 
@FaheemMitha I don't think so. Certainly hasn't in the last century.
 
9:12 PM
Might be a very brisk 20 min walk, or so. Probably closer to 30.
Nariman Point is a business district in Downtown Mumbai. Formerly the prominent business district on India's west coast, Nariman Point yielded that status to Mumbai's Bandra-Kurla Complex in 2010. Prior to Nariman Point's development, Mumbai's business centre was at Ballard Estate, which – like Nariman Point also – was built on land reclaimed from the sea. Located on the southern tip of the Mumbai peninsula, at the end of the Mumbai's Marine Drive, Nariman Point is named after Khursheed Framji Nariman, a municipal corporator who had initiated the area's development as an extension to the Back Bay...
Used to be more important once, I think. Apparently it's got so expensive many people are pulling out.
@derobert Ok. I suppose that would be a bad thing.
 
There are also ratings agencies, so you can look up the ratings for various governments.
 
Fort is also quite important. Though much of Bombay is business districts, really. It's that kind of city.
@derobert I see. Interesting.
The question is whether they agree.
 
Ratings agencies are private companies giving their opinion about how likely a bond is to be paid back per its terms, so yes they sometimes disagree.
 
@derobert Ok.
 
You can just pick something everyone agrees is safe, unless getting the extra 1% interest really matters, then you have a lot more work to do.
(And of course these accounts will probably all be in a foreign currency, so you do run exchange rate risk — if the foreign currency falls in value relative to INR)
 
9:18 PM
@derobert Safe is good. Interest doesn't matter much.
@derobert Accounts here are normally in Indian Rupees.
I suppose I could get an account in a foreign currency, but they I'd be paying for foreign currency conversion charges all the time.
Still, no harm in asking, I guess.
 
@FaheemMitha Yes, bank accounts are normally in the local currency. But if you find, e.g., an FDIC insured account, it's going to be in USD. Or at least the FDIC insurance is going to be, FDIC will surely pay in dollars.
 
@derobert I assume that if FDIC covers the Indian bank account, it would do an on-the-fly conversion. But that's just supposition.
 
@FaheemMitha you keep some money in rupees for day-to-day transactions. And you put your savings in a different account. That avoids conversions all the time.
@FaheemMitha The bank might behind the scenes. But the insured amount is in dollars, and if the bank fails, you'd likely be paid in dollars.
That's going to be the same for every government insurer, I'd expect.
 
@derobert If that's possible, that would certainly be a reasonable option. Actually, keeping money here in dollars (for example) would be a better way to go than in Rupees. Because the Rupee depreciates, and you do get back some of the difference in interest, but then you pay tax on the interest. Overall you're just better off with a currency with low inflation. Like the USD.
If any of that seems wrong, let me know.
But I actually don't think the Indian govt lets its citizens hold money in foreign currency, at least locally. And maybe not at all. I'm not exactly sure. I think they can maybe keep it outside the country.
 
Sounds broadly right, though of course if the rupee appreciates/the dollar depreciates, you lose money (at least measured in rupees).
 
9:24 PM
@derobert The Rupee generally slides against the dollar.
Because of the consistently higher inflation rate.
Also, the USD is somewhat insulated, because it's the world's reserve currency. Though I don't really understand economics.
 
@FaheemMitha That's true from roughly 2011 (and overall since as long as the quick chart on Google goes); but there are periods where it wasn't (e.g., 2008-2011). google.com/search?client=firefox-b-1-d&q=INR%2FUSD gets me a chart. And who knows about the future. It's not fully predictable.
Anyway, gotta run.
 
@derobert Well, the overall trend is clear. I suppose it might go the other way for a bit, but one can't have everything.
 

« first day (3300 days earlier)      last day (21 days later) »