title: Cygnus X-1

text: If the progenitor star had exploded as a supernova, then observations of similar objects show that the remnant would most likely have been ejected from the system at a relatively high velocity. As the object remained in orbit, this indicates that the progenitor may have collapsed directly into a black hole without exploding (or at most produced only a relatively modest explosion).


title: Cygnus X-1

text: The compact object is thought to be orbited by a thin, flat disk of accreting matter known as an accretion disk. This disk is intensely heated by friction between ionized gas in faster-moving inner orbits and that in slower outer ones. It is divided into a hot inner region with a relatively high level of ionization—forming a plasma—and a cooler, less ionized outer region that extends to an estimated 500 times the Schwarzschild radius, or about 15,000 km.


title: Cygnus X-1

text: Though highly and erratically variable, Cygnus X-1 is typically the brightest persistent source of hard X-rays—those with energies from about 30 up to several hundred kiloelectronvolts—in the sky. The X-rays are produced as lower-energy photons in the thin inner accretion disk, then given more energy through Compton scattering with very high-temperature electrons in a geometrically thicker, but nearly transparent corona enveloping it, as well as by some further reflection from the surface of the thin disk. An alternative possibility is that the X-rays may be Compton-scattered by the base of a jet instead of a disk corona.


title: Cygnus X-1

text: The X-ray emission from Cygnus X-1 can vary in a somewhat repetitive pattern called quasi-periodic oscillations (QPO). The mass of the compact object appears to determine the distance at which the surrounding plasma begins to emit these QPOs, with the emission radius decreasing as the mass decreases. This technique has been used to estimate the mass of Cygnus X-1, providing a cross-check with other mass derivations.


title: Cygnus X-1

text: Pulsations with a stable period, similar to those resulting from the spin of a neutron star, have never been seen from Cygnus X-1. The pulsations from neutron stars are caused by the neutron star's rotating magnetic field, but the no-hair theorem guarantees that the magnetic field of a black hole is exactly aligned with its rotation axis and thus is static. For example, the X-ray binary V 0332+53 was thought to be a possible black hole until pulsations were found. Cygnus X-1 has also never displayed X-ray bursts similar to those seen from neutron stars. Cygnus X-1 unpredictably changes between two X-ray states, although the X-rays may vary continuously between those states as well. In the most common state, the X-rays are "hard", which means that more of the X-rays have high energy. In the less common state, the X-rays are "soft", with more of the X-rays having lower energy. The soft state also shows greater variability. The hard state is believed to originate in a corona surrounding the inner part of the more opaque accretion disk. The soft state occurs when the disk draws closer to the compact object (possibly as close as ), accompanied by cooling or ejection of the corona. When a new corona is generated, Cygnus X-1 transitions back to the hard state.


title: Cygnus X-1

text: The spectral transition of Cygnus X-1 can be explained using a two-component advective flow solution, as proposed by Chakrabarti and Titarchuk. A hard state is generated by the inverse Comptonisation of seed photons from the Keplarian disk and likewise synchrotron photons produced by the hot electrons in the centrifugal-pressure–supported boundary layer (CENBOL).


title: Cygnus X-1

text: The X-ray flux from Cygnus X-1 varies periodically every 5.6 days, especially during superior conjunction when the orbiting objects are most closely aligned with Earth and the compact source is the more distant. This indicates that the emissions are being partially blocked by circumstellar matter, which may be the stellar wind from the star HDE 226868. There is a roughly 300-day periodicity in the emission, which could be caused by the precession of the accretion disk.


title: Cygnus X-1

text: As accreted matter falls toward the compact object, it loses gravitational potential energy. Part of this released energy is dissipated by jets of particles, aligned perpendicular to the accretion disk, that flow outward with relativistic velocities (that is, the particles are moving at a significant fraction of the speed of light). This pair of jets provide a means for an accretion disk to shed excess energy and angular momentum. They may be created by magnetic fields within the gas that surrounds the compact object.


title: Cygnus X-1

text: The Cygnus X-1 jets are inefficient radiators and so release only a small proportion of their energy in the electromagnetic spectrum. That is, they appear "dark". The estimated angle of the jets to the line of sight is 30°, and they may be precessing. One of the jets is colliding with a relatively dense part of the interstellar medium (ISM), forming an energized ring that can be detected by its radio emission. This collision appears to be forming a nebula that has been observed in the optical wavelengths. To produce this nebula, the jet must have an estimated average power of 4–, or . This is more than 1,000 times the power emitted by the Sun. There is no corresponding ring in the opposite direction because that jet is facing a lower-density region of the ISM.


title: Cygnus X-1

text: In 2006, Cygnus X-1 became the first stellar-mass black hole found to display evidence of gamma-ray emission in the very high-energy band, above . The signal was observed at the same time as a flare of hard X-rays, suggesting a link between the events. The X-ray flare may have been produced at the base of the jet, while the gamma rays could have been generated where the jet interacts with the stellar wind of HDE 226868.


title: Cygnus X-1

text: HDE 226868 is a supergiant star with a spectral class of O9.7 Iab, which is on the borderline between class-O and class-B stars. It has an estimated surface temperature of 31,000 K and mass approximately 20–40 times the mass of the Sun. Based on a stellar evolutionary model, at the estimated distance of 2,000 parsecs, this star may have a radius equal to about 15–17 times the solar radius and has approximately 300,000–400,000 times the luminosity of the Sun. For comparison, the compact object is estimated to be orbiting HDE 226868 at a distance of about 40 solar radii, or twice the radius of this star.


title: Cygnus X-1

text: The surface of HDE 226868 is being tidally distorted by the gravity of the massive companion, forming a tear-drop shape that is further distorted by rotation. This causes the optical brightness of the star to vary by 0.06 magnitudes during each 5.6-day binary orbit, with the minimum magnitude occurring when the system is aligned with the line of sight. The "ellipsoidal" pattern of light variation results from the limb darkening and gravity darkening of the star's surface.


title: Cygnus X-1

text: When the spectrum of HDE 226868 is compared to the similar star Epsilon Orionis, the former shows an overabundance of helium and an underabundance of carbon in its atmosphere. The ultraviolet and hydrogen-alpha spectral lines of HDE 226868 show profiles similar to the star P Cygni, which indicates that the star is surrounded by a gaseous envelope that is being accelerated away from the star at speeds of about 1,500 km/s.


title: Cygnus X-1

text: Like other stars of its spectral type, HDE 226868 is thought to be shedding mass in a stellar wind at an estimated rate of solar masses per year. This is the equivalent of losing a mass equal to the Sun's every 400,000 years. The gravitational influence of the compact object appears to be reshaping this stellar wind, producing a focused wind geometry rather than a spherically symmetrical wind. X-rays from the region surrounding the compact object heat and ionize this stellar wind. As the object moves through different regions of the stellar wind during its 5.6-day orbit, the UV lines, the radio emission, and the X-rays themselves all vary.


title: Cygnus X-1

text: The Roche lobe of HDE 226868 defines the region of space around the star where orbiting material remains gravitationally bound. Material that passes beyond this lobe may fall toward the orbiting companion. This Roche lobe is believed to be close to the surface of HDE 226868 but not overflowing, so the material at the stellar surface is not being stripped away by its companion. However, a significant proportion of the stellar wind emitted by the star is being drawn onto the compact object's accretion disk after passing beyond this lobe.


title: Cygnus X-1

text: The gas and dust between the Sun and HDE 226868 results in a reduction in the apparent magnitude of the star, as well as a reddening of the hue—red light can more effectively penetrate the dust in the interstellar medium. The estimated value of the interstellar extinction ("A") is 3.3 magnitudes. Without the intervening matter, HDE 226868 would be a fifth-magnitude star, and thus visible to the unaided eye.


title: Cygnus X-1

text: Cygnus X-1 was the subject of a bet between physicists Stephen Hawking and Kip Thorne, in which Hawking bet against the existence of black holes in the region. Hawking later described this as an "insurance policy" of sorts. In his book "A Brief History of Time" he wrote:


title: Cygnus X-1

text: According to the updated tenth-anniversary edition of "A Brief History of Time", Hawking has conceded the bet due to subsequent observational data in favor of black holes. In his own book "Black Holes and Time Warps", Thorne reports that Hawking conceded the bet by breaking into Thorne's office while he was in Russia, finding the framed bet, and signing it. While Hawking referred to the bet as taking place in 1975, the written bet itself (in Thorne's handwriting, with his and Hawking's signatures) bears additional witness signatures under a legend stating "Witnessed this tenth day of December 1974". This date was confirmed by Kip Thorne on the January 10, 2018 episode of "Nova" on PBS.


title: Cygnus X-1

text: Cygnus X-1 is the subject of a two-part song series by Canadian progressive rock band Rush. The first part, "Book I: The Voyage", is the last song on the 1977 album "A Farewell to Kings". The second part, "Book II: Hemispheres", is the first song on the following 1978 album, "Hemispheres". The lyrics describe an explorer aboard the spaceship "Rocinante", who travels to the black hole, believing that there may be something beyond it. As he moves closer, it becomes increasingly difficult to control the ship, and he is eventually drawn in by the pull of gravity.


title: Cygnus X-1

text: In the Disney Sci-Fi film The Black Hole, the scientific survey ship captained by Dr. Hans Reinhardt to study the black hole of the film's title is the "Cygnus", presumably (although never stated as such) named for the first-identified black hole, Cygnus X-1.


title: Dining philosophers problem

text: In computer science, the dining philosophers problem is an example problem often used in concurrent algorithm design to illustrate synchronization issues and techniques for resolving them.


title: Dining philosophers problem

text: It was originally formulated in 1965 by Edsger Dijkstra as a student exam exercise, presented in terms of computers competing for access to tape drive peripherals.


title: Dining philosophers problem

text: Five philosophers dine together at the same table. Each philosopher has their own place at the table. There is a fork between each plate. The dish served is a kind of spaghetti which has to be eaten with two forks. Each philosopher can only alternately think and eat. Moreover, a philosopher can only eat their spaghetti when they have both a left and right fork. Thus two forks will only be available when their two nearest neighbors are thinking, not eating. After an individual philosopher finishes eating, they will put down both forks.


title: Dining philosophers problem

text: The problem is how to design a regimen (a concurrent algorithm) such that no philosopher will starve; "i.e.", each can forever continue to alternate between eating and thinking, assuming that no philosopher can know when others may want to eat or think (an issue of incomplete information).


title: Dining philosophers problem

text: The problem was designed to illustrate the challenges of avoiding deadlock, a system state in which no progress is possible. To see that a proper solution to this problem is not obvious, consider a proposal in which each philosopher is instructed to behave as follows:


title: Dining philosophers problem

text: However, they each will think for an undetermined amount of time and may end up holding a left fork thinking, staring at the right side of the plate, unable to eat because there is no right fork, until they starve.


title: Dining philosophers problem

text: Dijkstra's solution uses one mutex, one semaphore per philosopher and one state variable per philosopher. This solution is more complex than the resource hierarchy solution. This is a C++20 version of Dijkstra's solution with Tanenbaum's changes:


title: Dining philosophers problem

text: The function test() and its use in take_forks() and put_forks() make the Dijkstra solution deadlock-free.


title: Dining philosophers problem

text: This solution assigns a partial order to the resources (the forks, in this case), and establishes the convention that all resources will be requested in order, and that no two resources unrelated by order will ever be used by a single unit of work at the same time. Here, the resources (forks) will be numbered 1 through 5 and each unit of work (philosopher) will always pick up the lower-numbered fork first, and then the higher-numbered fork, from among the two forks they plan to use. The order in which each philosopher puts down the forks does not matter. In this case, if four of the five philosophers simultaneously pick up their lower-numbered fork, only the highest-numbered fork will remain on the table, so the fifth philosopher will not be able to pick up any fork. Moreover, only one philosopher will have access to that highest-numbered fork, so he will be able to eat using two forks. This can intuitively be thought of as having one "left-handed" philosopher at the table, who -- unlike all the other philosophers -- takes his fork from the left first.


title: Dining philosophers problem

text: While the resource hierarchy solution avoids deadlocks, it is not always practical, especially when the list of required resources is not completely known in advance. For example, if a unit of work holds resources 3 and 5 and then determines it needs resource 2, it must release 5, then 3 before acquiring 2, and then it must re-acquire 3 and 5 in that order. Computer programs that access large numbers of database records would not run efficiently if they were required to release all higher-numbered records before accessing a new record, making the method impractical for that purpose.


title: Dining philosophers problem

text: The resource hierarchy solution is not "fair". If philosopher 1 is slow to take a fork, and if philosopher 2 is quick to think and pick its forks back up, then philosopher 1 will never get to pick up both forks. A fair solution must guarantee that each philosopher will eventually eat, no matter how slowly that philosopher moves relative to the others.


title: Dining philosophers problem

text: The following source code is a C++11 implementation of the resource hierarchy solution for three philosophers. The sleep_for() function simulates the time normally spend with business logic.


title: Dining philosophers problem

text: Another approach is to guarantee that a philosopher can only pick up both forks or none by introducing an arbitrator, e.g., a waiter. In order to pick up the forks, a philosopher must ask permission of the waiter. The waiter gives permission to only one philosopher at a time until the philosopher has picked up both of their forks. Putting down a fork is always allowed. The waiter can be implemented as a mutex.


title: Dining philosophers problem

text: In addition to introducing a new central entity (the waiter), this approach can result in reduced parallelism: if a philosopher is eating and one of his neighbors is requesting the forks, all other philosophers must wait until this request has been fulfilled even if forks for them are still available.


title: Dining philosophers problem

text: A solution presented by William Stallings is to allow a maximum of "n-1" philosophers to sit down at any time. The last philosopher would have to wait (for example, using a semaphore) for someone to finish dining before they "sit down" and request access to any fork. This guarantees at least one philosopher may always acquire both forks, allowing the system to make progress.


title: Dining philosophers problem

text: In 1984, K. Mani Chandy and J. Misra proposed a different solution to the dining philosophers problem to allow for arbitrary agents (numbered "P", ..., "P") to contend for an arbitrary number of resources, unlike Dijkstra's solution. It is also completely distributed and requires no central authority after initialization. However, it violates the requirement that "the philosophers do not speak to each other" (due to the request messages).


title: Dining philosophers problem

text: This solution also allows for a large degree of concurrency, and will solve an arbitrarily large problem.


title: Dining philosophers problem

text: It also solves the starvation problem. The clean/dirty labels act as a way of giving preference to the most "starved" processes, and a disadvantage to processes that have just "eaten". One could compare their solution to one where philosophers are not allowed to eat twice in a row without letting others use the forks in between. Chandy and Misra's solution is more flexible than that, but has an element tending in that direction.


title: Dining philosophers problem

text: In their analysis, they derive a system of preference levels from the distribution of the forks and their clean/dirty states. They show that this system may describe a directed acyclic graph, and if so, the operations in their protocol cannot turn that graph into a cyclic one. This guarantees that deadlock cannot occur. However, if the system is initialized to a perfectly symmetric state, like all philosophers holding their left side forks, then the graph is cyclic at the outset, and their solution cannot prevent a deadlock. Initializing the system so that philosophers with lower IDs have dirty forks ensures the graph is initially acyclic.


title: Defenders of the Faith

text: Defenders of the Faith is the ninth studio album by English heavy metal band Judas Priest, released on 13 January 1984 by Columbia Records. The album was certified platinum by the RIAA, and spawned the singles "Freewheel Burning", "Some Heads Are Gonna Roll", and "Love Bites".


title: Defenders of the Faith

text: "Defenders of the Faith" was recorded at Ibiza Sound Studios, Ibiza, Spain, and mixed from September to November 1983 at DB Recording Studios and Bayshore Recording Studios in Coconut Grove, Miami, Florida. The LP and cassette tape were released on 4 January 1984, and the album appeared on CD in July. A remastered CD was released in May 2001. Simultaneously with the album's release, the band kicked off their tour in Europe, with the bulk of concerts taking place in North America during the spring and summer.


title: Defenders of the Faith

text: Stylistically, "Defenders of the Faith" did not greatly depart from its predecessor and featured a similar formula of short, up-tempo metal anthems with stadium shout-along choruses, although progressive elements returned on some tracks such as "The Sentinel". The track "Rock Hard Ride Free" is actually a re-working of a track entitled "Fight for Your Life", recorded during the 1982 "Screaming For Vengeance" sessions but not included on that album.


title: Defenders of the Faith

text: The album was an immediate success, only going one spot below "Screaming for Vengeance" on the US Billboard 100 Albums Chart. Some critics nonetheless objected to the lack of a standout single comparable to "Breaking the Law" or "You've Got Another Thing Comin', and the album's general similarity to "Screaming for Vengeance".


title: Defenders of the Faith

text: The 30th-anniversary release of the album (released in March 2015) came with a double CD of a live show recorded on 5 May 1984 at the Long Beach Arena in Long Beach, California on their Defenders of the Faith Tour and was originally recorded for a radio broadcast.


title: Defenders of the Faith

text: The cover art by Doug Johnson (who also designed the Hellion in "Screaming for Vengeance") depicts the Metallian, a horned, tiger-like land assault creature with Gatling guns and tank tracks conceptualized by the band. The back cover contains a message:


title: Defenders of the Faith

text: "Eat Me Alive" was listed at number 3 on the Parents Music Resource Center's "Filthy Fifteen", a list of 15 songs the organization found most objectionable. PMRC co-founder Tipper Gore stated the song was about oral sex at gunpoint. In response to the allegations, Priest recorded the song "Parental Guidance" on the follow-up album "Turbo".


title: Defenders of the Faith

text: In December 1983, the band released the "Freewheel Burning" single and performed the song in a short UK/Germany tour in the same month. In January 1984, the band embarked on the Metal Conqueror Tour across Europe, North America and Japan. On this tour, the band played every song from the album live, with the exception of "Eat Me Alive". During the band's 2008 tour in support of "Nostradamus", they played many songs which had never been played live before, one of them being "Eat Me Alive". To date, this made "Defenders of the Faith" the second Judas Priest album from which every song had been played live (the first being "Rocka Rolla"), followed by "British Steel" during the 2009, British Steel 30th anniversary tour.


title: 1976 Tangshan earthquake

text: The 1976 Tangshan earthquake () was a 7.6 earthquake that hit the region around Tangshan, Hebei, China, at 3:42 a.m. on 28 July 1976. The maximum intensity of the earthquake was XI ("Extreme") on the Mercalli scale. In minutes, 85 percent of the buildings in Tangshan collapsed or were rendered unusable, all services failed, and most of the highway and railway bridges collapsed or were seriously damaged. The official report claimed 242,769 deaths and 164,851 serious injuries in Tangshan, but when taken into account the missing, the injured who later died and the deaths in nearby Beijing and Tianjin, scholars accepted at least 300,000 died, making it the deadliest earthquake in China and among the top disasters in China by death toll.


title: 1976 Tangshan earthquake

text: The Tangshan earthquake was composed of two main shocks. The first struck at 3:42:56 in the morning (local time), approximately 12 km under the southern part of Tangshan. The was initially estimated at 8.1, subsequently recalculated to be 7.6 on the standard scale. However, that scale measures only the "total" energy released by an earthquake, and earthquakes vary in how much of that energy is converted to seismic shaking. The Tangshan quake, being relatively shallow, converted much of its energy to surface shaking, and on the (surface magnitude) scale it also measured 7.6. (7.8 on the Chinese surface magnitude scale.) This "occurred on a near vertical right-lateral strike-slip fault, striking N40°E", the block on the southeast side sliding about three meters to the southwest. This resulted from tectonic compression on a nearly west–east axis. Surface rupturing occurred in five "en echelon" segments extending eight kilometers through the center of Tangshan.


title: 1976 Tangshan earthquake

text: The second main shock, with a magnitude 7.0 , or 7.4 , struck that afternoon at 18:45 near Luanhsien (Luanxian), about 70 km to the east-northeast ("B" on the intensity map in the next section), just south of the northeastern end of the Tangshan fault. This occurred in a zone of north-northwest striking conjugate faults that cut across the north end of the Tangshan fault. The left-lateral motion here, along with the right-lateral motion on the Tangshan fault, suggests that as the crustal blocks to the west and east are compressed together the block between these two earthquakes is being squeezed out to the south.


title: 1976 Tangshan earthquake

text: A long sequence of aftershocks followed, with twelve of magnitude 6 or greater. The first of these struck just three and a half hours after the initial shock, at 7:17, at the southern end of Tangshan fault, near Ninghe ("C" on the map in the section below), with a magnitude of 6.2 . Another significant aftershock () occurred in November near Ninghe. Most aftershocks occurred between these end points, in a zone 140 km long and about 50 km wide. Many buildings were further damaged by the aftershocks.


title: 1976 Tangshan earthquake

text: The aftershock zone remains seismically active in the twenty-first century. Earthquakes measuring 4.5 to 4.7 occurred in 2012, 2016 and 2019. On 12 July 2020, a 5.1 strike-slip earthquake struck the northern part of the Tangshan Fault. It produced its own sequence of aftershocks that ended on 17 July 2020. The earthquake only caused minor damage to buildings in Tangshan. Its occurrence stirred a debate among scientists into whether the recent earthquakes are aftershocks of the 1976 event or are background seismicity.


title: 1976 Tangshan earthquake

text: The damage done by an earthquake depends primarily on two factors. First, the "intensity of shaking", which depends mainly on the magnitude of the earthquake rupture, the distance from the epicenter, and the nature of the local soil and topography, with soft soils (e.g., sediments and fill) more likely to amplify the intensity and duration of the shaking. Second, the "design and construction of the structures" being shaken, with houses built of adobe or stone, wooden houses without a well-built frame, and unreinforced masonry construction being especially vulnerable. The seismic risk had been greatly underestimated and almost all buildings and structures were designed and built without seismic considerations. As a result, Tangshan was "mainly a city of unreinforced brick buildings", sitting right on top of a major fault line.


title: 1976 Tangshan earthquake

text: The power (magnitude) of the Tangshan earthquake is indicated by the extent of where it was felt: up to away, across most of northeastern China, and even in Mongolia and Korea. In and around Beijing, from the epicenter, the shaking reached an intensity of VI on the Chinese intensity scale (similar to the Modified Mercalli Intensity Scale), with nearly 10% of all buildings damaged, and at least 50 fatalities.


title: 1976 Tangshan earthquake

text: The rupture occurred under the southern part of the city, and propagated northeastward on a fault that runs through the middle of the city. The maximum intensity was "XI" (eleven) on the 12-degree Chinese scale. Nearly every building and structure in the city collapsed, wholly or partially, infrastructure was severely damaged, and essential services such as electric power, water supply, and communications were entirely knocked out.


title: 1976 Tangshan earthquake

text: This area of maximum damage – the meizoseismal area – was approximately long and from 3.5 to 5.5 km wide, centered roughly along the railway.


title: 1976 Tangshan earthquake

text: The area of intensity X shaking – where only new, one-story brick buildings were merely "damaged or slightly damaged", the rest being severely damaged or worse – was 36 km long and 15 km across. In this "high intensity" zone (intensity X and XI, within the red contour on the map) 20 highway bridges and five railway bridges cross the Douhe River in Tangshan; only six survived with only minor damage.


title: 1976 Tangshan earthquake

text: Shaking of intensity IX (or greater) occurred in a zone roughly long and (about 1800 km, inner orange contour on the map), and also around the aftershocks at Luanxian and Ninghe. In this zone most buildings classified as Class III (well-built buildings of wood, masonry, or reinforced concrete) survived, but many Class II buildings (typically old wood-frame buildings lacking a well-built frame, and quite common outside of the cities) were destroyed, while a majority of Class I buildings (built of adobe or stone) were destroyed.


title: 1976 Tangshan earthquake

text: Further out (to the outer orange contour), and around the city of Tianjin and a few isolated patches, intensity VIII shaking mostly affected Class I buildings (more than half destroyed), bridges, and tall brick chimneys. Railway track was also subject to bending or displacement, depending on soil conditions.


title: 1976 Tangshan earthquake

text: The zone of intensity VII shaking – inside the dark brown contour – marks the extent of moderate damage, where many Class I structures (of weak design or construction) were damaged but only "few"—between 10% and 30%—were destroyed, and only a "few" Class two buildings damaged. This ellipsoid zone extended about 75 km north and south of Tangshan and 120 km east and west, from about 25 km short of Beijing to short of Qinhuangdao City (which had anomalously higher shaking), and from the Sea of Bohai in the south and southwest to just north of Zunhua. The north–south shortening of this zone is attributed to buttressing by the bedrock of the Yanshin mountains.


title: 1976 Tangshan earthquake

text: Significant damage occurred beyond this in the VI zone, but (like in Beijing) affected less than 10% of the buildings, or occurred in small localized areas.


title: 1976 Tangshan earthquake

text: Mining coal is Tangshan's principal industry, and when the quake struck around 10,000 miners were underground. For the most part the mine roadways (tunnels) were not seriously damaged, but with the loss of electrical power there was no illumination (aside from headlamps), no ventilation, and no working lifts. It is reported that most miners escaped within hours, but that some did not reach the surface until two weeks later.


title: 1976 Tangshan earthquake

text: Most of the damage to the vertical shafts occurred within the first 50 meters, where they pass through the water-bearing alluvium. In many cases the concrete liner built to keep out the water cracked (particularly where not built properly), allowing a much greater inflow of water. Coupled with damage to the underground drainage system and lack of power to drive the pumps, many of the various mines flooded.


title: 1976 Tangshan earthquake

text: Some electrical power to the mines was restored in three days, and some coal production resumed within ten days. However, de-watering, overhauling of flooded electrical equipment, and rebuilding of surface buildings and structures continued for a year and a half; the pre-earthquake level of production was not reached until the end of 1977.


title: 1976 Tangshan earthquake

text: The Beijing–Shanhaiguan Railway (built in 1887) is a double-track Class I trunk line that runs from Beijing southeast to Tianjin and Tanggu, then turns northeast to cross the Yongdingxin River and its estuary to run to Ninghe and then Tangshan. From Tangshan it continues northeast and then east to Chengli, and then to Qinhuangdao and Shanhaiguan. This is the principal connection of Beijing, Tianjin, and Tangshan to the seaports, and to Northeast China. The Tongxian to Tuozitou (within modern-day Luan County) Railway (built in 1976) is a single-track Class I trunk line that runs east from the eastern outskirts of Beijing to where it meets the Beijing to Shanhaiguan line northeast of Tangshan (near the epicenter of the M 7.1 quake). All of this was built "with no consideration for earthquake resistant design", although some "earthquake resistance measures" for large and medium bridges were applied following the 1975 Haicheng earthquake.


title: 1976 Tangshan earthquake

text: These vital arteries (and other railways and branch lines) were seriously damaged by the earthquakes, mainly in the areas of intensity IX or greater shaking. (This includes a large area around Tangshan quake, and areas around Ninghe and Luanhsien following the M 6.9 and M 7.4 aftershocks.) At the time of the main quake there were 28 freight trains and seven passenger trains traveling on the Beijing–Shanhaiguan line in the affected area; seven freight trains and two passenger trains derailed due to derangement of the rails, mostly south of Tangshan where the line was built on loose alluvium, diluvium, and occasional stretches of loose sand. In many of these cases – and also similar cases northeast of Tangshan, and on the Tongxian–Tuozitou line east of Fengrun – the railway embankment slumped due to weak soils. In other cases the embankment held, but transverse compression of the rails caused them to buckle.


title: 1976 Tangshan earthquake

text: Railway operations were further impaired by the loss of communications (including signalling) and water supply (for the steam locomotives), in both cases due mainly to collapse of buildings and loss of electrical power. However, the most serious damage, taking the most manpower and longest time to repair, was that involving bridges. Most difficult was where soft or liquefied soil allowed the bank to slide into the river, shifting the abutments. A more frequent problem was where an approach embankment subsided, typically leaving the rails suspended from the abutment. There were numerous cases where concrete piers and abutments were damaged due to inadequate design and construction; bridges that were strengthened following the Haicheng earthquake survived with only slight damage.


title: 1976 Tangshan earthquake

text: It was observed that at intensity VII and above damage to the roadbed was correlated mainly with loose soil and a high water table. Conversely, bridges and rails in Tangshan City, built on dense soil with a deep water table, were largely undamaged even though subject to intensity XI shaking.


title: 1976 Tangshan earthquake

text: Over forty-two thousand people were mobilized to quickly effect emergency repair of the railways. The Tongxian-Tuozitou line was opened for traffic on 3 August, single track of the Beijing-Shanhaiguan line opened on 7 August, and both tracks on 10 August, albeit at restricted speeds over temporary bridges and at other places where repairs were not yet complete.


title: 1976 Tangshan earthquake

text: The official report claimed 242,769 deaths and 164,851 serious injuries in Tangshan, but when take into account the "missing", the injured who later died and the deaths in nearby Beijing and Tianjin, scholars accepted at least 300,000 died, making it the deadliest earthquake in China and among the top disasters in China by death toll. Unofficial estimates of the death toll varied widely, and generally lack a clear authoritative basis.


title: 1976 Tangshan earthquake

text: One of the earliest reports outside of China came on 28 July 1976 from the "International Tsunami Information Center", reporting that a "violent" earthquake, initially estimated at magnitude 8.1, had struck "in the vicinity of Peking" (Beijing). Center Director Dr. George Pararas-Carayannis was reported as saying that "if the quake hit in a populated area reports of considerable damage could be expected."


title: 1976 Tangshan earthquake

text: News reports the next day located the quake "about southeast of Peking and northeast of Tientsen" (Tianjin); i.e., "almost precisely in Tangshan". The Chinese Communist party's Central Committee also broadcast a statement that the quake "caused great losses to people's life and property". One of the first reports from Tangshan said "nearly every building in the city ... was flattened." There were several reports of 50 people killed in Beijing, a from the epicenter.


title: 1976 Tangshan earthquake

text: According to author Stephen Spignesi, a "couple of days" after the quake Dr. Pararas-Carayannis gave United Press International (UPI) an estimate of to deaths, based on a similar sized earthquake in Shaanxi province in 1556 that caused 830,000 deaths. Pararas-Carayannis' current web page says only that "it was fairly accurately estimated that there were at least people dead," without mentioning by whom or on what basis this estimate was made.


title: 1976 Tangshan earthquake

text: In August the Nationalist Chinese government in Taiwan announced that, according to their agents in China, the death toll was over , with about 900,000 injured. They also reported that "almost all buildings in Tangshan were leveled", and 80 percent of homes and buildings in Tianjin "suffered damage to some extent".


title: 1976 Tangshan earthquake

text: The following January (1977) the Nationalists released a document they said had been presented at an emergency conference on relief work the previous August by the Hopeh Provincial Committee of the party and the Hopeh Revolutionary Committee. According to this document: "in such seriously stricken areas as Tangshan municipality, and Fengnan and Feng-yun, there were persons dead. Some 79,000 persons were seriously injured, and some 700,000 persons suffered various degrees of injuries." Though these figures have been widely cited, it does not appear there has ever been inquiry into how they were derived, of whether they were an initial estimate (made in the first few days following the quake), or had a more solid basis.


title: 1976 Tangshan earthquake

text: In following June it was reported that the Chinese authorities had briefed seismologist Cinna Lomnitz about Tangshan. It was noted that though no figures were provided, they did not deny any published estimates.


title: 1976 Tangshan earthquake

text: A 1988 book by several members of the Chinese State Seismological Bureau states that people died in the quake, which reflects the official figure reported by the state-run Xinhua News Agency. A webpage of the Chinese Earthquake Administration dated 2009 also attributes " deaths and 164,851 serious injuries" to the Tangshan quake based on an early 1982 study.


title: 1976 Tangshan earthquake

text: There are various reports that the "official death toll was later given by the Chinese government as ", without specifying a source.


title: 1976 Tangshan earthquake

text: As of 2017, the Tangshan Earthquake Memorial Wall contained the names of 246,465 victims, who were registered by relatives.


title: 1976 Tangshan earthquake

text: The remarkably low death toll of the Haicheng earthquake the previous year – initially said to be fewer than 300, much later estimated at a still very modest 2,041


title: 1976 Tangshan earthquake

text: – had been credited to measures taken in response to an accurate and timely prediction. This was touted as demonstrating the validity of the Chinese methods of earthquake prediction (including inspiration from "Mao Zedong Thought") and "the superiority of our country's socialist system!"


title: 1976 Tangshan earthquake

text: With China in the midst of the Cultural Revolution, "belief in earthquake prediction was made an element of ideological orthodoxy that distinguished the true party liners from right wing deviationists", and it was everyone's duty to criticize those who doubted the feasibility of earthquake prediction.


title: 1976 Tangshan earthquake

text: As a backdrop to this, and of deep concern to the Chinese Communist Party, was a collectively recognized but unvoiced awareness that in traditional Chinese belief, natural disasters are considered disruptions in the natural order of "heaven" (Tian) and may signify the loss of legitimacy (the "mandate of heaven") of the current government. This view was underlined by a magnitude 6.7 earthquake in southwestern China just three weeks later. On the other hand, an ongoing mass education campaign before the quake showed that the government was aware and concerned, and the prompt and massive response following the quake demonstrated the government's competence to alleviate suffering and restore normal production, drawing on resources from across the nation. This was contrasted with the hardships faced by disaster victims (especially the poor) under previous regimes, where assistance was lacking.


title: 1976 Tangshan earthquake

text: Mao Zedong was already ailing at the time of the earthquake. In the event, he died only six weeks later on September 9, 1976, ushering the downfall of the Gang of Four and bringing the Cultural Revolution to an end.


title: 1976 Tangshan earthquake

text: Tangshan lies at the northern edge of the Beijing-Tianjin-Tangshan Plain, an alluvial plain that stretches from Beijing to the Sea of Bohai. This plain – the northeastern corner of the great North China Plain – is where sediments eroded from the Yanshan mountains to the north have filled in the ancient Sea of Bohai, with Tangshan near where the shore was about 4,000 years ago. To the south these sediments have formed a layer of weak soils as much as three kilometers thick. At Tangshan and northward these sediments are thinner where the underlying strata crops out to form isolated hills. This underlying strata is a thick (typically 10 km) layer of mainly sedimentary strata such as limestone and sandstone, with large deposits of coal. Tangshan is located particularly over a northeast oriented syncline, a fold in the sedimentary strata that has brought massive deposits of coal close enough to the surface to be mined. In this area the overlying alluvium varies in thickness from several meters to around .


title: 1976 Tangshan earthquake

text: Underlying all this is the ancient bedrock of different kinds of metamorphic rock (such as schist, gneiss, quartzite, granulite, etc.) that form the Eastern Block of the North China Craton. This craton (see figure) was formed approximately two billion years ago by the collision of two major crustal blocks that left a belt of uplifted mountains – the Central (China) Orogenic Belt (COB) – that crosses China approximately southwest to northeast, passing just west and north of Beijing. Just north of Zunhua another orogenic belt, the east–west trending Yanshan mountain fault-fold belt (also known as the Yanshan seismic belt) marks the northern edge of the North China Craton (and of the alluvial plain). It is also the location of over half of the destructive earthquakes in Hebei province, as under the plain several fault zones (oriented parallel to the Central Orogenic Belt) terminate against the Yanshan mountains.


title: 1976 Tangshan earthquake

text: Many of these faults are ancient, but have been reactivated by the force transmitted from the collision of the Indian Plate against the Eurasian Plate, making the Eastern Block unusually active seismically, accounting for six of the ten deadliest earthquakes in recorded history.


title: 1976 Tangshan earthquake

text: The Tangshan fault that ruptured 28 July runs right under the center of Tangshan City. One of three faults in the Changdong fault zone, it runs approximately east-northeast (ENE) about 36 km to where it terminates against the north–south trending fault where, just to the south, the secondary M 7.1 quake occurred ("B" on the 'shaking' map). The southern end of the Tangshan fault (it bends slightly at Tangshan) is near Ninghe, which was also the site of a M 6.2 earthquake several hours after the main shock, and an M 6.9 quake ("C") the following November. The Tangshan fault is considered shallow, but corresponds with a deeper and younger fault with somewhat differing characteristics.


title: 1976 Tangshan earthquake

text: Whether the Tangshan earthquake was predicted has had considerable political as well as seismological significance.


title: 1976 Tangshan earthquake

text: The 1975 Haicheng earthquake (about 400 km [250 miles] northeast of Tangshan) is regarded by seismologists as the only successful prediction of a major earthquake, although no mechanism has been proposed to explain this prediction, and no successful predictions have been achieved since. The surprisingly light death toll – initial reports were of "very few people killed", but later determined to be a modest 2,041—for this magnitude 7.5 quake, attributed to the precautionary measures taken following a definite short-term prediction, was proclaimed as a demonstration of the superiority of China's socialist system, and incidentally a validation of the Chinese methodologies. However, it was later determined that the most important factor in anticipating the Haicheng earthquake was the extended series of significant foreshocks ("powerful messages from nature"), and the low casualty rate was due largely to the time of day, hitting in the early evening when most people were neither at work nor asleep.


title: 1976 Tangshan earthquake

text: Tangshan was not so fortunate. Seventeen months later the 242,419 fatalities of the similarly sized Tangshan earthquake was therefore a considerable shock politically as well as seismically. While some of this greater mortality might be attributed to the exposure of a larger population, or the time of day (Haicheng was struck in the early evening, Tangshan while most people were asleep), the principal factor appeared to be the failure to take any precautionary measures: Tangshan was entirely unprepared.


title: 1976 Tangshan earthquake

text: At the time, the Chinese methods of earthquake prediction mainly consisted of watching for various precursors, including foreshocks, and were celebrated for their success at Haicheng and elsewhere. Many seismologists consider the Tangshan earthquakes to have "not" been predicted, even "famously unpredicted", and that it was not predictable due to a lack of precursory anomalous phenomena. Furthermore, an investigation 30 years later found that there was no official short-term prediction of an imminent earthquake at Haicheng, and that, though there were many unofficial predictions of an imminent quake, none of those had a scientific basis. The warnings that were made and precautions taken happened largely at the local level, based on general middle-term predictions, enhanced public awareness due to an educational campaign, and a series of foreshocks. It is significant that at Tangshan there were no perceptible foreshocks.


title: 1976 Tangshan earthquake

text: On the other hand, it is reported that several people at the State Seismological Bureau (SSB) wanted to warn of an impending earthquake somewhere in the region between Beijing and the Bohai Sea, and that this was discussed at several meetings. One of these was a week-long national conference on earthquake predictions and preparation that convened in Tangshan on 14 July (two weeks before the earthquake) where Wang Chengmin is said to have warned there could be a magnitude 5+ earthquake in the Tangshan—Luanxian area between 22 July and 5 August. However, in addition to the distractions of the Cultural Revolution, there was a possible disagreement within the SSB on whether the next large earthquake would be in eastern China (e.g. the Beijing area) or western China, and that in May it had been concluded that no major earthquakes would occur in the Beijing–Tangshan area. As it turned out, western China was hit by the magnitude 7.2 Songpan-Pingwu earthquake only three weeks after Tangshan, showing that those arguing for the imminence of an earthquake in Western China were not entirely wrong.


title: 1976 Tangshan earthquake

text: At another meeting, on 26 July, there was a purported suggestion to "not" issue any warning, to avoid alarming the population. The next morning, at an emergency meeting he requested with the Bureau's leadership, Wang was reportedly told by Deputy Chief Cha Zhiyuan that "We are currently very busy. We will discuss it again next week." However, Cha has disputed this, claiming that Wang said there would be no major earthquakes. Another account says Wang was directed to submit more information, then send a small group to observe the earthquake.


title: 1976 Tangshan earthquake

text: Some of the bureaucratic reticence to issue warnings and order precautionary measures likely resulted from too many predictions. These were often based on doubtful theories notorious for false alarms that earthquakes can be predicted on the basis of droughts, daily temperatures, variations in geomagnetism, or isolated anomalous phenomena. They were often too broad (magnitude "of at least 4.0 in the area of Beijing, Tianjin, Huailai, Tangshan, Bohai, and Zhangjiakou", "in a few years") to warrant large-scale societal and economic disruption. Such disruptions could be serious: a false alarm in October, 1976, issued by the Shaanxi provincial government, is estimated to have disrupted the lives of 65% of the population of that province for half a year. It has also been estimated that "in the fall of 1976 about 400 million of the then total population of 930 million of China spent some nights in temporary earthquake shelters." This illustrates the classic dilemma of earthquake prediction: increasing the sensitivity to the possibility of an earthquake (i.e., reducing the failure to predict) increases the number false alarms, which often has a significant cost.


title: 1976 Tangshan earthquake

text: Comparison of the Tangshan death toll – officially 242,419—with other earthquake disasters is problematical because of uncertainty in the statistics. For example, the 1556 Shaanxi earthquake (estimated magnitude of ~8) is generally said to have been the deadliest earthquake disaster in history, with 830,000 deaths, based on Chinese historical records. However, a Chinese language source argues for only 530,000 deaths from the earthquake itself, with the larger number being the total reduction of population due to deaths from all causes (including exposure, disease, and famine) as well as people leaving the region due to economic collapse. Another Chinese source states (without citing any sources) that the 1556 earthquake killed only about 100,000 directly, with another 700,000 dying of disease. Depending on what basis is used, the Tangshan disaster can thus be considered as approximately one-third, one-half, or twice as deadly as the Shaanxi disaster.


title: 1976 Tangshan earthquake

text: The other five deadliest earthquake disasters known in history, with magnitudes ranging from 7.0 to 9.1, have had death tolls just under that of Tangshan's:


title: 1976 Tangshan earthquake

text: Although unprepared, compared to other earthquake disasters Tangshan did not experience significant common secondary disasters arising from fire, tsunami, landsliding, or flooding due to blocking of rivers or breaching of dikes. A dam holding back a large reservoir just above Tangshan was seriously damaged but did not fail; similarly for another dam that imperiled Tianjin and some outlying districts of Beijing.


title: 1976 Tangshan earthquake

text: The immediate and massive response by the government resulted in the rescue of thousands of people in the first two days (after which mortality increases rapidly), while prompt attention to the problems of clean water, food, and public health avoided the mortality due to epidemic disease and starvation that often follows such disasters.


title: 1976 Tangshan earthquake

text: Chinese director Feng Xiaogang's 2010 drama film "Aftershock" gives an account of the earthquake and its effects.


title: 1976 Tangshan earthquake

text: Footage of the incident appeared in the film "Days of Fury" (1979), directed by Fred Warshofsky and hosted by Vincent Price.


title: Forth (programming language)

text: Forth is a procedural, stack-oriented programming language and interactive environment designed by Charles H. "Chuck" Moore and first used by other programmers in 1970. Although not an acronym, the language's name in its early years was often spelled in all capital letters as "FORTH". The FORTH-79 and FORTH-83 implementations, which were not written by Moore, became de facto standards, and an official standardization of the language was published in 1994 as ANS Forth. A wide range of Forth derivatives existed before and after ANS Forth.


title: Forth (programming language)

text: Forth typically combines a compiler with an integrated command shell, where the user interacts via subroutines called "words". Words can be defined, tested, redefined, and debugged without recompiling or restarting the whole program. All syntactic elements, including variables and basic operators, are defined as words. A stack is used to pass parameters between words, leading to a Reverse Polish Notation style.


title: Forth (programming language)

text: For much of Forth's existence, the standard technique was to compile to threaded code, which can be interpreted faster than bytecode. One of the early benefits of Forth was size: an entire development environment—including compiler, editor, and user programs—could fit in memory on an 8-bit or similarly limited system. No longer constrained by space, there are modern implementations that generate optimized machine code like other language compilers.


title: Forth (programming language)

text: Forth is used in the Open Firmware boot loader, in space applications such as the Philae spacecraft, and in other embedded systems which involve interaction with hardware. The relative simplicity of creating a basic Forth system has led to many personal and proprietary variants, such as the custom Forth used to implement the bestselling 1986 video game "Starflight" from Electronic Arts. The free software Gforth implementation is actively maintained, as are several commercially supported systems.


title: Forth (programming language)

text: Moore later developed a series of microprocessors for executing compiled Forth-like code directly and experimented with smaller languages based on Forth concepts, including cmForth and colorForth.


title: Forth (programming language)

text: Forth has a niche in astronomical and space applications as well as a history in embedded systems. The Open Firmware boot ROMs used by Apple, IBM, Sun, and OLPC XO-1 contain a Forth environment.


title: Forth (programming language)

text: Forth has often been used to bring up new hardware. Forth was the first resident software on the new Intel 8086 chip in 1978, and MacFORTH was the first resident development system for the Macintosh 128K in 1984.


title: Forth (programming language)

text: Atari, Inc. used an elaborate animated demo written in Forth to showcase capabilities of the Atari 400 and 800 computers in department stores. Three home computer games from Electronic Arts, published in the 1980s, were written in Forth: "Worms?" (1983), "Starflight" (1986), and "Lords of Conquest" (1986).


title: Forth (programming language)

text: Rockwell produced single-chip microcomputers with resident Forth kernels: the R65F11 and R65F12. ASYST was a Forth expansion for measuring and controlling on PCs.


title: Forth (programming language)

text: Forth evolved from Charles H. Moore's personal programming system, which had been in continuous development since 1968. Forth was first exposed to other programmers in the early 1970s, starting with Elizabeth Rather at the United States National Radio Astronomy Observatory (NRAO). After their work at NRAO, Charles Moore and Elizabeth Rather formed FORTH, Inc. in 1973, refining and porting Forth systems to dozens of other platforms in the next decade.


title: Forth (programming language)

text: Forth is so-named, because in 1968 "the file holding the interpreter was labeled FOURTH, for 4th (next) generation software, but the IBM 1130 operating system restricted file names to five characters." Moore saw Forth as a successor to compile-link-go third-generation programming languages, or software for "fourth generation" hardware.


title: Forth (programming language)

text: FORTH, Inc.'s microFORTH was developed for the Intel 8080, Motorola 6800, Zilog Z80, and RCA 1802 microprocessors, starting in 1976. MicroFORTH was later used by hobbyists to generate Forth systems for other architectures, such as the 6502 in 1978. The Forth Interest Group was formed in 1978. It promoted and distributed its own version of the language, FIG-Forth, for most makes of home computer.


title: Forth (programming language)

text: Forth was popular in the early 1980s, because it was well suited to the limited memory of microcomputers. The ease of implementing the language led to many implementations. The British Jupiter ACE home computer has Forth in its ROM-resident operating system. Insoft GraFORTH is a version of Forth with graphics extensions for the Apple II.


title: Forth (programming language)

text: Common practice was codified in the de facto standards FORTH-79 and FORTH-83 in the years 1979 and 1983, respectively. These standards were unified by ANSI in 1994, commonly referred to as Forth.


title: Forth (programming language)

text: As of 2018, the source for the original 1130 version of FORTH has been recovered, and is now being updated to run on a restored or emulated 1130 system.


title: Forth (programming language)

text: Forth emphasizes the use of small, simple functions called "words". Words for bigger tasks call upon many smaller words that each accomplish a distinct sub-task. A large Forth program is a hierarchy of words. These words, being distinct modules that communicate implicitly via a stack mechanism, can be prototyped, built and tested independently. The highest level of Forth code may resemble an English-language description of the application. Forth has been called a "meta-application language": a language that can be used to create problem-oriented languages.


title: Forth (programming language)

text: Forth relies on explicit use of a data stack and reverse Polish notation which is commonly used in calculators from Hewlett-Packard. In RPN, the operator is placed after its operands, as opposed to the more common infix notation where the operator is placed between its operands. Postfix notation makes the language easier to parse and extend; Forth's flexibility makes a static BNF grammar inappropriate, and it does not have a monolithic compiler. Extending the compiler only requires writing a new word, instead of modifying a grammar and changing the underlying implementation.


title: Forth (programming language)

text: <br>The word codice_2 takes the top two numbers from the stack, multiplies them, and puts the product back on the stack.


title: Forth (programming language)

text: <br>The word codice_3 adds the top two values, pushing the sum. codice_4 (carriage return) starts the output on a new line. Finally, codice_5 prints the result. As everything has completed successfully, the Forth system prints codice_6.


title: Forth (programming language)

text: The colon indicates the beginning of a new definition, in this case a new word (again, "word" is the term used for a subroutine) called codice_7. The text in parentheses is a comment, advising that this word expects a number on the stack and will return a possibly changed number (on the stack).


title: Forth (programming language)

text: The subroutine uses the following commands: codice_8 duplicates the number on the stack; codice_9 pushes a 6 on top of the stack; codice_10 compares the top two numbers on the stack (6 and the codice_8ed input), and replaces them with a true-or-false value; codice_12 takes a true-or-false value and chooses to execute commands immediately after it or to skip to the codice_13; codice_14 discards the value on the stack; codice_15 pushes a 5 on top of the stack; and codice_16 ends the conditional.


title: Forth (programming language)

text: The codice_7 word is equivalent to this function written in the C programming language using the '?:'


title: Forth (programming language)

text: First a number (1 or 8) is pushed onto the stack, codice_7 is called, which pops the number again and pushes the result. codice_4 moves the output to a new line (again, this is only here for readability). Finally, a call to codice_5 pops the result and prints.


title: Forth (programming language)

text: Forth's grammar has no official specification. Instead, it is defined by a simple algorithm. The interpreter reads a line of input from the user input device, which is then parsed for a word using spaces as a delimiter; some systems recognise additional whitespace characters. When the interpreter finds a word, it looks the word up in the "dictionary". If the word is found, the interpreter executes the code associated with the word, and then returns to parse the rest of the input stream. If the word isn't found, the word is assumed to be a number and an attempt is made to convert it into a number and push it on the stack; if successful, the interpreter continues parsing the input stream. Otherwise, if both the lookup and the number conversion fail, the interpreter prints the word followed by an error message indicating that the word is not recognised, flushes the input stream, and waits for new user input.


title: Forth (programming language)

text: The definition of a new word is started with the word codice_21 (colon) and ends with the word codice_22 (semi-colon). For example,


title: Forth (programming language)

text: will compile the word codice_23, and makes the name findable in the dictionary. When executed by typing codice_24 at the console this will print codice_25.


title: Forth (programming language)

text: Most Forth systems include an assembler to write words using the processor's facilities. Forth assemblers often use a reverse Polish syntax in which the parameters of an instruction precede the instruction. A typical reverse Polish assembler prepares the operands on the stack and the mnemonic copies the whole instruction into memory as the last step. A Forth assembler is by nature a macro assembler, so that it is easy to define an alias for registers according to their role in the Forth system: e.g. "dsp" for the register used as the data stack pointer.


title: Forth (programming language)

text: Most Forth systems run under a host operating system such as Microsoft Windows, Linux or a version of Unix and use the host operating system's file system for source and data files; the ANSI Forth Standard describes the words used for I/O. All modern Forth systems use normal text files for source, even if they are embedded. An embedded system with a resident compiler gets its source via a serial line.


title: Forth (programming language)

text: Classic Forth systems traditionally use neither operating system nor file system. Instead of storing code in files, source code is stored in disk blocks written to physical disk addresses. The word codice_26 is employed to translate the number of a 1K-sized block of disk space into the address of a buffer containing the data, which is managed automatically by the Forth system. Block use has become rare since the mid-1990s. In a hosted system those blocks too are allocated in a normal file in any case.


title: Forth (programming language)

text: Multitasking, most commonly cooperative round-robin scheduling, is normally available (although multitasking words and support are not covered by the ANSI Forth Standard). The word codice_27 is used to save the current task's execution context, to locate the next task, and restore its execution context. Each task has its own stacks, private copies of some control variables and a scratch area. Swapping tasks is simple and efficient; as a result, Forth multitaskers are available even on very simple microcontrollers, such as the Intel 8051, Atmel AVR, and TI MSP430.


title: Forth (programming language)

text: Other non-standard facilities include a mechanism for issuing calls to the host OS or windowing systems, and many provide extensions that employ the scheduling provided by the operating system. Typically they have a larger and different set of words from the stand-alone Forth's codice_27 word for task creation, suspension, destruction and modification of priority.


title: Forth (programming language)

text: A full-featured Forth system with all source code will compile itself, a technique commonly called meta-compilation or self-hosting, by Forth programmers (although the term doesn't exactly match meta-compilation as it is normally defined). The usual method is to redefine the handful of words that place compiled bits into memory. The compiler's words use specially named versions of fetch and store that can be redirected to a buffer area in memory. The buffer area simulates or accesses a memory area beginning at a different address than the code buffer. Such compilers define words to access both the target computer's memory, and the host (compiling) computer's memory.


title: Forth (programming language)

text: After the fetch and store operations are redefined for the code space, the compiler, assembler, etc. are recompiled using the new definitions of fetch and store. This effectively reuses all the code of the compiler and interpreter. Then, the Forth system's code is compiled, but this version is stored in the buffer. The buffer in memory is written to disk, and ways are provided to load it temporarily into memory for testing. When the new version appears to work, it is written over the previous version.


title: Forth (programming language)

text: Numerous variations of such compilers exist for different environments. For embedded systems, the code may instead be written to another computer, a technique known as cross compilation, over a serial port or even a single TTL bit, while keeping the word names and other non-executing parts of the dictionary in the original compiling computer. The minimum definitions for such a Forth compiler are the words that fetch and store a byte, and the word that commands a Forth word to be executed. Often the most time-consuming part of writing a remote port is constructing the initial program to implement fetch, store and execute, but many modern microprocessors have integrated debugging features (such as the Motorola CPU32) that eliminate this task.


title: Forth (programming language)

text: The basic data structure of Forth is the "dictionary" which maps "words" to executable code or named data structures. The dictionary is laid out in memory as a tree of linked lists with the links proceeding from the latest (most recently) defined word to the oldest, until a sentinel value, usually a NULL pointer, is found. A context switch causes a list search to start at a different leaf. A linked list search continues as the branch merges into the main trunk leading eventually back to the sentinel, the root.


title: Forth (programming language)

text: There can be several dictionaries. In rare cases such as meta-compilation a dictionary might be isolated and stand-alone.


title: Forth (programming language)

text: A defined word generally consists of "head" and "body" with the head consisting of the "name field" (NF) and the "link field" (LF), and body consisting of the "code field" (CF) and the "parameter field" (PF).


title: Forth (programming language)

text: Head and body of a dictionary entry are treated separately because they may not be contiguous. For example, when a Forth program is recompiled for a new platform, the head may remain on the compiling computer, while the body goes to the new platform. In some environments (such as embedded systems) the heads occupy memory unnecessarily. However, some cross-compilers may put heads in the target if the target itself is expected to support an interactive Forth.


title: Forth (programming language)

text: The exact format of a dictionary entry is not prescribed, and implementations vary. However, certain components are almost always present, though the exact size and order may vary. Described as a structure, a dictionary entry might look this way:


title: Forth (programming language)

text: The name field starts with a prefix giving the length of the word's name. The character representation of the word's name then follows the prefix. Depending on the particular implementation of Forth, there may be one or more NUL ('\0') bytes for alignment.


title: Forth (programming language)

text: The link field contains a pointer to the previously defined word. The pointer may be a relative displacement or an absolute address that points to the next oldest sibling.


title: Forth (programming language)

text: The code field pointer will be either the address of the word which will execute the code or data in the parameter field or the beginning of machine code that the processor will execute directly. For colon defined words, the code field pointer points to the word that will save the current Forth instruction pointer (IP) on the return stack, and load the IP with the new address from which to continue execution of words. This is the same as what a processor's call/return instructions do.


title: Forth (programming language)

text: The compiler itself is not a monolithic program. It consists of Forth words visible to the system, and usable by a programmer. This allows a programmer to change the compiler's words for special purposes.


title: Forth (programming language)

text: The "compile time" flag in the name field is set for words with "compile time" behavior. Most simple words execute the same code whether they are typed on a command line, or embedded in code. When compiling these, the compiler simply places code or a threaded pointer to the word.


title: Forth (programming language)

text: The classic examples of compile-time words are the control structures such as codice_12 and codice_30. Almost all of Forth's control structures and almost all of its compiler are implemented as compile-time words. Apart from some rarely used control flow words only found in a few implementations, such as the conditional return word ?EXIT used in Ulrich Hoffmann's preForth, all of Forth's control flow words are executed during compilation to compile various combinations of primitive words along with their branch addresses. For instance, codice_12 and codice_30, and the words that match with those, set up codice_33 (unconditional branch) and codice_34 (pop a value off the stack, and branch if it is false). Counted loop control flow words work similarly but set up combinations of primitive words that work with a counter, and so on. During compilation, the data stack is used to support control structure balancing, nesting, and back-patching of branch addresses. The snippet:


title: Forth (programming language)

text: The numbers after codice_33 represent relative jump addresses. codice_36 is the primitive word for pushing a "literal" number onto the data stack.


title: Forth (programming language)

text: The word codice_21 (colon) parses a name as a parameter, creates a dictionary entry (a "colon definition") and enters compilation state. The interpreter continues to read space-delimited words from the user input device. If a word is found, the interpreter executes the "compilation semantics" associated with the word, instead of the "interpretation semantics". The default compilation semantics of a word are to append its interpretation semantics to the current definition.


title: Forth (programming language)

text: The word codice_22 (semi-colon) finishes the current definition and returns to interpretation state. It is an example of a word whose compilation semantics differ from the default. The interpretation semantics of codice_22 (semi-colon), most control flow words, and several other words are undefined in Forth, meaning that they must only be used inside of definitions and not on the interactive command line.


title: Forth (programming language)

text: The interpreter state can be changed manually with the words codice_40 (left-bracket) and codice_41 (right-bracket) which enter interpretation state or compilation state, respectively. These words can be used with the word codice_42 to calculate a value during a compilation and to insert the calculated value into the current colon definition. codice_42 has the compilation semantics to take an object from the data stack and to append semantics to the current colon definition to place that object on the data stack.


title: Forth (programming language)

text: In Forth, the current state of the interpreter can be read from the flag codice_44 which contains the value true when in compilation state and false otherwise. This allows the implementation of so-called "state-smart words" with behavior that changes according to the current state of the interpreter.


title: Forth (programming language)

text: The word codice_45 marks the most recent colon definition as an "immediate word", effectively replacing its compilation semantics with its interpretation semantics. Immediate words are normally executed during compilation, not compiled, but this can be overridden by the programmer in either state. codice_22 is an example of an immediate word. In Forth, the word codice_47 takes a name as a parameter and appends the compilation semantics of the named word to the current definition even if the word was marked immediate. Forth-83 defined separate words codice_48 and codice_49 to force the compilation of non-immediate and immediate words, respectively.


title: Forth (programming language)

text: In Forth, unnamed words can be defined with the word codice_50 which compiles the following words up to the next codice_22 (semi-colon) and leaves an "execution token" on the data stack. The execution token provides an opaque handle for the compiled semantics, similar to the function pointers of the C programming language.


title: Forth (programming language)

text: Execution tokens can be stored in variables. The word codice_52 takes an execution token from the data stack and performs the associated semantics. The word codice_53 (compile-comma) takes an execution token from the data stack and appends the associated semantics to the current definition.


title: Forth (programming language)

text: The word codice_54 (tick) takes the name of a word as a parameter and returns the execution token associated with that word on the data stack. In interpretation state, codice_55 is equivalent to codice_56.


title: Forth (programming language)

text: The words codice_21 (colon), codice_47, codice_54 (tick) are examples of "parsing words" that take their arguments from the user input device instead of the data stack. Another example is the word codice_60 (paren) which reads and ignores the following words up to and including the next right parenthesis and is used to place comments in a colon definition. Similarly, the word codice_61 (backslash) is used for comments that continue to the end of the current line. To be parsed correctly, codice_60 (paren) and codice_61 (backslash) must be separated by whitespace from the following comment text.


title: Forth (programming language)

text: In most Forth systems, the body of a code definition consists of either machine language, or some form of threaded code. The original Forth which follows the informal FIG standard (Forth Interest Group), is a TIL (Threaded Interpretive Language). This is also called indirect-threaded code, but direct-threaded and subroutine threaded Forths have also become popular in modern times. The fastest modern Forths, such as SwiftForth, VFX Forth, and iForth, compile Forth to native machine code.


title: Forth (programming language)

text: When a word is a variable or other data object, the CF points to the runtime code associated with the defining word that created it. A defining word has a characteristic "defining behavior" (creating a dictionary entry plus possibly allocating and initializing data space) and also specifies the behavior of an instance of the class of words constructed by this defining word. Examples include:


title: Forth (programming language)

text: Forth also provides a facility by which a programmer can define new application-specific defining words, specifying both a custom defining behavior and instance behavior. Some examples include circular buffers, named bits on an I/O port, and automatically indexed arrays.


title: Forth (programming language)

text: Data objects defined by these and similar words are global in scope. The function provided by local variables in other languages is provided by the data stack in Forth (although Forth also has real local variables). Forth programming style uses very few named data objects compared with other languages; typically such data objects are used to contain data which is used by a number of words or tasks (in a multitasked implementation).


title: Forth (programming language)

text: Forth does not enforce consistency of data type usage; it is the programmer's responsibility to use appropriate operators to fetch and store values or perform other operations on data.


title: Forth (programming language)

text: The word codice_4 (Carriage Return) causes the following output to be displayed on a new line. The parsing word codice_70 (dot-quote) reads a double-quote delimited string and appends code to the current definition so that the parsed string will be displayed on execution. The space character separating the word codice_70 from the string codice_72 is not included as part of the string. It is needed so that the parser recognizes codice_70 as a Forth word.


title: Forth (programming language)

text: A standard Forth system is also an interpreter, and the same output can be obtained by typing the following code fragment into the Forth console:


title: Forth (programming language)

text: codice_74 (dot-paren) is an immediate word that parses a parenthesis-delimited string and displays it. As with the word codice_70 the space character separating codice_74 from codice_72 is not part of the string.


title: Forth (programming language)

text: The word codice_4 comes before the text to print. By convention, the Forth interpreter does not start output on a new line. Also by convention, the interpreter waits for input at the end of the previous line, after an codice_79 prompt. There is no implied "flush-buffer" action in Forth's codice_4, as sometimes is in other programming languages.


title: Forth (programming language)

text: This definition was written to use the ASCII value of the codice_82 character (81) directly. The text between the parentheses is a comment and is ignored by the compiler. The word codice_84 takes a value from the data stack and displays the corresponding character.


title: Forth (programming language)

text: The following redefinition of codice_81 uses the words codice_40 (left-bracket), codice_41 (right-bracket), codice_88 and codice_42 to temporarily switch to interpreter state, calculate the ASCII value of the codice_82 character, return to compilation state and append the calculated value to the current colon definition:


title: Forth (programming language)

text: The parsing word codice_88 takes a space-delimited word as parameter and places the value of its first character on the data stack. The word codice_92 is an immediate version of codice_88. Using codice_92, the example definition for codice_81 could be rewritten like this:


title: Forth (programming language)

text: Both codice_88 and codice_92 are predefined in Forth. Using codice_45 and codice_47, codice_92 could have been defined like this:


title: Forth (programming language)

text: In 1987, Ron Rivest developed the RC4 cipher-system for RSA Data Security, Inc. Its description follows:


title: Forth (programming language)

text: Because Forth is simple to implement and has no standard reference implementation, there are numerous versions of the language. In addition to supporting the standard varieties of desktop computer systems (POSIX, Microsoft Windows, macOS), many of these Forth systems also target a variety of embedded systems. Listed here are some of the systems which conform to the 1994 Forth standard.


title: Unintended consequences

text: In the social sciences, unintended consequences (sometimes unanticipated consequences or unforeseen consequences) are outcomes of a purposeful action that are not intended or foreseen. The term was popularised in the twentieth century by American sociologist Robert K. Merton and expanded by economist Thomas Sowell and psychologist Stuart Vyse.


title: Unintended consequences

text: The idea of "unintended consequences" dates back at least to John Locke who discussed the unintended consequences of interest rate regulation in his letter to Sir John Somers, Member of Parliament.


title: Unintended consequences

text: The idea was also discussed by Adam Smith, the Scottish Enlightenment, and consequentialism (judging by results).


title: Unintended consequences

text: The invisible hand theorem is an example of the untintended consequences of agents acting in their self-interest. As Andrew S. Skinner puts it:


title: Unintended consequences

text: "The individual undertaker (entrepreneur), seeking the most efficient allocation of resources, contributes to overall economic efficiency; the merchant’s reaction to price signals helps to ensure that the allocation of resources accurately reflects the structure of consumer preferences; and the drive to better our condition contributes to economic growth."


title: Unintended consequences

text: Friedrich Engels touched on the idea of unintended consequences in his discussion of Ludwig Feuerbach: "The ends of the actions are intended, but the results which actually follow from these actions are not intended; or when they do seem to correspond to the end intended, they ultimately have consequences quite other than those intended."


title: Unintended consequences

text: In "The Unanticipated Consequences of Purposive Social Action" (1936), Merton tried to apply a systematic analysis to the problem of unintended consequences of deliberate acts intended to cause social change. He emphasized that his term "purposive action", "[was exclusively] concerned with 'conduct' as distinct from 'behavior.' That is, with action that involves motives and consequently a choice between various alternatives". Merton's usage included deviations from what Max Weber defined as rational social action: instrumentally rational and value rational. Merton also stated that "no blanket statement categorically affirming or denying the practical feasibility of "all" social planning is warranted."


title: Unintended consequences

text: More recently, the "law of unintended consequences" has come to be used as an adage or idiomatic warning that an intervention in a complex system tends to create unanticipated and often undesirable outcomes.


title: Unintended consequences

text: Akin to Murphy's law, it is commonly used as a wry or humorous warning against the hubristic belief that humans can fully control the world around them, not to presuppose a belief in predestination or a lack or a disbelief in that of free will.


title: Unintended consequences

text: Possible causes of unintended consequences include the world's inherent complexity (parts of a system responding to changes in the environment), perverse incentives, human stupidity, self-deception, failure to account for human nature, or other cognitive or emotional biases. As a sub-component of complexity (in the scientific sense), the chaotic nature of the universe—and especially its quality of having small, apparently insignificant changes with far-reaching effects (e.g., the butterfly effect)—applies.


title: Unintended consequences

text: In addition to Merton's causes, psychologist Stuart Vyse has noted that groupthink, described by Irving Janis, has been blamed for some decisions that result in unintended consequences.


title: Unintended consequences

text: The creation of "no-man's lands" during the Cold War, in places such as the border between Eastern and Western Europe, and the Korean Demilitarized Zone, has led to large natural habitats.


title: Unintended consequences

text: The sinking of ships in shallow waters during wartime has created many artificial coral reefs, which can be scientifically valuable and have become an attraction for recreational divers. Retired ships have been purposely sunk in recent years, in an effort to replace coral reefs lost to global warming and other factors.


title: Unintended consequences

text: In medicine, most drugs have unintended consequences ('side effects') associated with their use. However, some are beneficial. For instance, aspirin, a pain reliever, is also an anticoagulant that can help prevent heart attacks and reduce the severity and damage from thrombotic strokes. The existence of beneficial side effects also leads to off-label use—prescription or use of a drug for an unlicensed purpose. Famously, the drug Viagra was developed to lower blood pressure, with its use for treating erectile dysfunction being discovered as a side effect in clinical trials.


title: Unintended consequences

text: The implementation of a profanity filter by AOL in 1996 had the unintended consequence of blocking residents of Scunthorpe, North Lincolnshire, England, from creating accounts because of a false positive. The accidental censorship of innocent language, known as the Scunthorpe problem, has been repeated and widely documented.


title: Unintended consequences

text: In 1990, the Australian state of Victoria made safety helmets mandatory for all bicycle riders. While there was a reduction in the number of head injuries, there was also an unintended reduction in the number of juvenile cyclists—fewer cyclists obviously leads to fewer injuries, all else being equal. The risk of death and serious injury per cyclist seems to have increased, possibly because of risk compensation. Research by Vulcan, "et al." found that the reduction in juvenile cyclists was because the youths considered wearing a bicycle helmet unfashionable. A health-benefit model developed at Macquarie University in Sydney suggests that, while helmet use reduces "the risk of head or brain injury by approximately two-thirds or more", the decrease in exercise caused by reduced cycling as a result of helmet laws is counterproductive in terms of net health.


title: Unintended consequences

text: Prohibition in the 1920s United States, originally enacted to suppress the alcohol trade, drove many small-time alcohol suppliers out of business and consolidated the hold of large-scale organized crime over the illegal alcohol industry. Since alcohol was still popular, criminal organisations producing alcohol were well-funded and hence also increased their other activities. Similarly, the War on Drugs, intended to suppress the illegal drug trade, instead increased the power and profitability of drug cartels who became the primary source of the products.


title: Unintended consequences

text: In CIA jargon, "blowback" describes the unintended, undesirable consequences of covert operations, such as the funding of the Afghan Mujahideen and the destabilization of Afghanistan contributing to the rise of the Taliban and Al-Qaeda.


title: Unintended consequences

text: The introduction of exotic animals and plants for food, for decorative purposes, or to control unwanted species often leads to more harm than good done by the introduced species.


title: Unintended consequences

text: The protection of the steel industry in the United States reduced production of steel in the United States, increased costs to users, and increased unemployment in associated industries.


title: Unintended consequences

text: In 2003, Barbra Streisand unsuccessfully sued Kenneth Adelman and Pictopia.com for posting a photograph of her home online. Before the lawsuit had been filed, only 6 people had downloaded the file, two of them Streisand's attorneys. The lawsuit drew attention to the image, resulting in 420,000 people visiting the site. The Streisand Effect was named after this incident, describing when an attempt to censor or remove a certain piece of information instead draws attention to the material being suppressed, resulting in the material instead becoming widely known, reported on, and distributed.


title: Unintended consequences

text: Passenger-side airbags in motorcars were intended as a safety feature, but led to an increase in child fatalities in the mid-1990s because small children were being hit by airbags that deployed automatically during collisions. The supposed solution to this problem, moving the child seat to the back of the vehicle, led to an increase in the number of children forgotten in unattended vehicles, some of whom died under extreme temperature conditions.


title: Unintended consequences

text: Risk compensation, or the Peltzman effect, occurs after implementation of safety measures intended to reduce injury or death (e.g. bike helmets, seatbelts, etc.). People may feel safer than they really are and take additional risks which they would not have taken without the safety measures in place. This may result in no change, or even an increase, in morbidity or mortality, rather than a decrease as intended.


title: Unintended consequences

text: According to an anecdote, the British government, concerned about the number of venomous cobra snakes in Delhi, offered a bounty for every dead cobra. This was a successful strategy as large numbers of snakes were killed for the reward. Eventually, enterprising people began breeding cobras for the income. When the government became aware of this, they scrapped the reward program, causing the cobra breeders to set the now-worthless snakes free. As a result, the wild cobra population further increased. The apparent solution for the problem made the situation even worse, becoming known as the Cobra effect.


title: Unintended consequences

text: Theobald Mathew's temperance campaign in 19th-century Ireland resulted in thousands of people vowing never to drink alcohol again. This led to the consumption of diethyl ether, a much more dangerous intoxicant—owing to its high flammability—by those seeking to become intoxicated without breaking the letter of their pledge.


title: Unintended consequences

text: It was thought that adding south-facing conservatories to British houses would reduce energy consumption by providing extra insulation and warmth from the sun. However, people tended to use the conservatories as living areas, installing heating and ultimately increasing overall energy consumption.


title: Unintended consequences

text: A reward for lost nets found along the Normandy coast was offered by the French government between 1980 and 1981. This resulted in people vandalizing nets to collect the reward.


title: Unintended consequences

text: Beginning in the 1940s and continuing into the 1960s, the Canadian federal government gave the Catholic Church in Quebec $2.25 per day per psychiatric patient for their cost of care, but only $0.75 a day per orphan. The perverse result is that the orphan children were diagnosed as mentally ill so the church could receive the larger amount of money. This psychiatric misdiagnosis affected up to 20,000 people, and the children are known as the Duplessis Orphans.


title: Unintended consequences

text: There have been attempts to curb the consumption of sugary beverages by imposing a tax on them. However, a study found that the reduced consumption was only temporary. Also, there was an increase in the consumption of beer among households.


title: Unintended consequences

text: The New Jersey Childproof Handgun Law, which was intended to protect children from accidental discharge of firearms by forcing all future firearms sold in New Jersey to contain "smart" safety features, has delayed, if not stopped entirely, the introduction of such firearms to New Jersey markets. The wording of the law caused significant public backlash, fuelled by gun rights lobbyists, and several shop owners offering such guns received death threats and stopped stocking them. In 2014, 12 years after the law was passed, it was suggested the law be repealed if gun rights lobbyists agree not to resist the introduction of "smart" firearms.


title: Unintended consequences

text: Drug prohibition can lead drug traffickers to prefer stronger, more dangerous substances, that can be more easily smuggled and distributed than other, less concentrated substances.


title: Unintended consequences

text: Increasing usage of search engines, also including recent image search features, has contributed in the ease of which media is consumed. Some abnormalities in usage may have shifted preferences for pornographic film actors, as the producers began using common search queries or tags to label the actors in new roles.


title: Unintended consequences

text: The passage of the Stop Enabling Sex Traffickers Act has led to a reported increase in risky behaviors by sex workers as a result of quashing their ability to seek and screen clients online, forcing them back onto the streets or into the dark web. The ads posted were previously an avenue for advocates to reach out to those wanting to escape the trade.


title: Unintended consequences

text: The use of precision guided munitions meant to reduce the rate of civilian casualties encouraged armies to narrow their safety margins, and increase the use of deadly force in densely populated areas. This in turn increased the danger to uninvolved civilians, who in the past would have been out of the line of fire because of armies' aversion of using higher-risk weaponry in densely populated areas. The perceived ability to operate precision weaponry from afar (where in the past heavy munitions or troop deployment would have been needed) also led to the expansion of the list of potential targets. As put by Michael Walzer: "Drones not only make it possible for us to get at our enemies, they may also lead us to broaden the list of enemies, to include presumptively hostile individuals and militant organizations simply because we can get at them–even if they aren’t actually involved in attacks against us." This idea is also echoed by Grégoire Chamayou: "In a situation of moral hazard, military action is very likely to be deemed 'necessary' simply because it is possible, and possible at a lower cost."


title: Unintended consequences

text: According to Lynn White, the invention of the horse stirrup enabled new patterns of warfare that eventually led to the development of feudalism (see Stirrup Thesis).


title: Unintended consequences

text: Most modern technologies have negative consequences that are both unavoidable and unpredictable. For example, almost all environmental problems, from chemical pollution to global warming, are the unexpected consequences of the application of modern technologies. Traffic congestion, deaths and injuries from car accidents, air pollution, and global warming are unintended consequences of the invention and large scale adoption of the automobile. Hospital infections are the unexpected side-effect of antibiotic resistance, and even human population growth leading to environmental degradation is the side effect of various technological (i.e., agricultural and industrial) revolutions.


title: Unintended consequences

text: Because of the complexity of ecosystems, deliberate changes to an ecosystem or other environmental interventions will often have (usually negative) unintended consequences. Sometimes, these effects cause permanent irreversible changes. Examples include:


title: IBM and the Holocaust

text: IBM and the Holocaust: The Strategic Alliance between Nazi Germany and America's Most Powerful Corporation is a book by investigative journalist and historian Edwin Black which documents the strategic technology services rendered by US-based multinational corporation International Business Machines (IBM) and its German and other European subsidiaries for the Nazi government of Adolf Hitler from the beginning of the Third Reich in January 1933 through the last day of the regime in May 1945 at the end of World War II. Published in 2001, with numerous subsequent expanded editions, Black outlined the key role of IBM's technology in the Nazi genocide, by facilitating the regime's generation and tabulation of punch cards for national census data, military logistics, ghetto statistics, train traffic management, and concentration camp capacity.


title: IBM and the Holocaust

text: In the early 1880s, Herman Hollerith (1860–1929), a young employee at the U.S. Census Bureau, conceived of the idea of creating readable cards with standardized perforations, each representing specific individual traits such as gender, nationality, and occupation. The millions of punched cards created for the population counted in the national census could then be sorted on the basis of specific bits of information they contained—thereby providing a quantified portrait of the nation and its citizens. A circuit-closing device was used to electromagnetically record the data represented by the perforations. The technology enabled searching for individuals using the traits as search terms.


title: IBM and the Holocaust

text: In 1910, the German licensee Willy Heidinger established the Deutsche Hollerith Maschinen Gesellschaft (German Hollerith Machine Corporation), known by the abbreviation "Dehomag". The next year, Hollerith sold his American business to industrialist Charles Flint (1850–1934) for (equivalent to $ in ). The counting machine operation was made part of a new conglomerate called the Computing-Tabulating-Recording Company (CTR). Flint chose Thomas J. Watson (1874–1956), the star salesman of the National Cash Register Corporation, to head the new operation. In 1923, the German licensee Dehomag became a direct subsidiary of the American corporation CTR. In 1924, Watson assumed the role of Chief Executive Officer of CTR and renamed the company International Business Machines (IBM).


title: IBM and the Holocaust

text: Black details an ongoing business relationship between Watson's IBM and the emerging German regime headed by Adolf Hitler and his National Socialist German Workers Party (NSDAP). Hitler came to power in January 1933; on March 20 of that same year he established a concentration camp for political prisoners in the Bavarian town of Dachau, just outside the city of Munich. Repression against political opponents and the country's ethnic Jewish population began immediately. By April 1933, some 60,000 had been imprisoned. Business relations between IBM and the Hitler regime continued uninterrupted in the face of broad international calls for an economic boycott. Willy Heidinger, who remained the chief executive of Dehomag, the German subsidiary of which IBM owned 90%, was an enthusiastic supporter of the Hitler regime.