A Quest to Make Gasoline Out of Thin Air: Prometheus (YC W19) - <AUTHOR> https://www.bloomberg.com/news/articles/2019-04-30/in-silicon-valley-the-quest-to-make-gasoline-out-of-thin-air? <comment><USER2> This is really, fundamentally important technology. Emissions reduction will not work: [https://www.scientificamerican.com/article/nations-are- not-r...](https://www.scientificamerican.com/article/nations-are-not-reducing- emissions-quickly-enough-to-meet-2c-target)

> The authors of the report stated in a press release that the kind of > drastic, large-scale action the planet desperately needs has yet to be seen, > even though global emissions have reached record levels at 53.5 billion > metric tons in 2017, with no signs of peaking.

> Cities, states, the private sector and other nonfederal entities may be best > placed to take bold actions on climate change. According to the report, the > globe may need to reduce carbon dioxide emissions by 19 billion metric tons > by 2030 to close the 2 C gap.

That's a 35% reduction in global CO2 emissions over the next decade. It's not going to happen. CO2 emissions are growing like this: [http://folk.uio.no/roberan/img/GCB2018/PNG/s11_2018_Projecti...](http://folk.uio.no/roberan/img/GCB2018/PNG/s11_2018_Projections.png). The U.S. and EU could go back to 1960 levels of emissions and it would cut only about 3 gigatons. China alone increased its usage 3 gigatons in the last 10 years. The rest of the world increased its emissions by that much in the last 15. Bringing Indian emissions up to Chinese per-capita levels would add 7.5 gigatons.

A 30% reduction is taking the world back to 1990. The U.S. has added maybe half a gigaton since 1990, and the EU actually dropped about a gigaton since then. (The difference is largely due to the fact that the EU28 countries grew only 8.5% since 1990, while the US grew 30%.) But the rest of the world has added 15 gigatons since 1990. That 15 gigatons represents a shift from desperate poverty in Africa, India, and China to lower income status (though still many gigatons away from the standard of living enjoyed in the US and EU). That cannot be undone.

The only serious solution to climate change is carbon recapture.

<comment><USER3> How much do today's "carbon recapture" methods need to grow? What's the timeline on them looking like?

P.S. The first Google result for carbon recapture is titled ""Direct air capture" of carbon dioxide won't solve climate change"

P.P.S From Wikipedia with a cited source:

capturing and compressing CO2 and other system costs are estimated to increase the cost per watt-hour energy produced by 21–91% for fossil fuel power plants;

<comment><USER2> The author of the article (who does not appear to be an expert in anything) overlooks that renewables only address part of the emissions picture. Even if the U.S. switched tomorrow to 100% renewables and 100% electric vehicles (including trains, cars, planes, and ships), and you ignore the CO2 emissions of making all those new power plants and vehicles, U.S. usage would only go down by 3.5 gigaton: [https://www.epa.gov/climate-indicators/climate-change- indica...](https://www.epa.gov/climate-indicators/climate-change-indicators- us-greenhouse-gas-emissions). It won't change the CO2 emissions created by home and commercial heating, agriculture, and industrial uses, which add up to another 3.5 or so gigatons.

And even the U.S. and EU going to 0 carbon emissions wouldn't offset the growth in India, China, and Africa. And those places are a long ways away from electric cars and solar power plants. (Also, where would you put them in say India or Bangladesh?) Carbon recapture can do a very important thing renweables cannot--allow the developed world to suck out the developing world's CO2.

The current cost of carbon capture is about $120 per ton. If it follows the same trend as improvements on solar panel cost, that could be $40 per ton in a decade. At that price it would cost $300 billion annually to remove the extra carbon India will be adding to the atmosphere by then. That will be just 5% of India's GDP by then.

<comment><USER4> >It won't change the CO2 emissions created by home and commercial heating, agriculture, and industrial uses, which add up to another 3.5 or so gigatons.

So address each one in turn, or in parallel. You give no reason not to.

<comment><USER5> Lot of people use the 'golden hammer or nothing argument'

Meaning if a proposed solution is partial then we shouldn't do anything. It flies in the face of the reality that most solutions to complex problems involve chipping away at them.

Currently there is a host of technologies which emit to much CO2. Personal transportation is just one of them.

</comment></comment></comment></comment></comment><comment><USER6> Soooooo many questions.

Gasoline is a distillate made up of several hydrocarbons -- is he synthesizing all of them, or just octane? What about additives, like anti-knock agents? Plans for diesel?

No amount of fancy CNTs gets around thermodynamics. CO2 and H20 are far more stable, thermodynamically, than octane, it's partially why octane is a good fuel. Where does the extra energy come from? What is the efficiency of the conversion? What kind of thoroughput are we talking about?

How scalable - is the CNT manufacturing mature enough to support large scale rollout?

Who is on his team? Research chemists, or experienced chem Es, both hopefully?

I'm sure he knows these answers (man has a PhD is chem), would have loved to sit through that pitch.

The Bloomberg piece is very light on details; the secrecy is frustrating but understandable.

<comment><USER7> Hi, this is Rob, founder of Prometheus. The conversion of CO2 and water to gasoline is not a super efficient process, likely 50-60% at best in the near term, but that's ok, if the electricity is from a zero carbon source like solar or wind, and the cost of the electricity is low (which these days it is).

The CNT membranes are being made at full commercial scale now by my previous startup, Mattershift. Ready to go!

We've got scientists and engineers from national labs and previous efforts like Project Foghorn at Google. Hope to share some new hires soon.

There was a podcast that was associated with the article, that runs 21 minutes and goes into more details: [https://megaphone.link/BLM3585271197](https://megaphone.link/BLM3585271197)

<comment><USER6> Hey, thanks, and best of luck, what a cool company.

It seems like you're on the cusp of breaking even from yongjik's back of the envelope math, at least for the US commercial market. Is this a refinement of Fischer-Tropsch?

However, I think you're barking up the wrong tree. The US military pays $hundreds of dollars to get fuel into a warzone. If you can make diesel (which I think you can), you don't have to go after a $3 a gallon target, you go after a $300 target. You can perfect it on sweet sweet DARPA money at a price point that will make you rich and save the military a shitload of money.

<comment><USER8> That sounds like a particularly interesting answer, but I wonder what the power and factory requirements would be to have something like this at a FOB or base?

Surely most operating bases use gas powered generators to run and not solar right?

</comment></comment></comment></comment><comment><USER9> There's no way this is a net energy producer right? So it only makes sense if it's powered by carbon-free sources?

Basically this has two uses then:

\- As a stop gap till batteries and electric vehicles take over from ICE. Although if it generates carbon-neutral jet fuel that would be very useful.

\- Maybe as a carbon capture device, except that gasoline doesn't seem like a great way to store excess carbon. Although the article indicates the carbon could be converted into other materials. That part isn't very clear.

<comment><USER10> Batteries have the disadvantage that they require heavy resource extraction and wear out. The advantage of hydrocarbon fuel is that it is basically instantly fillable (no charging), doesn't decrease in capacity (or minimally I suppose), and energy density.

The use here is that we could use a renewable energy source, like solar, and then use the hydrocarbon generated as an energy transfer medium rather than fuel itself. Actually, this is what we do today, since the hydrocarbon in the earth is actually just naturally captured solar energy.

<comment><USER11> > The advantage of hydrocarbon fuel is that it is basically instantly fillable > (no charging), doesn't decrease in capacity (or minimally I suppose), and > energy density.

That first property can be mimicked by batteries without too much trouble. Just standardize them and make them swappable at the fill-up station, like propane tanks. There are financing complications with this (who owns the batteries, etc.), but it's do-able and it's already been tested by at least one now-failed start-up.

<comment><USER12> NIO does battery swapping in China.

</comment></comment></comment></comment><comment><USER13> After reading this article, all I can say is ... ugh. What I really wanted to know was "Where does the energy come from?", and the article didn't answer that at all.

The world doesn't really have a "carbon" problem, it has an energy problem, and right now carbon fuels are the cheapest, most abundant source of energy. Even if you somehow got carbon capture to work, you're still going to have to power it - with solar, or wind, nuclear, geothermal, whatever. At that point, then the question just becomes whether using the storage medium of gas is better than the storage medium of something else, like batteries. But the article doesn't go into the core question of where the energy is coming from to turn CO2 into gas.

<comment><USER14> I would bet photovoltaic. Lowest cost per watt, the process can likely be designed to tolerate day/night variations, and the plant can be located where the sun shines.

<comment><USER15> Or nuclear. A big nuclear plant could be built somewhere with cheap land, no earthquakes, and minimal weather. You don't even need electric transmission infrastructure.

If the capital costs are low enough, cheap or free spot electricity could be used, too. California regularly has excess production.

<comment><USER16> That would be ironic.

We would gradually go from coal and (natural gas) powered electric cars, to nuclear powered ICE cars.

<comment><USER17> I think the point is that we

1\. Keep making more electric cars 2\. Rather than throwing away ICE cars, we give them better fuel to use.

<comment><USER15> There are also ICE farm and construction vehicles, airplanes, generators in rural areas, pumps, etc. Gasoline is an extremely convenient fuel.

</comment></comment></comment></comment></comment></comment><comment><USER18> Carbon Engineering, in Canada, is already doing this on a pilot plant scale.[1] Converting CO2 to a fuel is chemically uphill, so you have to put energy in. This can work if you have cheap hydropower, which parts of Canada do. It's only feasible financially if there's a big subsidy for removing CO2 from the atmosphere.

[1] [https://news.nationalgeographic.com/2018/06/carbon- engineeri...](https://news.nationalgeographic.com/2018/06/carbon-engineering- liquid-fuel-carbon-capture-neutral-science/)

</comment><comment><USER7> Hi HN! I'm Rob, founder of Prometheus. Just saw this, catching up now and will try to answer any questions.

<comment><USER19> Hi Rob. Why bother trying to extract CO2 out of "thin air" when there are far more concentrated sources available, for example exhaust of existing power plants (100,000 ppm CO2, instead of 400 ppm)?

There are even streams of pure CO2 being vented to the atmosphere, eg: [https://thewest.com.au/business/energy/woodsides-browse- lng-...](https://thewest.com.au/business/energy/woodsides-browse-lng-project- tipped-to-be-among-nations-biggest-polluters-ng-b881025569z)

<comment><USER7> Point sources won't scale to the size of the problem. Easier initially, but to replace fossil fuels for transportation and heating, will need to get the CO2 from the air.

<comment><USER19> >Easier initially...

Then start with point sources initially.

Considering a good portion of transportation and basically all of the heating can be replaced by electricity directly, you will not need to go beyond point sources anyway.

<comment><USER20> There is a much more efficient way to deal with point sources, if you have a clean energy source in their neighborhood: just shut them down and replace the energy they provide with the clean energy you would use to scrub the CO2 from the air.

<comment><USER19> Yes, sometimes this is practicable. But many locations do not have sufficient renewable energy available, and nuclear has become unpalatable for a variety of reasons.

Scrubbing CO2 from boiler or turbine exhaust takes a small fraction (5%-ish) of the energy needed to convert it into fuel. If the source is a power plant, the CO2 can be captured at a cost of efficiency penalty of around 10%.

Once it is captured, storing and transporting CO2 to a location with abundant clean energy is also relatively simple.

</comment></comment></comment></comment></comment></comment><comment><USER21> The main question that I do not see addressed, is how many Joules of energy does the process need to make 1 Joule worth of liquid fuel.

If we need for example 2J of energy to make 1J worth of gasoline, then it means that we need to double the installation rate of renewable production facilities (wind, solar, biofuels), while the global energy demand increases. This makes it completely infeasible (and I did not consider cost at all in my analysis yet).

Edit: I just saw that the founder mentioned in the comments that they expect 50% efficiency at best. This unfortunately means that the liquid fuel product of this process will have at least double the cost of renewable energy.

<comment><USER22> That's a smart argument, but I think what it's missing is that the cost of gasoline is much higher than the cost of its energy equivalent on the electricity market. I.e, the cost of 1 Joule of energy != the cost of 1 joule of gasoline.

Because gasoline is a premium energy source, if we can produce it from photovoltaic sources, we can effectively mark-up photovoltaic electricity. In the long-term, that would make it economical to greatly expand our photovoltaic capacity. The cost equivalence Prometheus is aiming for is: Market price of 1 gallon of gasoline > cost to produce 1 gallon of gasoline using renewable energy.

Another factor is that Prometheus production works in remote areas where transmission losses for electricity are high (i.e., remote hydroelectric plants).

</comment></comment><comment><USER23> So, you spend a load of energy to reform atmospheric CO2 back into hydrocarbon fuel - and then just burn it again, turning it back into CO2 and putting it back into the atmosphere?

The end state of the atmosphere is, at best, the same as the starting state, but you've expended a load more energy for nothing. If the energy to run this process isn't zero-carbon, then this is going to be a big net emitter when done at scale.

This is just creating green-washed gasoline.

<comment><USER24> You don't have to burn it. In theory governments or environmental groups could simple buy and store it.

<comment><USER23> If you're not going to burn it, you should turn it into something else - carbonate rock, ideally.

</comment></comment></comment><comment><USER25> I saw this paper [http://energywatchgroup.org/wp- content/uploads/EWG_LUT_100RE...](http://energywatchgroup.org/wp- content/uploads/EWG_LUT_100RE_All_Sectors_Global_Report_2019.pdf) on HN recently which claims that it shouldn't be too expensive to convert to 100% renewable energy by 2050 (but you have to actually start on it of course). Liquid fuel would still be used for ships, jets, rockets, and some trucks and to be net zero carbon that fuel needs to be produced either by plants (biofuel) or by Prometheus-style direct capture. In this case the fuel is not a source of energy but a denser storage medium for renewable electricity.

</comment><comment><USER26> I really hope this is successful because this would make a difference for climate change much quicker than transitioning to BEV cars. BEV cars are better overall, but there just isn't enough time with the rate climate change is happening.

This combined with a strong push for PHEV and hybrid cars could help climate change much faster. It makes sense on many levels:

* PHEV cars with 40+ miles EV range are great for those who can charge at home. It's enough to make most of the miles electric (such as commuting or getting groceries). And it's a much better use of limited lithium battery capacity. The battery in one Tesla could be used to build 10 PHEV cars.

* Many people still live in places with no overnight charging such as apartments and dense urban areas. The hybrid tech (perfected by Toyota) is the right solution here. Keep working on getting the mpg even higher.

* Government can really boost this by requiring X% of all gas to be carbon neutral and increasing that over time. They do this with 10% ethanol, but that was the wrong fuel. Start with 5% must be carbon neutral and increase 5% every year from there.

* Carbon tax, enough to make synthetic fuel like this competitive with fossil fuels from the ground.

BEV cars is a case of perfect being the enemy of good. When excluding external factors, BEV is clearly superior to ICE. But we don't have time to transition to BEV. We need to make progress on climate change now and this will get there faster.

</comment><comment><USER27> There is a water plant called Azolla that actually captured so much co2 long ago that many think it triggered an ice age. Why not incentivize natural carbon sequestration and just produce huge fields of this stuff everywhere? I would hope we find a fish that likes eating it, or find a way to convert it into other animal feed, if nothing else. I don't think carbon tax credits or whatever they are called are enough for someone to justify making an actual sequestration-only operation.

<comment><USER28> If an animal eats it, wouldn't it be combusting the captured carbon to produce CO2/H20/energy? I don't think you'd want to feed it to anything, but just let it be buried or be pushed under the earth's crust.

<comment><USER27> Yes, they don't even need to eat it, just from decomposing versus growing corn you can measure the rising and falling cycles of co2 at different times of the year for north america. I think Azolla is still less effort to grow than most plants, which might still help out if it ends up being used for animal feed.

</comment></comment></comment><comment><USER19> I wrote the comment below in response to another article, but it is applicable here. I should note that the technology to convert CO2 to say hydrocarbons is well known (and my current work is on making it economically interesting), my issue is with trying to extract CO2 from the atmosphere, which is very inefficient.

\-----

This is actually a very bad idea and a complete waste of money which should have been used for other projects. It reminds me of another bad idea, which just will not die - extracting water from air by cooling it. Right now, we have several technologies ready to go. Starting with the most cost-effective, and omitting the "use less" scenarios:

1\. Replacement of fossil fuel power plants with carbon free electricity such as wind and solar power (also geothermal, where possible and nuclear, where palatable). Cost per tonne of CO2 saved: less than zero for about 30% of current generation, and "very low" for a good portion of the remainder.

2\. Sequestration of concentrated CO2 streams, such as those produced in natural gas processing. Cost: $20-$40 per tonne.

3\. Biosequestration, ie tree planting. Cost varies greatly, maybe $15-$50 per tonne.

The approaches above are the only ones that are actually used in the industry today, but there is plenty of room to do more. The approaches below are considered to be economically prohibitive, and AFAIK are not in use:

4\. Post-combustion carbon capture: Scrubbing the CO2 from exhaust gases of power plants etc, where the CO2 concentration is 10-20%. Cost: $50-100/tonne, PLUS the cost of sequestration, as above.

5\. Pre-combustion carbon capture: here, the carbon is removed from the fuel and sequestered, and only the hydrogen is burned. Cost: $80-150/tonne, but sequestration cost is low.

and then we have:

6\. Removal of CO2 from the atmosphere. The article says the cost may be "under $100/tonne", but the serious estimates I have seen are circa $500/tonne. Consider that the CO2 concentration in air is around 0.04%, cf post combustion concentrations of 10-20%. Regardless of the advances in technology, this will never be as cheap as post-combustion carbon capture, which is essentially the same process but with 250 times less throughput.

<comment><USER29> You are missing the point; this is a fuel production system that effectively removes the need to capture carbon: i.e. the notion of turning air into something you put in the ground too offset the carbon we are removing from it to burn. I agree that is not a valid economical proposition other than making people feel slightly less guilty about burning fossil fuels. It's actually a rather dumb idea since you are taking something that is expensive and wasteful and spend yet more to offset somewhat just how wasteful it is.

Producing fuel from the captured carbon, sidesteps the whole problem of needing fossil fuels at all. So, you are not offsetting anything; you are simply producing the fuel that you need in a way that is clean.

You seem to be arguing that it can't be done because 'numbers'. 1) those numbers lack citations 2) they are not set in stone. The question you should be asking yourself is how badly wrong your numbers are and what it would take to make the numbers right.

Turns out that this whole game of producing fuels from thin air is mostly a function of clean energy cost per kwh. Simply put, this is not constant. It varies wildly geographically. And it's also not constant over time. It's been dropping for decades at a rather impressive pace and projected to continue to do so. So, the only question is when will it become completely uneconomical to mine fossil fuels as opposed to simply converting co2 into whatever carbohydrates we need.

I'm guessing the persons behind Prometheus might be a bit optimistic here (i.e. suggesting it could be economical right now) but I wouldn't see that as a fundamental issue. If the answer is that those cost lines cross anywhere in the next decades, this would be still be an extremely lucrative investment. The mere possibility that this could be economical right now or in the very near term, makes this quite exciting.

<comment><USER19> >You are missing the point; this is a fuel production system that effectively removes the need to capture carbon

No... the first step in the proposed process is to capture the CO2 from the air, what I describe in point 6 of my comment.

>You seem to be arguing that it can't be done because 'numbers'

No... It can be done. But it should not be done. Because 'numbers' tell you there are other things that should be done instead. Right now.

>those numbers lack citations... you should be asking yourself is how badly wrong your numbers are...

I work in this field. I have literally hundreds of possible citations. Pick a number you most disagree with, and I will provide you a citation. Alternatively, provide me a counter-citation and I will review and comment on it for you.

> The mere possibility that this could be economical right now or in the very > near term...

Here is what I am trying to tell you: this _cannot_ be economical until all the other, much more economical options which I have listed are pretty much fully used up. Considering that we have barely made a dent in the first of these, this will certainly not be economical in the near term, or in the medium term (and in my opinion, never, because biosequestration is so much cheaper).

<comment><USER29> Eh no. You are talking about carbon capture as a way to offset fossil fuel consumption. I'm talking about reducing fossil fuel consumption by instead producing non fossil fuels. Apples and oranges. The point of that is not to capture the carbon but to utilize it as fuel. With this technology, that is neither impossible nor prohibitively expensive/unecomincal. Unlike the six schemes you outline that are about not producing any fuel whatsoever so we can continue to produce it the old way while hopefully removing some of the CO2 that we are thus putting there (hence the need to capture it).

You're using numbers to categorically dismiss what seems to be a pretty well reasoned case for doing this as "impossible" because 'numbers' for various carbon capturing schemes.

If you are capturing carbon, you might as well do it in a form where you can actually utilize it for fuel. That's a pretty nice proposition. Prometheus seems to be one of several startups with some plans for making this happen.

You're saying they are wasting time. I'm saying that layering the cost that you outline on top of the existing fossil fuel production cost only makes their value proposition even more attractive than it already is without doing that. Bottom line is anything that reduces the amount of oil we pump up and burn is a good thing. Carbon capture schemes seem more like an excuse to drag our heels doing that than something that is actually likely to produce results on a timescale that isn't measured in centuries.

<comment><USER19> >The point of that is not to capture the carbon but to utilize it as fuel. >If you are capturing carbon, you might as well do it in a form where you can actually utilize it for fuel.

Do you understand that the Prometheus proposes to first capture the carbon and then convert it to fuel?

I have no objection to the "convert it to fuel" part. Just to the capture from atmosphere, which is the most inefficient way.

<comment><USER29> I understand you perfectly. I just don't agree with a single sentence of it. The semantics of carbon capture for you seem to mean to capture some (tiny) percentage of the absolutely epic levels of fossil carbon we put into it today.

The point of Prometeus is to take no fossil carbon whatsoever (0%) and create the fuel directly from the CO2 already in the air and indeed put it back there when it is burned. It's not capturing so much as reusing what is already there. It's by definition the most efficient way. It's 100% efficient.

None of the things you listed actually produce fuel. So they are 0% efficient. At best they offset some meaningless percentage of fossil fuels. Actually raising the cost of those fossil fuels to pay for more meaningful percentages (like more than 1 digit?), just strengthens the business case for Prometheus. The more costly fossil fuel gets, the more attractive Prometheus gets. As it is, they seem to be claiming to be cost effective as is.

<comment><USER19> >I understand you perfectly.

I don't think so.

>I just don't agree with a single sentence of it.... The more costly fossil fuel gets, the more attractive Prometheus gets. As it is, they seem to be claiming to be cost effective as is.

Okay. Invest in Prometheus. I think the net result will be an increase in CO2 emissions, because all the activity will fail to deliver any viable atmospheric CO2 capture plants, ever. Let's check on this say 20 years from now. If I'm right, buy me a beer.

</comment></comment></comment></comment></comment></comment></comment><comment><USER30> OK, I was curious so just did some math.

Gasoline has energy density of 34.2 MJ/L, or 9.5 kWh/L[1]. Its retail price is about $3/gallon, or $0.8/L.

So, assuming 100% efficiency, the energy source for making gasoline should be ~$0.084/kWh to break even.

Energy Information Administration (EIA) estimates 2022's solar/wind generation cost at $73.7 and $55.8 per MWh [2], or $0.0737 and $0.0558 per kWh.

Assuming wind power, gasoline generation has to be ~66% efficient to break even, which is (I guess) not physically impossible, but an incredible engineering challenge.

...and that's assuming retail price. I'm not an energy expert, but [3] seems to say that gasoline's current bulk price is ~$1.5/gallon, which pushes the technology firmly on the side of losing money.

[1] [https://en.wikipedia.org/wiki/Energy_density](https://en.wikipedia.org/wiki/Energy_density)

[2] [https://en.wikipedia.org/wiki/Cost_of_electricity_by_source#...](https://en.wikipedia.org/wiki/Cost_of_electricity_by_source#Energy_Information_Administration)

[3] [https://www.eia.gov/dnav/pet/hist/LeafHandler.ashx?n=pet&s=e...](https://www.eia.gov/dnav/pet/hist/LeafHandler.ashx?n=pet&s=ema_epm0_pwg_nus_dpg&f=m)

<comment><USER31> If there were realistic competitors for fossil fuels, we wouldn't be worrying about a climate crisis in the first place. Nothing is going to compete with pumping fuel out of the ground, and it never will.

Any realistic scenario _starts_ with some kind of regulation on carbon extraction and _then_ worries about the economics of replacements. And technologies like this one that claim to be within a factor of two seem very worth investigating.

Whether it works or not, who knows.

<comment><USER30> But all these renewable energy sources are already competing with fossil fuels and sometimes even winning! And even with these sources you can't make synthetic gasoline economically viable.

That leads to the question: if one can sell synthetic gasoline at profit, they must have a really cheap source of energy, in which case why go through the trouble of gasoline instead of selling the energy directly?

<comment><USER32> Imagine a remote military outpost-- the only supply chain access is limited & expensive.

Having vehicles that can go from empty to full in seconds by fuel you pulled out of the air yourself with solar panels last week could be much more valuable than using those same solar panels to charge an electric vehicle (or a battery bank and then later a vehicle).

Certain types of municipal or commercial fleets also have quick-refuel requirements. There are likely a few other limitations to current electrics that ICE engines don't have, as well.

</comment></comment></comment></comment><comment><USER33> The carbon costs of manufacturing a replacement fleet of cars is surely vast.

Meanwhile, the internal combustion engine is perfectly capable of running on a whole slew of renewable fuels, including but not limited to hydrogen gas, methanol, etc.

It's not the most efficient in the long run, but it's a piece of the puzzle, especially when you consider the baseline energetic/carbon costs of building new vehicles from scratch.

P.s. lithium is a conflict mineral now.

<comment><USER31> The point about the desirability of a direct liquid fuel replacement for transportation is valid, but this logic doesn't work:

> The carbon costs of manufacturing a replacement fleet of cars is surely > vast.

Cars have finite lifetimes. You don't replace the ones on the road, you replace the ones we'll buy in the future.

And this one... well...

> P.s. lithium is a conflict mineral now

citation REALLY needed

<comment><USER33> > Cars have finite lifetimes. You don't replace the ones on the road, you > replace the ones we'll buy in the future.

Apologies... I realize upon rereading what I wrote that it was all a little hyperbolic.

My point is that renewable hydrocarbon fuels could extend the use of already manufactured cars in a way that saves energy on the supply end, much in the same way that thrift stores extend the lives of worn clothing and satisfy a lot of demand that might otherwise go toward pressuring suppliers to make new clothes. It pays, energetically, to reuse and recycle (two out of the three R's right there!) Renewable hydrocarbon fuels would effectively "recycle" existing cars. I don't have any hard numbers but my hunch is that economically this could be quite a significant effect.

Combined with hybrid conversion kits, renewable hydrocarbon fuels could make existing vehicles into a viable piece of the sustainable transportation puzzle.

> citation REALLY needed

[http://gppreview.com/2018/02/07/motivations-unearthed-re- con...](http://gppreview.com/2018/02/07/motivations-unearthed-re- contextualizing-war-afghanistan/)

[https://www.globalresearch.ca/more-american-troops-to- afghan...](https://www.globalresearch.ca/more-american-troops-to-afghanistan- to-keep-the-chinese-out-lithium-and-the-battle-for-afghanistans-mineral- riches-2/5605456)

[http://www.futuredirections.org.au/publication/the-united- st...](http://www.futuredirections.org.au/publication/the-united-states-in- south-asia-the-afghanistan-factor/)

[https://www.nytimes.com/2010/06/14/world/asia/14minerals.htm...](https://www.nytimes.com/2010/06/14/world/asia/14minerals.html)

From the mouth of the beast itself: [https://www.voanews.com/a/afghanistan- trump-mining-lithium/3...](https://www.voanews.com/a/afghanistan-trump-mining- lithium/3798585.html)

<comment><USER31> Those links all just say that there's Li in Afghanistan. Calling it a "conflict mineral" is a particular term of social justice that implies that its extraction is directly related to the exploitation of some local population, not just that there's a putative "conflict" nearby! You just seem to be using the term to argue that people near wars should be economic pariahs who we never trade with. That's harmful, not helpful.

An of course, the overwhelming majority of Lithium production and reserves in the world are in Australia and Chile, which are notably conflict-free.

<comment><USER33> That's a disingenuous reading of "all those links". In the very first link, for example, we have this quote:

> _The existence of this historical data suggests minerals may have been an > underlining factor in the administration's decision-making long before their > official entanglement in the Afghan conflict. That would explain why, mere > weeks after 9 /11, and weeks before the official declaration of war, the > Pentagon was already commissioning geologists to study caves throughout the > country._ ...

> ... _The process began almost immediately. From 2004 to 2006, the USGS > conducted airborne geophysical surveys of the country. This was supplemented > by efforts between 2005 and 2007 to consolidate existing information about > the deposits in tandem with the AGS. What they found shocked even seasoned > geologists, with an internal Pentagon memo from 2007 referring to > Afghanistan as a "Saudi Arabia of Lithium." With peaked interest, > experimental hyperspectral imaging surveys began in 2007. But by the time > Bush's tenure as president was over, those surveys were not yet complete._

<comment><USER31> I'm sorry, where in that quote is someone making the case that we shouldn't trade in Lithium because it's bad for Afghanis? Again, you're making a _very specific_ claim about social justice here and seem to be justifying it with bland pronouncements about Afghanistan. That doesn't fly. Find me someone credible demanding divestment from Afghani Lithium or battery boycotts or something and we'll talk.

But no, I'm not going to just take the word of some rando HN poster that somehow Lithium is to be avoided. Like I said: citation needed.

<comment><USER33> That quote is implying that mineral prospects, notably lithium, were a key consideration in the U.S. decision to _go to war in Afghanistan_. Stick your head in the sand if you'd like. This is an ongoing war that has cost hundreds of thousands of lives. If that's not conflict, I don't know what is.

I didn't say "lithium is to be avoided". I didn't make any prescriptions. My point is that lithium is not renewable and has been of key interest to geopolitical strategists for decades. And yes, it has motivated deadly conflicts. This is only going to heat up as time goes on.

I'm not advocating that anyone "avoid lithium". It's just not a renewable resource and people have fought over it. They will continue to fight over it.

(Afghanistan isn't the only place where people have fought over lithium: [https://www.freetibet.org/lithium-tibet](https://www.freetibet.org/lithium- tibet) )

</comment></comment></comment></comment></comment></comment></comment><comment><USER34> If I wanted to assess my carbon footprint, and the cost to offset, and then pay to actually fund mitigation, how would I do that?

Eg this doesn't seem fully credible, but is responsive [https://www.terrapass.com/product/productindividuals- familie...](https://www.terrapass.com/product/productindividuals-families)

<comment><USER35> I believe you're looking at this the wrong way around. The consensus is that buying carbon offsets only works as the last resort, only after you've taken all of the steps to reduce your output in the first place - fly less, drive less, eat less meat, eat local produce, reduce the amount of products you buy. If you're buying a carbon offset to feel better about your lifestyle, you probably shouldn't bother.

After that, you still need to look into the actual product you're buying into directly and ensure that they're doing what they say they're doing, and that the programs are managed correctly (which is very difficult to do).

In terms of calculating your CO2, [https://www.carbonindependent.org/](https://www.carbonindependent.org/) is pretty good for the UK. I'm not aware of an equivalent for the US though (sorry)

\- [http://theconversation.com/carbon-offsets-can-do-more- enviro...](http://theconversation.com/carbon-offsets-can-do-more- environmental-harm-than-good-26593) \- [https://www.theguardian.com/environment/2011/sep/16/carbon-o...](https://www.theguardian.com/environment/2011/sep/16/carbon- offset-projects-carbon-emissions) \- [https://www.independent.co.uk/life- style/motoring/is-carbon-...](https://www.independent.co.uk/life- style/motoring/is-carbon-offset-an-effective-addition-to-your-green- lifestyle-a7501226.html) \- [https://www.nrdc.org/stories/should-you-buy- carbon-offsets](https://www.nrdc.org/stories/should-you-buy-carbon-offsets) \- [https://www.abc.net.au/news/science/2018-04-11/carbon- offset...](https://www.abc.net.au/news/science/2018-04-11/carbon-offsets- worth-buying-air-travel-tourism-emissions/9638466) \- [https://theenergymix.com/2017/04/25/carbon-offsets-dont- redu...](https://theenergymix.com/2017/04/25/carbon-offsets-dont-reduce- greenhouse-gas-emissions/)

</comment></comment><comment><USER36> This is one of the very few areas where SV traditional 'startup' thing could actually work and make big difference in the energy as well as environmental field. Other might be battery tech but there are too many serious big competitors there with 100 years of experience, and ample self-funding... But CO2 removal producing fuel from electricity is one such field - it's not taken seriously enough by big players who more pretend to be working on it than they are actually working, it's really overlooked, and there are absolutely zero fundamental reasons why it can't work. And it goes hand in hand with renewable energy, to make perfect use of energy overproduced by intermittent sources, straight on site. Solar cells cost almost nothing, but there is lack of transmission capacity, grid is imbalanced, and corrupt permissioning process is hard to navigate through? Just put that thing straight on site and collect the gasoline once a week using a truck.

</comment><comment><USER37> An important point that people are missing is that by capturing carbon directly from the air with electricity we can combine two very important energy systems: electrical and chemical. Going 100% renawable at an accelerated pace is within reach and if we could use all excess power due to intermittency to transform the carbon dioxide and synthesised hydrogen into hydrocarbons we can solve some other problems that are currently unsolvable before 2050 (jet fuels, chemical industry).

Also if we've improved this technology so that the costs are reduced (50$ per ton) we can do proper negative emissions in a scalable way without many downsides (can be used in non-arable land, no water consumption with low temperature direct air capture actually has water as a co-product which we can use for electrolysis). We could then sequester the carbon dioxide underground or even create carbonates out of them so we can store them safely in concrete or asphalt in the form of aggregates.

</comment><comment><USER38> Converting carbon dioxide into hydrocarbons consumes energy. If the product is simply burned for fuel, I can see no benefit to this effort at all. Energy will have been consumed and carbon will be re-released.

What am I missing here? All I can see is a battery in the form of gasoline. And its efficiency remains to be seen - assuming the process actually works and can scale.

<comment><USER39> That's exactly the point, we could keep using existing planes, trains, cars, ships, trucks, etc. without releasing new carbon.

Electric cars are just now practical and available for most people, but without radically improved battery tech we can't make practical electric airlines for example.

Plus, it makes carbon capture tech cheaper.

<comment><USER38> In that case, carbon capture to produce organic chemical feedstocks makes a lot more sense than burning for fuel. Given that there's no information about what the process entails, it's hard to draw many conclusions.

</comment></comment></comment><comment><USER40> I'm curious as to why Prometheus are pursuing air-based carbon sequestration rather than seawater, which apears far more efficient based on USNRL research.

The concept itself of fuel synthesis is exciting and well-established, if publicly obscure, dating to the early 1960s, and being based on even older industrial-scale WWII technology.

[http://www.dtic.mil/get-tr-doc/pdf?AD=ADA539765](http://www.dtic.mil/get-tr- doc/pdf?AD=ADA539765)

Robin Paul Bushore, "Synthetic Fuel Generation Capabilities of Nuclear Power Plants with Applications to Naval Ship Technology", 1977

[https://calhoun.nps.edu/public/bitstream/handle/10945/18307/...](https://calhoun.nps.edu/public/bitstream/handle/10945/18307/syntheticfuelgen00bush.pdf?sequence=1)

John Michael Galle-Bishop, "Nuclear Tanker Producing Liquid Fuels From Air and Water", 2011

[http://dspace.mit.edu/bitstream/handle/1721.1/76359/82393200...](http://dspace.mit.edu/bitstream/handle/1721.1/76359/823932001.pdf?sequence=1)

Steinberg, M., and Beller, M., "Liquid Fuel Synthesis Using Nuclear Power in a Mobile Energy Depot System," Transactions of the American Nuclear Society, Vol. 8, pg 159, June 1965.

Additional references:

[https://old.reddit.com/r/dredmorbius/comments/28nqoz/electri...](https://old.reddit.com/r/dredmorbius/comments/28nqoz/electrical_fuel_synthesis_from_seawater_older/)

Discussion of Heather Willauer, et al, US Navy Research Lab studies:

[https://old.reddit.com/r/dredmorbius/comments/22k71x/us_navy...](https://old.reddit.com/r/dredmorbius/comments/22k71x/us_navy_electricitytofuel_synthesis_papers_and/)

And a number of further past mentions:

[https://old.reddit.com/r/dredmorbius/search?q=fischer- tropsc...](https://old.reddit.com/r/dredmorbius/search?q=fischer- tropsch+fuel+synthesis&restrict_sr=on)

</comment><comment><USER41> I strongly suspect that manufacturing hydrocarbon fuel out of air, water, and electricity is going to be a pretty significant part of the fight against climate change.

The reason is fundamentally political. Newly industrialized countries have a lot of vital economic activity dependent on internal combustion engines, and cannot afford the luxury of replacing them with alternatives. The West does not have the political will and power to worsen starvation in India in order to lower the CO2 emissions caused by engines manufactured and used in India. It's a lot more feasible to subsidize carbon-neutral fuel generation schemes until it's cost competitive for Indian consumers.

In other words, this kind of scheme can be used to essentially ship CO2 emission reductions from one country to another. It replaces a wicked problem with complex political and social components to a mere application of staggering sums of money and resources.

<comment><USER4> >I strongly suspect that manufacturing hydrocarbon fuel out of air, water, and electricity

If you already have electricity, that is all the energy you need. There is no need to use it to produce a toxic, polluting fuel that is used in highly inefficient internal combustion engines. Simply use electric motors, which are way more efficient.

<comment><USER42> > If you already have electricity, that is all the energy you need

If you can store and transport it better than gasoline can be stored and transported, which ... so far you can't.

<comment><USER43> Why not just build electric trains?

<comment><USER40> That is problematic in areas, including much of North America.

[http://energyskeptic.com/2016/electrification-of-freight- rai...](http://energyskeptic.com/2016/electrification-of-freight-rail/)

</comment></comment></comment></comment></comment><comment><USER44> The $3.00/gallon price doesn't pass the sniff test, please tell me what I'm missing:

1 gallon of gas is 33kwh of energy

1 kwh of electricity, wholesale in the US, is approx 3-8 cents or higher, so 1.65-4.4$/GEG of electricity

CO2 to gas process efficiency electrochemical would be optimistic at 60%

CO2 sequestration from air costs 40-120$/tonne, optimistically estimated from not-yet industrially available technology. That scales by approximately 44/14 or 3x (weight CO2 to CH2) so 120-360$/tonne gasoline. At approx 2.8kg/gal (350 gal/tonne) that is an additional 0.34-1.02$/gal.

So before research amortization, capital, operations, maintenance, transport, and profit I'm seeing an optimistic best-case of a >2$/GEG production cost.

This is of course assuming they can actually do what they are claiming. And that they can do it at scale, at meaningful throughput, and with process stability.

</comment><comment><USER45> Prometheus, who made humans from clay, and them gave humans fire because he felt compassion for them.

So, named after nothing less than the creator of humans and origin of civilization.

PS: As a punishment for giving fire to humans, Prometheus was chained to a mountain and had his liver picked out by an eagle every day, until Heracles rescued him.

</comment><comment><USER46> that entire article can be reduced to "nanotubes"

since its a YC company though maybe we could get the underlying story?

<comment><USER7> Hi, this is Rob, Founder of Prometheus. There is more info on the podcast that accompanied the print piece here: [https://megaphone.link/BLM3585271197](https://megaphone.link/BLM3585271197)

I'm also working on a HN launch summary that will fill in more details.

<comment><USER46> hi rob, thanks for responding.

unfortunately i sat through that 20 minute podcast and the only thing i learned was $3/gal is your estimate and that the machine has not yet worked. nothing about nanotubes or any attempt at a claim at what the innovation is here.

looking forward to that launch summary

</comment></comment></comment><comment><USER47> To me the main lack is why put these machines where the carbon is scarce vs abundant? Eg: My back yard has something like 411PPM [1] but a coal plan flue, i assume, has a very much larger PPM.

IMO it's analogous to solar panels in Canada where the sun is 1/2 the strength of other parts of the planet [2]

[1]: [https://www.co2.earth/](https://www.co2.earth/) [2]: [https://en.wikipedia.org/wiki/Solar_irradiance#/media/File:G...](https://en.wikipedia.org/wiki/Solar_irradiance#/media/File:Global_Map_of_Global_Horizontal_Radiation.png)

</comment><comment><USER48> This will be nice for legacy cars, but I would prefer my Tesla to pretty much any ICE car. Even if it was running on solar powered gasoline. The quiet, the torque, the instantaneous acceleration.

<comment><USER49> Bragging about your luxury car that costs more than my home wins you no friends, and is not even on topic.

<comment><USER48> My car cost 45,000 and it's not off topic. My point is that even if you make gasoline carbon neutral internal combustion cars are going to become obsolete. Electric is going to take over.

</comment></comment></comment><comment><USER50> Any carbon capture technology, will require infrastructure and components (which release carbon during manufacture), and use energy (no emissions if using renewable fuel). Any analysis ought to take the cumulative total of all the emissions produced during the lifetime of the product vs. the carbon captured.

Nature has already given us the most efficient, cheap form of carbon capture. Trees.

I hope there will be startups that extract and make fuel / energy from plants.

<comment><USER40> Moreso than trees: marshes, swamps, and bogs. Wetlands.

</comment></comment><comment><USER51> Is this more efficient and different compared to biofuel production using corn?

Both convert carbon in the air to carbon in a liquid fuel. Biofuels require the production of fertilizers etc. This membrane would require some energy source. The membrane would have to consume less energy than corn fertilizer / unit fuel produced to be effective.

I wonder how this is less a gimmick compared to biofuel.

<comment><USER40> Vastly, and more scalable to boot.

</comment></comment><comment><USER52> I think the most cost effective non dream pipe one we have is that one lady is doing, genetically altering plants to suck in more carbon.

This and the combination of planting more trees seems much more feasible, assuming you use fertilizer that doesn't harm the environment even more.

</comment><comment><USER53> The only serious solution to climate change is leaving carbon fossil in the ground. You are trying to create an incentive to have even more CO2 in the air just for the sake of profit.

</comment><comment><USER54> Wouldn't it make more sense to pull the CO2 directly out of the exhaust pipe, because the concentration is higher there?

<comment><USER55> Because you'd need additional tanks and pipe work. And you'd add additional back pressure to the engine which would decrease the efficiency of the engine and only get worse as the tank filled.

</comment></comment><comment><USER56> Curious. Why not focusing on extracting more gas from low-quality crude oil? This would save much more.

<comment><USER40> Net zero carbon emissions.

</comment></comment><comment><USER57> Anyone explain how this works in regards to the laws of thermodynamics?

<comment><USER58> Use energy to assembly long complex molecules.

Rapidly oxidize said molecules releasing most of that energy.

Capture some of the energy released and turn it into mechanical power.

It's no different than any other carbon based energy source. The real question comes down to the efficiency and economics of each of the various steps.

</comment></comment><comment><USER59> As if the world doesn't have enough pollution

</comment><comment><USER60> What is the difference to what a tree would do?

<comment><USER61> Did you mean to ask this in the currently #1 thread that links here?

</comment></comment><comment><USER62> Thunderf00t will debunk it. ;)

</comment><comment><USER63> To remove CO2 from the air, plant trees. Use the result as building materials. Develop hardier trees that can grow in areas now inhospitable to trees.

Besides, trees are nice. They're solar-powered, too.

</comment><comment><USER64> Maybe y'all try to make lectrity outta thin air.

<comment><USER65> You mean like wind turbines do?

</comment></comment><comment><USER66> Likely a lot easier to make gasoline out of:

(1) Crude oil.

(2) Coal, water, and electric power.

(3) Some biological reactions.

To address the _hidden agenda_ here, see

[https://www.youtube.com/watch?v=52Mx0_8YEtg](https://www.youtube.com/watch?v=52Mx0_8YEtg)

<comment><USER7> Hi Graycat, it actually may be easier to make fuel by mining air. We used to make fertilizer by mining guano and collecting animal droppings, but once Haber and Bosch figured out how to make ammonia from atmospheric N2, it just make more economic and practical sense. It's hard to mine oil, transport it, refine it, etc. Compare that to making it where and when you need it with no waste. I think it will be better.

<comment><USER67> As soon as PV is cheap enough, lots of fleets will convert to liquid anhydrous ammonia. Sure it's different than petrol/diesel, but it's already in wide use as a fertilizer and no technological breakthroughs are required to get it burning in ICEs. It's not yet economical but if PV keeps getting cheaper it will be. So it seems like the effort described in TFA is barking up the wrong tree?

<comment><USER66> Ammonia? WOW! As at

[https://en.wikipedia.org/wiki/Ammonia#Combustion](https://en.wikipedia.org/wiki/Ammonia#Combustion)

4 NH3 + 3 O2 → 2 N2 + 6 H2O

The stuff is darned dangerous, quite challenging to handle, highly regulated due to the dangers, with lots of potential for toxicity, and likely close to ammonium nitrate, one heck of an explosive, etc., but a little arithmetic might show some astounding energy per gallon.

If it has a lot of potential, then I'd wonder why it has not been used in military piston/jet engines.

I would guess that a little too much O2 would give off nitric acid, etc.

<comment><USER67> Sure there are issues but a lot of infrastructure and regulations already exist for dealing with this fuel. And it completely eliminates the problems with hydrocarbons: no greenhouse, exhaust is harmless, with cheap enough power it can be made literally anywhere. A lot of the problems with ammonia are easily dealt with in a fleet situation. People can be trained to safely refuel, you can have a centralized solar-NH3 production facility, etc.</comment></comment></comment></comment></comment>


ITunes Instant Manifesto - <AUTHOR> http://blog.stephenou.com/post/1114020526/itunes-instant

<comment><USER2> Would it ever be possible to do an App Store Instant? And an iBookstore Instant? Wow, are those two needed!

Thanks for designing it so that it works with Opera!</comment>


Show HN: Human-to-dog translator in the browser, via Tensorflow to Webassembly - <AUTHOR> https://humantoanimal.com <comment><USER2> I'd like to see it in action with a pre-loaded video, instead of uploading my own or giving you access to my webcam just to see it work.

</comment><comment><USER3> Title buries the lede! The coolest part of this is compiling tensorflow to webassembly. Awesome! Are you planning to open source the toolchain when it's ready?

<comment><AUTHOR> Thanks! I plan on releasing it in some form which will allow others to do it too, but I don't know that it will be as simple as adding a _\--to- webassembly_ flag and having it just work — there's still lots of fiddly custom bits.

<comment><USER3> That's the beauty of open source :) push what you've got with all its problems and let the community work on iterative improvements</comment></comment></comment>


Ask HN: Learning to Sing - <AUTHOR> I want to try to learn how to sing. I might try recording myself (sort of copywork) and try to use my own ear to better my singing patterns.
I think having a theory book might be useful; is there any book/resource that will incorporate 80/20 principle?
Offline resource (institute, etc.) is fine, as long as it is considered most effective. <comment><USER2> Get a teacher. Hands down the quickest way to improve and to find out where you need improvement. Even a single hour long lesson with a decent teacher will help you set off in the right direction.

Good luck!</comment>


Brutal Conditions In Amazon's Warehouses Threaten To Ruin The Company's Image - <AUTHOR> http://www.businessinsider.com/brutal-conditions-in-amazons-warehouses-2013-8

<comment><AUTHOR> If you can read german, this one is more in-depth and is even more horrifying: [http://www.monde-diplomatique.de/pm/2013/11/08/a0001.text](http://www.monde- diplomatique.de/pm/2013/11/08/a0001.text)

</comment><comment><USER2> but the company image is a company that provides me something for as cheap as possible, sometimes at ludicrously cheap prices.</comment>


The Most Expensive Lesson of My Life: Details of SIM Port Hack - <AUTHOR> https://medium.com/coinmonks/the-most-expensive-lesson-of-my-life-details-of-sim-port-hack-35de11517124 <comment><USER2> The one recommendation: Reduce Your Online Footprint, is in my opinion most important. I am nearing retirement (from a computer security job) and will be reducing my online footprint entirely. I'll go to the bank, use checks, no more online accounts for me.

</comment><comment><USER3> [https://news.ycombinator.com/item?id=19964089](https://news.ycombinator.com/item?id=19964089)

</comment><comment><USER4> Wait, how did they get his SIM in the first place?</comment>


Show HN: live map infographic of activity in Couple using Canvas and WebSockets - <AUTHOR> https://map.couple.me

<comment><AUTHOR> We're planning to do a larger tech focused write-up on this infographic soon. On the backend it's powered by Node and Redis and runs within an EC2 auto scaling group.</comment>


Most Hackers Aren't Criminals - <AUTHOR> https://www.nytimes.com/2019/11/07/opinion/hackers-hacking.html <comment><USER2> The term "hacker" is losing ground, wonder if this person has any chance og wrestling it back.

The original term "Hacker" has been (irrevocably?) twisted to the domain of "security" and "intrusion".

Hacker News is not about this type of hacker, I wonder if "hacker" is more formally defined somewhere on the site.

The older more meaningful definition is described here:

[https://stallman.org/articles/on- hacking.html](https://stallman.org/articles/on-hacking.html)

and at length in this book:

[https://en.wikipedia.org/wiki/Hackers:_Heroes_of_the_Compute...](https://en.wikipedia.org/wiki/Hackers:_Heroes_of_the_Computer_Revolution)</comment>


The Defold engine code style - <AUTHOR> https://defold.com/2020/05/31/The-Defold-engine-code-style/ <comment><USER2> > Someone once told me that pointers are dangerous, and I frankly don't > understand that.

Lack of ownership is one of the dangerous things. As, I see on the article itself "Not only that each weak_ptr.lock() was very expensive, it was also symptom of unclear ownership of the data."

Smart pointers are good at declaring memory ownership.

> All those tiny allocations that the stl containers made, were like a death > by a thousand needles.

A possible solution is the use of custom allocators.

> until they were replaced with something more fitting for the tasks.

This comment is key. Too often I have seen C++ developers critical of classes, STL, and other C++ features because engine Y or Z does not use them when are actually the best option for a particular project.

I appreciate that the comment is present.

> Often you hear people say that writing your own containers would introduce > bugs, and that you should stick with stl. I find this problematic, since > this is coming from engineers that should know quite well how to write an > array/hashtable container.

But, this is quite a stupid comment. E.g : [https://forum.defold.com/t/scaling-collision-object-when- gam...](https://forum.defold.com/t/scaling-collision-object-when-game-object- is-scaled-def-521/547)

That children objects need to scale with its parent is something that all engines do, but, I have had to fix this kind of scaling in the past in a custom version of the Irrlicht engine.

Should engineers know better. Maybe, but good engineers understand that errors may happen and put the needed measures to avoid or mitigate them. A useful one is to use already proven code.

Was an error in their custom made containers what caused the error in scaling when looping over the object children? We will never know.

<comment><USER3> Am I mistaken in thinking that the issue was scaling not supported by the box2d physics library and that they needed a custom workaround in their engine?

<comment><USER4> You are not mistaken (if I remember correctly, full disclosure; I used to be an engine dev on Defold).

Not sure why Hokusai tried to point to that forum thread in this case, which shouldn't have anything to do at all with his comment? I guess, we will never know. :)

</comment></comment></comment><comment><USER5> Many of these feel like throwing the baby out with the bathwater, where, out of fear of misuse, tools are thrown away.

For example, while `std::string` does have issues, number of allocations more indicative of poor usage than an issue with the class itself.

Other design choices are fine per se, but the reasons given are strange:

> And, since we don't use classes or inheritance, we don't have any need for > RTTI.

> It also has another benefit; since all data is already verified to be ok by > the data pipeline, you don't need C++ exceptions in the engine.

Tons of projects (Chrome and Firefox to name two) build without RTTI or exceptions, but with extensive classes, extensive inheritance, and extraordinarily extensive validation code.

Many of these issues may be due to the age of the project, as much of the thinking seems, indeed, to be stuck about 10 years in the past. It does not match my experience with modern C++ in similar fields.

<comment><USER6> Std::string half of all allocations in the Chrome browser process (2014) [0]

The key difference is that web browsers support a highly arbitrary and mutable dataset. A game engine's assets exist in a mostly-static space. The things that are allocated at runtime are things that should have a known maximum, because going over that maximum will start to overrun latency targets. Many assets are streamed, but still hit a certain size and bandwidth budget, and so are still "basically static" \- some degree of compilation and configuration at runtime always takes place for rendering features. The genuinely mutable part of game state while playing is in a comparatively confined space, and that allows a lot to be pushed to build time, where it's easier to validate and to maintain.

The features that change this picture are editors and arbitrary data imports. Web browsers are all about these two things. When you click a link the document may load thousands of gigantic images, and I might try to copy-paste the entire contents of Wikipedia into a text box. The engineering requirements are much broader as a consequence, and there are more rationales to need genuine "black box" interfaces supporting a complex protocol, as opposed to a static "calling function switches on a specified enum" approach, which is sufficient for almost every dynamic behavior encountered in game engines.

[0] [https://news.ycombinator.com/item?id=8704318](https://news.ycombinator.com/item?id=8704318)</comment></comment>


Some Were Meant for C [pdf] - <AUTHOR> https://www.cl.cam.ac.uk/%7Esrk31/research/papers/kell17some-preprint.pdf <comment><USER2> [https://news.ycombinator.com/item?id=15179188](https://news.ycombinator.com/item?id=15179188)</comment>


Former UAL Pilot, talks about Korean Flight Training that will surprise you - <AUTHOR> http://www.reddit.com/r/flying/comments/1hz2hc/former_ual_pilot_talks_about_korean_flight/

<comment><USER2> This is terrifying to read.</comment>


Look at the humongous type that Hindley-Milner infers for this tiny program - <AUTHOR> http://spacemanaki.com/blog/2014/08/04/Just-LOOK-at-the-humongous-type/ <comment><USER3> Perhaps an easier example is to do this in GHCi:

        let x = id id id id id id id id id id id id id id id id id id id id id id id id

See how long that takes (add ids if your machine can take it). To deduce a type for x, ghci will use 2^k type variables, if you have k ids. This is easily seen by induction:

If k = 1, then the type of x is a -> a. This takes 2 = 2^1 = 2^k variables. If k > 1, it is of the form id f. Let t be the type of f. t has 2^{k - 1} variables, by induction. Thus the outermost id must take something of type t (this is 2^{k - 1} variables) and produce something of that same type t (this is another 2^{k - 1} variables), that is, it's of type t -> t. 2^{k - 1} + 2^{k - 1} = 2^k.

Note that this information is purely at compile time. Haskell isn't typed at runtime, this is all just to check types. At runtime, x is a no-op, as expected.

<comment><USER4> I used to be able to kill Scala compiler performance with just a a few identifiers. Well, Scala is trying to deal with nominal subtyping, which is well known to be quite hard (so the type inference algorithm isn't really H-M, and must rely on heuristics).

<comment><USER5> > I used to be able to kill Scala compiler performance with just a a few > identifiers

Interesting, got an example? Also, what version of Scala were you on?

<comment><USER4> This was in 2006/7 when I was working on scalac, so the early 2.1/2.2 days. I seemed to often push the type system in places that were not well defined, mostly because my scala style was so different (very OO, but with heavy recursive use of type parameters). Unfortunately, I've forgotten what the cases were, but they were usually simple constructions.

<comment><USER5> heh, ok, the stone ages of Scala ;-)

Current Scala (2.11) has many issues to be ironed out, but I'd be surprised if the topic at hand here were one of them.

</comment></comment></comment></comment></comment><comment><USER6> The title's a little misleading, as it suggests that there's something strange or even wrong about the type that OCaml or Haskell infer for the program. Of course the type that these systems infer for the program is correct, and the author does demonstrate an understanding of that. But that a small input to a system can produce a large output should be little surprise to any person that works with complex systems, especially computer systems.

The underlying mechanism that leads to the computational complexity in HM(x) systems--the process of generalizing types to schemas and instantiating schemas to types in order to support let-polymorphism--would make for an interesting discussion, but the author hasn't hit on that yet. Unfortunately, the only people that really understand that part of the algorithm are the people that have implemented the algorithm, and there aren't many of those people around. Strange but true. The algorithm that's taught and implemented in most undergraduate PL courses (PL:AI-based courses included) does not support let-polymorphism. If the author's reading, upgrade to ATTAPL[0] and start implementing.

Also, to answer the question "How to compile Turing machines to ML types", have a look at typo[1] for one way to do it in Haskell (by reducing it to lambda calculus (shameless plug)).

[0]: [http://www.cis.upenn.edu/~bcpierce/attapl/](http://www.cis.upenn.edu/~bcpierce/attapl/)

[1]: [https://github.com/seliopou/typo](https://github.com/seliopou/typo)

<comment><USER7> I think that this is my new favourite esolang. Type-level naturals ([http://www.haskell.org/haskellwiki/Type_arithmetic](http://www.haskell.org/haskellwiki/Type_arithmetic)), eat your heart out! What was your inspiration for making this?

By the way, sorry for a "useless use of cat" ([http://en.wikipedia.org/wiki/Cat_%28Unix%29#Useless_use_of_c...](http://en.wikipedia.org/wiki/Cat_%28Unix%29#Useless_use_of_cat)) nit-pick, but note that

        $ cat examples/fac.typo | typo

should probably be

        $ typo < examples/fac.typo

<comment><USER6> Thanks! Typo made it HN last summer, so here's a response to your question on motivation[0]. Also, the 'cat' thing has come up before. Here's my response to that[1] as well. But now that I'm rereading my response it doesn't seem clear what I mean. The README for the language demonstrates how you can use shell grouping as a poor man's module system. When you do that, you have to use 'cat' on single files in certain situations. So I stuck with 'cat' for the simple example so it's consistent with the more complex examples. If you take a look at the typo script[2] that wraps the compiler, you'll see that I know when to use redirects and when to use 'cat'. But regardless of all that, I think most modern machines can spare an extra process.

[0]: [https://news.ycombinator.com/item?id=6176340](https://news.ycombinator.com/item?id=6176340)

[1]: [https://github.com/seliopou/typo/pull/4](https://github.com/seliopou/typo/pull/4)

[2]: [https://github.com/seliopou/typo/blob/cc64ec38603a50c6543b38...](https://github.com/seliopou/typo/blob/cc64ec38603a50c6543b3834d47b4ff0431c2b3e/typo#L14)

<comment><USER7> Thanks for the helpful reply. By the way, I didn't mean to suggest that you didn't know when to use `cat` vs. re-directs; I just thought it might have been an oversight. I'm sorry if it came across as rude.

</comment></comment></comment></comment><comment><USER8> What about this example?

        f0 x = (x,x)
        f1 x = f0 (f0 x)
        f2 x = f1 (f1 x)
        f3 x = f2 (f2 x)
        f4 x = f3 (f3 x)

This is worse than O(c^n): the size of the last function's type is O(2^2^n).

(In spacemanaki's blog example, each new expression doubles the size of the previous one. Here, each new expression _squares_ the size. f4 builds 2^2^4 = 65,536 copies of 'x', and f5 will crash your compiler if you define it).

<comment><USER9> O(2^2^n) = O(4^n) = O(c^n) ; O(2^3^n) = O(8^n) = O(c^n) ; ...

<comment><USER10> I think grandparent meant 2^(2^n), not (2^2)^n.

<comment><USER11> Even so, O(4^n) != O(8^n); there is no constant k such that k * 4^n >= 8^n.

</comment></comment></comment></comment><comment><USER12> This is a fantastic post. I'm passingly familiar with ML and have heard the term "let polymorphism" a number of times, but this is the first time I've seen it clearly explained.

<comment><USER13> Thanks, that's very flattering as I've been a long time fan of your blog!

</comment></comment><comment><USER14> > Why can't we just allow polymorphic lambda-bound variables?

Two reasons. The first is that in general, type inference for higher-rank polymorphism is undecidable. The second is that even if it were decidable, it would be impractical - I think that if we have a program like this one:

      let test(f) = (f(1), f(true))

the assumption that the programmer made an error is statistically much more likely than the assumption that `f` should have a polymorphic type. Another reason is that it's not entirely clear what kind of polymorphic type to infer for `f` - should it be `forall a. a -> a` or e.g. `forall a. a -> int`?

> What does this have to do with different "ranks" of polymorphism?

Higher-rank polymorphism means that polymorphic types can appear _within_ other types; in a system with support for higher-rank polymorphic types, the parameter `f` in the function `test` above could be declared with type `forall a. a -> a`, the function `test` would have a type `(forall a. a -> a) -> int * bool`. Higher-rank polymorphism is formalized using System F, and there are a few implementations of (incomplete, but decidable) type inference for it - <USER2> e.g. Daan Leijen's research page [1] about it, or my experimental implementation [2] of one of his papers. Higher-rank types also have some limited support in OCaml and Haskell.

> How is let-polymorphism implemented? How do you implement it without just > copying code around?

The "standard" implementation consists of two operations, _generalization_ and _instantiation_. At let bindings, types are _generalized_ by replacing all unbound type variables with polymorphic type variables (care must be taken not to generalize type variables that can be bound later, but that's a secondary issue here). Every time a variable with a polymorphic type is used, its type is _instantiated_ , which means that all polymorphic type variables are replaced with fresh unbound type variables.

      let f = fun x -> (x, x)

      print f(1), f("boo")

In the example above, the type inferred for `fun x -> (x, x)` is `_a -> _a * _a`, where `_a` is an unbound (but not polymorphic) type variable. At let binding, this type is transformed into `forall a. a -> a * a` by replacing `_a` with a polymorphic type variable `a` (in most ML languages, the `forall` is implicit). Then, when `f` is used in `f(1)`, its type is instantiated into `_b -> _b * _b` and `_b` is unified with the type of `1`, `int`. When `f` is used in `f("boo")`, its type is instantiated into `_c -> _c * _c`, and `_c` is unified with type of `"boo"`, `string`. Since `_b` and `_c` are different variables, there is no error here (if `f` had a monomorphic type, `_b` and `_c` would in fact be the same, and this example would result in an error "cannot unify type int with type string").

> What's the relationship between let enabling exponential function > composition and the exponential time result?

So there is quite a bit of copying happening every time a variable with polymorphic type is used. I've never studied the worst-case scenarios of Hindley-Milner, but I imagine that it has to do with instantiation copying large polymorphic types around.

> Do implementations of Hindley-Milner actually represent types as dags and > utilize structural sharing?

Yes; an unbound type variable is typically represented as a reference cell, which is assigned to the type the type variable is unified with. So, if we have

      double : forall a. a -> a * a

      double (1, 1, 1) : (int * int * int) * (int * int * int)

then the type of double is first instantiated, yielding `_b -> _b * _b`, and then the type of the parameter is unified with the type of the argument, `int * int * int`. At this point, the reference cell in the internal representation of `_b` is updated to point to `int * int * int`, which means that both `_b` in the result type actually point to the same representation of `int * int * int`.

[1] [http://research.microsoft.com/en- us/projects/fcp/](http://research.microsoft.com/en-us/projects/fcp/)

[2] [https://github.com/tomprimozic/type- systems/tree/master/firs...](https://github.com/tomprimozic/type- systems/tree/master/first_class_polymorphism)

<comment><USER15> _Another reason is that it 's not entirely clear what kind of polymorphic type to infer for `f`_

How about forall a. a -> b ? If we make assumption that f _is_ polymorphic, then nothing can be inferred about the return value, so it should also be polymorphic?

<comment><USER14> Let's instead talk about the type of `test`. It could be one of these:

      test : (forall a. a -> a) -> int * bool
      test : forall b. (forall a. a -> b) -> b * b
      test : (forall a b. a -> b) -> (forall c d. c * d)

The first case is the most "obvious" one with polymorphic types, the one that I described above.

The second is the one that I hinted at, but I used less general type `(forall a. a -> int) -> int * int`, i.e. instantiating `b` with `int`. The second type above is a more general one, as it could be instantiated into other types such as `(forall a. a -> bool) -> bool * bool` as well, but this is the standard first-rank HM polymorphism.

The third type above is the type that would be inferred if `f` had different polymorphic type variables as parameter and return types. However, there are no values that have the type `forall a. a`, so a function with type `forall a b. a -> b` either (1) cannot return (i.e. diverges or raises an exception) or (2) is a dynamic _cast_ function, i.e. a hack (`Obj.magic` is an example of such a function, but using it is "dangerous" in the sense that it bypasses the type system and so might result in undefined behavior at runtime). Disregarding case (2), the function `test` would also not return, so it's equivalent to say that it's type would be

      test : forall c. (forall a b. a -> b) -> c

and as such, it would be pretty useless.

<comment><USER16> Not sure why "test : forall b. (forall a. a -> b) -> b * b" is "the standard first-rank HM polymorphism". The first comment implied "test" is a type error in HM, typed as "forall a b. (a -> b) -> b * b", which fails to unify a with both int and bool.

Based on the principle of least privilege, "test : forall b. (forall a. a -> b) -> b * b" feels the right type. Only the body of test feeds a to the first argument, so forall a is scoped to the first argument, whereas the caller of test needs to consume b, so we scope forall b to the whole expression.

<comment><USER14> What I meant is that going between `forall b. (forall a. a -> b) -> b * b` and `(forall a. a -> int) -> int * int` is something that is possible in standard HM (i.e. if we consider the `forall a. a -> ...` part as opaque to HM).

I guess you're right, the "least polymorphism" we need to add to make `test` pass the type checking is to make just the argument of `f` polymorphic... However, in standard HM without any hacks/dynamic types, a function with the type `forall a. a -> b` for some fixed `b` can't really do anything useful with its parameter - it can't inspect it, it can only wrap it up in a data structure, but it can't return the data structure, unless the type of the parameter is wrapped in an existential type (but unwrapping it, there is still nothing to be done with it...).

<comment><USER16> Great example, it now clicks. We lifted b all the way up because it needs to be consumed by the caller, might as well lift a as well, as types with free variables, like b in "forall a.a -> b", are useless. Which looks a lot like let-polymorphism :)

</comment></comment></comment></comment></comment></comment><comment><USER17> Somewhat related: [http://en.wikipedia.org/wiki/Billion_laughs](http://en.wikipedia.org/wiki/Billion_laughs)

</comment><comment><USER18> If you're busy, just read the original Stack Overflow Q&A: [http://stackoverflow.com/questions/22060592/](http://stackoverflow.com/questions/22060592/). It's 1/20th the size of the blog post and I got all I needed out of it.

</comment><comment><USER19> I've found the following: [http://okmij.org/ftp/Haskell/AlgorithmsH.html#teval](http://okmij.org/ftp/Haskell/AlgorithmsH.html#teval)

to be very useful for understanding how the HM type algorithm works.

They rephrase the problem as "writing an expression interpreter" for your program that recursively evaluates the abstract types of each expression instead of the concrete value.

I found this to be a very intuitive way to understand it.

It also then makes it easier to see why some "type inference" algorithms might guarantee to terminate while others might run forever: the more complicated your type system, the less abstract the "type values" are. They become like actual "values", and the behaviour becomes closer to the actual running of the program, which may not terminate.

</comment><comment><USER20> Fascinating behavior. Since this is an edge, would it ever occur in human- written code? Could there be a situation where a computer would end up generating such code?

<comment><USER13> It's unlikely to occur as the type is exponential in size and thus quite unwieldy to do anything with! I haven't worked with generated ML or Haskell code, but I still think it's unlikely to be an issue in "real" code.

<comment><USER21> It's rarely a compile-time performance issue because O(2^N) algorithms perform well on modern hardware when N ~= 3. You could nest the `double` example from the article 6 times and it would still only be a 64x slowdown.

Where it does show up, annoyingly, is in error messages. You actually see this all the time with GCC's STL error messages (C++ templates provide a parameterized type system very similar to Haskell or ML, but without the inference, at least until C++11). STL containers are usually parameterized not only over the key and value, but over the comparator and allocator. Nest a couple of them and you suddenly have a type with several dozen variables. GCC expands the whole type out, without typedefs, when printing error messages, which means that you will sometimes get compile errors that are 10 pages long. Clang fixes this by preserving the typedefs, without which you wouldn't want to write such a type. Haskell has the same problem, except worse because it infers types, but GHC has gone to great pains to format error messages so they are at least readable if verbose.

</comment></comment></comment><comment><USER22> Actually, there's some use case for these things: you can simulate varargs, and yes the compilation time can be made arbitrary large: [https://gist.github.com/toolslive/5957292](https://gist.github.com/toolslive/5957292)

      $> time ocamlc vararg.ml
      real    1m9.372s
      user    1m9.264s
      sys     0m0.044s

Try adding a few a's and see what that gives.

<comment><USER13> Thanks for pointing that out! I hadn't made the connection and now I've got another reason to figure out how fold works (have yet to wade through all of [http://mlton.org/Fold](http://mlton.org/Fold))

</comment></comment><comment><USER23> question: anyone know of where the pronunciation of "!" to be "bang" came from? I always called these exclamation points but see a lot of programmers calling them "bangs." anyone?

<comment><USER24> Well, they are exclamation points. But for many punctuation characters, there's a hacker nickname (or more than one). I've heard of "bang" for "!", "hook" for "?", and "shriek" or "splat" for "#".

The Jargon File has more detail: [http://www.catb.org/jargon/html/B/bang.html](http://www.catb.org/jargon/html/B/bang.html)

<comment><USER25> My favorite of these: I've worked with a few people who used "huh" for the coffeescript `?` operator.

<comment><USER17> While I haven't seen anyone actually use this pronunciation I'd consider 'p', short for predicate, a fairly logical way of pronouncing '?'.

If nothing else, it's LISPy in origin at least. Without actually being inherent to LISP. For example, with a ternary operator:

var adult = (age > 18) ? true : false;

Pronounced: 'adult' equals (age greater than 18) p true else false.

</comment></comment></comment></comment><comment><USER26> That sub title is hilarious.

<comment><USER27> This little program walked out on stage. What it did next blew the compiler away.

</comment></comment><comment><USER28> Compilers hate him! Find out this one simple program....

<comment><USER7> Indeed, that is already (essentially) the subtitle of the article.

<comment><USER28> Well, I look like an idiot.. I read the whole article and then came back to the comments and it popped into my mind. Which was apparently just me remembering it.

[http://i.imgur.com/Uwysayc.png](http://i.imgur.com/Uwysayc.png)

<comment><USER7> Now that is a classy _mea culpa_!

</comment></comment></comment></comment><comment><USER29> English called, they are running out of exclamation points.

<comment><USER30> This talk was submitted to a conference which literally requires exclamation points to be in the title. So that's where they come from.</comment></comment>


Scott Johnson: No Hangouts Shutdown Date; Transition to Hangouts Chat and Meet - <AUTHOR> https://www.androidpolice.com/2018/12/01/hangouts-executive-rebuts-rumors-of-shut-down-users-will-be-transitioned-to-hangouts-chat-and-meet/ <comment><AUTHOR> Title shortened due to character limit. Original title from Android Police article:

> _" Hangouts executive rebuts rumors of shut down, users will be transitioned > to Hangouts Chat and Meet"_

Scott Johnson is "director of product management and realtime comms product lead for G Suite (i.e., the guy who runs Hangouts at Google)". His tweet:

[https://twitter.com/happyinwater/status/1068861340800958466](https://twitter.com/happyinwater/status/1068861340800958466)

> _[https://9to5google.com/2018/12/01/google-hangouts- > shutting-d...](https://9to5google.com/2018/12/01/google-hangouts-shutting- > down/)

> Hey @hallstephenj, I run Hangouts and this is pretty shoddy reporting. No > decisions made about when Hangouts will be shut down. Hangouts users will be > upgraded to Hangouts Chat and Hangouts Meet. Your source is severely > misinformed. You can do better._

Previous frontpage discussion of the 9to5Google rumor: [https://news.ycombinator.com/item?id=18572510](https://news.ycombinator.com/item?id=18572510)</comment>


Banking industry to lose 200,000 jobs - <AUTHOR> http://money.cnn.com/2008/04/01/news/companies/banking_jobs.ap/

<comment><USER2> It seem like the dot com bust, but this time is banking and finance people that are going to loose jobs. Most likeley a lot of these jobs wont come back for a long time.</comment>


Ask HN: Which Domains/Services would you block to regain some privacy? - <AUTHOR> Hello HN!
I'm getting more and more interested in privacy and already use different VPN's, disabled JavaScript in my browser switched to Linux.. well you get the point.. Now I'd like to block specific Domains like Facebook, Gravatar etc. that are known for disregarding privacy.
Mainly stuff that tracks you while visiting websites.
I'd be grateful for any contributions!
Bonus Question: A while ago I found a big list of all Facebook related domains here but unfortunately I haven't saved it, anyone to the rescue? <comment><USER2> Use PrivacyBadger and Ublock origin in your browser.

<comment><AUTHOR> Thanks, I'm already using both but would like to block some services systemwide (through hosts file or similar).

<comment><USER2> Then look at the source of those and pull the site lists out and block those, Ublock lets you download huge lists of all sorts of things.</comment></comment></comment>