Mystere pa21 Stereo Tube Power Amplifier

Durob Audio is a company in the Netherlands that markets PrimaLuna tubed audio components, including integrated amplifiers, power amplifiers, and a CD player that has a tube-based clock. It also has a discrete output stage with triodes running in pure Class A. Conventional CD players use op-amps in the output stage. Although the tube output stage and op-amp output stage sound different, one doesn’t necessarily sound “better” than the other, although tubeophiles would all opt for the “better”. We reviewed the PrimaLuna DiaLogue Two integrated amplifier in December, 2009.

With the introduction of Durob Audio’s Mysterè line, we now review the Mysterè pa21, which is a 55 watt per channel stereo tube power amplifier. The Mysterè line goes beyond the PrimaLuna line with larger transformers, more power supply capacitance, and an auto-bias circuit that lets the consumer choose between using KT88’s or EL34’s as the output tubes. Trying different tubes is one of the things that makes tube products fun, and those who participate in this activity are called “tube rollers”.

  • Design: Stereo Tube Power Amplifier, Push-Pull, Class AB
  • Power Output: 55 Watts x 2 into 8 Ohms
  • Tube Compliment: Four 6SN7, Four KT88
  • MFR: 9 Hz – 52 kHz, ± 1 dB at 40 Watts Output
  • THD+N: 1% at 55 Watts Output
  • Input Impedance: 100 kOhms
  • Inputs: RCA
  • Outputs: Five-way Speaker Binding Posts
  • Dimensions: 8″ H x 16.75″ W x 17″ D
  • Weight: 60 Pounds
  • MSRP: $2,995 USA
  • Mystere USA

The Design

The pa21 has two gain stages, with the 6SN7s providing the input stage and the KT88’s at the output stage. You can substitute EL34’s for the KT88’s, and switch the toggle on the side to give the proper bias voltage for the EL34’s vs. the KT88’s.

The KT88, introduced in 1956, is a beam tetrode, and a schematic with pin-outs is shown below. The cathode (Pin 8) is indirectly heated by a filament (Pins 2 and 7, h). The control grid (Pin 5, g1) and screen grid (Pin 4, g2) are between the cathode and anode (Pin 3, a). (© Genalex)

Here is a diagrammatic representation of a beam tetrode. The light green lines represent the “beam” of electrons that flows from the cathode towards the anode in the direction indicated by the arrows.

The EL34 is a pentode rather than a beam tetrode, and was developed by Philips in 1953. The KT88, developed by MO-Valve, could not be an actual pentode, because Philips held the patent. So, the pentode design was modified such that it became a beam tetrode. The first beam tetrode was the 6L6, which is still very popular in guitar amplifiers.

A generic diagram of a pentode is illustrated below. The numbers are not the pin socket numbers, but are just for identifying the structures in the diagram.

It has a cathode (2) which is indirectly heated by a filament (1), three grids (4,5, and 6), and the anode, also called the plate (3). It can be operated as a triode by connecting the grids together.

The 6SN7 is a dual triode, originating in 1939 from the US (the ECC32 is the European version). It was used as the driver stage in audio amplifiers, and is electrically similar to the 12AU7. It is still used quite often, such as in preamplifiers. Here is a schematic with the actual pin-out arrangement, as viewed from the bottom of the tube. Pins 7 and 8 are the heater for the two cathodes (6 and 7), pins 1 and 4 are the two grids, and pins 2 and 5 are the anodes (plates).

So, with the pa21, for each channel, there are two triodes in the input stage and two triodes in the driver stage (each channel has two 6SN7’s and there are two triodes in each tube), and two pentodes in the output stage. The input stage delivers the voltage, and the output stage delivers the current.

The chassis is gloss black enamel, and the cover for the tubes can be removed to aid in dissipating heat. But if you have small children, leave the cover on.

The rear panel has five-way speaker binding posts, with 8 ohm and 4 ohm “taps” (these are connected to different positions on the output transformer). The power on/off toggle is on one side and the KT88/EL34 toggle is on the other side. The AC power cord is grounded and detachable.

In Use

The pa21 had a midrange lushness that I have come to expect. This is due to a tube amp’s natural tendency to produce mostly 2nd order harmonics, which you will see in the bench tests. It produced more distortion overall than a solid state amplifier might, and the argument never ends about why consumers are happy with that higher level of harmonics, even though they are “euphonic”, which means having a “sweet” sound. I am a huge fan of tubes myself, and love the characteristic that the high level of 2nd order harmonics imparts on the sound. The reason for this is that we can never really come up with an audio system that will truly reproduce the sound of a live orchestra in our listening room. It can come close, but no cigar. For a single instrument or a jazz quartet, maybe really close. Still no cigar though.

On the Bench

Distortion measurements were made within an 80 kHz bandwidth. Except where indicated, the load was 8 ohms.

Most of the time, we listen to our audio systems with just a few watts. Here is a 1 kHz sine wave test signal at 5 volts output (the left channel is represented by the yellow lines, and the right channel by red). There is 0.21% THD+N. That would be considered quite a bit in the solid state world. But for tubes, it is the norm. Notice that the 2nd order harmonic predominated.

At 15 volts output, distortion rose to 0.38%, but the 2nd order harmonic was still the biggest one. Again, seeing all those tall peaks makes it look like there is a lot of distortion, but the Y axis is exponential, and this is really just so we can see the peaks more easily.

Compare the above graph to that taken from a solid state balanced push-pull power amplifier, shown below. The total distortion figure is lower by a factor of about 30. All of the even-order distortion products have been cancelled, leaving only odd-order harmonics. The total amount of distortion is about 1/100th of a percent. This is right about at the level of controversy as to whether the distortion can be heard. It’s likely not “heard”, but perhaps “sensed” in some form.

With 60 hz and 7 kHz sine waves, and 5 volts output, IMD measured 0.77%.

At 15 volts output, IMD rose to 1.47%. This appears to be a high number, but it’s often seen in tube components.

For 19 kHz and 20 kHz sine wave test signals, at 5 volts output, the B-A peak at 1 kHz was 52 dB below the fundamentals.

At 15 volts output, B-A was 36 dB below the fundamentals. Looks like a lot of distortion doesn’t it? But don’t critcize until you have listened.

THD+N vs. Frequency indicated less than 1% distortion at output levels up to 15 volts into 8 ohms.

Power output didn’t quite make it to the specified output, but it was close. Because of these curves, I would suggest using the 8 ohm tap regardless of the speaker.

The measured frequency response was 20 Hz – 20 kHz, + 2 dB at 5 volts output. At 15 volts output tended to rise a bit at both the low end and high end.

Tube amplifiers have made their comeback, and if you are a “Retro” kind of person, or just someone looking to go back to a full-bodied tube sound, the Mysterè pa21 is your kind of product. It’s beautiful to look at (the soft glow of the filaments in the evening adds to that peaceful sensation), reasonably priced, and delivers everything you might expect and desire from a tube amplifier.

The amp compares favorably with my reference units, but I play music very loud in many situations and I use speakers that are not very efficient, so I have to use amps with a lot more power, i.e., 1200 watt monoblocks. But the Mysterè has a sound of its own. I found it to be extremely pleasant to listen to in the evening, at low/moderate volume, while I was reading. You know, the glass of wine, fireplace going, cat on my lap kind of evenings. And this is the first June I have lived in California where I needed to use the fireplace. What is it with this weather?


Scientists discover a new disease-causing bacterium in an immune-compromised patient

Researchers discovered a new bacterium in an immune-compromised patient, according to a study recently published in PLoS Pathogens. The bacterium belongs to the family Acetobacteraceae and includes bacteria common in the environment, some of which are used in industry, such as vinegar-making. "This is the first reported case of invasive human disease caused by any of the Acetobacteraceae," according to the article.

The new bacterium was identified in a patient with chronic granulomatous disease (CGD), a rare genetic disorder that impairs the immune system. In the patient, the bacterium caused fever, lymph node inflammation, and weight loss, but not death.

The journal also published an editorial entitled, "Extending the Spectrum of Human Pathogens," which comments on the significance of the discovery.

Usually, our immune systems fight off most bacteria and fungi with everyday ease, thwarting infection. But patients with CGD cannot control attacks by certain bacteria and fungi. The disorder prevents immune cells called neutrophils from functioning properly, and recurrent --and potentially life-threatening-- infections result.

The team isolated the new bacterium from the patient's swollen lymph nodes and demonstrated its pathogenesis. "Our first concern was to determine whether this organism was truly associated with his clinical syndrome," the team wrote.

Despite ineffective neutrophil immune cells, the patient's immune system still tagged the bacterium as an invader. Researchers also exposed CGD mice to the bacterium, recreating the appearance of the patient's infection. Researchers were then able to retrieve the bacteria from the mice's spleens, which are disease-fighting organs. These factors all support the pathogenic nature of the bacterium.

Because the bacterium does not cause death, it may be provide useful comparison with more menacing bacteria and fungi in CGD patients. "Given its apparent low virulence, further investigation of this organism may shed light on the mechanisms of microbial killing in CGD. Comparing the genome of this organism to other 13 available genomes of CGD pathogens may provide clues to virulence properties that they share in common," according to the article.

The research team, composed of scientists from the National Institutes of Health and Rush Medical College, have proposed Granulobacter bethesdensis as the bacterium's name.

    Published on All rights reserved.


Hawaii Travel pictures of the island of Hawaii - Hawaii Island - a report on Hawaii Islands - tourism in the islands of Hawaii - the most beautiful landscape pictures in the Hawaiian Islands – Hotels and Hostels in the island of Hawaii - Images of Hawaii - Travel to Hawaii - The most beautiful trip to the Hawaiian Islands

Hawaii consisting of six separate islands and of the United States, It is one of the most parts of the world considered as a top destination for tourist. Feature the beauty of nature and unique diversity as well as beautiful mild throughout the year atmosphere.

In Hawaii there are a collection of cheap hotels, hostels and guest house affordable accommodation which work with all travelers budget.

Hawaii islands were formed of a group of volcanoes erupted from the bottom of the ocean. Million tons of lava from the inside of the earth created the surface of those islands. First Island created is Kaui, then Oahu, then Maui and Hawaii.

Due to the difference in the dates of forming of each island, each island nature and the shape is different. The island of Hawaii is the youngest of this group of islands. Where there is the highest peak of Mount volcanic neighborhood and home run tend to extroversion little forest and the trees.

In the Island of Hawaii there is the highest volcanic mountain peak. Its landscape tends to be flat with little of woods and trees.

The oldest islands of Hawaii is Kaui, has nature scenery, heavy woods and very beautiful.

The remaining islands of Hawaii has features can be described as a combination of the above two islands. The Hawaii islands are in the form of an archipelago of islands in the Pacific Ocean with an area of 166 642 km. According to population statistics for the year 2000, the number of Hawaii's population is 1,211,537 people. Honolulu is the capital and largest city of Hawaii is made up of 19 main islands.

Hawaii is the last States that have joined the American Union and the state, which sets it apart from many others. In addition to the location of the last end in the American South is the only state that lies entirely in the tropical areas.

Captain Cook discovered in 1778 and has remained a crown a long time and was at that time under the reign of four local kings.

Climate: Tropical Island, but it varies from one region to another depending on the location and the system of the terrain and the direction of the wind, rain and falling most of the year with the intensity of rainfall in the months of November and April.


I agree with the above as to the engagement ring. It is a conditional gift. Marriage satisfied the condition. You cannot be forced to return the engagement ring. Probably same is true as to wedding ring. As for other gifts during the marriage, generally they are completed upon delivery, HOWEVER, there may have been agreements/strings that attached at the time of the gift which could make that analysis less clear. As advised, it is best to consult an attorney where a full factual history can be taken and analyzed to provide a more performable response.


In honor of Joe Louis' 100th birthday, watch him knock out Max Schmeling

The greatest Detroit champion was born on May 13, 1914

By Jeff Wattrick - Web Editor
Headline Goes Here
1914: Boxer Joe Louis, considered to be one of the greatest heavyweights of all time, is born in Lafayette, Alabama. Nicknamed the "Brown Bomber," Louis was the World Heavyweight Champion from…

Few athletes, indeed few others in any field, are so identified with Detroit as Joe Louis.

The Brown Bomber, who held the world heavyweight title from 1937-1949, is still considered among the greatest fighters in history. He would have turned 100-years-old today.

Louis was born in Chambers County, Alabama on May 13, 1914 as Joe Louis Barrow. His family moved to Detroit in 1926 as part of the Great Migration.

Learning to fight at the Brewster Recreation Center, he fought under the name Joe Louis supposedly because "Joe Louis Barrow" wouldn't fit on an entry form for an amateur bout.

He won the heavyweight championship on June 22, 1937, knocking out James J. Braddock in the eighth round. He became only the second African-American heavyweight champion after Jack Johnson.

However, it was exactly one year later when Louis would score a first-round knockout against Max Schmeling in the fight that would define his legacy.

Two years earlier, Schmeling delivered Louis the only loss of his career until that point and Louis had said he wouldn't consider himself the legitimate champ until he avenged the loss.

With World War II looming, Louis was perceived as a symbol for all that was right with the United States against the German Schmeling. President Franklin Roosevelt allegedly told Louis he was "the muscles we need to beat Germany."

Meanwhile, Nazi propagandists hyped Schmeling as a symbol of their Aryan ideals--though Schmeling was anti-Nazi and had hid his Jewish manager's children in his Berlin hotel suite during Kristallnacht.

In the rematch with political as well as pugilistic implications, Louis dominated his German opponent before a sold-out crowd at Yankee Stadium. The fight didn't even last two minutes.

Louis would hold the title until his first retirement in 1949. He would only lose two more fights in his career, to Ezzard Charles Charles in 1950 and Rocky Marciano in 1951, during a comeback effort. Louis finished with a 68-3 (54 KO) pro record.

After retiring for good from the ring, Louis again assumed the role as a racial trailblazer becoming the first African-American to play in a PGA-sanctioned golf tournament.

In later life, Louis and Schmeling became friends. When Louis died in 1981 at the age of 66, it was Schmeling who helped pay for the funeral.

But on that historic night almost 77 years ago, it was Louis who showed he was the best in the world.

Joe Louis-Max Schmeling II


Ben Affleck - 7 Swoon-Worthy Celebrity Dads | Fit Pregnancy - Fit Pregnancy

7 Swoon-Worthy Celebrity Dads

The recently retired soccer star says the hardest thing for him is being away from his family when he has to travel for work.

"It's only for a short time, but it's difficult being away from the children every single day. ... They understand that daddy works hard.

And what about his feelings on having a daughter after three sons?

"To have a daughter is a whole different story. I'm not saying I love my daughter more. It's just that boys are independent."

He and wife Victoria Beckham have three sons, Brooklyn, Romeo and Cruz, and one daughter, Harper.

Most Popular in parenting


Economic Engines

When Height's Not Right for Urban Planning

Kitsilano, a lovely old neighborhood in Vancouver, British Columbia, looks much the same as it did a century ago when it was designed around a streetcar line. It still has enormous homes perched on lawns with alleys in the back, all within sight of downtown’s shimmering skyscrapers.

But unlike in 1930, when the neighborhood was home to a population of about 28,000, a lot more people live in Kitsilano now. By 2011, about 41,000 were living there. With family sizes smaller, the number of residences has increased by an even larger percentage. But just where are these new people and their homes if Kitsilano looks largely unchanged? READ MORE

Why Moving Isn't All Bad

There are two reigning views of internal migration in America. For the educated middle class, it’s seen as a good thing. Moving out means moving up. Indeed, most of us see our own moves as representing an opportunity to get ahead in life. It’s the same for immigrants from other countries, who move here searching for a better life.

But when it comes to lower-income Americans, particularly blacks and Hispanics, migration is almost always seen as a bad thing. The overwhelming narrative is one of displacement instead of opportunity. READ MORE

An Old Idea for the New App-Based Economy

Something like that certainly seems to be happening. Just as Uber and Lyft are taking on traditional taxi companies, Airbnb, TaskRabbit and dozens of other app-centered companies are taking on local companies in their industries. “When you can connect and share assets, people and ideas, everything changes, not just how you rent a car,” writes Robin Chase, co-founder of Zipcar, in her new book Peers Inc. This new world, she adds, “redefines our understanding of assets -- proprietary versus in-common, private versus public, commercial use versus personal use -- and requires a rethinking of regulations, insurance and governance.” READ MORE

What Is the Real American Dream?

Of Eyesores and Assets

If you look at a map of Terrassa, a medium-sized city about 20 miles from Barcelona in the Catalonia region of Spain, you’ll see a jagged green gash, about two miles long, running down the middle of the city. Until recently, this was a dark, imposing ravine that, despite cliffs studded with a historic castle, an ancient church and 19th-century brick mill buildings, was a place where few locals -- much less outsiders -- ventured. “It was a dirty, dangerous place where people were scared to walk,” a local taxi driver told me.

Today the ravine is a verdant canyon filled with walkways, bridges, small restaurants, playgrounds, lawns, trees and a pool at one end that you could practically float an aircraft carrier in. Parc de Vallparadis is clearly a well-loved and well-used space. Even on a late summer afternoon in the middle of a heat wave, it was filled with people. “My husband and I go there all the time,” said my taxi driver. “It’s the lungs of the city.” READ MORE


A solar-powered trash compacting bin. One of Santa Clarita, Calif.'s solar-powered trash compacting bins. Photo courtesy of Mark Patti/City of Santa Clarita.

Being green isn’t always easy, particularly for a city with limited resources to spend on environmental programs. But Santa Clarita, Calif., has found an affordable way to help reduce its carbon footprint — solar-powered, self-compacting trash bins.

Thirty-four of the trash and recycling units are now located in parks and various public spaces throughout Santa Clarita, giving citizens a simple way to contribute to the city’s environmental health. In addition, instead of making daily trips to empty the containers, city employees now monitor their capacity remotely with a mobile app, improving workflow efficiency.

If a bin appears green on the application, it means there’s plenty of space left for more bottles and cans. If it appears yellow, the bin is starting to get full and will require attention soon. If the container is marked red, there is less than 10 percent capacity left and should be emptied.

“Normally when park staff would go out to a site, they would have to check every single container in the park,” said Mark Patti, project development coordinator with Santa Clarita. “With the solar containers … they are being checked once or twice a week.”

Designed by Big Belly Solar, the units were installed over a 10-day period earlier this year. Thirty of the bins are strictly for recyclable materials, while the other four compactors are dual-purpose, featuring bins for both regular trash and recyclables. The project cost $120,000, which was paid for by a state grant from the California Department of Resources Recycling and Recovery (CalRecycle).

Santa Clarity isn't the first to adopt this solar compactor technology. In the last few years, a number of other cities have successfully deployed the same  including Philadelphia, Boston, and Pasadena, Calif., among others.

And it was the money and time the containers saved Philadelphia that put the technology on Patti's radar, he said. Prior to the Big Belly Solar compactors being installed, Santa Clarita only had a few 55-gallon containers in its parks to collect recyclables. Those were getting scavenged, however, so the city wasn’t able to judge how much patrons used them.

With the new technology in place, however, Santa Clarita has seen a significant amount of recyclable materials being collected. As one of the conditions of receiving the state grant, the city is required to monitor the amount of beverage containers being recycled. In the first five months, it has collected 2.5 tons of material it wasn't capturing before.

The city has partnered with a nonprofit group called the LA Conservation Corps to obtain further recycling statistics. After city staff empties the Big Belly containers, the LA Conservation Corps takes and centralizes all the recyclables, divides them up and gives the city quarterly metrics on the amount of glass, aluminum and plastic that has been collected per pound.

“We’ve actually had to double our own dumpster capacity at Central Park where we store all the recyclables that are collected from these Big Belly units because more and more people are taking note of the containers,” Patti said. “If that trend were to continue, we’d definitely consider putting more containers in, because it’s clearly saving our staff time.”

Brian Heaton  |  Senior Writer


Icons 1423859675 9 Natural Light

Description backgrounds 1423859674 natural light intro

The “sun rises“ and the ”sun sets.“ This rhythm sets a pattern to our lives. The light of the sun also allows us to see. Light from the sun is actually the visible part of the electromagnetic spectrum, or waves of charged particles that travel at the speed of light: 186,000 miles per second (220,000 kilometers per second). Watch this TEDed video, Light waves, visible and invisible. Direct sunlight is made up of different wavelengths of light or colors that merge together to give us the brilliance of white sunlight whereas indirect light from the north gives a room a blue cast. Sunlight is absorbed by Earth’s atmosphere or can be reflected by clouds and dust, or transmitted directly on a clear sunny day. Passing light through a prism results in different colors of light (with different wavelengths) bending as they pass from low density air to higher density prism glass. Voila, a spectrum! Our eyes capture thousands of edges or lines per second and reflect their light back into our eyes. The edges or lines are focused onto our retina and then to our brain and form memories of images. When the sunrises, forms become articulated textures. Sunlight falls onto surfaces and is absorbed (as on a black roof), reflected (as from a mirror) or transmitted (when it passes through clear glass). Humans are drawn to light and have made use of natural light to illuminate the spaces where they work and live since the very beginning. Daylight stimulates the mind and connects us with nature.

Let there be light!

Activity 1 – The dance of the sun and the earth

Backgrounds 1444428364 natural light a1 %2872%29

The earth revolves around the sun. The half of the earth facing the sun is in sunrise, noon and sunset time. The half away from the sun is in dusk and night. The earth rotates as it revolves around the sun in solar days on a tilted axis. The time of one revolution is one year or 365. 26 days. The earth’s tilt, as it rotates around its axis gives us our 24 hour day. Look at the rotation and see how the earth’s tilt bring its closer to the sun during the Perihelion stage and further from the sun during the Aphelion stage.

Watch The Reasons for the seasons.

sunlight: light cast on the earth by the sun
sun position: direction sun points towards a particular structure or space and the angle it appears in the sky above the horizon line.
day lighting: the use of the sunlight to light a space to minimize use of artificial lighting

Draw the sun in a diagram with the rotation of the earth. Label the miles between the sun and the earth at the Perihelion stage and the Aphelion stage. Label the equinoxes.

Activity 2 – Light reactions

Backgrounds 1444428664 natural light a2

We see because of light. To be seen, objects must reflect light or emit light. Sunlight falls onto surfaces and is absorbed (as on a black roof), reflected (as from a mirror), or transmitted (passing through clear glass). When light is reflected, the incoming angle of incidence equals the angle of reflection. Refracted light is light that is bent or changes direction. Light in a prism is refracted. Sometimes, depending on the surface of the material or lens sunlight hits, light can scatter in multiple angles at one time. Diffraction is a slight bending of light around the edge of an object. Draw the different behaviors of light in your journal and submit them to the gallery.

translucent: material that allows partial transmission of light
transparent: material that allows 100% of light to pass through
opaque: material that blocks 100% of light passing through

Activity 3 – Shadow Watch

Backgrounds 1423859678 natural light activity 01

Pick a room in your house that has windows facing south so that during the day, sunlight spills into the room. On an 11 x 17 piece of paper, make a chart for the 24 hours of a day. Set a camera in the room in a place where it cannot be moved. Take one picture every hour of the day…and night!!! Print your pictures in a series and see how the mood and atmosphere of the room changes with the presence of sunlight or the absence of sunlight (shadows). Print your pictures at a small scale then paste four different moods in your journal. An option is to draw the view at four different times of day. Draw the view once in the morning, once at noon, once at 6pm and once in the evening. Look at the change in values, views, and detail definition.

Illustrate illumination!

Activity gallery camera

Activity 4 – Light Wall

Backgrounds 1423859711 natural light activity 02

Begin with a large sheet of foam core. Thinking about windows, cut openings into the foam core of different shapes and sizes. Cover the openings with an assortment of papers and common materials you find around your house, then tape them to the foam core on the backside. Some materials to use are: newspaper, foil, waxed paper, typing or tracing paper, toilet paper, paper towel, tape, translucent plastic, grids, and different scraps of cloth. Take a flashlight and shine the light through the materials. On the front side, label whether the material absorbs, reflects, or transmits light. Paste an opaque, translucent, reflective, and transparent material in your journal and label each of them.

Reflect, refract, transmit, absorb!

Activity gallery camera

Activity 5 – Light Box

Backgrounds 1423859726 natural light activity 03

Find an empty box, preferably all white. Take the top of the box off and set the box on its side. On the remaining five sides, design openings in the box from above, on the sides and from the bottom. Make some of the openings linear, others in a pattern or repetitive shapes. Place an object inside of your box. Cut the openings with an exacto knife keeping the edges of the opening clean. Take a flash light and shine the light outside of the box while looking into the box. See how the direction and source of the light changes the effect of the space and the mood of the displayed object. Show your magic light box to a friend!

Create some shadows of your own with the light box on the right!

Make light magic!

Activity gallery camera

  • Natural lighting is light that comes from the sun.
  • Light travels at 200,000 miles per hour.
  • The visible part of the electromagnetic spectrum is made up of the colors of the rainbow.
  • When different colors of light are mixed together, the light becomes white.
  • Light is necessary to see.
check answers


f @
on 5 lists

Herman Munster

Herman Munster, 5th Earl of Shroudshire, is a fictional character in the CBS sitcom The Munsters, originally played by Fred Gwynne. The patriarch of the Munster household, Herman is an entity much like Frankenstein's monster along with Lurch on the show's competitor The Addams Family.

... more on Wikipedia


We regularly hear calls to improve “ocean health.” Health is a powerful metaphor, but scientists have had no way to measure it and therefore no means to evaluate how the world's oceans are doing. More than 60 researchers from a cross section of disciplines and institutions, including the National Center for Ecological Analysis and Synthesis (NCEAS) at the University of California, Santa Barbara, have created the Ocean Health Index to do just that. It rates the health of ocean waters bordering 171 coastal countries and territories. Each nation's overall score is the average of scores for 10 widely held public goals for healthy oceans, including sustainable food provision, recreation, fishing opportunities and biodiversity.

The index, which was published in August in Nature, is not a measure of how pristine the ocean is. (Scientific American is part of Nature Publishing Group.) Instead it measures how sustainably the ocean is providing the things people care about. The goals are universal measures of ecosystem health—all 10 must be met for a country's ocean to be rated as healthy—but the relative importance of each goal can vary from place to place.

Factoring human goals into assessments of ocean health is a radical departure from traditional conservation approaches. Yet public policy and conservation organizations worldwide are rapidly converging on the view that people are now a fundamental part of every ecosystem on the earth, and any effective management strategy must embrace this reality. If we focus only on excluding people from nature, conservation plans are doomed to fail.

The index is an important first step. Countries cannot make progress on ocean health without first knowing where they stand. In that sense, the index is a key benchmark. Later this year the NCEAS and various partners will test its application in the U.S., Fiji and Brazil. Policy makers and managers could use the index to guide decision making—for example, about whether offshore wind energy should be expanded in the U.S., whether land or ocean conservation measures will benefit coral reefs in Fiji and how marine-zoning plans in Brazil might affect overall ocean health.

Of course, various people or adjacent countries might put different priorities on different goals. As a tool that lays them all out, the index can aid any negotiations by identifying trade-offs and synergies.

» For an article that addresses controversy over the index, see "A New Goal for Nature: Healthy, but Not Pristine" by Benjamin S. Halpern.

Interactive by Krista Fuentes


More than 100 dead in suspected cholera outbreak in Haiti

Doctors are testing for cholera, typhoid and other illnesses in the Caribbean nation's deadliest outbreak since the January earthquake

An outbreak of severe diarrhoea has killed at least 135 people in rural central Haiti and left sick hundreds more, who overwhelmed a crowded hospital on Thursday seeking treatment. Health workers suspected the disease was cholera, but were awaiting tests.

Hundreds of patients lay on blankets in a parking lot outside St Nicholas hospital in the port of St Marc with IVs in their arms for rehydration. As rain began to fall in the afternoon, nurses rushed to carry them inside.

Doctors were testing for cholera, typhoid and other illnesses in the Caribbean nation's deadliest outbreak since the earthquake in January that killed as many as 300,000 people.

Catherine Huck, the deputy country director for the UN Office for the Coordination of Humanitarian Affairs (OCHA), said the Caribbean nation's health ministry had recorded 135 deaths and more than 1,000 people infected.

"What we know is that people have diarrhoea, and they are vomiting, and [they] can go quickly if they are not seen in time," Huck said. She said doctors were still awaiting laboratory results to pinpoint the disease.

The president of the Haitian Medical Association, Claude Surena, said the cause appeared to be cholera, but added that had not been confirmed by the government.

"The concern is that it could go from one place to another place, and it could affect more people or move from one region to another one," he said.

Cholera is a bacterial infection spread through contaminated water. It causes severe diarrhoea and vomiting that can lead to dehydration and death within hours. Treatment involves administering a salt and sugar-based rehydration serum.

The sick come from across the rural Artibonite region, which did not experience significant damage in the 12 January quake but has absorbed thousands of refugees from the devastated capital 45 miles south of St Marc.

Some patients said they drank water from a public canal, while others said they bought purified water. All complained of symptoms including fever, vomiting and severe diarrhoea.

"I ran to the bathroom four times last night vomiting," said 70-year-old Belismene Jean Baptiste.

Trucks loaded with medical supplies including rehydration salts were to be sent from Port-au-Prince to the hospital, said Jessica DuPlessis, a spokeswoman for OCHA. Doctors at the hospital said they also needed more personnel to handle the flood of patients.

Elyneth Tranckil was among dozens of relatives standing outside the hospital gate as new patients arrived near death. "Police have blocked the entry to the hospital, so I can't get in to see my wife," Tranckil said.

Aid groups were mobilising to ship medicine, water filtration units and other relief supplies to the Artibonite region.

"We have been afraid of this since the earthquake," said Robin Mahfood, the president of Food for the Poor, which was preparing to airlift donations of antibiotics, oral dehydration salts and other supplies.

The US embassy in Port-au-Prince issued an advisory note urging people to drink only bottled or boiled water and eat only food that has been thoroughly cooked.


Lots of rescued data

Here’s one from 2003.

Remember, Remember The Eleventh of September. Majulah Singapura.

Remember, Remember The Eleventh of September.

Majulah Singapura.

This has been circulating in the chat groups on telegram.org and whatsapp.com and want it to be as widely read as possible. I did not wirte it, and I would love to give credit to the author. If you are the author or know who wrote it. please tell me so that I can give credit where credit is due.

As the silly season starts

By noon on September 1st, we will know who are running for the 89 seats in the parliament.

As voters we are all keen to know who the candidates are. The irony is that the majority voters don’t really know who their current member of parliament is to begin with. I know who mine is, but I have not met nor spoken to him ever. That being the reality, how would you go about making a considered and fair assessment of how you should be casting your vote.

Let me offer up a short checklist to help with the thinking:

  1. Is your’s, your family’s and of Singapore’s future important to you?
  2. If you said YES to 1, do you think the candidate(s) in your ballot paper will be able to deliver the future you want?
  3. If you said NO to 1, it does not matter who you vote for.  So VOTE, PLEASE DON’T SPOIL THE VOTE EVEN THOUGH YOU HAVE THE RIGHT TO SPOIL IT.
  4. If you said YES to 2, have you understood who the candidate(s) is(are) and where they stand on issues that is of concern to you? Have you done sufficient research to be able to be honest to yourself to come to a decision?
  5. If you said NO to 2, are you prepared to find out why you think they cannot deliver the future you want?
  6. If you said NO to 5, it does not matter who you vote for. So VOTE, PLEASE DON’T SPOIL THE VOTE EVEN THOUGH YOU HAVE THE RIGHT TO SPOIL IT.
  7. If you said YES to 5, do spend time reading, talking to family, friends, colleagues or just about any other Singaporean voter. Do make sure that you get to hear from all sides not just one side.

See, it is quite easy to navigate the silly season.

Do be aware that what is called “Mainstream Media” (MSM), which especially in the Singapore context, has very low credibility in terms of being fair, balanced and critical. These MSM include the newspapers, TV and radio owned and operated by Singapore Press Holdings and MediaCorp. These entities are government-linked companies and have never been known to challenge or be critical of government policies. Investigative and critical reporting is NOT what they can ever do (or to be fair, allowed to do).

Having said all of that, do take about 10 minutes to listen to this TEDx talk that discusses how entities, like governments and political parties, would do all that they can to astroturf opinion and understanding of issues. Don’t be lulled by catchphrases, innuendoes, carrots, meat etc.

And, yes, this post could perhaps be also playing that game.

Majulah Singapura!

He probably is indeed telling the truth! (info graphic updated on Aug 29)

It would appear that ESM Goh Chok Tong is indeed telling the truth that “checks and balances are a seductive lie”.

He says in that article that: “the check comes from the “integrity of the leadership in PAP.”

Let’s dissect the notion of checks and balances. I will draw reference to how the PAP-run town councils built-sold-then-leased-back the town council management system. This system was withdrawn from use by the Worker’s Party following their 2011 general election take over of the Aljunied GRC.The fact that a key piece of infrastructure needed to run the town council had to be replaced with something new, I would assert, contributed to the issues that the Aljunied-Hougang-Punggol-East Town Council faced.

The town council management software was paid for from public funds, not party funds. The public funds also included funds from contributions made to the town councils that were under the PAP then. So, just because there was a “change” in the MPs running the GRC/town council, to then deny them a key infrastructure goes against all commonsense and fairness.

And to make things even worse, the “Coordinating Chairman” of the PAP town councils made statements that were totally wrong. In my post in 2013, I addressed his comments and you can read it there.

Coming back to what ESM Goh said a couple of days ago about checks and balance being a seductive lie, he probably is telling the truth. The PAP, it would appear, has been lying all along and seduced us all.

Let me share this info graphic which was sent to me. I am not sure of the origin of it or what licence is it made available (assuming CC). It seems to be from a facebook page of Temasek Review.

From Temasek Review’s Facebook page. Assuming CC license.

Update: August 29, 2015. The infographic above is incorrect and I have updated it to reflect that there indeed was a tender to sell the system.

updated infographic to reflect that there was a tender called.
updated infographic to reflect that there was a tender called.

The need for a independent Electoral Commission

I am reading the Candidate Handbook for Parliamentary Election 2015 for the first time. I don’t have any of the earlier versions so I cannot tell what the changes are (yes, no edit history/change log; here’s a local copy: Candidate Handbook for Parliamentary Election 2015_1 in case the ELD.gov.sg site goes down).

According to Section 4.1 of the handbook:

Candidates should conduct election campaigning in a responsible and dignified manner that befits the seriousness of the election process. Candidates should steer away from negative campaigning practices based on hate and denigration of opposing candidates, and should not make false statements that allege corruption or commission of criminal offences, or statements that may cause racial or religious tensions or affect social cohesion. Egregious acts of negative campaigning could also be in breach of the law.

As noted by Viswa Sadasivan in his IQ post, this paragraph has many issues. Who would be the adjudicators of this? How does one raise an infraction?

We could crowd source to tally up of the various transgressions on an hourly/daily basis on a wiki or Google doc. This will help, if nothing else for posterity, but more so for transparency, regardless what is done with “the list”.

Further reading of the Candidate Handbook gives more nuggets:

On page 30 (Section 4.5.4):

iv. no form of public entertainment (such as singing, dancing or showing a film) shall be provided, and no live-streaming of any event (including the election meeting itself) shall be shown before, during and after the election meeting;

I wonder what the “live streaming”  is referred to here? I have to assume that it means that live streaming done by the candidate/party themselves is a no go. I cannot see how I, as a person in the audience at the rally, choosing to use Google Hangouts or Periscope to stream the rally is a no go. I have the right to do so.

These additional conditions are intriguing (page 30/31):

Other conditions that will be imposed are:

a. only persons named in the application for the permit and who are approved as speakers can speak at the election meeting;

b. members of the Central Executive Committee or an equivalent governing body of a political party as well as candidate(s) from the same political party who are nominated in accordance with the provisions of the Parliamentary Elections Act (Cap 218) for election as a Member of Parliament for an electoral division shall only be permitted to speak at election meetings held by their own political party. They may not speak at election meetings held by an Independent Candidate or another political party even if they are concurrently members (of any type) of that other political party. The reference to a political party includes political alliances registered as a political party. An Independent candidate can only speak at election meetings for which a permit has been issued to him/her or his/her election agent. He/She will not be allowed to speak at election meetings held by political parties or other Independent candidates contesting in the elections. However, where a member of the Central Executive Committee member or an equivalent governing body of a political party has been nominated in accordance with the provisions of the Parliamentary Elections Act for election as a Member of Parliament for an electoral division as a candidate for another political party or as part of a group of Independent candidates, he may be permitted to speak at all election meetings held by that other political party or at the election meeting held by that group of Independent candidates as the case may be;

emphasis added

Why would you DISALLOW a party or independent candidate from speaking at each other’s rally? While it would be strange for “opposing” candidates to speak at each other’s rally, stating it the way it is done smacks of being excessive and is curtailing one’s freedom to speak.  Granted that no one would want to or accept an invitation to speak at a PAP rally, but denying it explicitly, seems rather draconian.

Why did I name this post “the need for an independent electoral commission”? The fact that these “guidelines” did not have any public consultation – it might have been there but I cannot find any references to such. Because the Elections Department reports to the Prime Minister, I doubt that they have any form of independence or opportunity to do things better that could be negative for the PAP but good for Singapore.

More drama to unfold I am sure.

Five days to nomination.

And the games have begun

26 August 2015


Aztekium BOT: What is Emma disambiguation

Aztekium Bot
User: What is Emma disambiguation

''Emma'' is a 1932 American comedy-drama film released by Metro-Goldwyn-Mayer, and starring Marie Dressler and directed by Clarence Brown.

Emma may refer to:

''Emma'', エマ, Ema is a historical romance manga by Kaoru Mori. It was published by Enterbrain in the magazine '' Comic Beam'' and collected in 10 tankōbon volumes. The series has been adapted as an anime television series, entitled ''Emma - A Victorian Romance'', 英國戀物語エマ, Eikoku Koi Monogatari Emma. The manga is licensed in English in North America by CMX and the anime is licensed in English by Nozomi Entertainment.

''Emma'' is a 1996 period film based on the novel of the same name by Jane Austen. Directed by Douglas McGrath, the film stars Gwyneth Paltrow, Alan Cumming, Toni Collette, Ewan McGregor, and Jeremy Northam.

Jane Austen's ''Emma'' is an adaptation of the 1815 novel of the same name. It was adapted for the British television network ITV in 1996, directed by Diarmuid Lawrence and dramatised by Andrew Davies, the same year as Miramax's film adaptation of '' Emma'' starring Gwyneth Paltrow. This production of ''Emma'' stars Kate Beckinsale as the titular character, and also features Samantha Morton as Harriet Smith and Mark Strong as Mr. Knightley.

Jane Austen's novel '' Emma'' (1815) was released as a six-part TV serial by the BBC in 1972.

''Emma'' (or ''Emma: A Play in Two Acts about Emma Goldman, American Anarchist'', its full title) is a play by historian and playwright Howard Zinn (1922–2010). It was first performed in 1976.

"Emma", also known as "Emma, Emmaline" or "Emmeline", is a song by Errol Brown and Tony Wilson released as a single by Hot Chocolate in 1974. It reached number 3 in the UK Singles Chart and number 8 in the US Billboard Hot 100 chart. After being asked by producer Mickie Most to add "depth and darkness" to his compositions, Brown wrote the song about the death of his mother.

Emma (born Emma Louise Booth, 2 August 1974, Bridgend, Wales) is a Welsh singer, who sang the UK entry, " Give a Little Love Back to the World", in the Eurovision Song Contest 1990.

The Electron Machine with Many Applications (EMMA) is a project at Daresbury Laboratory in the UK to build a linear non-scaling FFAG to accelerate electrons from 10 to 20 MeV. A FFAG (Fixed Field Alternating Gradient) is a type of accelerator in which the magnetic field in the bending magnets is constant during acceleration. This means the particle beam will move radially outwards as its momentum increases.

''Emma'' is a 1955 novel by F. W. Kenyon published by Thomas Y. Crowell Company.

For U.S. founded Emma Magazine (unrelated to German EMMA), see .
''EMMA'' is a German feminist magazine. Its print edition is published quarterly.

''Emma'' is a four-part BBC television drama serial adaptation of Jane Austen's novel '' Emma'', first published in 1815. The episodes were written by Sandy Welch, acclaimed writer of previous BBC costume-dramas '' Jane Eyre'' and '' North & South'', and directed by Jim O'Hanlon. The serial stars Romola Garai as the titular heroine Emma Woodhouse, Jonny Lee Miller as her loyal lifelong friend Mr. Knightley and Michael Gambon as Emma's father, Mr. Woodhouse. The serial originally ran weekly on Sunday nights on BBC One from the 4 to 25 October 2009.

The ''Emma'' was a River Flat launched on 29 February 1828 along the Mersey and Irwell Navigation, in Manchester. Built by the New Quay Company, it was one of the largest cargo vessels to be built alongside the Irwell. The vessel capsized shortly after its launch, causing the deaths of as many as 47 of its estimated 200 passengers. Many others were rescued by bystanders, and treated by surgeons along the river banks. The ''Emma'' was eventually righted, and spent the rest of its life working along the River Weaver.

Emma is a given female name. It is derived from the Germanic word ''ermen'' meaning whole or universal, and was originally a short form of Germanic names that began with ermen. Emma is also used as a diminutive of Emily, Emmeline, Amelia or any other name beginning with "em". It was introduced to England by Emma of Normandy, who was the wife both of king Ethelred II (and by him the mother of Edward the Confessor) and later of King Canute. It was also borne by an 11th-century Austrian saint, who is sometimes called Hemma.

The Emma books are a series for children by Sally Warner. The main character and narrator is Emma McGraw, a new kid who moved in to California from Magdelana school. She has curly brown hair and wants to be a zoologist when she grows up. She is currently in third grade. She wishes that she would have normal, straight hair and not be divorced.

In Buddhist mythology, Yama ( Sanskrit: यम) is a dharmapala (wrathful god) said to judge the dead and preside over the Narakas ("Hells" or "Purgatories") and the cycle of rebirth.

Java Code Coverage Tools are distinguished in two main categories: first tools that add statements to the source code and require to recompile the source code. And second, tools which instrument the byte code either before or while running it. The goal is to find out which parts of code are tested by registering the lines of code executed when doing the test.

E.M.M.A were a Swedish girl group, mostly popular in Sweden. The group was founded by Keith Almgren who also wrote all the lyrics for their debut album. They have released three albums and eight singles. The group went on several small tours in Sweden. They came into existence in 2001 and officially broke up on 26 October 2005. The members were Elin Klingfors (born 25 December 1990), Martina Ståhl (born 1 December 1988), Mari-Linn Almgren Klevhamre (born 10 May 1992) and Alexandra Pettersson (born 22 February 1990).

Emma was a severe extratropical cyclone which passed through several mainly Central European countries, most devastatingly on Saturday March 1, 2008, killing at least twelve people in Austria, Germany, Poland and the Czech Republic. Wind speeds reached up to 166 km/h (103 mph) in Austria, and up to 180 km/h (112 mph) elsewhere. Major infrastructure disruptions and some injuries were also reported in Belgium, France, Switzerland, and the Netherlands.

The EMMA – Espoo Museum of Modern Art ( EMMA - Espoon modernin taiteen museo, EMMA - Esbo moderna konstmuseum), is a major art museum in Espoo in southern Finland. After the founding of Espoo Art Museum Foundation in September 2002, EMMA opened its doors for visitors in 2006. With its 5000 square metre exhibition space, it is the largest museum in the whole of Finland. The permanent exhibition presents a selection from The Saastamoinen Foundation Art Collection and the other half the changing domestic and international exhibitions.

Formation Autonomy Spacecraft with Thrust, Relnav, Attitude and Crosslink (or FASTRAC) is a pair of nanosatellites (respectively named ''Sara-Lily'' and ''Emma'') developed and built by students at The University of Texas at Austin. The project is part of a program sponsored by the Air Force Research Laboratory (AFRL), whose goal is to lead the development of affordable space technology. The FASTRAC mission will specifically investigate technologies that facilitate the operation of multiple satellites in formation. These enabling technologies include relative navigation, cross-link communications, attitude determination, and thrust. Due to the high cost of lifting mass into orbit, there is a strong initiative to miniaturize the overall weight of spacecraft. The utilization of formations of satellites, in place of large single satellites, reduces the risk of single point failure and allows for the use of low-cost hardware.

Tenille Dashwood In 2005, Dashwood made some appearances for the Australian wrestling promotion PWA under the ring name Valentine. However, from the age of 16 to 18, Dashwood was limited to merely setting up the ring at events and helping out after she suffered a severe shoulder injury. In 2007, she moved to Calgary, Alberta, Canada for a few months to train with Lance Storm at the Storm Wrestling Academy.

Emmanuela Marrone, also known as Emma or Emma Marrone (born May 25, 1984, in Florence, Italy) is an Italian pop/ rock singer.

Frequently Asked Questions for BOT:
Deklinacja wyrazu niewykładzinowość?
Deklinacja wyrazu niegrodziczeńskość?
Deklinacja wyrazu niepodtarnowskość?
Jaka jest najwyższa forma życia zwierzęcego?
Co powinien robić w domu prawdziwy mężczyzna?
Co to jest. Przed użyciem wisi. W czasie użycia stoi. A po użyciu kapie?
Gdzie urodził się Broca Paul Pierre?
Gdzie urodził się Metody?
Gdzie się urodził Hathaway Henry?
Słowo powypierałaś?
Słowo improwizowałaś?
Słowo wynędzałaś?
Deklinacja wyrazu Szałkiewicz?
Odmień przez przypadki wyraz półchłopi
Deklinacja wyrazu miniatorstwa?
in welchen filmen spielte Rob Boltin mit?
Paul Martin Smith in welchen filmen spielt sie mit?
in welcher filmen spielt Richard Hoggard?
what's the phase at STP of Strontium?
what's the phase at STP of Gold?
what's the phase at STP of Lanthanum?
Tradução em inglês apinhar?
dicionário português-inglês chuva?
Como você diz temperar em Inglês?
Odmień przez przypadki rzeczownik kabaliczności?
Odmień przez przypadki rzeczownik pełczyckości?
Odmień przez przypadki wyraz antropozofowie
V jakém filmu si zahrála Albina Dzhanabaeva?
Filmy ve kterých si zahrála Anna Kózka?
Filmy ve kterých si zahrála Anelia Nikolova?
Planetoida Koronis
Asteroida Lewis
Asteroida Melancholia
Co to jest Jelling ?
Jaką powierzchnię ma Jelling ?
Jaką liczbę ludności ma Jelling ?
kod pocztowy Jelling ?
Co to jest Myrosław Dumanski ?
Kiedy się urodził Myrosław Dumanski ?
Gdzie się urodził Myrosław Dumanski ?
Kiedy zmarł Myrosław Dumanski ?
Gdzie zmarł Myrosław Dumanski ?
Co to jest Kongres (Meksyk) ?

What is Eugenics ?
What is United States House of Representatives elections in Arizona, 2008 ?
What is Opostega chalcoplethes ?

что это такое Савин, Евгений Леонидович ?
Какое имя имеет Савин, Евгений Леонидович ?
Какую ширину имеет Савин, Евгений Леонидович ?
Какая дата Савин, Евгений Леонидович ?
Где родился Савин, Евгений Леонидович ?
что это такое Японская оккупационная бирманская рупия ?
Какую ширину имеет Японская оккупационная бирманская рупия ?
Какую ширину изображения имеет Японская оккупационная бирманская рупия ?
что это такое Самойлов, Михаил Васильевич ?
Какое имя имеет Самойлов, Михаил Васильевич ?
Какая дата Самойлов, Михаил Васильевич ?
Где родился Самойлов, Михаил Васильевич ?
Где умер Самойлов, Михаил Васильевич ?

¿que es Condado de Torrepalma ?
¿que es Heartbreak Ridge ?
¿Cuanto dura el/la Heartbreak Ridge ?
¿que es Zenón Rolón ?

All functions list
Bot internetowy. Smart chat bot, Intelligence Bot Intelligence Robot Bot potrafi rozmawiać z ludźmi. Robot internetowy. Sztuczna inteligencja. Inteligentne programy do rozmowy z człowiekiem Inteligentny program, który potrafi rozmawiać z człowiekiem Program z którym możesz porozmawiać Sztuczna inteligencja. Inteligentny Bot. Bot z którym możesz gadać jak z człowiekiem. Bot z którym możesz rozmawiać jak z człowiekiem Program z którym można pogadać to Azbot Program z którym da się rozmawiać Program który umie rozmawiać z człowiekiem Program który potrafi rozmawiać z człowiekiem Program co rozmawia z człowiekiem Program rozmawiający z człowiekiem. Program do rozmowy z człowiekiem Program do rozmowy z ludźmi Internet BOT"Intelligent Internet bot" Bot who speaking with people AI BOT, SI Bot Bot Aztekium speaking with people Bot who speaking foreign languages Bot speaking with men. Bot speaking with man "intelligent internet bot" Ask Bot" You can speak with bot Can you speak with bot aztekium talking to bot, online Czat chat z botem czat z botem czatuj z botem chatuj z botem Pytanko zapytanko zapytaj pytanie asking question Zapytaj Bota. Ask bot, Talking widh web bot.


There Is Such A Thing As A Declarative Language, and It’s The World’s Best DSL

July 22, 2013

In a recent post I asked whether there is any such thing as a declarative language. The main point was to argue that the standard “definitions” are, at best, not very precise, and to see whether anyone might offer a better definition. What I’m after is an explanation of why people seem to think that the phrase has meaning, even though they can’t say very clearly what they mean by it.  (One commenter analogized with “love” and “happiness”, but I would counter by saying that we’re trying to do science here, and we ought to be able to define our terms with some precision.)

As I mentioned, perhaps the best “definition” that is usually offered is to say that “declarative” is synonymous with “functional-and-logic-programming”.  This is pretty unsatisfactory, since it is not so easy to define these terms either, and because, contrary to conventional classifications, the two concepts have pretty much nothing in common with each other (but for one thing to be mentioned shortly). The propositions-as-types principle helps set them clearly apart: whereas functional programming is about executing proofs, logic programming is about the search for proofs. Functional programming is based on the dynamics of proof given by Gentzen’s inversion principle. Logic programming is based on the dynamics of provability given by cut elimination and focusing.  The two concepts of computation could not be further apart.

Yet they do have one thing in common that is usefully isolated as fundamental to what we mean by “declarative”, namely the concept of a variable.  Introduced by the ancient Hindu and Muslim mathematicians, Brahmagupta and al Kwharizmi, the variable is one of the most remarkable achievements of the human intellect.  In my previous post I had secretly hoped that someone would propose variables as being central to what we mean by “declarative”, but no one did, at least not in the comments section.  My unstated motive for writing that post was not so much to argue that the term “declarative” is empty, but to test the hypothesis that few seem to have grasp the importance of  this concept for designing a civilized, and broadly applicable, programming language.

My contention is that variables, properly so-called, are what distinguish “declarative” languages from “imperative” languages. Although the imperative languages, including all popular object-oriented languages, are based on a concept that is called a variable, they lack anything that actually is a variable.   And this is where the trouble begins, and the need for the problematic distinction arises.  The declarative concept of a variable is the mathematical concept of an unknown that is given meaning by substitution. The imperative concept of a variable, arising from low-level machine models, is instead given meaning by assignment (mutation), and, by a kind of a notational pun, allowed to appear in expressions in a way that resembles that of a proper variable.  But the concepts are so fundamentally different, that I argue in PFPL that the imperative concept be called an “assignable”, which is more descriptive, rather than “variable”, whose privileged status should be emphasized, not obscured.

The problem with purely imperative programming languages is that they have only the concept of an assignable, and attempt to make it serve also as a concept of variable. The results are a miserable mess of semantic and practical complications. Decades of work has gone into rescuing us from the colossal mistake of identifying variables with assignables. And what is the outcome? If you want to reason about assignables, what you do is (a) write a mathematical formulation of your algorithm (using variables, of course) and (b) show that the imperative code simulates the functional behavior so specified.   Under this methodology the mathematical formulation is taken as self-evidently correct, the standard against which the imperative program is judged, and is not itself in need of further verification, whereas the imperative formulation is, invariably, in need of verification.

What an odd state of affairs!  The functional “specification” is itself a perfectly good, and apparently self-evidently correct, program.  So why not just write the functional (i.e., mathematical) formulation, and call it a day?  Why indeed!  Declarative languages, being grounded in the language of mathematics, allow for the identification of the “desired behavior” with the “executable code”.  Indeed, the propositions-as-types principle elevates this identification to a fundamental organizing principle: propositions are types, and proofs are programs.  Who needs verification?  Once you have a mathematical specification of the behavior of a queue, say, you already have a running program; there is no need to relegate it to a stepping stone towards writing an awkward, and invariably intricate, imperative formulation that then requires verification to ensure that it works properly.

Functional programming languages are written in the universally applicable language of mathematics as expressed by the theory of types.  Such languages are therefore an integral part of science itself, inseparable from our efforts to understand and master the workings of the world.  Imperative programming has no role to play in this effort, and is, in my view, doomed in the long run to obsolescence, an artifact of engineering, rather than a fundamental discovery on a par with those of mathematics and science.

This brings me to my main point, the popular concept of a domain-specific language. Very much in vogue, DSL’s are offered as the solution to many of our programming woes. And yet, to borrow a phrase from my colleague Guy Blelloch, the elephant in the room is the question “what is a domain?”. I’ve yet to hear anyone explain how you decide what are the boundaries of a “domain-specific” language. Isn’t the “domain” mathematics and science itself? And does it not follow that the right language must be the language of mathematics and science? How can one rule out anything as being irrelevant to a “domain”?  I think it is impossible, or at any rate inadvisable, to make such restrictions a priori.  Indeed, full-spectrum functional languages are already the world’s best DSL’s, precisely because they are (or come closest to being) the very language of science, the ultimate “domain”.

What, If Anything, Is A Declarative Language?

July 18, 2013

Back in the 1980’s it was very fashionable to talk about “declarative” programming languages.  But to my mind there was never a clear definition of a “declarative language”, and hence no way to tell what is declarative and what is not.  Lacking any clear meaning, the term came to refer to the arbitrary conflation of functional with logic programming to such an extent that “functional-and-logic-programming” almost became a Germanic thing-in-itself (ding an sich).  Later, as the logic programming wave subsided, the term “declarative”,  like “object-oriented”, came to be an expression of approval, and then, mercifully, died out.

Or so I had thought.  Earlier this week I attended a thriller of an NSF-sponsored workshop on high-level programming models for parallelism, where I was surprised by the declarative zombie once again coming to eat our brains.  This got me to thinking, again, about whether the term has any useful meaning.  For what it’s worth, and perhaps to generate useful debate, here’re some things that I think people mean, and why I don’t think they mean very much.

  1. “Declarative” means “high-level”.  This just seems to replace one vague term by another.
  2. “Declarative” means “not imperative”.  But this flies in the face of reality.  Functional languages embrace and encompass imperative programming as a special case, and even Prolog has imperative features, such as assert and retract, that have imperative meaning.
  3. “Declarative” means “functional”.  OK, but then we don’t really need another word.
  4. “Declarative” means “what, not how”.  But every language has an operational semantics that defines how to execute its programs, and you must be aware of that semantics to understand programs written in it.  Haskell has a definite evaluation order, just as much as ML has a different one, and even Prolog execution is defined by a clear operational semantics that determines the clause order and that can be influenced by “cut”.
  5. “Declarative” means “equational”.  This does not distinguish anything, because there is a well-defined notion of equivalence for any programming language, namely observational equivalence.  Different languages induce different equivalences, of course, but how does one say that one equivalence is “better” than another?  At any rate, I know of no stress on equational properties of logic programs, so either logic programs are not “declarative” or “equational reasoning” is not their defining characteristic.
  6. “Declarative” means “referentially transparent”.  The misappropriation of Quine’s terminology only confuses matters.  All I’ve been able to make of this is that “referentially transparent” means that beta-equivalence is valid.  But beta equivalence is not a property of an arbitrary programming language, nor in any case is it clear why this equivalence is first among equals.  In any case why you would decide a priori on what equivalences you want before you even know what it means to run a program?
  7. “Declarative” means “has a denotation”.  This gets closer to the point, I think, because we might well say that a declarative semantics is one that gives meaning to programs as some kind of mapping between some sort of spaces.  In other words, it would be a synonym for “denotational semantics”.  But every language has a denotational semantics (perhaps by interpretation into a Kripke structure to impose sequencing), so having one does not seem to distinguish a useful class of languages.  Moreover, even in the case of purely functional programs, the usual denotational semantics (as continuous maps) is not fully abstract, and the fully abstract semantics (as games) is highly operational.  Perhaps a language is declarative in proportion to being able to give it semantics in some “familiar” mathematical setting?
  8. “Declarative” means “implicitly parallelizable“.  This was certainly the sense intended at the NSF meeting, but no two “declarative” languages seemed to have much in common.  Charlie Garrod proposes just “implicit”, which is pretty much synonymous with “high level”, and may be the most precise sense there is to the term.

No doubt this list is not exhaustive, but I think it covers many of the most common interpretations.  It seems to me that none of them have a clear meaning or distinguish a well-defined class of languages.  Which leads me to ask, is there any such thing as a declarative programming language?

[Thanks to the late Steve Gould for inspiring the title of this post.]

[Update: wordsmithing.]

[Update: add a remark about semantics, add another candidate meaning.]

[Update: added link to previous post.]

Constructive Mathematics Is Not Metamathematics

July 10, 2013

The publication of the Homotopy Type Theory book has renewed interest in type theory as a foundation for mathematics, and spurred computer scientists to investigate the computational meaning of higher-dimensional types. As I mentioned in a previous post, what makes HoTT work so well for homotopy theory is that it is constructive, which means, at the very least, that it does not postulate that all types are decidable. By Hedberg’s Theorem any type with decidable equality is a set (homotopy 0-type), so a blanket adoption of the classical law of the excluded middle would immediately rule out any higher-dimensional structure.

To my way of thinking, the denial of the universal validity of the excluded middle is not the defining feature of constructivity, but rather a characteristic feature of constructivity—it is the smoke, not the locomotive. But what, then, is the deeper meaning of constructivity that gives rise to the denial of many classical patterns of reasoning, such as proof by contradiction or reasoning by cases on whether a proposition is true or not? Although the full story is not yet completely clear, a necessary condition is that a constructive theory be proof relevant, meaning that proofs are mathematical objects like any other, and that they play a role in the development of constructive mathematics unlike their role in classical mathematics.

The most obvious manifestation of proof relevance is the defining characteristic of HoTT, that proofs of equality correspond to paths in a space. Paths may be thought of as evidence for the equality of their endpoints. That this is a good notion of equality follows from the homotopy invariance of the constructs of type theory: everything in sight respects paths (that is, respect the groupoid structure of types). More generally, theorems in HoTT tend to characterize the space of proofs of a proposition, rather than simply state that the corresponding type is inhabited. For example, the univalence axiom itself states an equivalence between proofs of equivalence of types in a universe and equivalences between these types. This sort of reasoning may take some getting used to, but its beauty is, to my way of thinking, undeniable. Classical modes of thought may be recovered by explicitly obliterating the structure of proofs using truncation. Sometimes this is the best or only available way to state a theorem, but usually one tends to say more than just that a type is inhabited, or that two types are mutually inhabited. In this respect the constructive viewpoint enriches, rather than diminishes, classical mathematics, a point that even the greatest mathematician of the 20th century, David Hilbert, seems to have missed.

The concept of proof relevance in HoTT seems to have revived a very common misunderstanding about the nature of proofs. Many people have been trained to think that a proof is a derivation in an axiomatic theory, such as set theory, a viewpoint often promoted in textbooks and bolstered by the argument that an informal proof can always be written out in full in this form, even if we don’t do that as a matter of course. It is a short step from there to the conclusion that proofs are therefore mathematical objects, even in classical set theory, because we can treat the derivations as elements of an inductively defined set (famously, the set of natural numbers, but more realistically using more natural representations of abstract syntax such as the s-expression formalism introduced by McCarthy in 1960 for exactly this purpose). From this point of view many people are left confused about the stress on “proofs as mathematical objects” as a defining characteristic of HoTT, and wonder what could be original about that.

The key to recognize that a proof is not a formal proof. To avoid further confusion, I hasten to add that by “formal” I do not mean “rigorous”, but rather “represented in a formal system” such as the axiomatic theory of sets. A formal proof is an element of a computably enumerable set generated by the axioms and rules of the formal theory. A proof is an argument that demonstrates the truth of a proposition. While formal proofs are always proofs (at least, under the assumption of consistency of the underlying formal theory), a proof need not be, or even have a representation as, a formal proof. The principal example of this distinction is Goedel’s Theorem, which proves that the computably enumerable set of formal provable propositions in axiomatic arithmetic is not decidable. The key step is to devise a self-referential proposition that (a) is not formally provable, but (b) has a proof that shows that it is true. The crux of the argument is that once you fix the rules of proof, you automatically miss out true things that are not provable in that fixed system.

Now comes the confusing part. HoTT is defined as a formal system, so why doesn’t the same argument apply? It does, pretty much verbatim! But this has no bearing on “proof relevance” in HoTT, because the proofs that are relevant are not the formal proofs (derivations) defining HoTT as a formal system. Rather proofs are formulated internally as objects of the type theory, and there is no commitment a priori to being the only forms of proof there are. Thus, for example, we may easily see that there are only countably many functions definable in HoTT from the outside (because it is defined by a formal system), but within the theory any function space on an infinite type has uncountably many elements. There is no contradiction, because the proofs of implications, being internal functions, are not identified with codes of formal derivations, and hence are not denumerable.

There is a close analogy, previously noted in this blog, with Church’s Law. Accepting Church’s Law internally amounts to fixing the programming language used to define functions in advance, permitting us to show, for example, that certain programs are not expressible in that language. But HoTT does not commit to Church’s Law, so such arguments amount to showing that, for example, there is no Turing machine to decide halting for Turing machines, but allowing that there could be constructive functions (say, equipped with oracles) that make such decisions.

The theory of formal proofs, often called proof theory, was dubbed metamathematics by Kleene. Until the development of type theory the study of proofs was confined to metamathematics. But now in the brave new world of constructive mathematics as embodied in HoTT, proofs (not just formal proofs) have pride of place in mathematics, and provide opportunities for expressing concepts clearly and cleanly that were hitherto obscured or even hidden from our view.

Update: Corrected silly wording mistake.

What’s the big deal with HoTT?

June 22, 2013

Now that the Homotopy Type Theory book is out, a lot of people are asking “What’s the big deal?”.  The full answer lies within the book itself (or, at any rate, the fullest answer to date), but I am sure that many of us who were involved in its creation will be fielding this question in our own ways to help explain why we are so excited by it.  In fact what I think is really fascinating about HoTT is precisely that there are so many different ways to think about it, according to one’s interests and backgrounds.  For example, one might say it’s a nice way to phrase arguments in homotopy theory that avoids some of the technicalities in the classical proofs by treating spaces and paths synthetically, rather than analytically.  Or one might say that it’s a good language for mechanization of mathematics that provides for the concise formulation of proofs in a form that can be verified by a computer.  Or one might say that it points the way towards a vast extension of the concept of computation that enables us to compute with abstract geometric objects such as spheres or toruses.  Or one might say that it’s a new foundation for mathematics that subsumes set theory by generalizing types from mere sets to arbitrary infinity groupoids,  sets being but particularly simple types (those with no non-trivial higher-dimensional structure).

But what is it about HoTT that makes all these interpretations and applications possible?  What is the key idea that separates HoTT from other approaches that seek to achieve similar ends?  What makes HoTT so special?

In a word the answer is constructivity.  The distinctive feature of HoTT is that it is based on Per Martin-Löf’s Intuitionistic Theory of Types, which was formulated as a foundation for intuitionistic mathematics as originally put forth by Brouwer in the 1930’s, and further developed by Bishop, Gentzen, Heyting, Kolmogorov, Kleene, Lawvere, and Scott, among many others.  Briefly put, the idea of type theory is to codify and systematize the concept of a mathematical construction by characterizing the abstract properties, rather than the concrete realizations, of the objects used in everyday mathematics.  Brouwer’s key insight, which lies at the heart of HoTT, is that proofs are a form of construction no different in kind or character from numbers, geometric figures, spaces, mappings, groups, algebras, or any other mathematical structure.  Brouwer’s dictum, which distinguished his approach from competing alternatives, is that logic is a part of mathematics, rather than mathematics is an application of logic.  Because for him the concept of a construction, including the concept of a proof, is prior to any other form of mathematical activity, including the study of proofs themselves (i.e., logic).

So under Martin-Löf’s influence HoTT starts with the notion of type as a classification of the notion of construction, and builds upwards from that foundation.  Unlike competing approaches to foundations, proofs are mathematical objects that play a central role in the theory.  This conception is central to the homotopy-theoretic interpretation of type theory, which enriches types to encompass spaces with higher-dimensional structure.  Specifically, the type \textsf{Id}_A(M,N) is the type of identifications of M and N within the space A.  Identifications may be thought of as proofs that M and N are equal as elements of $A$, or, equivalently, as paths in the space A between points M and N.  The fundamental principles of abstraction at the heart of type theory ensure that all constructs of the theory respect these identifications, so that we may treat them as proofs of equality of two elements.  There are three main sources of identifications in HoTT:

  1. Reflexivity, stating that everything is equal to itself.
  2. Higher inductive types, defining a type by giving its points, paths, paths between paths, and so on to any dimension.
  3. Univalence, which states that an equivalence between types determines a path between them.

I will not attempt here to explain each of these in any detail; everything you need to know is in the HoTT book.  But I will say a few things about their consequences, just to give a flavor of what these new principles give us.

Perhaps the most important conceptual point is that mathematics in HoTT emphasizes the structure of proofs rather than their mere existence.  Rather than settle for a mere logical equivalence between two types (mappings back and forth stating that each implies the other), one instead tends to examine the entire space of proofs of a proposition and how it relates to others.  For example, the univalence axiom itself does not merely state that every equivalence between types gives rise to a path between them, but rather that there is an equivalence between the type of equivalences between two types and the type of paths between them.  Familiar patterns such as “A iff B” tend to become “A\simeq B“, stating that the proofs of A and the proofs of B are equivalent.  Of course one may choose neglect this additional information, stating only weaker forms of it using, say, truncation to suppress higher-dimensional information in a type, but the tendency is to embrace the structure and characterize the space of proofs as fully as possible.

A close second in importance is the axiomatic freedom afforded by constructive foundations.  This point has been made many times by many authors in many different settings, but has particular bite in HoTT.   The theory does not commit to (nor does it refute) the infamous Law of the Excluded Middle for arbitrary types: the type A+(A\to \textbf{0}) need not always be inhabited.  This property of HoTT is absolutely essential to its expressive power.  Not only does it admit a wider range of interpretations than are possible with the Law included, but it also allows for the selective imposition of the Law where it is needed to recover a classical argument, or where it is important to distinguish the implications of decidability in a given situation.  (Here again I defer to the book itself for full details.)  Similar considerations arise in connection with the many forms of Choice that can be expressed in HoTT, some of which are outright provable, others of which are independent as they are in axiomatic set theory.

Thus, what makes HoTT so special is that it is a constructive theory of mathematics.  Historically, this has meant that it has a computational interpretation, expressed most vividly by the propositions as types principle.  And yet, for all of its promise, what HoTT currently lacks is a computational interpretation!  What, exactly, does it mean to compute with higher-dimensional objects?  At the moment it is difficult to say for sure, though there seem to be clear intuitions in at least some cases of how to “implement” such a rich type theory.  Alternatively, one may ask whether the term “constructive”, when construed in such a general setting, must inevitably involve a notion of computation.  While it seems obvious on computational grounds that the Law of the Excluded Middle should not be considered universally valid, it becomes less clear why it is so important to omit this Law (and, essentially, no other) in order to obtain the richness of HoTT when no computational interpretation is extant.  From my point of view understanding the computational meaning of higher-dimensional type theory is of paramount importance, because, for me, type theory is and always has been a theory of computation on which the entire edifice of mathematics ought to be built.

The Homotopy Type Theory Book is out!

June 20, 2013

By now many of you have heard of the development of Homotopy Type Theory (HoTT), an extension of intuitionistic type theory that provides a natural foundation for doing synthetic homotopy theory.  Last year the Institute for Advanced Study at Princeton sponsored a program on the Univalent Foundations of Mathematics, which was concerned with developing these ideas.  One important outcome of the year-long program is a full-scale book presenting the main ideas of Homotopy Type Theory itself and showing how to apply them to various branches of mathematics, including homotopy theory, category theory, set theory, and constructive analysis.  The book is the product of a joint effort by dozens of participants in the program, and is intended to document the state of the art as it is known today, and to encourage its further development by the participation of others interested in the topic (i.e., you!).  Among the many directions in which one may take these ideas, the most important (to me) is to develop a constructive (computational) interpretation of HoTT.  Some partial results in this direction have already been obtained, including fascinating work by Thierry Coquand on developing a constructive version of Kan complexes in ITT, by Mike Shulman on proving homotopy canonicity for the natural numbers in a two-dimensional version of HoTT, and by Dan Licata and me on a weak definitional canonicity theorem for a similar two-dimensional theory.  Much work remains to be done to arrive at a fully satisfactory constructive interpretation, which is essential for application of these ideas to computer science.  Meanwhile, though, great progress has been made on using HoTT to formulate and formalize significant pieces of mathematics in a new, and strikingly beautiful, style, that are well-documented in the book.

The book is freely available on the web in various formats, including a PDF version with active references, an ebook version suitable for your reading device, and may be purchased in hard- or soft-cover from Lulu.  The book itself is open source, and is available at the Hott Book Git Hub.  The book is under the Creative Commons  CC BY-SA license, and will be freely available in perpetuity.

Readers may also be interested in the posts on Homotopy Type Theory, the n-Category Cafe, and Mathematics and Computation which describe more about the book and the process of its creation.

More Is Not Always Better

January 28, 2013

In a previous post I discussed the status of Church’s Law in type theory, showing that it fails to hold internally to extensional type theory, even though one may see externally that the definable numeric functions in ETT are λ-definable, and hence Turing computable.  The distinction between internal and external is quite important in logic, mainly because a logical formalism may be unable to express precisely an externally meaningful concept.  The classical example is the Löwenheim-Skolem Theorem of first-order logic, which says that any theory with an infinite model has a countable model.  In particular the theory of sets has a countable model, which would seem to imply that the set of real numbers, for example, is countable.  But internally one can prove that the reals are uncountable (Cantor’s proof is readily expressed in the theory), which seems to be a paradox of some kind.  But no, all it says is that the function witnessing the countability of the term model cannot be expressed internally, and hence there is no contradiction at all.

A similar situation obtains with Church’s Law.  One may observe empirically, so to say, that Church’s Law holds externally of ETT, but this fact cannot be internalized.  There is a function given by Church’s Law that “decompiles” any (extensional) function of type N→N by providing the index for a Turing machine that computes it.  But this function cannot be definable internally to extensional type theory, because it may be used to obtain a decision procedure for halting of Turing machines, which is internally refutable by formalizing the standard undecidability proof.  In both of these examples it is the undefinability of a function that is important to the expressive power of a formalism, contrary to naïve analyses that would suggest that, when it comes to definability of functions, the more the merrier.  This is a general phenomenon in type theory.  The power of type theory arises from its strictures, not its affordances, in direct opposition to the ever-popular language design principle “first-class x” for all imaginable values of x.

Another perspective on the same issue is provided by Martin-Löf’s meaning explanation of type theory, which is closely related to the theory of realizability for constructive logic.  The high-level idea is that a justification for type theory may be obtained by starting with an untyped concept of computability (i.e., a programming language given by an operational semantics for closed terms), and then giving the meaning of the judgments of type theory in terms of such computations.  So, for example, the judgment A type, where A is a closed expression means that A evaluates to a canonical type, where the canonical types include, say, Nat, and all terms of the form A’→A”, where A’ and A” are types.  Similarly, if A is a type, the judgment a:A means that A evaluates to a canonical type A’ and that a evaluates to a canonical term a’ such that a’ is a canonical element of A’, where, say, any numeral for a natural number is a canonical member of Nat.  To give the canonical members of the function type A’→A” requires the further notion of equality of elements of a type, a=b:A, which all functions are required to respect.  A meaning explanation of this sort was suggested by Martin-Löf in his landmark paper Constructive Mathematics and Computer Programming, and is used as the basis for the NuPRL type theory, which extends that account in a number of interesting directions, including inductive and coinductive types, subset and quotient types, and partial types.

The relation to realizability emerges from applying the meaning explanation of types to the semantics of propositions given by the propositions-as-types principle (which, as I’ve previously argued, should not be called “the Curry-Howard isomorphism”).  According to this view a proposition P is identified with a type, the type of its proofs, and we say that P true iff evaluates to a canonical proposition that has a canonical member.  In particular, for implication we say that P→Q true if and only if P true implies Q true (and, in addition, the proof respects equality, a condition that I will suppress here for the sake of simplicity).  More explicitly, the implication is true exactly when the truth of the antecedent implies the truth of the consequent, which is to say that there is a constructive transformation of proofs of P into proofs of Q.

In recursive realizability one accepts Church’s Law and demands that the constructive transformation be given by the index of a Turing machine (i.e., by a program written in a fixed programming language).  This means, in particular, that if P expresses, say, the decidability of the halting problem, for which there is no recursive realizer, then the implication P→Q is vacuously true!  By taking Q to be falsehood, we obtain a realizer for the statement that the halting problem is undecidable.  More generally, any statement that is not realized is automatically false  in the recursive realizability interpretation, precisely because the realizers are identified with Turing machine indices.  Pressing a bit further, there are statements, such as the statement that every Turing machine either halts or diverges on its own input, that are true in classical logic, yet have no recursive realizer, and hence are false in the realizability interpretation.

In contrast in the meaning explanation for NuPRL Church’s Law is not assumed.  Although one may show that there is no Turing machine to decide halting for Turing machines, it is impossible to show that there is no constructive transformation that may do so.  For example, an oracle machine would be able to make the required decision.  This is entirely compatible with intuitionistic principles, because although intuitionism does not affirm LEM, neither does it deny it.  This point is often missed in some accounts, leading to endless confusions.  Intuitionistic logic, properly conceived, is compatible with classical logic in that classical logic may be seen as an idealization of intuitionistic logic in which we heuristically postulate that all propositions are decidable (all instances of LEM hold).

The crucial point distinguishing the meaning explanation from recursive realizability is precisely the refusal to accept Church’s Law, a kind of comprehension principle for functions as discussed earlier.  This refusal is often called computational open-endedness because it amounts to avoiding a commitment to the blasphemy of limiting God’s programming language to Turing machines (using an apt metaphor of Andrej Bauer’s).  Rather, we piously accept that richer notions of computation are possible, and avoid commitment to a “final theory” of computation in which Church’s Law is postulated outright.  By avoiding the witnessing function provided by Church’s Law we gain expressive power, rather than losing it, resulting in an elegant theory of constructive mathematics that enriches, rather than diminishes, classical mathematics.    In short, contrary to “common sense” (i.e., uninformed supposition), more is not always better.

Update: corrected minor technical error and some typographical errors.

Update: clarified point about incompatibility of recursive realizability with classical logic.

Exceptions are shared secrets

December 3, 2012

It’s quite obvious to me that the treatment of exceptions in Haskell is wrong. Setting aside the example I gave before of an outright unsoundness, exceptions in Haskell are nevertheless done improperly, even if they happen to be sound. One reason is that the current formulation is not stable under seemingly mild extensions to Haskell that one might well want to consider, notably any form of parameterized module or any form of shadowing of exception declarations. For me this is enough to declare the whole thing wrong, but as it happens Haskell is too feeble to allow full counterexamples to be formulated, so one may still claim that what is there now is ok … for now.

But I wish to argue that Haskell exceptions are nevertheless poorly designed, because it misses the crucial point that exception values are shared secrets. Let us distinguish two parties, the raiser of the exception, and the handler of it. The fundamental idea of exceptions is to transfer a value from the raiser to the handler without the possibility of interception by another party. While the language of secrecy seems appropriately evocative, I hasten to add that I am not here concerned with “attackers” or suchlike, but merely with the difficulties of ensuring modular composition of programs from components. In such a setting the “attacker” is yourself, who is not malicious, but who is fallible.

By raising an exception the raiser is “contacting” a handler with a message. The raiser wishes to limit which components of a program may intercept that message. More precisely, the raiser wishes to ensure that only certain previously agreed-upon components may handle that exception, perhaps only one. This property should remain stable under extension to the program or composition with any other component. It should not be possible for an innocent third party to accidentally intercept a message that was not intended for it.

Achieving this requires a secrecy mechanism that allows the raiser and the handler(s) to agree upon their cooperation. This is accomplished by dynamic classification, exactly as it is done properly in Standard ML (but not O’Caml). The idea is that the raiser has access to a dynamically generated constructor for exception values, and any handler has access to the corresponding dynamically generated matcher for exception values. This means that the handler, and only the handler, can decode the message sent by the raiser; no other party can do anything with it other than pass it along unexamined. It is “perfectly encrypted” and cannot be deciphered by any unintended component.

The usual exception mechanisms, as distinct from exception values, allow for “wild-card handlers”, which means that an exception can be intercepted by a third party. This means that the raiser cannot ensure that the handler actually receives the message, but it can ensure, using dynamic classification, that only a legitimate handler may decipher it. Decades of experience with Standard ML shows that this is a very useful thing indeed, and has application far beyond just the simple example considered here. For full details, see my forthcoming book, for a full discussion of dynamic classification and its role for ensuring integrity and confidentiality in a program. Dynamic classification is not just for “security”, but is rather a good tool for everyday programming.

So why does Haskell not do it this way? Well, I’m not the one to answer that question, but my guess is that doing so conflicts with the monadic separation of effects. To do exceptions properly requires dynamic allocation, and this would force code that is otherwise functional into the IO monad. Alternatively, one would have to use unsafePerformIO—as in ezyang’s implementation—to “hide” the effects of exception allocation. But this would then be further evidence that the strict monadic separation of effects is untenable.

Update: Reworked last paragraph to clarify the point I am making; the previous formulation appears to have invited misinterpretation.

Update: This account of exceptions also makes clear why the perennial suggestion to put exception-raising information into types makes no sense to me. I will write more about this in a future post, but meanwhile contemplate that a computation may raise an exception that is not even in principle nameable in the type. That is, it is not conservativity that’s at issue, it’s the very idea.

Get every new post delivered to your Inbox.

Join 1,294 other followers