Live display of CO2 emitted to produce electricity in European countries - <AUTHOR> http://electricitymap.tmrow.co/ <comment><USER2> I've noticed that Switzerland, using a lot of hydropower, has a worse intensity than I expected.

The CO2 numbers for the different types of power generation seem to come from Wikipedia [1], where Hydropower has a median gCO2eq/kWh of 24 and a maximum of 2200 – much worse than coal. This seems to be based on the fact that large areas may be flooded when filling the dam initially, and CO2 from rotting plants is released [2]. The numbers vary depending on the amount of vegetation.

According to a study [3] from 2012, "electricity generated in storage hydropower stations in Switzerland causes emissions of 10.8 g CO2-eq/kWh", so it's less than shown in the emissions chart and comparable to nuclear.

[1] [https://en.wikipedia.org/wiki/Life-cycle_greenhouse- gas_emis...](https://en.wikipedia.org/wiki/Life-cycle_greenhouse- gas_emissions_of_energy_sources)

[2] [https://www.newscientist.com/article/dn7046-hydroelectric- po...](https://www.newscientist.com/article/dn7046-hydroelectric-powers-dirty- secret-revealed/)

[3] [http://esu- services.ch/fileadmin/download/publicLCI/flury-20...](http://esu- services.ch/fileadmin/download/publicLCI/flury-2012-hydroelectric-power- generation.pdf) [PDF]

<comment><USER3> > I've noticed that Switzerland, using a lot of hydropower, has a worse > intensity than I expected.

The carbon intensity on the map seems to be for consumed kWh, not produced kWh. The map indicates Switzerland imports a lot of electricity from Austria and Germany which have a much higher carbon intensity.

<comment><USER4> Also CERN is currently offline for the winter which gets most of its power from France imports.

<comment><USER5> I was talking to a CERN physicist once who joked that the reason for the LHC winter shutdown was because France needed heating. It's probably more to do with economics but it's almost true. France has a lot of cheap nuclear power in the summer, and only limited pumped storage capacity to cache it with.

</comment></comment></comment></comment><comment><USER6> This is one of the great things we can do as developers. We can help society learn about the problems humanity faces. Creating amazing visualizations and experiences to educate the world and potentially encourage action to solve some of our biggest problems.

Hopefully we can drive awareness and change together.

<comment><USER7> With the great power is connected a great responsibility to create a visualizations that don't manipulate data and show a meaningful information.

</comment></comment><comment><USER8> Polish right-wing government is blocking any development that could hurt coal industry.

They passed the law that significantly constrains where windmills can be located. They also hindered development of solar by reverting the law that allowed individual owners of solar panels to be paid for the overproduced electricity.

<comment><USER9> Polish government is not right-wing. There may be right wing of it, but it is not right wing per se. Right wing of what? See [https://en.wikipedia.org/wiki/Sanation](https://en.wikipedia.org/wiki/Sanation) for a better clue about what current polish government may aspire to be like. It may have some right wing parts of what is above all big centrist coalition.

Another issue is. How is _this_ government blocking development that could hurt coal industry any different from what _all former_ polish governments were doing ? But i agree that all those governments are mostly known for their "block everything" attitude.

The website makes my Firefox browser slurp 3GB of memory, renders it unresponsive and it crashes. And please do not color Poland black, if as Wikipedia says (Yes I know. I know). _Carbon dioxide (chemical formula CO2) is a colorless and odorless gas that is vital to life on Earth._ Paint Poland and Estonia green. Green as in Greenhouse. Painting it black may suggest some form of blame for some imaginary "pollution" which i hope was not the point of the authors of the site. Or was it ? Come on. Don't make us look like Mordor.

<comment><USER10> The gradient goes from green to black. Black represents a carbon intensity of 700 gCO2/kWH. If you want Poland to be green, Poland has to consume less carbon.

As Polish government being right-wing: Since it's a coalition of two parties, it would be wrong to call the _entire_ government right-wing. But the Law and Justice party certainly is.

<comment><USER9> > Poland has to consume less carbon.

I thought it was about emitting CO2. If it is about consuming carbon (coal), then we would take black badge for being leader in coal consumption in Europe. Black is ok then. But we are not even a leader in coal consumption.

Colors are just colors, but it seems as if black here suggests pollution (opposite to green on the scale). CO2 does not qualify as a pollutant that easily as NO2, S02 or NH3 for that matter. If anything it should be more on the green end of the scale. But it would make the scale seem nonsensical in that context. Wouldn't it ?

Anyway. I don't buy it.

<comment><USER10> The colours do represent CO2 emissions. But Poland wouldn't emit so much if it weren't also _consuming_ that much.

(To be fair, it looks like it's exporting a little bit. That doesn't help, since it's nearly all fossil.)

</comment></comment></comment></comment></comment><comment><USER11> Does anyone know of interesting tours you can take of electricity production in Europe or energy infrastructure in general? I'm in The Netherlands, but would be willing to travel for it.

A real tour of a nuclear plant would be awesome (i.e. getting to hear / see the reactor), but tours of wind farms / turbines / dams etc. would also be great. Preferably in English.

<comment><USER12> It would be next to impossible to get access to a commissioned nuclear powerplant and enter containment as a visitor. However, there is a nuclear power plant in vienna that was never used and can be visited: [https://en.wikipedia.org/wiki/Zwentendorf_Nuclear_Power_Plan...](https://en.wikipedia.org/wiki/Zwentendorf_Nuclear_Power_Plant)

Additionally, many universities have research reactors - they often have tours or a tour can be easily arranged.

<comment><USER13> > It would be next to impossible to get access to a commissioned nuclear > powerplant and enter containment as a visitor.

Pish posh, it's absolutely possible to visit active nuclear plants, usually for free, though you _may_ need a small group (half a dozen or more) depending on the operator.

<comment><USER14> But can you enter containment?

<comment><USER15> Yes, you can. The only area we didn't visit when I toured Isar 2 was the control room (we looked through the window and got a description of the various parts and their function).

<comment><USER11> How did you arrange this? Is this something you just sign up, or do you call them and assure them you're enthusiastic about nuclear energy and eventually they relent?

</comment></comment></comment></comment></comment></comment><comment><USER16> I had no idea there was such a widespread difference in the source of electricity a among citizens of countries in Europe, even neighbouring countries. Look at how most of France is nuclear powered (!) compared to coal for Germany and gas for Netherlands. Such differences in a very small space!

I'm kinda amazed by this!

<comment><USER17> Germany decided to close all of its 17 nuclear reactors by 2022 in wake of Fukushima. Nuclear is getting replaced mostly with renewables but coal remains unchallenged[1]

[1] [https://en.wikipedia.org/wiki/File:Electricity_Production_in...](https://en.wikipedia.org/wiki/File:Electricity_Production_in_Germany.svg)

</comment></comment><comment><USER18> Russia -> Finland imports are missing: [http://www.fingrid.fi/en/electricity- market/power-system/Pag...](http://www.fingrid.fi/en/electricity-market/power- system/Pages/default.aspx)

Nordic power map: [http://www.fingrid.fi/en/electricity-market/power- system/Pag...](http://www.fingrid.fi/en/electricity-market/power- system/Pages/State-of-the-Nordic-Power-System.aspx)

Finland is currently building two nuclear power plants to provide more green energy. Wind & Solar, aren't that great options at all. Btw. I love the visualizations.

<comment><USER19> You can help them, it's on github : [https://github.com/corradio/electricitymap#contribute](https://github.com/corradio/electricitymap#contribute)

</comment></comment><comment><USER20> I think the visualization is misleading, it seems to highlight energy mix rather than absolute numbers. eg Poland looks bad but Germany burns twice the amount of coal that Poland does. (Per head of population its probably about the same) Germany looks better because it has some other sources mixed in there.

<comment><USER13> > it seems to highlight energy mix

It's literally a visualisation of how green the country's energy policy is (electricity production sources), the color coding is gCO2/kWh.

> rather than absolute numbers

Absolute numbers would mostly just track population, that's way more misleading as a small country with sparse population but 100% hydrocarbon energy production would appear greener than a large country with dense population on 10% hydrocarbon energy sources.

An other interesting visualisation would be per-capita as it would include _consumption_ patterns rather than just _production_ ones

> Poland looks bad but Germany burns twice the amount of coal that Poland > does. (Per head of population its probably about the same)

Poland would still look bad, it has 40% of Germany's population, and according to the site's sources currently produces 15.5GWh from coal while Germany is at 23.4GWh from Coal, that's 65% more coal-sourced electricity per capita than Germany.

And the map is live and it's winter hence the low levels of e.g. solar in countries with large solar capacity (like Belgium, or Austria,… or Germany)

<comment><USER21> Your calculations are wrong:

Population: 38.53 / 80.63 ~= 47,7% More coal sourced: 15.5 / 0.477 / 23.4 ~= 38.8%

38.8% vs 65% makes a difference

<comment><USER13> > Your calculations are wrong:

> 38.8% vs 65% makes a difference

No, it does not according to your number Poland still uses almost 40% more coal per capita than Germany, meaning _it still looks bad if you switch to that metric_.

</comment></comment></comment></comment><comment><USER22> Germany... your anti-nuclear stance is detrimental to the environment...

<comment><USER23> At least Germany is not putting its neighbours at risk with rotten nuclear plants. Looking at you, Belgium [0].

Also, Germany does not export its nuclear waste, dear France [1].

The current situation with coal is bad and we have to solve it. And I know HN is pro nuclear and downvotes opposing opinions, but history has proven several times, that nuclear energy is not a very good option, either.

[0] [http://www.dw.com/en/new-incident-at-belgiums- tihange-2-nucl...](http://www.dw.com/en/new-incident-at-belgiums- tihange-2-nuclear-plant/a-19323647)

[1] [http://www.telegraph.co.uk/news/picturegalleries/worldnews/8...](http://www.telegraph.co.uk/news/picturegalleries/worldnews/8117882/Protests- as-a-train-carrying-nuclear-waste-travels-from-France-to-Germany.html)

<comment><USER24> These incidents are an exception to the rule where coal is worse _every other day of the year_ , as well as when looking at the total.

Chernobyl was the decisive moment for me: you have the Soviets screwing it up in the worst way possible, my home place in southern Finland being one of the most affected places on Earth due to winds in April 1986, and the results are not worse than this? Bring it on, it's surely better than coal.

<comment><USER25> Not sure how good option nuclear is with the recent experience with Olkiluoto 3. Probably safe yes, but maybe too expensive?

<comment><USER24> Possibly, though that seems to be a problem of the vendor, not the power company.

</comment></comment></comment></comment></comment><comment><USER26> Fascinating to see the potential use, vs. the actual 'right now' capacity viewing this at 3pm GMT.

And also interesting to see the import/export power figures: How one region supports, though nothing like the capacity needed to substitute renewables' variance.

France is really leading consistency of capacity vs. generation with Nuclear.

France also seems to have 4 times hydro capacity of Portugal, which is interesting given Portugal's recent 100% renewables day but inability to use it today.

Why is Norway consuming 22GW but UK only about 40-45GW, and Germand 60-65GW, given the great disparity in population of Norway?

<comment><USER13> > Why is Norway consuming 22GW but UK only about 40-45GW, and Germand 60-65GW, > given the great disparity in population of Norway?

Electric heating? Lower temperatures? Oslo is currently freezing (below 0C), neither London nor Berlin are.

<comment><USER27> Norway uses a lot of electricity for energy intensive industries like aluminium production.

<comment><USER26> Thanks

</comment></comment></comment></comment><comment> Al-Khwarizmi Spain right now: solar plants off (OK, that's normal, it's night time here), wind plants off, hydro and gas plants mostly off, but burning coal at near maximum capacity while we import energy from Portugal who are also burning coal like madmen.

I already knew that we had serious problems in our grid, caused by politics (overdimensioned gas, insistence on using coal due to pressure by miners, etc.). That's more or less widely known, but I had no idea it was SO messed up. And why the imports when we have most of the renewable sources sitting idle? Wow.

</comment><comment><USER28> Is Poland using almost only coal?

<comment><USER29> Yes. Poland was affected by Chernobyls fallout and public opinion led to the dismantling of the building of nuclear power plants.

</comment></comment><comment><USER30> How much co2 is coming from electric energy, food and transportation?

One should in general switch over to clean power sources.

One way to cut down on ones own carbon emissions is to stop eating beef as cows release a lot of methane. km [https://www.theguardian.com/environment/2014/jul/21/giving-u...](https://www.theguardian.com/environment/2014/jul/21/giving- up-beef-reduce-carbon-footprint-more-than-cars) [http://shrinkthatfootprint.com/wp- content/uploads/2013/01/fo...](http://shrinkthatfootprint.com/wp- content/uploads/2013/01/foodkCal1.gif) [https://priceofmeat.files.wordpress.com/2009/02/b8850198-f13...](https://priceofmeat.files.wordpress.com/2009/02/b8850198-f130-62ec-f2a7324de64fecca_21.jpg?w=500) [http://shrinkthatfootprint.com/wp- content/uploads/2013/01/fo...](http://shrinkthatfootprint.com/wp- content/uploads/2013/01/foodprint5.gif)

In Sweden one uses 8000kwh of electricity per year. 58g/kwh = 464000grams, 464kg co2.

Average car co2 emissions around 120g/km. Average distance driven here around 15000km. 120 _15000=1800000grams 1800kg.

[https://en.wikipedia.org/wiki/List_of_countries_by_meat_cons...](https://en.wikipedia.org/wiki/List_of_countries_by_meat_consumption)

Co2 emissions of meat 13300g/kg, average meat consumtion 80kg. 80_13300=1064000grams 1060kg of co2 from meat.

adding the above. 464kg+1800kg+1060=3324kg, still missing some to add up to per capita consumption. What co2 source is missing?

Co2 emission per capita of Sweden 4.6 ton, 4600kg. [https://en.wikipedia.org/wiki/List_of_countries_by_carbon_di...](https://en.wikipedia.org/wiki/List_of_countries_by_carbon_dioxide_emissions_per_capita)

Sustainable co2 per capita 1.7tones. I am over consuming 2900kg of co2. Stop driving car and stop eating meat reduces emissions about 2800kg.

<comment><USER31> Not eating beef will not reduce your "carbon emmisions" (except for transport etc, which would presumably be substituted). They will reduce your "greenhouse gas emissions" though.

<comment><USER32> Methane is a carbon molecule

<comment><USER31> But a combustible, rather than an oxidised, one.

Incidentally, while searching for a reference to the assertion that CO2 is and methane is not included in a carbon footprint, I found the opposite:

[https://en.m.wikipedia.org/wiki/Carbon_footprint](https://en.m.wikipedia.org/wiki/Carbon_footprint)

(Methane emmisions are expressed in terms of the equivalent CO2 effect and added with actual CO2, the unit is then written as CO2e.)

My original quibble is therefore much less important.

</comment></comment></comment></comment><comment><USER33> It's a nice visualization, but cpu usage shoots through the roof ! Deleting the animated arrows between the countries helps a bit, but then it still uses around 50% cpu (and that's on a _fast_ desktop computer. Can't imagine my laptop trying to display this page). Using Ubuntu + firefox (it's a little better with chromium).

Is it a problem with this page ? With my setup ? Or is it just impossible to do something of this quality on the web without monster cpus ?

<comment><USER34> Hi there,

I'm the author of the map. For sure it can be optimised. If you can help, feel free to do so on github - or reach out so we can chat. Thanks :)

</comment></comment><comment><USER24> Also interesting to look at the solar power potential map.

Of course, I knew it already: I offered a birthday lunch to wife's relatives today. A nice inn on a hilltop. We went there just after sunrise (11:00 AM) and left just before sunset (1:30 PM). The map kind of showed that.

(Latitude 63°40.8′N)

</comment><comment><USER35> Wow, what's wrong with Poland?

I guess they use a lot of coal to produce electricity..?

<comment><USER21> Nothing is wrong with Poland. If something is wrong then your ability to read presented data.

It doesn't mean we are emitting more CO2 - for all colored map lovers see[1] CO2 emission per capita for Germany or other European countries before jumping to conclusions.

[1][https://commons.wikimedia.org/wiki/File:CO2_per_capita_per_c...](https://commons.wikimedia.org/wiki/File:CO2_per_capita_per_country.png)

<comment><USER36> > Nothing is wrong with Poland. If something is wrong then your ability to > read presented data.

This is, unfortunately, what nationalistic pride clouding otherwise smart people's judgment looks like.

<comment><USER35> Big time. And for no reason.

</comment></comment></comment></comment><comment><USER37> Timing of this post is good as I just read an interesting paper on various current vehicles impact on climate change based on electricity + carbon output. I posted it here: [https://news.ycombinator.com/item?id=13270712](https://news.ycombinator.com/item?id=13270712)

The real meaty quote from the automobile paper is:

 _> By 2050, only electric vehicles supplied with almost completely carbon- free electric power are expected to meet climate-policy targets._

It would be neat to overlay the two: vehicles and electricity.

</comment><comment><USER38> Nuclear FTW.

Of course, it always loses in any HN conversation:

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

<comment><USER39> Well, if you read those conversations, you might notice that people think that

\- nuclear is very expensive

\- nuclear has a waste and risk problem

\- wind and solar are price competitive and very environment friendly

<comment><USER40> > nuclear is very expensive

If you disagree, and have an argument, why are you not providing it?

> nuclear has a waste and risk problem

Yes, and?

[https://en.wikipedia.org/wiki/High- level_radioactive_waste_m...](https://en.wikipedia.org/wiki/High- level_radioactive_waste_management)

> Thus, Alfvén identified two fundamental prerequisites for effective > management of high-level radioactive waste: (1) stable geological > formations, and (2) stable human institutions over hundreds of thousands of > years. As Alfvén suggests, no known human civilization has ever endured for > so long, and no geologic formation of adequate size for a permanent > radioactive waste repository has yet been discovered that has been stable > for so long a period.

In other words, we have no, zero, ZILCH real solutions, and just hand-wave it away. Future generations _might_ come up with something. They may not. But hey, let's not be a "scaremonger", let's not be like great minds of the 20th century who paid attention. Let's be shitty consumers with the attention span of a goldfish. Fuck that so much.

> wind and solar are price competitive and very environment friendly

And don't forget they're not using up resources we have a a.) limited supply of and b.) could use for more interesting things than burning them, but instead using energy that the sun pelts us with anyway. That's kind of a fundamental difference. It's the elephant on the couch, I'd say.

<comment><USER41> it's _so_ bizarre that you think _ph_ disagrees with these arguments. their parent comment likes nuclear but says it unfortunately always loses in HN discussions, and_ph_ summarizes _why_ it loses.

I clicked your HN profile which says " Defend yourself. Your mindless, entitled pouting makes me aggressive. As it should."

HN is a place to be civil. it's in the rules. That's why it's better than other places. Please, improve your attitude here and don't have that profile text. If you do, you'll (rightly) be shadow banned for those toxic "contributions" and then you won't derail threads with gratuitous negativity.

Rather than lash out against someone who you completely agree with, you could have just written your comment to read "To elaborate on these points..." and then given your helpful information.

then you would have been upvoted. In the future please be more constructive :). and welcome to HN.

</comment></comment></comment></comment><comment><USER5> This is a very pretty map! It shows that location is important but time is also an interesting domain. You can do your bit by running appliances at the best time. This is a post I made on [https://energyuse.eu](https://energyuse.eu) (part of an EU trial I'm involved with - [https://www.decarbonet.eu](https://www.decarbonet.eu)).

Saving energy in general is a positive step. For example, we've just bought a new freezer and dishwasher with better energy ratings and these will save money over their lifetimes. However, when is the best time to run a wash to save the most CO2e?

Unless you are on an Economy 7 style tariff or have solar panels then when you use power has no effect on how much it costs you. If you are, then at night or in the middle of the day is better, respectively. Dynamic demand to grid signals isn't ready for consumer adoption yet but you can look at the information manually if you want to use power at less demanding times.

The grid frequency[0] is a reasonable indicator but is pretty technical. There are other, easier to understand, data sources available:

\- Earth Notes: GB Grid Intensity[1] gives a simple traffic light indication

\- GridCarbon[2] is a real-time carbon intensity app (CO2 Modeller[3] is from the same guys)

\- MyGridGB[4] shows similar data on the web (and includes Solar data[5])

By avoiding peak time you may not save money but you can save carbon.

[0]: [http://www2.nationalgrid.com/uk/Industry- information/electri...](http://www2.nationalgrid.com/uk/Industry- information/electricity-transmission-operational-data/)

[1]: [http://www.earth.org.uk/_gridCarbonIntensityGB.html](http://www.earth.org.uk/_gridCarbonIntensityGB.html)

[2]: [http://gridcarbon.uk](http://gridcarbon.uk)

[3]: [http://www.co2modeller.info](http://www.co2modeller.info)

[4]: [http://www.mygridgb.co.uk](http://www.mygridgb.co.uk)

[5]: [https://www.solar.sheffield.ac.uk/pvlive](https://www.solar.sheffield.ac.uk/pvlive)

</comment><comment><USER42> Very nice visualization and that it is realtime, the color scheme could be nicer

</comment><comment><USER43> There seems to be lots of wind potential around the scottish isles and iceland. I wonder how feasible it would be to plaster turbines over iceland and then sell that energy to europe.

<comment><USER44> Iceland already produces much more energy than it needs through geothermal and hydro. Connecting the Icelandic power grid to the rest of the world seems to be currently infeasible [1], so instead they "export" the surplus energy through their aluminium industry: raw ore is shipped in from around the world, and high-energy refined aluminium is shipped out.

Similarly-isolated New Zealand does a similar thing, refining aluminium ore from Australia using abundant hydro power [2].

[1] [http://www.landsvirkjun.com/researchdevelopment/research/sub...](http://www.landsvirkjun.com/researchdevelopment/research/submarinecabletoeurope)

[2] [https://en.wikipedia.org/wiki/Tiwai_Point_Aluminium_Smelter](https://en.wikipedia.org/wiki/Tiwai_Point_Aluminium_Smelter)

</comment></comment><comment><USER45> I have read just a day ago that Germany produced 85% of the electricity needed during the holidays using renewables.

The problem is the huge surplus generated by cheap coal that is being exported.

</comment><comment><USER46> Italy cleaner than Germany

</comment><comment><USER47> Very cool. And also very depressing.

</comment><comment><USER48> That's really cool. :)

</comment><comment><USER49> Poland what the uck are you doing? Literally black spot on EU map. Stop burning that much coal. Fix it ASAP.

<comment><USER50> Been there many times. Old condos, homes have coal burning furnaces. People have no money to replace them despite aid from EU to convert to gas. Some people throw everything into the furnace to burn for heat. It's not pleasant to walk outside and breath air fowled by burning plastic bottles.

<comment><USER51> This is for electricity generation, so residential coal is excluded.

</comment></comment></comment><comment><USER52> Would be nice to see this displayed relative to population/demand.

France looking good but they're paying for that green color.

<comment><USER13> > France looking good but they're paying for that green color.

French electricity prices to households are below european average and half the German or Danish prices. They're not the lowest in the EU but they're the lowest in Western Europe — unless you include scandinavia and even then they're competitive: [http://ec.europa.eu/eurostat/statistics- explained/index.php/...](http://ec.europa.eu/eurostat/statistics- explained/index.php/File:Electricity_and_gas_prices,_second_half_of_year,_2013–15_\(EUR_per_kWh\)_YB16.png)

French prices are lower than Belgium's, Denmark's, Germany's, Ireland's, Italy's, Spain's, Luxemburg's (by a hair), the Netherlands's, Austria's, Portugal's and the UK's.

Higher than Finland's or Norway's but lower than Sweden's.

And of course the french nuclear program was never about prices, exportable industry or ecology (though these are nice side-effects, sadly european greens never understood the last one, even now they're pushing the french towards phasing out nuclear), it was about energy independence following the 1973 Oil Crisis, I believe France is one of the few countries (if not the only one) which ignored the 80s oil glut (possibly due to the investment it had made in the 70s) and stayed the course.

<comment><USER53> they mean the cost of the nuclear plants (construction, decommissioning, waste-storage and security) not the price of the electricity

<comment><USER13> That's nonsensical, the cost of the nuclear plant is capital investment which is included in the price of the electricity.

If the country needed it due to "the cost of the nuclear plant" it would raise its prices (again electricity prices in France are _lower than in every single one of its neighbours_ , to which the country generally exports electricity incidentally).

<comment><USER54> It's not easy to estimate the cost of decommissioning and waste storage over very long periods, so it is very possible that those cost are far from reflected in the current prices, by mistake or for political reasons.</comment></comment></comment></comment></comment>


[0910.1589] How many universes are in the multiverse? - <AUTHOR> http://arxiv.org/abs/0910.1589 <comment><USER2> Alert: spoiler ahead. First you have to get beyond the abstract and 10 pages of dense material. The answer is 10^10^10^7, which is a pretty big number, even bigger that the 10^500 from string theory. Then they start applying simplifications, like the number of distinct universes, and the number that are observable locally. It is still a pretty big number.

If I apply their criteria that the universes be locally observable, I get a much smaller number. Our universe is probably much larger than the observable universe, so I get > 1.

Fooey, I was hoping to grab my laptop and a copy of the PDR, jump backwards 30 years, marry the other girl, and become filthy rich. These cosmologists just have to try a little harder.

</comment><comment><USER3> Two - and the other one is exactly like us, except they all have cowboy hats.</comment>


ICO Investigation into the use of data analytics in political campaigns [pdf] - <AUTHOR> https://ico.org.uk/media/action-weve-taken/2259371/investigation-into-data-analytics-for-political-purposes-update.pdf <comment><USER2> There's a related report[0] titled "Democracy Disrupted? Personal Information and Political Influence" available from the ICO today as well

[0] [https://ico.org.uk/media/action-weve- taken/2259369/democracy...](https://ico.org.uk/media/action-weve- taken/2259369/democracy-disrupted-110718.pdf)</comment>


Hack the Harvester - <AUTHOR> https://industryhack.com/challenges/hack-the-harvester/ <comment><AUTHOR> _" We invite all hackers, designers and forest machine enthusiasts to hack the harvester. We will take you to a visit to the Ponsse's manufacturing factory, show harvesters in action and provide you with different APIs and data sets from the forest machines and the maintenance process. Now, Ponsse wants to build a community of tech startups and talented developers with whom co- operation can be continued."_

OP here: The "Thriving black market of John Deere tractor hacking" thread reminded me of something a (woodsman) relative mentioned. He said that the new tree harvesting machines were all computers and fiber optics (networks I suppose). Since I'm a "the computer nerd" in my family, he wondered if fixing that sort of thing was in my wheelhouse.</comment>


Show HN: Ouch – web app to record and rate hazards you're exposed to at work - <AUTHOR> http://ouch.herokuapp.com/

<comment><AUTHOR> Most jurisdictions (i.e. states/provinces) require workplaces to identify the hazards in their workplace and rate them through a hazard assessment.

Ouch is an MVP that allows people to record the hazards they see and explore assessments that others created.

1) it's hard to create a hazard assessment and keep them up to date 2) employees don't always get input or get to see what the hazards are in their workplace

This will hopefully allow anyone to record and rate hazards and anyone can look at them.

Thanks for your thoughts. I appreciate the feedback.</comment>


Other Companies Should Have To Read This Internal Netflix Presentation - <AUTHOR> http://www.techcrunch.com/2009/08/05/other-companies-should-have-to-read-this-internal-netflix-presentation/

<comment><USER2> I hate to be that guy, but I liked this more yesterday when it was linking the presentation instead of techcrunch: <http://news.ycombinator.com/item?id=740524>

</comment><comment><USER3> You know, I was hesitant to click through, assuming TechCrunch picked up another hacker's internal docs and they were slinging secret strategy around again.

But it's actually just an extraordinary layout of their culture.

<comment><USER4> And it's available on their website: <http://www.netflix.com/Jobs>

(Yeah, I was inspired to investigate.)

<comment><USER5> And despite being publicly available on their site, slides 94 and 97 are tagged "Confidential" at the bottom.

</comment></comment></comment><comment><USER6> I wish my boss would read it... But if I'll send it to him, it will create tension

<comment><USER7> I once sent the director of a company where I worked an article about working from home (the article mentioned how IBM does this) and got a snotty reply.

He also refused to allow me to take unpaid leave.

It's amazing how some managers think that working from home or taking more than 15 days of leave (unpaid at that) is an undeserved luxury and that they'd rather have you less productive, but in your seat at work.

This was at a 5 person company.

<comment><USER8> > This was at a 5 person company.

I was nodding and thinking "that's not unusual" until I got to this part. Wow.

</comment></comment></comment><comment><USER9> Impressive document! Someone's been reading Joseph Tainter.

</comment><comment><USER10> Does anybody have this as a downloadeable?

<comment><USER11> <http://www.slideshare.net/reed2001/culture-1798664/download></comment></comment>


That one time Zuck thought his sales guy was 50 Cent - <AUTHOR> http://techcrunch.com/2013/07/21/that-one-time-zuckerberg-thought-his-sales-guy-was-50-cent/

<comment><USER2> Should have read the URL before I clicked the link.</comment>


Interpol chief Meng Hongwei vanishes on trip to China - <AUTHOR> https://www.bbc.com/news/world-europe-45761466 <comment><USER3> SCMP says the Chinese government knows where he is: he's under investigation [0].

"The 64-year-old official, who is also a vice-minister at China's Ministry of Public Security, was "taken away" for questioning by discipline authorities "as soon as he landed in China" last week, according to the source."

[0] [https://www.scmp.com/news/china/diplomacy/article/2167213/fr...](https://www.scmp.com/news/china/diplomacy/article/2167213/french- police-launch-hunt-missing-chinese-head-interpol-meng)

</comment><comment><USER4> These high-profile disappearances have become normal in China[1]:

> Chinese mega star Fan Bingbing has been fined around 883 million yuan > ($129m; £98.9m) for tax evasion and other offences, authorities said > Wednesday. The star, who disappeared in July, posted a long apology on > social media.

[1] [https://www.bbc.com/news/business-45728459](https://www.bbc.com/news/business-45728459)

<comment><USER5> Held in "secret detention" and posting a full apology including praise for the government. It sounds like the Chinese government is in full tyranny mode.

<comment><USER6> As opposed to when it wasn't in full tyranny mode... when exactly?

[https://en.wikipedia.org/wiki/Cultural_Revolution#Death_toll](https://en.wikipedia.org/wiki/Cultural_Revolution#Death_toll)

[https://en.wikipedia.org/wiki/Great_Leap_Forward#Consequence...](https://en.wikipedia.org/wiki/Great_Leap_Forward#Consequences)

[https://en.wikipedia.org/wiki/Internet_censorship_in_China#T...](https://en.wikipedia.org/wiki/Internet_censorship_in_China#Technical_implementation)

etc, etc...

<comment><USER7> for a while after Mao's death China functioned more as an authoritarian oligarchy than a totalitarian dictatorship. Not a liberal democracy by any means but clearly less bad. This has been reversing somewhat under Xi Jinping.

<comment><USER8> China was never really a totalitarian dictatorship under Mao either, he mostly got forced out of power by the rest of the communist party in 1959 after his great leap forward reforms resulted in millions dying. He never really regained power except in a sort of spiritual sense. There is a lot of complex political history in communist China.

Its most certainly incorrect to compare Mao with Xi.

<comment><USER9> > Totalitarianism is a political concept that defines a mode of government, > which prohibits opposition parties, restricts individual opposition to the > state and its claims, and exercises an extremely high degree of control over > public and private life

He was unabashedly and indisputably, totalitarian. The fact that he lost power eventually, is irrelevant. Every type of leader, eventually, loses power.

<comment><USER8> The key term was dictatorship, not totalitarian, China under the communist party has always been totalitarian.

You don't need a dictatorship for horrific things to occur.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> The more interesting question to me is, how does a country with a human rights record like China get to provide the head of Interpol?

edit: President is elected by the General Assembly [1]

[1] [https://www.interpol.int/About-INTERPOL/Structure-and- govern...](https://www.interpol.int/About-INTERPOL/Structure-and- governance/President)

<comment><USER11> One could ask the same question about things like United Nations Human Rights Council. The answer is that money, and representation of all governments is what counts. It leads to rather absurd outcomes.

<comment><USER12> True. I mean in reality though, there would probably be very few countries on the UN HRC if the position required being holier than though.

<comment><USER13> Not to be a dick but it's "thou"

</comment></comment></comment></comment><comment><USER14> I predict that the Chinese style of governance will eventually succeed and will be improved upon by others. They seem to be able to get away with everything. Chinese style data oriented micromanagement of populations is likely to be the norm for the future. You cannot escape algorithms judging you and placing you in a category. The "category" that will define your experience of the world from then on. Western tech companies are complicit in all of this.

As people in the field, we need to resist this at every turn but the money is just too great of a lure for now.

<comment><USER15> People just have to be told what direction we can head in.

I like the way Yanis Varoufakis frames the matter - do you want a Matrix style future where the machines control you or a Star Trek kind of future where the machines take care of all the mundane BS and we get to go places we haven't gone before.

I don't think there is a big debate about what people will choose. We just have to get the mindlessly ambitious minority of the population with god emperor delusions to behave themselves.

<comment><USER16> We need a way to get there from here. We will never reach Star Trek style society if we just continue as we are. I think we need to transition to socialist democracy. But how to start?

<comment><USER15> November elections are going to be very interesting. I think Bernie and the next generation of Bernie's who manage to also connect with some part of the rural votebase can take us in the right direction. Fingers crossed.

</comment></comment></comment></comment><comment><USER17> Not much information in the article. Interpol has issued a Red Corner notice, but ultimately it's the French and Chinese governments that have to find what happened.

Now let me get this straight. He was traveling from France to China, somewhere in the middle he disappeared.

What do the flight manifests say?

How about the security cameras at Airports, especially in China, where we have often heard what they allegedly doing with real time facial recognition and stuff.

For someone this high profile, there must have been security, staff etc. What do they have to say?

It's been two weeks since he disappeared. No alarm bells till now, at least the media.

I find this article to be very slim on details. There are some very simple questions not covered in the article. I guess they were in a hurry to publish this.

<comment><USER18> He didn't disappear in the middle. It was confirmed by the French that he arrived safely in China -

"The French official said Meng did arrive in China. There was no further word on Meng's schedule in China or what prompted his wife to wait until now to report his absence."

[https://apnews.com/af741e061cfe40f9b80a252a2bfc0a46](https://apnews.com/af741e061cfe40f9b80a252a2bfc0a46)

</comment></comment><comment><USER19> Sorry to be that guy but.. sigh.. this is no hacker news, it's just news.

Please don't turn this beloved site into a news aggregator.

From the guidelines : "Off-Topic: Most stories about politics [...]"

<comment><USER20> You might be right, but a sci-fi novelette published X years ago with this storyline could very well be on HN's first page, and bring a great discussion, any day.

Just because it's real doesn't mean is less interesting, for some readers.

<comment><USER19> I agree. Discussions here are often very good. But how will you - <USER2> moderators - guess that a story will generate such quality ? Problem is, the disappearing of an Interpol chief IS striking news. So it gets upvotes and stays on the front.

Now you, I, and many others have to filter more submissions to get to a real "HACKER" piece of news.

<comment><USER20> Well, hackers are good at filtering, plus the fold thread button works wonders too, it can make some discussions much better _for you_.

</comment></comment></comment></comment><comment><USER21> One of my professors at GaTech was detained while leading a study abroad course in China. After he was released, he said it probably was because they didn't like a book he wrote.

</comment><comment><USER22> I guess I don't totally understand how a public official can "allegedly" disappear. Doesn't he have job responsibilities? It's been a week.

<comment><USER23> I guess the question is whether he's gone off somewhere of his own volition or somehow ended up dead or been apprehended or... who knows what else.

<comment><USER24> Based on the history of other people disappearing in China, I would speculate that he must rather have been caught on some anti-corruption/anti-tax evasion campaign of some sort.

<comment><USER25> You forgot quotes around the "anti" definitions. Tax evasion in China is often the equivalent of "counter-revolutionary activities" under Stalin: the blanket accusation to frame whoever has fallen from favour and has to be purged.

<comment><USER26> Is there anyone who the Chinese government punished for tax evasion who turned out to be not cheating on their taxes? Selective enforcement is one thing. Fabricating charges is worse.

<comment><USER25> Potato, potato. In the USSR, anything you said could be interpreted as anti- revolutionary if it criticised the boss in any way; and plenty of people were privately criticising, but it was brought up only against the ones who had to be purged.

Similarly, in China today, everyone who is anyone in the apparatus is cheating taxes in some way, but it's brought up only if they become a problem for the leadership for some other reason.

<comment><USER26> Not having firsthand experience as a person who is someone in the Chinese government apparatus, it sounds like it should be possible to just pay the tax you owe. But hey, maybe that kind of thinking is why I have no political power.

<comment><USER23> Depending on what you did, you can go to jail for cheating on your taxes in the US too. Which is as it should be -- if the penalty is just that you have to pay what you owed then the expected value of fraud is positive and it's only logical to just always cheat and then only pay when you get caught.

<comment><USER25> _> you can go to jail for cheating on your taxes in the US too._

Jailing after trial and due public process is one thing, "disappearing" people is another.

<comment><USER23> That's true, but not the suggestion I was replying to.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER27> I guess if someone that high up isn't safe then who is? And China is so big, how do we know this type of thing won't spread to more countries?

Literally makes me want to move to Mars as soon as possible.

</comment><comment><USER28> _" Mr Meng is a senior Communist Party official in China."_

He didn't vanish, that's something he signed up for. Just the Party decided to execute call in the contract at this time.</comment>


Show HN: PiShot – capture high-speed strobe images using a Raspberry Pi camera - <AUTHOR> https://github.com/revalo/pishot <comment><USER2> Fantastic! This fascinates me how you have reversed engineered a cheap camera to make it fit for purpose and shared your work. It could have applications in low budget computer vision projects. I am researching global shutter cameras now. Thinking Sony IMX264. Quite expensive in a enclosure from Flir or Lucid. Do you know what sort of FPS you could record? Dynamic range? QE etc.

<comment><AUTHOR> Thank you! That's super cool :) The fastest strobe we used was a 500ns strobe, which is a 1/(2e6)th of a second exposure. The Pi cameras use the OmniVision OV5647, dynamic range of 67 dB @ 8x gain.

I'm pretty curious as to what you've discovered / worked on so far or have any interesting CV ideas you'd like to see?

<comment><USER3> do you know how many bits of depth the raw frames for Pi Camera V1 and V2 have?

Do we know the "gamma" curves, i.e. numerical intensity value as a function of light collected proportional to the number of photons?

67dB = 6.7B => brightest over softest intensity = 10^6.7 = 5 000 000

thats ln(10^6.7)/ln(2) = 22.257 bits, that's unheard of for camera sensors I have looked up, so I assume the reported values are "gamma" compressed before digitization.

Would you have interest in characterizing or collaborating on characterizing the exact compression function for the V1 and V2? Relevant literature seems to be Steve Mann's comparametric equations: [https://en.wikipedia.org/wiki/Comparametric_equation](https://en.wikipedia.org/wiki/Comparametric_equation)

(I am interested in high dynamic range, and high monochromatic or color bit depth for an experiment, which will progress much faster if I can start out with a higher dynamic range and bit depth sensor, I will need to oversample to observe a phenomenon, and every bit of increased depth a sensor has compared with another sensor would mean the experiments can be run 4 times as fast...)

</comment></comment></comment><comment><USER4> Is it actually taking 2 million pictures per second, does the title just mean that the global exposure takes 1/2000000 of a second?

Really cool results, although that bullet catcher setup is slightly horrifying.

<comment><AUTHOR> Yep, that's the exposure time.

LOL, yeah, it looks pretty sketchy. It is a proper bullet trap though, in fact the very same one that Harold Edgerton used for his famous bullet through apple image :)

</comment></comment><comment><USER5> I wasn't aware there are $5 Pi cameras out there. Repo doesn't contain which cameras are used. Can someone point me out?

<comment><AUTHOR> We bought a bunch of ov5647 camera modules from AliExpress. A quick search on the site yields a couple of listings at about $3.26 per camera, here is one of the listings, [https://bit.ly/2W0Xui6](https://bit.ly/2W0Xui6)

</comment></comment><comment><USER6> This is a great project but it's not clear to me how the HN title ("2M FPS with $5 Raspberry Pi Cameras") is related.

<comment><AUTHOR> To take a picture of a bullet, we take an exposure of 1/2,000,000th of a second. This is super challenging with cheap $5 cameras like the Raspberry Pi camera because of rolling shutter, timing, syncing etc and is traditionally done with more expensive DSLRs.

But yeah, I think you're right the title doesn't seem like it's related, suggestions for a better title?

<comment><USER7> We replaced the title above with a representative description from the article.

<comment><USER8> Thanks. I wish it happened more often, not just in this particularly outrageous case.

<comment><USER7> We do it more than most people realize. If you notice a case that needs attention, you're always welcome to let us know. firstname.lastname@example.com is the best way because then we're sure to see it. People email us about these all the time.

</comment></comment></comment></comment></comment><comment><USER9> Lots of words but it doesn't zero in on exactly how it captures 2 million frames per second.

<comment><AUTHOR> We use a strobe light instead of a mechanical shutter with a flash duration of 500ns.

<comment><USER9> How does it work from a code perspective inside the RP?

<comment><AUTHOR> We reverse engineered the camera module's I2C protocol and figured out how to ask it to to energize all pixel lines at once instead of it going line by line.

The heart of it is just sending a few bytes down the I2C bus, but reverse engineering the register set was the challenging part as the datasheets are given only to OEMs.

<comment><USER10> Very neat! Was this also tested to see if it works on the Camera Module V2, by any chance?

<comment><AUTHOR> We spent the first month of the project on the v2 modules. These are based on the Sony IMX219. Unlike the v1 cameras, the datasheets are publicly available and even then, after much hacking around we couldn't get all the lines to expose at the same time :'/

</comment></comment></comment></comment></comment></comment><comment><USER11> This is seriously cool. What strobe are you using?

</comment><comment><USER12> As cool a project this is, thought, I don't see - I reckon this could be my fault - how is this different from a "let's take a bunch of high speed synchronized pictures with a strobe".

"bullet time" was, at least, animated. I also understand that it is very possible that you can do that (just that are not showing it).

<comment><AUTHOR> My bad, maybe I should take more writing classes.

I guess what's different here is we're not using a $300 DSLR. We're using a $5 raspberry pi camera.

If we did the "let's take a bunch of high speed synchronized pictures with a strobe" on the cheap cameras, we'd see a single row of pixels worth of image, if we're lucky because of rolling shutter.

What we've done here is hack together some software to get a global shutter on these cheap cameras. Now that we can take pretty high speed pictures with $5, we scaled it up to get 16 cameras and took 16 angles of a bullet going though an apple, all at once. The "bullet time" examples in the repo are not computer graphics, they are 16 individual images played one after another.

<comment><USER13> This project is great! It's really exciting work, and I love that you open sourced it!

I think you're getting so many confused people because of your new domain expertise in playing with strobes for the class.

Most people are assuming you're synchronizing a bunch of cameras at very low latency and high speeds with a long lived light, but it appears you're using a dark room with a strong, short strobe as a shutter instead.

The real hack (if I understand correctly) is using your global shutter to take in a consistent point in time.

Maybe adding a non-global shutter image to compare and contrast the value of that hack would work in conveying how it works? Maybe a video too? In infrared?

These two changes can really help quickly communicate the work you're doing and get more people interested.

Either way, great work, excited to see what else you make!</comment></comment></comment>


Why is a Rust executable large? - <AUTHOR> https://lifthrasiir.github.io/rustlog/why-is-a-rust-executable-large.html <comment><USER3> I've been playing around with a tool to answer the more generic question: why is my binary (written in C, C++, Rust, etc) so large?

We use CPU profilers to tell us why our programs are slow. My tool is intended to be a _size_ profiler: why is my program big?

It turns out there are some really interesting analyses and visualizations you can perform to answer this question.

A few direct comments on the article:

\- I do not recommend stripping your binaries completely! Use "strip --strip- debug" instead (or just don't compile with -g). You should realize that debug information and the symbol table are two separate things. The debug information is much larger (4x or more) and much less essential. If you strip debug information but keep the symbol table, you can still get backtraces.

\- I don't believe -Wl,--gc-sections has any effect unless you also compile with -ffunction-sections and/or -fdata-sections, which these examples for C/C++ do not.

If you care about binary size in C or C++ you should probably be compiling with -ffunction-sections/-fdata-sections/-Wl,--gc-sections these days. Sadly, these are not the default.

<comment><USER4> \- It is fine to strip both debug information and symbol table if you want the distributable (I mentioned the ISP at the beginning for one reason) and the program does not rely on them in any way. Actually, I wonder why separate debug files [1] are not a norm in Unixes.

\- `-Wl,--gc-sections` does have an effect even at the absence of `-ffunction- sections` (and so on) because libc and libstdc++ is already compiled in the way allowing for GC---perhaps necessarily. The example had a single function anyway and I was lazy enough to exploit that `-ffunction-sections` wouldn't have a difference...

[1] [https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug- Fil...](https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html)

<comment><USER3> Without symbols you can't get backtraces, profile the program, use function- based DTrace probes, readably disassemble it, etc. I'm not saying it's impossible to distribute stripped binaries, I'm just saying I don't recommend it. Compared with the debug information, I think the symbol table is much bigger bang for the buck, considering how much smaller it is.

It's strange -- I can verify with -Wl,--print-gc-sections that this is indeed discarding some sections from a static glibc link, so I was wrong about that. On the other hand I can also see plenty of sections in libc.a that have more than one function in them -- not sure why this would happen if libc was indeed compiled with -ffunction-sections.

I agree that separate debug files are nice, and OS X's implementation of them is especially nice, since it does a very good job of finding the right debug information for an executable.

<comment><USER4> Yeah, I don't doubt the usefulness of the symbol table. I'm probably thinking of the distributable in _Windows_ , where you... don't really do such things.

IIRC the coding convention of glibc is that most functions (and probably all public functions) are contained in their own files. So it effectively results in the similar effect, even when `-ffunction-sections` is missing.

</comment></comment></comment></comment><comment><USER5> The short version is: as small or large as you want to trade-off convenience vs performance vs size.

I've made useful firmware for a micro-controller (yes in Rust) which is just 5KB. You can, as the article shows how, dynamically link and then it's about the same as the equivalent C/C++.

The point is, there's nothing inherent about Rust - the language - <USER2> results in binaries appreciably different in size to what you can achieve in C/C++.

<comment><USER6> > I've made useful firmware for a micro-controller (yes in Rust)

Would you mind sharing which microcontroller and how to get a Rust compiler for it? I would love to use Rust to program microcontrollers. Every time I've looked into this, I've thought it wasn't possible, because I don't see any microcontrollers in the list of supported platforms here ([https://doc.rust- lang.org/book/getting-started.html#platform...](https://doc.rust- lang.org/book/getting-started.html#platform-support)) or here ([https://github.com/rust- lang/rust/tree/master/mk/cfg](https://github.com/rust- lang/rust/tree/master/mk/cfg)). I've considered trying avr-rust ([https://github.com/avr-rust/rust](https://github.com/avr-rust/rust)), but the README says "NOTE: This does not currently work due to a bug." Any pointers to get started would be appreciated.

<comment><USER7> I've used Rust on a variety of ARM Cortex-M based microcontrollers including Atmel SAMD21, NXP LPC1830, and STM32F4. AVR is tougher because that's an 8-bit architecture with very new support in LLVM.

On microcontrollers, you use libcore instead of the full libstd, for lack of an OS or memory allocator. Libcore is easy to cross compile because it has no dependencies. You provide a target JSON file to specify LLVM options, and a C toolchain to use as a linker, and nightly rustc can cross-compile for platforms supported by LLVM.

[https://github.com/hackndev/zinc](https://github.com/hackndev/zinc) is a good starting point.

Things like interrupt handlers and statically-allocated global data require big chunks of unsafe code. Rust has a promising future in this space, but it will take more experimentation to get the right abstractions to make microcontroller code more idiomatic.

<comment><USER8> How does programming a "modern" 8 bit architecture work anyway? Do you have 16bit longs? 32bit long longs?

<comment><USER9> For 8 bit platforms, 8 bits are still bytes/sbytes. Most of them have native functions that work on 16 bit integers, they just take up a pair of registers. You have access to the same array of integer sizes. Plain int is 16 bits, and longs are 32 bits and long longs still 64. Still, I much prefer using the int definitions included in C99, where you define the bit size explicitly. uint16_t is a lot more explicit than int, especially if you've got code that's being shared between a few different micros of different word sizes.

</comment></comment></comment></comment></comment><comment><USER10> A related but distinct question might be: How does Rust filesize scale? Meaning, a Hello World application is X, and X is bigger than C/C++. But does Rust outgrow projects in C/C++ as the complexity increases? Or is the code generation actually consistent and all of this is simply about the corelib size and nothing more.

<comment><USER11> Given that Rust monomorphizes generic functions like C++, and given that Rust uses a high-quality C++ backend for code generation, I'd assume that default binary sizes would be comparable. Producing a more scientific comparison would require implementing a large project more-or-less identically in both languages, which is unlikely in the near future (it might be instructive to compare Servo to Gecko, but Servo isn't near complete yet, and even then Servo does many things differently that might influence the comparison).

</comment></comment><comment><USER12> _> Just to be cautious: Is it a valid question to ask after all? We have hundreds of gigabytes of storage, if not some terabytes, and people should be using decent ISPs nowadays, so the binary size should not be a concern, right?_

$ find /usr/bin -type f | wc -l 2254 $ du -sh /usr/bin 445M /usr/bin

If all these programs were written in Rust and statically compiled, assuming only a 600K difference by binary, that would make my /usr/bin 1.3G (or 300%) larger.

But in reality all those programs are dynamically linked against many libraries in /usr/lib, so the difference would be even bigger, with libraries duplicated between all those programs.

Sure, you can dynamically link with Rust too, but then, you hit the other problem that there is no stable ABI (yet?), and that upgrading Rust (every 6 weeks) means recompiling _everything_.

<comment><USER13> Forgetting about Rust for a second. Talking about dynamically linked libs in general.

Dynamic linking was an optimization which came about when memory was expensive. Memory is no longer expensive.

Is 1.3GB (or even 13GB) a lot on your hardware[1]?

According to "Do not prematurely optimize": Pretending we never had dynamic linking, and given today's hardware constraints[2], as a community would we choose to reimplement and universally adopt this optimization?

[1] Keep in mind that a single "modern" application, on average, weighs in the 10s of MBs or GBs.

[2] I'm talking about the general case, for the majority of OS distributions, ignoring the relatively exceptional case of embedded systems, which do in-fact still need it.

<comment><USER14> Dynamic linking also lets you update libraries due to things like security issues, it's not just a memory thing. Kinda agree on the space thing too (plus much less chance for things like buffer overflows..)

<comment><USER13> FWIW: I think everything has its place, and everything has tradeoffs. I can definitely see a lot of usefulness for dynamic linking. The point you raise probably being the best _current_ reason.

... but since I'm already playing devils advocate :)

Dynamic linking also lets you update libraries ... and cause security issues simultaneously across all applications. Increasing the number of possible attack vectors to successfully utilize that vulnerability.

<comment><USER15> Actually, it's a wash. If all we had was static linking, people would statically link the _same_ common libraries. So you'd have to update multiple binaries for a single vulnerability.

I've seen this in my day job at Pivotal. The buildpacks team in NYC manages both the "rootfs"[0] of Cloud Foundry containers, as well as the buildpacks that run on them.

When a vulnerability in OpenSSL drops, they have to do two things. First, they release a new rootfs with the patched OpenSSL dynamic library. At this point the Ruby, Python, PHP, Staticfile, Binary and Golang buildpacks will be up to date.

Then they have to build and release a new NodeJS buildpack, because NodeJS _statically_ links to OpenSSL.

Buildpacks can be updated independently of the underlying platform. The practical upshot is that anyone who keeps the NodeJS buildpack installed has a higher administrative burden than someone who uses the other buildpacks. The odds that the rootfs update and NodeJS buldpack are updated out of sync is higher, so security is weakened.

Dynamic linking is A Good Thing For Security.

[0] [https://github.com/cloudfoundry/stacks](https://github.com/cloudfoundry/stacks)

[1] [https://github.com/cloudfoundry/nodejs- buildpack](https://github.com/cloudfoundry/nodejs-buildpack)

</comment></comment></comment></comment></comment><comment><USER16> > Just to be cautious: Is it a valid question to ask after all? We have > hundreds of gigabytes of storage, if not some terabytes, and people should > be using decent ISPs nowadays, so the binary size should not be a concern, > right?

Phones? IoT? Embedded? OS devs? Someone just checked in a 14KB binary size reduction to our shell (by removing unnecessarily virtual methods in some C++) that was widely celebrated.

Also, smaller .dll's load faster from disk.

</comment><comment><USER17> Here's Zig[1] for comparison:

        $ cat ../example/hello_world/hello.zig
        const io = @import("std").io;

        pub fn main(args: [][]u8) -> %void {
            %%io.stdout.printf("Hello, world!\n");
        }
        $ ./zig build ../example/hello_world/hello.zig --export exe --name hello --release --strip
        $ wc -c hello
        5760 hello
        $ ldd ./hello
    	not a dynamic executable
        $ ./hello
        Hello, world!

5 KB. There are a few unfortunate reasons this isn't even smaller, one of them being a bug report[2] I filed in LLVM.

Also note that Rust is a lot further along than Zig right now. Zig does not have backtraces or threads yet. But I believe that the executable size for hello world in release mode will not contain backtrace code, or threads, or a memory allocator, even when Zig catches up to Rust in terms of std lib functionality.

[1]: [http://ziglang.org/](http://ziglang.org/)

[2]: [https://llvm.org/bugs/show_bug.cgi?id=27610](https://llvm.org/bugs/show_bug.cgi?id=27610)

</comment><comment><USER18> "C and C++ folks had been fine with that approximation for decades, but in the recent decade they had enough and started to provide an option to enable the link-time optimization (LTO)"

LTO is much older than this, even for C/C++

Just not in GCC :)

<comment><USER19> Where has it been around?

<comment><USER20> VC++ first shipped it in Visual Studio .NET (early 2002), and I don't remember it being touted as the first production-quality implementation of the concept, so I assume it was around elsewhere before that.

</comment></comment></comment><comment><USER21> Golang binaries are also very large [0].

      package main
      func main() {
        println("Hello, world")
      }

That compiles to 1.1M using go 1.5.

0\. [https://github.com/golang/go/issues/6853](https://github.com/golang/go/issues/6853)

<comment><USER22> Go doesn't pride itself on not having a runtime though. People aren't surprised that there's space taken up by the garbage collector and green thread management and such.

<comment><USER23> I don't understand your remark. To the contrary, a runtime should decrease binary size. The same PHP script (interpreted not JIT or VM'd though, obviously) will be only a few hundred bytes..

<comment><USER22> The runtime in this case is compiled into the binary. With php, the runtime is all contained in the php binary that runs your scripts, in Go's case, the runtime is copied into every binary it produces.

<comment><USER24> For a more true comparison with external scripting runtimes one can do: go run main.go

Although this would be ill-advised, kind of like PHP in general..

<comment><USER22> I'm not sure what you mean. Isn't this equivalent to `go build main.go && ./main`?

<comment><USER25> It is. Not sure if the other guy has ever used Go.

</comment></comment></comment></comment></comment></comment></comment><comment><USER26> Before I found rust I used to be a big advocate for Scala. What eventually drove me away from Scala and towards go and rust was my jar's for Scala were clocking in at 300 to 400 Mb's, so the fact that a rust binary has a pretty fixed overhead of only a few hundred Kb I consider that a big win.

</comment><comment><USER27> I recall someone once getting a Squeak Smalltalk image down to 384k. However, there was a Digitalk originated project called "Firewall" that could produce Smalltalk images as small as 45k, suitable for writing command-line programs, even on early 90's machines. (Even recent versions of VisualWorks can get their memory footprint down around to that of Perl 5's, and even beat Perl 5 in terms of startup speed, provided you are prepared to dig around and shut a whole lot of things off.)

<comment><USER28> That's fairly impressive. Perl 5 is pretty quick to start:

        # perl -E 'my $cmd = shift; use Time::HiRes; my @times; for (1..10) { my $start=Time::HiRes::time; my $out = system($cmd); my $stop = Time::HiRes::time; die if $out>>8; my $time = $stop - $start; push @times, $time; printf "%0.4f\n", $time; } @times = sort {$a<=>$b} @times; @times = @times[1..8];  my $cumulative=0; $cumulative += $_ for @times; my $average = $cumulative/8; printf "Average time of 10 runs of \"%s\", dropping best and worst: %0.4f\n", $cmd, $average;' "perl -e '1;'"
        0.0039
        0.0032
        0.0031
        0.0031
        0.0032
        0.0035
        0.0036
        0.0030
        0.0033
        0.0032
        Average time of 10 runs of "perl -e '1;'", dropping best and worst: 0.0033

That's Perl 5.22.1. For "python -c '1'" (Python 2.7.5) I get 0.0173. A minimal C program (just return success from main after including stdlib and stdio) built with default gcc opts is <9k in size, and vacillates between averaging 0.0007 and 0.0010 in the the benchmark above when I run it.

<comment><USER29> That perl code that Time:HiRes to measure the time it takes to start perl via system(), which includes the time it takes to fork a shell and parse the command and then fork to spawn perl. `time perl -e '1;'` is more representative of the raw perl startup time, which on my machine is reliably 0.002 real seconds, ⅔ of your times (that is, there's a lot of overhead in your measurement).

 _A minimal C program (just return success from main after including stdlib and stdio)_

You do realize that a "including stdlib and stdio" means nothing for a C program, right? These are, literally, just the API definitions, in the Oracle- vs-Google Android sense. The default gcc options probably produced a dynamic executable; if you compile it statically, you might be able to shave a few more microseconds in startup time.

<comment><USER28> > includes the time it takes to fork a shell and parse the command and then > fork to spawn perl.

The only difference from the shell builtin time, or /usr/bin/time, should be the shell startup and exec call. Every command is fork+exec, so you can't really get away from that. If I _really_ cared, I would try to account for that, but I don't. I thought it was pretty obvious that I wasn't being very rigorous. I just did the minimum to make the values I got not useless.

> which on my machine is reliably 0.002 real seconds, ⅔ of your times

And on mine it fluctuates between 0.002 and 0.009. You mention your times relative to my times, but that's useless. I ran mine on a 512mb VPS. The only relevant measure to determine overhead would be my _method_ vs the shell builtin. Is that what you were actually referring to?

> You do realize that a "including stdlib and stdio" means nothing for a C > program, right?

Truthfully, so I wouldn't have to remember the setup for C, I just googled "minimal C program" and removed the printf it had. I only mentioned the includes for completeness sake, and I didn't want to clutter the comment with the source.

> if you compile it statically, you might be able to shave a few more > microseconds in startup time

Possibly, but that's not really what I was trying to convey. I was just pointing out that a minimal Perl program isn't slower than a minimal C program, and it's notable if you can get your startup times close to that for a system with a virtual machine.

<comment><USER28> Err "minimal Perl program isn't slower than a minimal C program" was supposed to be "minimal Perl program isn't _that much_ slower than a minimal C program".

</comment></comment></comment></comment></comment><comment><USER30> I really like executable shrinking posts. However, isn't it the case that the size of the executable won't increase significantly if you use --release to distribute bigger programs? After all the size comes from the library and memory allocator being included in the executable. As long as the libraries are not heavy, the executable should stay reasonably small.

<comment><USER28> That matches my (amateur) understanding of how it works. The executable would increase by small amounts because presumably your own code is a relatively small portion of all the code included in the default binary. Then again, since it's not dynamically linking, every crate you use increases the size...

</comment></comment><comment><USER31> Dunno what GCC is doing but a statically linked C++ "Hello World" built by MSVC is about 140k and for C it's about half that.

</comment><comment><USER32> Another example of how languages don't matter, and that developing a good enough language with all the nice ecosystem that goes with it, is a massive amount of work, that can only be accomplished by OS vendors or years of dedicated OSS contributors.

At that moment, I think most language developers should turn to LLVM to spread their languages more rapidly, rather than trying to mess around with all the realities of language making, especially when it involves statically typed and compiled languages.

<comment><USER33> *BSD and GNU/Linux eco-systems are a bit different in this regard, but on other OSes usually system programming languages that aren't part of the OS vendor offerings tend to have a hard time getting wide adoption support.

</comment></comment><comment><USER34> How much of that initial 650k is constant in size? Would we expect it to increase with programs of substantial complexity, or is the overhead relatively constant?

<comment><USER35> A large portion of it is constant. As this article discusses, much of the bulk comes from statically linking the standard library and jemalloc.

</comment></comment><comment><USER36> The tl;dr doesn't explain why it's so big, only how to fix it.

</comment><comment><USER37> `ls -lh` please!

</comment><comment><USER37> ls -h please!

</comment><comment><USER38> Why not link the Rust libstd dynamically?

<comment><USER39> They did in the article

        $ cargo rustc --release -- -C prefer-dynamic
        $ ls -al target/release/hello
        -rwxrwxr-x 1 lifthrasiir 8831 May 31 21:10 target/release/hello*

</comment></comment><comment><USER40> Good analysis. Now that good information on the causes is available, the larger community can discuss solutions.

<comment><USER41> I don't understand the article's point about ISP speeds. Really if you're on a slow enough ISP that a <1MB file is too large for someone to download, then practically speaking they won't be able to download anything smaller either.

<comment><USER42> Because it's not that single ~1MB file that's a problem, it's the cumulative effect. There are people on dialup and GPRS and even people who pay by the megabyte.</comment></comment></comment>


This dating site matches people based on their shared use of awful passwords - <AUTHOR> https://thenextweb.com/insider/2018/03/01/this-dating-site-matches-people-based-on-their-shared-use-of-awful-passwords/ <comment><USER2> On this site, those who randonly generate passwords are 'forever-alone'.</comment>


Massive.js – A data mapper for Node.js and PostgreSQL - <AUTHOR> https://github.com/dmfay/massive-js <comment><USER2> What advantages does this have over a simple query builder?

Runtime db introspection sounds heavy and the claimed benefits of massive.js apply to raw SQL just the same, so I don't know why I should use this over raw SQL or a simple query builder like knex.

I don't understand what this project brings to the table. I could be wrong, but nearly everything I read in the project documentation seems to be taking credit for SQL and not bringing any additional value to what's already there. My reaction is: "SQL is what offers this, not massive.js." So what does Massive.js do? If there's a value-add, then the documentation needs a rewrite, because I'm having a hard time finding it.

<comment><USER3> I haven't used this, but I know of it: I believe that that the idea is to provide the simplest, easiest abstraction over PostgreSQL (and only PostgreSQL). Rails does run-time introspection, and it doesn't cost much.

Massive.js is written by Rob Conary, and is descended from his .NET projects Massive and SubSonic. There was a time when SubSonic was arguably the best light-weight ORM for .NET: if I ever meet him, I owe him a beer for making SubSonic.</comment></comment>


Pollution Rising, Chinese Fear for Soil and Food - <AUTHOR> http://www.nytimes.com/2013/12/31/world/asia/good-earth-no-more-soil-pollution-plagues-chinese-countryside.html?hp&pagewanted=all <comment><USER2> I find it sort of ironic, in a deeply tragic way, that a totalitarian state such as China finds itself incapable of enacting the sort of sweeping environmental regulations which were the linchpin for bringing about vastly cleaner air, water, and soil in the liberal democracies during the mid-20th century. Indeed, it wasn't so very long ago when a great many pundits were crushing on the ruthless efficacy of China's absolutist government.

China is more than advanced enough and more than wealthy enough to solve these problems. But perhaps the government is too corrupt and too disconnected from the value of human life to do what needs to be done.

<comment><USER3> Private property ownership is essential for anybody to care about environmental issues. If the government owns all the property, citizens don't have any economic or personal ownership stake in protecting it from pollution.

<comment><USER4> That is quite a bold claim there. Do have any evidence that it is true? Are there studies you can cite or data that you can refer too?

Your claim is that absent an economic or a personal ownership stake then one can not have an interest in protecting the land from pollution. This is a false statement for me personally so on strict logical grounds the claim is false but perhaps I'm an outlier.

<comment><USER5> You want a study that says that someone cares about things they own?

If the farmers actually owned the land they hopefully would have complained about near by factories, or stopped paying taxes on the land by now.

<comment><USER6> Nobody owns the air but we all like to avoid lung disease and death.

</comment></comment></comment></comment></comment><comment><USER7> Talking with Americans that have lived in China, it sounds like the problem isn't the govt, but culture. Like the anti-spitting campaign during the Olympics, the Chinese govt need similar strong tactics to get its citizens to care about the environment. I don't know how successful the anti-spitting campaign worked out, but the West's current love affair with the environment didn't happen over night either.

<comment><USER8> The West has a love affair with the environment? Maybe about 2-4% do, half of them living in cities and the other half in the countryside (very different lifestyles but similar goals of a minimum environmental impact).

Another 5-10% care enough about the environment to make daily conscious choices for it, but most of those choices amount to lip service or marketing- driven "greenwashing". Most of these people live in cities.

The rest just don't care, and will continue driving their cars and eating >300g of meat per day until they die or become incapable of deciding for themselves.

<comment><USER9> I think you underestimate the massive changes in attitude that have come about due to the environmental movement. The very fact that your examples are eating meat and driving, and not dumping waste into parks, throwing trash on the ground, pouring used oil into streams, using lead paint, burning leaves and grass, etc is a testament to the changes that have occurred. All the behaviors I listed were commonplace in the 1950s, now they unthinkable and strongly disapproved of.

<comment><USER10> My father told me that highways used to be lined with trash thrown out of car windows.

</comment></comment></comment></comment><comment><USER11> China's heavy metal pollution is staggering. The tap water in many areas tastes like heavy metals, or how you might imagine heavy metals tasting. Stick some aluminium in your mouth. Then put a 9-volt battery, with some zinc, in there and gurgle it all with Listerine. It's difficult to describe unless you've tasted it.

And if there is a country that could tackle an issue as immense and demanding as this, it's China.

</comment><comment><USER12> How China's pollution problem defers from that of US's or UK's, say 100 years back?

<comment><USER13> There's probably little difference, but I'm not sure if that's a legitimate excuse. Is a heavily polluting industrial phase necessary for countries to become developed? I'm not sure if that's true or not; maybe it is and it's acceptable for developing countries to make the same environmental missteps as developed nations had in order to progress to the same levels of development. I would hope, though, that with technological advances there would be a greater ability to be industrial while mitigating some of the environmental issues that plagued the US and the UK during their industrial revolutions.

I don't know if this is a valid analogy, but I sometimes think about what this argument would sound like if it was about something like slavery instead of environmental damage. There was much infrastructure and industry in parts of the US built on the backs of slaves, but I think that if there were modern-day countries with substantial slave industries, we wouldn't find it defensible to say that the US also had slaves too in the past and that developing countries should have a chance to do so as well as a temporary part of their development.

Maybe pollution is a necessary evil for any society, and maybe it's not as bad as slavery. It just seems like placing each society on separate 'tracks' of development for them to go through the same troubles and dangers without criticism both demeans developing societies as "oh, they're just 100 years behind us" and also ignores the sort of "horizontal gene transfer" of technology and social/philosophical/political concepts that can accelerate developing countries' development.

<comment><USER14> Part of the answer might be that environmental regulation will add costs and regulatory complexity to Chinese manufacturing, and make them less competitive.

Many western manufacturers moved production to China to reduce costs.</comment></comment></comment>


Downtown is for People (Fortune Classic, 1958) - <AUTHOR> https://fortune.com/2011/09/18/downtown-is-for-people-fortune-classic-1958/ <comment><USER2> Fwiw, this is by Jane Jacobs, author of the classic "Death and Life of American Cities". She was decades ahead of her time in thinking about how to make cities livable and appealing.</comment>


Express-imgwiz: Format, resize images on-the-fly for expressjs - <AUTHOR> https://github.com/hieunc229/express-imgwiz <comment><AUTHOR> Hey guys, I've been format and resize images often. Mostly to optimize websites for PageSpeed or GTMetrix recommendations.

I wrote this express-imgwiz to make it easy for the job, it can:

\- Format image to .jpg, .png, .tiff, or .webp (lighter and recommeded by PageSpeed) \- Resizes height, width with position option (convenient to optimize for responsive websites) \- Sharpen or blur Demo url: [https://wiz.saltar.co/photos/?url=https://i.imgur.com/MBDUWN...](https://wiz.saltar.co/photos/?url=https://i.imgur.com/MBDUWNw.jpg&sharpen=true&fm=webp&h=50)

The library provides both as middleware or handler for expressjs.

Feedbacks are welcome and appreciated!</comment>