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

Uber's Travis Kalanick punches back against the Benchmark lawsuit targeting him

$
0
0

Uber’s co-founder and former chief executive, Travis Kalanick, has struck back at venture capital firm Benchmark.

In seeking to dismiss a fraud lawsuit Benchmark filed against him, he called the suit a “smear campaign” and characterized the firm’s partners as ruthless opportunists who staged an “ambush” on him, threatening and demanding he quit, less than two weeks after his mother’s funeral.

Kalanick’s motion to dismiss, filed Thursday, came a week after Benchmark sued him, alleging that he misled the ride-hailing company into approving three new seats in 2016 on Uber’s board of directors and granting appointment powers to Kalanick.

In his filing, Kalanick categorically disputes each of Benchmark’s claims and paints the early Uber investor as a callous organization that schemed against him while he was mourning the death of his mother, who was killed in a boating accident weeks before he was pressured to resign as CEO.

Kalanick’s filing does not mention, however, that days after his mother’s funeral and before what Kalanick called Benchmark’s “ambush,” former U.S. Atty. Gen. Eric H. Holder Jr. and his firm released the results of their investigation into problems with Uber’s culture — results that, in part, implicated Kalanick.

Kalanick challenged the following claims in his motion to dismiss:

• Benchmark’s lawsuit alleges that Kalanick kept certain damaging events secret from the firm, such as the mishandling of an Uber passenger’s medical files, the company’s problems with sexual harassment and litigation from Waymo over trade secrets. Benchmark said that had it known about those things, it would not have approved three new board seats and given Kalanick free rein over those seats.

Kalanick said Benchmark knew of those issues. He also said that when Benchmark handed him a letter June 20 pressuring him to resign, the letter made no mention of Benchmark being “fraudulently induced” into creating the three board seats and had expressed that the investor was “deeply grateful for your vision and tireless efforts over the last eight years.”

• Benchmark’s lawsuit claims that Kalanick had played a long game in securing the three board seats so that he could assign himself a seat when he was inevitably ousted from the seat reserved for Uber’s CEO once the aforementioned events came to light.

Kalanick contradicted this, saying that Benchmark knew about those events when it asked him to resign, yet still explicitly agreed he should “retain one [seat] for yourself.”

• Benchmark alleges that Kalanick’s ongoing involvement with Uber’s board is creating uncertainty and impeding the board’s ability to find a new CEO.

Kalanick hit back, saying that the board has eight directors, of which he is only one. (Three of the company’s 11 board seats remain empty: two over which Kalanick has appointment power, and one reserved for the CEO.)

Kalanick’s filing frames Benchmark’s lawsuit as a personal squabble between one of Uber’s earliest investors and its co-founder — and as one that does not benefit Uber.

“Benchmark initiated this action as part of its public and personal attack on Travis Kalanick,” Thursday’s filing says.

It goes on to describe the timing of Benchmark’s actions as “shameful,” claiming that 11 days after Kalanick buried his mother, Benchmark principals showed up at Kalanick’s hotel room, pressured him to resign as Uber’s CEO and threatened a public campaign against him if he refused.

In response, a Benchmark spokesperson directed The Times to a statement that it previously had issued.

“Resorting to litigation was an extremely difficult step for Benchmark,” the statement said. “But the Holder report cannot be ignored. Failing to act now would mean endorsing behavior that is utterly unacceptable.”

Holder’s report advised the board to consider having Kalanick share or reassign some of his duties, though it did not say Kalanick should be removed as CEO.

Uber declined to comment.

A last resort

This week’s events are the latest in a saga of Uber stakeholders jostling for control of the San Francisco company, which has a valuation of about $70 billion.

Although Kalanick painted Benchmark’s lawsuit as part of a personal vendetta, business and corporate governance experts said lawsuits of this nature from venture capital firms tend to be a last resort and are not taken lightly.

Benchmark took a huge risk filing this lawsuit, according to Erik Gordon, a professor at the University of Michigan’s Ross School of Business.

Regardless of what happens in the courtroom, Gordon said, Benchmark is risking its reputation among entrepreneurs. Top-tier investment firms build their name on sticking with start-ups and entrepreneurs through thick and thin, Gordon said, and taking legal action against a founder it once supported could undermine that reputation.

“In Benchmark’s mind, it’s not about Uber,” Gordon said. “It’s about saving Uber from Kalanick, because they see a company with tremendous potential that keeps getting clobbered because of the things Kalanick has said and done.”

Experts expect there to be some behind-the-scenes maneuvering to resolve the matter before the lawsuit advances any further. Benchmark may try to convince other investors and board members to side with it, Gordon said, or the lawsuit might compel Kalanick back to the negotiating table.

But even that is a long shot, according to Eric Schiffer, chairman of private equity firm the Patriarch Organization, which is not an Uber investor.

“If you were dealing with the average CEO of a venture-backed company, they’d normally look at a lawsuit like this and decide to negotiate instead,” Schiffer said. “But with Travis ... I doubt he’s going to stop until he gets what he wants.”

Some investors who are not on the board believe Benchmark’s lawsuit is a necessary step to protect Uber’s brand. Others, such as early investor Shervin Pishevar, have been less enthused.

“Benchmark is holding the company hostage and not allowing it to move forward in its critical executive search,” Pishevar, who is not a member of Uber’s board of directors, said in a letter to Benchmark obtained by Recode. “The claim in your letter that your litigation efforts speed up on-boarding a CEO [is] disingenuous or delusional.”

Pishevar urged Benchmark to resign from the board. Benchmark has shown no inclination to do so.

In order to get a judge to agree to issuing a preliminary injunction, the onus is on Benchmark to prove that without immediate court intervention, Kalanick’s ongoing presence on the board would cause irreparable harm to Uber. That could be difficult to prove, according to legal experts, because Kalanick does not control a clear majority of the board, and even if he did, the possible outcomes are speculative.

Beyond the courts, Benchmark has limited power in determining Kalanick’s future on the board because it owns only 13% of Uber (compared with Kalanick’s 10%), has 20% of Uber’s voting power (compared with Kalanick’s 16%) and has only one seat on Uber’s board of directors.

“If the lawsuit fails, I think they’re going to be out of bullets,” Schiffer said of Benchmark. “Unless they can get enough people on the board to coalesce, but if that was going to happen, it would have already happened. I think they did this out of frustration, because they couldn’t get enough people to support them.”

tracey.lien@latimes.com

Twitter: @traceylien

ALSO

Fox CEO James Murdoch criticizes Trump over response to Charlottesville

See unlimited movies for $10 a month? Not so fast, says AMC Theatres

How Mel Gibson's promising indie film went off the rails


UPDATES:

3:40 p.m.: This article was updated with comments from Erik Gordon and Eric Schiffer.

11:30 a.m.: This article was updated with additional details about Kalanick’s filing, Holder’s report, and Benchmark’s stake in Uber.

This article was originally published at 8:40 a.m.


Introducing WAL-G: Faster Disaster Recovery for Postgres

$
0
0

A key part of running a reliable database service is ensuring you have a good plan for disaster recovery. Disaster recovery comes into play when disks or instances fail, and you need to be able to recover your data. In those type of cases logical backups, via pg_dump, may be days old and in such cases not ideal for you to restore from. To remove the risk of data loss, many of us turn to the Postgres WAL to keep safe.

Years ago Daniel Farina, now a principal engineer at Citus Data, authored a continuous archiving utility to make it easy for Postgres users to prepare for and recover from disasters. The tool, WAL-E, has been used to keep millions of Postgres databases safe. Today we’re excited to introduce an exciting new version of this tool: WAL-G. WAL-G, the successor to WAL-E, was created by a software engineering intern here at Citus Data, Katie Li, who is an undergraduate at UC Berkeley.

Introducing WAL-G from Citus, the successor to WAL-E

WAL-G is a complete rewrite that provides the same functionality as WAL-E, but boasts performance improvements of 4x faster restores on recovery. WAL-G brings:

  • Parallelization on restore for performance improvements
  • Backwards compatibility
  • Safety enhancements that check for incompletely restored backups

Let’s dig in deeper to all that’s new and improved with WAL-G.

4X Faster Disaster Recovery for your Postgres database

The goal of WAL-G was always to provide a noticeable improvement in terms of performance over WAL-E, and not just a rewrite for the sake of a rewrite. We sought to either reduce the footprint of the process that was running, or improve restore times, and if at all possible accomplish both.

We’re happy to say that WAL-G excels at both objectives—giving your database more resources and delivering faster restores from archives.

Performance histogram of WAL-E vs WAL-G

Performance table

The figure above shows the distribution of throughput over the course of a restore by both WAL-E and WAL-G. As one can see, WAL-G offers consistent write performance at 95% of the theoretical maximum that an r4.8xlarge is advertised to offer (875 MiB/s), with virtually no deviation, unlike WAL-E. On i3.8xlarge we observed performance improvements as high as 7x.

So, how exactly did we accomplish the performance improvements?

Full rewrite of WAL in Go instead of Python

WAL-G is a rewrite from the ground up, written in Go instead of Python. Switching from Python to Go was largely due to how Go competes in terms of performance:

Go programs are compiled whereas Python programs are interpreted. Go’s standard library is written with performance sensitivity in mind. Go’s design is conducive to low-overhead multithreading, as opposed to Python’s subprocess or multiprocessing module.

A large influence of the design of WAL-G was to avoid having to use pipes and external processes like WAL-E does. WAL-E compresses using lzop as a separate process, as well as the command cat to prevent disk I/O from blocking. When analyzed with perf, WAL-E’s major bottleneck was the number of memory copies it had to complete per archive. In addition, pipe buffers for WAL-E had to be set to be large; this process has grown all the more difficult over the years as Linux has enforced new limits on pipe buffer allocation. WAL-G sidesteps pipe usage completely by linking Go libraries directly, such as for tar creation and lz4 compression.

Deeper into the design of WAL-G

Handling compression and tar creation internally greatly simplifies the design of WAL-G, from WAL-E’s 6.5k lines of code to WAL-G’s 1.5k. In addition, the development of a modern AWS SDK with better documentation resolved some of the more tricky parts of WAL-E with a mere few lines of code.

At the time of creating WAL-E, Amazon did not yet have flexible support for streaming, nor parallel uploads to S3, nor were SDKs for interacting with AWS as robustly maintained. Thus in order to achieve parallel uploads, WAL-E created temporary files, determined the sizes, and then notified AWS about them ahead of time. These files later get removed, but in rare occasions, clean up would fail so the files would leak prolifically. If these files were synced to disk, thrashing would also pose as an additional issue. Some of the newer AWS SDKs, including the Go SDK, has built-in management of multi-part uploads that allow programs to enjoy high performance with low complexity.

Better backups for all with WAL-G from Citus FTW

Protecting you from incompletely downloaded backups is a new feature included in WAL-G. During extraction pg_control is restored last, so that the server cannot be started before every other file in the backup has been downloaded and flushed to disk.

The handling of pg_control therefore differs when writing the backup, but WAL-G can still extract WAL-E version of archives. When extracting WAL-E archive versions with WAL-G, it is left to the user’s discretion to ensure the completion of the backup restoration.

Additionally, WAL-G uses the “non-exclusive” backup mode offered by Postgres 9.6 and later instead of the “exclusive” mode. Previously, exclusive backups required cleanup if Postgres stopped for any reason, requiring the intervention of deleting the file backup_label to start the database again. Using the non-exclusive mode solves these issues by allowing WAL-G to write the contents of the backup_label and tablespace_map from a Postgres query rather requiring those files to be written to disk.

WAL-G also relies more on unit tests as opposed to integration tests. WAL-E’s integration tests were often slow and relied upon good network conditions; also, the WAL-E integration tests did not allow for controlled fault injection. By mocking out certain parts of WAL-G, such as uploading to S3, testing potential errors becomes easy and straightforward. WAL-G also comes with a number of bespoke testing utilities, such as a random data generator, to ease future development.

What’s next for WAL-G?

As of now, WAL-G does not support parallel uploads or downloads of WAL files, while WAL-E is able to upload and download several WAL files at once. Parallel uploads/downloads will be implemented in WAL-G in the future. Furthermore, WAL-E was able to use the external program pv to perform rate limiting for uploads via pipes. A major design goal of WAL-G was to avoid pipelining and the copies required by it. Without pipelining in place, rate limiting will be added separately for WAL-G uploads in the future.

Special thanks

Our team at Citus wants to commend Katie Li—our software engineering intern on the cloud team—for her solid design and implementation work creating WAL-G. About to start her junior year at UC Berkeley as a Computer Science major, Katie has delivered a useful new version of WAL-E for Postgres which benefits not only our Citus customers but the entire Postgres community.

WAL-G is available as open source under the Apache 2.0 license—and (of course) WAL-G can be found on github.

Programming Language for Old Timers by David A. Moon

$
0
0

NBC’s Snapchat news show gains 29+ million viewers in its first month

$
0
0

NBC News’ first-ever daily show for Snapchat is seeing promising numbers after its first month on the air. In a release sent to reporters this morning, NBCU claims the show has grown its audience to over 29 million unique viewers. That’s roughly triple the number of viewers who tune into the top-rated“NBC Nightly News with Lester Holt” program, by the way. But that’s not necessarily a fair comparison, given that Snapchat counts a view as soon as a video opens.

That being said, watching news via a smartphone is a different way of consuming information, so it’s not really right to compare Snapchat news to TV in the first place, or say it’s “bigger.” On mobile, users want sped-up soundbites, where information is distilled down into “need to know” bits — the kind that can be easily parsed while you have a few minutes of downtime.

On that front, NBC’s “Stay Tuned” Snapchat show delivers. In just a few minutes, NBC News’ Gadi Schwartz and Savannah Sellers cover four or five major stories, ranging from national and international news to lighter stories from pop culture, and more. NBC is leveraging its existing investments in digital, while also repackaging news content from its other programs with the new show.

Unlike TV’s nightly news, the Snapchat show has two shots at capturing users’ attention — it airs two episodes per day during the week, and one per day on weekends. That means some viewers may be catching the show’s earlier episode, while others tune in later in the day.

The show, not surprisingly, has attracted a youthful audience. NBCU’s announcement says that over 60 percent of viewers are under the age of 25. But that’s in line with Snapchat’s demographics, of course.

It’s been roughly a month since NBC launched “Stay Tuned” for the Snapchat audience, so it may be too soon to say it’s a success. There’s still a novelty aspect involved here, and NBC will need to prove that it’s able to retain these viewers over time. However, the early retention numbers are fairly high. According to NBCU, over 40 percent of viewers are watching at least three times per week.

That’s not quite in line with how older generations watched their daily news — that was something of a nightly ritual involving “appointment television” and information delivered by trusted anchors. Snapchatters — and the younger generation in general — is less brand-loyal.

Also of interest is how the digital medium allows “Stay Tuned” to quickly evolve and adapt to trends and insights as the show continues. For example, NBC says that it’s already rolling out a new graphics package, new logo and it’s updating the show’s format based on learnings from its first month in. The program now features on-camera guests and on-the-ground reporting from co-hosts, it says.

Whether Snapchat is ultimately the right place for this program long-term is a question that needs further examination. This quick-hit format could work well on other networks, like Twitter or Facebook, for example. There’s also no reason why today’s internet live TV services — like YouTube TV, Sling TV, Vue and others — couldn’t offer “Stay Tuned’s”  news clips as part of their lineup, too.

“Stay Tuned” does have the benefit of being the first-ever daily news program on Snapchat, so it’s helping to pave the way for what comes next.

Other Snapchat shows have pulled in a number of viewers as well. E!’s bi-weekly “The Rundown” averages more than 7 million viewers per episode, while episodes of A+E’s “Second Chance” has reached over 8 million unique viewers, for instance. NBC’s numbers indicate that the social app’s user base is in the market for more than just mere entertainment and typical “teen” content. They’ll actually watch the news. And, well, thank goodness for that.

Correction: Clarified the numbers of other Snap shows are per episode; rather than unique viewers over a month. 

Learning to Map Vehicles into Bird’s Eye View [pdf]

What Should Happen to People’s Online Identity When They Die?

$
0
0

By Monika Bickert, Director of Global Policy Management

In the days after my husband died, I kept sending him text messages. His cell phone lay uncharged on my nightstand, just a few feet away from me, and I knew no one would ever read the words I wrote, but I kept writing anyway. I needed to feel like I was still connected to him. As I sat in bed texting, I knew that my phone also held recent photos of Phil smiling with our daughters and a video of him laughing with his brother just two days before I took him to the hospital, but I didn’t look at those. It would have hurt too much. Instead, I just kept writing to him, pretending he was on the other side of the messages I was sending and would soon write back.

When we lose someone we love, we often feel a desperate need to connect to them in whatever way we can. In moments like that, our phones, the internet and social media can sometimes be a refuge. We can talk to our loved ones, as I did, or when we’re ready to face the memories, we can lose ourselves in old emails, photos, videos and posts. With an ease that wasn’t possible 20 years ago, we can now hear and see our loved ones after they are gone, and we can share those memories with others who are grieving.

But other times, the online world can make loss even more painful. The reminders of our loved ones are everywhere, and with each reminder a renewed realization of their death. For months after Phil died, I’d cry when I’d receive an Amazon email prompting him to order his regular shipment of secondhand detective novels, or a message from his pharmacy cheerfully reminding him that his chemotherapy was ready for pickup. Even now, I pause whenever I log into Facebook and see a post of mine resurfaced from years ago. I worry it will be one of the many I shared with friends over the course of Phil’s battle with cancer, detailing his progress and hinting at our naïve faith that he would continue to beat the odds.

Depending on the circumstances of a person’s death, those online reminders can be overwhelming. A mother who loses her daughter to domestic violence may feel sick when she looks online and sees photos of her daughter’s wedding day. A university student who receives a birthday reminder for a roommate who died by suicide might feel grief more acutely thinking of all the expressions of love and support his roommate would be receiving if he were around.

Our Approach at Facebook

When people come to Facebook after suffering a loss, we want them to feel comfort, not pain, which is why we stop sending birthday reminders once we know someone has passed away, and why we try to make it easy for surviving family members to reach us.

All too often, however, it’s difficult for us to know what action to take with the account of someone who has died. What should we do with an account of a deceased young woman, for instance, when one of her parents wants to delete the account but the other wants to preserve it as a memorial for friends and family? How do we know what the daughter would have wanted? And what should we do if they want to see the private messages between the daughter and her friends – friends who are still alive and don’t want their messages to become public?

These questions — how to weigh survivors’ competing interests, determine the wishes of the deceased, and protect the privacy of third parties – have been some of the toughest we’ve confronted, and we still don’t have all the answers. Laws may provide clarity, but often they do not. In many countries, the legal framework for transferring assets to surviving family members does not account for digital assets like social media or email accounts. We are, however, doing our part to try and make these situations easier for everyone.

Respect the Wishes of the Deceased

Where the law permits, we try to respect the wishes of those who have passed away. Sometimes, however, we simply don’t know what the person would have wanted. If a bereaved spouse asks us to add her as a friend to her late husband’s profile so she can see his photos and posts, how do we know if that’s what her husband would have wanted? Is there a reason they were not previously Facebook friends? Does it mean something if she had sent him a friend request when he was alive and he had rejected it? What if the wife had simply never been on Facebook until after her husband’s death?

If we don’t know what the deceased person would have wanted, we try to leave the account exactly as that person left it. When we learn that someone has passed away, our standard process is to add “Remembering” above the name on the person’s profile, to make clear that the account is now a memorial site, and to stop any new attempts to log into the account. Once we’ve memorialized an account, anything on the profile remains on Facebook and is visible to the people who could already see it before the profile was memorialized. We don’t remove or change anything. This is our way of respecting the choices someone made while alive.

Memorialization is our default action, but we know that some people might not want their account preserved this way. They might prefer that we delete their profile. Recognizing this, we give people a way to let us know they want their account permanently deleted when they die. We may also delete profiles when the next of kin tells us that the deceased loved one would have preferred that we delete the account rather than memorialize it.

Other people might want a friend or family member to be able to manage their profile as a memorial site after their death. That’s why in 2015, we created the option for people to choose a legacy contact. A legacy contact is a family member or friend who can manage certain features on your account if you pass away, such as changing your profile picture, accepting friend requests or adding a pinned post to the top of your profile. They can also elect to delete your account. You can give your legacy contact permission to download an archive of the photos, posts and profile information you shared on Facebook, but they won’t be able to log in as you or see your private messages. Find out more about legacy contacts and how to add one to your account in our Help Center.

Protect the Privacy of Survivors

Even where the laws are clear and the intent of the deceased person is clear, we sometimes have other interests to consider. For instance, if a father loses a teenaged son to suicide, the father might want to read the private messages of his son to understand what was happening in his son’s life. Had he been struggling in his university classes? Was he having problems with his boyfriend? As natural as it might seem to provide those messages to the father, we also have to consider that the people who exchanged messages with the son likely expected those messages would remain private.

Although cases like this are heartbreaking, we generally can’t turn over private messages on Facebook without affecting other people’s privacy. In a private conversation between two people, we assume that both people intended the messages to remain private. And even where it feels right to turn over private messages to family members, laws may prevent us from doing so. The Electronic Communications Privacy Act and Stored Communications Act, for instance, prevent us from relying upon family consent to disclose the contents of a person’s communications.

We’re Still Learning

Despite our efforts to respect the wishes of those who pass away and those who survive them, we still encounter difficult situations where we end up disappointing people.

And even when we know perfectly and can act consistently with the wishes of the deceased and their loved ones, we know our actions will be of limited comfort. As I’m learning from my own experience, grief doesn’t recede quickly or quietly. Nearly a year after Phil died, I still catch my breath when I look through old photos on my phone. Some of those photos, like the ones I took of Phil in the hospital when I mistakenly thought we’d be going home the next day, move me to tears.

But others, like the one of him standing proudly in our backyard with our daughters on Father’s Day, are starting to make me smile again. Those flashes of happiness, however brief, prove to me that reminders of our loved ones don’t have to be reminders of loss. And that, in turn, gives me hope that social media and the rest of our online world, rather than provoking pain, can ultimately ease our grief.

Read more about our new blog series Hard Questions. We want your input on what other topics we should address — and what we could be doing better. Please send suggestions to hardquestions@fb.com.

Explaining React's license

$
0
0

A few weeks ago, the Apache Software Foundation (the ASF) made a decision to list the BSD + Patents license as a Category-X license. This move affects users of much of Facebook's open source software, but especially the popular React project and the constellation of projects around it. As a result, many have asked us to consider relicensing React and all of our other open source projects. What has become clear through these discussions is that the ASF has very different considerations than Facebook does for how it maintains and distributes open source software.

I'd like to apologize for the amount of thrash, confusion, and uncertainty this has caused the React and open source communities. We know this is painful, especially for teams that feel like they're going to need to rewrite large parts of their project to remove React or other dependencies. We've been looking for ways around this and have reached out to ASF to see if we could try to work with them, but have come up empty.

Facebook has always benefited from open source and has worked to contribute back as much as possible to the open source community. Most major technology companies are involved in open source in some capacity, but at Facebook we've always tried to release hardware and software that we actually use in many of our most successful products. We do this because we believe others can benefit from technology that is tested at our scale and because we believe we are contributing to moving the entire industry forward. To this point, though, we haven't done a good job of explaining the reasons behind our BSD + Patents license.

As our business has become successful, we've become a larger target for meritless patent litigation. This type of litigation can be extremely costly in terms of both resources and attention. It would have been easy for us to stop contributing to open source, or to do what some other large companies do and only release software that isn't used in our most successful products, but we decided to take a different approach. We decided to add a clear patent grant when we release software under the 3-clause BSD license, creating what has come to be known as the BSD + Patents license. The patent grant says that if you're going to use the software we've released under it, you lose the patent license from us if you sue us for patent infringement. We believe that if this license were widely adopted, it could actually reduce meritless litigation for all adopters, and we want to work with others to explore this possibility.

We respect third party IP, including patents, and expect others to respect our IP too. The BSD + Patents license just intends to give our teams more room to make meaningful contributions to open source while decreasing our time spent fighting frivolous lawsuits. Other large technology companies have made similar decisions based on what they believe is best for their businesses through a mixture of approaches, including API, SDK, and software licensing. Some will argue that open source is different, but we believe that developers who are concerned about the BSD + Patents license should be looking at how companies approach patent licensing holistically.

The ASF’s decision related to projects carrying the BSD + Patents license was an internal policy choice directed at projects distributed through, and living on, Apache servers. While we respect this decision, it hurts to see so many great ASF projects get churned for policy reasons after using this license for years. In making the BSD + Patents license a Category-X license, the ASF added it to a long list of other licenses marked by the ASF as contrary to their policies. Their decision was not a legal decision about the compatibility of projects with this license. As has always been the case, source code licensed under the Facebook BSD + Patents license can be combined with source code licensed under other open source licenses like BSD, MIT, Apache 2.0, and GPL. Additionally, as has always been the case, you may distribute BSD + Patents licensed code with other popular open source licenses, such as BSD, MIT, Apache 2.0, and GPL.

We appreciate all the issues that have been opened asking questions and engaging us. We have considered possible changes carefully, but we won't be changing our default license or React's license at this time. We recognize that we may lose some React community members because of this decision. We are sorry for that, but we need to balance our desire to participate in open source with our desire to protect ourselves from costly litigation. We think changing our approach would inhibit our ability to continue releasing meaningful open source software and increase the amount of time and money we have to spend fighting meritless lawsuits.

Opioid makers made payments to one in 12 U.S. doctors

$
0
0

As public health officials combat the opioid overdose epidemic, in part by reducing unnecessary prescribing, a study shows that drug manufacturers paid more than $46 million to more than 68,000 doctors over a 29-month period.

PROVIDENCE, R.I. [Brown University] — Legally prescribed opioids can be an effective treatment for pain, but they are also the root cause of many of the cases of addiction and overdose deaths that have reached epidemic levels in the U.S. That’s why experts such as Brandon Marshall, an associate professor of epidemiology in the Brown University School of Public Health, are investigating efforts by opioid painkiller manufacturers to promote prescribing of the medicines by wining and dining doctors and paying them large speaking fees.

In a new study published in the American Journal of Public Health, Marshall, lead author Scott Hadland of Boston Medical Center and colleagues report for the first time on the tens of millions of dollars that drug companies are paying doctors through meals, honoraria and other marketing and education programs.

“The opioid epidemic, which is responsible for thousands of deaths every year, is a national tragedy that we must work at every level to combat,” Marshall said in a Boston Medical Center news story detailing the findings. “It’s our hope that this study sparks a bigger conversation about the role of pharmaceutical companies in the over-prescribing of opioid medications and prompts a more thorough investigation about what we need to do to tackle this problem.”

We asked Marshall to share additional thoughts on what the team found and what it may mean.

Q: What connection might there be between drug-maker payments to physicians and the current opioid use epidemic?

In this national study, we used data from the Centers for Medicare and Medicaid Services (CMS) to track payments related to an opioid medication from the pharmaceutical industry to physicians. Under the recently implemented Physician Payments Sunshine Act, drug companies are now required to report all “transfers of value” — payments — to U.S. physicians. What we found was astounding: between August 2013 and December 2015, more than 375,000 opioid-related payments were made to more than 68,000 physicians in the U.S. Although the average payment to physicians was $15, the top 1 percent of physicians reported receiving more than $2,600 annually in payments related to the promotion of opioid products.

Although most disbursements were small — for activities such as industry-sponsored meals — previous research suggests that pharmaceutical company payments result in increased prescribing of marketed medications, even when these payments are of low monetary value.  As such, it is possible that these payments — particularly such a large number of payments — have led to the high level of opioid prescribing we continue to see today. At a minimum, they are probably counterproductive to nationwide efforts to reduce excessive opioid prescribing. 

Q: How does this data advance our understanding of this possible connection?

To our knowledge, this study is the first to track pharmaceutical industry payments specifically related to opioid medications. We showed that these medications continue to be broadly promoted and marketed, even in light of the accelerating opioid epidemic in the U.S. Patients should know that they can find out what kind of payments their physician has received for all medications — related to things like travel, gifts, speaking fees and meals — by visiting the CMS website.

Q: What surprised you in these numbers? 

We were most surprised by the large number of physicians who received an opioid-related payment. In fact, one in 12 physicians (and one in five family doctors) accepted a payment related to a prescription opioid product during in the study period. These figures demonstrate the extent to which pharmaceutical companies are broadly marketing these medications to physicians in almost every part of the country.

Q: Payments were very concentrated in a top 1 percent of doctors, but they were very also widespread (one in five family doctors). What might be the significance of these patterns?

We are most concerned by the large number of doctors who have received a payment related to an opioid medication. We are particularly concerned about the high percentage of family physicians who received payments, since primary care doctors are the first-line providers for patients. Nonetheless, the small number of physicians who have received very large payments requires additional investigation. It is possible that some physicians, after receiving so much money from the pharmaceutical industry, in turn promote these products to other doctors in their practices and hospitals. This is another way in which these payments may be influencing prescribing patterns broadly.

Q: What’s next? Are there other key questions related to this issue that should be explored?

We are currently studying whether regions of the country with the highest number of payments are also those most impacted by opioid overdose mortality. Ultimately, we would like to determine whether and how these payments affect opioid prescribing, and in turn, how prescribing practices are related to greater overdose deaths. 


Docker Is Raising Funding at $1.3B Valuation

$
0
0

Business software company Docker Inc. is raising fresh funds, valuing the company at $1.3 billion, according to people familiar with the matter.

The latest influx of $75 million, which is expected to close by the end of the month, will help fuel Docker’s newest push to win business customers and finally monetize its free open-source tools popular with developers worldwide. Part of the funding will go toward building a sales and marketing team for corporate clients, one of the people said, asking not to be identified discussing private matters. The valuation would represent a marginal increase from the $1 billion it was ascribed when it last raised money in 2015.

The funding follows a springtime management shuffle. Steve Singh, a former chief executive officer of Concur Technologies Inc., took the top job at Docker in May, replacing co-founder Ben Golub. Executive Vice President of Product Marc Verstaen is also leaving the startup. He’s being replaced by another company co-founder and Chief Technology Officer Solomon Hykes.

Palo Alto, California-based Docker provides virtual work spaces, called containers, so software developers can more efficiently build, distribute and run software programs. The idea is to create software in isolated, independent environments which can then be stored in the cloud, distributed and run anywhere regardless of the operating system and hardware. Although Docker’s technology has won rave developer reviews -- there are more than 3,000 community contributors and more than 270 meetup groups devoted to the technology worldwide -- monetizing that popularity has proven tricky.

Docker declined to comment on the funding round and valuation.

The seven-year-old startup counts ADP LLC and General Electric Co. among its customers and competes against startups including Mesosphere Inc. and open source systems like Google’s Kubernetes.

Docker will appoint experts in operations and enterprise sales to its board in coming months and slowly phase out other members who represent investors, according to one of the people familiar with the discussions.

Noam Chomsky Joins Faculty at University of Arizona

$
0
0

World-renowned linguist and social critic Noam Chomsky, who has been a regular guest speaker and teacher at the University of Arizona over the past five years, is joining the campus as a faculty member.

Chomsky has been hired by the College of Social and Behavioral Sciences as a laureate professor in the Department of Linguistics. He will also hold the title of Agnese Nelms Haury Chair in the Agnese Nelms Haury Program in Environment and Social Justice. As part of his part-time faculty appointment, Chomsky will teach, give public lectures and be available to meet with students. Chomsky starts this month and will begin teaching in spring 2018.

Considered the founder of modern linguistics, Chomsky is one of the most cited scholars in modern history and has written more than 100 books, including the groundbreaking "Syntactic Structures," "Language and Mind," "Aspects of the Theory of Syntax" and "The Minimalist Program," each of which has made distinct contributions to the development of the field. He has received numerous awards, including the Kyoto Prize in Basic Sciences, the Helmholtz Medal and the Ben Franklin Medal in Computer and Cognitive Science.

Chomsky's work also has influenced the fields of cognitive science, philosophy, psychology, computer science, mathematics, childhood education and anthropology. Applications of his work can be found in everyday life. He formulated the algorithm "context-free grammar," which is part of most computer programming languages, as well as programs that appear to understand language, such as Siri. He also has challenged traditional notions of learning, emphasizing how much knowledge and behavior is "built in" to the child’s brain.

One of the most influential public intellectuals in the world, Chomsky has been the subject of seven biographies, has been interviewed countless times in popular media, and has appeared in over 20 films and documentaries.

"That Noam Chomsky would choose to come to the University of Arizona to write, teach and engage us in discussions of global importance speaks volumes of our campus, and we look forward to benefiting from his unmatched expertise and perspective," said John Paul Jones III, dean of the College of Social and Behavioral Sciences.

"Whether leading an advanced graduate seminar on theories of language — most of which bear his name — or by engaging undergraduates in discussions of contemporary economic inequalities, Noam's keen intellect, gentle presence and unwavering commitment to the wider social good is always in evidence," Jones said. "I'm delighted to be able to announce his arrival this fall."

Mary Grier — a trustee of the estate of Agnes Nelms Haury, for whom the UA's Haury Program is named — also expressed her excitement over Chomsky's appointment.

"The Haury Trust is thrilled that students, faculty and Tucsonans generally will have the opportunity to interact with one of the most influential scholars and thought leaders of the past 75 years. This is a rare privilege that may prove transformational in ways that we cannot presently imagine," she said.

Chomsky's previous visits to the UA with his wife, Valeria Wasserman Chomsky, set the stage for his decision to join the faculty.

"We've very much come to appreciate the intellectual environment and the lifestyle," Chomsky said. "The linguistics department, which is excellent, happens to be full of former students of mine. In general, we felt that that the UA would be a good place to work and think and interact with people we like and can work with."

The charms of Tucson made the decision to relocate even easier.

"We fell in love with Tucson — the mountains, the desert," Chomsky said. "Tucson has an atmosphere that is peaceful and manageable."

UA Connections

Chomsky's connections to UA linguistics faculty are deep and long-standing. Several UA linguists were his students or departmental fellows at the Massachusetts Institute of Technology, where Chomsky worked since 1955 as a professor of linguistics, then professor emeritus.

Chomsky says he is looking forward to regularly teaching undergraduate students again, which he hadn't done for about 10 years until this past spring when he co-taught, with geography professor emeritus Marv Waterstone, a large UA elective course on politics and global issues that attracted 250 students. Nearly 250 community members also enrolled in that course, through the UA's Humanities Seminars Program.

Natasha Warner, head of the Department of Linguistics, is thrilled to have Chomsky join the faculty.

"Chomsky established modern linguistics. He's an awe-inspiring thinker," she said. "The opportunity for UA linguistics students to learn from him on a regular basis is simply astounding. I am especially excited about the opportunity for undergraduates to learn about language and linguistics from him."

Yan Chen, a graduate student in the Department of Linguistics, called Chomsky an inspiration.

"Professor Chomsky's insights into and analysis of language has inspired so many of us, and in fact he is the one who got me interested in linguistics in the first place when I was an undergraduate student," Chen said.

The Chomsky Effect

Chomsky is credited with revolutionizing the linguistics field by introducing the Chomsky hierarchy, generative grammar and the concept of a universal grammar, which underlies all human speech and is based in the innate structure of the mind/brain.

"The importance of Chomsky's work cannot be overstated," said Ryan Smith, a linguistics graduate student. "I am extremely excited that he will be joining our department not only because of his work in establishing our discipline, but also because of his continued important research into the nature of language and the human mind."

An ardent free speech advocate, Chomsky is famous for his political commentary and has published and lectured widely on U.S. foreign policy, Mideast politics, terrorism, democratic society and war. His media criticism includes the 1988 book "Manufacturing Consent: The Political Economy of the Mass Media."

Chomsky also has addressed issues such as political engagement, environmental destruction, and the rights of Indigenous populations. 

Chomsky's fame has extended into popular culture, leading such fans as Bono of U2 to describe him as the "Elvis of academia." The Noam Chomsky Facebook page has more than 1.2 million followers.

OpenFaas: Functions as a Service: Serverless Framework for Docker and Kubernetes

$
0
0

README.md

Functions as a Service (OpenFaaS)

Build Status

OpenFaaS

OpenFaaS is a framework for building serverless functions with Docker which has first class support for metrics. Any process can be packaged as a function enabling you to consume a range of web events without repetitive boiler-plate coding.

Highlights

  • Ease of use through UI portal and one-click install
  • Write functions in any language for Linux or Windows and package in Docker/OCI image format
  • Portable - runs on existing hardware or public/private cloud - Kubernetes or Docker Swarm
  • CLI available with YAML format for templating and defining functions
  • Auto-scales as demand increases

Overview of OpenFaaS

Stack

Function Watchdog

  • You can make any Docker image into a serverless function by adding the Function Watchdog (a tiny Golang HTTP server)
  • The Function Watchdog is the entrypoint allowing HTTP requests to be forwarded to the target process via STDIN. The response is sent back to the caller by writing to STDOUT from your application.

Gateway

  • The API Gateway provides an external route into your functions and collects Cloud Native metrics through Prometheus.
  • Your API Gateway will scale functions according to demand by altering the service replica count in the Docker Swarm or Kubernetes API.
  • A UI is baked in allowing you to invoke functions in your browser and create new ones as needed.

CLI

Any container or process in a Docker container can be a serverless function in FaaS. Using the FaaS CLI you can deploy your functions or quickly create new functions from templates such as Node.js or Python.

CLI walk-through

Let's have a quick look at an example function url_ping which connects to a remote web server and returns the HTTP code from the response. It's written in Python.

import requests

def handle(req):
        r =  requests.get(req, timeout = 1)
        print(req +" => " + str(r.status_code))

handler.py

$ curl -sSL https://cli.openfaas.com | sudo sh

Install the faas-cli which is also available on brew

Clone the samples and templates from Github:

$ git clone https://github.com/alexellis/faas-cli
$ cd faas-cli

Define your functions in YAML - or deploy via the API Gateway's UI.

provider:
  name: faas
  gateway: http://localhost:8080

functions:
  url_ping:
    lang: python
    handler: ./sample/url_ping
    image: alexellis2/faas-urlping

Example function YAML file - urlping.yaml

$ faas-cli -action build -f ./urlping.yaml

Build a Docker image using the Python handler in ./sample/url_ping

$ faas-cli -action deploy -f ./urlping.yaml

Deploy the new image to the gateway defined in the YAML file.

If your gateway is remote or part of a multi-host Swarm - you can also use the CLI to push your image to a remote registry or the Hub with faas-cli -action push

$ curl -d "https://cli.openfaas.com" http://localhost:8080/function/url_ping/
https://cli.openfaas.com => 200

Test out the function with the URL https://cli.openfaas.com => 200

Sample functions are available in the Github repository in a range of programming languages.

Get started with OpenFaaS

Closing Keynote at Dockercon 2017

Functions as a Service or FaaS was a winner in the Cool Hacks contest for Dockercon 2017.

If you'd like to find the functions I used in the demos head over to the faas-dockercon repository.

Background story

This is my original blog post on FaaS from January: Functions as a Service blog post

TestDrive

Docker Playground

You can quickly start OpenFaaS on Docker Swarm online using the community-run Docker playground: play-with-docker.com (PWD) by clicking the button below:

Try in PWD

Docker Swarm

A set of one-line scripts are provided to help you quickly test-drive OpenFaaS on Docker Swarm with a set of sample functions as defined in the provided docker-compose.yml file.

  • deploy_stack.sh - for OSX/Linux on x86_64
  • deploy_stack.armhf.sh - for Linux on ARM (Raspberry Pi for example)
  • deploy_stack.ps1 - for Windows

Kubernetes

Alternatively if you have a Kubernetes cluster you can start here.

Begin the TestDrive with Docker Swarm

Here is a screenshot of the API gateway portal - designed for ease of use.

Portal

Community

Have you written a blog about OpenFaaS? Send a Pull Request to the community page below.

If you'd like to join OpenFaaS community Slack channel to chat with contributors or get some help - then send a Tweet to @alexellisuk or open a Github issue.

Roadmap and contributing

OpenFaaS is written in Golang and is MIT licensed - contributions are welcomed whether that means providing feedback, testing existing and new feature or hacking on the source. To get started you can checkout the roadmap and contribution guide or browse the open issues on Github.

Highlights:

Example of a Grafana dashboard linked to OpenFaaS showing auto-scaling live in action:

Sample dashboard JSON file available here

Ask HN: Anyone else scratching their heads about coin offerings?

$
0
0
* Where did the architecture and ideas and accepted rules around ICO's come from? Where were the discussions taking place? I would expect something of this magnitude to have a mailing list at least as active as LKML.

* 0xproject on their blog landed 24M in coin funding from 13,000 investors at $1800 each. Where are the online equivalents of roadshows and pitches taking place? Again, where are the free and open discussions around this taking place online? Show me a historic record. Its like these things popped up overnight.

* Assume, from above, that at a 3% acquisition rate, to acquire ~15k gross number (as claimed by them) of investors they need to reach an audience of 500,000 potential coin investors. Where are these 500k investors with 1800 to throw away hanging around online? Are they all actively looking at the listings? Talk to anyone who works in private wealth management.. trying to convince someone to invest is hard.

* Given the number of ICOs, either the same groups of investors is investing in multiple ICOs or the number of investors is massive. Lets say the latter, we would expect at least 10x the number of 0xproject target audience = 5 Million active ICO investors. Again, where is this happening? It should be possible to confirm/track this on bitcoin at least. Has anyone done the analytics on this?

* If these discussions are occurring offline, what group of people are driving this, and why? Are they preparing for an event where fiat currency becomes worthless? Should we be worried?

* Why is it that the teams associated with these things come from elite institutions like ivy league unis and investment banks? Look at the teams for coinbase and 0xproject for example, and compare it to the team of an elite deep tech startup for example. You need brains and hard work to create an hard tech startup. You need what to create an ICO funded startup? Looks like elite institution connections.)

Thank you.

Mastodon is big in Japan, and the reason why is uncomfortable

$
0
0

Remember Mastodon? In April 2017, there was a wave of excitement about Mastodon, a federated social network begun in October 2016 by Eugen Rochko, a 24-year old German software engineer, as an alternative to Twitter. Recent news about CloudFlare’s decision to stop providing services to the Daily Stormer has me thinking about decentralized publishing, one possible response to intermediary censorship. As it turns out, it’s an interesting time to catch up on Mastodon, which has grown in a fascinating, and somewhat troubling, way. (Mastodon is one of the topics of the report Chelsea Barabas, Neha Narula and I released today, “Back to the Future: the Decentralized Web”.)

The enthusiasm earlier this year about Mastodon centered on the idea that the new distributed service could be like Twitter without as much harassment and hate speech. And indeed, using Mastodon is a lot like using Twitter — specifically, using Twitter through the excellent Tweetdeck client, which Rochko admits was his design inspiration — the structure of the service is sharply different from a centralized service like Twitter.

When you access Twitter (or Facebook, for that matter), you’re connecting to one in a cluster of servers owned by a single company, and managed if they were a single, huge server. There’s a single set of rules for acceptable behavior within the community, and a single directory of users — I’m @ethanz on Twitter whether you’re accessing the server from the US, Japan or South Africa.

Mastodon is different. It’s an open source software package that allows anyone with an internet-connected computer to set up an “instance”. The server administrator is responsible for setting and enforcing rules on her instance, and those rules can vary — sharply — from instance to instance. Each server has its own namespace. I’m @ethanz on octodon.social, but if you want to be @ethanz on mastodon.social, no one’s going to stop you. In this sense, Mastodon is less like Facebook and more like email — you can have your own address — and your own acceptable use policies — on one server and still send mail to a user on another server.

To have that ability to share messages with users of other servers, Mastodon has to support “federation”. Federation means that I can follow users on other Mastodon instances — you can have an account on mastodon.xyz and read my posts on octodon.social. It’s a bit more complicated than using a service like Twitter or Facebook, but it has the great advantage that communities of interest can have their own community rules. Don’t want adult content on your server? Fine — don’t allow it. Want to shield your child from adult content? Don’t federate your server with servers that allow NSFW content.

When the geek press began writing about Mastodon in April, the main story was about the community’s explosive growth. Tens of thousands of users joined in April, and some began to speculate that the network could serve as a challenger to Twitter.

It’s hard to say how fast Mastodon is growing, because it’s hard to say how big Mastodon is. The Mastodon Network Monitoring Project does its best to keep up, but servers come online and go down all the time. If you’re running a Mastodon server and don’t register or federate it (perfectly reasonable if you want a community just for people you invite) it won’t register on the project’s dashboard. So we might think of the 1.5 million registered users on ~2400 servers as the network’s minimum size.

Map of Mastodon instances from Mastodon Network Monitoring Project, August 17, 2017

Map those instances, and one thing becomes clear pretty fast: Mastodon is mostly a Japanese phenomenon. The two largest Mastodon instances — pawoo.net and mstdn.jp — have over 100,000 users each, significantly more than mastodon.social, the “mothership” site that Rochko himself administers. Three of the top five Mastodon instances are based in Japan, and the Mastodon monitoring project estimates that 61% of the network’s users are Japanese.

In one sense, this isn’t a surprise. Twitter is massive in Japan, where it has more users than Facebook, and is projected to be used by half of all social network users and a quarter of all internet users this year. But that’s not the whole explanation. Instead, we’ve got to talk about lolicon.

(I’m about to talk about cultural differences and child pornography. This is not a defense of child pornography, but it’s going to discuss the fact that different cultures may have different standards about what imagery is and is not acceptable. If that’s not okay with you, back away now.)

In the US, we have a strong taboo about sexualized imagery of children. People who are interested in sexualized imagery of children — whether it’s explicit photography or idealized drawings — are considered pedophiles, and the material they seek out is termed child pornography. (Let’s ignore for the moment the hypersexualization of tween girls in American popular culture — no one said cultural taboos have to be consistent.)

In Japan, there’s a distinction between 児童ポルノ — child pornography — and ロリコン — “lolicon”, short for “Lolita complex”. Child pornography is illegal in Japan and seeking it out would be deeply socially unacceptable. Lolicon, which includes animated cartoons and 2D drawings of young men and women in a way that is undeniably sexualized, sometimes through explicit depictions of sexual acts, is legal, widespread and significantly accepted. As Matthew Scala writes, “If you like ロリコン then you’re a nerd, but that’s not a big deal. It is legal and popular and sold in bookstores everywhere. I cannot emphasize enough that ロリコン is not only legal but really acceptable in Japan. It’s merely nerdy. On the other hand, if you like 児童ポルノ then you’re an evil sicko monster, and 児童ポルノ is highly illegal.” Or, as a Japanese friend of mine put it, “I think the sort of pedophilia tendency is considered nearly normal and tolerated but they are quite strict about the law around it now — not as strict as the US but realize that some things are illegal. But dreaming about these things isn’t illegal.”

(One more time — I’m not defending lolicon here, just explaining that lolicon is a thing, that it’s popular in Japan, and that this has implications for understanding Mastodon’s growth.)

Twitter’s rules about the acceptability of graphic content are vague — intentionally so. (I wrote the terms of service for Tripod.com, one of the first user generated content sites. When you administer a UGC site, vagueness is your friend.) Twitter’s rules state, “Twitter may allow some forms of graphic content in Tweets marked as sensitive media.” Those guidelines give Twitter’s administrators a great deal of freedom in removing lolicon and banning those who post it. You can still find lolicon on Twitter, but the service has evidently been quite aggressive in removing this sort of imagery. Lolicon fans became refugees. Scala, who wrote a helpful article on the migration of lolicon fans to Mastodon, argues that Japanese users had been looking for a Twitter-like platform where they could share lolicon writing and imagery for some time. They’d used earlier, less-user friendly decentralized social networks, and when Mastodon came around, they flocked to it.

And then Pixiv entered the picture. Pixiv is an enormously popular image archive site in Japan, aimed at artists who create their own drawings — it might be analogous to DeviantArt in the US, but focused on drawings, not photography. Lolicon is wildly popular on Pixiv, as you can tell from one of the signup pages.

One of several English language signup screens for Pixiv

In April 2017, Pixiv began hosting a Mastodon instance — Pawoo.net — that quickly became the most popular Mastodon server in the world. If you have a Pixiv account, it’s a single click to establish a Pawoo.net account. And if you monitor the feed on pawoo.net, you’ll see that a great deal of content features lolicon, much of it behind content warning tags. In response to the growth of pawoo.net, a number of large, predominantly North American/European Mastodon servers stopped federating posts from the Japanese site, as they were uncomfortable with lolicon appearing as part of their feed. Scala reports that Rochko modified the database on mastodon.social to make it possible to “silence” pawoo.net, so that posts only appear if you explicitly choose to subscribe to users of that server.

Needless to say, not every Mastodon administrator is excited that the protocol is being used to harbor lolicon. The terms of service for mastodon.cloud — the fifth largest Mastodon instance, and the largest based in the US — now explicitly prohibit “lolicon, immoral and indecent child pics”.

Community guidelines for mastodon.cloud, August 17, 2017

I started down the path to lolicon because I wanted to answer a simple question: was Mastodon growing as fast as it was back in April, and if so, why wasn’t I seeing more friends on the service? The answer seems to be that Mastodon continues to grow, but a major engine of its growth is Japanese erotica. And while I can see the headlines now — “Japanese Child Porn Powers Decentralized Publishing” — let’s be clear: this is exactly what decentralized publishing is good for.

The appeal of decentralized publishing is that it makes it possible to create online communities that operate under all sorts of different rulesets. If Twitter doesn’t find lolicon acceptable, lolicon fans can create their own online community with their own rules.

This is a hot topic at the moment. In the wake of neo-Nazi violence in Charlottesville, Virginia, many internet intermediaries — companies and entities that provide services necessary to find, publish and protect online content — have chosen to stop providing services to white nationalist organizations. Matthew Prince, CEO of Cloudflare, a company that provides scaling services for websites, wrote an especially blunt and honest post about his decision to remove the Daily Stormer from his servers, while simultaneously explaining that he personally had far too much power to control what content could be booted from the internet. “I woke up this morning in a bad mood and decided to kick them off the Internet.”

Human rights activists have been worried about intermediary censorship for a long time — I wrote a chapter on the topic for the 2010 book Access Controlled. Decentralized publishing solves some of the problems of intermediary censorship, but not all. As white supremacists are booted from platforms like Twitter and Reddit, they may well seek out decentralized platforms where they set their own rules. (Many have migrated to a platform called Gab, which is not decentralized, but has a set of community guidelines that welcome racist, nationalist speech.) Intermediaries like Domain Name Registrars and Content Delivery Networks may still refuse them service, but neo-Nazis on their own Mastodon server won’t be worried that they’ll be kicked off Twitter, like the Lolicon fans were.

The point of decentralized publishing is not censorship resistance — decentralization provides a little resilience to intermediary censorship, but not a lot. Instead, decentralization is important because it allows a community to run under its own rules. One of the challenges for Mastodon is to demonstrate that there are reasons beyond lolicon to run a community under your own rules. This is analogous to a problem Tor faces. People undeniably use Tor to do terrible things online, publishing and accessing hateful content. But Tor is an essential tool for journalists, whistleblowers and activists. It’s a constant struggle for Tor to recruit “everyday” users of Tor, who use the service to evade commercial surveillance. Those users provide valuable “cover traffic”, making it harder to identify whistleblowers who use the service, and political air cover for those who would seek to ban the tool so they can combat child pornography and other illegal content.

Fortunately, there are communities that would greatly benefit from Mastodon: people who’ve grown sick of sexism and harassment on Twitter, but still want the brief, lightweight interaction the site is so good at providing. One of the mysteries of Mastodon is that while many instances were started precisely to provide these alternative spaces, they’ve not grown nearly as fast as those providing space for a subculture banned from Twitter. The Mastodon story so far suggests that sticks may be more powerful than carrots.

While I suspect some advocates for distributed publishing will be disappointed that Mastodon’s growth is so closely tied to controversial content, it’s worth remembering that controversial content has long been a driver of innovations in communications technology — pornography arguably was an engine that drove the adoption of cable television, the VCR and, perhaps, broadband internet. Beyond porn, the internet has always provided spaces for content that wasn’t widely acceptable. When it was difficult to find information and LGBTQ lifestyles in rural communities, the internet became a lifeline for queer teens. Distributed social networks are a likely space for conversations about ideas and topics too sensitive to be accepted on centralized social networks, and it’s likely that some of the topics explored will be ones that become more socially acceptable over time.

Our team at the MIT Media Lab — Chelsea Barabas, Neha Narula and myself — are releasing a new report today on distributed publishing, titled “Back to the Future: the Decentralized Web” We end up speculating that the main barriers to adoption of decentralized platforms aren’t technical, but around usability. Most distributed publishing tools are simply too complex for most users to adopt. Mastodon may have overcome that problem, borrowing design ideas from a successful commercial product. But the example of lolicon may challenge our theories in two directions. One, if you’re unable to share content on the sites you’re used to using — Twitter, in this case — you may be more willing to adopt a new tool, even if its interface is initially unfamiliar. Second, an additional barrier to adoption for decentralized publishing may be that its first large userbase is a population that cannot use centralized social networks. Any stigma associated with this community may make it harder for users with other interests to adopt these new tools.

Mastodon is big in Japan… at least, in one subculture. Whether that bodes well or ill for widespread adoption of the platform more globally is something we’ll be watching closely as we work to understand the future of distributed publishing.

Firefox Focus – A new private browser for iOS and Android

$
0
0

Firefox had a baby and named it Focus! Firefox Focus is the new private browser for iOS and Android, made for those times when you just need something simple and lightweight to do whatever you need to do and get back to life.

Focus is ideal for tasks that don’t need “browser overkill.” Overkill is when software uses a maximum amount of your device’s processing power and resources, when a bare minimum would have worked just fine. Overkill can make using the internet feel slow, unresponsive and kind-of not worth the effort. Overkill sends your data to third-party trackers.

For example, if you need to jump on the internet to look up Muddy Waters’ real name, and instead of “McKinley Morganfield” you get pop-up ads, screen takeovers, “sponsored” content and other third-party advertising-driven distraction, then you know what browser overkill feels like. It costs you too much in wasted time and invaded privacy to justify the simple ask.

Instead of every beta bell and whistle, Focus has only one screen; a min amt of btns; no stored passwords or bandwidth hogging; and won’t remember your history. Focus also blocks third-party trackers automatically, giving you a faster and more private mobile search and browsing experience by default.

So when you value speed and simplicity in a quick session, use Firefox Focus! Add the Android or iOS app to your private browsing routine and see what a browser built light and lean on purpose can bring to your focus and peace of mind.

Download Firefox Focus on Google Play or in the App Store.

“What next?”

$
0
0
Warning: this has turned out to be a .. long post.

Recently, on the twitters, Stephanie Hurlburt suggested that it'd be healthy for people who have been around the computering industry for a while (*cough cough*) to take some "audience questions" from strangers. I obliged, and someone asked me an interesting one:


"After memory safety, what do you think is the next big step for compiled languages to take?"

Setting aside the fact that "compiled" languages have had various more-or-less credible forms of "memory safety" for quite a long time, I agree (obviously!) that cementing memory safety as table stakes in all niches of language design -- especially systems languages -- continues to be an important goal; but also that there's also lots more to do! So I figured I'd take a moment to elaborate on some areas that we're still well short of ideal in; maybe some future language engineers can find inspiration in some of these notes.

Before proceeding, I should emphasize: these are personal and subjective beliefs, about which I'm not especially interested in arguing (so will not entertain debate in comments unless you have something actually-constructive to add); people in the internet are Very Passionate about these topics and I am frankly a bit tired of the level of Passion that often accompanies the matter. Furthermore these opinions do not in any way represent the opinions of my employer. This is a personal blog I write in my off-hours. Apple has a nice, solid language that I'm very happy to be working on, and this musing doesn't relate to that. I believe Swift represents significant progress in the mainstream state of the art, as I said back when it was released.

That all said, what might the future hold in other languages?

Broadly applicable problem areas

These are either ubiquitous abstractions or problems that still need work, that will need work in basically any mainstream language that comes next, as far as I can tell.

Modules


This might come as a surprise to hear, but most languages have module systems with serious weaknesses. And I agree with Bob Harper in his assessment that Modules Matter Most. Many languages have no module system at all, and many that have one have it only as a way of (say) managing namespaces or compilation order. More-powerful module systems exist -- you'll have run into some of the components if you've worked with dependent types, type classes, traits, signatures, functors -- but there's a bewildering array of design constraints to navigate (generativity, opacity, stratification, coherence, subtyping, higher-order-ness, first-class-ness, separate compilation, extensibility, recursion) when arriving at a practical, usable module system. Few if any languages have "done this right" in a convincing enough way that I'd say the problem is solved. The leading research in the field, at the moment, is probably Andreas Rossberg's work on 1ML. But there are decades of ground-work that you should really, really read basically all of if you're going to explore this space.

(Writing this makes me think it deserves a footnote / warning: if while reading these remarks, you feel that modules -- or anything else I'm going to mention here -- are a "simple thing" that's easy to get right, with obvious right answers, I'm going to suggest you're likely suffering some mixture of Stockholm syndrome induced by your current favourite language, Engineer syndrome, and/or Dunning–Kruger effect. Literally thousands of extremely skilled people have spent their lives banging their heads against these problems, and every shipping system has Serious Issues they simply don't deal with right.)

Errors


This too might feel like a surprise, but I'm not convinced that we've "solved" error management, in general, in any language. We have a few credible schools of design-philosophy mostly hold together well enough to ship a language: algebraic effects and handlers, checked and unchecked exceptions, crash-failure with partitions and supervision trees, monads, result sum-types, condition / restart systems, transactions with rollbacks; but none of them completely solves the design space well enough that the problem feels "done". Even committing to one or another such regime -- and it really does involve not just a few mechanisms, but a whole set of interlocking protocols that support error management -- there are serious abstraction leakages and design tradeoffs in nearly every known approach (modularity, compositionality, locality, synchronicity, soundness, cognitive load, implementation costs, interface costs with different regimes). Errors are absurdly hard to get right.

Daira Hopwood has some notes and design material in hir work on the Noether language, and there's (again) a lot to read before deciding how to proceed. Doing it well takes you on a long journey through both a lot of fussy technical material and a lot of highly subjective, downright philosophical topics too, like "how to defend yourself against your own mistakes" and "what does it mean for a value to be right or wrong".

Coroutines, async/await, "user-visible" asynchronicity


It's in vogue at the moment for new languages to have something like async/await. This does not mean it's a done deal: lots has been done, but lots is still messy. The boundary between synchronous-world and asynchronous world -- in terms of types, control flow, correctness, errors, modularity, composition -- is still very awkward. Whether and how to mitigate between different synchronicity regimes, especially across FFIs or differing runtimes, is hard. Integration with effects is hard. Integration with parallelism is hard. Which parts need to be supported by the language and which parts surface to the user is hard. Cognitive load is still very high.

Effect systems, more generally


There's still not a strong consensus on where and how to integrate effects into mainstream compiled languages. The type-systems research world seems to have blown past this point, and now speaks breezily of "type and effect systems" as though they're a solved problem; but most working programmers in most languages have no access to any meaningful effect system, much less a state of the art, extensible, inference-heavy one. Languages like Eff or Koka are leading in promising directions, but it's still far from mainstream or solved: modularity, polymorphism and encoding issues abound, as does the general cognitive load of the feature.

Extended static checking (ESC), refinement types, general dependent-typed languages

This has been revisited over the decades of language design more often than Godzilla movies have been remade, and it's because it's a fundamentally good idea, it's just very hard, in terms of the design space.

The idea is to embed a "logic" in your type system (the boundary is formally not really there, but notationally and cognitively it sure is!) such that users regularly, freely mix their use of types that assert the in-memory shapes of data and functions, with other "logical types" that assert some classes of more-general, (semi-)computable predicates about those data and functions. In other words, let the user write "general" correctness conditions about their programs in a full-blown (but say, primitive-recursive) expression language, and have the "type system" statically check (prove) those conditions always hold (or emit an error message showing a counterexample, just like a type error).

These systems are usually a few steps back from "full blown" higher-order dependent type theory proof assistants, a la Isabelle, Coq, Lean or such; though in some cases the type systems inch into the same territory. The design problem hinges on the annotation burden being low enough that the user doesn't give up in frustration: like most type systems, the user always has to provide some information for the system to infer the rest, but the balance can tilt pretty dramatically towards "way too much annotation" when more-expressive logics enter the game. In many cases, the scale of the annotations overwhelm the program being annotated, and the maintenance burden of those annotations (as the user edits the program) are greater than the coding burden. Which, as a language designer, is Really Not A Good User Experience.

So far, most exercises in this space have ended in frustration, or have had limited application to areas with much higher costs for failure (safety-critical embedded systems, etc.) Most mainstream languages have decidedly more .. uh, decidable type systems than ESC, refinement typing or dependent-typed language projects have proposed. But this does not mean it's a dead end. It means that (if you're among the faithful, which I am) it's a design space that's not yet had its breakthrough product! Cell phones weren't a thing either, until they were. Maybe in another decade or two, we'll be looking back on these as the dark ages of boring types.

Projects in this space run a bit of a spectrum of levels of expressivity in their type systems (and degree to which they unify "logic" and "types"), as well as the spectrum from research testbed to attempt at mainstream viability; I don't feel qualified (and this isn't the place) to do a detailed compare-and-contrast job, so I'll just dump some links. If you want to play in this space, you ought to study at least Sage, Stardust, Whiley, Frama-C, SPARK-2014, Dafny, F*, ATS, Xanadu, Idris, Zombie-Trellys, Dependent Haskell, and Liquid Haskell.

Be prepared if you venture into this area: the complexity wall here can make other areas of computering look .. a bit like child's play. It gets very dense, very fast. The comic about how computer people would write math books? This stuff all reads like that.

Actual Formalization / Metatheory


Speaking of formal logic: an unfortunate fact about most languages -- even simple ones with very pedestrian type systems -- is that they usually ship with next-to-no formalization of their semantics, nor proofs that any such formalizations have any interesting metatheoretic properties (eg. soundness). We tend to just make do with testing and informal, whiteboard-and-email level reasoning about the systems, hoping that'll get us close enough to correct that it'll be ok.

This approach is, to say the least, wearing thin. Compilers still have serious bugs decades after they ship, failing to implement the languages they're supposed to. Worse, languages in the field still have serious design flaws decades after they ship, failing to uphold safety properties when subject to formal analysis. Long term, we have to get to the point where we ship languages -- and implementations -- with strong, proven foundations. There are promising moves in this direction, both in designed-for-language-designer tools like K framework or Redex, and in the general set of libraries and projects being undertaken in general proof assistants like Isabelle and Coq.

Grab bag of potential extras for mainstream languages


These are issues with (IMO) potential applicability to mainstream languages, but I think a little less clear of a foundational role in structuring the language; a little more like "features it'd be nice to include in the design". Some have come and gone before, others are still in research form.

Session types, behavioural types, choreographies


There's a family of work called Behavioural Types, Session Types or Choreographies, that involve describing the possible interaction traces of both sides, or all sides, of a multi-party interaction, into a single "global type" -- the type of the interaction itself -- and then systematically refining / decomposing that type into a set of separate but dual endpoint-types, that each enforce only-legal-transitions (in sending, recieving and state-changing senses) on the participants.

There are various ways to encode this idea in a language, and lots of components; people have done encodings and experiments, even some prototype languages (eg. Links and Scribble), but nothing that's broken through to the mainstream yet. But I think it's a very promising area that's not too hard to understand. Lots of minable papers, good potential return on investment for taking the research mainstream.

Parametric mutability, permission / state polymorphism, ???


Here's a small but tasty question that's unfortunately awkward to answer in most languages with mutability control: how often do you find yourself having to write two copies of a function, that differ only in the mutability qualifiers associated with its parameters or return values? Or, further: does the system of function types and effects scale to expressing polymorphism over the mutable-ness of a type, such that you can fold (say) a higher-order mutating function over a mutable value with the same higher-order function that you'd use to fold a non-mutating function over an immutable value?

(Or I guess if you're a functional nerd: how often do you find yourself writing lifts between monads?)

Newer languages try to enforce fancier reader/writer regimes (fractional permissions, borrow checkers, etc.) but often at some cost to parametricity / polymorphism. And this is not new! Open your average C++ file and look at the number of different ways you have to const-qualify a library's methods to make it compose correcly with all of its users. There's a form of abstraction and polymorphism seemingly missing in here.

Richer patterns


Another small, tasty question: what's the most complicated pattern you can write in a match expression in your language? We have plenty of automata theory for compiling-down all sorts of complicated patterns to efficient matchers, and we have tons of evidence that users enjoy writing pattern-based programs, that users write shorter, simpler and less failure-prone programs when they can express a task in pattern/action form, and that pattern-sets are amenable to extremely helpful static analysis / diagnosis along the lines of exhaustiveness checking, equivalence checking, emptiness checking and so forth. So why not push the patterns in your language to the limit?

I think this is a very fruitful area to explore, especially building out from tree-patterns and visibly-pushdown patterns. Some languages make the pattern system extensible, eg. F# active patterns at the cost of formal reasoning about it at compile time; others push a specific extended pattern-automaton theory into the type system. Many languages in this space, eg. CDuce or FAST, are (unfortunately) "XML oriented" which turns people off the technology lately, since XML is out of fashion, but they're worth looking into!

Unit-of-measure types


Physical "units" attached to scalars, with arithmetic operators distributing through to the units: a little language support supposedly goes a long way. Frink pioneered some techniques here, F# picked it up (as with many language experiments!) and I do not know if it's "done" yet or even if users consider it a universally welcome idea, but it seems to me that it has potential. It's "small" but rather important not to mix units!

Cost-model type systems


This is a family of features for a type system wherein a complexity bound (a la Big-O notation) is calculated on the resources consumed by performing a computation, letting you "typecheck" the cost-model of a program. The language RAML is one of the more promising general-purpose works in this space, though there's also a long line of work in WCET analysis of embedded systems, timed automata and so forth.

Heterogeneous memory and parallelism


These are languages that try to provide abstract "levels" of control flow and data batching/locality, into which a program can cast itself, to permit exploitation of heterogeneous computers (systems with multiple CPUs, or mixed CPU/GPUs, or coprocessors, clusters, etc.)

Languages in this space -- Chapel, Manticore, Legion -- haven't caught on much yet, and seem to be largely overshadowed by manual, not-as-abstract or not-as-language-integrated systems: either cluster-specific tech (like MPI) or GPU-specific tech like OpenCL/CUDA. But these still feel clunky, and I think there's a potential for the language-supported approaches to come out ahead in the long run.

Open implementations


Many older and more "dynamic" high-level languages (Lisps, Smalltalks, Forths) were designed around a kind of uniform programs-as-data model, and the presence / presupposition that the compiler would always be in-process with your program: programs thus more commonly invoked (and extended) the implementation significantly at runtime, did a lot of dynamic metaprogramming, reflection, and so forth. This was maybe a kinder, gentler time when "arbitrary code execution" wasn't quite so synonymous with "security nightmare"; but it also had a sort of internal logic, represents a design aesthetic that puts pressure on the language machinery itself to be programmable: pressure to keep the language, its syntax, its type system, its compilation model and so forth all simple, uniform, programmable.

We've since been through a few different eras of language sensibilities around this sort of thing,
including some imaginary mobile-code stories like Telescript, Obliq, and eventually JVM/CLR. These latter were weird since they tried to be mobile (which rarely worked), and tried to have semi-open implementations (at least compilers-as-libraries and some access to the bytecode loaders) but didn't quite make it to the point where it was easy or obvious to do source-level metaprogramming (with the notable exceptions of F# quotations and F# type providers). But through all this, in the background there's been this somewhat unfortunate, competing "grown-up" model that tends to dominate mainstream languages (everything from FORTRAN to C++): a pretty complex grammar and AST, a pretty hairy compilation model, a very heavy batch-compiler that's definitely not part of the normal process runtime, and programs that seldom do any metaprogramming, even in cases where it'd be appropriate. Recent "compiled" languages have adopted this style, I suspect in part because LLVM is simply shaped that way, and I suspect also in part as a response to negative experiences with both JVM/CLR environments and overzealous use of metaprogramming in scripting languages.

I don't think, however, that the baby ought to be thrown out with the bathwater. I don't think a few bad open implementations invalidates the idea, any more than a few bad static type systems invalidates that idea. They can be done well. Julia for example has quite a nice static type system and compiler, but also a uniform syntax that's friendly to dynamic metaprogramming and JIT'ing. There are also several static metaprogramming and staged-programming systems: MetaOcaml, Template Haskell, ScalaMeta and so forth. So .. there's a spectrum, a design space.

I'm not sure exactly where to go with this topic, except to say I'm a bit dissatisfied with how hard it is to do tooling for current languages, how large the feedback cycle is between a language and its own (meta)programming tools, how distant the tools are from the users, and perhaps to point out that dynamic compilation is not entirely dead: we appear to be entering an era with a new high-integrity universal bytecode sandbox, designed for mobile code and dynamic JIT'ing, and with a lot of industrial support. It might be an interesting time to consider projects (even "static" ones) that take a slightly more nuanced view of the code/data relationship, the program/metaprogram/compiler relationship, and make the whole compilation model a little more .. pliant (yes that was a Pliant reference and if you remember what that was, congratulations you've been on the internet too long, here's your TUNES badge of merit).

The rest...


I had some extended notes here about "less-mainstream paradigms" and/or "things I wouldn't even recommend pursuing", but on reflection, I think it's kinda a bummer to draw too much attention to them. So I'll just leave it at a short list: actors, software transactional memory, lazy evaluation, backtracking, memoizing, "graphical" and/or two-dimensional languages, and user-extensible syntax. If someone's considering basing a language on those, I'd .. somewhat warn against it. Not because I didn't want them to work -- heck, I've tried to make a few work quite hard! -- but in practice, the cost:benefit ratio doesn't seem to turn out really well. Or hasn't when I've tried, or in (most) languages I've seen. But who knows? There are always exceptions, and I'm wrong far more often than I'm right, so please don't let me stop you if your heart is set on it!

Why Go is my favorite programming language

$
0
0

I strive to respect everybody’s personal preferences, so I usually steer clear of debates about which is the best programming language, text editor or operating system.

However, recently I was asked a couple of times why I like and use a lot of Go, so here is a coherent article to fill in the blanks of my ad-hoc in-person ramblings :-).

My background

I have used C and Perl for a number of decently sized projects. I have written programs in Python, Ruby, C++, CHICKEN Scheme, Emacs Lisp, Rust and Java (for Android only). I understand a bit of Lua, PHP, Erlang and Haskell. In a previous life, I developed a number of programs usingDelphi.

I had a brief look at Go in 2009, when it was first released. I seriously started using the language when Go 1.0 was released in 2012, featuring the Go 1 compatibility guarantee. I still havecode running in production which I authored in 2012, largely untouched.

1. Clarity

Formatting

Go code, by convention, is formatted using thegofmt tool. Programmatically formatting code is not a new idea, but contrary to its predecessors, gofmt supports precisely one canonical style.

Having all code formatted the same way makes reading code easier; the code feels familiar. This helps not only when reading the standard library or Go compiler, but also when working with many code bases — think Open Source, or big companies.

Further, auto-formatting is a huge time-saver during code reviews, as it eliminates an entire dimension in which code could be reviewed before: now, you can just let your continuous integration system verify that gofmt produces no diffs.

Interestingly enough, having my editor apply gofmt when saving a file has changed the way I write code. I used to attempt to match what the formatter would enforce, then have it correct my mistakes. Nowadays, I express my thought as quickly as possible and trust gofmt to make it pretty (example of what I would type, click Format).

High-quality code

I use the standard library (docs,source) quite a bit, see below.

All standard library code which I have read so far was of extremely high quality.

One example is the image/jpeg package: I didn’t know how JPEG worked at the time, but it was easy to pick up by switching between the Wikipedia JPEG article and theimage/jpeg code. If the package had a few more comments, I would qualify it as a teaching implementation.

Opinions

I have come to agree with many opinions the Go community holds, such as:

Few keywords and abstraction layers

The Go specification lists only 25 keywords, which I can easily keep in my head.

The same is true for builtin functions andtypes.

In my experience, the small number of abstraction layers and concepts makes the language easy to pick up and quickly feel comfortable in.

While we’re talking about it: I was surprised about how readable the Go specification is. It really seems to target programmers (rather than standards committees?).

2. Speed

Quick feedback / low latency

I love quick feedback: I appreciate websites which load quickly, I prefer fluent User Interfaces which don’t lag, and I will chose a quick tool over a more powerful tool any day. The findings of large web properties confirm that this behavior is shared by many.

The authors of the Go compiler respect my desire for low latency: compilation speed matters to them, and new optimizations are carefully weighed against whether they will slow down compilation.

A friend of mine had not used Go before. After installing theRobustIRC bridge using go get, they concluded that Go must be an interpreted language and I had to correct them: no, the Go compiler just is that fast.

Most Go tools are no exception, e.g. gofmt or goimports are blazingly fast.

Maximum resource usage

For batch applications (as opposed to interactive applications), utilizing the available resources to their fullest is usually more important than low latency.

It is delightfully easy to profile and change a Go program to utilize all available IOPS, network bandwidth or compute. As an example, I wrote aboutfilling a 1 Gbps link, and optimized debiman to utilize all available resources, reducing its runtime by hours.

3. Rich standard library

The Go standard library provides means to effectively use common communications protocols and data storage formats/mechanisms, such as TCP/IP, HTTP, JPEG, SQL, …

Go’s standard library is the best one I have ever seen. I perceive it as well-organized, clean, small, yet comprehensive: I often find it possible to write reasonably sized programs with just the standard library, plus one or two external packages.

Domain-specific data types and algorithms are (in general) not included and live outside the standard library, e.g. golang.org/x/net/html. Thegolang.org/x namespace also serves as a staging area for new code before it enters the standard library: the Go 1 compatibility guarantee precludes any breaking changes, even if they are clearly worthwhile. A prominent example isgolang.org/x/crypto/ssh, which had to break existing code to establish a more secure default.

4. Tooling

To download, compile, install and update Go packages, I use the go get tool.

All Go code bases I have worked with use the built-intesting facilities. This results not only in easy and fast testing, but also in coverage reports being readily available.

Whenever a program uses more resources than expected, I fire up pprof. See this golang.org blog post aboutpprof for an introduction, ormy blog post about optimizing Debian Code Search. After importing the net/http/pprof package, you can profile your server while it’s running, without recompilation or restarting.

Cross-compilation is as easy as setting the GOARCH environment variable, e.g. GOARCH=arm64 for targeting the Raspberry Pi 3. Notably, tools just work cross-platform, too! For example, I can profile gokrazy from my amd64 computer: go tool pprof ~/go/bin/linux_arm64/dhcp http://gokrazy:3112/debug/pprof/heap.

godoc displays documentation as plain text or serves it via HTTP. godoc.org is a public instance, but I run a local one to use while offline or for not yet published packages.

Note that these are standard tools coming with the language. Coming from C, each of the above would be a significant feat to accomplish. In Go, we take them for granted.

Getting started

Hopefully I was able to convey why I’m happy working with Go.

If you’re interested in getting started with Go, check out the beginner’s resources we point people to when they join the Gophers slack channel. Seehttps://golang.org/help/.

Caveats

Of course, no programming tool is entirely free of problems. Given that this article explains why Go is my favorite programming language, it largely talks positively. I will mention a few issues in passing, though:

  • If you use Go packages which don’t offer a stable API, you might want to use a specific, known-working version. Your best bet is the dep tool, which is not part of the language at the time of writing.
  • Idiomatic Go code does not necessarily translate to the highest performance machine code, and the runtime comes at a (small) cost. In the rare cases where I found performance lacking, I successfully resorted to cgo or assembler. If your domain is hard-realtime applications or otherwise extremely performance-critical code, your mileage may vary, though.
  • I wrote that the Go standard library is the best I have ever seen, but that doesn’t mean it doesn’t have any problems. One example is complicated handling of comments when modifying Go code programmatically via one of the standard library’s oldest packages, go/ast.

Vue.js vs. React

$
0
0

This is definitely the most difficult page in the guide to write, but we do feel it’s important. Odds are, you’ve had problems you tried to solve and you’ve used another library to solve them. You’re here because you want to know if Vue can solve your specific problems better. That’s what we hope to answer for you.

We also try very hard to avoid bias. As the core team, we obviously like Vue a lot. There are some problems we think it solves better than anything else out there. If we didn’t believe that, we wouldn’t be working on it. We do want to be fair and accurate though. Where other libraries offer significant advantages, such as React’s vast ecosystem of alternative renderers or Knockout’s browser support back to IE6, we try to list these as well.

We’d also like your help keeping this document up-to-date because the JavaScript world moves fast! If you notice an inaccuracy or something that doesn’t seem quite right, please let us know by opening an issue.

React

React and Vue share many similarities. They both:

  • utilize a virtual DOM
  • provide reactive and composable view components
  • maintain focus in the core library, with concerns such as routing and global state management handled by companion libraries

Being so similar in scope, we’ve put more time into fine-tuning this comparison than any other. We want to ensure not only technical accuracy, but also balance. We point out where React outshines Vue, for example in the richness of their ecosystem and abundance of their custom renderers.

With that said, it’s inevitable that the comparison would appear biased towards Vue to some React users, as many of the subjects explored are to some extent subjective. We acknowledge the existence of varying technical taste, and this comparison primarily aims to outline the reasons why Vue could potentially be a better fit if your preferences happen to coincide with ours.

The React community has been instrumental in helping us achieve this balance, with special thanks to Dan Abramov from the React team. He was extremely generous with his time and considerable expertise to help us refine this document until we were both happy with the final result.

Performance

Both React and Vue offer comparable performance in most commonly seen use cases, with Vue usually slightly ahead due to its lighter-weight Virtual DOM implementation. If you are interested in numbers, you can check out this 3rd party benchmark which focuses on raw rendering/updating performance. Note that this does not take complex component structures into account, so should only be considered a reference rather than a verdict.

Optimization Efforts

In React, when a component’s state changes, it triggers the re-render of the entire component sub-tree, starting at that component as root. To avoid unnecessary re-renders of child components, you need to either use PureComponent or implement shouldComponentUpdate whenever you can. You may also need to use immutable data structures to make your state changes more optimization-friendly. However, in certain cases you may not be able to rely on such optimizations because PureComponent/shouldComponentUpdate assumes the entire sub tree’s render output is determined by the props of the current component. If that is not the case, then such optimizations may lead to inconsistent DOM state.

In Vue, a component’s dependencies are automatically tracked during its render, so the system knows precisely which components actually need to re-render when state changes. Each component can be considered to have shouldComponentUpdate automatically implemented for you, without the nested component caveats.

Overall this removes the need for a whole class of performance optimizations from the developer’s plate, and allows them to focus more on building the app itself as it scales.

HTML & CSS

In React, everything is just JavaScript. Not only are HTML structures expressed via JSX, the recent trends also tend to put CSS management inside JavaScript as well. This approach has its own benefits, but also comes with various trade-offs that may not seem worthwhile for every developer.

Vue embraces classic web technologies and builds on top of them. To show you what that means, we’ll dive into some examples.

JSX vs Templates

In React, all components express their UI within render functions using JSX, a declarative XML-like syntax that works within JavaScript.

Render functions with JSX have a few advantages:

  • You can leverage the power of a full programming language (JavaScript) to build your view. This includes temporary variables, flow controls, and directly referencing JavaScript values in scope.

  • The tooling support (e.g. linting, type checking, editor autocompletion) for JSX is in some ways more advanced than what’s currently available for Vue templates.

In Vue, we also have render functions and even support JSX, because sometimes you do need that power. However, as the default experience we offer templates as a simpler alternative. Any valid HTML is also a valid Vue template, and this leads to a few advantages of its own:

  • For many developers who have been working with HTML, templates simply feel more natural to read and write. The preference itself can be somewhat subjective, but if it makes the developer more productive then the benefit is objective.

  • HTML-based templates make it much easier to progressively migrate existing applications to take advantage of Vue’s reactivity features.

  • It also makes it much easier for designers and less experienced developers to parse and contribute to the codebase.

  • You can even use pre-processors such as Pug (formerly known as Jade) to author your Vue templates.

Some argue that you’d need to learn an extra DSL (Domain-Specific Language) to be able to write templates - we believe this difference is superficial at best. First, JSX doesn’t mean the user doesn’t need to learn anything - it’s additional syntax on top of plain JavaScript, so it’s easy for anyone familiar with JavaScript to learn, but saying it’s essentially free is misleading. Similarly, a template is just additional syntax on top of plain HTML and thus has very low learning cost for those who are already familiar with HTML. With the DSL we are also able to help the user get more done with less code (e.g. v-on modifiers). The same task can involve a lot more code when using plain JSX or render functions.

On a higher level, we can divide components into two categories: presentational ones and logical ones. We recommend using templates for presentational components and render function / JSX for logical ones. The percentage of these components depends on the type of app you are building, but in general we find presentational ones to be much more common.

Component-Scoped CSS

Unless you spread components out over multiple files (for example with CSS Modules), scoping CSS in React is often done via CSS-in-JS solutions. There are many competing solutions out there, each with its own caveats. A common issue is that features such as hover states, media queries, and pseudo-selectors either require heavy dependencies to reinvent what CSS already does - or they simply are not supported. If not optimized carefully, CSS-in-JS can also introduce non-trivial runtime performance cost. Most importantly, it deviates from the experience of authoring normal CSS.

Vue on the other hand, gives you full access to CSS within single-file components:

<stylescoped>

@media (min-width: 250px) {

.list-container:hover {

background: orange;

}

}

</style>

The optional scoped attribute automatically scopes this CSS to your component by adding a unique attribute (such as data-v-21e5b78) to elements and compiling .list-container:hover to something like .list-container[data-v-21e5b78]:hover.

If you are already familiar with CSS Modules, Vue single file components also have first-class support for it.

Finally, just as with HTML, you also have the option of writing your CSS using any preprocessors (or post-processors) you’d like, allowing you to leverage existing libraries in those ecosystems. You can also perform design-centric operations such as color manipulation during your build process, rather than importing specialized JavaScript libraries that would increase the size of your build and complexity of your application.

Scale

Scaling Up

For large applications, both Vue and React offer robust routing solutions. The React community has also been very innovative in terms of state management solutions (e.g. Flux/Redux). These state management patterns and even Redux itself can be easily integrated into Vue applications. In fact, Vue has even taken this model a step further with Vuex, an Elm-inspired state management solution that integrates deeply into Vue that we think offers a superior development experience.

Another important difference between these offerings is that Vue’s companion libraries for state management and routing (among other concerns) are all officially supported and kept up-to-date with the core library. React instead chooses to leave these concerns to the community, creating a more fragmented ecosystem. Being more popular though, React’s ecosystem is considerably richer than Vue’s.

Finally, Vue offers a CLI project generator that makes it trivially easy to start a new project using your choice of build system, including webpack, Browserify, or even no build system. React is also making strides in this area with create-react-app, but it currently has a few limitations:

  • It does not allow any configuration during project generation, while Vue’s project templates allow Yeoman-like customization.
  • It only offers a single template that assumes you’re building a single-page application, while Vue offers a wide variety of templates for various purposes and build systems.
  • It cannot generate projects from user-built templates, which can be especially useful for enterprise environments with pre-established conventions.

It’s important to note that many of these limitations are intentional design decisions made by the create-react-app team and they do have their advantages. For example, as long as your project’s needs are very simple and you never need to “eject” to customize your build process, you’ll be able to update it as a dependency. You can read more about the differing philosophy here.

Scaling Down

React is renowned for its steep learning curve. Before you can really get started, you need to know about JSX and probably ES2015+, since many examples use React’s class syntax. You also have to learn about build systems, because although you could technically use Babel Standalone to live-compile your code in the browser, it’s absolutely not suitable for production.

While Vue scales up just as well as, if not better than React, it also scales down just as well as jQuery. That’s right - all you have to do is drop a single script tag into a page:

<scriptsrc="https://unpkg.com/vue"></script>

Then you can start writing Vue code and even ship the minified version to production without feeling guilty or having to worry about performance problems.

Since you don’t need to know about JSX, ES2015, or build systems to get started with Vue, it also typically takes developers less than a day reading the guide to learn enough to build non-trivial applications.

Native Rendering

React Native enables you to write native-rendered apps for iOS and Android using the same React component model. This is great in that as a developer, you can apply your knowledge of a framework across multiple platforms. On this front, Vue has an official collaboration with Weex, a cross-platform UI framework developed by Alibaba Group, which uses Vue as its JavaScript framework runtime. This means with Weex, you can use the same Vue component syntax to author components that can not only be rendered in the Browser, but also natively on iOS and Android!

At this moment, Weex is still in active development and is not as mature and battle-tested as React Native, but its development is driven by the production needs of the largest e-commerce business in the world, and the Vue team will also actively collaborate with the Weex team to ensure a smooth experience for Vue developers.

With MobX

MobX has become quite popular in the React community and it actually uses a nearly identical reactivity system to Vue. To a limited extent, the React + MobX workflow can be thought of as a more verbose Vue, so if you’re using that combination and are enjoying it, jumping into Vue is probably the next logical step.

AngularJS (Angular 1)

Some of Vue’s syntax will look very similar to AngularJS (e.g. v-if vs ng-if). This is because there were a lot of things that AngularJS got right and these were an inspiration for Vue very early in its development. There are also many pains that come with AngularJS however, where Vue has attempted to offer a significant improvement.

Complexity

Vue is much simpler than AngularJS, both in terms of API and design. Learning enough to build non-trivial applications typically takes less than a day, which is not true for AngularJS.

Flexibility and Modularity

AngularJS has strong opinions about how your applications should be structured, while Vue is a more flexible, modular solution. While this makes Vue more adaptable to a wide variety of projects, we also recognize that sometimes it’s useful to have some decisions made for you, so that you can just get started coding.

That’s why we offer a webpack template that can set you up within minutes, while also granting you access to advanced features such as hot module reloading, linting, CSS extraction, and much more.

Data binding

AngularJS uses two-way binding between scopes, while Vue enforces a one-way data flow between components. This makes the flow of data easier to reason about in non-trivial applications.

Directives vs Components

Vue has a clearer separation between directives and components. Directives are meant to encapsulate DOM manipulations only, while components are self-contained units that have their own view and data logic. In AngularJS, there’s a lot of confusion between the two.

Performance

Vue has better performance and is much, much easier to optimize because it doesn’t use dirty checking. AngularJS becomes slow when there are a lot of watchers, because every time anything in the scope changes, all these watchers need to be re-evaluated again. Also, the digest cycle may have to run multiple times to “stabilize” if some watcher triggers another update. AngularJS users often have to resort to esoteric techniques to get around the digest cycle, and in some situations, there’s simply no way to optimize a scope with many watchers.

Vue doesn’t suffer from this at all because it uses a transparent dependency-tracking observation system with async queueing - all changes trigger independently unless they have explicit dependency relationships.

Interestingly, there are quite a few similarities in how Angular and Vue are addressing these AngularJS issues.

Angular (Formerly known as Angular 2)

We have a separate section for the new Angular because it really is a completely different framework from AngularJS. For example, it features a first-class component system, many implementation details have been completely rewritten, and the API has also changed quite drastically.

TypeScript

Angular essentially requires using TypeScript, given that almost all its documentation and learning resources are TypeScript-based. TypeScript has its obvious benefits - static type checking can be very useful for large-scale applications, and can be a big productivity boost for developers with backgrounds in Java and C#.

However, not everyone wants to use TypeScript. In many smaller-scale use cases, introducing a type system may result in more overhead than productivity gain. In those cases you’d be better off going with Vue instead, since using Angular without TypeScript can be challenging.

Finally, although not as deeply integrated with TypeScript as Angular is, Vue also offers official typings and official decorator for those who wish to use TypeScript with Vue. We are also actively collaborating with the TypeScript and VSCode teams at Microsoft to improve the TS/IDE experience for Vue + TS users.

Size and Performance

In terms of performance, both frameworks are exceptionally fast and there isn’t enough data from real world use cases to make a verdict. However if you are determined to see some numbers, Vue 2.0 seems to be ahead of Angular according to this 3rd party benchmark.

Recent versions of Angular, with AOT compilation and tree-shaking, have been able to get its size down considerably. However, a full-featured Vue 2 project with Vuex + vue-router included (~30kb gzipped) is still significantly lighter than an out-of-the-box, AOT-compiled application generated by angular-cli (~130kb gzipped).

Flexibility

Vue is much less opinionated than Angular, offering official support for a variety of build systems, with no restrictions on how you structure your application. Many developers enjoy this freedom, while some prefer having only one Right Way to build any application.

Learning Curve

To get started with Vue, all you need is familiarity with HTML and ES5 JavaScript (i.e. plain JavaScript). With these basic skills, you can start building non-trivial applications within less than a day of reading the guide.

Angular’s learning curve is much steeper. The API surface of the framework is simply huge and as a user you will need to familiarize yourself with a lot more concepts before getting productive. Obviously, the complexity of Angular is largely due to its design goal of targeting only large, complex applications - but that does make the framework a lot more difficult for less-experienced developers to pick up.

Ember

Ember is a full-featured framework that is designed to be highly opinionated. It provides a lot of established conventions and once you are familiar enough with them, it can make you very productive. However, it also means the learning curve is high and flexibility suffers. It’s a trade-off when you try to pick between an opinionated framework and a library with a loosely coupled set of tools that work together. The latter gives you more freedom but also requires you to make more architectural decisions.

That said, it would probably make a better comparison between Vue core and Ember’s templating and object model layers:

  • Vue provides unobtrusive reactivity on plain JavaScript objects and fully automatic computed properties. In Ember, you need to wrap everything in Ember Objects and manually declare dependencies for computed properties.

  • Vue’s template syntax harnesses the full power of JavaScript expressions, while Handlebars’ expression and helper syntax is intentionally quite limited in comparison.

  • Performance-wise, Vue outperforms Ember by a fair margin, even after the latest Glimmer engine update in Ember 2.x. Vue automatically batches updates, while in Ember you need to manually manage run loops in performance-critical situations.

Knockout

Knockout was a pioneer in the MVVM and dependency tracking spaces and its reactivity system is very similar to Vue’s. Its browser support is also very impressive considering everything it does, with support back to IE6! Vue on the other hand only supports IE9+.

Over time though, Knockout development has slowed and it’s begun to show its age a little. For example, its component system lacks a full set of lifecycle hooks and although it’s a very common use case, the interface for passing children to a component feels a little clunky compared to Vue’s.

There also seem to be philosophical differences in the API design which if you’re curious, can be demonstrated by how each handles the creation of a simple todo list. It’s definitely somewhat subjective, but many consider Vue’s API to be less complex and better structured.

Polymer

Polymer is yet another Google-sponsored project and in fact was a source of inspiration for Vue as well. Vue’s components can be loosely compared to Polymer’s custom elements and both provide a very similar development style. The biggest difference is that Polymer is built upon the latest Web Components features and requires non-trivial polyfills to work (with degraded performance) in browsers that don’t support those features natively. In contrast, Vue works without any dependencies or polyfills down to IE9.

In Polymer 1.0, the team has also made its data-binding system very limited in order to compensate for the performance. For example, the only expressions supported in Polymer templates are boolean negation and single method calls. Its computed property implementation is also not very flexible.

Polymer custom elements are authored in HTML files, which limits you to plain JavaScript/CSS (and language features supported by today’s browsers). In comparison, Vue’s single file components allows you to easily use ES2015+ and any CSS preprocessors you want.

When deploying to production, Polymer recommends loading everything on-the-fly with HTML Imports, which assumes browsers implementing the spec, and HTTP/2 support on both server and client. This may or may not be feasible depending on your target audience and deployment environment. In cases where this is not desirable, you will have to use a special tool called Vulcanizer to bundle your Polymer elements. On this front, Vue can combine its async component feature with webpack’s code-splitting feature to easily split out parts of the application bundle to be lazy-loaded. This ensures compatibility with older browsers while retaining great app loading performance.

It is also totally feasible to offer deeper integration between Vue with Web Component specs such as Custom Elements and Shadow DOM style encapsulation - however at this moment we are still waiting for the specs to mature and be widely implemented in all mainstream browsers before making any serious commitments.

Riot

Riot 2.0 provides a similar component-based development model (which is called a “tag” in Riot), with a minimal and beautifully designed API. Riot and Vue probably share a lot in design philosophies. However, despite being a bit heavier than Riot, Vue does offer some significant advantages:

  • Transition effect system. Riot has none.
  • A far more powerful router. Riot’s routing API is extremely minimal.
  • Better performance. Riot traverses a DOM tree rather than using a virtual DOM, so suffers from the same performance issues as AngularJS.
  • More mature tooling support. Vue provides official support for webpack and Browserify, while Riot relies on community support for build system integration.

Flutter – cross platform mobile app development

$
0
0

Flutter is a new mobile app SDK to help developers and designers build modern mobile apps for iOS and Android.

Get Started

Note:Flutter is an alpha, open-source project.

Deliver features faster

Refresh times so fast, you can "paint" your app to life on hardware, emulators, and simulators.

Craft beautiful UIs

Delight your users and make your brand stand out with rich motion, smooth scrolling, and beautiful customizable components.

Used by Google

Flutter is used by Google and others in production, works with Firebase and other mobile app SDKs, and is open source.

Flutter's hot reload helps you quickly and easily experiment, build UIs, add features, and fix bug faster. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android.

Delight your users with Flutter's built-in beautiful Material Design and Cupertino (iOS-flavor) widgets, rich motion APIs, smooth natural scrolling, and platform awareness.

Browse the widget catalog.

Easily compose your UI with Flutter's modern reactive framework and rich set of platform, layout, and foundation widgets. Solve your tough UI challenges with powerful and flexible APIs for 2D, animation, gestures, effects, and more.

class CounterState extends State<Counter> {
  int counter = 0;

  void increment() {
    // Tells the Flutter framework that state has changed,
    // so the framework can run build() and update the display.
    setState(() {
      counter++;
    });
  }

  Widget build(BuildContext context) {
    // This method is rerun every time setState is called.
    // The Flutter framework has been optimized to make rerunning
    // build methods fast, so that you can just rebuild anything that
    // needs updating rather than having to individually change
    // instances of widgets.
    return new Row(
      children: <Widget>[
        new RaisedButton(
          onPressed: increment,
          child: new Text('Increment'),
        ),
        new Text('Count: $counter'),
      ],
    );
  }
}

Browse the widget catalog and learn more about thereactive framework.

Make your app come to life with platform APIs, 3rd party SDKs, and native code. Flutter lets you reuse your existing Java, Swift, and ObjC code, and access native features and SDKs on iOS and Android.

Accessing platform features is easy. Here is a snippet from our interop example:

Future<Null> getBatteryLevel() async {
  var batteryLevel = 'unknown';
  try {
    int result = await methodChannel.invokeMethod('getBatteryLevel');
    batteryLevel = 'Battery level: $result%';
  } on PlatformException {
    batteryLevel = 'Failed to get battery level.';
  }
  setState(() {
    _batteryLevel = batteryLevel;
  });
}

Learn how to use packages, or write platform channels, to access native code, APIs, and SDKs.

Flutter has the tools and libraries to help you easily bring your ideas to life on iOS and Android. If you don't have any mobile development experience, Flutter is an easy and fast way to build beautiful mobile apps. If you are an experienced iOS or Android developer, you can use Flutter for your views and leverage much of your existing Java/ObjC/Swift investment.

Build

Beautiful app UIs

  • Rich 2D GPU-accelerated APIs
  • Reactive framework
  • Animation/motion APIs
  • Material Design and iOS widgets

Fluid coding experience

  • Sub-second, stateful hot reload
  • IntelliJ: refactor, code completion, etc
  • Dart language and core libs
  • Package manager

Full-features apps

  • Interop with mobile OS APIs & SDKs
  • Maven/Java
  • Cocoapods/ObjC/Swift

Optimize

Test

  • Unit testing
  • Integration testing
  • On-device testing

Debug

  • IDE debugger
  • Web-based debugger
  • async/await aware
  • Expression evaluator

Profile

  • Timeline
  • CPU and memory
  • In-app perf charts

Deploy

Compile

  • Native ARM code
  • Dead code elimination

Distribution

Learn more about what makes Flutter special in thetechnical overview.

Try Flutter today. Getting started is easy.

Get Started

Note:Flutter is an alpha, open-source project.

Carl Icahn’s Failed Raid on Washington

$
0
0

One day in August, 2016, the financier Carl Icahn made an urgent phone call to the Environmental Protection Agency. Icahn is one of the richest men on Wall Street, and he has thrived, in no small measure, because of a capacity to intimidate. A Texas-based oil refiner in which he had a major stake was losing money because of an obscure environmental rule that Icahn regarded as unduly onerous. Icahn is a voluble critic of any government regulation that constrains his companies. So he wanted to speak with the person in charge of enforcing the policy: a senior official at the E.P.A. named Janet McCabe.

Icahn works from a suite of offices, atop the General Motors Building, in midtown, that are decorated in the oak-and-leather fashion of a tycoon’s lair in a nineteen-eighties film. During that decade, Icahn made his reputation as one of the original corporate raiders, pioneering the art of the hostile takeover and establishing himself as a human juggernaut—a pugnacious deal machine, all avarice and swagger. By the time he called the E.P.A., he was eighty, and long since unburdened of any personal or dynastic need to make money; according to Forbes, he is worth approximately seventeen billion dollars. Plenty of titans who are not as old and not as rich as Icahn have opted to devote their remaining years to spending their money, or to giving it away. Not Icahn. A tall man with a shambling manner, he recently grew a white beard, which softens his round face, giving him the cuddly appearance of an elderly Muppet. But he has not lost his taste for the kill. A few years ago, he sold his mega-yacht, because cruising on it bored him. He has engaged in philanthropy, building charter schools and a stadium on Randall’s Island that bears his name. But the charity circuit is a snooze. What Icahn loves beyond all else is to rise late each morning, and then to spend the rest of the day and much of the night working the phone, making deals. Years ago, a reporter asked Icahn why he kept making money when he already had more than he could ever spend. “It’s a way of keeping score,” he said. He is one of the wealthiest individuals not just in the world but in the history of the world—a man who takes pride in many things, not the least of which is his ability to get just about anybody on the phone.

“She’s on vacation,” McCabe’s assistant said, flatly.

For how long?

Two weeks.

To Icahn, there was something that simply did not compute about going on vacation and leaving one’s work behind. Surely, he insisted, McCabe could interrupt whatever leisure activity she was engaged in to take a pressing phone call from Carl Icahn?

No, McCabe’s assistant informed him. She couldn’t.

The old conundrum about whether it is better to be loved or feared has never posed much of a dilemma for Icahn. In “King Icahn,” a 1993 biography, the author, Mark Stevens, described his subject as a “germophobic, detached, relatively loveless man,” and quoted one contemporary saying, “Carl’s dream in life is to have the only fire truck in town. Then when your house is in flames, he can hold you up for every penny you have.” When the biography was published, Icahn stocked his office with copies to give to visitors. These days, he bristles at the term “corporate raider,” favoring the euphemism “activist investor,” but the reality is that when Icahn targets a company the response from management is generally terror. He has a volatile temper and a vindictive streak. Everyone makes time to take his calls.

Incredulous that Janet McCabe might not do so, Icahn asked, “What if the world’s falling apart?”

The refiner that he was worried about is CVR Energy, which is based in Sugar Land, Texas. In 2012, Icahn acquired a controlling stake in the company, with the intention of making it more profitable and then selling it at a higher price. But under the Renewable Fuel Standard—a law passed, under George W. Bush, to promote the use of ethanol and other biofuels—refiners like CVR are forced either to blend ethanol into their products or to purchase credits, known as Renewable Identification Numbers, from refiners that do. CVR did not make sufficient investments to blend ethanol into all its products, choosing to buy credits instead. When Icahn bought his shares in the refiner, RINs were cheap—about a nickel each—so it was reasonably affordable for the company to comply with the law. But in 2013 the price of RINs, which had been stable, began fluctuating, and by 2016 the company was spending two hundred million dollars a year on credits. When Icahn called McCabe, CVR’s stock had dropped seventy per cent from the previous year. This incensed him.

“Look, I’m too old to be politically correct,” he told CNBC, on September 13th. “This woman, Janet McCabe . . . she’s never run a business.” Icahn pointed out that, “at the risk of being immodest,” he had made a great deal of money in his career. “The government shouldn’t run things, because they aren’t trained to run things,” he continued. This is a core element of Icahn’s philosophy. Jimmy Williams, a former in-house lobbyist for Icahn, told me, “Carl is a man who thinks that business should be unfettered and that government should not be involved in the free-market economy. With every fibre in his body, that is what he truly believes.”

When Icahn couldn’t reach McCabe, he wrote a blistering open letter to the E.P.A., in which he demanded that the rules be changed so that other parties, and not refiners, would be responsible for blending ethanol or purchasing credits. “At the risk of being immodest,” he wrote, “most respected experts involved in markets and the way they function would agree there are few in the country that understand investing in markets better than I do.”

One person who was listening to Icahn was the Republican Presidential nominee, Donald Trump. Icahn and Trump have known each other for decades, and Icahn supported his friend’s aspirations for the White House at a time when they still looked quixotic. Trump has long boasted about his association with more successful businesspeople, dropping references to potentates the way kids decorate their school binders with the names of their favorite pop stars. But, in reality, many New York financiers considered him a buffoon. In 2015, Lloyd Blankfein, the C.E.O. of Goldman Sachs, greeted the suggestion that Trump might run for President by remarking that the notion of the former star of “The Apprentice” having his “finger on the button blows my mind.” In this context, an endorsement from Icahn was a precious credential. On the campaign trail, Trump bragged about his “very dear friend Carl Icahn,” the name functioning as a byword for boundless prosperity.

If Icahn was willing to be enlisted in this fashion, he was also prepared to drop Trump’s name when it served his interest. Appearing on Bloomberg TV on August 16, 2016, he vowed that Trump would put an end to “these crazy regulations” on his first day in office. In fact, Icahn continued, he had spoken with Trump about the E.P.A. rule obliging his refiner to purchase renewable-fuel credits. If elected, Trump “will stop that,” Icahn promised. “That’s a hundred per cent.”

Several weeks after Trump’s victory, Icahn tweeted, “I’ve agreed to serve as a special advisor to the president on issues relating to regulatory reform.” In a press release, Trump said, “Carl was with me from the beginning and with his being one of the world’s great businessmen, that was something I truly appreciated. He is not only a brilliant negotiator, but also someone who is innately able to predict the future, especially having to do with finances and economies.” He added that Icahn would help him address regulations that were “strangling” American business.

Icahn’s role was novel. He would be an adviser with a formal title, but he would not receive a salary, and he would not be required to divest himself of any of his holdings, or to make any disclosures about potential conflicts of interest. “Carl Icahn will be advising the President in his individual capacity,” Trump’s transition team asserted.

In the months after the election, the stock price of CVR, Icahn’s refiner, nearly doubled—a surge that is difficult to explain without acknowledging the appointment of the company’s lead shareholder to a White House position. The rally meant a personal benefit for Icahn, at least on paper, of half a billion dollars. There was an expectation in the market—an expectation created, in part, by Icahn’s own remarks—that, with Trump in the White House and Icahn playing consigliere, the rules were about to change, and not just at the E.P.A. Icahn’s empire ranges across many economic sectors, from energy to pharmaceuticals to auto supplies to mining, and all of them are governed by the types of regulations about which he would now potentially be advising Trump.

Janet McCabe, who left the E.P.A. in January, and now works at the Environmental Law and Policy Center, told me, “I’m not naïve. People in business try to influence the government. But the job of the government is to serve the American people, not the specific business interests of the President’s friends. To think that you have somebody with that kind of agenda bending the President’s ear is troubling.”

Conflicts of interest have been a defining trait of the Trump Administration. The President has not only refused to release his tax returns; he has declined to divest from his companies, instead putting them in a trust managed by his children. Questions have emerged about the ongoing business ties of his daughter and son-in-law, Ivanka Trump and Jared Kushner, who, since Trump took office, have reaped nearly two hundred million dollars from the Trump hotel in Washington, D.C., and from other investments. Although Trump promised to “drain the swamp,” he has assembled a Cabinet of ultra-rich Americans, including two billionaires: Betsy DeVos, the Secretary of Education, and Wilbur Ross, the Secretary of Commerce.

But Icahn is worth more than the Trump family and all the members of the Cabinet combined—and, with no constraint on his license to counsel the President on regulations that might help his businesses, he was poised to become much richer. Robert Weissman, who runs the watchdog group Public Citizen, told me, “This kind of self-enrichment and influence over decision-making by an individual mogul who is simultaneously inside and outside the Administration is unprecedented. In terms of corruption, there’s nothing like it. Maybe ever.” In conversations with me, financiers who have worked with Icahn described his appointment as a kind of corporate raid on Washington. One said, “It’s the cheapest takeover Carl’s ever done.”

If you squint, Trump and Icahn look alike. Both grew up in Queens and have an outer-borough chip on their shoulders. Both first came to tabloid prominence against the gaudy backdrop of the nineteen-eighties. Both are brash, plainspoken street fighters, examples of an American archetype: the populist rich guy. But Trump comes from the wealthy enclave of Jamaica Estates, whereas Icahn grew up in a lower-middle-class family in Bayswater. His mother, Bella, was a schoolteacher; his father, Michael, was a failed opera singer who, even though he was an atheist, became the cantor in a local synagogue, because he loved the music. Carl was an only child, born toward the end of the Depression, in 1936. Throughout his youth, his father railed against the robber barons, condemning the concentration of extreme wealth. Icahn told Mark Stevens, “The social juxtaposition of a tiny group of people living in great splendor and many more living in abject poverty was anathema to him.”

As a boy, Icahn was bright and ambitious. When he was offered a scholarship to Woodmere Academy, an expensive private school on the South Shore of Long Island, his parents toured the campus and met with teachers. But they worried about the values that their son would be exposed to there, so they sent him to public high school instead. The sting of that reversal lingered. Half a century later, in the heat of a high-stakes negotiation, Icahn would occasionally digress to inform his adversaries that although he attended public school instead of Woodmere Academy, he still went on to become a billionaire. Icahn is an old man now, with an old man’s penchant for repeating stories; he frequently returns to the theme that his parents underestimated him. “My father was never able to accomplish anything,” he once said, adding, “I never respected him.”

In 1960, after studying philosophy at Princeton (where he wrote a thesis titled “The Problem of Formulating an Adequate Explication of the Empiricist Criterion of Meaning”) and a stint in medical school (he was a hypochondriac, which did not help his bedside manner), Icahn shifted to Wall Street. For a time, he worked as an arbitrageur, but he eventually established himself as a takeover artist, orchestrating high-profile raids on companies such as Texaco, RJR Nabisco, and Phillips Petroleum. His method was straightforward: he identified businesses whose assets were worth more than their stock; he acquired enough of that stock to force changes in the company which drove up the stock price; then he sold the stock. Implicit in Icahn’s approach was the conviction that he was smart enough to know more about how to make money in a given business than the executives who actually ran the business. He regarded the management at the companies he targeted with contempt. Unlike Trump, Icahn was not one to insinuate himself into the sort of club that would not accept him as a member; he preferred to storm the clubhouse with a pitchfork. One of Icahn’s oft-repeated bromides is that the average C.E.O. is like a fraternity president: a nice guy to have a beer with, but maybe not too bright.

Corporations, seeing Icahn coming, often tried to fight him off. His reputation grew so fearsome that some companies paid him to go away by buying his shares back at a premium—a practice known as “paying greenmail.” Marty Lipton, a corporate lawyer whose firm has often been hired by companies that were looking to thwart an Icahn takeover, wrote a memo four years ago in which he described raiders like Icahn as engaging in “a form of extortion.” In Lipton’s view, such investors “create short-term increases in the market price of their stock at the expense of long-term value.” In the nineties, when Icahn was fighting for control of Marvel Comics, the company’s C.E.O., a veteran of the Israeli Army, likened dealing with him to negotiating with terrorists.

Icahn prefers to describe himself in more righteous terms, as a warrior for stockholders who have been disenfranchised by inattentive corporate boards and myopic executives. He sees himself as a champion of “shareholder rights,” an advocate for the little guy. By going after lacklustre management, he argues, he has generated “billions and billions” of dollars for shareholders, while managing to make out just fine himself. “I’m like a gunfighter you hire to save the town,” he once remarked. “That gunfighter is there to do good. He knows he’s on the right side, and he’s proud of it, but he’ll only do what he does if he knows he’ll get paid for it.”

It is true that Icahn has increased the value of many companies that he has invested in, but there are also numerous instances in which, in the aftermath of a raid, he emerges as a winner and everyone else seems to lose. In 1985, he seized control of the airline T.W.A. According to the Times, Icahn celebrated by donning a T.W.A. flight jacket and strutting around his office, exclaiming, “We’ve got ourselves an airline!” He took the company private, pocketing nearly half a billion dollars, then sold off its assets. He also waged a bitter fight against the flight attendants’ union. Because most attendants were women, Icahn insisted, they were not “breadwinners,” and should not expect compensation commensurate with that of male employees. At one point in the negotiations, he reportedly suggested that if the flight attendants were having such trouble making ends meet they “should have married a rich husband.” (Icahn denied having made sexist comments.) C. E. Meyer, the company’s chief executive, described Icahn as “one of the greediest men on earth.” T.W.A. eventually went out of business.

Like Trump, Icahn adheres to a simian dominance code in which every deal—and possibly every human interaction—is a zero-sum contest. Only the alpha prevails. Yet, among Trump’s panoply of wealthy boosters, Icahn is distinctive, if not unique, because of the President’s willingness to play the beta role and genuflect before him. When they met, during the eighties, Trump was an eager supplicant, perhaps in part because Icahn really is what Trump has always pretended to be: a genuine master dealmaker, and a legitimately self-made man. Icahn started out with much less than Trump did, and ended up with vastly more. In 1988, Trump paid eleven million dollars to host a heavyweight title fight between Mike Tyson and Michael Spinks, at Boardwalk Hall, in Atlantic City. Before the fight, Trump took Icahn backstage to meet Tyson. The bout started late, and the announcer was obliged to recite an attenuated roll call of famous guests, among them Trump’s “good friend” Carl Icahn.

Two years later, Trump unveiled the Taj Mahal, a spangled confection on the boardwalk. It had been financed entirely with junk bonds, and by the time construction was complete it was already imperilled by debt. When Trump needed to make an interest payment on the loans, his father, Fred, sent a lawyer to another Trump casino, the Trump Castle, to buy $3.3 million in chips. Not long afterward, Trump was bailed out once again—this time by Icahn. One of Icahn’s specialties is investing in distressed debt, and he purchased the Taj’s outstanding bonds at a steep discount. Rather than oust Trump, Icahn negotiated with the other bondholders to allow Trump to retain equity in the casino, as well as his place on the board. Years later, when Trump named Icahn a special adviser, the Democratic National Committee released a statement that alluded to the Atlantic City episode, suggesting that the White House appointment was “a quid pro quo twenty-five years in the making.” Icahn, however, had already been handsomely remunerated for his investment: he sold the bonds, in 1993, for more than double what he had paid for them.

Icahn and Trump maintained a loose friendship during the ensuing decades, one that was hardly as intimate as Trump likes to make it sound. The very notion of a relationship that transcends mercenary self-interest may be alien to Icahn. Once, in a court proceeding, he said, “If the price is right, we are going to sell. I think that’s true of everything you have, except maybe your kids and possibly your wife.”

“Possibly?” the judge asked.

“Possibly,” Icahn said, adding, “Don’t tell my wife.” (Icahn’s first marriage ended in an acrimonious divorce. He is now married to his former assistant, Gail Golden, who manages his charitable interests.) When Oliver Stone was doing research for his 1987 film, “Wall Street,” he paid a visit to Icahn, and borrowed one of his observations for the character Gordon Gekko: “If you need a friend, get a dog.” Trump’s almost canine subservience to the older financier is such that, for years, Icahn, who is a tennis fan, has enjoyed droit-du-seigneur access to Trump’s personal box at the U.S. Open.

In 2010, Trump again found himself in trouble in Atlantic City. But this time Icahn was his antagonist. Along with a Texas banker, Icahn was trying to gain control of three Trump casinos. When a lawyer asked, during a deposition, whether Icahn intended to rebrand the casinos, he said that a consultant had deemed the Trump name a “disadvantage.” In an interview, Trump shot back, “Everybody wants the brand, including Carl. It’s the hottest brand in the country.” But in Icahn’s opinion the only real downside to shedding the Trump name was the expense that would be associated with changing all the signage. Trump expressed dismay at Icahn’s slight, telling the Times, in 2011, that he was a “loyalist” who prioritized friendship, whereas “with Carl the friendship stops where the deal begins.” (Icahn responded that he did not consider the two of them to be close, adding, pointedly, that he had not been invited to Ivanka Trump’s wedding.) In court papers, Icahn’s lawyers suggested that Trump’s name was no longer “synonymous with business acumen, high quality, and style.” Icahn told the Wall Street Journal, “I like Donald personally, but frankly I’m a little curious about the big deal about the name.” If the Trump brand carried such cachet, he asked, why did Trump properties keep going bankrupt?

Even after Icahn started supporting Trump’s Presidential run, he often seasoned his praise with a dash of disdain. “I’m not here to say Donald’s a great businessman,” he told the Washington Post. “But I will say he’s a consensus builder.” When Trump first announced his candidacy, in June, 2015, he appeared on “Morning Joe,” and said, “I would like to bring my friend Carl Icahn” into the government, suggesting that Icahn might make a good Treasury Secretary. Icahn replied, in a post on his personal Web site, “I am flattered but do not get up early enough in the morning to accept this opportunity.”

When Icahn initially made a takeover bid for CVR Energy, in February, 2012, the company hired Wachtell, Lipton, Rosen & Katz, the formidable New York law firm, to deflect him. But Icahn prevailed, acquiring an eighty-two-per-cent stake in the refiner. CVR had never built enough of its own ethanol-blending facilities to comply with the Renewable Fuel Standard, buying RIN credits instead. This was a bad bet. “Up until 2013, the conventional wisdom was that there would be no volatility in RIN prices,” Tristan Brown, a professor at the State University of New York’s College of Environmental Science and Forestry, who has studied the RIN market, told me. But that year prices started to climb. The RIN market is much less transparent than the stock market, and some players appeared to be hoarding credits, which drove up their price. Icahn worried that CVR’s competitors, knowing that the company was in trouble, were deliberately manipulating the price, subjecting his refiner to a so-called “short squeeze.” (Icahn is no stranger to this tactic, having attempted to put a short squeeze on the investor Bill Ackman by driving up the price of Herbalife, a stock that Ackman was betting against.)

During the 2016 Presidential campaign, Icahn—who owns twenty or so companies and has investments all over the world—raised the issue of renewable-fuel credits at every opportunity, speaking of the “insane” perfidy of the E.P.A. and the plight of his refiner. “This is something that Carl does,” a former Icahn employee told me. “He becomes fixated on something, even something that represents a small part of his portfolio. He gets obsessed.”

Trump’s bid for the Presidency may have seemed like a long shot, and Icahn professed to have misgivings about the “negativity” of his chosen candidate. But he believed that Trump would slash regulation and, specifically, would make the change that Icahn wanted on biofuel credits—shifting the so-called “point of obligation” so that other parties, closer in the supply chain to the gas pump, would be compelled to purchase RIN credits, instead of merchant refiners like CVR.

Even if Trump was elected, there were reasons to believe that Icahn’s objective might be difficult to achieve. The ethanol industry opposed shifting the point of obligation, and was represented by experienced lobbyists. In August, 2016, Bob Dinneen, who runs a leading ethanol trade group, the Renewable Fuels Association, told the Houston Chronicle that the Renewable Fuel Standard functions basically as it should, providing incentives to refiners that blend ethanol and penalizing those which do not. Changing the regulation, Dinneen said, would simply reward “folks who haven’t done what the law said they should do.”

The Renewable Fuel Standard had passed with support from an improbably diverse coalition: environmentalists, who wanted to curb greenhouse-gas emissions; national-security hawks, who wanted to reduce reliance on foreign oil; and farm-state lawmakers, who wanted to boost the corn industry. (Most ethanol is made from corn.) Senator Chuck Grassley, the Iowa Republican, opposed shifting the point of obligation. So did the American Petroleum Institute, one of the most powerful lobbying groups in Washington, because some integrated oil giants, such as BP and Shell, were now producing so much blended fuel that they were generating surplus credits, which they sold to smaller refiners like CVR. Because the petroleum industry and the ethanol industry tend to see in one another an existential threat, there are few policy issues on which they agree. The point of obligation for RIN credits is one of them.

This daunting array of forces only intensified Icahn’s ire, reinforcing his sense of himself as an aggrieved outsider. In his open letter to the E.P.A., he fumed that the RIN market was “rigged,” giving Big Oil a windfall at the expense of smaller refiners such as CVR. Without a policy change, he warned, the regulation would soon bankrupt small and mid-sized refiners, creating a Big Oil “oligopoly” that would cause gas prices to skyrocket.

Whatever sympathy Trump may have felt for Icahn’s predicament, he had an important interest of his own: he needed states like Iowa on his side in order to win the Presidency. At a June, 2016, rally in Cedar Rapids, he pledged his support for the Renewable Fuel Standard, and promised to save the ethanol industry, which was “under siege.”

That September, however, something curious happened. The Trump campaign—which had not distinguished itself for the wonky exactitude of its white papers—issued a fact sheet on economic policy that, amid generic promises of “unbridled economic growth,” contained a surprisingly detailed bullet point about the E.P.A.’s RIN program. “These requirements have turned out to be impossible to meet and are bankrupting many of the small and midsize refineries in this country,” the passage read. “These regulations will give Big Oil an oligopoly.” This did not sound especially like Donald Trump. It did sound a lot like Carl Icahn. When the press asked whether the fact sheet signalled Trump’s intention to adjust the rule—at the risk of inflaming Corn Belt voters—a spokesman responded that an “incorrect” version of the fact sheet had been posted. The bullet point disappeared.

As an investor, Icahn likes to zig where others zag. It is not clear how much confidence he had in Trump’s prospects in 2016, or whether, on Election Night, he was as surprised as the rest of the country. But Icahn attended the impromptu victory party at the Hilton in midtown, where nobody seemed to have arranged for balloons, though a cake had been fashioned into a bust of a scowling Trump. Supporters wearing “Make America Great Again” hats celebrated, in a daze. Icahn left the party after midnight. The global markets were tanking on the news of Trump’s win, so he went home and made a billion dollars’ worth of investments.

Within days of the victory, according to people familiar with the situation, Trump had enlisted Icahn to help him staff major government agencies. Icahn employees began reviewing the references and résumés of potential Cabinet appointees. It has frequently been remarked that Trump has stacked his Administration with plutocrats. Less often acknowledged is the degree to which many of these appointments bear Icahn’s fingerprints. On November 15th, Icahn tweeted, “Spoke to @realDonaldTrump. Steve Mnuchin and Wilbur Ross are being considered for Treasury and Commerce. Both would be great choices.” He added, “Both are good friends of mine but, more importantly, they are two of the smartest people I know.” Two days later, Icahn told the Fox Business Channel that he had just had dinner with Mnuchin, and had “urged Donald to consider him.” He continued, “I’m not going to be the one to announce it, but I do believe he will get the job.” On November 30th, Mnuchin did.

When potential Cabinet secretaries visited Trump Tower to meet with the President-elect, they were sometimes sent for a second interview—with Icahn. On the day that Jay Clayton was announced as Trump’s choice to head the Securities and Exchange Commission, he stopped by Icahn’s office for a meeting. Appearing on CNBC in December, Icahn defended his role as a talent spotter for the Trump Administration. “Over the years, you develop instincts for picking the right C.E.O.,” he said. “Is there anything wrong with me saying, ‘This guy is the right guy for this job at this time’? It doesn’t mean Donald is going to take my advice, necessarily.”

When Scott Pruitt visited Trump Tower to discuss the top job at the E.P.A., the President-elect concluded the interview by instructing him to walk two blocks uptown to meet with Icahn. Trump, according to a Bloomberg News account, told him, “He has some questions for you.” Pruitt was precisely the sort of candidate that Icahn might favor. A fierce opponent of environmental regulation, Pruitt had spent years, as the attorney general of Oklahoma, suing the agency that he was now in talks to oversee. Even so, Pruitt knew that Icahn would likely want to discuss one particular issue—RIN credits—and as Pruitt and an aide headed up Fifth Avenue they searched the Internet for information on the credits system and its impact on Icahn’s refiner.

Pruitt was nominated on December 8th. The next day, Icahn said in an interview with Bloomberg News, “I’ve spoken to Scott Pruitt four or five times. I told Donald that he is somebody who will do away with many of the problems at the E.P.A.” He continued, “I do think he feels pretty strongly about the absurdity of these obligations, and I feel that this should be done immediately.” One reason that the RIN market is so unstable is that the price of the credits is extremely sensitive to developments in the news that might affect their future value. On the day that Pruitt was appointed, the price of RINs plunged—a welcome outcome for Icahn, because it would cost CVR less to purchase the credits that it needed to fulfill its regulatory obligation.

On December 22nd, the day after Icahn was formally declared to be an adviser to the President, RIN prices dropped again. It was hardly lost on Wall Street that the famously single-minded investor might leverage his new role to advocate for his own investments. Barron’s asked, “Has Carl Icahn been appointed Secretary of Talking His Own Book?” The Web site Dealbreaker, noting Icahn’s lack of conflict-of-interest constraints, proposed an alternative job title: “Secretary of Do Whatever the Fuck You Want.”

All Presidents seek advice from the private sector. Sometimes they have done so informally, as when Bill Clinton made late-night phone calls to a “kitchen cabinet” of business leaders. On other occasions, an Administration has brought executives into the bureaucracy on a part-time basis, making them so-called Special Government Employees, which requires certain divestments and disclosures. Between these informal and formal models lies a third option: Presidents often establish outside advisory boards of corporate leaders; in such situations, the business leaders are not expected to give up any of their holdings, and may advocate on behalf of their industries without having to register as lobbyists. Icahn has likened his sinecure to this type of arrangement, saying, “I’m not making any policy. I am only giving my opinion.”

For any executive, having access to the Oval Office can be good for business. In a new research paper, “All the President’s Friends,” the University of Illinois finance professors Jeffrey R. Brown and Jiekun Huang studied the share prices at companies whose executives visited the White House, and found that the real, or implied, influence of such encounters boosted the value of the companies in the months after such visits. Jimmy Williams, Icahn’s former lobbyist, told me, “Can Carl Icahn take his influence with the President and make deals that benefit him? Any C.E.O. who has a relationship with the President can do that, regardless of party.”

Brown and Huang were able to write their paper only because the Obama White House made public its visitor logs—something that Trump has refused to do. Without such information, it is impossible to know which executives are meeting with the Trump Administration at the White House. And the kind of outside panels that Icahn considers to be similar to his role are subject to the Federal Advisory Committee Act, which mandates that their meetings must be held in public. Austan Goolsbee, who served as the chairman of Obama’s Council of Economic Advisers, told me, “The Obama Administration established clear disclosure and full transparency about what advice people were giving and when they were giving it. You can be an outside adviser or a government employee. The rules are clear for each. With Icahn, they seem to be trying to invent a kind of Guantánamo Bay situation, in which you’re simultaneously both and neither.”

Norm Eisen, who served as Obama’s Special Counsel for Ethics and Government Reform, argues that Icahn is “not just an outside kibbitzer” but a formal adviser who should be subject to constraints. “He gets a title,” Eisen said. “He gets a broad policy portfolio. He’s involved in personnel decisions, in policy discussions. To me, all of that adds up to him being a Special Government Employee.” The blitheness with which Icahn and the Trump White House sidestepped the federal requirements is evidence, Eisen contends, that “this is a lawless Administration.” Immediately after Icahn’s appointment was announced, shares in Icahn Enterprises surged. Forbes estimated that his stake in the company rose in value from $6.8 billion to $7.3 billion—an increase of five hundred and ten million dollars, in a day.

In early February, Icahn contacted Bob Dinneen, the head of the Renewable Fuels Association. Icahn proposed that they meet to discuss Dinneen’s opposition to shifting the point of obligation for RINs. Dinneen took the train from Washington to New York and went to the offices of Icahn Enterprises. Icahn, as a younger man, hopped on planes to visit companies he was investing in, but now he mostly has people come to him. His offices are full of reminders, as if arranged by a set decorator, that Icahn is a conqueror: the walls are lined with oil paintings depicting famous battles, as well as framed stock certificates and other trophies from companies that he has subdued. A pair of antique duelling pistols adorn his desk.

Icahn is known for his stamina and deviousness as a negotiator. Connie Bruck, in her 1988 book, “The Predators’ Ball,” describes his passion for all-night negotiation sessions, and notes that some of his interlocutors suspect that he deliberately prolongs these encounters, not just as a tactic but “because he is having such a good time.” Icahn is a serious chess player; as a young man, he considered becoming a chess master but decided not to, because there was no money in it. He paid his way through Princeton, in part, with poker earnings, and he has played the game with Leon Black, the founder of Apollo Global Management; Sam Waksal, the ImClone founder, who went to prison for insider trading; and the onetime junk-bond king Michael Milken, who has also done time for white-collar crime. “Waksal, Milken, Ivan Boesky,” the former Icahn employee said. “Carl has never got into trouble. But he’s played with everyone who did.” In his business dealings, Icahn is a master of the bluff. “Carl views the legal norms as a starting point for a negotiation, rather than a moral compass,” a financier who has faced off against him told me. “He’s not afraid to cross the line if he thinks he’s on firm ground. ‘Perhaps the law says that this is wrong. But I know better, and I am willing to sue or be sued.’ It’s a rare breed of person who will do that. Carl lives in that breach.”

On February 27th, the news leaked that Dinneen and Icahn had struck a deal: the Renewable Fuels Association would end its long-held opposition to changing the point of obligation, and side with Icahn in his push to shift the obligation away from refiners like CVR. This was a surprising development. There had been no ambiguity about Dinneen’s position, and earlier that month the Renewable Fuels Association had made a submission to the E.P.A. objecting to such a change. What was behind this abrupt reversal?

Some speculated that Dinneen had been influenced by Valero, a refiner whose biofuels subsidiary had recently joined his association, and which had sent a representative to join Dinneen at his meeting with Icahn. Like CVR, Valero had not sufficiently invested in blending infrastructure and was spending huge sums on RIN credits. But, after reporters hounded Dinneen, he offered a different explanation: in a statement, he explained that he had “received a call from an official with the Trump Administration, informing us that a pending executive order would change the point of obligation.” In other words, the policy was going to change by Presidential fiat, whether the industry liked it or not. “I was told in no uncertain terms that the point of obligation was going to be moved,” Dinneen said. The executive order would be “non-negotiable.”

Confronted with this fait accompli, Dinneen apparently felt that his only option was to secure whatever concessions he could for his industry. One long-standing priority for Dinneen and other biofuel advocates has been to change laws so that gas blends containing fifteen per cent ethanol can be sold year-round. (Such blends cannot legally be sold during the summer, the peak driving season; Dinneen contends that the prohibition, meant to alleviate smog, is outdated.) So Dinneen pressed for that adjustment, in exchange for his acquiescence on the point of obligation.

Many ethanol-industry watchers I spoke with were flabbergasted by this turn of events. When I called Dinneen, he told me that the only Trump Administration official he had been speaking with was Icahn. “I’m old-school,” Dinneen said. “If I get a call from a special adviser to the President, I’m going to take it.” Dinneen explained that although Icahn never said explicitly that he was speaking on behalf of the President, he did say that he had discussed the point of obligation with Trump, and that he was confident that a change in policy was coming soon. Normally, Dinneen pointed out, any negotiation between the government and private industry would take place with “an army of people” assembled on opposite sides of a conference table: a phalanx of lawyers, technical specialists, and other advisers. This was different. Then again, he noted, with a dry chuckle, “This whole town is different now.” Now he was cutting deals, mano a mano, with Icahn: a friend of Trump, the owner of a refiner, and a special adviser to the President. If this was the new reality, Dinneen figured, he needed to find a way to work with it. To do otherwise would be malpractice, he said, adding, “Icahn had a title I couldn’t ignore.”

Dinneen insisted to me that he and Icahn never struck a conclusive deal; they simply came to an agreement that he would propose to his board that the association end its opposition to shifting the point of obligation. But, after a phone call with Dinneen on February 23rd, Icahn spoke with the President and relayed the substance of this agreement. Icahn, who had been out walking his dog, talked to Trump from the lobby of his apartment building. Bloomberg News later reported that, according to Icahn, “Trump seemed receptive.” Trump instructed Icahn to telephone Gary Cohn, his senior adviser on economic issues. Cohn handed the matter to an aide on the National Economic Council, a former oil lobbyist named Mike Catanzaro, who spent an hour going through the details with Icahn. When, four days later, Bloomberg News broke the story that an executive order was imminent, corn and gasoline prices went berserk.

It was not hard to believe that the Trump White House had shifted policy at the behest of an industry crony. The Administration had devoted itself, in its early days, to dismantling the regulatory state, in close consultation with business interests. The White House established deregulation teams at various federal agencies. Administration officials have refused to disclose the names of team members, but reporting by ProPublica and the Times suggests that many of them have come from the regulated industries themselves.

Efforts at health-care reform, an infrastructure bill, and tax cuts have all stalled, stymied by the infighting, indiscipline, and incompetence of the Trump Administration. But deregulation has been a quiet success, and nowhere more so than at the E.P.A. Pruitt has not made it a habit to meet with senior career officers at the agency; he does, however, meet regularly, behind closed doors, with industry executives. Some observers fear that the E.P.A. is now run like a Senate office, where representatives meet with constituents and do constituent services—except that the constituent is industry. For example, under the Obama Administration the E.P.A. moved to ban chlorpyrifos, a pesticide manufactured by Dow Chemical, after agency scientists found that it caused neurodevelopmental damage in children. Dow lobbied against the ban, and Pruitt recently tabled it, citing “uncertainty” about the scientific evidence that it is hazardous to kids.

Icahn could scarcely have asked for a more business-friendly figure at the E.P.A. But, when news leaked about a policy shift on the point of obligation, the ethanol industry protested. Jeff Broin, the C.E.O. of Poet, a large ethanol producer, complained, “This was a back-room ‘deal’ made by people who want out of their obligations.” One group, Fuels America, declared that Dinneen’s Renewable Fuels Association was “no longer aligned with America’s biofuel industry,” and severed ties with it. Emily Skor, who runs Growth Energy, another trade group, objected that Dinneen had been negotiating without consulting other stakeholders in the ethanol industry. “This is no deal for anyone but Carl Icahn,” she said. Senator Joni Ernst, of Iowa, also derided the deal, pointing out that it would benefit only a “select few.”

On February 28th, Kelly Love, a spokeswoman for the White House, denied that there was any plan to shift the point of obligation, telling Reuters, “There is no ethanol executive order in the works.” In an interview with Bloomberg, Stefan Passantino, the White House lawyer in charge of ethics and compliance, questioned any characterization of Icahn as a government official, saying, “He is simply a private citizen whose opinion the President respects and whom the President speaks with from time to time.” In subsequent conversations with industry representatives, Pruitt distanced himself from Icahn’s efforts. Two people who spoke with Pruitt in the aftermath of the news reports about the executive order told me that he had assured them, “I was not consulted on this.”

Brooke Coleman, the executive director of the Advanced Biofuels Business Council, pointed out to me that these events unfolded just a month into the Trump Administration. Many staffers had not arrived yet, and there was no real policymaking apparatus. The point-of-obligation rule was a relatively obscure agenda item, a top priority for almost nobody but Icahn. “This was a middle-of-the-night quick strike,” Coleman said. “In the middle of the night, Icahn said, ‘Sign this.’ But it didn’t work. He got caught.” Those were heady times for executive orders, with the President seeming to sign a new one each day. But several people told me that the point-of-obligation change could not have been made simply by executive prerogative. “It’s a regulation,” Janet McCabe said. “So the regulation would have to be changed, and there is a whole process for that.” In 1946, the Administrative Procedure Act established a protocol for rule-making that involves interagency coördination and input from interested parties.

“Icahn was always talking about an ‘executive order’—that was his vernacular,” Dinneen recalled. An official in the Trump Administration told me that reports about an impending executive order were “not true,” because “there was no organic executive-order process that would be normal for something like that.” There was a draft executive order, the official acknowledged, but it did not originate in the White House: “It was something Icahn sent to us.”

“Icahn is very sophisticated,” Brooke Coleman said. “But maybe not about Washington.” Senator Chuck Grassley not only represents corn growers; he also chairs the Judiciary Committee, which helps confirm Trump’s appointments of judges. This is the reason that traditional policy negotiations are so overcrowded. Washington is a city of vying constituencies, many of which happen to be very powerful. Coleman believes that “someone probably walked into Trump’s office and said, ‘Here’s why you need Chuck Grassley more than you need Carl Icahn.’ ”

Did Icahn think that he could bluff his way to a change in federal regulation? One thing is clear: whatever the White House might say, Dinneen believed that Icahn was negotiating on behalf of the Trump Administration. Icahn has boasted to associates in New York about his access to the President. On March 1st, in a filing to the Securities and Exchange Commission, Icahn Enterprises made a point of mentioning that “Mr. Icahn is currently serving as a special advisor to President Donald J. Trump on issues relating to regulatory reform.” Such a disclosure could indicate merely that Icahn is being transparent with his shareholders. But it is also, unequivocally, a signal: I have the ear of the President.

Richard Painter, who served as the chief ethics lawyer for George W. Bush, told me that it was irrelevant whether or not Icahn received a salary or had an office in the West Wing. “When you give someone a title, you make him your agent,” Painter said. He pointed out that Icahn’s title stood out amid the arid nomenclature of official Washington, where “special advisers” proliferate but only a chosen few can append the words “to the President.” “With a title like that, he has the authority to represent the President’s views. If he goes out and says ‘The President thinks this,’ that means something.”

If Icahn’s objective was to shift the point of obligation, his bluff failed. This would appear to be an instance in which the same lattice of vested interests that can cause dysfunction in Washington actually led to a proper result; it prevented a hasty change in policy that was designed primarily to assist one person. “The process worked, at the end of the day,” the Trump Administration official told me. “We made the right decision.”

Mark Stevens, Icahn’s biographer, recalled, “Carl once told me, ‘I don’t believe in the word fair. It’s a human concept that became conventional wisdom.’ ” To Icahn, it may have seemed that the roadblocks he faced were not a sign of a sound bureaucracy but, rather, evidence of a power play by more formidable special interests, in the form of the ethanol lobby and Big Oil.

But Icahn’s first foray as a Presidential adviser was by no means a complete failure. Icahn had spent the second half of 2016 complaining bitterly about CVR’s obligation to buy RINs. But, when CVR released an earnings report in April, 2017, it emerged that the company had actually been selling them. Reuters subsequently reported that, when the price of RINs was high, CVR sold millions of the credits. The company would eventually need to turn over its quota of credits to the E.P.A., yet in the months before its annual deadline it was quietly selling them off. This was extremely unusual. “To my knowledge, this is the first time you had someone taking a short position in the RIN market,” Tristan Brown, the SUNY professor, told me.

To short a stock or a commodity is to make a bet that the price will drop. And in this instance it was extremely risky: if the deadline arrives and a refiner does not have the required quota of credits, the E.P.A. can enforce fines of $37,500 a day for each RIN owed until the refiner complies—a figure that would climb into the billions of dollars immediately. “You’re essentially gambling,” Brown said. “And, if you’re wrong, the penalty is pretty much unlimited.” This was, Brown said, not the sort of speculative play one might anticipate from a mid-sized refiner like CVR. Rather, it was the kind of gamble that a bold Wall Street investor might make.

In the near term, at least, Icahn’s bet paid off. As soon as the news broke that an executive order on the point of obligation was imminent—and that Icahn and Dinneen had reached a deal—prices of RINs plummeted. Jim Stock, a professor at Harvard who studies the energy sector, pointed out that “if an individual has influence over expectations in this market, he can end up moving prices.” When RIN prices dropped, it afforded CVR an opportunity to cover its short, buying back the RINs it needed to meet its regulatory obligation at a steep discount.

Because CVR will not comment on the trades, it is impossible to know how many credits were bought during this period. Normally, the refiner posted a loss for the sum that it spent on RINs each quarter, and those losses had lately amounted to as much as sixty million dollars. But, on a shareholder call in April, a CVR representative said that in the first quarter of the Trump Administration the company had experienced a “negative” loss of six million dollars—that is, a profit. Tristan Brown told me that the notion of a profit resulting from compliance with the Renewable Fuel Standard was unheard of for a merchant refiner like CVR. When I asked a longtime RIN trader about this gambit, he said, “Either Icahn was extremely lucky or he knew something that other people didn’t.”

“So, what are you doing?” Icahn asked me when I called him for this story. For all his brusque qualities, Icahn is an engaging interlocutor, his voice a raspy staccato, his accent a time capsule of old New York. In the course of three phone calls, we spoke for nearly four hours. Icahn has given hundreds of interviews over the decades. He is a great raconteur. But, on the subject of his role as an adviser to Trump and his effort to change the E.P.A. regulation, he preferred to talk almost entirely off the record. A lawyer joined him for each call. Icahn insisted to me that he does not oppose all regulation, and feels, for example, that “some Wall Street regulation is necessary.” Notwithstanding the title that Trump had conferred on him, Icahn described his advisory role as “unofficial,” and said, “I have only ever made suggestions that I believed would benefit all companies in particular industries, never any one particular company.” Beyond that, he would say little on the record.

Icahn was less guarded when his appointment originally generated controversy. “I own a refinery,” he told Bloomberg News, in March. “Why shouldn’t I advocate?” He later added, “I have a right to talk to the President like any other citizen. . . . And, yeah, it helps me. I’m not apologizing for that.” With me, he was more calibrated, insisting that his role has been overstated, and that he has spoken to Trump only “a handful” of times since the election.

Confronted with Dinneen’s account of their interactions, Icahn deferred to his lawyer, Jesse Lynn, who disputed several points. Although Dinneen was adamant that Icahn had assured him an executive order was in the works, and had spoken of discussing the matter with Trump, Lynn told me that Icahn had merely expressed “hope” that Trump would come around to his view. Lynn also denied the White House’s account, maintaining that the draft executive order was not prepared by Icahn.

I spoke to someone who has seen the draft executive order, and he told me that it looked conspicuously like something that had been prepared by someone with no experience in Washington: “It was like ‘I, the President, instruct Scott Pruitt to move the point of obligation.’ It was almost amateurish. Any policy person or lawyer would understand that this thing was never going to fly.”

Several sources in Washington who have discussed the matter with Mike Catanzaro, the Trump Administration official who dealt with Icahn, told me that, once he and Gary Cohn had concluded that Icahn was attempting to hijack the policy process, they put a stop to it. One of the sources said, “I think Icahn thought if he told his pal Don, ‘This is a bad thing,’ and explained why it was stupid, Don would say, ‘God damn it, Carl, you’re right!’—and then the law would change. That’s not how it works down here. We have this thing called the Administrative Procedure Act.” Another source said, “Mike had to make clear that the government is not a vending machine—that it’s not here to profit the President’s friends.” He added, “Not everybody in this Administration necessarily sees it that way.”

Icahn would not acknowledge having directed CVR to short RINs. Jesse Lynn said that CVR’s strategies on RINs are decided by its board of directors. (He did not mention that the chairman of the board is Icahn.) On the question of whether Icahn had exploited his proximity to the President to make bets in the marketplace, Lynn said, “Any suggestion that we had access to information that others didn’t is unequivocally false.” Neither Icahn nor Lynn would comment further on the trading of RINs, but Icahn told me, “I have a decades-long, impeccable record of creating literally hundreds of billions of dollars of value for shareholders. I’ve lived through many turbulent times but I’ve never had any problems with the government.” He added that he has “a great respect for the law,” and that he and his associates “cross every ‘t’ and dot every ‘i’ in our activities.”

These assurances notwithstanding, Icahn could be in legal jeopardy. “He’s walking right into possible criminal charges,” Richard Painter, the Bush Administration ethics lawyer, said. He cited a federal statute that makes it illegal for executive-branch employees to work on any matter in which they may have a direct financial interest. The President and the Vice-President are exempted from this statute. Unpaid White House advisers are not. Painter suggested that the public-integrity division of the Justice Department should be investigating. “If I were Icahn’s private lawyer, I would tell him that he shouldn’t have accepted the special-adviser title,” he said. Jesse Lynn told me that he has reviewed the relevant law, and that it does not apply to Icahn: “Unlike a government employee, Mr. Icahn has no official role or duties and he is not in a position to set policy.”

Painter disagrees. “That is clearly an official title,” he said. “If he was advising on a matter where he had an interest, then Icahn was in direct violation of the criminal statute.”

The Trump Justice Department may be unlikely to initiate an investigation. But Eliot Spitzer, the former prosecutor and New York governor, told me that Icahn’s activities in Washington should also draw scrutiny in New York. “At a minimum, it looks improper,” he said. “If I were sitting downtown at 120 Broadway, where I used to be the state attorney general, and somebody presented this fact pattern to me, I would say, ‘Let’s take a hard look at this.’ Giving policy advice as a formal government adviser while at the same time trading on the potential impact of that advice violates our notions of transparency in government work. It seems problematic on its face.”

In March, Icahn published an article in The Hill, defending himself against any suggestion that, as a private citizen lobbying the Administration on behalf of his own business interests, he might be expected to register as a lobbyist. “I have vetted my activities with a number of lawyers and it is clear that no registration is required,” he wrote. He argued that it was not merely refiners like CVR that were suffering under the current point of obligation; so were mom-and-pop gas stations, many of which were “minority owned.” Icahn argued, with a straight face, that he was actually fighting this battle on behalf of minority communities. The investor who has negotiated with Icahn told me, “Carl confuses the personal good and the social good in a very profound way.”

Following the reports that Icahn was negotiating with Dinneen and urging Trump to shift the point of obligation, Icahn acknowledged, in March, that he had not been buying RINs. Jesse Lynn insisted that there was “nothing unusual or inappropriate about any RINs trading that may have been conducted.” Icahn had no ability to influence policy at the White House, Lynn insisted. All that his title and his relationship with the President afforded was “an opportunity to express his views.”

One recurring feature of the Trump Presidency has been an acute collective sensation, shared by a substantial portion of the electorate, of helpless witness. Dismayed Americans wait, like spectators at a game that has turned suddenly dangerous, for a referee to step in and cry foul. But one reason that Trumpism is so transfixing to watch is that it is about the upending of norms, the defiance of taboos, the destabilization of institutions. School’s out forever. What this means in practice is a serious deficit of accountability. Whom can you call when the authorities are the ones breaking the rules?

Since Icahn’s appointment, Senators Elizabeth Warren, of Massachusetts, and Sheldon Whitehouse, of Rhode Island, along with several of their Democratic colleagues, have written a string of letters to the White House and to various agencies to protest the nature of Icahn’s role, and to seek clarity on the question of what he has actually been doing. Whitehouse told me that, because of the “definitional murk” surrounding Icahn’s appointment, it is important to answer a series of baseline questions. How often has he consulted with Trump or others at the White House? Has his position provided access to confidential government information that might affect his investments? How broad an array of regulations has Icahn offered advice on, and how have his recommendations dovetailed with his own portfolio?

I asked several people who know Icahn whether he even has policy interests beyond his own investments. They noted Icahn’s commitment to education—he has built eight charter schools in the Bronx—but struggled to offer other examples. Someone who used to work for Icahn told me, “Carl has zero interest in the details of regulation. He has a general feeling that he doesn’t want regulations to affect him, but it’s not like he’s going to be consulting the Federal Register and making policy recommendations. It’s ludicrous.” When a Bloomberg reporter pressed Icahn about sectors beyond oil refining where he felt that regulation was excessive, he spoke of railcars and liquid natural gas—two heavily regulated industries in which Icahn has extensive holdings.

In May, after the revelations about the RIN trading by CVR, the senators wrote to the heads of the S.E.C., the E.P.A., and the Commodities Futures Trading Commission, calling on them to investigate. But it could not have escaped the senators’ attention that two recipients of their letter—Jay Clayton and Scott Pruitt—had met with Icahn in the context of securing their jobs. The Senate Democrats cannot issue subpoenas to agencies unless they get the Republican majority to sign on—an unlikely outcome. In May, the C.F.T.C. replied to the senators’ letter: the agency would not be investigating Icahn or CVR, because RINs, even though they are commodities, do not trade on a futures market, and the agency therefore had no jurisdiction to look into the matter. By this logic, the fifteen-billion-dollar market for renewable-fuel credits is not regulated by any government agency.

In the absence of disclosures about what Icahn has and has not advised on, any investment that he makes in a regulated industry can come to seem suspicious. In February, he acquired a stake in the pharmaceutical giant Bristol-Myers Squibb. During Jay Clayton’s confirmation hearings, Elizabeth Warren noted that Icahn had made this move after assuming his role as a special adviser to the President. The value of a company like Bristol-Myers would be affected by Food and Drug Administration decisions, patent determinations, and policies that affect Medicare and Medicaid, she pointed out. It is almost impossible to imagine, she argued, that Icahn did not “have some inside information about how these policies would affect a company like Bristol-Myers.” Warren posed a hypothetical to Clayton: If Icahn had inside information about federal regulatory policy that would affect Bristol-Myers, and he chose to buy shares in the company based on that information, would that not be a violation of securities laws?

Clayton demurred, saying that it would depend on an analysis of the “facts and circumstances.”

“We are talking about an Administration that just has conflicts everywhere,” Warren pressed. “It is very difficult to determine whether someone is actually working in the interests of the American people or they are just lining their own pockets.” The public should not be forced to “guess” whether its government is serving its interests or that of the President’s cronies, she continued. “And when Carl Icahn is influencing policy that will affect companies and then he is investing in those companies . . . that creates a conflict of interest that is just beyond what we are even talking about everywhere else.”

In his conversation with me, Icahn expressed indignation about the effort to hold him accountable, which he has described, in conspicuously Trumpian language, as “fake news” and “a witch hunt.” He told me that any criticism of his role is “both politically motivated and motivated by certain large business interests,” and is “completely without merit.”

When I asked Icahn about the nature of his special-adviser role, he maintained that what had initially appeared to be a broad policy portfolio was, in practice, much more limited. “The only suggestions I have ever made throughout this whole period were on the RINs issue,” he said. No railcars? No liquid natural gas? Icahn says that he has not had a single conversation with anyone in the Administration about regulations in these industries, or in any others in which he has holdings. He acknowledges advocating on the RINs issue. But he maintains that this was not problematic, because, though the refiner he owns might benefit from a shift in the point of obligation, it would not be the only company that would welcome such a change. In Icahn’s telling, this makes him practically disinterested.

The White House official who would, in theory, police Icahn’s status is Stefan Passantino, the deputy counsel to the President for compliance and ethics. Passantino was responsible for “counselling” Kellyanne Conway, the Presidential adviser, after she sparked an outcry by promoting Ivanka Trump’s apparel line during a Fox News interview. In the view of Trump Administration officials, Passantino laid to rest the Icahn controversy with his February declaration that Icahn was “simply a private citizen.” Kelly Love, the White House spokeswoman, said, “Mr. Icahn does not have a position with the Administration, nor a policymaking role.”

It is ironic for Passantino to rule on the controversy surrounding Icahn’s conflicts of interest—because Passantino has a conflict of his own. On June 28th, Walter Shaub, the head of the Office of Government Ethics, wrote a letter pointing out that Passantino, in his mandatory disclosures as a full-time White House employee, noted that before joining the Administration he had been a corporate lawyer. He listed the clients for whom he had done work in the two years prior to joining the government. One of them was Icahn. At the time that Passantino was initially queried about the propriety of Icahn’s position, he made no mention of this relationship.

Two weeks after Shaub sent his letter, he resigned, saying that he could no longer meaningfully perform the function for which the Office of Government Ethics was designed. Shaub warned that the United States was facing a “historic ethics crisis.” The White House released a statement lashing out at Shaub, dismissing his concerns as “grandstanding.”

For all of President Trump’s fulminations about the danger of leaks, his White House has a bizarre habit of authorizing spokespeople to talk with the press on the condition that their names not be mentioned. When I asked the White House for an interview with Passantino, to discuss how he had vetted Icahn’s position, a spokeswoman replied that Passantino had been “recused on any matters related to Carl Icahn,” because Icahn was a former client. This was the first I had heard of any recusal, and I asked when it had happened. On the first day of the Administration, the spokeswoman replied.

If the White House spokeswoman was correct, then at the time that Passantino issued the Administration’s judgment that Icahn’s role posed no ethical conflicts he was already recused from offering legal advice on precisely that question. “That’s not how recusal works,” Shaub told me. “Recusing yourself means not delivering the White House’s legal theories about whether Icahn is an employee.” The spokeswoman maintained that, when Passantino made his declaration, he wasn’t making a legal judgment, but “merely reiterating a fact.” Richard Painter, who used to hold Passantino’s job, told me that the White House’s repeated assertion that Icahn is simply a private citizen is “bogus,” adding, “The ethics shop in this White House is not very good.”

If Passantino never weighed in on the terms of Icahn’s unusual appointment, surely some other White House lawyer looked into the matter. I asked who that was. The spokeswoman responded that it “wasn’t necessary” to perform any such legal vetting of Icahn’s role.

For the moment, Icahn’s push on the point of obligation appears to have stalled. But, in July, CVR announced its most recent quarterly results, and once again the firm was spending a great deal of money to purchase RINs. On a call with investors, CVR’s chief executive, John Lipinski, cited the volatility of RIN prices. “When there’s news in the market, it goes up and it goes down,” he said. Lipinski complained, several times, about speculators who were “manipulating” the price of the credits. When he was asked about CVR’s own speculative trading of RINs, he said that he didn’t “intend to go into any detail” on such questions. RIN prices, which hit a low of thirty cents following the news of Icahn’s deal with Dinneen, have since tripled. In the coming weeks, the E.P.A. is expected to issue a formal rejection of proposals to shift the point of obligation. According to Reuters, some investors on Wall Street are now betting against Icahn—by shorting CVR stock.

Dinneen, for one, does not anticipate that Icahn will simply let the issue go. “He doesn’t seem like a man who will quit easily,” he said.

Jeff Hauser, who runs the Revolving Door Project, a nonprofit focussed on government corruption, told me that Icahn’s relationship with Trump is a particularly bald example of a kind of clientalist politics that has been more typical, historically, of banana republics, but which is on the rise in the United States. “Once there is an acquiescence that this sort of corruption is acceptable, then you just see the demise of representative government,” Hauser said. “We will essentially become a feudal state, with people creating their own fiefdoms and extracting rents from the public.”

On August 14th, I asked the White House to confirm that Icahn was still a special adviser to the President. The spokeswoman e-mailed me back: “Icahn is NOT ‘a special adviser to the president for regulatory reform.’ ” This was certainly news. In my conversations with Icahn and his lawyer, I had not developed any impression that his status had changed. Was the Administration cutting him loose?

I wrote back to the spokeswoman, asking when Icahn had been let go. She replied, “There was no ‘effective’ end date, because there was never a formal appointment or title after January 20.” This was transparently false; Icahn had been named a special adviser to “the President,” not to “the President-elect.” On March 1st, Icahn’s company told the S.E.C. that he was “currently” a Trump adviser. And why had the White House lawyer, Stefan Passantino, recused himself on January 20th from “any matters related to Carl Icahn” if, as of that very day, Icahn had no role in the Administration?

Instead of simply breaking off a questionable liaison, the White House seems intent on going further, insisting that the liaison never happened in the first place. But, in the event that state or federal investigators do examine the legality of Icahn’s role in the early days of the Trump Administration, this heedless revisionism is unlikely to withstand scrutiny. After all, if Icahn had really been dismissed on the first day of the Administration, it might have behooved the White House to tell Bob Dinneen, or the senators who wrote all those letters. Or Icahn.

On Friday, August 18th, four days after the White House disavowed Icahn to me, he tweeted, “Today, with President Trump’s blessing, I ceased to act as special advisor to the President on issues relating to regulatory reform.” In a letter posted to his Web site, Icahn explained that he had spoken with Trump that day. His resignation came during a week when numerous private-sector advisers distanced themselves from Trump, in response to his equivocal comments in the aftermath of a white-supremacist rally in Charlottesville. But Icahn made no mention of these events, claiming instead, “I chose to end this arrangement,” and citing “the insinuations of a handful of your Democratic critics.” He insisted, “I never had access to nonpublic information or profited from my position, nor do I believe that my role presented conflicts of interests.”

In our conversations, Icahn was unfailingly polite about President Trump. But it struck me that it must vex him that Trump—the lesser intellect, the lesser businessman, the little-brother tagalong—may now be too busy to take his phone calls, and would jettison him from his position as a White House special adviser without so much as a heads-up. If Icahn’s raid on Washington has proved unsuccessful, he cannot blame the scrupulousness of the Trump Administration. The aging takeover artist may have flown a little too close to the sun in his pursuit of a particular political objective, but his failure was itself an illustration of the power of transactional politics in Washington. Trump may want to govern like a businessman. But Washington is a club like any other, with some codes and protocols that even the brashest arrivistes cannot ignore. Trump needed the farmers of Iowa to win the Presidency, and he would need them to win it again. To a businessman like Icahn, it may have seemed that, in the pay-for-play politics of Washington, everything has a price. But reëlection is priceless.

Icahn eventually succeeded in gaining control of the Trump Taj Mahal casino. In 2014, a bankruptcy-court judge expressed concern that Icahn Enterprises would just close the place, and insisted that company executives testify that they had no plans to shut the casino down. Initially, Icahn promised to invest a hundred million dollars in the ailing facility. But he ended up embroiled in yet another bitter union fight, and refused to yield on demands from casino employees for better pay and health benefits. Eventually, Icahn shuttered the casino. “The great dealmaker would rather burn the Trump Taj Mahal down just so he can control the ashes,” Bob McDevitt, the president of the local union, said at the time. “It’s a classic take-the-money-and-run—Icahn takes hundreds of millions of dollars out of Atlantic City and then announces he is closing up shop.” The casino’s demise put three thousand people out of work. In March, 2017, Icahn found a buyer: Hard Rock International. One day earlier this summer, former employees queued up alongside treasure hunters and curious passersby on the boardwalk outside the beleaguered casino. A liquidator had arranged a fire sale of the items inside. People carted home used bed linens and scuffed armchairs and statuary of fake gold. They looked for souvenirs bearing the Trump name, but there weren’t any.

For many years, an odd structure stood down the boardwalk from the Taj Mahal—a three-story rooming house. It had been bought, in 1961, by an eccentric local woman named Vera Coking, who ran it in the manner of a boarding house in a Hitchcock film: cheap rooms for rent, with a shared bathroom down the hall. When the casino boom swept Atlantic City, in the eighties, many suitors came to Coking, hoping to buy her building for the valuable land that it sat on. But Coking, who was stubborn, refused to sell. Donald Trump was one of those suitors. “He’d come over to the house, probably thinking, If I butter her up now, I’ll get her house for a good price,” she told the Daily News, in 1998. “Once, he gave me Neil Diamond tickets. I didn’t even know who Neil Diamond was.” Trump, the great negotiator, could not get Coking to sell. He enlisted the State of New Jersey to invoke eminent domain in order to oust her from her property, but Coking fought in court and prevailed. She derided the future President as “a maggot, a cockroach, and a crumb.”

Finally, in 2014, the house went up for auction. Trump had, by that time, walked away from Atlantic City, and was preparing to run for President. Coking was living in a retirement home in California. The property sold to an unnamed buyer, for five hundred and thirty thousand dollars. The buyer was Carl Icahn. He knocked the house down. ♦

Diaspora federation protocol 0.2.0 paves the way for account migration

$
0
0

The second major version of diaspora’s federation protocol has been released

Let’s first take a step back and look at why this is huge news.

tl;dr: The next major version of diaspora* (0.7.0.0) will include a new major version (0.2.0) of diaspora*’s federation protocol. The release of this version demonstrates that the ‘cleaning’ phase has been finished and that the community is now able to develop this protocol further. Under an AGPL 3.0 licence and proven by many years of production, the protocol and its implementation are both reliable and robust. We encourage projects seeking to create the federated social web to take an interest in this protocol, and we will push its wider adoption by providing support and an automatic tool to test its implementation in other languages. Apart from the reference implementation in Ruby, there are currently two implementations in PHP, one in Python and one in Go, which are at various stages of development.

The evolution of the protocol since 2012

The diaspora* community has been working on the diaspora* federation protocol (based on the Salmon standard) since the withdrawal from the project of the founders in August 2012. At this time, the code managing the diaspora* protocol was integrated deep in diaspora*’s core software. Such architecture has major defects. For the diaspora* project first: it makes the isolation and fixing of bugs far more difficult, and it complicates the development of the protocol by increasing the risk of regressions. In order for the decentralized social web to adopt the protocol, it would have been necessary first to retro-engineer diaspora*’s complex code to understand its operation. To directly reuse this code in other projects was therefore almost impossible.

A protocol which is difficult both to extend and to implement more widely is guaranteed to become obsolete. It thus very quickly became essential in the eyes of the community to extract the protocol into a separate library. This would make it easier to maintain and extend, could be taken and included in other projects which wish to adopt it, and could be used as a reference implementation for those wishing to create a new implementation of the protocol in language other than Ruby. The work of extraction started in August 2014. The amount of refactorization was so great that it became easier to restart with a new implementation of the protocol almost from scratch. Florian Staudacher (Raven24) and later Benjamin Neff (SuperTux88) worked on it for more than one year. It was the first big stage in the project: to understand all the code written by the founders, and to rewrite it in a separate project, so that it is more stable and easier to reuse.

Once the library had evolved sufficiently, the work of integrating it with diaspora* started. This second stage was even more difficult. Step by step, the old code in diaspora* was replaced by calls to the new library. This process began with the discovery of contacts on other pods (servers running the diaspora* software), done using the WebFinger and HCard standards. It was implemented in July 2015 and in August 2015. Much work followed and long story short, the clean-up of the old code and the integration of the new were finished in June 2016. Finally, with the release of major version 0.6.0.0 of diaspora*, all this work officially became available for all, on August 27th, 2016, 4 years to the day after the departure of the founders.

Why today is a great day!

All this work done during these 4 years was essential to provide solid foundations. It even did a lot of good for servers running diaspora*, as the new implementation was more robust and, being better tested, was less buggy. But for end-users, there was no visible new functionality. And this is why this second major version of the protocol is exciting: with the clean-up phase complete, Benjamin could, helped by Senya (cmrd-senya), attack a far more interesting part: the evolution the protocol itself. And of development, since last August, there has been plenty! The list of changes is impressive! One example is the addition of a timestamp to federated comments, which means they can always be displayed in their proper order, thus correcting a several-years-old bug! It is possible to send your biography to other servers. You can also see that the protocol is now able to manage events, which means that this feature can finally be written into diaspora*’s software. But the most important innovation is the introduction of the concept of account migration, which will make it possible for users to move their account entirely to a different diaspora* server while keeping their contacts, messages, comments... One of the headline promises of the diaspora* project was to give complete power to the user by enabling them to move from one pod to another at will. Thanks to the release of version 0.2.0 of the protocol, this is now closer than ever to becoming a reality!

Backwards compatibility and adoption

All these changes are important and have a consequence: diaspora* version 0.7.0.0 is not backwards-compatible with version 0.6.2.0 or lower. Any servers still running a version of diaspora* older than 0.6.3.0 will no longer be able to communicate fully with servers running the latest software. This is why it is extremely important for podmins to update their server regularly, which is in any case essential in order to fix security breaches.

This version also shows that, strengthened through 4 years of experience, the diaspora* community can today provide a reliable and evolving social networking protocol. Its specifications are, of course, public. The Ruby gem, the reference implementation used by diaspora*, is available under an AGPL 3.0 licence (documentation). Its source code, and that of many other implementations, such as that in PHP used by Friendica, that in python used by SocialHome, or that in Go used by Ganggo are all available. Note that these other implementations are not officially supported by the diaspora* project and at various stages of development. If you wish to use it or to take part in the development of the protocol, do not hesitate – come and discuss it on Github, discourse or #diaspora-dev on IRC! We encourage projects seeking to create the federated social web to take an interest in this protocol, and we will push its wider adoption by providing support and an automatic tool to test its implementation in other languages.

Keep rocking the free social web!

Viewing all 25817 articles
Browse latest View live


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