Jump to content

Wikipedia:Reference desk/Archives/Computing/2018 November 26

From Wikipedia, the free encyclopedia
Computing desk
< November 25 << Oct | November | Dec >> November 27 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


November 26

[edit]

Is it theoretically possible to change electromagnetic waves? Ex: Manipulating radio waves into x-ray, or visible light into microwaves, etc.

[edit]

Is it theoretically possible to change electromagnetic waves? Ex: Manipulating radio waves into x-ray, or visible light into microwaves, etc. 2.188.169.220 (talk) 19:12, 26 November 2018 (UTC)[reply]

Not within a given inertial frame, but travelling towards or away from the source at high speed will change the observed wavelength. Dbfirs 19:17, 26 November 2018 (UTC)[reply]
Flourescence does do that to a limited extent. Our article says that diamond flouresces visible light under x-ray radiation. This question would I think be more appropriate on the Science Desk. Mikenorton (talk) 19:25, 26 November 2018 (UTC)[reply]
  • Yes, frequency doubling is an example of doing this, usually with high-power laser optics.
I would see fluorescence and phosphorescence as rather different. The photons are absorbed (and destroyed) by atoms of massive matter, then new photons are produced. Andy Dingley (talk) 19:30, 26 November 2018 (UTC)[reply]

Cross compiling with GCC

[edit]

I have been trying to learn more about GCC cross compiling. I am missing one piece, and haven't been able to find the answer online.

Lets assume that I want to be able to do my compiling on an ARM Linux machine such as the Raspberry Pi, and I want to be able to write a hello world program in C and compile it for:

  • The Raspberry Pi
  • An ARM System with no OS. Something like this:[1]
  • An X86 Windows machine.

GCC for the Raspberry Pi is already set up out of the box: I just created the source code in the default directory and typed "gcc helloworld.c -o helloworld". The resulting program ran just fine.

I know what tools I need to compile for the other targets and where to get the toolchains -- plenty of online instructions for that -- but what I am missing is this:

  • Where do I install the toolchains for the other targets? What directories should they go in?
  • How do I tell the computer that this time my target is an X86 Windows box instead of the ARM System with no OS I just compiled for?

This is most likely something really easy that for some reason I am not seeing. Next time I might try smoking crack after setting up GCC for a new target. --Guy Macon (talk) 19:35, 26 November 2018 (UTC)[reply]

You can install them anywhere you like (of course ensuring that they don't overwrite existing files with the same name). Then you can adjust your PATH environment variable to select which compiler you want to use. For example, say you install the x86 compiler in a new directory /usr/local/bin/toolchains/x86. Then when you want to use it, set your PATH to search that directory first:
PATH=/usr/local/bin/toolchains/x86:$PATH
CodeTalker (talk) 19:54, 26 November 2018 (UTC)[reply]
Of course! For some reason my brain just completely forgot about PATH. I blame Donald Trump. Thanks! --Guy Macon (talk) 20:21, 26 November 2018 (UTC)[reply]

Light radiating from a star

[edit]

If light radiating from a star expands like a sphere in all directions, how is it that after many light years of expansion when that light finally reaches Earth such a small area of that sphere still seems to contain enough photons to blanket every square millimeter of our planet? 103.254.167.234 (talk) 21:24, 26 November 2018 (UTC)[reply]

A star typically radiates something of the order of ten to the power of 45 photons every second. You only need about ten photons to see the star. Thus the star can be seen from many billions of miles away. Dbfirs 21:57, 26 November 2018 (UTC)[reply]
Here is a discussion of this question: [2], which includes this rough calculation of the photon flux from a star 10 light years away, emiting 1045 photons per second: . CodeTalker (talk) 01:01, 27 November 2018 (UTC)[reply]

An American H Bomb fell into the ocean in 1965 and was never recovered. Is it still dangerous?

[edit]

An American H Bomb fell into the ocean in 1965 and was never recovered. Is it still dangerous? 5.160.124.58 (talk) 22:51, 26 November 2018 (UTC)[reply]

There were a lot of nuclear weapon accidents, including the 1965 Philippine Sea A-4 incident and the 1966 Palomares B-52 crash.
Any time a weapon is lost, it is dangerous for many reasons; the exact nature and condition of a weapon involved in a specific occurrence is not easy to know, because anyone who does know all the actual facts would not typically be inclined to tell people about it. We might speculate wildly about the weapon's position and condition, but it is important to note that some or all public information about the operation of nuclear weaponry is incorrect.
The weapon itself may still be able to detonate and possibly reach criticality; and even if not, there are often many other hazards including conventional explosions and exposure to concentrated radioactive material. The loss of a weapon also damages the reputation and standing of the original owner, which has potential secondary effects that pertain to upsetting the careful balance of terror among the major nuclear-armed nation-states.
It is plausible that a weapon dropped into the deep ocean could become damaged by implosion and water-ingress. Here is an 1989 article from New York Times, filed after the disclosure to Congress about the weapon lost in 1965. They reported the official position of the Department of Defense: a lost or damaged weapon could not engage in a nuclear detonation, and if its resting position is on the sea-bed in very deep ocean, it would be impractically difficult for anyone to retrieve or visit to tamper with it or attempt salvage of any material. They also provide some useful insight into the political ramifications between the United States, Japan, and Vietnam, relating to this event.
So, whether the weapon is "dangerous" ultimately depends on your risk-tolerance. Here's "How risky is nuclear optimism?", written by my former professor Martin Hellman and originally published in the Bulletin of the Atomic Scientists in 2011.
For my measure of acceptable risk, I would not personally want to be within a few a.u. of any nuclear weapons - whether they are lost, damaged, or otherwise in any condition, but part of disciplined risk management is learning to cope with conditions beyond our control.
Nimur (talk) 00:08, 27 November 2018 (UTC)[reply]
  • The only one I can think of that went into an ocean was off the coast of Japan, where a B43 nuclear bomb was lost from a carrier. Four Mk 28s were lost over Palomares in Spain and one went into the sea, but the depth was such that it was just (with great difficulty) possible to retrieve it.
The Mk 43 is a relatively modern design (early 1960s) of free-fall H bomb. There has been relatively little change to their design since (warheads for missiles, OTOH, have been under more pressure to shrink in size). This means that the construction of its physics package is fairly well known in the public domain, although the fusing and Permissive Action Links are still more secretive. The B43 has fairly simple fusing and control though.
So, was it likely to explode when dropped? No. There are several safeties built into all of them after the early days. These each have a function to recognise that various steps of their use have been carried out, before they permit arming: carriage to altitude in an aircraft, suddenly dropping, descending to low altitude etc. As this bomb fell from a slow-moving carrier at sea level, they won't have allowed activation. A famous Broken Arrow accident in 1952 was described a few years ago as having "come close" to detonating, because "four of the six" safety mechanisms had activated. Yet they were meant to! This was a bomb which had been dropped (accidentally) from an aircraft, and the bomb responded correctly to that. It relied on the other safeties to prevent a live accident, and those worked just as intended.
Could it go off today? No. There are two factors which a nuclear weapon relies on, and they both have storage lives which have been far exceeded by now. One is the tritium reservoir of boosting gas, used to increase the rate of neutron production in the early stages of detonation, allowing a far smaller physics package. This has a half life of 12 years, so there's only 116 of it left now, not enough to allow the weapon to operate with a nuclear yield more than a small fizzle. There's also the issue of the battery life. The types of battery used have a long shelf life, but not that long.
Would it be crushed by water pressure? Yes, definitely. Nuclear bombs aren't designed to work deep underwater (well, some are, deliberately) and they just aren't built to survive this. Their insides are effectively a tiny submarine, as they're sealed and filled with an inert gas, to improve storage - but this submarine has a very shallow crush depth, and the ocean would exceed it. Also, as a deliberate safety measure, those not intended for use against submarines recognise that there's a risk of beng lost at sea, and so they're designed to be disarmed by any accidental deep submergence, by crushing.
Is it safe? No. It's a bomb. There's also a significant quantity of explosive in there, and that's an explosive carefully optimised to be stable in storage. Although the ocean floor is high pressure and wet, it's also cold and so chemistry is slow down there. Chances are it's as viable today as it was 50+ years ago.
Is it safe from radiological leakage? Well again, it's a question of how well packaged it was. Uranium is fairly stable, but plutonium is infamous for its corrosion habits, and it's also radioactively active enough to keep itself warm and to be doing itself metallurgical damage. Ask Bellona Foundation, or the late John Large, for their best estimates on radiological leakage from the several nuclear submarine torpedoes which have been lost in the oceans, on both sides. Andy Dingley (talk) 00:33, 27 November 2018 (UTC)[reply]
Are you thinking of 1958 Tybee Island mid-air collision? It went into the ocean and was not recovered. Bubba73 You talkin' to me? 00:46, 27 November 2018 (UTC)[reply]
That one was dropped deliberately (from a damaged aircraft) and went into fairly shallow water, the intention being to just go out and collect it later. Turned out to be harder than they thought, and it's still out there. Not deep, but they don't know where. Andy Dingley (talk) 00:55, 27 November 2018 (UTC)[reply]