HNHacker News
TopNewBestAskShowJobs

xxgreg

258 karma · joined September 9, 2011

submissionscomments
xxgreg··on No Abstractions: our API design principle
Don't use floats if you're trying to represent an exact value, i.e. someones bank account. But in financial modelling you're generally dealing in probabilistic "expected values", it's common and fine to use floats.

Having said that, half the world seems to run on Excel spreadsheets, which are full of money values, and Excel is basically all floats (with some funky precision logic to make it deterministic - would be curious to know more).

https://stackoverflow.com/questions/2815407/can-someone-conf...

xxgreg··on Internals of Go's new fuzzing system
If given a question about reversing a string, it lets you ask the interviewer questions like:

* Do you want to do it in-place or as a copy?

* Is it an ASCII or Unicode string? If using Unicode, I assume you want to reverse on grapheme cluster boundaries?

Asking these questions let you as a candidate demonstrate your knowledge.

If the candidate doesn't ask these questions, the interviewer can ask follow up questions like.

* What is the time/space complexity of the algorithm? (Easy answer!)

* How does this work with UTF strings?

I don't particularly like the question, but have been in interviews where this exact question was used. From the discussion with the candidate it did very quickly weed out inexperienced developers. I was amazed at how many people applied for roles and had no knowledge of these concepts.

> Do you actually reverse strings here?

We've also tried doing more in-depth code exercises, which are more applicable to our business domain. That didn't work much better, and required upfront work from the candidate, which isn't always fair on them.

Anyways - happily not involved in the recruiting process any more.

xxgreg··on The world’s biggest offshore wind farm, Hornsea 2, generates first power
Thanks for taking the time to write these comments.

In my opinion, existing tech is able to solve the climate crisis. Breakthroughs can make the solution cheaper and sooner.

In my view the main problem is the attitude of doom amongst the general population. If people felt there was a solution, and were excited and energised by the challenge, they'd be more willing to support political changes. I.e. pushing back against entrenched obstructionist industries, pricing externalities, and investing in infrastructure.

xxgreg··on Consumer electricity prices in Germany climb to record high: 45-80 Cents/kwh
The cause is a political battle with Putin over gas. Russia has traditionally used gas contracts with individual countries to buy political influence.

Now the EU has a single gas market, and had upgraded pipelines to be used in reverse directions. For example, recently since gas transport from Russia to Poland was reduced, Germany has been exporting gas to Poland.

Putin is testing Germany's new government and the EU leadership.

More renewables, and using gas more efficiently, i.e better insulated buildings throughout the EU will solve this.

New nuclear isn't going to happen much in the EU, and existing nuclear is only a small part of EU wide generation, and becoming increasingly unreliable. France has even higher electricity prices ATM due to nuclear outages.

https://www.spglobal.com/platts/en/market-insights/latest-ne...

xxgreg··on Germany is closing half of its reactors before the end of the year
Primary energy consumption isn't a great metric for comparing with renewable electricity, since for conventional plants it includes the unused energy lost as heat.

A fossil power plant wastes ~60% of the energy, a nuclear plant ~75%, a small petrol engine ~75%. Once you take this into account, the stats look a little better.

xxgreg··on Third High Severity CVE in Log4j Is Published
There's also ongoing work to build a dependency vulnerability database. This is proposed to be surfaced via a built in `go audit` command.

https://go.googlesource.com/proposal/+/master/design/draft-v...

xxgreg··on The chip shortage keeps getting worse – why can't we just make more?
hmmm interesting - here's an article.

https://qz.com/2004569/the-global-chip-shortage-can-be-expla...

xxgreg··on The chip shortage keeps getting worse – why can't we just make more?
All of the car companies, dialed down orders at the start of the pandemic. Now they are all trying to stockpile chips, due to not enough supply. I imagine (no data to support) the increased size stockpiles are a large part of what makes the problem worse. Kinda like TP really.

Also, Toyota is now cutting 40 percent of global production due to chip shortage.

https://www.bbc.com/news/business-58266794

xxgreg··on New Zealand Covid-19 Delta outbreak spreading rapidly as cases jump
Travel was open with Australia until the recent outbreak there. Using virus genome sequencing, this outbreak has been traced to a New Zealander who caught the virus in Sydney, and spent 2 weeks in a quarantine centre in Auckland.

It's not yet known how the virus escaped the quarantine centre. None of the quarantine centre staff have tested positive, despite being tested multiple times.

It's suspected that the transmission occurred by somebody walking near the hotel while the initial case was arriving, or in a fenced off outdoor exercise area.

6 people walked by on CCTV at this point. 4 have been contacted, but 2 haven't been identified.

Also worth noting, the border isn't completely closed. There is a steady stream of returning New Zealanders, and also exceptions for some workers. Everyone does a 2 week quarantine stay on entering the country. Some of these people test positive for Corona, but so far it hasn't escaped a quarantine centre. Looks like Delta is harder to contain.

xxgreg··on A Tour of the Fuchsia Operating System [video]
There's also ongoing development on "starnix" which aims to run unmodified Linux binaries.
xxgreg··on Merkel: Germany has not done enough to hit Paris climate targets
I hope France finds a path forward. Last I read it's sitting on an aging fleet of reactors, and failing to build new ones in a timely manner.

The big German power companies definitely have a lot to answer for. At least there is now an agreed timeline to shut off all the coal plants.

xxgreg··on Merkel: Germany has not done enough to hit Paris climate targets
Where is the big increase in coal? If you look at the stats coal use is down.

https://www.cleanenergywire.org/sites/default/files/styles/g...

What is not well known in the Anglosphere is that the German nuclear phase-out was actually legislated around 2000, and not in 2011 after Fukushima.

In 2011 Merkel extended the phase-out end date by ~10 years, which was democratically very unpopular. 3-months later Fukushima happened, and the phase-out went back to an end-date similar to the original.

More charts here: https://www.cleanenergywire.org/factsheets/germanys-energy-c...

xxgreg··on From Spain to Germany, farmers warn of fresh food shortages
NZ Crayfish are called Rock Lobster in the US.

http://www.leefishusa.com/products/lobster/spiny

xxgreg··on We need to take CO2 out of the sky – an overview of climate tech
It is phrased this way because the changing climate is what negatively affects civilization.

While it is an energy imbalance which causes the climate to change, modifying the energy input or output via geoengineering will also cause the climate to change, even if the overall balance stays the same.

xxgreg··on We need to take CO2 out of the sky – an overview of climate tech
Pedantic answer... You could start at 0 Kelvin.

https://en.wikipedia.org/wiki/Absolute_zero

xxgreg··on We need to take CO2 out of the sky – an overview of climate tech
China has piloted a number of carbon pricing schemes since 2013. It is introducing a nationwide scheme this year. https://www.reuters.com/article/climate-change-china-idUSL3N...
xxgreg··on Federal safety official slams Tesla, regulators for misuse of its Autopilot tech
"An autopilot is a system used to control the trajectory of an aircraft, marine craft or spacecraft without constant manual control by a human operator being required. Autopilots do not replace human operators, but instead they assist them in controlling the vehicle."

https://en.wikipedia.org/wiki/Autopilot

xxgreg··on Japan Turns to Coal After Closing Nuclear Power Plants
Another chart... Note some stats are percentage of consumption, others are percentage of generation. These differ due to imports and exports.

https://www.cleanenergywire.org/sites/default/files/styles/g...

xxgreg··on Japan Turns to Coal After Closing Nuclear Power Plants
This assumes that the nuclear reactors could ramp up and down on a daily basis. Germany's reactors weren't capable of load following to the extent required.

In fact brokdorf was taken offline early due to a failure during a load following experiment. It was only ramping by a small percentage of load.

It's more likely that keeping the reactors online would have made the coal phaseout negotiations harder, and made it easier for the big four power companies to prevent renewables from being deployed.

In my view it's more important to build up industry capable of constantly deploying new zero carbon generation, and exporting this technology, than to keep the reactors running for more than 35 years (the phase out agreement).

xxgreg··on Japan Turns to Coal After Closing Nuclear Power Plants
Most of Japan's electricity is from imported LNG, so doesn't make much difference to independence. They already import this energy.
xxgreg··on Japan Turns to Coal After Closing Nuclear Power Plants
You can convert electricity, water and CO2 to fuels, such as hydrogen and natgas. These fuels can then be transported.

There are significant energy losses if all you want on the other end is electricity. But not so bad if you're burning it for heat.

In theory a nuclear reactor could produce both electricity and heat to produce synthetic fuels, making it more cost effective than renewables.

For electricity only it looks like renewables are significantly cheaper however.

xxgreg··on Japan Turns to Coal After Closing Nuclear Power Plants
Phrase it how you will, but this chart shows it clearly.

https://www.cleanenergywire.org/sites/default/files/styles/g...

xxgreg··on Japan Turns to Coal After Closing Nuclear Power Plants
The same thing did not happen in Germany. The increase in renewables more than made up for the decrease in nuclear.

https://www.cleanenergywire.org/sites/default/files/styles/g...

Also interesting, between 2000 and 2010, before Fukushima, Japan had a large increase in coal use.

xxgreg··on Germany eyes new offshore wind farms dedicated to green hydrogen production
Many European gas systems were designed for town gas, produced from coal. This has a significant hydrogen component. So these systems can accommodate something like 15% hydrogen.

There are also a number of existing hydrogen pipelines in operation. One of which was first built in the the 30s.

xxgreg··on Germany eyes new offshore wind farms dedicated to green hydrogen production
There is already a lot hydrogen use by German industry. Including a 240km pipeline built and in operation since the 30s.

The first step will be replacing hydrogen from fossil sources with renewable. This also provides industry which cannot be electrified a path to low carbon emissions.

xxgreg··on Germany eyes new offshore wind farms dedicated to green hydrogen production
Yes - the article states that electricity is more efficiently used directly.

Hydrogen is valuable for other processes such producing steel, high temperature heat, and chemicals.

German industry already uses large amounts of hydrogen produced from fossil methane. The first step will be to replace this with renewable hydrogen.

Interesting fact: Germany has a few 100km of hydrogen pipelines which have been in operation since the 1930s.

xxgreg··on Germany Phased Out Nuclear Power and Deadly Emissions Spiked
The data paints a different picture.

https://www.cleanenergywire.org/sites/default/files/styles/g...

https://www.cleanenergywire.org/sites/default/files/styles/g...

https://www.eea.europa.eu/data-and-maps/daviz/co2-emission-i...

xxgreg··on Germany looks to step up coal exit timetable
I disagree. This looks entirely achievable if existing trends continue.

https://www.cleanenergywire.org/sites/default/files/styles/g...

xxgreg··on Germany is moving beyond nuclear power, but at what cost?
Regarding the Greens. They will be more willing to push back against the German car industry which should lead to increased reductions in transport emissions. Other sectors are likely similar.
xxgreg··on Germany is moving beyond nuclear power, but at what cost?
Wind and solar, plus the already existing 6gw of pumped storage and increased curtailment gets you to 80 percent. The remaining 20 percent requires more storage.

Batteries can help to some extent for shifting day to day peaks.

Seasonal storage is more tricky. Germany has about 3 months worth of natgas stored in underground caverns. One approach would be to use this to store syntheticly produced gases from electrolysis.

Note so far everyone here is talking about electricity which only makes up a third of Germany's emissions.

Synthetic gases (non-fossil) will be required for high temperature heat, and chemical feedstocks for industry. For example some steel smelters in Germany are transitioning from coal to hydrogen.

Nuclear is a poor fit to an electrical grid which is mostly renewable for both economic and technical reasons. However it may be a good fit for running synthetic gas plants which can use both the heat and electricity and require 24/7 energy.

Page 1 of 6Next →