Quantcast
Channel: Hacker News
Viewing all 25817 articles
Browse latest View live

Coinbase (YC S12) is hiring senior engineers and designers

$
0
0
Coinbase (YC S12) is hiring senior engineers and designers
48 minutes ago | hide
Coinbase (YC S12) is hiring senior engineers and designers. We're looking for people especially excited about payment systems/microservices, ethereum smart contracts/tokens and cryptocurrency infrastructure (e.g. our hot/cold storage, private key infrastructure for both bitcoin and ethereum), machine learning and security.

https://www.coinbase.com/careers

Tech stack: • Ruby • Rails • Node.js • React.js • PostgreSQL • MongoDB • CoreOS • Docker • Kinesis • ELK • AWS


Applications are open for YC Winter 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Super-Accurate GPS Chips Coming to Smartphones in 2018

$
0
0

We’ve all been there. You’re driving down the highway, just as Google Maps instructed, when Siri tells you to “Proceed east for one-half mile, then merge onto the highway.” But you’re already on the highway. After a moment of confusion and perhaps some rude words about Siri and her extended AI family, you realize the problem: Your GPS isn’t accurate enough for your navigation app to tell if you’re on the highway or on the road beside it.

Those days are nearly at an end. At the ION GNSS+ conference in Portland, Ore., today Broadcom announced that it is sampling the first mass-market chip that can take advantage of a new breed of global navigation satellite signals and will give the next generation of smartphones 30-centimeter accuracy instead of today’s 5-meters. Even better, the chip works in a city’s concrete canyons, and it consumes half the power of today’s generation of chips. The chip, the BCM47755, has been included in the design of some smartphones slated for release in 2018, but Broadcom would not reveal which.

GPS and other global navigation satellite services (GNSSs) such as Europe’s Galileo, Japan’s QZSS, and Russia’s Glonass allow a receiver to determine its position by calculating its distance from three or more satellites. All GNSS satellites—even the oldest generation still in use—broadcast a message called the L1 signal that includes the satellite’s location, the time, and an identifying signature pattern. A newer generation broadcasts a more complex signal called L5 at a different frequency in addition to the legacy L1 signal. The receiver essentially uses these signals to fix its distance from each satellite based on how long it took the signal to go from satellite to receiver.

Broadcom’s receiver first locks on to the satellite with the L1 signal and then refines its calculated position with L5. The latter is superior, especially in cities, because it is much less prone to distortions from multipath reflections than L1.

In a city, the satellite’s signals reach the receiver both directly and by bouncing off of one or more buildings. The direct signal and any reflections arrive at slightly different times and if they overlap, they add up to form a sort of signal blob. The receiver is looking for the peak of that blob to fix the time of arrival. But the messier the blob, the less accurate that fix, and the less accurate the final calculated position will be.

However, L5 signals are so brief that the reflections are unlikely to overlap with the direct signal. The receiver chip can simply ignore any signal after the first one it receives, which is the direct path. The Broadcom chip also uses information in the phase of the carrier signal to further improve accuracy.

Though there are advanced systems that use L5 on the market now, these are generally for industrial purposes, such as oil and gas exploration. Broadcom’s BCM47755 is the first mass-market chip that uses both L1 and L5.

Why is this only happening now? “Up to now there haven’t been enough L5 satellites in orbit,” says Manuel del Castillo, associate director of GNSS product marketing at Broadcom. At this point, there are about 30 such satellites in orbit, counting a set that only flies over Japan and Australia. Even in a city’s “narrow window of sky you can see six or seven, which is pretty good. So now is the right moment to launch.”

Broadcom had to get the improved accuracy to work within a smartphone’s limited power budget. Fundamentally, that came down to three things: moving to a more power-efficient 28-nanometer chip manufacturing process, adopting a new radio architecture (which Broadcom would not disclose details of), and designing a power-saving dual-core sensor hub. In total, they add up to a 50 percent power savings over Broadcom’s previous, less accurate chip. 

In smartphones, sensor hubs take the raw data from the system’s sensors and process it to provide only the information the phone’s applications processor needs, thereby taking the computational burden and its accompanying power draw off of the applications processor. For instance, a sensor hub might monitor the accelerometer looking for signs that you had flipped your phone’s orientation from vertical to horizontal. It would then just send the applications processor the equivalent of the word “horizontal” instead of a stream of complex accelerations.

The sensor hub in the BCM47755 takes advantage of the ARM’s “big.LITTLE” design—a dual-core architecture in which a simple low-power processor core is paired with a more complex core. The low-power core, in this case an ARM Cortex M-0, handles simple continuous tasks. The more powerful but power-hungry core, a Cortex M-4, comes in only when it’s needed.

The BCM4775 is just the latest development in a global push for centimeter-level navigation accuracy. Bosch, Geo++, Mitsubishi Electric, and U-blox, established a joint venture called Sapcorda Services in August, to provide centimeter-level accuracy. Sapcorda seems to depend on using ground stations to measure errors in GPS and Galileo satellite signals due to atmospheric distortions. Those measurements would then be sent to receivers in handsets and other systems to improve accuracy.

Japan’s US $1.9-billion Qasi-Zenith Satellite System (QZSS) also relies on error correction, but additionally improves on urban navigation by adding a set of satellites that guarantees one is visible directly overhead even in the densest part of Tokyo. The third of those four satellites launched in August. A fourth is planned for October, and the system is to come online in 2018.

Monsanto’s Weed Killer, Dicamba, Divides Farmers

$
0
0

But weeds are becoming more resistant to Roundup, so the industry is developing seeds that are tolerant to more herbicides. Environmentalists and some weed scientists worry that making seeds resistant to more weed killers will increase the use of pesticides.

Monsanto and another company, BASF, have also developed a new, less volatile version of dicamba, which has been around for decades. DowDuPont, which has its own dicamba-resistant seed, is introducing crops resistant to 2,4-D, another old herbicide.

Monsanto formally challenged Arkansas’ ban earlier this month, insisting that 99 percent of its customers were satisfied. It plans to double the use of its new dicamba-resistant soybeans seeds to 40 million acres by next year.

“New technologies take some time to learn,” said Scott Partridge, Monsanto’s vice president for global strategy. “Thus far, what we’ve seen in the field, the vast majority, more than three-quarters of them, has been due to not following the label.”

The company has also claimed that Arkansas’ decision was “tainted by the involvement” of two scientists tied to a rival, Bayer. Considering that Bayer is acquiring Monsanto, it was an awkward step. Bayer called the men “pre-eminent weed scientists.”

Some foresaw drift problems with dicamba.

For years, Steve Smith, once a member of a dicamba advisory panel set up by Monsanto, urged the company to change course. Mr. Smith, the head of agriculture at Red Gold, a tomato processor based in Indiana, aired his concerns at a congressional hearing in 2010.

“The widespread use of dicamba is incompatible with Midwestern agriculture,” he said in his testimony. “Even the best, the most conscientious farmers cannot control where this weed killer will end up.”

Photo
Xtend is a Monsanto brand of genetically modified soybean.Credit Brandon Dill for The New York Times

Monsanto eventually removed him from its advisory panel, citing what it called a “conflict of interest.” Mr. Smith had helped start a coalition of farm interests critical of dicamba and 2,4-D.

Mr. Partridge said such internal alarms had not been ignored.

“Those concerns are what led to us developing the low-volatility formulation” of the herbicide, he said.

Dicamba does kill weeds. Brent Schorfheide, a farmer in southern Illinois, said it had been extremely effective on those no longer responsive to Roundup.

“It cleaned everything up,” he said. “Without it, our fields would be a disaster.”

But some farmers say they face a difficult choice — either buy the new genetically modified seeds or run the risk that their soybeans would be damaged more by a neighbor’s spraying of weed killers than by the weeds themselves.

“If you don’t buy Xtend, you’re going to be hurt,” said Michael Kemp, a Missouri farmer, referring to the brand name of Monsanto’s seeds.

The leaves on his soybeans puckered and curled after they were exposed to dicamba, a problem known as cupping. The cost will not be clear until after harvest.

“You’re going to have to buy their product because their chemical is drifting around,” he said, adding that growing crops that are not modified is becoming impossible. “The people who are growing non-G.M.O., which I did for a while, they’re just left out in left field, I guess.”

Photo
Steve Smith, a member of an advisory panel to Monsanto, spoke out against the weed killer dicamba, and the company removed him from the panel.Credit Kelley Jordan Schuyler for The New York Times

A pivotal debate centers on how damage is caused.

Monsanto cites particles that drift in the wind when the product is sprayed improperly or when unapproved versions of dicamba are used. That can be addressed through training and enforcement.

But another problem is as much to blame, many farmers and weed scientists say, one that raises questions about the entire product program.

Because genetically modified crops allow dicamba to be sprayed later in the year, after crops emerge from the ground, and in hotter and more humid weather, the chemical is susceptible to what is known as “volatility” — it can turn into a gas and drift onto whatever happens to be nearby.

While Monsanto and BASF modified the new versions of the herbicide they are selling, they have not entirely solved the problem. So much dicamba is being used that even a small percentage of drift can cause widespread damage.

Arkansas and Missouri said they were still investigating complaints. The Missouri Department of Agriculture referred questions on the extent of the crop damage to Kevin Bradley, a weed scientist at the University of Missouri, who said more than three million acres had been affected.

In an email, he said that particles drifting in the wind during spraying “may have been the largest reason, but not by much,” adding, “I believe similar or perhaps slightly lower percentages can be attributed to volatility.”

In a statement, the E.P.A. said, “This is still an ongoing investigation and we cannot speculate on what the underlying causes of damage may be.”

Continue reading the main story

There Never Was a Real Tulip Fever

$
0
0

When tulips came to the Netherlands, all the world went mad. A sailor who mistook a rare tulip bulb for an onion and ate it with his herring sandwich was charged with a felony and thrown in prison. A bulb named Semper Augustus, notable for its flame-like white and red petals, sold for more than the cost of a mansion in a fashionable Amsterdam neighborhood, complete with coach and garden. As the tulip market grew, speculation exploded, with traders offering exorbitant prices for bulbs that had yet to flower. And then, as any financial bubble will do, the tulip market imploded, sending traders of all incomes into ruin.

For decades, economists have pointed to 17th-century tulipmania as a warning about the perils of the free market. Writers and historians have reveled in the absurdity of the event. The incident even provides the backdrop for the new film Tulip Fever, based on a novel of the same name by Deborah Moggach.

The only problem: none of these stories are true.

What really happened and how did the story of Dutch tulip speculation get so distorted? Anne Goldgar discovered the historical reality when she dug into the archives to research her book, Tulipmania: Money, Honor, and Knowledge in the Dutch Golden Age.

“I always joke that the book should be called ‘Tulipmania: More Boring Than You Thought,’” says Goldgar, a professor of early modern history at King’s College London. “People are so interested in this incident because they think they can draw lessons from it. I don’t think that’s necessarily the case.”

But before you even attempt to apply what happened in the Netherlands to more recent bubbles—the South Sea Bubble in 1700s England, the 19th-century railway bubble, the dot-com bubble and bitcoin are just a few comparisons Goldgar has seen—you have to understand Dutch society at the turn of the 17th century.

For starters, the country experienced a major demographic shift during its war for independence from Spain, which began in the 1560s and continued into the 1600s. It was during this period that merchants arrived in port cities like Amsterdam, Haarlem and Delft and established trading outfits, including the famous Dutch East India Company. This explosion in international commerce brought enormous fortune to the Netherlands, despite the war. In their newly independent nation, the Dutch were mainly led by urban oligarchies comprised of wealthy merchants, unlike other European countries of the era, which were controlled by landed nobility. As Goldgar writes in her book, “The resultant new faces, new money and new ideas helped to revolutionize the Dutch economy in the late 16th century.”

As the economy changed, so, too, did social interactions and cultural values. A growing interest in natural history and a fascination with the exotic among the merchant class meant that goods from the Ottoman Empire and farther east fetched high prices. The influx of these goods also drove men of all social classes to acquire expertise in newly in-demand areas. One example Goldgar gives is fish auctioneer Adriaen Coenen, whose watercolor-illustrated manuscript Whale Book allowed him to actually meet the President of Holland. And when Dutch botanist Carolus Clusius established a botanical garden at the University of Leiden in the 1590s, the tulip quickly rose to a place of honor.

Originally found growing wild in the valleys of the Tien Shan Mountains (at the border where China and Tibet meet Afghanistan and Russia), tulips were cultivated in Istanbul as early as 1055. By the 15th century, Sultan Mehmed II of the Ottoman Empire had so many flowers in his 12 gardens that he required a staff of 920 gardeners. Tulips were among the most prized flowers, eventually becoming a symbol of the Ottomans, writes gardening correspondent for The Independent Anna Pavord in The Tulip.

The Dutch learned that tulips could be grown from seeds or buds that grew on the mother bulb; a bulb that grows from seed would take 7 to 12 years before flowering, but a bulb itself could flower the very next year. Of particular interest to Clusius and other tulip traders were “broken bulbs”—tulips whose petals showed a striped, multicolor pattern rather than a single solid color. The effect was unpredictable, but the growing demand for these rare, “broken bulb” tulips led naturalists to study ways to reproduce them. (The pattern was later discovered to be the result of a mosaic virus that actually makes the bulbs sickly and less likely to reproduce.) “The high market price for tulips to which the current version of tulipmania refers were prices for particularly beautiful broken bulbs,” writes economist Peter Garber. “Since breaking was unpredictable, some have characterized tulipmania among growers as a gamble, with growers vying to produce better and more bizarre variegations and feathering.”

After all the money Dutch speculators spent on the bulbs, they only produced flowers for about a week—but for tulip lovers, that week was a glorious one. “As luxury objects, tulips fit well into a culture of both abundant capital and new cosmopolitanism,” Goldgar writes. Tulips required expertise, an appreciation of beauty and the exotic, and, of course, an abundance of money.

Here’s where the myth comes into play. According to popular legend, the tulip craze took hold of all levels of Dutch society in the 1630s. “The rage among the Dutch to possess them was so great that the ordinary industry of the country was neglected, and the population, even to its lowest dregs, embarked in the tulip trade,” wrote Scottish journalist Charles Mackay in his popular 1841 work Extraordinary Popular Delusions and the Madness of Crowds. According to this narrative, everyone from the wealthiest merchants to the poorest chimney sweeps jumped into the tulip fray, buying bulbs at high prices and selling them for even more. Companies formed just to deal with the tulip trade, which reached a fever pitch in late 1636. But by February 1637, the bottom fell out of the market. More and more people defaulted on their agreement to buy the tulips at the prices they’d promised, and the traders who had already made their payments were left in debt or bankrupted. At least that’s what has always been claimed.

In fact, “There weren’t that many people involved and the economic repercussions were pretty minor,” Goldgar says. “I couldn’t find anybody that went bankrupt. If there had been really a wholesale destruction of the economy as the myth suggests, that would’ve been a much harder thing to face.”

That’s not to say that everything about the story is wrong; merchants really did engage in a frantic tulip trade, and they paid incredibly high prices for some bulbs. And when a number of buyers announced they couldn’t pay the high price previously agreed upon, the market did fall apart and cause a small crisis—but only because it undermined social expectations.

“In this case it was very difficult to deal with the fact that almost all of your relationships are based on trust, and people said, ‘I don’t care that I said I’m going to buy this thing, I don’t want it anymore and I’m not going to pay for it.’ There was really no mechanism to make people pay because the courts were unwilling to get involved,” Goldgar says.

But the trade didn’t affect all levels of society, and it didn’t cause the collapse of industry in Amsterdam and elsewhere. As Garber, the economist, writes, “While the lack of data precludes a solid conclusion, the results of the study indicate that the bulb speculation was not obvious madness.”

So if tulipmania wasn’t actually a calamity, why was it made out to be one? We have tetchy Christian moralists to blame for that. With great wealth comes great social anxiety, or as historian Simon Schama writes in The Embarrassment of Riches: An Interpretation of Dutch Culture in the Golden Age, “The prodigious quality of their success went to their heads, but it also made them a bit queasy.” All the outlandish stories of economic ruin, of an innocent sailor thrown in prison for eating a tulip bulb, of chimney sweeps wading into the market in hopes of striking it rich—those come from propaganda pamphlets published by Dutch Calvinists worried that the tulip-propelled consumerism boom would lead to societal decay. Their insistence that such great wealth was ungodly has even stayed with us to this day.

“Some of the stuff hasn’t lasted, like the idea that God punishes people who are overreaching by causing them to have the plague. That’s one of the things people said in the 1630s,” Goldgar says. “But the idea that you get punished if you overreach? You still hear that. It’s all, ‘pride goes before the fall.’”

Goldgar doesn’t begrudge novelists and filmmakers for taking liberties with the past. It’s only when historians and economists neglect to do their research that she gets irked. She herself didn’t set out to be a mythbuster—she only stumbled upon the truth when she sat down to look through old documentation of the popular legend. “I had no way of knowing this existed before I started reading these documents,” Goldgar says. “That was an unexpected treasure.”

Nestlé Makes Billions Bottling Water It Pays Nearly Nothing For

$
0
0

In rural Mecosta County, Mich., sits a near-windowless facility with a footprint about the size of Buckingham Palace. It’s just one of Nestlé’s roughly 100 bottled water factories in 34 countries around the world.

Inside, workers wear hairnets, hard hats, goggles, gloves, and earplugs. Ten production lines snake through the space, funneling local spring water into 8-ounce to 2.5-gallon containers; most of the lines run 24/7, each pumping out 500 to 1,200 bottles per minute. About 60 percent of the supply comes from Mecosta’s springs and arrives at the factory via a 12-mile pipeline. The rest is trucked in from neighboring Osceola County, about 40 miles north. “Daily, we’re looking at 3.5 million bottles potentially,” says Dave Sommer, the plant’s 41-year-old manager, shouting above the din.

Silos holding 125 tons of plastic resin pellets provide the raw material for the bottles. They’re molded into shape at temperatures reaching 400F before being filled, capped, inspected, labeled, and laser-printed with the location, day, and minute they were produced—a process that takes less than 25 seconds. Next, the bottles are bundled, shrink-wrapped onto pallets, and picked up by a fleet of 25 forklifts that ferry them to the plant’s warehouse or loading docks. As many as 175 trucks arrive every day to transport the water to retail locations in the Midwest. “We want more people to drink water, keep hydrated,” Sommer says. “It would be nice if it were my water, but we just want them to drink water.”

Water bottles in motion at the Nestlé Ice Mountain facility in Stanwood, Mich.

Photographer: Brendan George Ko for Bloomberg Businessweek

Nestlé SA started bottling in 1843 when company founder Henri Nestlé purchased a business on Switzerland’s Monneresse Canal. “Ever the curious scientist, [he] analyzed and experimented with the enrichment of water with a variety of minerals, always with a singular goal: to provide healthy, accessible, and delicious refreshment,” reads Nestlé’s website. Today there are thousands of bottled water companies worldwide—there’s even Trump Ice—but Nestlé is the biggest globally in terms of sales, followed by Coca-Cola, Danone, and PepsiCo, according to Euromonitor International. Nestlé Waters, the Paris-based subsidiary, owns almost 50 brands, including Perrier, S.Pellegrino, and Poland Spring.

Last year, U.S. bottled water sales reached $16 billion, up nearly 10 percent from 2015, according to Beverage Marketing Corp. They outpaced soda sales for the first time as drinkers continue to seek convenience and healthier options and worry about the safety of tap water after the high-profile contamination in Flint, Mich., about a two-hour drive from Mecosta. Nestlé alone sold $7.7 billion worth worldwide, with more than $343 million of it coming from Michigan, where the company bottles Ice Mountain Natural Spring Water and Pure Life, its purified water line.

The Michigan operation is only one small part of Nestlé, the world’s largest food and beverage company. But it illuminates how Nestlé has come to dominate a controversial industry, spring by spring, often going into economically depressed municipalities with the promise of jobs and new infrastructure in exchange for tax breaks and access to a resource that’s scarce for millions. Where Nestlé encounters grass-roots resistance against its industrial-strength guzzling, it deploys lawyers; where it’s welcome, it can push the limits of that hospitality, sometimes with the acquiescence of state and local governments that are too cash-strapped or inept to say no. There are the usual costs of doing business, including transportation, infrastructure, and salaries. But Nestlé pays little for the product it bottles—sometimes a municipal rate and other times just a nominal extraction fee. In Michigan, it’s $200.

A bridge at sunset in Evart, Mich.

Photographer: Brendan George Ko for Bloomberg Businessweek

The Romans were among the first to see water as more than a basic need. They ranked theirs by taste; Aqua Marcia, from a spring about 60 miles outside of Rome, was among the best. In the 19th century, some of the first mass-market brands were S.Pellegrino and Vittel, now owned by Nestlé, and Evian, a Danone label. Sales were driven by taste, as well as the age-old notion that the mineral contents are therapeutic, curing ailments from hangovers to kidney stones. But mineral water consumption in America cratered in the early 20th century in part because the U.S. Food and Drug Administration made it harder to tout medicinal benefits without expensive testing.

Today, Americans often drink bottled water for what they hope is not in it. Fears about what comes out of the tap aren’t completely unfounded; 77 million Americans are served by water systems that violate testing requirements or rules about contamination in drinking water, according to the Natural Resources Defense Council. In agriculture-heavy regions, pesticides, fertilizers, and nitrates from animal waste leach into the ground. Despite the Safe Drinking Water Act of 1974, compliance with harmful chemical restrictions isn’t monitored carefully, and most wastewater-treatment systems aren’t designed to remove hormones, antidepressants, and other drugs. The Trump administration’s Environmental Protection Agency is also attempting to roll back existing regulations. That said, bottled water isn’t necessarily more pure than tap. In the U.S., municipalities with 2.5 million or more people are required to test their supply dozens of times each day, whereas those with fewer than 50,000 customers must test for certain contaminants 60 times per month. Bottled water companies aren’t required to monitor their reserve or report contamination, although Nestlé says it tests its water hourly.

There’s also the issue of scarcity. The United Nations expects that 1.8 billion people will live in places with dire water shortages by 2025, and two-thirds of the world’s population could be living under stressed water conditions. Supply may be compromised in the U.S., too. A recent Michigan State University study predicts that more than a third of Americans might not be able to afford their water bills in five years, with costs expected to triple as World War II-era construction breaks down.

Failing infrastructure has already led to a near-total reliance on bottled water in parts of the world. Nestlé started selling Pure Life in Lahore, Pakistan, in 1998 to “provide a safe, quality water solution,” the company says. But locals wonder if the Swiss multinational is exacerbating the problem. “Twenty years ago, you could go anywhere in Lahore and get a glass of clean tap water for free,” says Ahmad Rafay Alam, an environmental lawyer in the country. “Now, everyone drinks bottled water.” He adds that this change has taken the pressure off the government to fix its utilities, degrading the quality of Lahore’s supply: “What Nestlé did is use a good marketing scheme to make tap water uncool and dangerous. It’s ubiquitous, like Kleenex. People will say, ‘Give me a bottle of Nestlé.’ ”

Nestlé has been preparing for shortages for decades. The company’s former chief executive officer, Helmut Maucher, said in a 1994 interview with the New York Times: “Springs are like petroleum. You can always build a chocolate factory. But springs you have or you don’t have.” His successor, Peter Brabeck-Letmathe, who retired recently after 21 years in charge, drew criticism for encouraging the commodification of water in a 2005 documentary, saying: “One perspective held by various NGOs—which I would call extreme—is that water should be declared a human right. … The other view is that water is a grocery product. And just as every other product, it should have a market value.” Public outrage ensued. Brabeck-Letmathe says his comments were taken out of context and that water is a human right. He later proposed that people should have free access to 30 liters per day, paying only for additional use.

Compared with the water needs of agriculture and energy production, the bottled water business is barely responsible for a trickle; in Michigan, it accounts for less than 1 percent of total water usage, according to Michigan’s Department of Environmental Quality (DEQ). But it rankles many because the natural resource gets hauled out of local watersheds for private profit, not used in the service of feeding people or keeping their lights on. There’s also, of course, the issue of plastic pollution.

In the U.S., Nestlé tends to set up shop in areas with weak water regulations or lobbies to enfeeble laws. States such as Maine and Texas operate under a remarkably lax rule from the 1800s called “absolute capture,” which lets landowners take all the groundwater they want. Michigan, New York, and other states have stricter laws, allowing “reasonable use,” which means property owners can extract water as long as it doesn’t unreasonably affect other wells or the aquifer system. Laws vary even within states. New Hampshire is a reasonable-use state, but in 2006, the municipality of Barnstead became the first nationwide to ban the pumping of its water for sale elsewhere.

Towns in Oregon, Pennsylvania, and Wisconsin have turned away Nestlé. In Washington, the mayor of Waitsburg, Walt Gobel, resigned last year after it was revealed that he’d conducted secret talks with the company about building a $50 million plant. “The representatives asked for confidentiality of this proposal until they could determine the feasibility,” Gobel wrote in his resignation letter. Town leaders later voted to reject Nestlé’s advances.

Water tower in Evart.

Photographer: Brendan George Ko for Bloomberg Businessweek

Elsewhere, Nestlé has largely prevailed against opposition. In Fryeburg, Maine, it took the company four years to successfully appeal a zoning board resolution to build a facility it said it needed for its Poland Spring line. Last year it gained rights to extract water for the next 20 years—and perhaps 25 more after that. In San Bernardino, Calif., Nestlé has long paid the U.S. Forest Service an annual rate of $524 to extract about 30 million gallons, even during droughts. “Our public agencies have dropped the ball,” says Peter Gleick, co-founder of the Pacific Institute, which focuses on water issues. “Every gallon of water that is taken out of a natural system for bottled water is a gallon of water that doesn’t flow down a stream, that doesn’t support a natural ecosystem,” he says.

Nestlé isn’t the only bottled water company operating in Michigan, but it’s the most controversial. Pepsi and Coca-Cola bottle municipal water from Detroit for their Aquafina and Dasani brands, respectively; they pay city rates, then sell the product back for profit. In Mecosta County, Nestlé sucks up spring water directly from the source, which water conservationists say does more damage to the flow of streams, rivers, and wetland ecology. Municipal supplies come from larger bodies of water, so massive depletions, they argue, have less of an impact. Nestlé’s chief of sustainability, Nelson Switzer, responds: “Water is a renewable resource. As long as you manage the area, water will flow in perpetuity.”

Nestlé purchased Ice Mountain from Pepsi in 2000 and moved the production facilities from the East Coast to mountain-less Mecosta. State and local officials appreciated the business and offered a $13 million, one-time tax break. When people found out that Nestlé was pumping water in their backyards, however, they formed an opposition group, Michigan Citizens for Water Conservation. Spearheaded by retired librarians and teachers, the group added more than 2,000 members statewide, enlisted the land-and-water-rights lawyer Jim Olson, and filed a lawsuit to stop Nestlé.

The case dragged on for eight years and cost the group more than $1 million. To raise money, it charged membership fees and threw fundraisers. “Garage sales twice a year, Texas Hold ’em, raffles, a few grants from nonprofits,” says President Peggy Case, a retired schoolteacher who rigged her own water towers to irrigate the gardens on her 35-acre property.

In 2003 a judge ruled against Nestlé, saying that data documenting three years of extraction by the company showed a significant depletion of the area’s streams and wetlands. Nestlé appealed, and the case lasted six more years before the two parties settled in 2009. Nestlé would reduce pumping from 400 gallons per minute to 218, with further restrictions in spring and summer, which residents hoped would limit the environmental impact.

Even before the settlement, Nestlé had expanded its operation beyond Mecosta County to neighboring Osceola County. For access to municipal wells in the city of Evart and one nonmunicipal well nearby, the company promised to fund 14 acres of new softball fields, plus a bullpen and lockers, for the high school team. The school superintendent, Howard Hyde, told the Grand Rapids Press in March 2005: “I’m tickled. It’s like Christmas. Our current fields are pretty nice, but these are going to be better.”

More than 44 percent of Evart’s 1,500 residents live below the poverty line, according to Data USA. Officials were disappointed that Nestlé built its Ice Mountain plant in Mecosta, which cost the city 280 jobs, but they were grateful for the roughly $250,000 Nestlé pays Evart annually for its water. “[If they left], our services would decline,” says Zackary Szakacs, the city manager.

In addition to the softball fields, Nestlé has helped Evart finance other upgrades, including new well houses for its municipal water, parks, and a fairground that hosts a dulcimer festival in July. For decades the fairground was also home to Evart’s Fourth of July fireworks celebration, attended by as many as 10,000 locals. In 2015, Nestlé discovered contamination in the watershed from perchlorate in those fireworks. The carcinogen is banned only in Massachusetts and California, which is why Evart hadn’t been testing for it. But because Nestlé sells in all 50 states, says Szakacs, none of its water can test positive for the chemical. The company has since stopped pumping from affected wells and spent hundreds of thousands of dollars to clean them up.

Szakacs, Evart’s city manager.

Photographer: Brendan George Ko for Bloomberg Businessweek

At 58, Szakacs has snow-white hair, a goatee, a gruff voice, and a love of fishing and Coors Light. A former policeman, he’d moved to Evart in 2006 to be chief. His office at Evart City Hall is within walking distance of the pumping station where a steady stream of 12,500-gallon trucks arrive each day to pick up water for the Ice Mountain factory. Szakacs isn’t worried about Evart’s springs. “Look, we’ve got plenty of water, more water than you can imagine,” he says. “We’ve got rivers, and streams, and fish—bass, trout.”

Last Halloween, however, Garret Ellison, an environmental reporter for MLive and the Grand Rapids Press, discovered that Nestlé had applied for a permit to more than double its pumping rate at the well near Evart, to 400 gallons per minute—the same rate that was ruled harmful in Mecosta. Anticipating approval, Nestlé had invested $36 million to build an 80,000-square-foot addition to its Ice Mountain plant and applied for another permit for a booster station to help pump the additional flow. Michigan’s DEQ had all but approved the application for the increased pumping rate without allowing for a period of public comment.

After Ellison’s story went live, the department received more than 1,100 emails in three days (the number is now 81,000). “It sent a shock wave through most communities in Michigan,” says Olson, the lawyer, who filed an injunction with the nonprofit rights group For Love of Water demanding that the department extend its comment period and release relevant documents for review. Nestlé now awaits a decision on whether it will be allowed to increase pumping at the well near Evart. In late July the DEQ asked the company to produce data showing that higher pumping rates wouldn’t damage the environment, numbers that Nestlé plans to submit on Sept. 29.

Arlene Anderson-Vincent, a natural resource manager for Nestlé, says the uptick won’t damage the ecosystem. “The water here is constantly being replenished, much more quickly than we can pump,” says Anderson-Vincent, who was born and raised in Michigan and got a bachelor’s degree in geology from Michigan State University while working at General Motors as a welder. Nestlé has collected 17 years’ worth of data evaluating groundwater levels and stream flow—and although, she concedes, the wetlands in Mecosta might not have withstood 400 gallons per minute, Evart’s can. “Every well is different,” she says.

Nestlé’s data doesn’t make “reliable assumptions about real world conditions,” says Olson. “We know our glacial soils in Michigan, and we know our vegetation. You can pretty much take the old case [in Mecosta] as a predictor” of environmental impact.

A trailer park in Evart.

Photographer: Brendan George Ko for Bloomberg Businessweek

Six months after Ellison’s reporting, on a chilly evening in April, more than 500 people filed into a large auditorium at Ferris State University near the Ice Mountain plant. They’d come from all across Michigan to take part in the DEQ’s public hearing on Nestlé, but they had more on their mind than Evart. “We took a bus here from Flint because we’re tired of bottled water, tired of Nestlé, tired of them making a profit off of our disaster,” said Bernadel Jefferson, a pastor and activist who arrived with a dozen other protesters.

It’s impossible to talk about water in Michigan without raising the crisis in Flint. Beginning in 2014 thousands of families were exposed to dangerous levels of lead and bacteria in tap water. Michigan Governor Rick Snyder cut costs by switching the city’s water source, after which the state failed to properly treat the water with anticorrosives. An outbreak of Legionnaires’ disease killed at least 12 people and led to manslaughter charges against five state and city officials. Snyder also tried, unsuccessfully, to block a federal court order forcing the state to deliver bottled water to residents. He argued that, at an estimated $10.5 million a month, it would be too costly, put more trucks on the road, and overwhelm Flint’s recycling system.

Nestlé is quick to point out that it has nothing to do with the water problems in Flint or elsewhere. “What happened in Flint, and what’s happening in other communities in the United States, is absolutely outrageous,” says Switzer, the sustainability chief. Nestlé even teamed up with Wal-Mart, Coca-Cola, and Pepsi to donate 35,000 bottles per month to Flint residents—“for schoolchildren,” he says.

Case, president of Michigan Citizens for Water Conservation.

Photographer: Brendan George Ko for Bloomberg Businessweek

But since the crisis, Flint residents have paid thousands of dollars to purchase bottled water for drinking, cooking, washing, and bathing. “Between 2005 and 2016, Nestlé has taken over 4 billion gallons of our water for pennies and sold it back to us for huge profits,” said Case, the opposition group president, the first of about 50 people to speak at the hearing. “Meanwhile, the people of Flint have been forced to use this bottled water for several years and are required to pay some of the highest water bills in the country for undrinkable water. The people of Detroit have experienced massive shutoffs since 2014, with up to 90,000 people shut off at times. If Detroiters could pay Nestlé rates, few would owe more than a dollar, and the majority would owe less than a dime.”

Case’s three-minute speech got a standing ovation. Onstage, two DEQ employees listened in silence. “F--- the DEQ,” a man from Flint yelled into the microphone, holding up his middle fingers. Three hours later, past 10 p.m., the hearing ended. The DEQ employees shuffled offstage, refusing to comment.

Nestlé maintains that its subsidiary is a good steward of the land. An emailed statement from corporate headquarters says: “With a third of its factories already operating in water-stressed areas, water availability is and will increasingly be a major risk to Nestlé Waters. This is why water stewardship at both factory and watershed level remains an integral approach to our business strategy.”

Environmental activists counter that multinationals shouldn’t be in charge of protecting water. But these companies seem more poised to do so than some state and local officials. There’s even a Davos-style event called the World Water Forum, whose stated mission is to “put water firmly on the international agenda.” In March, 40,000 people are expected to convene in Brasilia, Brazil. The occasion isn’t without its critics. In an April blog post, water-rights activist Maude Barlow wrote, “It is a corporate trade show organized by the World Water Council—a multi-stakeholder consortium promoting solutions to the water crisis that serve the interests of multinational corporations.”

A tool for conservationists might be the public trust doctrine, which says natural resources belong to the public. The principle dates back at least 1,500 years; in 1215, it was invoked to prohibit the British Crown from transferring valuable fisheries to private lords because seabeds belonged to the people. David Zetland, author of Living With Water Scarcity, says governments must decide how much water they want to protect under the public trust doctrine and the rest should be divvied up on the open market. “Political allocation is usually corrupt,” he says. Olson doesn’t think a market is a good idea. “The poorest among us have the same rights and should enjoy the same basic access and enjoyment of water as the wealthiest,” he says.

Down a dirt road in Traverse City, about an hour’s drive from Evart, Case is standing in her garden, harvesting fat stalks of asparagus. A neighbor’s dog, a black-and-white mutt left with one eye after a porcupine run-in, follows her through the yard to the home she moved to from Detroit after retiring. “We grow a good portion of our food here for the entire year,” she says.

Case, echoing her comments at the Ferris State hearing, says she’ll keep fighting. “It has to do with the privatization of water and taking the people’s water and making a profit from it, an exorbitant profit, a ridiculous profit, when there are people with no water at all, or people with poisoned water,” she says. “We don’t believe water should be owned by anybody. It’s a public right.” Depending on how Michigan rules on Nestlé’s bid to pump more water in Evart, Case’s group may take legal action. How it will pay to challenge the Swiss conglomerate a second time, she doesn’t know. “We might,” she says, “end up back in bake sales.”

Telia to Pay Nearly $1B to Settle Uzbek Bribery Claims

$
0
0

Swedish telecoms firm Telia Company AB agreed to pay nearly $1 billion to U.S. and Dutch authorities to settle allegations that the company and a subsidiary paid about $331 million in bribes in Uzbekistan.

Telia, which is partly owned by the Swedish government, said the resolution brings to an end all known corruption investigations into the company. It remains part of a broader probe by U.S. authorities into corruption in...

21 better ways to read Hacker News

$
0
0

Hacker News is one of my favorite sites to catch up on technology and startup news, but navigating the minimalistic site can sometimes be a little ahem tedious.

No, I get it, simple is good.

But the all text interface can be taxing on the eyes when there are tons of links to scroll through.

If you’re hankering for a better way to read the posts on Hacker News (especially on an IPhone or other mobile device), here’s a roundup of 21 better ways to read Hacker News without the eyestrain.

Way #1 – hckr news

hckr news

What does it do? hckr news is a simple interface great for finding the top stories of the day and filters can be set to retrieve the top 10, top 20 and top 50% of ranked articles.

The clean interface reads equally well on desktop computers and mobile devices, and it’s a great way to check in on the top stories of the day when you are on the go.

Good for daily and weekly readers of Hacker News!

Why use hckr news? If you’re after a clean, no frills layout, then hckr news is for you. It also happens to be one of my favorites.

Anything else?Wayne Larsen, the creator of the site, has also added browser extensions for Chrome, Safari and Firefox browsers. These extensions give the user the ability to highlight and identify new comments and to collapse threads.

Bonus? You can also skin the hckr news UI using Stylish.

Way #2 – Hacker Newsletter

Hacker Newsletter Issue

What does it do? Hacker Newsletter is a fantastic weekly newsletter of the best Hacker News articles delivered to your Inbox.

Each issue is broken up into 9 categories:

  1. Favorites
  2. Show HN
  3. Code
  4. Design
  5. Learn
  6. Books
  7. Watching
  8. Working
  9. Fun

The newsletter provides a link to the original article as well as the comments on Hacker News.

Why subscribe to Hacker Newsletter? If you want your Hacker News fix once a week, seeing this round-up every Friday is a great way to enjoy the best of Hacker News. As of February 2016, over 35K subscribers have signed up.

Anything else? Kale Davis, the curator of the newsletter, also has an intriguing newsletter called Wayback Letter. Each newsletter issue looks back one month, 1 year, 2 years through 5 years for Hacker News gems that you might have missed. Check it out!

Way #3 – Hacker Bits Magazine

Hacker Bits

What does it do? Hacker Bits Magazine is the monthly magazine that gives you the hottest technology and startup stories straight from Hacker News.

The magazine selects from the top voted stories for you and publish them in an easy-to-read email format.

Why subscribe to Hacker Bits? If you prefer to have the top articles delivered to your Inbox, click on the link to get your free digital subscription.

Anything else? Maureen and Ray (that’s me!), the creators of Hacker Bits, also offer exclusive content to their subscribers. Check it out at hackerbits.com.

Way #4 – Hacker News Daily

Hacker News Daily

What does it do? Every day at midnight, Hacker News Daily rounds up the top 10 highest-rated articles on Hacker News.

Articles that appeared on a previous day are intentionally excluded so that you’re not revisiting the same top-ranked articles day after day.

In addition to the clean web UI, a daily email subscription as well as an RSS feed are available.

Why use Hacker News Daily? As of February 2016, with over 3K RSS subscribers, hundreds of email subscribers and a ton of web traffic, go check it out. It’s great for viewing on a desktop, laptop or tablet.

Anything else? Colin Percival, the creator of Hacker News Daily, also runs Ask Hacker News Weekly— a weekly round-up of the top 10 highest-rated Ask HN questions.

Way #5 – Hacker Web

Hacker Web

What does it do? HackerWeb is a great minimalistic web app that mirrors the Hacker News front page.

But here’s the kicker:

It looks absolutely gorgeous and is super responsive on a mobile device!

Why use Hacker Web? If you primarily view Hacker News on a small screen, look no further than HackerWeb. The rendering of comments (threads are collapsed!) is easily the best way to consume long comment threads on a mobile device.

Anything else? Lim Chee Aun, the creator behind HackerWeb, obviously optimized HackerWeb for mobile devices and it shows!

If you’re interested in how the app was built, make sure to check out these Hacker News threads:

An interesting testament to the beautifully designed collapsible threads, they are integrated into hckr news as well as Hacker News Digest.

Way #6 – Full Hacker News

Full Hacker News

What does it do? Full Hacker News is a web app that periodically takes a look at the front page of Hacker News and pulls all 30 articles into a single page.

It gets better…

The first part of the single page consists of the 30 article titles hyperlinked to the full article text. The second part of the single page contains the full article text. So everything is on 1 page!

Why use Full Hacker News? If you’re pressed for time, at the bottom of screen are 3 buttons, Index, Prev and Next.

  • Index takes you back to the article index.
  • Prev takes you to the previous article.
  • Next takes you to the next article.

So you can literally fly through the front page of Hacker News without having to click on each article link.

Full Hacker News Buttons

Awesome!

Anything else? Maurice Svay, the author of Full Hacker News, created this single page view of Hacker News for offline viewing.

Just load the page on your phone or laptop and you can read the whole front page of Hacker News offline!

Way #7 – Hacker News from premii

Hacker News from premii

What does it do? Hacker News from premii is a mature, highly-configurable web app for Hacker News. In fact, the screenshot above uses the Night Theme. :)

Unlike many other Hacker News web apps…

premii pulls both the article contents and the comments into its sleek UI. You can view the articles from the Hacker News front page, newest, today’s best and many more!

Why use Hacker News from premii? Tired of the UI on Y Combinator? Looking for a sleek, configurable yet consistent app for consuming Hacker News? This is the one that all-around improves the Hacker News UI!

You might be wondering if it works on mobile devices…

It’s a resounding yes! You’ll get a very similar sleek, consistent UI for mobile devices.

Anything else? Dharmesh Patel, the creator of this app, also offers iOS, Android and Win10 and Mac native apps.

Way #8 – hack.ernews.info

hack.ernews.info

What does it do? hack.ernews.info is a polished web app that mirrors the front page of Hacker News. You’ll get the upvote count in orange, the article’s rank on the front page and comments collapsed underneath the article title.

Why use hack.ernews.info? The biggest differentiator for hack.ernews.info is the ability to mark an article as done.

By clicking the check mark, the article is taken off the list so that you’re only left with unread articles. Here’s a screenshot of an article being marked done and sliding off the screen:

hack.ernews.info Done

Also, it’s super responsive on a mobile device!

Anything else?Antonis Karamitros, the author of the web app, also offers the ability to reset the articles you’ve marked as done so that they show up in the list of articles again.

Way #9 – Hacker News Digest

hackernews.im

What does it do? Hacker News Digest is a web app that mirrors the front page of Hacker News. It’s a slightly less minimalistic, but still super responsive Hacker News interpretation.

It pulls the first image and a few lines from the original article and displays this in a beautiful list format.

The layout is reminiscent of Google News.

Why use Hacker News Digest? If you like seeing a little blurb and an image from the original article, look no further than Hacker News Digest!

It works equally well on bigger screens or a smaller mobile screen.

Anything else? Poly Miao, the author of Hacker News Digest, also provides the ability to sort the articles by rank, score, comments and submit time. In addition, the comments link for each article leverages collapsible comments from Hacker Web.

Way #10 – TiledHN

TiledHN

What does it do? TiledHN is a gorgeous web app that displays one tile per Hacker News article.

You’ll also get on the tile:

  • Link to the original article.
  • How long ago it was submitted.
  • Number of upvotes.
  • Number of comments.
  • Link to the Hacker News comments.
  • Link to the submitter’s profile.

Why use TiledHN? If you like tiles rather than lists, this is the app for you! The tiles are beautifully rendered and show up just as well on a desktop or mobile device.

The tiles remind me of the Windows Phone screen.

Anything else? Prakhar Bhandari, the creator of TiledHN, also provides filters for new articles, show HN, ask HN and jobs.

Way #11 – Twitter bots

Hacker News Twitter

What does it do? Twitter bots tweet Hacker News stories that reach a certain number of upvotes.

For example, @newsyc150 tweets stories as soon as they reach 150 points and @newsyc500 does the same for 500 points.

I came across 8 of these bots. Keep in mind, they don’t all have the same owner:

  1. @newsyc20
  2. @newsyc50
  3. @newsyc100
  4. @newsyc150
  5. @newsyc200
  6. @newsyc250
  7. @newsyc300
  8. @newsyc500

Why use these Twitter bots? If you’re a fan of Twitter and you only want Hacker News stories that reach a certain number of upvotes, this is a great way to catch stories.

Anything else? As of February 2016, the most popular bot is @newsyc20 with almost 15K followers. @newsyc100 has over 7K followers, and rounding out the top 3 is @newsyc150 with about 4K.

Way #12 – hnapp

hnapp

What does it do? hnapp is an advanced search engine for Hacker News.

The best part is…

You can then save the search query as an RSS or JSON feed!

Why use hnapp? You can stay up-to-date on a myriad of searches:

  • Show only a particular submitter
  • Show submissions from a specific host
  • Show certain story types
  • Show stories with at least X number of upvotes or comments

Once you have your search constructed, just add the feed to your favorite feed reader and never miss a submission about your favorite technology, product or submitter!

Anything else? Nikita Gazarov, the author of hnapp, added other fun capabilities that allow you to put together search criteria using boolean operators.

Way #13 – hackerbra.in

hackerbra.in

What does it do? Putting aside the name for a bit, hackerbra.in is a minimalist web app for the front page, ask and best of Hacker News.

Articles link to original article and comments link to the Hacker News pages. Best viewed on a desktop.

Why use hackerbra.in? The neatest thing about hackerbra.in is the capability to quickly see the top comment.

Underneath every article (how supportive!) title is a link aptly named top. Clicking on it shows the top comment. Nice!

Clicking on the number next to top shows the rest of the comments.

Anything else? Adrian Waj, the creator of hackerbra.in, also offers the capability to look back on Hacker  News 11 hours ago, 3 days, 4 days, 6 days … all the way back to 6 years!

Way #14 – Hacker News Confidence

Hacker News Confidence

What does it do? Hacker News Confidence is a text-heavy web app with a twist…

Stories are scored according to highest upvote-to-comment ratio.

In other words, upvotes are considered positive signals and comments are negative. The basic idea is the best stories have a higher ratio whereas controversial stories have more comments.

Why use Hacker News Confidence? If you’re looking for a minimalistic web app that gives more weight to stories with upvotes and penalizes those with comments, make sure to give this one a shot!

It performs well on desktop and mobile devices.

Anything else? Cedric (Eli James) Chin, creator of Hacker News Confidence, explains the formula for scoring each story using a confidence interval (which I assume is where the name of his site comes from). Check out the site for more details.

Way #15 – HNWatcher

HNWatcher

What does it do? HNWatcher tracks keywords, users and more for Hacker News submissions and/or comments.

You can then configure it to notify you via email ASAP, daily, weekly or monthly.

Why use HNWatcher? If you’re looking to track a particular user’s submissions, certain topics or just want to know when someone submits your blog or website, this is perfect for you!

Anything else? Julien FortinGuillaume J. Charmes and Sylvain Kalache are the founders of HNWatcher. They also offer the ability to generate a graph of the mentions as well as an RSS feed from your search.

Way #16 – HNPaper

HNPaper

What does it do? HNPaper is a lightning-fast search engine for Hacker News.

Type in your search term, and in a split second, you get your results with the most recent stories first.

You’ll also get a graph plotting how frequently the term occurred each month over the past 6+ years.

HNPaper Graph

Why use HNPaper? If you’re looking to spot trends in certain terms, this is great way to visualize and browse Hacker News stories.

The interface is snappy and you can even sort your results by popularity (rather than by time). Search can also be limited to Show HN, Ask HN or Jobs.

Anything else? Régis Gaidot, the author of HNPaper, also provides some interesting statistics about the number of submissions and even breaks this down by contributor.

Way #17 – serializer.io

serializer.io

What does it do? serializer.io is a web app that aggregates sites like Hacker News, Reddit, ProductHunt, Lobste.rs, Slashdot and many others into one single list.

You’re probably thinking…

That would be a giant list! Fortunately, you can configure the sites to pull stories from.

Why use serializer.io? If you frequently browse more than 2 or 3 of the dozen sites supported by serializer.io, make sure to checkout serializer.io.

The web app is snappy, configurable and looks great on a bigger screen or mobile device.

Anything else? Charlie Egan, the creator of serializer.io, also provides the ability to mark articles as read and to open articles in a new tab. Nice!

Way #18 – Hacker News for Mobile

Hacker News for Mobile

What does it do? Hacker News for Mobile is a super minimalist, no-frills web app that mirrors the front page of Hacker News.

With its lightweight design, it should come as no surprise that it loads fast and works great on a mobile device!

Why use Hacker News for Mobile? If all you want are links to the 30 front page articles and links to their corresponding comments, this is about as minimalist as you can get.

You won’t see the number of points, number of comments, the submitter, the domain or any links to Show HN, Ask HN, etc.

Just links to the article and comments. :)

Anything else? Nope. Minimalism at its best! mheguevara is the author of Hacker News for Mobile.

Way #19 – Hacker News Mobile

Hacker News Mobile

What does it do? Hacker News Mobile is a web app that displays the top 50 stories from the front page of Hacker News.

It’s fast-loading and perfect on a mobile device. For each story, you’ll get:

  • Upvotes
  • Submission time
  • Submitter
  • Link to the original article
  • Beautifully rendered, collapsible comments

Why use Hacker News Mobile? If you’re looking for a fast web app for the front page that renders collapsible comments, check out Hacker News Mobile. Also, unlike just about every other app, there’s no orange anywhere!

Anything else? James Friend, the author of Hacker News Mobile, implemented this web app using isomorphic Javascript. Awesome!

Way #20 – hnrss

hnrss

What does it do? hnrss stands for Hacker News RSS feeds. The page provides a super useful lists of real-time RSS feeds that slice and dice the stories on Hacker News.

You’ll have a bunch of options:

  • Firehose – You get every new story and comment. Yikes!
  • Points/Activity – You get stories that have a minimum number of upvotes or comments.
  • Searches – You get stories that match your search term.
  • And many more!

Why use hnrss? If you like reading your news and stories in your RSS reader, these feeds are fantastic! Many of them are configurable through URL query parameters.

Anything else? Eric Davis, the creator of hnrss, provides a highly-configurable search feed. Not only can you search for a specific keyword anywhere in the story title, you can look for the keyword in the URL, comments and everything supported by the HN Search.

Way #21 – Hacker News Rankings

Hacker News Rankings

What does it do? Hacker News Rankings plots the ranking of stories on the front page of Hacker News over the last few hours.

It’s a gorgeous web app, and pretty snappy, too!

Why use Hacker News Rankings? Being a data geek myself, this is the perfect data-driven approach to selecting articles I may have missed based on their position on the front page over time.

You can compare the trajectory of articles, and of course you can also navigate to the article and comments through a list right below the plot.

Hacker News Rankings List

Anything else? Marc Neuwirth, the author of Hacker News Rankings, also provides a beautiful bubble chart visualization of today’s stories grouped by domain.

Hacker News Rankings Domain

It’s your turn!

What did I leave out? Is there anything you think I’ve missed?  I’d love to hear about your favorite ways to read Hacker News.

Leave a comment or shoot me an email about your ways to improve the Hacker News UI.

Make sure to pick-up your free comparison cheat sheet for all 21 better ways to read Hacker News when you subscribe for free to Hacker Bits Magazine.

Hacker News Cheat Sheet

Scientists discover the first brainless animal that sleeps

$
0
0

It was well past midnight when Michael Abrams, Claire Bedbrook and Ravi Nath crept into the Caltech lab where they were keeping their jellyfish. They didn't bother switching on the lights, opting instead to navigate the maze of desks and equipment by the pale blue glow of their cellphones. The students hadn't told anyone that they were doing this. It wasn't forbidden, exactly, but they wanted a chance to conduct their research without their PhD advisers breathing down their necks.

“When you start working on something totally crazy, it's good to get data before you tell anybody,” Abrams said. 

The “totally crazy” undertaking in question: an experiment to determine whether jellyfish sleep.

It had all started when Bedbrook, a graduate student in neurobiology, overheard Nath and Abrams mulling the question over coffee. The topic was weird enough to make her stop at their table and argue.

“Of course not,” she said. Scientists still don't fully know why animals need to snooze, but research has found that sleep is a complex behavior associated with memory consolidation and REM cycles in the brain. Jellyfish are so primitive they don't even have a brain — how could they possibly share this mysterious trait?

Her friends weren't so sure. “I guess we're going to have to test it,” Nath said, half-joking.

Bedbrook was dead serious: “Yeah. Yeah, we are.”

After months of late-night research, Bedbrook has changed her mind. In a paper published Thursday in the journal Current Biology, she, Nath and Abrams report that the upside-down jellyfish Cassiopea exhibit sleeplike behavior — the first animals without a brain known to do so. The results suggest that sleep is deeply rooted in our biology, a behavior that evolved early in the history of animal life and has stuck with us ever since.

Further study of jellyfish slumber might bring scientists closer to resolving what Nath called “the paradox of sleep.”

Think about it, he urged. If you're asleep in the wild when a predator comes along, you're dead. If a food source strolls past, you go hungry. If a potential mate walks by, you miss the chance to pass on your genetic material.

“Sleep is this period where animals are not doing the things that benefit from a natural selection perspective,” Nath said.

Abrams chimed in: “Except for sleep.” Nath laughed.

“We know it must be very important. Otherwise, we would just lose it,” Bedbrook said. If animals could evolve a way to live without sleep, surely they would have. But many experiments suggest that when creatures such as mice are deprived of sleep for too long, they die. Scientists have shown that animals as simple as the roundworm C. elegans, with a brain of just 302 neurons, need sleep to survive.

Cassiopea has no brain to speak of — just a diffuse “net” of nerve cells distributed across their small, squishy bodies. These jellyfish barely even behave like animals. Instead of mouths, they suck in food through pores in their tentacles. They also get energy via a symbiotic relationship with tiny photosynthetic organisms that live inside their cells.

“They're like weird plant animals,” Bedbrook said.

They're also ancient: Cnidarians, the phylogenetic group that includes jellies, first arose some 700 million years ago, making them some of Earth's first animals. These traits make Cassiopea an ideal organism to test for the evolutionary origins of sleep. Fortuitously, Abrams already had some on hand.

So the trio designed an experiment. At night, when the jellies were resting and their professors were safely out of the picture, the students would test for three behavioral criteria associated with sleep.

First: Reversible quiescence. In other words, the jellyfish become inactive but are not paralyzed or in a coma. The researchers counted the jellyfish's movements and found they were 30 percent less active at night. But when food was dropped into the tank, the creatures perked right up. Clearly not paralyzed.

Second: An increased arousal threshold. This means it's more difficult to get the animals' attention; they have to be “woken up.” For this, the researchers placed sleeping jellies in containers with removable bottoms, lifted the containers to the top of their tank, then pulled out the bottom. If the jellyfish were awake, they'd immediately swim to the floor of the tank. But if they were asleep, “they'd kind of strangely float around in the water,” Abrams said.

This jellyfish was seen during a dive on April 24, while exploring Enigma Seamount at a depth of more than 12,000 feet. (NOAA)

“You know how you wake up with vertigo? I pretend that maybe there’s possible chance that the jellyfish feel this,” Nath added. “They’re sleeping and then they wake up and they're like, 'Ahhhh!' ”

And third: The quiescent state must be homeostatically regulated. That is, the jellyfish must feel a biological drive to sleep. When they don't, they suffer.

This is really equivalent to how we feel when we pull an all-nighter,” Bedbrook said. She's all too familiar with the feeling — getting your PhD requires more late nights than she's willing to count.

The jellyfish have no research papers to keep them awake past their bedtimes, so the scientists prevented them from sleeping by “poking” them with pulses of water every 20 minutes for an entire night. The following day, the poor creatures swam around in a daze, and the next night they slept especially deeply to make up for lost slumber.

Realizing they really had something here, the students clued their professors in on what they were doing. The head of the lab where Nath worked, Caltech and Howard Hughes Medical Institute biologist Paul Sternberg, offered the trio a closet in which they could to continue their experiments.

“It's important,” Sternberg said, “because it's [an organism] with what we think of as a more primitive nervous system. … It raises the possibility of an early evolved fundamental process.”

Sternberg, along with Abram and Bedbrook's advisers, is a co-author on the Current Biology paper.

Allan Pack, the director of the Center for Sleep and Respiratory Neurobiology at the University of Pennsylvania, was not involved in the jellyfish research, but he's not surprised by the finding, given how prevalent sleep is in other species.

Every model that has been looked at … shows a sleep-like state,” he said. 

But the revelations about jellyfish sleep are important, he said, because they show how basic sleep is. It appears to be a “conserved” behavior, one that arose relatively early in life's history and has persisted for millions of years. If the behavior is conserved, then perhaps the biological mechanism is too. Understanding why jellyfish, with their simple nerve nets, need sleep could lead scientists to the function of sleep in humans.

“I think it's one of the major biological questions of our time,” Pack said. “We spend a third of a life sleeping. Why are we doing it? What's the point?”

Read more:

Your brain can form new memories while you are asleep, neuroscientists show

Could ADHD be a type of sleep disorder? That would fundamentally change how we treat it.

This newly discovered jellyfish looks like a 'beautiful' Pixar character


Examples of unexpected mathematical images

$
0
0

The very top of the large cardinal hierarchy was an unlikely place to look for computer generated mathematical images.

The $n$-th classical Laver table is the unique algebra $A_{n}=(\{1,...,2^{n}\},*_{n})$ where

  1. $x*_{n}(y*_{n}z)=(x*_{n}y)*_{n}(x*_{n}z)$, and

  2. $x*_{n}1=x+1\mod 2^{n}$.

Let $\mathcal{E}_{\lambda}$ be the set of all elementary embeddings $j:V_{\lambda}\rightarrow V_{\lambda}$. The critical points of non-trivial elementary embeddings $j\in\mathcal{E}_{\lambda}$ are known as rank-into-rank cardinals and the rank-into-rank cardinals are among the largest of the local large cardinals and the axiom positing the existence of a rank-into-rank cardinal is one of the strongest large cardinal axioms.

Define an operation $*$ on $\mathcal{E}_{\lambda}$ by $j*k=\bigcup_{\alpha<\lambda}j(k|_{V_{\alpha}})$. For each limit ordinal $\gamma<\lambda$, let $\equiv^{\gamma}$ be the equivalence relation on $\mathcal{E}_{\lambda}$ where $j\equiv^{\gamma}k$ iff $j(x)\cap V_{\gamma}=k(x)\cap V_{\gamma}$ for each $x\in V_{\gamma}$. Then for all $j\in\mathcal{E}_{\lambda}$ and limit ordinals $\gamma<\lambda$, there is some $n$ where $(\langle j\rangle/\equiv^{\gamma})\simeq A_{n}$.

Let $L_{n}:\{0,...,2^{n}-1\}\rightarrow\{0,...,2^{n}-1\}$ be the mapping where $L_{n}(x)$ is the number obtained by reversing the digits in the binary expansion of $x$. In other words, $L_{n}(\sum_{k=0}^{n-1}a_{k}2^{k})=\sum_{k=0}^{n-1}a_{k}2^{n-1-k}$.

Define an operation $\#_{n}$ on $\{0,...,2^{n}-1\}$ by $x\#_{n}y=L_{n}(((L_{n}(x)+1)*_{n}(L_{n}(y)+1))-1)$.

In the following image, each pixel of the form $(x,x\#_{n}y)$ (we use matrix coordinates here) is colored white while all of the other coordinates are colored black ( here $n=9$ so the image is a 512x512 image). As $n\rightarrow\infty$, the resulting image will give one finer and finer detail about the classical Laver tables.

enter image description here

At this link, you may zoom into the above image of the classical Laver tables.

All of the information about $A_{9}$ is contained in the above image.

The white points actually form a subset of a Sierpinski-like triangle. However, the white points are so sparse that the resulting image hardly resembles the Sierpinski triangle. However, while the white points do not quite make the Sierpinski triangle, if there exists a rank-into-rank cardinal, then every white point in this image has fractal structure if you zoom extremely far into the image and let $n\rightarrow\infty$.

This image is not the only image you may obtain from the classical Laver tables since on this answer, I have posted other images obtainable from the classical Laver tables and generalized Laver tables. You may also generate your own images obtainable from the generalized Laver tables here.

Why Wages Aren’t Growing

$
0
0

The very first thing any college freshman learns in Economics 101 is the law of supply and demand. When people desire more of something but its availability is limited or constrained, its price goes up. There may not be another economic rule more basic and logical.

Yet Japan, that land of eternal economic mystery, is apparently defying this most sacred principle. The problem is wages. Japan’s labor market is the tightest it’s been in decades. The unemployment rate has sunk to only 2.8 percent, the lowest in 23 years, while the number of available jobs compared with applicants has reached levels not seen since the early 1970s. Add in an aging, shrinking workforce unable to generate many reinforcements, and simple mathematics leads to the conclusion that wages should be increasing—based on current market conditions, by at least 2 percent a year.

But they’re not even close to rising at that rate. Growth of worker compensation has been minimal this year. In July, base pay rose a mere 0.5 percent from the year earlier, while total earnings, which includes bonuses, dropped by 0.3 percent. Although very recently some signs have emerged that wages may be set for a pickup, workers are far from getting the gains you’d assume the market is signaling they deserve.

Japan, as usual, is an extreme case but not an isolated one. Wage growth in much of the world has been subdued, even as the global economy has stirred to life. In the U.S., where unemployment has dwindled to the lowest level in 10 years, at 4.4 percent, workers aren’t much better off. Average hourly wages inched up 3¢ in August from the previous month. In the euro zone, hourly wage growth in the second quarter showed some improvement, with a 2 percent increase from the same period a year earlier. But overall labor costs aren’t growing nearly as quickly as they did in the years before the 2008 financial crisis, even though Europe is enjoying a surprising revival.

The dearth of wage increases is a serious problem for the global economy. Economists have proffered all sorts of complex explanations for the glacial pace of recovery from the Great Recession, including insufficient fiscal spending and excessive government regulation. Some have even argued that the world has slipped into a long-term cycle of meager growth. But one often overlooked factor is the plight of the wage earner. Employees working 9 to 5 have simply not benefited as they should have from improvements in economic performance or corporate profitability. Without fatter paychecks, the average household can’t spend more, and that’s bad for growth. Yes, it’s really that simple.

Sure, people are better off today than they’ve been since the 2008 financial crisis tanked the global economy. Household incomes in the U.S. jumped by a respectable 3.2 percent in 2016, adjusted for inflation, according to a report earlier in September from the U.S. Census Bureau. Yet that’s not because of wages. The same report revealed that median earnings of full-time workers didn’t materially change in 2016 from the year before. Thanks to the buoyant job market, Americans are simply working more. Federal Reserve data, meanwhile, shows that wage growth—while improved—still badly lags the pace achieved during other periods of low unemployment.

Nor can brighter data erase the fact that workers have been suffering for a long, long time. For instance, when inflation is factored in, median weekly earnings in the U.S. in the second quarter were a paltry 5.7 percent higher than a decade earlier. In an April study, the International Monetary Fund concluded that the share of national income paid to workers has been falling since the 1980s across advanced economies. Even in the emerging world, some countries, most of all China, have seen meaningful declines in this ratio as well, even as poverty has been significantly reduced. That means wages haven’t kept pace with gains in productivity, as economics says they should, and that a greater amount of income is being earned through the use of capital. In other words, investors are winning out over workers.

The Great Recession, of course, set worker welfare back badly. But the roots of wage stagnation run much deeper. In part, the problem has been caused by the globalization of the labor force, which pits workers in one country in more direct competition with workers in other countries, often with large differences in wage levels. Laborers also find themselves competing against human-replacing machines. The IMF study estimated that half the decline in workers’ share of income in the developed world can be attributed to advancing technology. Unions have also been defanged in many countries, stripping the proletariat of its ability to call for increases in wages. In 2016, 6.4 percent of private-sector wage earners were members of unions in the U.S., a drop from 16.8 percent in 1983. Individual countries also suffer from their own specific wage-destroying dynamics. In Japan, for instance, one cause of stagnant wages is a dual-track labor system in which corporations have hired more and more workers in often poorly paid part-time positions, undercutting the bargaining power of the country’s formerly fierce unions.

These factors have undermined the influence employees have within their own companies. As a result, managers are more likely to reward themselves and their bosses—the shareholders—than the rank and file. A July report from the Economic Policy Institute found that the chief executive officers of America’s largest companies made an average of $15.6 million in compensation in 2016, or 271 times the annual average pay of ordinary workers. Although that gap has narrowed over the past few years, it’s still astronomically larger than the 20 times recorded in 1965. More broadly, studies have shown that the gains made in wages have often been skewed toward the top of the pay pyramid, which means those toiling at the bottom are even worse off than the general statistics show.

The big question is: How do we give wage earners a square deal? That’s challenging, because the forces suppressing wages are unlikely to abate. We can’t turn back the clock to a time when labor markets were more localized, despite President Trump’s efforts, nor can we halt the innovation that will bring advances in robotics and information technology.

Yet we’re not helpless, either. Harry Holzer, a senior fellow at the Brookings Institution, suggests that steps can be taken to fill well-paid jobs that are sitting empty in the U.S. because of a lack of skilled workers. Companies, he says, should be encouraged to partner with community colleges to train the poorly skilled, start apprenticeship programs that provide on-the-job training, and hire the long-term unemployed or former felons.

But efforts have to go further than that. Another step would be strengthening the voice of labor, which means restoring some power to unions to stand up for workers’ interests. There is a clear link between unionization and bigger paychecks. A 2013 analysis by the U.S. Bureau of Labor Statistics showed that unionized workers got larger wage increases, earned more money, and had better access to corporate benefits than nonunionized workers. On top of that, the Economic Policy Institute in a 2016 research paper made the case that all workers would gain from unions, even those who aren’t members, because higher rates of unionization would boost wages overall by setting pay standards employers are compelled to follow.

For unions to regain ground, governments will have to give them a nudge. Former U.S. Secretary of Labor Robert Reich recommends Washington make it easier to form unions, impose harsher penalties on companies that fire organizers, and banish “right-to-work” laws in states that allow workers to benefit from unions without paying dues, considered a back door to weakening them.

Yet another possibility for increasing wages can be found in an old capitalist concept: performance-based pay. Advocates of free enterprise like to say hard work should be rewarded, but in today’s corporate culture, that simply isn’t the case. While CEOs are often compensated, at least in part, on their companies’ overall success, regular employees, who arguably are as responsible as executives for that success, are often not. According to a 2017 report from PayScale Inc., which specializes in compensation data, three-fourths of executives, directors, and managers in surveyed companies were given bonuses, while less than half of hourly workers were. Linking compensation to contribution isn’t only fair, it also would likely boost loyalty and productivity.

If executives don’t cooperate with such schemes, policymakers may have to force them. One idea is to use tax policies to encourage management to share profits with employees. South Korea is engaged in just such an experiment. In 2015 the finance ministry, fed up with big companies hoarding cash, imposed a tax penalty on those that failed to spend a certain percentage of profits on investment, dividends, or wages. It’s hard to tell if this policy has had the desired effect. But the Korean government is doubling down on the strategy. The new administration of President Moon Jae-in has promised to enhance tax incentives for companies that boost employment and raise wages.

Free marketers may balk at such a proposal. And perhaps with more time, tightening labor markets will give wages more of a lift. But the long-term trend is so disheartening that more action is necessary. We must strike a new balance between labor market flexibility and worker protection. In an increasingly high-tech world, where skills and talent will determine companies’ futures, far-sighted executives should seek practices that fairly compensate—and thus retain and groom—good workers. If not, weak wages will drag us all down.

The Equifax disaster points to a much bigger problem

$
0
0

Herbert Lin is a senior research scholar and the Hank J. Holland fellow for cyber policy and security at Stanford University. He served on President Barack Obama’s Commission on Enhancing National Cybersecurity.

In the wake of the hack of credit reporting agency Equifax, many people have suggested that affected consumers implement credit freezes to prevent the misuse of their sensitive personal data. Equifax, which originally tried to charge consumers for this protection, backed down and agreed to provide the service free of charge.

But the credit-freeze approach, while smart in the short term, is inadequate. In fact, it underscores the degree to which the current system puts the interests of credit reporting agencies above the imperative of protecting consumers’ financial privacy. The existing arrangement, under which consumers must generally pay a fee to prevent others from accessing their credit reports and an additional fee for thawing that freeze, has things exactly backward. The presumption should be that consumers’ financial information is protected unless and until they expressly request that a party be given access to it.

Under current law, consumers have essentially no rights regarding this stored personal data. Consumers are not customers of the credit reporting agencies; their data is the product being sold by those agencies to parties that have some reason to want to know individuals’ histories of managing money and their financial trajectories from birth until death. And these parties — banks, credit card companies and so on — pay the credit reporting agencies dearly for those histories. In 2016, Equifax’s revenue was $3.1 billion.

It’s reasonable for a bank to know how you have managed money in the past if it is going to loan you money. By providing information on financial histories, the credit reporting agencies — Equifax, Experian and TransUnion — play a vital role in enabling those of us without sufficient cash on hand to buy cars and houses. They also help financial institutions make decisions about who should get what kinds of credit cards. But they provide all of this data at your request; by applying for a loan to buy a house or to get a credit card, you agree to the release of your credit record to the party offering the loan or credit card. That’s fair — you give up some privacy in return for the possibility of getting the loan or the credit card.

But many parties obtain your credit report without your explicit consent. Most of the unsolicited credit card offers you receive in the mail are from firms that accessed your credit report as part of a marketing campaign to determine who they could sign up for one credit card or another. You never asked for the credit card offer, but the soliciting party saw your credit report anyway. In such cases, you gave up your financial privacy and received nothing of value (unless you really wanted the credit card offered). What’s fair about that?

In the wake of the Equifax breach, Congress should require stronger cybersecurity measures at credit reporting agencies, as well as for any company that stores large quantities of sensitive data about individuals, even if those individuals are not the company’s customers. But it is also important to go beyond proposed legislation on free freezing of credit reports to require that individual reports be frozen by default, “thaw-able” only with the individual’s consent.

Such a requirement would usually be implemented procedurally — a company would be legally subject to penalties or damages if it released a credit report without the express consent of the relevant individual. But such a requirement could also be enforced technically: A credit report could be stored in an encrypted form so that it could be thawed only with a key held or managed by the consumer. Technical enforcement of the thaw-only-on-request requirement would provide a high degree of security against a large-scale compromise, because hackers would have to obtain individual decryption keys for each record.

In addition, consumers would never have to give away their privacy for no received benefit. The credit reporting agencies will argue that many consumers benefit from unsolicited credit card offers because they would not otherwise learn of their availability. That problem is easily solved by enabling consumers to choose explicitly to make their credit reports available to all parties without requiring individual permissions.

But the real issue for credit reporting agencies is that freeze-by-default eliminates the fees they now collect when they make credit reports available to various parties without our explicit permission. For that complaint, we should all have relatively little sympathy — they earn billions of dollars annually from the selling of our data without our permission or consent.

How I got to 200 productive hours a month

$
0
0

by Ivan Mir on Sep 19, 2017

Two years ago I could spend a week not working because I was avoiding some task. One year ago it was 100 to 120 hours of work monthly. Nowadays I do around 200 productive hours each month, which is over six hours of productive time daily. All this time I have been working from home, mostly on the same project.

This guide describes how I achieved these results. As a former game designer, I organized my daily routines by applying the same behavioral psychology principles that are used to create video game experiences. Some of my advice is trivial, and you have definitely heard it before, but when used in a right way, it will create a robust framework to change ineffective habits.

The framework is built from three tiers: the environment, the body and the mind. It goes exactly in this order because a well-maintained body can't do much in a distraction-polluted environment, and a trained mind won't help an exhausted body. You don't need to perfect each element before starting to work on the next one, but consider them foundations for each other and direct your efforts accordingly.

While it's my personal technique, I believe it will work for you too. There's a high chance that I have undiagnosed ADHD: I have been expelled from two schools as a result of behavioral problems coming from inattention, and I still match most of the symptoms. So if you have a better natural attention span, this approach should be even more effective for increasing your concentration power.

Caution: The mentioned amount of hours is not advisable for people working on someone else's business for illusory stock options, with no payment for overtime. There's also no point in going beyond this number because working over 50 hours a week actually decreases productivity. Life should come first in the "work-life balance."

Environment

A properly organized environment shapes a path to your goals while preventing accidental turns that lead to procrastination. Because our levels of willpower, motivation and self-awareness are not constant, setting a safeguard in advance is essential to overcome the low points.

The core principle of a productive environment is increasing the friction required to slip into distracting activities, so that it takes a significant effort to get distracted. A basic example would be erasing leisure sites from your internet history and start using them in a separate browser — it will both prevent the autocomplete from doing you a disservice and increase the number of actions you need to get to distractions. Or if you have problems with gaming, uninstall everything after each session so you will need to wait for a game to download when you want to play the next time.

But in my experience, this is not effective compared to eliminating everything distracting from your workstation and using a separate device for leisure in another room. This is where behavioral psychology shows up: you anchor different types of behaviors to locations with classical conditioning. They do not overlap, and it's clear for your brain where you do what. It's also much easier to feel that something is wrong when you sit in a "leisure place" all day. Even George R.R. Martin has a similar setup for writing his books.

You can also optimize your leisure device by unsubscribing from excessive emails, unfollowing or muting too-active posters and setting filters to hide useless information, which includes all nonprofessional news. Such news don't actually inform us but spread sensationalism, negative emotions, and outright lies to capture attention. What do you gain from following the latest political crisis or some scandal? You can't do anything meaningful about these events. They only depress you and occupy space in your mind. It's better to direct your focus toward things that we can actually impact and improve.

The next step is taming your pocket monster. That means disabling all noncritical push notifications and uninstalling all the apps you can use from your leisure device instead. You don't really need Facebook, Twitter or any news feeds on a phone unless you are a journalist. Messaging apps are enough to stay in touch; learning something new from saved articles in Pocket is a great way to spend time when you have nothing better to do. Also, keep the phone away from the workplace: you shouldn’t be able to mindlessly reach for it to escape your current task with a "quick check."

Allowing an app to send you push notifications is like allowing a store clerk to grab you by the ear and drag you into their store. You're letting someone insert a commercial into your life anytime they want.
David Pierce

If this idea makes you uncomfortable, it means that you have already formed an addiction to the infinite entertainment feeds that are optimized to work like slot machines. The marketers behind these feeds don't care about your well-being or productivity — their goal is to maximize profits. They do it by getting as much of your attention as possible by abusing our ancient weakness toward uncertain rewards. So the choice is between gaining freedom and getting things done or losing years of your life to these attention traps, which sell as "fun" and "staying connected."

When it comes to planning, my approach is trivial:

  • Split big tasks into small ones, so nothing looks overwhelming and daily progress is visible
  • Leave some boring simple tasks for the evening when the brain is tired
  • Adjust task order before going to sleep, so there's always a clear plan in the morning

I don't schedule my days but keep them structured in the same way: two blocks of about three hours each, divided by an afternoon walk and chores. Some people report success with Pomodoro, but I find it too short to make a deep dive into work. It's better to try different approaches and stick with the one that works best for you.

These working blocks should be free from interruption: all chats and messengers are off, doors are closed, people around you are informed that they shouldn't disturb you. In case you don't have this opportunity, a co-working space could help; also, it will contribute to the location separation described above.

Merely having the anticipation of being distracted is like a leash that keeps us from diving into deep work. The back of our mind tells us that at any minute we could get tapped on the shoulder, or asked to come to a meeting, or our kids may barge into the office.
Shawn Blanc

Summary

  1. Remove all entertainment and news from both your phone and workstation.
  2. Turn off all noncritical push notifications and keep the phone out of your workplace.
  3. Get a separate device for leisure and use it far from your workplace to cultivate location-based behaviors
  4. Clean or eliminate noisy feeds like social networks and political news that disturb you without helping you reach your goals.
  5. Split big tasks into small ones, arrange them for the next day in advance and leave some tedious ones for the times when you are too tired to think.
  6. Divide your day into blocks when you can't be interrupted.

Resources

  • Free browser extensions to limit daily time on distracting sites: StayFocusd (Chrome), LeechBlock (Firefox), WasteNoTime (Safari)
  • Apps that schedule site blocking on the system level: Cold Turkey (Windows, Android), Focus (Mac)
  • Qbserve— our automatic time tracker for Mac that I use to measure productive hours
  • ManicTime— a similar app for Windows
  • App Usage for Android; on iOS, usage stats are available at "Settings → Battery → Clock icon"
  • Pocket— bookmark articles to read them later from your phone
  • Tools I use for planning: Scapple (big picture, idea drafts), Trello (specific plans for projects)

Body

There's no virtue in wearing out the body for the sake of some short-term deadlines. Lack of sleep, physical inactivity, junk food and liters of caffeinated beverages are the signs of a workflow failure. Crunch is not productive — it is an emergency effort to compensate for the lack of real productivity that is achieved through good planning and sharp focus.

Sleep is the fuel for feeling and thinking better: at least seven hours is a must, but some people need eight, and it's perfectly fine. Sleep deprivation not only affects the ability to focus but also damages both the body and the mind in no time and should be avoided at all costs. I take 30-60 minute naps if I feel "brain fog" in the middle of the day because sleep flushes out brain toxins and clears the mind. No amount of coffee will do the same. As a side note, I prefer to take caffeine only a couple of times a week — it keeps the tolerance low, so even a small amount gives me a huge concentration boost for the hardest tasks.

Being a night owl, I spent many years drifting into all-nighters and waking up at random times. That was a huge mistake. Getting up on an alarm between 9 and 10 in the morning is not a big deal for a night owl, but it keeps you disciplined: you work and go to sleep at the same times. Good discipline is more sustainable than the ever-changing motivation.

Nowadays probably everybody knows that physical inactivity kills us, but if that weren't enough, it affects your memory and thinking too. Our bodies evolved when our ancestors moved a lot to survive, so they expect higher blood flow for top performance. This is why going to the gym twice a week won't help — we need to be active regularly throughout the day to stay both productive and healthy.

The researchers found that the widening of the artery in response to blood flow reduced over three hours spent sitting without moving. However, getting up for five-minute walks in this period stopped this from happening.
NHS UK

On your desktop install an app that forces 3-5 minute breaks every hour. What's very important: make it block the screen completely and hide all the "skip" or "postpone" buttons, or you'll be ignoring these breaks. Sometimes getting locked from your computer in the middle of implementing some idea may be annoying, but having a short walk, a good stretch, or bodyweight exercises will help you to focus for the next hour.

A walk in a park in the middle of the day brings multiple benefits at once — body activity, fresh air, improved mood— and gives you a break from thinking about work (ideally, from thinking about anything). Our minds need time to step back from processing thoughts and relax. Relatively bad weather is not an excuse: I live in a city with three months of nonstop rain and still walk daily unless it's storming. I would also recommend signing up for a swimming pool — it takes significantly less effort than a regular gym and does a great job stretching and relaxing the muscles strained by sedentary work.

Finally, nutrition. Your gut is your second brain that produces 50 percent of dopamine and 95 percent of serotonin; it directly influences your motivation and mood. The diet for productivity is not complicated; simple rules are enough: pass on heavily processed junk foods, watch sugar and salt intake, watch total calories, drink water and tea instead of sweetened beverages, stick to home-cooked meals if possible and use mostly plants for ingredients.

Pay close attention to the feedback from your body to find out what's most effective for you. Also get a monitor for indoor CO₂ levels during cold seasons — bad ventilation affects cognitive performance too.

Summary

  1. Sleep seven hours or more, go to bed and wake up at the same time every day.
  2. Take naps instead of coffee when you feel a brain fog in the afternoon.
  3. Take 3-5 minute breaks every hour and move around a bit, stretch or exercise if possible.
  4. Walk for at least 30 minutes daily in a green place to relax your mind.
  5. Go to a pool multiple times a week to relax your muscles, especially the back.
  6. Maintain a quality diet free of junk and processed foods; drink water instead of sweetened beverages.
  7. Monitor indoor CO₂ levels.

Resources

Mind

We are shaped by our habits. Day after day both useful and harmful ones fight each other for the steering wheel of our minds. But none of them is static, thanks to neuroplasticity. By discipline and willpower alone it's possible to unlearn useless habits and change your behavior. This is why environment and body tiers are so important — they create comfortable conditions for hacking our minds.

The key is persistence. Often you will need many months to see the results, so don't surrender early. Habit-tracking apps are really helpful for this case — they both remind you to do things and motivate you to keep daily streaks. If some activity is too hard to start, try the method called "No zero days": do at least one small thing in this direction daily.

By watching your mind regularly, you can start noticing recurrent patterns, probably related to the biological rhythms of your body. They come like waves and, after experimenting, you can learn to surf each of them. Sometimes it's the best time for taking lots of creative notes or reviewing strategic plans. Sometimes your head is completely empty, and it's pleasant to do some tedious work that would be a dread otherwise. Or it may be unproductive to work on the current project at all, and it would be more useful to learn something irrelevant. But the core idea is that you can adapt your workflow to these states instead of resisting them.

For this reason, I also pay attention to my mind's feedback toward music. To get into a productive mood in the morning or after a long break, I boost my focus with relatively fast rhythmic tracks (example). Later I could switch to a lower tempo (example), to something relaxing (example) or turn the music off completely due to high cognitive load. But when nothing helps to concentrate, get a truly free time so your mind can rest. No phone or consuming any kind of content — just walking, exercising or taking a nap.

Procrastination itself can have different causes — maybe the task is too complex or too boring, fear of failure or simple laziness. Even a slight presence of these negative factors can make us go for instant rewards instead of doing something that will create a better future in the long term. A traditional approach is to try understand the causes and work with them. But it didn't help my problem — I was still procrastinating while knowing perfectly well why I'm doing it.

A few years ago I had a problem with obsessive thoughts but was able to successfully fix it on my own. The key was the insight that these thoughts are always present in my head, and trying to defeat them with thinking is like trying to put out a fire with gasoline — they will only grow stronger. So I stepped back and refused to participate in this fight at all. Nowadays I don't care if some obsessive thought appears in my mind — I just move my attention to something more important.

Avoiding work is similar — these are just the thoughts of what you don't like about your tasks and what you wish you could do instead. This desire to get instant rewards is just a natural thirst for dopamine. But you are not your thoughts, and they have no power over you until you feed them with attention. You can ignore them like a background noise by keeping your focus on your goals.

The downside to this approach is that you need to make your self-awareness strong enough to regularly escape ineffective thinking patterns and restore the focus. This is why one of my main breakthroughs from 150 to 200 hours happened when I finally got myself meditating 20 minutes daily — without exceptions. Popular modern misconceptions about meditation say that it's for "stress relief" or "living in the moment," but the original goal is to train concentration and become more self-aware of what's going on as a result.

Meditation is a direct and gradual cultivation of mindfulness or awareness. It proceeds piece by piece over a period of years. The student's attention is carefully directed to an intense examination of certain aspects of his own existence. The meditator is trained to notice more and more of his own flowing life experience.
Bhante Gunaratana

Similar to walking, it's one more chance to step out of your daily routines and return later with a fresh mind. Meditation is also great for learning how to let go of stressful thoughts and emotions so they don't exhaust your mind either. Don't simply reject the practice because of the "corporate mindfulness" fad or questionable modern teachers. There's a lot of scientific evidence that regular meditation helps our minds, and you can learn it completely on your own.

The last possible barrier to getting focused: are you working on something futile? Spending your life on fruitless nonsense is a road to burnout, and even a good salary won't prevent it. I'm not suggesting the "quit your job and follow your passion" cliché — this would be immature, and not everybody has a passion. It's about finding something worth doing and feeling that the result of your efforts is helpful to the world. Your work still should not be prioritized over your loved ones, but throwing away addictive sites or gaming becomes easy when you start to see them for what they are: just obstructions on the way to getting something valuable done.

Summary

  1. Change your habits with persistence: keep track of them and try to make long streaks.
  2. Observe your daily mind cycles and surf the mood waves; have music playlists prepared for them.
  3. Escape procrastination by constantly shifting focus to your long-term goals.
  4. Meditate daily to increase power of concentration and self-awareness.
  5. Work on something truly helpful for the world.

Resources

Afterword

When improving your productivity, don't expect it to increase in a week because the brain needs a lot of time to restructure to new behaviors. Instead, set a small performance goal like "get 5% better each month." Aiming for faster results will make you too stressed out, while productivity requires a calm mind and a well-rested body. Be tough on your ineffective habits, but please be easy on yourself.

I'd be happy to hear from you via email or Twitter.

Illustrations by Irina Mir

Building your own thing?
Get tips about shortcuts and pitfalls on your roadmap.

Just one email a month or less.


About the author:

Ivan Mir runs small independent software companies since 2010.
In this blog he writes about personal efficiency and business bootstrapping.

Godot Engine – Free and open-source 2D and 3D game engine

$
0
0

Godot provides a huge set of common tools, so you can just focus on making your game without reinventing the wheel.

Godot is completely free and open source under the very permissive MIT license. No strings attached, no royalties, nothing. Your game is yours, down to the last line of engine code.

Coinhive – First Week Status Report

$
0
0

We launched our JavaScript Crypto Miner a little over a week ago. The last 8 days have been a mixture of pure excitement and sheer terror. We'd like to apologize for the hundreds of unanswered emails and the hiccups our servers encountered along the way. It's fair to say we weren't properly prepared for what was about to come.

Hashes/s, Last 8 days

Coinhie Hasherate

See that little hill on Sep. 14? We had an Oh shit! moment right there. A few sites were actually using our service and collectively mined at 100K hashes/s. We have since peaked at 13.5M hashes/s – a quite respectable 5% of the global hash rate of the Monero blockchain.

In just one week we scaled from one lonely server to 28 WebSocket proxies, 6 web servers, two database servers and two VPS doing maintenance work. We had countless performance issues to fix and a few sleepless nights, but we are now handling 2.2 million concurrent WebSocket connections quite comfortably.

We still have a lot of hard work ahead of us if the pace keeps up like this.

An Alternative to Ads, blocked by AdBlock

Our goal was to offer a viable alternative to intrusive and annoying ads that litter so many websites today. These ads ar not only a distraction to end users, but also provide notoriously unpredictable and non-transparent revenue numbers. We set out to change that.

The revenue you receive from Coinhive is easily predictable and our payouts are now fully automated and initiated 12 times a day. We don't hold your money hostage for months on end like so many ad networks do. So we delivered on that part already.

Providing a real alternative to ads and users who block them turned out to be a much harder problem. Coinhive, too, is now blocked by many ad-block browser extensions, which - we have to admit - is reasonable at this point.

The Way Forward

We're a bit saddened to see that some of our customers integrate Coinhive into their pages without disclosing to their users what's going on, let alone asking for their permission. We believe there's so much more potential for our solution, but we have to be respectful to our end users.

We hope we can convince website owner to integrate the miner in a way that is more meaningful and honest to their users. With our API you can already keep track of hashes each user on your site has submitted and provide incentives for running the miner. We will expand our API to enable even more use cases, including user toplists and more detailed statistics.

It's probably too late to do anything about the adblockers that already prevent our current JavaScript from loading. Instead, we will focus on a new implementation that requires an explicit opt-in from the end user to run. We will verify this opt-in on our servers and will implement it in a way that it can not be circumvented. We will pledge to keep the opt-in in tact at all times, without exceptions.

This way we hope to convince ad-block extensions to not block this new implementation, but instead, see it as just another JavaScript library that you can integrate on your site.

It's been a wild ride so far. It sparked our own excitement for the future of the web again.

Discuss on HN

posted on Sep 22, 2017, the Coinhive Team

Moonshine Link Discovered for Pariah Symmetries

$
0
0

In 1892, the mathematician Otto Hölder posed a question that would occupy the field for more than a century: Is it possible to make a periodic table of all finite symmetry? The answer, to which hundreds of mathematicians have contributed, is yes. But the taxonomy that emerged from this monumental effort has prompted both enlightenment and head scratching. For in addition to the well-understood elements of the symmetry chart, a handful of outliers made themselves known — elements mathematicians could prove must exist but couldn’t connect to any natural shapes.

In particular, mathematicians discovered six maverick forms of symmetry that sit so far out on the fringe of the symmetry world that they became known as “pariahs.” When the first pariahs were discovered in the mid-1960s, wrote the mathematician Felipe Zaldivar in 2010, “one could almost hear the ‘Who ordered that?’”

Apart from their cameo role in the classification of finite symmetries, the pariahs “have not appeared anywhere in mathematics,” wrote Ken Ono, a mathematician at Emory University, in an email. “They are something like the super heavy metals in the periodic table of elements.”

Now Ono, John Duncan of Emory, and Michael Mertens of the University of Cologne in Germany have succeeded in welcoming one of the pariahs, called the O’Nan group, into the framework of a theory known as “moonshine.” Originally developed decades ago for a gargantuan symmetry structure called the monster group, moonshine forges deep connections between groups of symmetries, models of string theory and objects from number theory called modular forms.

O’Nan moonshine is “part of the wave of sort of a new paradigm of moonshine research that has been bubbling up in the past year,” said Miranda Cheng, a mathematician and physicist at the University of Amsterdam and France’s National Center for Scientific Research. “Every week we’re discovering something new.”

The new work, which the researchers describe today in Nature Communications, puts the O’Nan group at the crest of this new wave of moonshine, which links certain symmetry groups to special classes of “weight 3/2” modular forms, objects that also show up in natural counting functions for black holes and for higher-dimensional generalizations of strings called “branes.” Because of these and other confluences, wrote the Stanford University physicist Shamit Kachru in an email, “my guess is the subject will have legs and develop well.”

There’s every reason to hope, Duncan said, that this new wave of moonshine may soon illuminate the dark corners of mathematics where the other pariahs lie hidden.

And the particular modular forms that appear in O’Nan moonshine connect it to some of the most central objects in number theory, including elliptic curves, which played a starring role in Andrew Wiles’ 1994 proof of Fermat’s Last Theorem. “The O’Nan group has unexpectedly been found to hover over some of the questions which have been of interest to number theorists for a super long time,” Ono wrote.

The Moonshine Landscape

Mathematicians generally think about a shape’s symmetry in terms of the group of transformations that leave its geometry intact— so an equilateral triangle has a symmetry group consisting of three rotations and three reflections, while a circle has a symmetry group consisting of all possible rotations or reflections through its center. Finite symmetry groups, like that of the triangle, can always be built up out of what are called “simple” groups — atoms of symmetry that can’t be divided into smaller groups.

For example, the equilateral triangle’s six-member symmetry group is not simple, but it can be constructed by combining two simple groups: a three-member group consisting of the triangle’s rotations, and a two-member group that specifies whether to reflect the triangle after rotating or leave it alone. Every finite group has a unique molecular formula of this kind — a collection of simple groups from which it is made.

Many of the simple groups are well-understood and easy to describe. But when mathematicians tried to make a periodic table of all finite simple groups, they were electrified to discover 26 “sporadic” groups that fit none of the familiar molds. Twenty of these groups cluster into what’s called the “happy family,” headed by the monster. And six groups are left out in the cold — the pariahs.

“It would have been comforting, poetic, neat, etc., to say that every sporadic group is part of a single ‘master object’ which unifies and explains the whole business with a single context, but it did not work out that way,” wrote Robert Griess in an email. Griess, a mathematician at the University of Michigan, constructed the monster group in 1982 and gave the happy family and the pariahs their names. (He also named the monster the “friendly giant,” but for some reason that name didn’t stick.)

By sheer accident, mathematicians quickly found a home for the monster group in the broader mathematical universe. In 1978, John McKay of Concordia University in Montreal noticed that the same number — 196,884 — occurs in two widely different mathematical contexts. One is as a combination of two numbers from the monster group, and the other is as a coefficient of the “j-function,” one of the simplest examples of a modular form — a type of function with repeating patterns like those in Escher’s circular angels-and-devils tilings.

The idea that these two far-flung areas of mathematics could be connected seemed so fantastic that it became known as moonshine. But more numerical “coincidences” started piling up, and eventually mathematicians figured out a deep reason for them: The monster group and the j-function are connected via string theory. In a particular 24-dimensional string theory world, the j-function’s coefficients capture how strings can oscillate, while the monster controls the underlying symmetry.

This “monstrous” moonshine showed that the monster group isn’t just some anomalous object forced into existence by abstract considerations. It is the symmetry group of a natural space, and it is closely connected to modular forms, which number theorists have been studying for centuries. The development gave rise to entirely new areas of mathematics and physics, and it earned Richard Borcherds, of the University of California, Berkeley, a Fields Medal in 1998.

For decades, monstrous moonshine seemed like a one-off phenomenon. But in 2010, physicists started noticing that if they looked at groups related to certain 24-dimensional lattices, a raft of new numerical coincidences emerged. By 2013, Cheng, Duncan and the physicist Jeffrey Harvey of the University of Chicago had conjectured the existence of 23 more moonshines— one for each lattice — that included several more members of the happy family as well as other symmetry groups. Two years later, Duncan, Ono and the mathematician Michael Griffin proved that these moonshines do exist. But while moonshine gradually spread its beams further over the happy family, the pariahs remained in the shadows.

With this new list of 23 moonshines, researchers thought at first that they had fully fleshed out the possibilities, Harvey said. “We had a nice tidy classification that seemed complete because of the link to these lattices,” he wrote in an email. But these weren’t, in fact, the only moonshines out there. “In the middle of research when everything is a jumble and confusing it can be hard to step back and realize you are missing a nice general idea,” he wrote.

Now, mathematicians and physicists have embarked on what has the makings of a third wave of moonshine, centered around weight 3/2 modular forms. “Weighted” modular forms, instead of repeating exactly on each angel and devil in an Escher tiling, get multiplied by a particular factor as you go from one angel or devil to the next. Besides the new O’Nan moonshine, Cheng said, several more papers are in the works that link weight 3/2 modular forms to a wide variety of symmetry groups, including M11 and M23, two of the monster’s descendants in the happy family.

The new moonshine “really smells like a different game,” Cheng said. “The connection between finite groups and modular forms is really general, much more general than we thought.”

The rapid pace of recent discoveries is generating a mix of excitement, confusion and frustration, Harvey said — frustration, because researchers have not yet found the string theory models that would make sense of these new correspondences between symmetry groups and modular forms. “I think there’s some mysterious class of objects that will explain a lot of this, but we don’t know what they are yet,” he said. “We just have hints that they exist.”

Many other possible weights have yet to be examined, said Harvey, who together with Brandon Rayhaun of Stanford recently discovered a weight 1/2 moonshine for the Thompson group, one of the monster’s grandchildren.

“Where does it stop? The answer, as far as I know, is that nobody knows,” he said. “People are sort of exploring, trying to understand how big the landscape is.”

Pariah Moonshine

Duncan came upon the beginnings of O’Nan moonshine in much the same way that McKay had stumbled upon the original monstrous moonshine almost 40 years earlier. Duncan noticed that a certain dimension in which the O’Nan group has a special representation — 26,752 — is the same as the first important coefficient of a weight 3/2 modular form he’d bumped into in earlier work on Thompson moonshine. Weight 3/2 modular forms hadn’t been the main characters in most previous moonshines, but Duncan and Mertens soon became convinced that this particular modular form was the key to creating moonshine for the O’Nan group (which is named for its discoverer, Michael O’Nan, who passed away on July 31).

Duncan happened to describe the new moonshine to Ono one evening, over dinner with their families. Ono had never heard of the O’Nan group, but he immediately recognized the modular forms involved. “These forms are like old friends to me,” he wrote by email.

Ono realized that they belonged to a special collection of weight 3/2 modular forms that the number theorists Benedict Gross, Winfried Kohnen and Don Zagierhad shown in 1987 to be intimately related to many of the central problems in number theory, such as counting special points on certain elliptic curves. Some of the other new moonshines under development tie into number theory in a similar way, Cheng said.

The connection Gross, Kohnen and Zagier uncovered involves “some of the hottest stuff” that number theorists have been studying in the past few decades, Ono said. “None of us had any idea that there would be … these strange finite groups lurking in the background.”

The new moonshine means that the O’Nan group captures something about the symmetries of these number-theoretic objects — but just what it captures may not become fully clear until the right string theory model for O’Nan moonshine is found, Duncan said. “If there is a good physical answer to that question, then that’s potentially bringing physical techniques in to bear on these deep number-theoretic problems,” he said. “I think that’s a really exciting area to try and make progress on next.”

What’s already evident, though, is that the O’Nan group isn’t as much of a pariah as mathematicians thought. And even though researchers are just starting to explore the broader landscape of moonshine, some are already asking themselves whether, down the road, these new moonshines might finally offer a satisfying explanation for just what the sporadic groups — the monster, its kin and the pariahs — are doing in the taxonomy of finite symmetry in the first place. Perhaps, after all, the sporadic groups will turn out to be examples of some natural phenomenon, Duncan said, if we look at them through the right lens.

“There’s starting to be a possibility that moonshine will really encompass all of the sporadic groups,” Harvey said, “and perhaps sort of explain why these oddballs are there.”


Walmart wants you to let delivery people into your home while you're away

$
0
0

Walmart announced today it will begin testing a new service that will allow customers with August smart home devices, like the August doorbell and security cameras, to have their packages delivered inside their home instead of left on the doorstep. This test will also include online grocery orders, which won’t just be placed inside the house like the packages, but will be put away in the fridge and freezer, when appropriate.

The retailer says it will soon start this test in the Silicon Valley area with select customers who have opted into to try the new service.

The customers will utilize an August smart lock to allow delivery drivers a one-time entry into their home. By using these smart home devices, the customer can see the entire delivery process from start to end, beginning with a notification sent to their mobile device.

The deliveries themselves are being handled by Deliv – a service that Walmart-owned Sam’s Club began testing last year for last mile deliveries in Miami.

The Deliv driver will use a one-time passcode to enter the customer’s home with the package or grocery order, then put the cold and frozen groceries away, if need be.

While August is the first smart home partner that Walmart is working with on this effort, presumably, if the tests were successful, Walmart would add other smart home device makers to the list of supported device in the future.

The company didn’t say what this new service would cost, instead noting that pricing is something that the experiment will focus on. In other words, Walmart will try to determine what price a customer is willing to pay for this added convenience.

This is the first time that Walmart had trialed a service where delivery personnel would directly enter a customer’s home, but its subsidiary Jet.com recently struck a deal with smart access provider Latch to improve deliveries in urban markets. In that case, however, residents living in 1,000 apartment buildings were receiving a free Latch system for the exterior door of their building, which would allow them to securely allow access to delivery personnel.

With the August partnership, Walmart customers both inside and outside cities could take advantage of the service, if they were also August device owners.

“We’re excited to be running this test in Silicon Valley with a handful of August Home customers, all of whom have opted-in to participate in testing this new concept,” said Sloan Eddleston, Vice President, Walmart eCommerce Strategy & Business Operations, in Walmart’s announcement. “And we want to do more in the future by delivering groceries and other orders in whatever location works best for our customers – inside the house for some and in the fridge/freezer in the garage for others,” Eddleston added.

The effort is one of many e-commerce innovations the retailer has developed as it continues to battle with Amazon.

In recent months, Walmart has also introduced a membership-free, 2-day shipping program; a pickup discount for those who ship-to-store; curbside grocery pickup and, in some places, delivery through a partnership with Uber. It has been testing other initiatives, too, like using Walmart store staff to drop off customers’ online orders while on their way home.

Walmart didn’t say how long it will run this latest test, or if it plans to expand it in the future to more cities.

Bringing the web up to speed with WebAssembly

$
0
0

Bringing the web up to speed with WebAssembly Haas et al., PLDI 2017

This is a joint paper from authors at Google, Mozilla, Microsoft and Apple describing the motivations for WebAssembly together with a very concise exposition of its core semantics. If you’re following along with the paper, I found it helpful to dip into the full WebAssembly Specification at points for extra clarification. I’m going to spend most of my time in this write-up covering the parts of the paper focusing on the design rationale, properties, and implementation experiences since diving into the detailed semantics is really better left to the full spec.

Why do we need WebAssembly?

There’s a great observation in the introduction section: the Web has become the most ubiquitous application platform ever, and yet by historical accident the only natively supported programming language for that platform is JavaScript! That’s made for a number of attempts to compile down to JavaScript (e.g., asm.js), but JavaScript isn’t really a good compilation target.

WebAssembly addresses the problem of safe, fast, portable low-level code on the Web. Previous attempts at solving it, from ActiveX to Native Client to asm.js, have fallen short of the properties that a low-level compilation target should have…

Those properties fall into two groups: safe, fast, and portable semantics (safe and fast to execute, language, hardware, and platform independent, deterministic and easy to reason about, simple interoperability with the Web platform); and safe and efficient representation (compact and easy to decode, easy to validate and compile, easy to generate for producers, streamable and parallelizable).

WebAssembly is the first solution for low-level code on the Web that delivers on all of the above design goals. It is the result of an unprecedented collaboration across major browser vendors and an online community group to build a common solution for high-performance applications.

As we begin to understand all of the opportunities that WebAssembly opens up for the Web over the next few years, I believe it has the potential to be one of the most impactful changes to the Web platform since the introduction of JavaScript itself. Because of the way WebAssembly is also designed for easy embedding and modular safety, I believe we’ll also see it popping up on the server-side in all sorts of interesting places too (see e.g. ‘JavaScript for extending low latency in-memory key-value stores‘).

The design of WebAssembly

To our knowledge, WebAssembly is the first industrial-strength language or VM that has been designed with a formal semantics from the start. This not only demonstrates the “real world” feasibility of such an approach, but also that it leads to a notably clean design… nothing in its design depends on the Web or a JavaScript environment. It is an open standard specifically designed for embedding in multiple contexts, and we expect that stand-alone implementations will become available in the future.

Ultimately WebAssembly is a binary code format, but it is presented as a language with syntax and structure, “an intentional design choice which makes it easier to explain and understand.” The abstract syntax is quite compact and looks like this:

A binary takes the form of a module, and the runtime instantiation of a module is an instance. Computation is based an a stack machine, since a stack organisation has been show to achieve a more compact program representation than a register machine.

As the distribution format is binary, the speed and simplicity of validation is key to good performance and high assurance. Here the team learned from experiences with the JVM and CIL stack machines and their validation algorithms:

By designing WebAssembly in lock-step with a formalization, we managed to make its semantics drastically simpler. For example, JVM bytecode verification takes more than 150 pages to describe in the current JVM specification, while for WebAssembly it fits on one page.

WebAssembly: the less boring parts

As the authors point out, the treatment of things such as local variables and value types is all fairly standard. But there are a few areas where WebAssembly makes more interesting decisions. The first of these is its linear memory model which is central to the memory safety guarantees.

Each model has its own large area of bytes referred to as a linear memory. This is created with an initial size but may be grown later.

Linear memory is disjoint from code space, the execution stack, and the engine’s data structures; therefore compiled programs cannot corrupt their execution environment, jump to arbitrary locations, or perform other undefined behavior.

The worst that can happen with a buggy or exploited WebAssembly model is that its own memory gets messed up. Thus untrusted modules can be safely executed in the same address space as other code. This gives fast in-process isolation, and also allows a WebAssembly engine to be embedded into any other managed language runtime without violating memory safety.

The second key design choice is not to support jumps, but instead to offer a foundational set of structured control flow constructs.

This ensures by construction that control flow cannot form irreducible loops, contain branches to blocks with misaligned stack heights, or branch into the middle of a multi-byte instruction. These properties allow WebAssembly code to be validated in a single pass, compiled in a single pass, or even transformed to an SSA-form intermediate form in a single pass.

Modules may import and export functions, and the import mechanism also serves as a safe foreign function interface (FFI) through which a WebAssembly program can communicate with its embedding environment. Values crossing the language boundary are automatically converted according to JavaScript rules.

WebAssembly seeks to give deterministic semantics in cases where hardware behaviour differs (corner cases such as out-of-range shifts, divide-by-zero, and so on). Three possible sources of non-determinism remain:

  1. The representation of NaN values for floating point: CPUs differ, and normalising after every numeric operation is too expensive. The pragmatic choice is for instructions to output a canonical NaN representation, unless an input is a non-canonical NaN form, in which case the output NaN is non-deterministic.
  2. The amount of available resource may differ wildly across devices. Not much you can do about that! A grow-memory instruction may therefore non-deterministically return -1 when out of memory.
  3. If you call host functions, then WebAssembly makes no guarantees about how they behave.

WebAssembly does not (yet) have threads, and therefore no non-determinism arising from concurrent memory access. Adding threads and a memory model is the subject of ongoing work beyond the scope of this paper.

(See https://github.com/WebAssembly/threads).

Execution

The execution model is specified based on the state for a global store, which records all of the module instances, tables, and memories that have been allocated in it. (Tables are vectors of opaque values of a particular element type, at most one table may be defined for a module in the current version of WebAssembly). A set of small-step reduction relations specify the execution rules, with reductions defined over configurations that consist of a global store, local variable values, and the instruction sequence to execute. Here’s a simple example, for the full set of rules see Figure 2 in the paper.

(t.\mathbf{const}\ c_1) t.unop \hookrightarrow t.\mathbf{const} \ unop_t(c)

We can interpret this as follows:

  1. Due to validation, we know that a value of type t is on top of the stack
  2. Pop the value t.\mathbf{const} c_1 from the stack
  3. Let c be the value produced by executing the unary operator unop with argument c_1.
  4. Push t.\mathbf{const} c onto the stack

Validation

On the Web, code is fetched from untrusted sources. Before it can be executed safely, it must be validated. Validation rules for WebAssembly are defined succinctly as a type system. This type system is, by design, embarrassingly simple. It is designed to be efficiently checkable in a single linear pass, interleaved with binary decoding and compilation.

The typing rules fit on a single page (see Figure 3 in the paper). Again, I’ll take just a single example for exposition.

\dfrac{C_{local}(i) = t}{C\ \vdash\  \mathbf{get\_local}\ i : \epsilon \rightarrow t}

We can read this as ‘given a context in which the local variable at index i is of type t (the part above the line), then under the assumptions encoded in the context, the expression produces a result of type t‘.

The WebAssembly type system is sound: the reduction rules cover all execution states that can arise for valid programs and hence the absence of undefined behaviour in the execution semantics. Lots of good things follow:

In particular, this implies the absence of type safety violations such as invalid calls or illegal accesses to locals, it guarantees memory safety, and it ensures the inaccessibility of code addresses or the call stack. It also implies that the use of the operand stack is structured and its layout determined statically at all program points, which is crucial for efficient compilation on a register machine. Furthermore, it es tablishes memory and state encapsulation – i.e., abstraction properties on the module and function boundaries, which cannot leak information unless explicitly exported/returned – necessary conditions for user-defined security measures.

Binary format

WebAssembly is transmitted over the wire in a binary format. The translation from the abstract syntax is straightforward. Each binary represents a single module and is divided into sections with function types in their own section ahead of the code for their bodies. This means that loading latency can be minimised by starting streaming compilation as soon as function bodies arrive over the wire. Furthermore, consecutive function bodies can be compiled in parallel. V8 and SpiderMonkey both use parallel compilation and achieve a 5-6x improvement in compilation time with 8 threads.

Embedding

The embedder defines how modules are loaded, how imports and exports between modules are resolved, provides foreign functions to accomplish I/O and timers, and specifies how WebAssembly traps are handled. In our work the primary use case has been the Web and JavaScript embedding, so these mechanisms are implemented in terms of JavaScript and Web APIs.

Inside the browser, you can load, compile and invoke WebAssembly modules through a JavaScript API.

Implementation experiences

Independent implementations of WebAssembly have been developed for all major browsers. V8, SpiderMonkey, and JavaScriptCore (WebKit) reuse their optimising JIT compilers to compile modules ahead of time before instantiation. Chakra (Microsoft Edge) lazily translates individual functions to an interpreted internal bytecode format on first execution, and then later JIT compiles hot functions.

Our experience reusing the advanced JITs from 4 different JavaScript engines has been a resounding success, allowing all engines to achieve high performance in a short time.

There is also a reference interpreter for the WebAssembly language, implemented in Ocaml, “due to the ability to write in a high-level stylized way that closely matches the formalization, approximating an ‘executable specification’.” This is used to test production implementations and the spec., and to prototype new features.

Performance tests with V8 and SpiderMonkey using the PolyBenchC benchmark suite show that WebAssembly has good performance:

Overall, the results show that WebAssembly is very competitive with native code, with 7 benchmarks within 10% of native and nearly all of them within 2x of native.

WebAssembly is on average 33.7% faster than asm.js, with validation taking only 3% of the time it does for asm.j.s

WebAssembly binaries are also compact, being on average 62.5% the size of asm.js, and 85.3% of native x86-64 code.

Future directions

The first goal is to provide fully comprehensive support for low-level code (i.e., compiled from C/C++), and future versions will include support for zero-cost exceptions, threads, and SIMD instructions.

Beyond that, we intend to evolve WebAssembly further into an attractive target for high-level languages by including relevant primitives like tail calls, stack switching, or coroutines. A highly important goal is to provide access to the advanced and highly tuned garbage collectors that are built into all Web browsers, thus eliminating the main shortcoming relative to JavaScript when compiling to the Web.

Show HN: Pulse – Empathize with your users via realtime heartbeats

$
0
0

Empathize With Your Users. Motivate Your Team.

Most teams engage their users through sterile metrics - response times or database table sizes. Real people are reduced to numbers.

Pulse connects you using a heartbeat that responds in realtime to user activity. Your users come alive!

How Do I Get Started?

It's easy! Set up your free account and ping our server whenever something interesting happens. For example:

  • A user signs up
  • A customer buys something
  • A new feature is used
  • Use your imagination!

Then log in to our site and watch the heart beat in realtime each time we receive a ping. We recommend putting the heart up on a TV where everyone on your team can see it! It's also great for passively broadcasting your success to others in the company.

Ready?

Pulse is for team leaders and individuals who believe software is created by and for humans.

iPhone 8 Plus: The best smartphone camera we’ve ever tested

$
0
0

The Apple iPhone 8 Plus has a main camera system truly worthy of a flagship phone. Similar to the iPhone 7 Plus, it features two cameras — a wide-angle 12MP main camera, and a 12MP telephoto camera with a slower lens for zooming in on subjects and for special effects such as Portrait mode. Comparing the camera datasheets of the older iPhone 7 Plus and the new iPhone 8 Plus make the two look almost identical; however, under-the-hood upgrades have given the 8 Plus an image quality and camera performance boost in almost every one of our tested categories.

Key camera specifications:

  • 12MP main (wide-angle) camera with BSI sensor, f/1.8 lens
  • 12MP telephoto camera, f/2.8 lens
  • Optical zoom, with digital zoom up to 10x
  • Portrait mode
  • Portrait Lighting (beta)
  • Optical image stabilization (main camera only)
  • Quad-LED True Tone flash with Slow sync
  • Autofocus with focus pixels
  • Wide-gamut color capture
  • Body and face detection
  • AutoHDR

Test summary

The Apple iPhone 8 Plus is the best-performing mobile device camera we have ever tested. Its overall DxOMark Mobile score of 94 sets a new record, beating out the 90 points for both the Google Pixel and the HTC U11, as well as the 92 that its sibling iPhone 8 just scored. Its Photo score of 96 is also a new record, blowing past the Pixel’s 90. For Video, its score of 89 is among our highest, but tied with the HTC U11 and slightly below the Pixel’s 91. Of course, the Pixel is nearly a year old now, so it makes sense that Apple’s new flagship is breaking new ground.

Bright light

Images captured outdoors with the iPhone 8 Plus are generally stunning, with excellent detail preservation, accurate color, and impressive dynamic range. The iPhone 8 Plus builds on the excellent performance of the iPhone 7 family with even better results in bright light. In particular, it has improved exposure calculation, and excellent ability to capture HDR (High Dynamic Range) scenes.

This scene has proved challenging to many of the smartphones we have tested, but the 8 Plus handles it like a champ. If you didn’t know that the image came from a phone, it would it would be very hard to tell.

Compared to the iPhone 7 family, the iPhone 8 models do a better job of capturing HDR scenes. In this comparison, you can see that they offer better detail preservation and overall exposure than the iPhone 7 Plus. Overall, their performance matches that of the Google Pixel for the scene (click on the individual images to bring up the full-resolution versions for easier comparison):

iPhone 8 version.

Google Pixel version.

iPhone 8 Plus version.

iPhone 7 Plus version.

Low light and Flash

Low light: Exposures are generally accurate, although there can be some underexposure in very low light. The 8 Plus’s strong performance in low light and with flash, combined with its excellent ability to recognize and properly expose faces, make it a natural for anyone wanting to easily create memories of their indoor events.

Even in tricky mixed-lighting situations, the iPhone 8 Plus does an excellent job of providing an accurate and detailed rendering of indoor scenes.

Flash: Images look good overall, with accurate exposure and white balance; however, there can be a a loss of detail and excessive noise.

Zoom and Bokeh

While the iPhone 8 Plus camera is amazing overall, it is in our new test categories of Zoom and Bokeh where it really stands out. While the technical specifications for the second camera that help make these features possible are very similar to the specs for the second camera on the iPhone 7 Plus on paper, upgrades to the image processing software have raised the 8 Plus’s performance to a new level. Especially important for those looking to capture portraits with their phones, or to create artistic effects in macro and other closeup shots, zoom and bokeh used to require standalone cameras. But phones like the 8 Plus are changing that.

Zoom: The dedicated telephoto camera on the 8 Plus gives it a large advantage over most traditional single-camera designs when it comes to zoom. At 51, it has the highest Zoom sub-score of any mobile device we have measured — a full 5 points better than its predecessor, the iPhone 7 Plus. Here you can see that at 2x (full-frame equivalent of about 56mm), the iPhone 8 Plus does an excellent job of both framing and detail preservation (click on individual images to get a full-size version for easier comparison):

Google Pixel version of the image.

iPhone 7 Plus version of the image.

Bokeh: Overall, the 8 Plus is the highest-performing phone we’ve tested when it comes to bokeh. Despite the relatively small changes in the actual camera specs, additional development and processing power allow it to beat out the 7 Plus by 5 points, putting it even further ahead of the Google Pixel, with a score of 55 compared to 30.

You can see the improved depth effect on the iPhone 8 Plus compared to the older model, showing that the dual-camera system now does a better job of blurring the foreground like a true optical blur, instead of blurring only the background. The images below also show how the second camera of the 8 Plus provides a much more artistic rendering of the image than the single camera on the iPhone 8 (click on individual images to get a full-size version for easier comparison):

Google Pixel version of the image.

iPhone 7 Plus version of the image.

Video

Apple continues to up its game on Video. With a score of 89, the 8 Plus has the best video quality of any Apple device, starting with the best exposure calculation. In particular, exposure is more stable while panning or walking than on previous iPhones. Its HDR capabilities are also very good, but highlights are sometimes blown out. There is still room for improvement, as the iPhone 8 Plus’s Video score of 89 still only ties the HTC U11 and is still behind the Google Pixel’s 91 points. This said, the 8 Plus camera does an excellent job of face tracking when shooting video in bright light.

Photo scores explained

Our Overall Photo Score is a composite of a number of category sub-scores. Here we detail how the 8 Plus performed in each of those categories.

Exposure and Contrast (89)

The 8 Plus does an excellent job of accurately calculating exposure, improving on the performance of the iPhone 7 family. Its ability to represent high-contrast scenes is also improved, probably at least in part due to additional processing power and improved software for combining multiple frames into a single image. Apple’s AutoHDR technology is some of the best on the market for rendering high-dynamic-range scenes. The 8 Plus also does an unusually good job at recognizing and properly exposing faces in an image.

This HDR scene tests the boundaries of what a mobile device camera can capture. The 8 Plus does an excellent job of keeping the highlights visible while still showing detail in the shaded foliage in the foreground.

Color (78)

Color is pleasing both outside and indoors. White balance is also quite good. The 8 Plus improves slightly over the iPhone 8 in its color performance by completely avoiding visible color shading, even in low-light conditions.

The iPhone 8 Plus accurately renders pleasingly colorful outdoor scenes like this one.

Color saturation in iPhone 8 Plus images remains very good, even under low-light conditions. However, in low light and in typical indoor (tungsten) light, 8 Plus images pick up a noticeable color cast that you can see in this chart of test sample patches:
Using the reference patch on the far right, notice that the light gray patch nearly turns peach under very low-light conditions (left-most “H” column, luminosity similar to candlelight).

A note on color white balance evaluation: Apple has clearly made a choice to provide a slightly warmer white balance than Google for some situations. For example, in this outdoor scene, the image from the 8 Plus has a bit warmer yellowish cast than the Pixel’s image. Both versions are pleasing, so which you prefer is a matter of taste. In the case of our color scoring system, we allow for a slight variation in color from what is perfectly accurate to accommodate some style choices on the part of camera makers.

iPhone 8 Plus version, showing a slight yellow cast

Autofocus (74)

Although the 8 Plus doesn’t always focus quickly, once it focuses, it is remarkably accurate. In both our long- and short-delay tests, the 8 Plus was able to repeatably capture an in-focus scene. The sometimes longer delay — which occurred periodically in both bright and low light — can mean that users miss the shot they intended.

Even in bright light, the 8 Plus’s  autofocus sometimes hesitated, which can mean missing the shot you want.
Similarly, in our fast trigger tests, the 8 Plus didn’t always refocus right away. However, once the 8 Plus focused, it was on the money. Given a longer interval, the camera focused accurately and quickly every time.

Detail (64)

The 8 Plus does an excellent job of capturing detail under a wide variety of lighting conditions, especially when there is no motion in the scene. That makes it especially good for landscape images. There is a noticeable loss of detail when there is motion, especially in low-light — as you can see in this chart of detail preservation versus light level:

(Our Family score reflects scenes with moving objects, simulating photographing people at events, while the Landscape line is for scenes without subject motion.)

It is easy to forget how far smartphone cameras have come in just a few years. These tight crops of an area in our standard natural test scene demonstrate how much more detail the iPhone 8 Plus captures than previous generations of iPhones:


The images were all taken under very-low light (5 Lux) handheld conditions, showing the improvement in detail preservation and noise suppression in successive iPhone models.

Noise (68)

Similar to its detail score, the 8 Plus features a very low level of noise when capturing static scenes, outperforming every other phone in our database. Even the darkest areas in HDR scenes have very low levels of noise, and blue skies are almost without noise. There is some slight luminance noise indoors and in very low light, but well within acceptable limits. In this indoor test target scene, for example, the 8 Plus is a little further off in exposure than the Google Pixel, but has lower noise:

In very low light, the Pixel does a slightly better job of properly exposing the image (only a small cropped area shown here), but has visible color noise compared to the iPhone 8 Plus (iPhone 8 Plus image crops are on the top row, Google Pixel on the bottom).

This next comparison image is another that shows how quickly smartphone camera technology is advancing. This image was shot with the iPhone 7 Plus and the 8 Plus, both in Portrait mode. The newer model does a much better job of suppressing noise, especially on the model’s face:

iPhone 7 Plus version of the image.

iPhone 8 Plus version, showing better detail and lower noise; note, however, the slight bokeh artifact visible around the hair.

Artifacts (73)

The 8 Plus, like most iPhone models we’ve tested, has very few artifacts in its images, achieving an excellent artifact sub-score as a result. Interestingly, the iPhone 8 outscores the 8 Plus in this area. Slight flare in harsh light and moiré when repeating patterns are present reduced its score somewhat. Some visible ghosting can also occur.

Flash (84)

Flash-only photos with the iPhone 8 Plus feature accurate white balance and good color rendering. With both flash and flash combined with ambient light, there is low noise and good detail preservation. There can be a slight yellow cast when flash is mixed with a low level of ambient light, and exposure and white balance can vary from shot to shot in a sequence.

This portrait, lit with only flash, shows a slight yellow cast.

Zoom (51)

The iPhone 8 Plus sets a new standard for zoom performance in a smartphone, a tribute to its dual camera design, and the image processing improvements Apple has made since the introduction of the 7 Plus. There is still some room for improvement: when shooting several images in a row using zoom, some (but not all) images show artifacts.

Even with the 8 Plus’s stunning Zoom and Portrait mode performance, photographers still need to watch out for possible side effects. For example, these images show that subject motion can detract from an otherwise excellent portrait:

This Portrait mode image is sharp and also blurs the background to help make the subject pop.

However, the same scene with the subject waving his hand shows that the 8 Plus hasn’t addressed the resulting motion blur.

Bokeh (55)

The bokeh effect on the 8 Plus is remarkably reliable, as the 8 Plus is not fooled nearly as often as other smartphone cameras when it makes estimations of depth, even compared to competitors with similar dual-camera systems.

In low light, the iPhone 8 Plus does a much better job of rendering a bokeh effect than the Google Pixel, although at the cost of some noise. Further, the Pixel version of the image has strong artifacts (click on individual images to get a full-size version for easier comparison):

Google Pixel version of the image.

iPhone 7 Plus version of the image.

Key to the 8 Plus’s excellent Bokeh score is very good depth estimation and facial recognition. These technologies help ensure that blurs are created naturally and effectively. There is room for improvement, though — in particular, when the subject touches the edges of the frame, the camera can mistake portions of the subject for part of the background, and ends up blurring those portions accordingly.

This type of artifact is visible in the portrait in this review, in which some of the subject’s hair is blurred — an unfortunate and sometimes unpleasant effect on an important part of the portrait.

Video scores explained

The Apple iPhone 8 Plus achieves a total Video score of 89. As with the photo scores, this is calculated from the sub-scores it achieves in a number of categories of tests that help define its overall video capabilities, specifically: Exposure and Contrast (81), Color (87), Autofocus (84), Texture (50), Noise (68), Artifacts (81), and Stabilization (91). Of particular note, stabilization is excellent, color rendering is very accurate, and exposure is greatly improved over previous models. Exceptionally good face tracking also aids in accurate subject exposure. Video suffers from some judder, and a small amount of frame-rate inaccuracy.

One thing the iPhone 8 Plus’s video lacks somewhat is good exposure in low light. As light falls off, the 8 Plus tends to underexpose, as you can see from this chart:

Ideally, the gray patch should expose to about 50. The 8 Plus comes close in bright light, but at low-light levels, it chooses a very dark exposure.

Conclusion: The best smartphone camera we’ve ever tested

Overall, the Apple iPhone 8 Plus is an excellent choice for the needs of nearly every smartphone photographer. It features outstanding image quality, zoom for those needing to get closer to their subjects, and an industry-leading Portrait mode for artistic efforts. It is at the top of our scoring charts in nearly every category — and in particular, its advanced software allows it to do an amazing job of capturing high-dynamic range scenes and images in which it can recognize faces.

We look forward to testing the iPhone X and comparing it against the iPhone 8 Plus, as the X’s wider aperture and its OIS on both cameras should place it on the cutting edge of zoom and portrait performance — enhancing the iPhone shooting experience for memory makers and image lovers even more. 

Pros

  • One of the best HDR performances of any device we have tested
  • Excellent use of face detection to accurately expose faces
  • Overall, the best zoom we’ve tested
  • Best Bokeh we’ve seen in a mobile device, but still room for improvement

Pros

  • Very good stabilization
  • Best exposure of any Apple device, but still not industry-leading
  • Very good color rendering under almost all lighting condtions
  • Good face tracking in bright light

Cons

  • Color cast in low and indoor (tungsten) lighting
  • Some autofocus issues

Cons

  • Some exposure issues
  • Visible noise in low-light conditions

A note about image formats for this review: The iPhone 8 and 8 Plus record photographs in the DCI-P3 colorspace, which their displays also use. DCI-P3 is newer and larger than the sRGB color space that most devices use and most web browsers assume. So to ensure that the images we used in the review display properly on a wide variety of browsers and devices, we converted the originals from DCI-P3 to sRGB. This can slightly reduce the richness of color in some cases from what you would see when viewing the original images on a DCI-P3-calibrated display with appropriate software. We also captured the original images using the new HEIF (High-Efficiency Image Format), but we then converted them to very high-quality JPEGs for viewing in standard browsers and image editing software. HEIF is very similar to JPEG, but provides better compression for similar image quality, so the conversion makes the sample image file sizes larger than they were when shot.

Reproducibility vs. root privileges

$
0
0

Guix is a good fit for multi-user environments such as clusters: itallows non-root users to install packages at will without interfering with each other. However, a common complaint is that installing Guix requires administrator privileges. More precisely, guix-daemon, the system-wide daemon that spawns package builds and downloads on behalf of users,must be running as root. This is not much of a problem on one's laptop but it surely makes it harder to adopt Guix on an HPC cluster.

So why does Guix have this requirement when other tools don’t? In this article we look at the various options available today to achieve build isolation—a prerequisite for reproducible builds—on GNU/Linux, and how HPC software deployment tools address the problem.

GNU Guix prides itself on being able to create isolated build environments, which in turn helps make sure that package builds are reproducible (the same inputs yield the same output) regardless of what software is installed on the machine or what machine performs the build. It does that in the traditional Unix way, which we'll describe below.

chroot and setuid

Unix-like operating systems have traditionally provided a couple of tools to isolate processes:chroot, which allows a process to “see” a different root file system, and setuid, which allows a process to run on behalf of a different user.

guix-daemon uses these two mechanisms when it builds something: itchroots into an environment where only the declared dependencies of a build process are accessible, and it setuids to a specific “build user” that does not run any process other than this one build process. For this reason, the manual instructs to create a pool of build users upfront.

These two mechanisms are all it takes to achieve process isolation. Of course processes still run under the same operating system kernel as before, unlike what a virtual machine would provide, but the rest is unshared. Today this is the only portable way to achieve process isolation on a POSIX system.

In addition, guix-daemon runs processes inseparate PID, networking, and mount “namespaces”. “Namespaces” are a feature of the kernel Linux to improve process isolation. For example, a process running under a separate PID namespace has a different view of the existing set of process IDs; it cannot reference a process running in a separate PID namespace.

User namespaces

The problem of chroot, setuid, and namespaces is that they are available only to root. A few years ago, the kernel Linux gained support for so-called“user namespaces”, which hold the promise of providing unprivileged users with a way to isolate processes. Unfortunately, user namespaces are still disabled by most distributionsfor fear of security issues—and I should say rightfully so if we look, for example, at this May 2017 PF_PACKET vulnerability in the kernel, which was exploitable by unprivileged users in a user namespace.

Hopefully this will be fixed in the not-too-distant future, but for the time being, this is not a feature we can expect to find on HPC clusters, on which we want to install Guix.

When everything else fails

When none of the above is available, the remaining option to achieve process isolation is PRoot. PRoot is a program that runs your application and uses the ptrace system call to intercept all its system calls and, if permitted, “translates” them into an equivalent system call in the “host” environment.

For example, PRoot can do file system virtualization akin to chroot and bind mounts. To do that, it needs to intercept open calls, and translate file names in the isolated environments to file names outside the environment—or raise an error when trying to access files that are not mapped into the isolated environment.

The downside of this is performance: intercepting and translating system calls is costly. On the other hand, a mostly-computational application such as a long-running numerical simulation will be largely unaffected by this overhead.

In a future post we will see how to take advantage of PRoot in conjunction with guix pack.

In the context of HPC software deployment, people have been looking at ways to achieve reproducibility, and also to avoid requiring root privileges. As we’ve seen above, it’s usually a tradeoff that must be made.

EasyBuild and Spack

EasyBuild and Spack, two package managers designed for HPC clusters, have the advantage of not requiring root privileges at all. Thus, provided Python is installed on the cluster you want to use, you can readily install them and use them to build the packages they provide.

This advantage comes at the cost of reproducibility. Build processes are not isolated from the rest of the system, so they can pick and choose software from the host distribution. The distributions of Spack and EasyBuild are actually not self-contained: they assume that some specific packages are available on the host system, such as a C compiler or the GNU Binutils.

This leads to very concrete reproducibility issues, where thingsmight build on one machineand fail to build on another, simply because the core software packages differ.

Singularity

Singularity is a tool to build and create Docker-style application bundles (sometimes confusingly referred to as “containers”). To run those application bundles, it needs at the very least file system virtualization—it needs to “map” file names within the image at the same place in the execution environment.

Singularity’s web site explains that no root-owned daemon processes are required on the HPC cluster where it is used. However, it also notes that it needs either a setuid-root helper program to create isolated environments on behalf of users, or support for user namespaces. In practice, that means that only cluster admins can install it today.

Shifter

Shifter relies on the Docker daemon to execute application bundles, which needs to be installed as root.

runc

runc prides itself on having “the ability to run containers without root privileges”, which they call rootless containers. There is no magic here: its implementation simplyrequires support for user namespaces.

Guix requires a root-owned daemon to perform isolated builds, which are the foundation for reproducible software environments. This makes it less readily available to HPC cluster users: you have to convince your system administrators to install it before you can happily use it to manage your software (here’s a trick: tell them that’ll give you more flexibility and also relieve them from the tedious manual management of environment modules :-)).

However, the kernel Linux does not yet provide a mechanism for non-root users to build isolated environments. In the future, when user namespaces are widely available, the problem will be solved. But for now, if you value reproducibility, let’s talk to cluster sysadmins and invite them to install guix-daemon.

But wait, we also have a solution for you in the meantime. More on that in a future post. :-)

Viewing all 25817 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>