« first day (2960 days earlier)      last day (1993 days later) » 

2:11 AM
@StephenKitt Ah, another one with green socks!
(Italian idiom)
(wearing green socks = being dumb)
So don't wear green socks in Italy!
 
user141350
3:04 AM
For general knowledge: Does every shell builtin command has a C function that bases it?
 
7:55 AM
@JohnDoea You need to read more.
 
user141350
8:16 AM
@Fabby I disagree it's a necessity for me get that particular piece of knowledge: As for now I don't have the free time and spare energies to read the entire Bash man and maybe as of the moment I also don't have enough background in either CS or programming to understand everything there.

I tried to read some of the intros on shell builtins and shell functions and didn't get a "yes or no" answer.

If anyone who knows the Bash architecture well enough wants to answer my small question here - please do. If not, please ignore the question.
 
"Read the manual" is not exactly useful advice.
 
I adhere to the adagio: Do it well or don't do it at all and the answer is no.
@MichaelHomer It's a ping in chat. RTFM is always an option (and I was replying to the yes/no while you were typing that)
0:-)
John is missing some fundamental knowledge and he needs to build it up or he'll have fragmentary knowledge only and the whole will not make sense.
 
Nobody is disagreeing with that, but it still wasn't helpful.
 
user141350
Well, not everyone has to do everything with Bash in their life; if you want to learn topics you have no usage in - it's your own business. There is nothing wrong with fragmentary knowledge in some subjects (and in any case, in general, every field has changes so there isn't necessarily one essential and stable thing to know as a whole).
 
user141350
Anyway, this is a philosophical debate I have no time or spare energies to either.
 
8:26 AM
@JohnDoea what do you mean exactly? Are you asking whether there’s a C function in the C standard library matching every shell builtin?
 
user141350
I did some very useful operations with my fragmentary knowledge in Bash so far and I'm satisfied and keep learning even if you don't like that way.
 
user141350
@StephenKitt I'm asking if there's a C function for any shell builtin command (and both are in the same name).
 
user141350
like umask command and umask function.
 
@JohnDoea right, but “a C function” where?
Since most Unix-style shells are implemented in C, most of them have one or more C functions they use to implement their built-in commands.
But most shell built-ins don’t map one-to-one to a C library function.
 
user141350
@StephenKitt I don't know
 
user141350
8:32 AM
Oh I see
 
user141350
So there is typically one huge function holding many behaviors?
 
user141350
And each call by a builtin-command refer to a specific behavior described in this one huge function?
 
user141350
Isn't it non-modular to do it this way and every builtin should have a corresponding specific function?
 
@MichaelHomer it is
 
Ah, I should have written “... to implement each built-in command."
See the Bash alias functions for example.
Bash has quite a nice built-in definition system which builds on top of functions provided by the rest of the implementation.
 
user141350
8:42 AM
@StephenKitt the terms "cd" or "umask" aren't mentioned in the linked file. These builtin commands must have some function that contains their behaviors (or singular functions for each one), this is what I'm after.
 
user141350
Please hint me to that file, I'll gladly read there trying to understand (although I never written a line of C before, just a bit of JavaScript).
 
@MichaelHomer ---^
 
@JohnDoea They’re not mentioned? O_O
 
user141350
@StephenKitt in this file:

http://git.savannah.gnu.org/cgit/bash.git/tree/alias.c

under tree

I don't see such a list...
 
user141350
I see only C code.
 
8:50 AM
@JohnDoea in the comment you replied to, there’s a link:
12 mins ago, by Stephen Kitt
Bash has quite a nice built-in definition system which builds on top of functions provided by the rest of the implementation.
 
user141350
Oh crap I didn't notice the link... CSS color would better be Blue, wouldn't you say?...
 
@JohnDoea it’s blue for me, but it would be clearer if the links were underlined
 
user141350
Very interesting list, I'll pass through the c,h, and def (define module - will read on this term ASAP). Thank you !
 
user141350
I use latest Chrome, to me the links are Gray-Blue almost as the color of the text. I agree an underline will be good for Web Accessibility.
 
4:42 PM
Wow, I know I've slacked a little on the review queue, but I see 26 items in the Close review queue right now! Record high, for my memory.
 
Still 200 rep short of helping out!
 
Maybe I should up-vote 20 of your questions Answers; then you can hit the review queue, and then tomorrow the system will reverse all my votes and everything's better than we found it!
 
:D :D :D
 
a sock-puppet reviewing ring
 
---strikethrough--- striketrough
 
4:49 PM
italic
 
@JeffSchaller People around me are thinking I've lost it:
 
darn, got oblique.
 
Suddenly laaughed out loud!
 
there we go
 
4:51 PM
:-)
 
I do agree with you on spoilt food in principle but for myself, I try to live dirty as to educate my immune system.
...and as a friend of mine always says: a dirty mind is a joy forever...*
 
Well, until it traps you in the bathroom for a day.
 
@derobert Meh, haven't had that happen yet.
(well, not because of food)
Anything that doesn't kill you makes you stronger
>:-) ;-)
 
@Fabby Is that what you're supposed to keep telling yourself when reading the President's tweets?
 
@derobert Which president? Macron?
:D ;-)
There is more to life than The Trump...
 
5:00 PM
Indeed, but I live ~40 minutes from the White House, so...
 
Drat! I was in DC last August!
Could have brought you some nice goodies from here!
Anyway, What's the prayer for the stressed again?
 
orayer?
 
Grant me the serenity to accept the things I cannot change,
The courage to change the things I cannot accept,
And the wisdom to hide the bodies of those I had to kill today because they got on my nerves.
 
LOL
 
Prayer. O next to P on keyboard
 
5:03 PM
I scrolled through a bit of Macron's twitter feed (via Google Translate)... it seems so nice in comparison to the other presidential twitter feed...
 
That's probably because it goes through PR first.
 
Though it does have some Google Translate gems:
 
The Trump is the real stuff straight from the gut.
 
"As political leaders here today, we must reassert before our peoples our greatest responsibility, which is to pass on to our children." .... errr, what?
 
(and always remember the gut contains shit)
@derobert :D :D :D
Gimme the french version and I'll translate
 
5:05 PM
As political leaders here today on 11 November, we must reassert before our peoples our greatest responsibility, which is to pass on to our children a world that previous generations dreamt of. https://twitter.com/EmmanuelMacron/status/1061600488645410816
Not sure why that wound up translated in the onebox, but the original is in French. Also looks like maybe it just got cut off somehow.
Or that's the wrong one. Hmm.
 
Nous tous ici, dirigeants politiques, nous devons en ce 11 novembre 2018 réaffirmer devant nos peuples notre véritable, notre immense responsabilité, celle de transmettre à nos enfants le monde dont les générations d’avant ont rêvé
@derobert All of us political leaders together here today on 11/11: let us reaffirm for the benefit of our people our real immense responsibility: to give our children the world of which all previous generations only dreamt of.
 
Yeah... checking the page before Google Translate, it looks like that one was originally in English. And Google Translate cut it off mid-sentence for some reason.
 
Google translate gets you 50% of the way but is notoriously flawed to get the emotional content.
 
Google Translate is evil
like many other things, it breaks translations
(good day by the way to all)
 
next time, translate from EN-FR and then back to EN and then you'll know how big the mess-up is.
 
5:11 PM
@Fabby No doubt. It can be worse though — try it on Japanese.
@Fabby That's always fun, chain it through a bunch of languages and see if you can even recognize the result. There used to be a site that did that with Babelfish, no idea if anyone has made one for Google Translate.
 
@derobert It could be a Chinese person going to Wikipedia and saying: this is not the German flag that I remember from movies...
 
lolol
 
wow, lol
but it has "Good Feeling" and "Excellent Function"!
 
Chinese culture is built around ultimate happiness.
So products need to make your happy better!
>:-)
 
Hah. Ultimate happiness and lack of QC.
 
5:16 PM
Hah! Try Indian Project / Operational IT Support!
Not documented? Not executed!
I need a smoke!!!
(BRB)
 
 
2 hours later…
7:37 PM
Hi folks.
Terrifying medical experience continues.
I have a question for the room - wildly off-topic, but whatever.
So, the doctor who is treating my mother is kind of scary. Things aren't going well with my mother (long story), so I sent her a text yesterday to tell her I'd like to get a second opinion. She responded on the phone a bit later that she found the suggestion quite offensive, and if I was to get an opinion from another chest physician she would withdraw from my mother's case.
I'm a bit exhausted by the last few weeks, so I'm not quite sure how to react to this.
Part of me wonders whether I should scream and run. This hospital is not very nice, and they pile up huge bills with alarming rapidity. Among other things, they for you to buy stuff from their pharmacy, where it is more expensive. Sometimes, much more.
 
@FaheemMitha Where is your mother located and what other hospitals are nearby?
(no specifics need to be given)
Is she home / in that hospital, ...
 
@Fabby It's called Bombay Hospital. And there are quite a lot of hospitals nearby.
@Fabby She's in that hospital. In the ICU.
 
Ouch! Sorry to hear that.
 
She went in for a relatively routine procedure nearly a month and a half ago, and never came out.
 
Because I moved my mum from one hospital to another...
But I had her discharged and then drove her somewhere else myself.
 
7:47 PM
I was partly wondering if anyone was going to comment on the - "no, you can't get a second opinion or else" thing.
 
if she's in the ICU, I would recommend against that.
That's what I was going to suggest, but if she's in the ICU, I can understand the doctotr's reluctance.
 
@Fabby I have no plans to do so, but the overall situation is very worrying.
@Fabby I don't follow. Doctor's reluctance?
 
The doctor might be scary, but is your mum getting good care (just too expensive?)
@FaheemMitha Think you're the doctor now:
Some Joe Schmuck wants to get a second opinion whereas his mum is in the ICU
If I were her, I would react the same... and so would you.
 
@Fabby Yes. So? Do you really need to refer me to Joe Schmuck?
 
Faheem, figuratively speaking: I would refer to myself as Joe Schmuck inin the eyes of the doctor too!
 
7:51 PM
@Fabby I don't understand what you mean. What's wrong with getting a second opinion? It doesn't entail moving the patient, if that is what you mean.
Nobody suggested moving the patient. I certainly didn't.
 
Well, than you didn't descrive all of the parameters:
a second opinion by whom? Another doctor in the same hospital?
 
@Fabby You made assumptions.
 
Well, you're giving the parameters...
 
@Fabby Yes, that was what I specifically asked about in the first instance. But it's possible for doctors from other places to review a case too.
Other hospitals, that is.
 
So what's your question then?
 
7:53 PM
@Fabby I already asked it. I don't understand why any doctor would object to the patient's family getting a second opinion.
Unless that doctor is 100% certain that the patient is getting the best attention possible.
And I don't see how anyone could be certain of that.
 
Maybe your doctor is overworked and if you get a second opinion she's happy to wash her hands off the case...
 
@Fabby She might be overworked. But that doesn't make it a reasonable reaction.
 
It could also be an emotional reaction in that she's really doing the best she can for your mum ans sees this as an insult, ...
Tons of reasons to react like that.
 
Or maybe it's more work for the doctor. E.g., preparing & sending records to another doctor might take time (especially depending on how bad shape the records are in)....
 
---^
 
7:56 PM
No idea, don't have any real experience with that in the US ... and definitely no experience with it in India
 
As far as I can see, I think Indian doctors always try to cover too many patients. They don't seem to ever want to refer anyone.
 
Maybe they have to because there are too few around.
It's happening in the EU with GPs as well.
 
@derobert She wouldn't do any of that work. I'd probably be running around scrounging records. I doubt doctors do that kind of thing anywhere, and certainly not in India.
 
I think you have an answer: It's not inconceivable your mum's doctor reacting that way
 
@FaheemMitha You're certainly not rummaging through the doctor's filing cabinets looking for the records, I hope!
 
7:58 PM
@Fabby Oh, it's certainly seems like an emotional reaction. But imo neither reasonable or professional. This same doctor is always in a big hurry and barely willing to talk to me.
@derobert I mean tests and so forth.
 
@FaheemMitha Looks like overworked to me.
 
@Fabby I guess. But she could take less patients.
 
The doctor (or his/her assistant) has to spend time to gather the records together. And maybe e.g., tidy up notes that are barely comprehensible.
 
@FaheemMitha Nature abhors a vacuum: if there are patients to take care of, someone will
 
@derobert I'm not sure why they are under an obligation to do anything like that.
I expect they would just leave the job to me.
 
8:00 PM
Well, if you want a second opinion, the other doctor is going to need to read the notes. How else is he/she going to be sure of e.g., the medical history?
 
@derobert There are scans and tests and stuff.
That's usually what people look at.
 
And presumably there have been treatments too — likely a fair bit, if she's in the ICU...
 
I guess you're right that if Doctor B is going to review work by Doctor A, he needs to know what kind of treatment A has been giving the patient.
@derobert Yes, it's horrifying.
Anyway, I'm going to try to talk to a couple of chest specialists in the area in the next few days.
Maybe I'm clutching at straws...
Bear in mind I'm leaving out chunks of context about why I'm uncomfortable about the situation.
Because it seems unlikely anyone is interested in the details.
 
I'd expect a doctor to spend at least a little time (and maybe a lot, depending on the situation) explaining the diagnosis, treatment, etc., at least if authorized to speak to you (no idea what medical privacy laws are like in India, here the doctor would need permission to speak to someone other than the patient). Some are of course much better at it than others...
 
Maybe a nurse or a social worker in the hospital could say if there's a team of chest specialists in the hospital? It'd seem easier to me for someone else in that group to do a "consult". I don't know the laws there, but it'd seem malpractice for an attending doctor to "wash their hands of" a patient.
 
8:08 PM
@JeffSchaller I don't know about malpractice, but it's nice that someone is trying to see my side of it.
 
it seems like you're approaching it with your mother's best interests in mind, so it seems reasonable to me. perhaps that doctor is afraid of something they did. who knows.
 
@JeffSchaller Well, of course I'm concerned about my mother. Actually, make that terrified about my mother.
 
it may not change the outcome, but it certainly seems like this doctor is eager to move on, which isn't good
(I mention your interests only to contrast with a different possible approach where you blamed that doctor for some choice they made)
 
@derobert I have a hard time imagining that doctor explaining herself to another doctor. She seems to think she is always right. She told me she knew much more than the doctor I was proposing to consult. Also a senior person.
 
I'm somewhat confused on how that phone call went... It sounds like "how dare you ask for a second opion! <CLICK>"
 
8:11 PM
@derobert Oh, no, no. She spent some time telling me about how I hurt her feelings asking for a second opinion. She seems to get her feelings hurt quite easily.
Like, if I question some tests she is doing.
But no, she didn't hang up.
@JeffSchaller Not necessarily (re move on). It was just a threat.
She doesn't want me to get another opinion (for whatever reason). That was calculated to stop me doing so.
@JeffSchaller I don't know if she did something wrong. It's obviously hard for a layman to say. I've been trying to pay attention to everything going on, though nobody seems keen to explain things to me.
 
I don't think that'd be considered acceptable behavior here (e.g., by the medical licensing board)... but I have no idea about India. And as noted, have no experience with that here either (thankfully!)
 
And the whole thing is very frightening and exhausting, not to mention terrifyingly expensive.
@derobert What wouldn't be considered acceptable behavior?
 
Well, you're in control. If you want a second opinion, get a second opinion. Using the same methodology I used with my mum is not going to help you though...
(Is what I was trying to convene earlier)
 
@Fabby In control? You have got to be kidding. They hardly talk to me.
 
@FaheemMitha Either of those things — discouraging you from getting a second opinion because of hurt feelings and especially making threats if you do.
 
8:15 PM
@derobert Earlier it sounded like you thought it was reasonable behavior. But maybe I misunderstood you.
 
@FaheemMitha Who's paying? he who controls the budget controls everything
 
@FaheemMitha I think I wasn't clear. I was trying to come up with a reason why she might not want to — not that I approve of the reason.
 
Yes, you're in control...
 
@Fabby Not here, not in Bombay. The approach is that the hospital does what it likes, and the patient's family pays.
@derobert It's good to be clear. Especially when you are talking to frightened and stressed out people.
 
Sorry about that. Yes, it is good to be clear.
 
8:17 PM
Well, person. It's just me here.
@derobert That's ok. You weren't planning on having a discussion about medical ethics this evening, I bet.
 
Maybe you can at least find a doctor better at explaining things.
 
Not in U&L, at any rate.
 
@FaheemMitha Indeed. Especially since I'm no expert on them. And even less on what the ethical obligations in India are.
 
@derobert I figure it can't hurt to talk to someone else.
Well, I suppose it might hurt my mother if I make the wrong decision.
But things are already looking fairly bad.
This hospital is much less fun than Sacred Heart. That's the hospital in Scrubs.
 
It sounds like you need to at least find someone who can explain what's going on to you... even if that's all they do, is bill you for an hour or two of explaining
 
8:20 PM
@don_crissti What is your point?
 
@DmitryGrigoryev When it comes to software, it's the really significant distinction, whether users recognize it or not. — Faheem Mitha 35 mins ago
 
@FaheemMitha If it's that bad, you can always pay for a second doctor to visit the hospital or ask a senior colleague in the same hospital as hers for an opinion.
 
@derobert Oh the doctor does explain. But it seems to amount to bad stuff happening, and then other bad stuff happening.
@Fabby Of course. But see the aforementioned threats...
 
Like I said: might be overworked, frustrated that the treatment isn't as expected to be, ...
Without inviting the doctor in this chat herself, we're all shooting in the dark without night-vision goggles.
Is money an issue? If not: just get another doctor over.
 
@Fabby She's not the one with her mother in a hospital bed, and running up huge charges. And she really doesn't seem that concerned. None of them do.
@Fabby Again, you're forgetting about the threat.
 
8:24 PM
@FaheemMitha You have the ultimate threat: not paying and taking them to court.
 
@Fabby Money is always an issue. But just talking to a doctor doesn't cost much.
@Fabby You don't know India very well...
 
@FaheemMitha Very true...
OTOH, I'm a scientist by education and dated a doctor for 3.5 years and a dentist and...
 
The courts don't really function. And a hospital could outspend any individual hundreds of times over, anyway.
 
@FaheemMitha Well, probably we're both (Fabby & I) used to rich-country medical systems, where that threat is an obvious bluff, or something that'd get the doctor in so much trouble...
 
(and medicine is not an exact science
 
8:25 PM
@derobert Yes, well, it's not clear if it is a bluff or not. It might be.
@Fabby Of course it isn't.
@derobert Even in India, I'm not sure if a doctor can really just walk away from a patient just like that. But they might be able to - after all, it's India.
You don't want to bet against the crazy in India.
 
I thought doctors all over the world were bound by the Hippocratic oath?)
 
Maybe that weird interpersonal SE site can give you a way to ask for a second opinion that's so dripping in obsequiousness that her feelings won't be hurt :-/
@Fabby only as far as the local medical licensing/ethics/etc. board is willing for enforce it.
 
@derobert Why it is weird?
 
@FaheemMitha the things from that site that hit hot network questions often are
 
@Fabby Here it is mostly about money. When it isn't entirely about money.
Ask any Indian. That's one thing we all agree on.
@derobert Possibly. Can you think of any examples?
 
8:31 PM
@FaheemMitha Well, that puts you in the stronger position...
 
@derobert And I doubt the way I asked was the issue. She objected to the concept.
@Fabby I don't see it.
 
@FaheemMitha Well, maybe you don't want a second opinion. Maybe you want to bring in someone else to see if they're aware of some less-known treatment. Or maybe to give you a different perspective. Or who knows what BS way there is to make it sound nicer...
 
@derobert heh.
 
For them it's all about the money and you control the money (I'm assuming again...)
 
When is a second opinion not a second opinion? When it's an orange.
@Fabby There are plenty of other patients. You're forgetting about supply and demand.
India is a wonderful place. People get sick a lot here.
 
8:35 PM
(there don't appear to be any interpersonal.SE questions on HNQ to find a weird one... but I think that's because they prohibited the site's questions from HNQ a little bit back.)
 
@derobert They did? Why?
 
94
Q: What caused this site to be excluded from Hot Network Questions?

gparyaniRecently, the Stack Exchange team made the decision to exclude this site from the Hot Network questions on the right sidebar of questions across the network and on the stackexchange.com homepage. Why was this decision made? Were question titles on this site too inappropriate? Can we please get f...

 
A dumb beginner bash question: can the following code:
if [ "$sx" = "male" ]; then
    sex="true";     # or whatever you consider male sex to be
else
    sex="false";    # just the opposite, see above
fi
be compressed to:
 sex= [ "$sx" = "male" ];
Like in C?
(because AFAIK, [ is an external executable.)
 
@Fabby no, because shell true/false aren't the strings "true" and "false"
shell true-false works on the command exit code; 0 being true, anything else false (opposite of C!)
3
 
(it's someone else's code... I was just wondering if bash's true is 1 and false is 0 like in C...
@derobert Ah! That answers my question!
 
8:41 PM
@derobert I see.
 
and it actually has to be an exit code, because the syntax is if COMMANDS, not if EXPR
 
@derobert Yup... [ and [[ again.
thanks, I don't have much bash programming experience.
 
so if $sex does not check if $sex is 0 or 1, instead it'll try to run it as a command
 
@derobert :D Understood
 
:-P ... I'm not sure about bashing trying to have it, but it'll sure try to run it. Whatever that means, I suspect it's illegal so best avoided
 
8:44 PM
(Juvenile comment removed; according to one of my ex-GFs I've got the mental capacity of a 5YO instead of a 50-YO.)
@derobert :D ;-)
IT is full of snigger terms anyway: piggy-backing chips, fingering servers, ...
i mean if you type in a shell:
man woman
you get:
 No manual entry for woman
for heaven's sake!
>:-)
 
Could be worse, you could being trying to understand men, then man man gives you something both completely true and completely useless.
 
I never tried that one.
Doing it now.
 
/me waits for the "oh... DUH!" moment...
 
I'm actually reading...
didn't know:
 The default action is to search in all  of  the  available
 sections following a pre-defined order ("1 n l 8 3 2 3posix 3pm 3perl 5
 4 9 6 7" by default
 
@JeffSchaller Yes, there are other specialists in the hospital. I was recommended to get a consult from one of the other senior people in that Hospital department.
Oh, yes, and I forgot to say that the other thing she said was that doctor would tell me to take my mother off the ventilator and let her die.
Which may or may not be true. Of course, I don't know.
 

« first day (2960 days earlier)      last day (1993 days later) »