@StephenKitt Oh ugh. One of the two was the OP, I'm guessing not a native speaker if they approved that. The other, I'm guessing hadn't woken up properly :)
As we all know, the builtin expression set -x turns on tracing, which prints each command after globbing but before execution. What I'm curious about is the difference of output set -x provides in different contexts.
When I run bash -c 'set -x; echo "hello"' we see...
+ echo hello
hello
When ...
Heh, I didn't really notice it. The question itself intrigues me because I always though the extra +'s indicate a subshell
I recently ran into an issue that I think is sort of related to whatever the answer of that question is too. I was calling a function inside command substitution that was being assigned to a variable. Inside that function I was calling exit 1 if a certain condition was met and it was only exiting the function, not the entire script. Which thinking back on it makes perfect sense
Thanks @StephenKitt
As always you are a gentleman, a scholar, and a breeder of fine horses.
BTW, bash is the only shell that stacks $PS4 in this manner that I know of.
Most other shells only uses one + by default. zsh uses its prompt once too, but that includes the command history number (?) so it's easy to see that two commands were executed as part of the same compound command.
@FaheemMitha oh I am far from finished; this is a very sporadic bursty activity -- on evenings when I'm not otherwise occupied or too tired, which are few & far between.
I like to use the project management adage of "I think I'm about 80% done, which means I have about 80% more to do"
I spent some of last evening/night/morning debugging my poorly written Lua code (for use with LuaLaTeX, naturally). To the accompaniment of snark from David and Ulrike. Predictably.
@JeffSchaller I forget what it is that you do.Your profile says Unix sysadmin. Is that still accurate?
Debugging Lua through a TeX lens is... interesting.
I discovered yesterday that I had somehow forgotten to downvote meta.stackexchange.com/q/334248/158763. So I did so. If anyone has forgotten to downvote, I suggest they pop over there and do so. It's currently at -2149. As they like to say on the petition sites, let's get to -2500!
@FaheemMitha so far! I don't have a very distributed team and our scripts don't change often enough to motivate us much beyond cp file file.$(date +%Y%m%d)
@JeffSchaller DVCS has very low overhead. At least, Mercurial does. You should give it a try. And as I mentioned earlier, it takes 5 minutes to learn the basics.
I was a part time sysadmin of sorts, now a long time ago. 2006 to 2009, or thereabouts.
@StephenKitt The basics aren't that complicated. There is really little that can go wrong. If you start to do more complicated things, then it can get more "interesting".
@JeffSchaller Less cruft lying around, can be sure if there are changes even if someone forgot to make a copy, don't have to worry about someone using different date formats and getting inconsistent names, etc.
E.g., people here used to edit simple scripts after making backup copies. That invariably wound up with script.pl, script.pl.old, script.old2.pl, script.pl.2011-01-08, script2.pl ...
And worse, sometimes someone would be like "hey, this old version does what we need for this different client" ... so one of those apparent backups might be in use.
@JeffSchaller shrug, on Linux here. But yeah, if everyone used a consistent format
@Kusalananda Well, nearly always. It's probably not practical for email, for example. Or for system files. But for text files that humans are editing "manually"? Yes. Just apply common sense.
@derobert IMO git is definitely a bit tiresome, even for basic use. But Mercurial isn't. Of course, I haven't used git much, so it's probably something you get used to.
This kind of reminds about how back in the day, I was trying to introduce a colleague/friend to Debian. By way of thanking me, he asked me if he was about to join a cult. To this day, I'm not sure if he was serious. But he used to vote Republican, so I guess one must make allowances.
You might want to at least take a look at etckeeper. That's just an apt-get install etckeeper then forget it (well, or however you install packages on your system).
@StephenKitt no; and we don't need to keep guessing :)
btw, @Stephen, I was just re-reading the star board re: subscribing to a 3rd-party's question and appear to have missed my first idea the first time around. There are still RSS feed links on questions
@FaheemMitha I just haven't. I've not had a reason to create a new filesystem for home. Maybe next time I get a computer. Who knows, might just copy it over...
Funny, the X double-left-click and middle-click shortcuts for copy and paste just stopped working for no apparent reason. I'm so used to them that it's hard to adjust.
This is a relatively new mouse, so I wonder if it could be a hardware issue, somehow.
Ok, I never realised how much I used that shortcut till it stopped working. Does anyone know how this is implemented? I did modify the appearance of my cursor in the KDE control center (or whatever it's called these days). Could that have done something?
@Wildcard That's a radical notion. I guess I could try that if I get frustrated enough. But why do you think that would work? Or is just on general principles?
For instance, the Terminal app doesn't open a window anymore on my Ubuntu login after a while. Then I can either use Xterm, or just log out and back in.
So e.g. you click on "Joe" in the user selector, put in Joe's password, and the computer switches to the virtual terminal where John's lockscreen is showing.
@FaheemMitha Select-to-copy and middle-click paste are the traditional X11 clipboard. The most likely way I can think of for them to break is for some app to claim the selection and then not return anything when trying to paste. Killing the broken app ought to fix it.
Maybe I should just switch to Windows and Word, and leave all this DIY nonsense behind me. It works for everyone else; perhaps it will work for me too.
Well, Windows and Word does indeed work "well enough." But Ubuntu and LibreOffice pretty much works "well enough" also. Just a different set of quirks.
@FaheemMitha Yeah, Windows is painful because you can't spend five hours digging through source code and strace output to try to figure out why something isn't working. You can only lament about Microsoft making a crappy product. :D
@FaheemMitha That in Linux you can dig into anything going wrong and dive down the rabbit hole to try to figure it out.
@FaheemMitha Homeschooling is by and large a very good thing. It also bugs the hell out of certain politicians who want to control exactly what people are taught when, and how their lives are lived. (And more recently, what is injected into their bodies.) Mostly people who are homeschooled end up smarter and better educated than people in public school.
@FaheemMitha Yeah, it's not difficult to teach someone if you actually answer when they're interested and asking a question. If you blow off the "Why is the sky blue?" type questions and then years later try to force them to study endless data about light and refraction, you're being rather self-defeating.
@Wildcard I think that homeschooling is a good idea, if the parents are up to it. I certainly would have loved the idea as a child, though it might not have worked well in my case.
Something to do with refraction though water droplets, I think. As usual with those things, you'd have to go back to quantum physics for a proper explanation.
@derobert interesting, I've never heard of people tapping into a hydrant. (1) firefighters, for a fire, and (2) open, for a hot day, but never anything else
@FaheemMitha It doesn't take as much time as you would think. There's an article that deals with that. It makes some possibly flawed comparisons, but overall makes good points.
@FaheemMitha In a nutshell, a LOT of time in a typical school is wasted just on the fact of having to deal with lots of kids and administration aspects.
@FaheemMitha yup. :) But even highly functional ones can't handle exploration of personal interests to the same degree nor with the same flexibility as homeschooling.
@FaheemMitha The "rub" is that if the child WANTS to get something done, is actually interested in the subject being taught and has a purpose for learning it, there is no difficulty about staying focused. And if the child isn't interested, you have to ask—why are you teaching a subject he's not interested in?
I believe this is sometimes called freedom. But it doesn't seem to rank very high in people's priorities when dealing with children. They'd rather just put them in jail.
@derobert Do you think you can actually force someone to read?
@FaheemMitha Force is a strong word (and just ask your least-favorite terrorist organization, clearly you can!). But that wasn't what I was responding to. It was "not interested in", and I didn't suggest forcing it. Just that there could be a good reason to teach a subject a kid isn't interested in.
@Wildcard I realise you don't like the "prodigy" word. But such people do exist. I agree that's it's predicated on the notion that most children can't do much.
@derobert I'm not so convinced of that. I had fun with math from a VERY early age. Actually, I think most of my math education really consisted of reading every puzzle book I could lay my hands on.
@FaheemMitha yep, bingo. Like the seven year old girl who taught some neighborhood four year olds a bunch of the alphabet after she started school. Was she a brilliant and unsurpassed educator? Doubtful. Just that nobody ever bothered to try to teach four year olds to read, so they assume that they can't.
@FaheemMitha First of all, it's a REALLY artificial grouping of children to put all the children born in the same year into one group and children born in another year into a different group.
@FaheemMitha Though for now, he's just rediscovered this book that I was reading as a kid. Over 250 stories, all very short. He's reading them aloud at bedtime. :)
I was thinking of the following quote, from Three Men in a Boat.
> It always does seem to me that I am doing more work than I should do. It is not that I object to the work, mind you; I like work: it fascinates me. I can sit and look at it for hours. I love to keep it by me: the idea of getting rid of it nearly breaks my heart.
BTW, if anyone hasn't read that. It's a good book. Very famous in its day, too.
Also, English is a weird language. Programming languages are bad enough, but natural languages are a nightmarish brew of irregularity, irrationality, and just plain insanity.
I will just have to bug Stephen on Monday and see if his memory is better than mine.
To answer how we communicate in spite of weirdness of language, you first have to define what "communication" means.
Which most people working in "telecommunications" are unable to do.
Huh, that's odd. When I click on @Tim's name from chat, the profile shows over 150K reputation globally, but the only profile link is to a 101 rep user profile on "Outdoors" that doesn't have any other profiles in the network.