Chrooting a users login

Question: I want to limit certain users on my system to a subset of commands and have absolutely no access to the rest of the system. I figure chrooting is the way to solve this but I only know how to chroot a ftp user. Can this be done for normal shell users and how can I achieve this?
Answer: Jailkit simplifies it.
Jailkit is a set of utilities to limit user accounts to specific files using chroot() and or specific commands. Setting up a chroot shell, a shell limited to some specific command, or a daemon inside a chroot jail is a lot easier and can be automated using these utilities.
Answer: Please use chroot with extreme caution, it's well known that it doesn't provide the complete protection it seems to.
chroot limitations from wikipedia
I remember a debate on the LKML about fixing "bugs" in chroot that allowed users to escape; kernel developers have answered that chroot is not intended to be a security mechanism.

Chrooting a users login


Eating from Subway restaurant

Question: Can we eat from subway in a non Muslim country for example in New York they have many subways the restaurant across the USA
Answer: It's best not to, though if they have a vegetarian option it should be fine (just be sure to request they use a separate knife upon slicing your sandwich or anything else so that the knife they use when slicing meat doesn't touch your sandwich).
Answer: Whenever me and my family go out of country we only eat from halal certified restaurants or if we are in a Muslim country we eat from anywhere. It is best not to eat meat in a non Muslim country although you can always eat seafood such as fish and shrimp, seafood is always halal.

Eating from Subway restaurant


Method for removal of high number of spammy links

Question: I haven't been able to figure out the right combination for deindexing spammy links from search results. On one hand, we have the Google URL remover which removes links temporarily (they may show up again after 90 days). On the other hand, there's no promise that Google would act on your disavow links request expeditiously. In such a scenario, how do I get a high number of URLs deindexed using Robots.txt or the meta robots tag? Besides, other than cleaning up malicious codes, should I be showing a 404 not found in every page?
Comment: Are these links to your site from other sites? Or pages on your site that were placed there by spammers that you have cleaned up? It isn't clear in your question.
Comment: These were essentially links that were created by a hacker and being redirected to porn sites. For now, I have used the URL remover and the links have disappeared. But I am quite unsure what would happen if they are back? And I do not know whether I need to follow a different procedure.
Comment: So they created pages on your site? Or hacked your pages to link to other sites?
Comment: Yes. Some hacker did it and we couldn't figure out. We were successful in removing the malicious codes and putting up a no-results page on all the links.
Answer: 404 isn't ideal.
Serving 410 error code is better as it indicates permanent removal. Also Adding nofollow/noindex meta tags/robots.txt on those bad URL's is a good way to speed things up.
Serving correct error codes, meta data, redirecting, disavowing incoming links would all be viable process for different reasons.
Disvow will help google understand you don't want those links pointing to your site counted as a part of your backlink profile.
Yet while those links exist ( even under disavow ), you will get pages they are linking to trying to be indexed, hence why you need to serve the correct meta data, error codes and making appropriate redirects where it seems logical.
It's tough to give highly accurate advise without seeing the problem in first hand,  but the above is where most should get the basics right.
Answer: Do a 301 redirection to some dummy page, It will not affect your SEO ranking. I had too many links in my website, It was difficult for me to maintain and keep the content updated. I did 301 redirection to the similar page,It was helpful.


What is this Y-shaped screwdriver bit, and what is its purpose?

Question: I found this strange looking bit in a bit set of uncommon bits, including Security Torx, hexalobular, tri-wing, spanner head, 12-point flange, Torq-set and others. It's the only one that I could not identify, what is it for?
Comment: Good quality photos like that are liable to psychologically damage the average newcomer who thinks that photos should be small scale, unfocused and lit by a distant candle. And your question is also liable to give typical newbies conniptions - while it is short it is to the point, we know what you are asking and the picture and text match. Much more of that and some of the longer serving members may also feel threatened. Keep it up :-) !!!
Answer: My first thought is that it might be intended to be a wing nut driver of some sort, but those are usually hollow cylinders with slots for the wings.
Ah ... sure enough, it's described as such in this Ebay ad:
Comment: ...in case using hands to fasten/unscrew the wing nut provides too much torque, you can use the screwdriver handle to reduce the torque applied? ;-)
Answer: It can also be used for fastening the 'eye' of hook and eye fasteners into wooden frames.
Comment: That's what I thought too when I first saw it.  Could be because my fingers are currently sore from installing such a hook by hand.
Answer: There is one sold on Amazon.com, an "Eazypower 80935 1/4 inch Y-Shape Cup Hook Installer and Remover". https://www.amazon.com/Eazypower-80935-4inch-Installer-Remover/dp/B000PSABL0
I usually use a pair of pliers to screw hooks in or out. Quite honestly, I like the wing nut driver idea better.


Reducing neck and shoulder pain while at the computer

Question: I recently started a job in assisting my company with operations. This essentially is a software job, so I spend my 8 hours at a desk. I sustained an upper back strain before starting this position that did not fully heal before starting. I now find that sitting at my desk for 8 hours a day is really bothering my neck and shoulders. I get up every hour and try my best not to slouch. Stretching too frequently aggravates my injury, so I am in a tough spot right now. Does anyone have any other tips to alleviate the tension in my upper spine and neck?
Comment: There is all sorts of advice on the intertoobz about setting up your desk / chair / keyboard / screen to help with pain. Here's some advice that's served me well. https://www.mayoclinic.org/healthy-lifestyle/adult-health/in-depth/office-ergonomics/art-20046169
Comment: I am not sure this is apropiate for this site. Medical advice should be given by profesionals
Comment: You should talk to your Health & Safety department, if you have it, or your HR department, if you have it. On the side, please seek medical advice for your pre-existant injury.
Comment: @user180146 got it, thanks for being honest.
Answer: Get a Standing Desk and an Ergonomic Chair
In several countries in Europe, you even can get it paid by the medical insurance if a doctor can prove that you have a pain problem. Do take this problem seriously and see a doctor. Some light gymming after work also helps.
Comment: Thanks for the advice. I am currently in PT and have stopped my regular exercise to heal. I will look into the desk and chair options.
Comment: +1 This is a great answer.  To add to it, the best standing desks are convertible and can offer the option to sit OR stand in the same day, with minimal adjustments.
Comment: also an adjustable height back rest, i often find the lumbar support is too low making no space for my bottom.
Answer: In addition to @Jishan's answer , you can also:

use a heating pad (bought from a store or a reusable rice one on your neck and/or shoulders.
take regular breaks using the pomodoro  technique or a program like Workrave
Comment: +1 for the rice bag.  To add on to this, "medical massage" has helped me a lot.  I wish it weren't so expensive, because it helps immensely with my neck and shoulder problems.
Answer: In addition to the other excellent answers, and to obtaining and following medical advice, check the relative heights of floor or footrest, seat, arms, keyboard, head, and screen. In particular, having the top of the screen too low can cause neck strain - at least, that was what an ergonomics person told me when advising ordering a monitor riser to lift a monitor up an inch.
See Office ergonomics, Your how-to guide.
If your work involves thinking time as well as typing, close your eyes or otherwise disconnect from the computer while you are thinking. A lot of us get into the habit of staying in typing position while thinking because that makes it clearer we are working.
Comment: Your monitor height is what primarily contributes to neck and shoulder pain. The pain will not be immediate but if the position is incorrect, it is like doing a shadow chair type muscle use for your neck for 8 hours. It's actually quite bad and that's why it hurts. You need to figure out how your head balances on your neck and adjust the monitor to that height.
Comment: The ideal is what I got because my former employer took ergonomics seriously - an ergonomics expert looking at me sitting in my office, in typing position, and saying "That monitor is an inch too low for you. You should order a riser.".


Are there any mantras that does not need any guru initiation but gives siddhi?

Question: Do all mantras that gives siddhi needs guru initiation? Or are there any mantras that can give siddhi without the need of guru?
Comment: Not a single Siddhi can be attained without Guru.. All these things come only through Guru Parampara in Hinduism. The real things are not taught in the scriptures. @Wikash_
Comment: Every siddhi can be attained without a guru.
Comment: The real things are taught in scriptures hence the popularity for scriptures such as the bg.
Answer: Yes, except the mantras like "Hare Rama, Hare Krishna" or "Om Namo Narayana" given by saints like Chaitnaya Mahaprabhu, Ramanujacharya to entire mankind, all other mantras need initiation, even if they are simple Gayatri Mantra or "Om".
Raman Maharshi

D: "Can anyone get any benefit by repeating sacred syllables (mantras)
  picked up casually?
M.: "No. He must be competent and initiated in such mantras." Maharshi
  illustrated this by the following story: A King visited his Premier in
  his residence. There he was told that the Premier was engaged in
  repetition of sacred syllables. The King waited for him and, on
  meeting him, asked what the words were. The Premier said that it was
  the holiest of all, Gayatri. The King desired to be initiated by the
  Premier. But the Premier confessed his inability to initiate him.
  Therefore the King learned it from someone else, and meeting the
  Minister later he repeated the Gayatri and wanted to know if it was
  right. The Minister said that the mantra was correct, but it was not
  proper for him to say it. When pressed for an explanation, the
  Minister called to a page close by and ordered him to take hold of the
  King. The order was not obeyed. The order was often repeated, and
  still not obeyed. The King flew into a rage and ordered the same man
  to hold the Minister, and it was immediately done. The Minister
  laughed and said that the incident was the explanation required by the
  King. "How?" asked the King. The Minister replied, "The order was the
  same and the executor also, but the authority was different. When I
  ordered, the effect was nil, whereas, when you ordered, there was
  immediate effect. Similarly with mantras."
Comment: why? There has to be some sort of reason.


Spiders in Judaism

Question: I'm interested in  sources regarding spiders from any jewish source, preferably ones that portray them as 'good'.
For example, I remember seeing they are called 'Buchya' in aramit since they are found at desolate places, crying on the Churban. (בוכיא as in בכי)
Comment: I heard from a granddaughter of R' Chaim Shmulevitz that spiders are evil (and should therefore be killed) because they are cruel. I do not know the source for this assertion.
Answer: Mishlei 30:28:

שְׂמָמִית בְּיָדַיִם תְּתַפֵּשׂ וְהִיא בְּהֵיכְלֵי מֶלֶךְ
The spider grasps with [her] hands, and she is in a king's palaces.

This is one of the four animals that are called חֲכָמִים מְחֻכָּמִים - exceedingly wise.
Footnote: Spider is a common translation in a large number of traditional sources, and it is the one Rashi uses. There are, however, other opinions, either a small lizard (which is now the scholarly popular opinion, apparently) or a monkey (Ibn Ezra).
Targum to Tehilim 57:3 is quoted as the source for the famous Medrash that a spider saved Dovid HaMelech's life, which practically an industry at this point.
In Perek Shira, it is associated with Tehilim 150:5.
Here is a very long piece discussing that portion of Perek Shira with many different aspects of the symbolism of a spider.
Answer: See this

The Medrash 'Alpha Beta Di' Ben Sirah' relates a story where King
  David asked Hashem why he created spiders for 'they are such ugly and
  useless creatures'. Hashem responded 'be patient, a day will come when
  you'll want to kiss one'. Some time later David had to hide in a cave
  from King Saul who wanted to kill him. As Saul's search party
  approached his cave, Hashem sent a spider which spun a big web across
  its entrance. When Saul saw the unbroken web he surmised that no one
  had entered there and continued his search elsewhere. When David
  realized what had transpired, he found the spider and gave it a
  grateful kiss! Hashem was teaching David that although it may not be
  obvious why each creature was created; they in fact all exist to serve
  a purpose.

Your reference to the term בוכיא is in
Sukkah 52a:24:

יצה"ר בתחילה דומה לחוט של בוכיא ולבסוף דומה כעבותות העגלה שנאמר
  (ישעיהו ה, יח) הוי מושכי העון בחבלי השוא וכעבות העגלה חטאה
The Evil Inclination is at first like the thread of a spider, but
  ultimately becomes like cart ropes, as it is said, "Woe unto them that
  draw iniquity with cords of vanity, and sin as it were with a
  cart-rope" (Isaiah 8:18).
Comment: Also fun: the related midrash regarding David HaMelech and mosquitoes
Comment: @IsaacKotlicky - U and I have been "busy" today ;-) I'm unfamiliar with this one. Same Midrash location? Otherwise, can you link the above?
Comment: Not sure, but predicated on the same concept re: David not understanding the purpose of creation.
Comment: @IsaacKotlicky - Yes, there are a number of them like that. Another famous one that I recall, deals with his not understanding the purpose of craziness / madness, until David had to use it himself when he was hiding in Avimelech's territory.

Spiders in Judaism


re-wiring/retro-wiring a Carrier 40MVC024 ductless A/C for external thermostat: guidance

Question: My server room has two air-conditioning units, with acutely counterproductive controls. I want to rewire them for external thermostats.
Can I simply splice a traditional thermostat inline with the "indoor unit signal" wire?
The model is Carrier 40MVC024.  It's EoL and even when new did not have an available external thermostat.

Question is threefold (descending order of confidence):

is my splice point correct?
is my assumption valid on whether the unit will simply cool and then stop when the thermostat cuts the loop?
will this introduce other issues?  For example, the built-in temp sensors say keep cooling, but the thermostat has shut it off--will this create a conflict that confuses the innate programming and causes other issues?

My thought is that I can close this loop with the thermostat.  As long as the air handler would be on anyway (e.g. set at 54 degrees), it'll run.
Carrier 40MVC024, ductless.  schematic page 14 shows my unit**
My best guess is that I need to disconnect the wire to "P2" and connect it to the thermostat/relay.  UPDATE:  Better phrasing would be to splice the thermostat's relay into this wire.
I may choose active control over plain thermostat
TL;DR
I was not involved in the selection of these units.  They use IR remote control, either remote will control both units--often simultaneously.  Mounted one over the other, the eye is on the bottom, so controlling the bottom one also controls the top and makes me homicidal.
Each unit contains a coil, fan, dampers, and control electronics.  Hoses and control wire run to rooftop condenser units.  Power hits the rooftop first, then comes inside.  Small server room where the idea is to have N+1 redundancy: either unit could cool the room on its own.  The no-budget-for-that logic is:

set one unit lower and the other higher
if the lower unit fails, the higher one protects the gear
periodically reverse the two, for even wear

The (huge) problem is controlling them separately.  Switching units takes far, far longer than it should.
Controlling the top one alone is tolerably cumbersome, but controlling only the bottom one is infuriating.  I've tried covering with my hand, weird remote angles, even covering with tape (still only somewhat successful).  The units beep to signify "message received," but it's difficult in a noisy server room to tell which one beeped (or if both did).  Further, I suspect the "mode" (cool, auto, dry, fan) is stored in the remote and re-transmitted with each keypress.
No display on the wall unit, so no way to see what temperature a given unit is set at.  This leads to a highly-aggravating cat-and-mouse when making changes.  Stabilizing within tolerable levels took HOURS of experimentation and frustration today but should take 30 seconds of reliable and simple buttons or terminal commands.
SOLUTIONS
I may simply grab two thermostats, but I'd rather get a relay block and use shell scripts to intelligently manage it (better failover control as well).  If anyone's had good luck with a given model/technique/script I'd love to hear about it.
** uhh... huh huhuh, huh. unit.
BONUS
Since humidity icing up my coils prompted this discussion I'm will also soon investigate budget humidity control.  Anyone with experience please chime in.
Thanks for reading
Comment: Have you been able to figure out anything about the IR codes the remotes use? A pair of IR blasters might be the easiest way to wrangle this...
Comment: @ThreePhaseEel thanks! I didn't consider that. To answer your question, no.  Is there a kit for decoding IR you recommend?  Never done that.
Comment: You should be able to get a USB IR receiver dongle pretty cheaply these days and decode the output from that -- simply point the remote at the receiver, push buttons, and see which codes it sends out.
Answer: So per ThreePhaseEel's advice I've gotten a USB-UIRT and a couple blasters.  First impression of the guy who builds/supports them is excellent--great communication, answered plenty of questions before I even ordered, several more afterward.
I still need to pull/audit the codes from the remotes, but I'll update this answer as I progress.  Warning: my time is limited, so this will go slowly.
Anyone is still welcome to answer my original question.  It may not quite be an XY problem, but it's definitely a grey area therein.  If No one answers my original intent before I resolve via the IR workaround, I'll accept my own answer after updating it appropriately.
To be continued...


Who taught Megumin Explosion magic? Is she mentioned anywhere in the LN?

Question: I have read the KonoSuba Light Novel upto Volume.8 and also the Explosions aka Bakuen spinoff. In the start of the spinoff the writer mentions about a woman who used explosion in front of Megumin. After that she practically fell in love with Explosion magic and eventually learnt Explosion. Does the main series or any of the spinoff tell about this anonymous woman. If so, tell me where?
Comment: This wiki page is unsourced but would answer your question: https://konosuba.fandom.com/wiki/Wolbach
Comment: @W.Are I didn't miss it. I just simply thought that the women must be Wiz and that the cat(Chomusuke) was Wolbach since Anis and the other greater demon were after the cat saying it was Wolbach.
Answer: Volume 9 of the light novel (Kurenai no Shukumei, or "The Crimson Fate") covers this backstory. We learn that the person who taught Megumin explosion magic is the evil goddess of Sloth and Violence, Wolbach, who also happens to be a general of the Demon King's army.

 We actually encounter Wolbach in episode 9 of season 2 of the anime (Kono Fujō na Onsengai ni Megami o!, or "A Goddess for This Corrupt Hot Springs Town!"), or equivalently in Volume 4 of the light novel (Namakura Karutetto, or "You Good-for-Nothing Quartet"). When Kazuma goes to a mixed bath in Alcanretia, he encounters a man and a woman there.

 We learn in the next episode that the man is a general of the Demon King's army, the poison slime Hans. The woman happens to be Wolbach, though this is not revealed then.

Wolbach does not reappear in the series in any significant manner after Volume 9, although at the end of Volume 9:

 It is hinted that Wolbach has been absorbed into Chomusuke, who is actually her other half.


Understanding the receive tab in electrum

Question: I've downloaded Electrum and have successfully transferred my first small amount of bitcoin to my wallet (after purchasing some through an exchange). I used the receiving address (by copy pasting it to the exchange) but what are the other options in Electrum's receive tab for 'description' 'requested amount' 'request expires'? In what circumstances should I fill in these fields... and in what circumstances should I save or create a new address? Thanks for your help, (I've searched online but doesn't seem to be a lot of information on these type of details)
Answer: Those fields are encoded into the QR code, so that it is easy for the person to pay you. The payer just scans the QR code, and if their wallet knows how to read BIP21 URIs, then they will already have the amount, description, and address filled into their payment form. In addition, if the offer is only available for a limited time, the wallet will prevent/warn the user from completing the transaction.
Comment: So for exchanges the info is irrelevant? Do you know what the save option does and in what situations would I need to create a new address? Thanks!
Answer: Actually if possible, create a new address for each transfer... For businesses or ppl who like to receive bitcoins with their online shop for example may not have the luxury of creating a new address for each payment they receive, but if you care about staying anonymous, you create a new address each payment ;)


Paint peeling in bathroom

Question: The paint is peeling in my bathroom. I would like to repaint it. I assume I scrape as much of the peeling paint off as I can before painting. Should I sand it smooth before painting? I have never painted a ceiling before, so any advice is welcome!
Answer: You'll need to scrape away all loose paint, and then skim those areas with good joint compound. Your best bet is to use a setting type compound which is less affected by moisture.
Then you'll need to seal and paint with paint suitable for wet areas. This is often an enamel type paint. Typical interior latex is likely to blister and peel again from the moisture.
Comment: +1, agree except for prime the patched areas before painting and good quality gloss or semi-gloss latex properly applied to a properly prepared surface will be fine.

Paint peeling in bathroom


Do you know online courses with Haskell for Theory of Computation?

Question: I taught Theory of Computation last Fall and I believe it would be more interesting for students to add some coding implementations. Are you aware of any online course or textbooks in which Haskell (or other languages) are used to teach CS Theory concepts?
Answer: This is another not-an-answer that might provide some useful resources. The last is probably the best, but not Haskell related
The two old standards for such a course are:

Introduction to Automata Theory, Languages, and Computation, by Hopcroft, Motwani, and Ullman. Earlier editions were just Hopcroft and Ullman.

Introduction to the Theory of Computation by Sipser.

I don't have the second book, and don't know if it includes any programming exercises, but there might be something in Scheme, knowing Sipser. Amazon's "Look Inside" doesn't seem to work for Sipser.
Two additional books, both very old and hard to get but very highly recommended if you can find them - both short and straightforward with clear explanations are

First Course in Formal Language Theory (Computer science texts)
by V. J. Rayward-Smith, and

First Course in Computability (Computer Science Texts)
by V. J. Rayward-Smith

The final suggestion is a software system with an associated text.
JFlap was created by Susan Rodger and her colleagues at Duke to form the basis of such a course. Students can easily create all sorts of finite automata. The book they wrote to go with this is JFap: An interactive Formal Languages and Automata Package, Rodger and Finley.
Wikipedia has an overview of JFlap.
Note that JFlap writes automata descriptions in XML which should be easy to parse in any language. All of the automata mentioned in the JFLap tutorial are available for download.
I was part of the NSF evaluation of this system and it is really excellent.
Comment: Sipser does *not* have programming exercises. I'd claim it shouldn't. It has great exercises matching the great content. Unfortunately, one can use them only as inspiration to make new ones because the answers to almost all of Sipser's questions are available online.
Answer: I am not aware of any textbook or online course, no, but I do this myself within my own classroom, and I can share my approach.  I use Scheme instead of Haskell, but the method would port quite well to Haskell.

We spend some time learning a bit about coding in Scheme, and FP in general.
We cover FSMs and regular expressions, and they code an FSM lab for which they create a DFA and an NFA function.  DFA takes an input string and a machine $(Q, \Sigma, \delta, q_0, F)$ and returns true or false.  NFA takes an input string, a machine $(Q, \Sigma, \Delta, q_0, F)$, and a maximum number of iterations (to prevent infinite loops), and returns a boolean.
We cover PDAs and context-free languages, and they create a PDA lab very similar to NFA.
We go over Turing Machines, and depending on how much time remains in the term, we either do a TM lab, or if there is not enough time, we do a variant on the Busy Beaver problem where I provide a TM, and their job is to create as many 1s on a tape as possible, with the caveat that the tape must halt by the time the lab is due, and they then submit their machine and a screenshot of the output summary screen.  This is done as a contest, and their contest score is $O / (S+A+I)$, where $O$ is the number of $1$s in the final output tape, $S$ is the number of states in the machine, $A$ is the size of the unioned set of input symbols and tape symbols, and $I$ is the number of prewritten states to the tape (i.e. the input).  Scores range from .5 to numbers in the quadrillions.

I do more things going forward with untyped $\lambda$ Calculus, and talk a bit about the Church-Turing thesis, but my emphasis switches sufficiently away from computational theory at this point that I wouldn't put it in the same boat any more.  We eventually create a REPL and interpreter for untyped lambda calculus (back in Java, no longer in Scheme), that allows for interactions like so:
> 0 = \f.\x.x
Added (λf.(λx.x)) as 0
> succ = \n.\f.\x.f (n f x)
Added (λn.(λf.(λx.(f ((n f) x))))) as succ
> 1 = run succ 0
Added (λf.(λx.(f x))) as 1
> + = λm.λn.λf.λx.(m f) ((n f) x)
Added (λm.(λn.(λf.(λx.((m f) ((n f) x)))))) as +
> * = λn.λm.λf.λx.n (m f) x
Added (λn.(λm.(λf.(λx.((n (m f)) x))))) as *
> 2 = run succ 1
Added (λf.(λx.(f (f x)))) as 2
> 3 = run + 2 1
Added (λf.(λx.(f (f (f x))))) as 3
> 4 = run * 2 2
Added (λf.(λx.(f (f (f (f x)))))) as 4
> 5 = + 1 (* 2 2)
Added (λf.(λx.(f (f (f (f (f x))))))) as 5
> 7 = run succ (succ 5)
Added (λf.(λx.(f (f (f (f (f (f (f x))))))))) as 7
> pred = λn.λf.λx.n (λg.λh.h (g f)) (λu.x) (λu.u)
Added (λn.(λf.(λx.(((n (λg.(λh.(h (g f))))) (λu.x)) (λu.u))))) as pred
> 6 = run pred 7
Added (λf.(λx.(f (f (f (f (f (f x1)))))))) as 6
> - = λm.λn.(n pred) m
Added (λm.(λn.((n (λn.(λf.(λx.(((n (λg.(λh.(h (g f))))) (λu.x)) (λu.u)))))) m))) as -
> 10 = run succ (+ 3 6)
Added (λf.(λx.(f (f (f (f (f (f (f (f (f (f x)))))))))))) as 10
> 9 = run pred 10
Added (λf.(λx.(f (f (f (f (f (f (f (f (f x))))))))))) as 9
> 8 = run - 10 2
Added (λf.(λx.(f (f (f (f (f (f (f (f x)))))))))) as 8
> true = λx.λy.x
Added (λx.(λy.x)) as true
> false = 0
Added (λf.(λx.x)) as false
> not = λp.p false true
Added (λp.((p (λf.(λx.x))) (λx.(λy.x)))) as not
> even? = λn.n not true
Added (λn.((n (λp.((p (λf.(λx.x))) (λx.(λy.x))))) (λx.(λy.x)))) as even?
> odd? = \x.not (even? x)
Added (λx.((λp.((p (λf.(λx.x))) (λx.(λy.x)))) ((λn.((n (λp.((p (λf.(λx.x))) (λx.(λy.x))))) (λx.(λy.x)))) x))) as odd?
> run even? 0
true
> run even? 5
false

I have much more to say about every one of these things individually, of course, but this answer is only a quick summary of what we do, so I will leave it here for now.


MOSFET reliability for critical applications

Question: I am working on a critical circuit that drives a DC motor in an aircraft landing gear system. The electric motor is a simple DC motor where one polarity extends the landing gear and reversing the polarity retracts it. My question is are there any reasons why using MOSFETs instead of mechanical relays would present a reliability issue? Obviously it is important that the gear comes down when it is commanded to so making sure this is reliable is high priority.
Comment: As mentioned somewhere in "The City and the Stars", from Arthur C. Clarke": "No machine may contain any moving parts."
Comment: Additionally, MOSFETs due to their wide availability and relative low cost, would allow you to implement series high side switches structures as well as low side structures and redundancy to allow you to retain control of the motor even if devices do fail
Comment: MOSFETs should be more reliable than a mechanical relay if you use suitable derating criteria.
Comment: This is not really my field. I think the relay will be more reliable and more serviceable, but will have a shorter service life. I would use a relay. What stops the gear, a limit switch? I think the relay has a better chance of surviving a lightning strike (which will eventually happen if it is a production airplane). Don't you have other designers or mentors you can ask?
Comment: Which airplane (model, company) it will designed in? (to avoid the model in the future) :-(
Answer: I have some background in high reliability electronics for space applications. The way you define "reliability" here is the key.
If you're thinking just in terms of the the random failure rate, a properly derated and protected flight-qualified MOSFET-based assembly can easily beat any equivalent relay.
But that's not the only thing to consider when chosing between those two technologies, of course. That would be too easy. :)

Are there any specific derating or reliable use guidelines for MOSFETs in aeronautical applications that make them unconvenient for your company? Has this technology been used before for this very purpose?
Are there any intrinsic advantages of one technology over the other? Such as higher immunity to single events (like lightnings, atmosferic radiation, etc.). Is there the possibility of single-event latch-ups (i.e. destructive response to an environmentally possible event) in any of those technologies?
Are there any environmental parameters that impacts more to one technology than the other (vibration, shocks, temperature, thermally induced mechanical stress, etc.) and that can precipitate accelerated aging and an early wear-out failure?
Which are the failure modes and their criticalities? Does any of the two alternatives have a significant advantage over it?

Sorry for raising more questions that answers, but your question can't be easily answered without having a broader view of the design problem.
Answer: Mechanical relays dont care of your smartphone's or other medium intensity rf fields. Requires a microwave owen to make some effect. Semiconductor parts are much more sensitive. Maybe there's no radio transmitters built to be in a near contact with your relay, but some non-thinking idiot can carry in one just when an aeroplane is landing.
Mechanical relay tears and wears in the use. But so does your motor. This kind of stuff has a regular pre-emptive maintenance program. The wear-out prone parts will be changed and refurbished before anything happens. The relay and the motor could be in one swappable assembly.
Answer: Well, relays can be easily replaced and can generally take much more abuse than mosfets can. I also imagine that, at least depending on the mosfet, some condensation due to temperature changes during flight could cause the mosfet to act in weird ways.
For example if lightning or whatever hits the plane, it is much more likely for the mosfet to break compared to the relay.
And also, if you use a relay and it breaks, you can borrow another from another device on the plane temporarily to operate the landing gear in emergencies, whereas a mosfet isn't commonly found in other places.
Comment: The MOSFET could very well be found in other subsystems on the plane if the airframe manufacturer stipulates the common use of parts. However the MOSFET is far more likely to be soldered in place making swapping harder whilst the relays could be socketed.
Comment: Yeah but seeing that he's designing the motor control and is concerned about using a mosfet, one could assume that it doesn't originally come with one. Either way in a situation where one needs to react quickly, there isn't much time to unscrew the mosfet, place the new one in, and attach it to its heatsink...
Comment: I do have to beg the legitimacy of the lightning argument. The relay itself may be more rugged than the MOSFET but BOTH are highly likely to be controlled by electronics circuitry that is susceptible to upset and damage by severe lightning jolts. So in that case neither subsystem can be considered overall reliable. This is one reason that some critical systems on a plane are still equipped with entirely mechanical control systems and linkage override systems.
Comment: Safety critical systems cannot be blindered to just one component or part. It is essential to consider the entire ecosystem and evaluate that to as much detail as possible. It is also RIDICULOUS to think that aircraft crew, in the case of a critical emergency, are going to be trouble shooting and trying to swap parts in the seconds or few minutes that remain before the final calamity. Any redundancy and override rollover mechanisms need to be designed in from the get-go.
Comment: If it is a small airplane, the gear descent may be controlled by a switch and simple relay logic. You flip the switch, the motor puts the gear down until it hits a limit switch. You put the switch in the up position, the motor retracts until it hits another limit switch.
Comment: It depends what you think of as a critical emergency. You seem to be straying away from the point. The OP was asking basically about reliability concerns. Say, if you were flying a plane and when approaching the airfield to land, the landing gear doesn't  open, would you immediately just attempt to crash land the plane? No. One would do various attempts to troubleshoot the landing gear before taking such drastic measures. An as I said, relays are more feasible. Replacing a relay is much quicker, and relays are more stable than mosfets, in the sense that they don't need heatsinks to run safely.
Comment: As others have speculated, there is no access to the mosfet/relay from the air. It would not be possible for the aircrew to swap the part. The pilot has an emergency direct power to motor switch that activates the motor in the down direction. The procedure is to hold the switch until the gear indicate down, or 15 seconds, whichever comes first. There is also a more difficult to access (but available manual crank that lowers the gear (in 300 turns)) The concern is not 'ease of replacement' but rather likelihood that the gear won't deploy if using a mosfet over a relay.
Answer: Here's an excerpt from the link below showing that the life expectancy of solid state relays (using MOSFETs) is much greater than electromechanical relays:
"Using the daily number of operations from our previous example, this means using an SSR instead of an EMR could extend the life of the switching component in the oven [a hypothetical example in the app note] from 2 months (with the EMR) to 833 years (or 83 years at the lower end of the calculation, just to be prudent)"
Crydom application note
Of course the design has to be appropriate for the environment, including ESD, weather and temperature conditions, transient voltages, EMI, etc.
It's also possible to use additional FETs (or relays) such that any single switching component failure does not cause loss of functionality, though that's much more complex and costly.
Answer: As far as average lifetime goes, the MOSFETs will probably win if properly derated and protected with surge absorbing devices.
Reliability- I would say it would go direct switch, relay, MOSFET, in order of decreasing reliability. It takes very little energy to cause a MOSFET to fail 'on'. There are plenty of sources of spikes in most aircraft. A relay will seldom fail in the middle of its useful lifespan.
Whatever you do I suspect you'll want a reasonable and well-documented plan 'B' available to the pilot. What happens if the main bus power goes down?
Answer: MOSFETs would be more reliable than a relay due to total cycles, but you probably have a larger issue.  I would suggest using a BJT for the following reasons:

The MOSFET is sensitive to ESD.  When you are flying around, you are actually creating charge.  Planes create lightening.  I would not be surprised to find that you blow out the MOSFET gate due to a static discharge.
Relays have a fixed amount of cycle times, cold metal shrinks, vibrations can destroy the aperture.

The advantage of the BJT is that is can self-heat down to about -80C, and it is largely immune to ESD. The scariest part of any implementation is always the mechanical components. You could also use the BJT current as an indication of up/down instead of limit switches by having a resistive shunt that would make it completely solid state.


On the habitability of the night side of a tidally locked planet

Question: If an Earth-like planet was tidally locked to a star similar to Sirius A, at which distance from the star would the night side be able to have liquid water, possibly with an average temperature of about 10ºC in the night side?
Comment: Hi G-Temez. Welcome to Worldbuilding SE. You are asking different questions, and it would be preferable to focus on one at a time. You can always ask follow-up questions later.
Comment: EDIT: Removed questions about the satellite of such a planet in order to allow answerers to focus on the main question.
Comment: The answer for the proper distance that you are looking for depends greatly on several factors. Perhaps the most important one for this question is how dense the atmosphere is and its general make-up. The denser the atmosphere the better heat is transferred to the night side. Thus if the planet has an atmosphere twice as dense, it will be much easier to have that night side maintain a comfortable temperature. Also a temperature inversion in the upper atmosphere would help too. However without specifics, I am unable to give a detailed answer.
Answer: See also Physics SE and Space SE with the same answer.
A fascinating presentation on the SETI Seminar Series goes over tidally locked worlds and lays to rest the presumption that the day and night sides are extreme and inhospitable.
The situation can be substantially complicated by

odd half multiples of spin-orbit synchronization, like Mercury
eccentricity
inclination of orbital plane
axial tilt

In short, locking does not mean an unmoving sun; situations like Mercury are in fact the norm, and the presence of other giant planets can drive a close rocky world into a state with both high inclination and eccentricity, and eccentricity causes odd-half multiple rotations to be preferred.
In extreme cases, the overall insolation can be averaged out to the same degree as a non-locked world like ours.  And it takes far less to average out the temperature to a reasonable degree.
Sirius A is 25 times more luminous than the sun but less than twice the diameter, and is only 250 million years old.
A planet close in would be baked indeed.  Unlike the case of Mercury and the trend of figuring out how such planets could be more uniformly lit, you really do want it locked with a permanent night side.
Note that even Mercury has ice in permanent shadows.  The key is not having an atmosphere.  That means not having liquid water either.
Consider an underground aquifer.  If the planet has a permanent day and night side, the place for liquid water does not have to be exactly at the anti-sol point. It can be frozen at the midnight point, and have a "just right" belt some distance between the hot and cold.
The existence of such temperature gradients depends on the composition of the rock, and how it conducts heat. So, you can considerable flexibility in making it (plausibly) come out just right.
I'm more worried that a rocky world would not have had time yet to cool down and form a solid crust.  That's more of a hard math physics question.
Comment: I'm not sure about what you mean by odd half multiples, though. As for the orbital eccentricity, I would go with an Earth-like value such as 0.01, but I am assuming that a lower eccentricity allows for a more "stable" tidal locking, a point on which I might be wrong. As for the inclination, I assume you are refering to the axial tilt to the orbit plane, for which I would give a value of 6.69, same as the Moon.
Answer: When discussing the habitability of a tidally locked planet, temperatures are only ONE of the vast array of variables, each of which has a critical role in determining whether long term life sustenance is possible on the planet or not. Here is a list:
1- Temperature
As presented in your query, temperature is one of the key factors determining the habitability of a planet (tidally locked or not). The temperature on the night side of the planet would depend on:
a. Composition and thickness of the atmosphere. By "thickness" I mean how far the atmosphere extends above the crust of the planet. By composition, I specifically mean the presence of greenhouse gases. You could say that temperature on the night side = density of atmosphere x ratio of greenhouse gases
b. Presence of active volcanoes on the night side. This should be self explanatory. Volcanic activity does a long term job of heating up the crust of a planet.
c. Presence of large water bodies (oceans) on the planet. Large water bodies do a magnificent job in reducing the difference of temperatures between two zones. If there is a huge ocean that stretches both sides (day and night) on the planet, the temperature difference on these sides would be much lesser than if it were a desert planet (no water).
2- Perpetual Wind Speed
Seasonal storms and gales are one thing, but when you have a large temperature difference between two sides of a PLANET, things get terribly messy. We are talking about vortexes, cyclones and dunes in speeds excess of 1000 km/h. For the sake of reference, remember that a hurricane/cyclone with wind speed exceeding 350 km/h would splatter normal concrete houses to bits. Storms exceeding 600 km/h would bend and crush metal structures (we are talking steel here). I don't want to discuss wind speeds exceeding 800 km/h here. The very thought gives me shudders of horror. You should read about the giant red spot on jupiter to learn about what I mean. All these horrible vortexes are generated due to temperature differences.
3- Renewable Food Source
The night side of a planet means no direct sunlight. No direct sunlight means no photosynthesis. No photosynthesis means no green plants. No green plants means no herbivores. No herbivores mean no mutton, beef or chicken. No photosynthesis also means no wheat, rice, maize, barley, pizza, pasta, chocolate cake ... You will need to develop a food chain base. A food chain base is something that generates food for others and makes it food by itself. On our planet earth, it is green plants making magic happen with photosynthesis.
5- Building Material Availability
What are you going to make buildings with, on the dark side of the planet? No photosynthesis means that "wood" is out of question.
a. Is there a system of natural caves where people can live in safely?
b. Is there an abundance of easily available building materials other than wood? Iron, hydrocarbons (plastics family), construction grade rocks (granite, hard layered limestone/marble etc). If your people aren't living in caves, you'd certainly need some of these things to build houses for them.
6- Perpetual Light Source(s)
Because, you know, you are living on the night side of the planet and your characters would be groping in perpetual dark unless ... you give them sort of giant planet-wide lamp or something.
7- And yet ...
The above mentioned 6 variables are the very basic things you cannot even THINK surviving without, on the night side of a tidally locked planet. Having all these does NOT mean you can host an intelligent civilization on that planet. Think about these little things:
a. In the absence of photosynthesis, how are you going to get all the vitamins required for healthy growth? You can't survive on carbohydrates or proteins alone. Where are you going to get the "fiber" in your food?
b. Sunlight is also necessary for skin, eyes and several other things in our body. If you live in an underground well-lit shelter for 2 weeks, you are going to quickly lose your skin freshness and your muscle strength. Thats what sunlight deprivation does to you!
c. For a civilization living in perpetual dark side of a planet, evolution rule states that they will lose the sense of vision rapidly as there will be no use for it. Creatures living in dark caves don't have eyes. You ought to provide a natural light source for your people. It's mandatory if you want them "seeing" things!
d. Besides energy requirements of food, you also need water. Fresh, clean, pathogen free water. At least for complex life on earth, which we are used to seeing and being.
These are the very basic factors determining the habitability of a planet. There are several other "subtle" variables too, which I haven't included here for the sake of refraining from dragging on. For a start, think about gravity, metabolism type (oxygen I mean for earthly life), sensory organs, modes of locomotion, moon systems, cosmic rays prevention system (ozone layer, in case you were wondering) etc etc etc
Comment: If life exists on the day side, a pretty good survival technique would be to store up some energy and drift around to the unlit side where you're safe from predators. Especially if there are winds or currents that would carry you into the dark side and bring you back before you run low on energy. Of course once that becomes common, you start getting predators on the dark side....
Comment: Ouch ouch ouch! Never ever ever ever go to the daylight side of a tidally locked planet, especially if it has a dense atmosphere. You're going to get fried within minutes, not hours!


Tezbox - transfers not working

Question: I have a mac tezbox wallet. I can login and see my tz and kt address and balance. However I am not able to do any transfers. I tried installing the new tezbox , clear and restore, nothing works. Any idea how to fix this issue.
Comment: Did you try contacting tezbox? Either in their github or by email (firstname.lastname@example.com). Your question is too vague answer. Are you getting any specific error messages?
Comment: No, sorry. Did you try contacting tezbox? You could direct them to this post. Can you transfer to other tz1s? You could try to transfer your funds to another account and see if the problem reproduces.
Comment: I am not able to transfer tezos from my KT address to TZ address. I don't get any error but, the transfer never happens. It shows blank on tzstats.
Comment: read this tutorial tezbox sometimes gives those errors https://medium.com/@jiki99887651/tutorial-how-to-resolve-tezbox-wallet-error-operation-failed-9c4a2e40f57f
Answer: I don't have a solution, but I have the same or similar problem.  Tried to transfer from KT to TZ, and I get an "uh-oh" error without any description.  Tried to transfer from TZ to KT (as I read this was a way to regain access); while texbox reported that the transaction was received, it never posts to the chain.  For background, this problem is with TezBox Chrom and Windows 64 wallets.  The KT account had been delegated to Dutch.tz.  It looks like since I have been away, Tezos implemented Babylon and the delegator shut down.  Posting this in case it helps others.
Update: I transfered my funds.  I heard from Teztech, and I'll paste their advice below, but it did not help me.  (Instead, once my TZ account was increased over .01 TZ, I was able to transfer out of my KT account.  If it doesn't work initially after the transfer, try waiting 24 hours after the balance goes over .01 TZ.  Not sure if this was a factor; its just how it worked out for me.)
Here's from Teztech:

Advice from Teztech: Please read below and also read article attached
  in link before clearing and restoring your account.
This is a TezBox specific bug, and we're really sorry to all those
  that saw this screen. If you've tried to unlock your wallet for the
  first time after the upgrade and you see this (and you know you've
  entered your password correctly) than you are affected by this bug.
Solution: Simply click Continue (to get rid of the error prompt), and
  hit click the Clear TezBox on the password screen. You will then
  return to the start screen when you can Restore your wallet (from your
  seed, private key or ICO details) or re-link your hardware wallet.
Cause? It took us a while to debug this issue as it never came through
  any testing, but we believe that accounts created using an early
  version of the wallet changed the format of the stored data which
  wasn't compatible with the upgrade. We'll be sure to do more unit
  testing with older versions of our wallet in the future.
Dealing With Babylon Article:
  https://medium.com/@officialtezbox/dealing-with-babylon-8aee7ef64a0
Also, you need to have at least 0.01 Tez in your "Tz1" address before
  transacting from your Kt1 account. Please use the Tezos Mainnet faucet
  to obtain the required Tez needed. After you have the required Tez
  click "Update Fees" prior to sending and do not change the fee
  parameters manually.
Tezos Mainnet Faucet:
https://faucet.tezos.com

Tezbox - transfers not working


Tram service to Old Trafford from Manchester Picadilly?

Question: How frequent is the tram service from Manchester Piccadilly to Old Trafford and what are the charges?
Comment: Google's pretty easy: 'old trafford tram frequency"...for the future.
Answer: Note on locations
Note that the Metrolink stop named "Old Trafford" is for the Cricket Ground, not the Football Ground. For MUFC, you should get off the tram at Pomona, Exchange Quay, Old Trafford or, from 2020, Wharfside and walk from there. This question should be useful to you.
Tram Frequency
You can see Tram Frequencies for leaving Picadilly on this page fromm Metrolink (also possible to get them from other stops). Most services run every 12-13 minutes, although some run every 6 minutes during the day. On Match days, extra trams will be put on before kick off and after the final whistle. As you can pick between several different tram lines (see this map, once the work in St Peters Square has finished for the lines), you will probably normally have to wait no more than 3-4 minutes for a tram.
Pricing
You can use this tool provided by Metrolink to check the prices at the time you travel. Currently, the journey would cost you £3.00 for an off - peak (after 9:30) return from Picadilly to Exchange Quay. There are also options for singles, on peak tickets, and all day travel cards. There are machines that take (chip and pin) cards and cash on all platforms, and there is also a mobile app called GetMeThere that can be used to purchase tickets. It's also possible to load up an ITSO type card with tickets (Manchester's variant is branded "My GetMeThere", but for a tourist, this is not worth the bother.
Comment: Not going to feel bad adding this comment since it's been necro'd. You can still get off at Old Trafford and walk past the Cricket Ground to get to MUFC. In fact, if you were coming via the Bury line, this is what I'd suggest as it'd allow you to stay on the Bury - Altrincham without changing trams. Source: I'm a daily Metrolink user, MUFC Fan, and use the Bury line.
Comment: Just saw this post and noticed bits were out of date, so fixed them. But err, Old Trafford is one of the 4 stops I suggest.
Answer: According to Manchester's website:

The other quickest way of getting to Old Trafford (especially for
  Sunday matches) is to grab a lift on the nearest tram/metrolink. Trams
  travel every 12 minutes every day of the week.

And from Metrolink:

The price for an adult return ticket is £3.20 and £1.20 for a child
  return ticket. One day travelcards and family travelcards are also
  available to purchase from the ticket machines.
Comment: That Manchester.com site is weird. Not at all clear who built/maintains it or why.
Comment: @CMaster random company. Been going since 1994. Wonder how many offers they've had for that domain name since then...


Clickable behavior of the checkbox with a link

Question: How should checkbox behave if it has a link inside text field? Is it a good UX if only underlined link links to another page when the rest of the text in the control and the box itself check the checkbox?
Answer: I would open a new tab / modal rather than letting the user change page just to read the rules.
What if the user has already filled out everything and then is redirected to another page?
Sure you could store what the user typed; but I think it would cause frustration being redirected.
Answer: Remove the link and add it to the end of the line, away from the checkbox label:
[ ] I accept rules of the website. (Click here to read rules)
Two things have been acheived:
1- You kept the checkbox mental model (the whole link checks/unchecks the choice)
2- You clearly stated "click here" which removes any confusion between the checkbox label functionality and the link (don't let me think).


Is there any way to mass background restrict app battery usage?

Question: My Pixel 2 has been experiencing severe standby battery drain (last night it went from 95-30 while I slept), and I'm pretty sure it's one of my apps' faults since it doesn't happen when I reboot the phone in Safe Mode. So now I'm trying to restrict most of my apps from using battery in the background, but it's a huge pain going through 50+ app battery usage pages to toggle their "Background Restriction" property. There's a page to disable app battery restrictions in Settings > Battery > Adaptive Battery > Restricted Apps, but there's no way to add apps to that list. Is there a mass app battery management settings page/developer option I'm missing, or maybe an app that provides this functionality?
Comment: Look in background and replace them with ones that do not drain your batter.
Answer: I don't think there's anything else because all you have to do if you want to restrict background battery usage is to toggle the slider on all 50 apps which barely takes a minute. But if you want help for a longer lasting battery you should search for "Battery" on the google play store and you will find a lot of apps to help you.


Do I need to sacrifice again if I copy Goblin Grenade?

Question: Let's say that I cast Goblin Grenade, sacrificing a goblin to pay it's additional cost.  Then, before it resolves I cast Increasing Vengeance, which allows me to copy the Goblin Grenade.  Since I've already paid the additional cost of Goblin Grenade, do I have to pay it again?
Answer: No, you do not need to pay additional costs for a copied spell. A similar example of Fling exists in the comprehensive rules, that is close enough to Goblin Grenade for illustration purposes.

706.10. To copy a spell or activated ability means to put a copy of it onto the stack; a copy of a spell isn't cast and a copy of an activated ability isn't activated. A copy of a spell or ability copies both the characteristics of the spell or ability and all decisions made for it, including modes, targets, the value of X, and additional or alternative costs. (See rule 601, "Casting Spells.")

Example: Fling is an instant that reads, "As an additional cost to cast Fling, sacrifice a creature" and "Fling deals damage equal to the sacrificed creature's power to target creature or player." When determining how much damage a copy of Fling deals, it checks the power of the creature sacrificed to pay for the original Fling.
Answer: You don't need to sacrifice another Goblin or pay any other costs.
Additional costs are paid as part of casting a spell. When you copy a spell with Increasing Vengeance, the copy just pops into existence straight on the stack. Technically speaking, it's never "cast" at all.
Comment: @Hackworth Where you'd going is correct, but Isochron Scepter is an incorrect example.  The scepter doesn't copy a spell, it casts a copy of a card, Fling works fine on it.
Comment: If you put a copy of a spell on the stack, you **can't** pay regular, alternative, or additional costs. It's not a choice. This is relevant when you don't copy an existing spell but put it on the stack by other means, such as [Isochron Scepter](http://gatherer.wizards.com/pages/card/details.aspx?name=isochron%20scepter). For example, a [Fling](http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=271225) put on the stack through an Isochron Scepter Imprint cannot deal damage because you can't sacrifice a creature to it.
Comment: @Hackworth The rulings on isochron scepter very specifically state you can pay additional costs. Of the 145 cards that reference casting spells or copies of spells without some kind of payment, every one of them specifies that it is done without paying the mana cost - any additional costs must be paid.
Comment: The same is true for the 129 cards with the keywords Cascade, Cipher, Rebound, Ripple, and Suspend which all allow casts without paying, and specify mana costs in their rules. There is no current effect in magic that allows the casting of spells completely without the payment of any costs, simply most cards only have a mana cost to prevent and most people start to think of that as the whole cost.


Why I'm not asked to set a password for Root when Installing Ubuntu?

Question: When I install Ubuntu, it never shows an option to set a password, yet there is a password when trying to log in to the admin account and when I try to install packages. I can't change the password in Root because when I try to it says "Authentication manipulation token error". When I try to fix the shadow password thing in root it says access denied.
Answer: You aren't supposed to add a password for the root account. We have something called the sudo mechanism to handle that. Instead, you add users to the admin account. All those users can then run commands or programs as root by running sudo command for terminal commands or gksu command for GUI apps to run as root, such as gksu gcalctool though that example obviously makes no sense)
When you're being asked for a password when installing things, etc, it is your own password you should use. This way, it is possible to enable others to do administrative tasks without having to share passwords and keys. It is also configurable to allow someone to run a specific command as root, but not others, but you won't normally touch that.
The first user you created is by default the admin account.

https://help.ubuntu.com/community/RootSudo
Comment: The first user ... is by default **an** admin account: you can add others (as you say before "you add users to the admin account").
Comment: account -> group? -- Check `/etc/sudoers` to see why `sudo` succeeds for users in the `admin` group. You need root privileges to read this file.
Answer: You can use root privilege to run commands/applications by adding sudo , gksu key word on start of any command. like sudo gedit and it will ask you admin password
Also for switch terminal to root level, use sudo su.
In any case, you can change root password by following procedure:

Start a terminal (by pressing Ctrl+t)
Run sudo -s to accessing root privilege
Run passwd root for changing root password. It will ask you new root password.
Now you can login using root and if you open a terminal, you can see # in prompt.
Comment: I would advice against using this. It is more likely to break things in the long run than anything else (and it only has to go wrong once).
Comment: If an admin wants it, it is here. In addition, do you try to boot Ubuntu using recovery console? It allows anybody to access root level! I used this procedure to change root password for more ensuring about unauthorized access to my PC.


Is clip-on tuner suitable for stage in orchestra?

Question: I googled and saw videos in youtube about tuning in classical orchestra during their live performance. I was wonder if somebody tell me that using clip-on tuner for instruments (like violin) in classical orchestra in their performance on stage in front of many people is usual and good? or this isn't usual?
Comment: I've never seen professionals use these. I've seen a few student orchestras use them. As Carl answered, the most precise tuning would not be possible with a digital tuner since the orchestra has to be in tune with itself more than it has to be tuned to an arbitrary standard. Since clip ons are easy to use, they can streamline the process of getting in the right ballpark for younger players or those with less developed tuning ability.
Comment: A clip-on tuner can help sometimes, but not very often. In the orchestra we need to listen to each other and intonate (tune) together. With experience this gets better, professional players have that experience. Amateurs, maybe, as it is can be a distraction. Personally, beeing an amateur, I tend to use a clip-on when playing contrabassoon. It is a weird instrument, in that it can be very difficult to actually hear the intonation when playing.
Answer: No, it's useless.  You need to tune to the orchestra, not to a predefined frequency.
Comment: The point carl is making is that the oboe (generally) that the orchestra tunes to may or may not be exactly at A=440Hz - so-called 'concert pitch - although that varies round the world. Whatever note the oboe produces is the pitch for that concert. Even if you used a really expensive tuner, unless you re-set it to accept that oboe's pitch, it wouldn't be correct. Apart - I'd think an orchestra with clip on tuners was pretty naff.
Comment: N.B. *Naff* means "lacking taste or style", according to one online dictionary. I had to look it up so I figured I'd assist any other Americans here.
Comment: @ToddWilcox  Awwwww, you took all the fun of people having to go learn about someother country's slang  :-)
Comment: Unfortunately lazy people like me often try to work from context clues instead of actual learning, so I used to think *naff* was more like "wicked fresh" but now I see it's really closer to "bogus".
Comment: It seems you don't understand my question, We all have tune in the orchestra at first of the live performance, but during live performance(in the middle) we want to tune again, If everybody has clip-on tuner, is this bad?
Comment: A professional musician doesn't need a tuner - just his/her ears.


"Non-constructive" posts

Question: See this post
It seems to me that this post belongs to a "list" of posts from new users that are quite "suspect".
They iterate the request for help adding details to the question without much sense.
What we can do with them ?
Thanks
Answer: I think that the main thing we can do is to help the user(s) ask better questions. It seems clear to me that the user(s) don't know what we are looking for with these basic computability questions. The best way to fix that, in my opinion, is to give helpful, specific guidance about what we are looking for.
It also seems to me that the user(s), like many users here, speak English as a second language. Some things may seem unclear because of the language barrier, and so we should give some benefit of the doubt.
There is another difficulty specific to this situation. There has been an appearance over the last few days/weeks of a user using multiple usernames to repost closed questions. Duplicate and reposted questions should be closed, but at the same time we need to ensure the user has information about how to improve the original question.
And, of course, we should not rush to judgment and assume that all the usernames are actually the same user. For example, there could be several students who are all taking the same exam, and who all post on this site.
The moderators can look into some things behind the scenes. In a comment to another answer in this thread, there is a confirmation that they have spent some time on it. For better or worse, the moderation process on this site is quite opaque. This has the benefit that "regular" users (non-moderators) don't have to worry about it, and we can avoid some kinds of drama. The downside to the opaqueness is that "regular" users have little way to tell whether anything is being done, and usually no way to know what was done, if anything.
Comment: Thanks Carl for your insight; you perfectly understood what I was alluding to ... without the patience to detail in my post. After my rant, the same question popped up again with a new user. This time I gave it an answer and what increase my (possibly irrational) suspicion is that the answer received no feedback: I'm not speaking in term of reputation, but of "usual" comments asking for more details... assumed the limited knowledge of the topic displayed by the OP (sorry for the rudeness).
Answer: This appears to be part of the problem with demanding too much "context" from some questions: they just spout off everything they can think of/find which appears to be related to the question at hand. IMHO, there is probably a reasonable question hidden there (at least something that wouldn't get automatically closed for "lack of context") which wouldn't be drowned in a sea of verbiage.

I'm having trouble determining why the following statement is false (as stated page 154 of Problems in Set Theory, Mathematical Logic and the Theory of Algorithms):

Each recursively enumerable set is the range of an increasing computable function.

I know that a set $A$ is recursive if and only if it is range of an increasing partial recursive function. I also know that the Halting Problem gives an example of a recursively enumerable set which is not recursive.

From this you get a pretty good idea of the grasp on the subject that the user has, but also that there is some effort to try to understand.
Revision 5 of that question is probably the cleanest one, and I have rolled back to this one, while explaining my reasoning for doing this to the OP. You could have done this, too.

As for the OP pestering you in comments: feel free to flag those if you have no interest in answering the question. Apart from that, I guess you could answer the question.
Comment: I think issue is not the request for context - it's that the user is not adding the context requested, namely what they have already tried. But the deeper issue that the meta post here is referring to is the appearance that there is user who has been posting many low-quality computability questions recently, under a sequence of usernames. I had flagged this once, but the flag was "declined". I wish from time to time that the moderators were more polite about responding to nontrivial flags (e.g. by email).
Comment: Ok, thanks a lot.
Comment: @CarlMummert: In this instance, it would have come from a request for context because the question was first closed for... lack of context. An edit was made, which put it into the review queue, but the user didn't appear to be aware of the workings of this queue, and when it wasn't re-opened fast enough, opened a new question with the regurgitated garbage, which was then copied into the first still-closed question. From what I have seen, the vast majority of questions like the one I outlined above would not be closed for lack of context. _[cont...]_
Comment: _[...inued]_ As for the user at the heart of this, I would rather try to encourage what I perceive as better (not _perfect_ but _better_) behaviour than continue to fight with new accounts. I have personally spent hours on this particular case this week, not to mention the time of the other moderators and a Community Manager or two. (Since the Community Managers get paid for their service, maybe they don't count.)
Comment: Thanks for the detailed comment, and for the volunteer time. I'm sure that you could have done other things. @ArthurFischer

"Non-constructive" posts


My toilet seat is loose

Question: My toilet seat has been loose for a few weeks now. I would like to fix it. I am unable to access the area where the screws are. I have attached some photos to show how I am unable to access the toilet.
Comment: The 2nd pic indicates that you need to reach under the back of the porcelain to find the nut/bolt that holds the seat down. I don't think there's anything at all you need to do with the seat/lid itself, beyond hold it in position.
Answer: Here's your problem right here.

There'll be a vertical screw going straight down through the porcelain toilet bowl.  If you follow that imaginary vertical line, you'll find some sort of recess or pocket providing access to the "nut" on the bottom.
Expect a plastic cartoon version of a nut that is designed to be tightened by hand; it's normal for those pockets to be confined enough to make it hard to get tools in there.  Or if not the pocket, the working space lol.   Sometimes the nuts get sticky and need some persuading, but improvise what you need - I've used a huge 1-1/8" hex socket that fit over the plastic nut, I've used pliers, etc.
DO NOT go down to the hardware store and get actual metal nuts of that same thread.  The cartoon nut is plastic for a reason; using metal hardware will easily crack the porcelain and then you need a new toilet. Been there, done that (the guy before me had selected metal hardware; I just tightened it without thinking).
Now you're saying "I know about that loose nut; I choose not to fix it and want to fix the problem I stated" -- but they're related.  One is causing the other.
Comment: The last toilet seat that I installed (about a year ago?) actually called for using a metal wrench or socket set.  The plastic nut at the bottom actually had two parts, with the bottom part shearing off when you had reached the level of torque that they wanted.  (and then the top part so you could take it back off if needed).
Comment: It might be just me lucky but the latest lids I have all came with a plastic "wrench" that makes it easy to reach into the recess and tighten the nut. Might be just that I don't buy the cheapest one I find. :-)
Comment: my toilet also came with a plastic wrench tool that is custom designed to make tightening easy. **do not throw it away. keep it.** (i had to buy the toilet seat again to get the tool.) you have to tighten it about once every 1.5 years (if used more than requires more tightening).
Answer: There should be a button to press which will release the seat from its hinge post on either side. If it's not the large silver knob then it may be hidden:

The pic below is from a toilet similar to yours, and may help with figuring it out. It shows how the seat hinges slide and clip onto the hinge posts mounted on the toilet:

https://cdn.shopify.com/s/files/1/1585/4485/files/SM-WT530_530MB_Manual.pdf?v=1598974159
Comment: Unlikely. This lid seems to be of simpler construction, just the bolt going down. As mentioned in the other answer, those nuts are usually plastic (I don't think just to save two cents, more likely to reduce the chance of overtightening and breaking the bowl; well, Harper mentioned this too, I should have read more carefully), so they can get loose or broken.
Comment: Ugh, those clip-on ones are the worst.  I moved into a place that had one of the clip-on seats, and no matter how you tightened it, it would pop loose again every week or so.  I eventually threw the thing out and replaced it with the traditional plastic screw type and it's lasted for years without need of further maintenance.
Comment: Yeah believe you me, you really, really want the failure point to be the "cheap" plastic bolt/nut.  Because otherwise it will be the porcelain toilet.

My toilet seat is loose


Low pass filter

Question: The goal of this challenge is to implement a digital low-pass filter.
You are free to implement any type of digital filter you want, however whatever results produced must pass the validation script below.
Here's a general description of what the validation script expects:

When an FFT is taken of the filtered signal, the filtered signal amplitude at any frequency bucket:

If the input signal has a frequency bucket with a value below -80dB, then the output signal bucket needs only be at or below the -80dB level.
A decade below the cutoff frequency must not differ from the source signal amplitude by more than 3dB at the corresponding frequency bucket.
At or above the cutoff frequency must be at least 3dB below the source signal amplitude at the corresponding frequency bucket of the input signal.

The output signal must be in the time domain and have the same number of samples and sample rate as the input signal.
You need not preserve any phase information or worry about aliasing.
The output signal must consist of only finite real values (no NaN/ infinities).

Input
Your program is given the following inputs:

A time domain sampled signal consisting of real numbers representing the amplitude of the signal at the sample time. Your program will be given the entire sample data at the beginning, but this is not necessarily the same between different runs of your program. You may assume the number of samples is sufficiently small that you don't have to worry about running out of memory. You may assume any single input sample is between [-1, 1]
A positive real number representing the sample rate (in Hz)
A positive real number representing the cutoff frequency (in Hz)

You are free to dictate the exact form of the input as long as no additional information is given (ex.: passing a data pointer+length for the time domain signal is ok, but passing in FFT information is not). The input can come from any source desired (file io, stdio, function parameter, etc.)
Output
Your program should output the time domain filtered signal. The output may be written to any source desired (file io, stdio, function return value, etc.). You should not need the filtered signal sample rate since it should be the same as the input sample rate.
Validation Python function
This should work with Python 2 or 3 (requires NumPy)
from __future__ import division, print_function
import numpy as np

def validate(original, filtered, srate, cfreq):
    '''
    Validates that the filtered signal meets the minimum requirements of a low-pass filter.
    A message of the failure mode is printed to stdout

    @param original the original signal (numpy array)
    @param filtered the filtered signal (numpy array)
    @param srate the sample rate (float)
    @param cfreq the cutoff frequency (float)
    @return True if filtered signal is sufficent, else False
    '''
    # check length
    if(len(original) != len(filtered)):
        print('filtered signal wrong length')
        print('len(original): %d, len(filtered): %d'%(len(original),len(filtered)))
        return False
    # assert filtered signal is not complex
    if(np.any(np.iscomplex(filtered))):
        print('filtered contains complex values')
        return False
    # assert filtered signal is all finite floats
    if(not np.all(np.isfinite(filtered))):
        print('filtered signal contains non-finite floating point values')
        return False
    o_fft = abs(np.fft.rfft(original))
    f_fft = abs(np.fft.rfft(filtered))
    f_fft /= np.amax(o_fft)
    o_fft /= np.amax(o_fft)
    fft_freqs = np.fft.rfftfreq(len(original), 1/srate)

    orig_small_mask = (o_fft < 1e-4)
    big_mask = ~orig_small_mask
    # check small values
    if(np.any(f_fft[orig_small_mask] > 1e-4)):
        print('input signal had a bucket below -80 dB which the filtered signal did not')
        return False

    ob_fft = o_fft[big_mask]
    fb_fft = f_fft[big_mask]
    fftb_freqs = fft_freqs[big_mask]
    low_mask = (fftb_freqs < 0.1*cfreq)
    high_mask = (fftb_freqs >= cfreq)
    lows = abs(fb_fft[low_mask]/ob_fft[low_mask])
    highs = abs(fb_fft[high_mask]/ob_fft[high_mask])
    # check pass bands
    if(np.any(lows > np.sqrt(2)) or np.any(lows < 1/np.sqrt(2))):
        print('pass region is outside of +/- 3dB')
        return False
    # check filter bands
    if(np.any(highs > 1/np.sqrt(2))):
        print('filter region is not at least -3dB below original')
        return False
    # passed all tests!
    return True

Examples
Here are some Python functions which can be used to generate example datasets. Note that these scripts require NumPy. The output of each function is a tuple containing (samples, sample_rate, cutoff_freq). Note that it is very easy to get a different test case by choosing a different cutoff frequency; the example ones are just somewhat "interesting" cases.
from __future__ import division, print_function
import numpy as np
def case1():
    # simple sine wave, cutoff including primary frequency
    t = np.linspace(0, 1, 10000)
    srate = 1/(t[1]-t[0])
    return np.sin(2*pi*t),srate,1

def case2():
    # simple sine wave, cutoff above primary frequency
    t = np.linspace(0, 1, 10000)
    srate = 1/(t[1]-t[0])
    return np.sin(2*pi*t),srate,10

def case3():
    # random noise
    t = np.linspace(0, 1, 10001)
    srate = 1/(t[1]-t[0])
    return np.random.rand(t.size)*2-1,srate,10

def case4():
    # sinc function
    t = np.linspace(-1, 1, 10000)
    srate = 1/(t[1]-t[0])
    return np.sinc(2*np.pi*srate*t), srate, 10

def case5():
    n = 200000
    t = np.linspace(0, 1, n)
    y = np.zeros(t.size)
    for i in range(3):
        amp = np.random.rand(1)
        freq = i*103+101
        phase = np.random.rand(1)*2*np.pi
        tdecay = 1e-3
        decay = 1e-1
        for j in range(1,10):
            fj = freq*j
            if(fj >= 0.9*n):
                break
            y += amp*(np.sin(2*np.pi*fj*t+phase))*np.exp(-decay*(j-1)**2)*np.exp(-tdecay*t)
    y -= np.mean(y)
    y /= max(np.amax(abs(y)),1)
    srate = 1/(t[1]-t[0])
    return y,srate, 1e3

Scoring
This is code golf, shortest answer in bytes wins. Standard loop-holes apply. You may use any built-ins desired.
Comment: I just want to note that the question has a lot of unclear language (to me at least) when it comes to what the challenge is about. What is an "FFT"? What's a low-pass filter? What's a frequency bucket? Maybe the question is out of my league, but I don't really see descriptions of those things, and the question should be self-contained. Consider why it has gone 1.5 yrs without an answer until now.
Answer: Python: 99 bytes
from numpy.fft import *
def f(o,s,c):
 a = rfft(o);b=rfftfreq(o.size,1/s);a[b>=c]=0;return irfft(a)

This is a very simple rectangle/brick filter. It takes the real fft of the signal, sets all components equal to or higher than the cutoff frequency to 0, then returns the inverse real fft.
Answer: SmileBASIC, 54 bytes
DEF L D,S,C
DIM A[99]BQPARAM A,1,S,C,1BIQUAD D,D,A
END

Call as:
L sample array , sample rate , cutoff frequency
(untested)

Low pass filter


login to servlet over SSL

Question: I currently have a RESTful servlet running that returns json upon receiving a POST query. I would like to implement authentication over SSL, so that the user will first login and send his credentials so the servlet knows what level of authorization it has to return the data, but I'm not sure how to go about implementing this for servlets. Anyone have any experience?
Answer: theres a lot going on there.  You will need a certificate for your site and you will need to configure your webserver to use https instead of http.  That should get you started.
Your authentication scheme is orthogonal to the requirement to have encrypted communication; i.e. they have nothing to do with each other.  SSL has to do with encryption of the data transfer back and forth, while authentication has to do with making sure a user is who they say they are.  You can authenticate over http if you wanted to....(although if your sight is public as opposed to internal you might not want to do this..)
Comment: Does using self-signed SSL certificate needs change in the servlet code or that same HTTP code will work for HTTPS?

login to servlet over SSL


Is linguistics limited to natural languages?

Question: Or would linguistics also include the study of accessory languages like esperanto, artificial languages like Klingon, or even programming languages?
Comment: The Chomsky hierarchy is taught in CS courses. That's not really linguistics; that **is** computer science.
Comment: FYI I removed the 'scope' tag because in linguistics (and logic) 'scope' has a specialized meaning having to do with the range of elements over which an operator or modifier has control.
Comment: Chomsky is a professor of linguistics. Chomsky grammar is taught in Computer Science courses. On the other hand a lot of what linguistics deals with isn't relevant to Computer Science.
Answer: I think that some research has been done on artificial languages, but Linguistics mostly deals with natural languages and especially with spoken language. Written language is not totally excluded but sounds, sound shifts occur in spoken language, not to mention that this is where language evolves the fastest.
It's true however that there are many aspects that Linguistics analyses such as Pragmatics, where you study how context contributes and also changes sometimes the meaning of an utterance, e.g. think about saying "Today the sun is shining" where today can apply to any day depending on when you say it. Or also "I sentence the accused to 5 years of prison", where the meaning (and action) changes if it's said by a judge or a friend.
Also sociolinguistics (language and society), psycholinguistics (study about the biological and psychological factors that base acquisition, comprehension and use of language), neurolinguistics (interdisciplinary science between Linguistics, psycholinguistics, psychobiology, cognitive neuroscience and developmental psychology), and so on. They are all within Linguistics but you focus on certain aspects.
I've never heard of Linguistics dealing with programming languages (as something to study), and I doubt they're relevant under that point of view.
Answer: Linguistics is just the scientific study of language. This definition does not limit the scope of "language" to just natural languages. "Language" is, loosely, a means of communication of information, i.e., from one entity to another. Many different kinds of entities communicate with each other. Many plants and animals seem to have vocabularies. However, the field of linguistics has not played much of a role in the study of these because of the absence or paucity of syntax in these communications. In the course of training animals, we know that some animals have the capacity to comprehend some syntax. For example, Pepperberg's parrots and great apes have shown they can comprehend simple1 sentences of human languages. This raises the question of whether their native communications have syntax too. If they do, I'm confident that the techniques of linguistics will be applied to study this too, as it will be for the study of robot languages.
Now, coming to the question, there are plenty of academic papers on Esperanto and Klingon. I have not come across the use of linguistic techniques for the study of computer languages, but on an abstract level, these languages are not all that different from each other, and so there is a great deal of overlap in the concepts that are employed to study them2.

1: simple for a human, hellishly complex for a dog.
2: though within sensible limits. I don't think there will be a day when we study the phonology of HTML.
Comment: prash, I took the liberty of fixing your formatting a bit, I hope you don't mind the changes. :)
Comment: "... but on an abstract level, these languages are not all that different from each other" - this may be true for some restricted sense of "abstract". For most other abstract levels, natural languages and (extant) computer languages are still utterly distinct.
Comment: @hippietrail: Do you have a way of quantifying and qualifying the "most"? I would have agreed if you had written "some other abstract levels". If you think it would improve my answer, I can explain what exactly I mean by "on an abstract level".
Comment: Well you would have to show examples of computer languages that can have conversations, give orders, make requests, recount past events, talk about future plans, deal with counterfactuals, etc. Markup languages are purely declarative and programming languages are a combination of declarative and imperative. All the rest might or might not be possible, but I don't believe it currently exists.
Comment: @hippietrail: The abstract math for the things you mentioned have already been addressed. [These two books](http://www.let.rug.nl/bos/comsem/) are very good references. As for the implementation, Prolog (various implementations) maps quite neatly to the concepts there.
Comment: ""Language" is, loosely, a means of communication of information, i.e., from one entity to another." That is true when talking about human beings. This is NOT true when talking about computers. The language is designed to either be compiled or interpreted as lower level machine language. Whereas with natural language I provide a concept, computer languages are to create algorithms. Whether it looks "similar" to natural language is irrelevant—it's the usage that defines it.
Answer: The simple answer to your question is YES - linguistics is NOT limited to 'natural' languages. While professional linguists mostly deal with naturally occurring languages spoken by people for daily communication, the field of linguistics is concerned with all symbolic systems used to express meaning for some sort of a communicative purpose.
So there are linguists who study signs, linguists who study chimps and other communicating animals, linguists who study artificial languages (from Esperanto to Klingon), linguists who study art and literature. If it's symbolic with a communicative purpose, it's fair game for linguistics.
I don't know of any linguists who study computer languages (partly because of their very specialised communicative purpose) but they could certainly be studied linguistically in very fruitful ways.
Answer: The Chomsky Hierarchy, which starts with simple automata and works it's way up the complexity scale to Turing machines, describes regular, context-free languages.  In this sense, "regular" means rule-based and "context-free" means that everything you need to know about the communication is available in the language.  Programming languages behave this way such that their interpreter or compiler is exercising the rule system for the language.  If you break the rules, you also break the language.  The language can only change if you deliberately change the rules.
Natural language is context-sensitive.  This means that, while rule-based, a natural language always has many other channels of signal that ultimately determine what is being communicated.  This includes prosodic information (things like intonation, stress, timing that don't always make it into the writing system), Body language, situational and environmental factors, etc.  We "play" with natural language using metaphors and idioms and such, where what is communicated is not available by looking directly at the tokens and grammar of an utterance. Natural language continually evolves, and rules come and go as they enter into and fall out of usage over time.
Chomsky's big claim is that there is an underlying structure, common across all natural human language, that undergoes a transition to the particular language used by the speaker.  Linguists who study syntax under the Minimalist program learn to work with theory that expresses this underlying grammar, and that work is, in my humble opinion, very similar to the work undertaken by a computer scientist developing the compiler for a new programming language in that many of the same skills are used in both efforts.
"Accessory and artificial languages", if they are going to work and survive, must likewise draw from linguistic features already found in natural languages.  They must have a lexicon, syntax, morphology, a sound system (phonology) and if they work well they will develop semantic and pragmatic features as they get used.  In summary, linguistics is everywhere language is, regardless of it's origin.
Comment: Is this supposed to be a joke?
Answer: I am a bit suprised that my previous contribution ( which I am keeping unchanged below theline) seems to be considered irrelevant. Hence I am trying to
explain it.
It is clear that other answers more or less exclude very formal
linguistic expression such as programming languages.
The fact is there is very little literature claiming to relate them to
linguistic analysis, and even this claim is rather
weak. Furthermore it does not seem to involve recognized linguists.
Another such paper (in addition to the one below) is:

Empirical
  language analysis in software linguistics, Jean-Marie Favre , Dragan
  Gasevic , Ralf Lämmel3 , and Ekaterina Pek, Software Language
  Engineering, Springer Lecture Notes in Computer Science Volume 6563,
  2011, pp 316-326 http:/www.researchgate.net/publication/225162167_Empirical_Language_Analysis_in_Software_Linguisticsfiled912f50746a8289574.pdf

However, the point of my contribution was to suggest that there might
be a continuum between natural language as commonly studied by
linguists and formally defined languages such as considered by
logicians or computer scientists. Specialized sublanguages is my
approach to suggest such a continuum, starting from the constrained
structure of legal documents and evolving through more tightly
constrained technical and scientific languages.
The fact is that mathematicians do study very formal languages
(algebras or logic formulae), but actually seldom use them for their
work which is usually stated more informally, meaning closer to
vernacular. It is also clear that they would prefer their statements
and proofs to be stated and checked more formally. This gap is now
being bridged by new software tools such as proof assistants (see my
first answer
below). This is not much different from the programming language
issue, since a result in logic (the Curry-Howard isomorphism) shows that
proving and programming are essentially the same kind of activity.
Hence, if the gap between informal and formal mathematical expression can be
bridged, the same should become true of programming expression,
allowing in the long run more informal ways for programming computers
(a personal opinion).
This relation between formal and informal expression has for me a
striking ressemblance to the way analysis of natural sentences will
associate them to logical formulae, if only as explained in Lawler's
study guide.
Another point is that an analysis of how programming languages evolve
or are evolved to encompass more advanced semantic concepts might give
some light on what is considered intellectually convenient to think
about problems and to express them. Relating the semantic evolution of
programming and mathematical languages to analysis of semantic
structures in natural language might be interesting from a linguistic
point of view, as they strive for more natural ways of stating whatever they have to express.

Former answer
It seems obvious to me that linguistics cannot be limited to natural
languages spoken by humans, if only for one good reason: analysing
extreme cases is a good way to test theories, and to understand the
nature of a topic. Understanding why the bee communication system (to
avoid the word language) is or is not a language is part of
understanding what language is.
Another interesting aspect is that human communities develop
sublanguages that are specific of groups or activities. My own experience
in Legalese writing, for example, was an interesting one, both
regarding syntax and semantics. My impression is that such sublanguages nearly form a continuum from usual natural languages to such formal creations as programming languages, with scientific languages as intermediaries.
Another topic worth studying is the evolution of scientific languages,
as it is intimately linked with the scientific activity. The evolution
of mathematical concepts and understanding has led to changes in
mathematical notation and expression. And conversely, these changes
lead to new understanding of mathematics as the language becomes more
perspicuous with respect to the semantic domains adressed. This is
also true of other hard sciences.
An interesting aspect of these remarks is that they are more of a
diachronic nature than of a synchronic one ... possibly because the
synchronic wiew is linguistically poorer, or maybe too technical.
I would suspect that there is much to be learned too from the
diachronic analysis of Legalese (and this was probably done).
The case of programming languages is a bit special. They have clearly
a linguistic aspect as they are also intended for human
communications. Programmers learn (often the hard way) that they should
write programs so that they can read (and understand) them a month
later.
The problem with programming languages is that they are supposed to be
also used by machines that can interpret correctly only very
constrained expressions. Actually they could do a lot more, but we do
not trust them (or ourselves) to use more complex means of expressions
with machines. To take a simple example, people are reluctant to use
ambiguous syntax to communicate with machines, even though they ae
very good (much better than humans) at detecting ambiguity and asking
for more precision.
I would expect that the development of formal tools for checking
proofs and programs, such as the Coq system, will ultimately help to
develop programming in a less formal way, with a more natural
linguistic expression, akin to the way scientists are now
communicating. The formal part would be taken care of by the
programming environment. This is only predictive, and not to be too
much relied upon, but I think there may be much to be expected in the
longer term from the combination of very powerful formal system
combined with some AI to provide informal context.
This said, I know of at least one work, actually quite old, that is an
attempt to analyze programming languages from a linguistic point of
view:

The comparison of programming languages: A linguistic approach.
  John B. Goodenough,
  ACM '68 Proceedings of the 1968 23rd ACM national conference,
  Pages 765-785,  ACM New York, NY, USA ©1968
  http://dl.acm.org/citation.cfm?id=810641 (abstract)

As I recall, the Harvard dissertation written by Goodenough (circa
1969) is a very big document, but I was not able to retrieve details
on Harvard site. Internet search shows that this paper is cited by several others, but it is not
clear that it all makes a significant body of linguistic literature on
programming languages.