HNHacker News
TopNewBestAskShowJobs

tda

2,807 karma · joined October 26, 2016

submissionscomments
tda··on SciPy 1.0: fundamental algorithms for scientific computing in Python
I've had this experience when writing a simple algorithm for run length encoding, a problem which I struggled to vectorize. Compare the numpy algo with pure python:

  def rle_encode_pure_python(sequence):
    """Run length encode array."""
    previous = sequence[0]
    count = 1
    out = []
    for element in sequence[1:]:
        if element == previous:
            count += 1
        else:
            out.append((count, previous))
            previous = element
            count = 1
    out.append((count, previous))
    return out


  def rle_encode_numpy(sequence):
    diffs = np.concatenate(( np.array((True, )), np.diff(sequence)!=0))
    indices = np.concatenate((np.where(diffs)[0],np.array((sequence.size, ))))
    counts = np.diff(indices).astype('uint16')
    values = sequence[diffs].astype('uint8')
    return np.rec.fromarrays((counts, values),names=('count','value'))

The numpy version is faster, but a lot less legible (and makes some assumptions about data types and array length). Luckily the pure python version can be jitted with numba and is faster than numpy.
tda··on Some cities that took on a traffic safety challenge are seeing fatalities go up
No you wouldn't: a car-pedestrian accident at 30km/h gives you about a 5% chance to die. https://ec.europa.eu/transport/road_safety/specialist/knowle...

With a bicycle I'm quite sure the odds of a fatality are <<1%

tda··on Stepping Feet Illusion
Great, I was just wondering what the stripe width influence was on the illusion, made it very easy to find out
tda··on The Failure of the iPad
how about take a picture of something and sending it to someone. Camera's are not only used for selfies, lots of inspection work basically requires to take a picture and submit it. The workflow snap picture with camera -> eject sdcard -> insert sd card -> photo app for resize -> email attachment is really slow and inconvenient compared to add attachment -> snap picture -> send
tda··on US pressured Dutch Safety Board to downplay tech faults in 2009 Boeing 737 crash
Relevant comment from yesterday: https://news.ycombinator.com/item?id=22101953

"Even a fix now proposed for the Max has similarities with the past: After the crash near Amsterdam, the F.A.A. required airlines to install a software update for the NG that compared data from the plane’s two sensors, rather than relying on just one. The software change Boeing has developed for the Max also compares data from two sensors.

Critically, in the case of the NG, Boeing had already developed the software fix well before the Turkish Airlines crash, including it on new planes starting in 2006 and offering it as an optional update on hundreds of other aircraft. But for some older jets, including the one that crashed near Amsterdam, the update wouldn’t work, and Boeing did not develop a compatible version until after the accident."

tda··on The Afsluitdijk
Even today willow branch mats are still used. They are used primarily for support structures during construction so durability is not always an issue (though of course submerged wood lasts pretty long anyways).
tda··on The Afsluitdijk
Currently the afsluitdijk is undergoing a major upgrade. The hydraulic tests (scale 1:2) have just about been concluded. Unfortunately not too many videos are public, but found this short one https://m.youtube.com/watch?v=58W6870d1PM
tda··on When will the Netherlands disappear?
From memory I believe the "Ruimte voor de rivieren" project was designed for peak discharges of around 15k m3/s, but could very well be wrong there. Normal discharge is much much lower. Just wanted to see if the extreme scenario is remotely feasible (which I would say it is, though it's pretty far out).

But if there is enough buffer capacity then of course you only have to dimension the pumps for longer term average high discharge, and not peak discharge.

Edit: Just found this: https://edepot.wur.nl/84989

1/1250 year Rhine discharge at Lobith is found to be and as higher discharges will cause major flooding upstream instead of reaching Lobith directly this should be about the max to expect. Such a peak discharge would be part of a high water period with discharges up to 15 consecutive days of >10.000m3/s, so you would need a pretty big buffer.

tda··on When will the Netherlands disappear?
Just did a little bit of a napkin calculation, how much energy would it cost to pump the entire flow of the Rhine 2m higher?

2m head difference, 20_000m3/s flow Due to head difference: 1000kg/m3 * 20_000m3/s * 9.8kgm/s2 * 2m = 392MW

Accelerating to 5m/s: 0.5 * 1000kg/m3 * 20_000m3/s * (5m/s)^2 = 250MW

That is at 100% efficiency. But knowing a modern container vessel has 60MW installed power, and a large coal powerplant (we should be closing those by the way) is about 1GW, this is in the order of magnitude of achievable. Biggest pumps I know of are 5MW (and for higher pressure/velocity, not low pressure/high flow) but if we really wanted to this could be solved

tda··on When will the Netherlands disappear?
Yes, there are a few fringe areas that are likely to flood. But as we know that, that is not a problem. These areas are mostly uninhabited, have emergency procedures in place and are somewhat resilient (houses built on artificial mounds). Dealing with the known unknowns is relatively easy. Sometimes these areas flood, but seldom does it cause significant impact (loss of life, significant impact on economy). Taking into account all the known unknowns we have designed and built the greatest sea defense of history designed for 1:10.000 year conditions. And I am very confident this has been done properly (no expense spared).

I believe New Orleans was rebuilt with 1:100 year conditions in mind, and that was after Katrina. Nothing close to 1:10.000.

So are we safe then? A few years ago I would have said yes without a doubt. But now? It's the unknown unknowns I'm afraid of because they are by definition left out of the calculations to get to 1:10.000 year conditions, and we are only just beginning to discover what climate change really means. I'm afraid we "ain't seen nothing yet", and extrapolating from the past just won't cut it.

tda··on When will the Netherlands disappear?
thing is cat 5 hurricanes happen every year (and are thus not freak storms), just not here. In the parts of the world where these happen, people tend not to live below sea level so even poor islands eventually recover after being hit. Extrapolating form the current climate the probability for cat5 hurricane winds in NL is about zero, cause the mechanisms that cause these kinds of storms don't apply here. But as the climate changes, and the seas warm, you might see the general storm patterns change, and you might get into a different regime where such storms are possible. Take hurricane Lorenzo, the easternmost Category 5 Atlantic hurricane on record. What was previously unthinkable just happened last October. If you extrapolate from this trend (more frequent, more eastern hurricanes happening in the Atlantic), I think it looks a lot less unlikely that one of those monster will someday make it to the North Sea.

Same with sea level rise: the currently observed rate of change is very manageable, and even a factor 5 higher can probably be managed. But what if we reach (or have already reached) a tipping point in the climate system that causes rapid acceleration of sea level rise? The existence of these tipping points cannot be derived from historical (say last 1000 years) observations, and therefore one might conclude that they don't exist. I believe such reasoning is known as the black swan logical fallacy. But from my casual observations, we are entering uncharted territory now (greenhouse gas levels, sea temperature, changing weather patters, changing jet stream patterns), so who knows what will happen.

Last point, look at the temperature 40,7 °C reached just last summer. Until 2018 the highest recorded temperature was 38,4 °C (in 1947). Some say this was a huge outlier, I think this is the new normal. I would love to know the probability of this happening taking the weather observations from start of record until 2018, would be surprised it it in the 1:1.000.000 range.

edit: Of course someone did the math (in Dutch) https://www.knmi.nl/over-het-knmi/nieuws/hoe-bijzonder-zijn-...

tda··on When will the Netherlands disappear?
Indeed we won't be hit hardest or first, but consider this. Just about the entire Randstad is in a single "Dijkring" (Dijkring 14). And because a large part of the Randstad is flooded, if any part of the defense goes, it goes entirely. And as the Randstad is the economic heart of the country, the country will not recover. Also because it can't feasibly be evacuated. So flooding will happen in other places first, but the other places are above sea level and will get dry again. Or a few meters of coastline is lost. Not the Randstad, it will be flooded exactly once and stay flooded completely and forever. Lets just hope it will take a long time before it happens.
tda··on When will the Netherlands disappear?
I hope you're right, I expect the world to be in a very different place in a few decades and not for the better. I'm still under 40 so I'm keeping my options open; even though the chances are probably very low, the effect is also pretty extreme making the risk (probability * effect) approximately 0 * inf. I estimate the probability to be somewhat higher than 0, so therefore I believe the risk is significant.
tda··on When will the Netherlands disappear?
Just to be clear, I still enjoy and plan on living in the west for a long time. But there are quite a few theoretically possible regime changes that I am aware of (and probably even more that I am unaware of) to make me concerned about it. Any significant regime change (break with historic trends) will automatically invalidate all models/predictions/assumptions about our safety levels. Current design criterion is we should be safe for 1/10.000 year conditions.

And if all goes wrong, you better be in a low population density rich country that can handle a little warming (thinking of Sweden and Norway in particular) Better move there before everyone else does ;)

tda··on When will the Netherlands disappear?
Indeed the question is not if, but when the Netherlands will flood due too sea level rise. Unlike many other nations the Netherlands is managed in a way that it can potentially handle quite significant (I would say 1-3 meters) in the next couple of decades if necessary at high but bearable costs.

The cost of retreating to higher parts of the country would easily go into trillions of euro's, which compared to the +/- 1 billion euro spent on sea defense according to the latest "Deltaplan".

Until now most climate models put catastrophic (say 3m+) sea level rise at hundreds to thousands of years of now so we (I'm Dutch) should be alright.

However, I personally feel that there is a non negligible possibility that all the current models are wrong because they are more or less extrapolating current changes and conditions. There are several mechanisms that could cause runaway sea level rise in shorter timescales, think melting permafrost with methane, regime change of jet stream, regime change/stop of ocean currents.

And more importantly that sea level rise is IMHO the possibility of extreme storms hitting the North Sea. Last year we say a few of those cyclone/hurricanes that usually stay on the other side of the atlantic come our way. That was highly unusual, and even though Ireland and Portugal are still a long way from the Netnerlands, if if all of a sudden a super storm with 300 km/h winds hits us (highest record gust unitl now is only 173 km/h), then we are sure doomed.

I can't predict the future, but living in the potentially vulnerable west of the country, I'm glad my parents in law have nice bit of property in the east at 17m+ sea level. I intend to live another 50 years, a lot can happen in my lifetime

tda··on Returned online purchases often sent to landfill
Wow, I have had exactly this idea and it makes so much sense I was surprised I never heard anyone else come to this conclusion yet, but finally I seem to have found one. My idea in a nutshell:

tax only non renewable or finite resources and not labour

Finite resources include - land use (be it housing, leisure or agriculture though desirable locations should have higher taxes) - resources (metals, minerals) - fossil fuels

Not to be taxed: - labour - wealth (having money has no environmental impact. It's the spending that matters) - added value (get rid of VAT)

I feel like all tax systems are based on what is easy to be taxed, but I have never heard a good argument on why e.g. income should be taxed, but environmental impact not

tda··on A Week with Chauffeurs Showed the Major Flaw in a Self-Driving Car Future
If you think about it vehicles on asphalt/tyres (not buses as we know them) are superior to vehicles on tracks/steel wheels in every way (except rolling resistance). Vehicle to vehicle dista CE on the road can be as little as a few seconds, where on train tracks it is usually one to several minutes. Deadweight per passenger is in the range of 5-10x more for trainers vs buses. If a train breaks down, everything is blocked, on the road you just pull over and let others pass. I like to think that passenger rail is just an artifact of history/sunken cost phallacy, except maybe for underground high volume metro systems.

When looking over the vast 20 or so track wide rail intersection with multiple fly overs at Utrecht Central Station easily a minute can go by with not a single train passing, even in rush hour. And this is the busiest train station in the Netherlands. There is also a bus platform underneath which in a fraction of the space fits perhaps 20 (much smaller though) bus platforms.buses come and go continuously, largely over a single (two way) dedicated bus lane. This single road probably has a similar capacity as the twenty or so train tracks above, with extra long buses going by with minimal space between. If we were to pave the railway tracks we could have an incredibly safe and reliable transport system. Its actually quite a thing buses are already quite safe even though drivers make to long hours, share the road with many kinds of vehicles with mostly amateur (as in non professional) drivers, no central traffic control etc. Of course buses as we know it are not pleasant modes of transport, but that is probably only because they can also run on normal roads with sharp turns and traffic lights etc. I don't have the numbers to do a proper comparison but I think paving railroads could be quite an interesting business case

tda··on Offshore wind will be a $1T industry by 2040, but it's needed now
installed capacity equals power. That amount of power either is or isn't enough to power the states of California and New Jersey. The "for a year" part makes no sense in this context.
tda··on Offshore wind will be a $1T industry by 2040, but it's needed now
The better wind conditions help, but offshore wind is really expensive. Transport and install alone for a big offshore turbine can easily cost EUR 1-2M. Add to that undersea cables, higher maintenance costs (salt water, difficult access) and it is clear why onshore wind (if possible) is still the preferred choice. Nonetheless, mainly due to the up-scaling and abundance of available ocean space offshore wind has taken off in the last few years.
tda··on Offshore wind will be a $1T industry by 2040, but it's needed now
So disappointing journalists never understand the difference between power and energy. The opening sentences make me cringe so much I don't even want to read the rest of the article

> Last month the American wind industry hit a major milestone — 100 gigawatts of total installed capacity. That's enough electricity to power the state of California and New Jersey combined for one year.

tda··on Offshore wind will be a $1T industry by 2040, but it's needed now
Do you have some sources? All windfarms I know of are designed for at least 25 years. Not many have reached that age yet, so if they last is yet to be seen.

The first offshore wind farm Vindeby was decommissioned in 2016 (after 25 years) https://en.wikipedia.org/wiki/Vindeby_Offshore_Wind_Farm

In 2015 Yttre Stengrund (https://en.wikipedia.org/wiki/Yttre_Stengrund_offshore_wind_...) was decommissioned after only 14 years in service. But that was a really small park and the decision to do so was mainly economical as the turbines were rare and thus spare parts expensive. had just a few (<10) and really small (<2MW) turbines. Currently parks are designed/built with perhaps 100x9MW turbines. Because fo the scale differnece, older parks are reach end of life more for economical than purely technical reasons. The same reason why computers only lasted a few years in the early 2000's: they just became so much better so quickly that there was no economic point in holding on to them for more than that.

tda··on Offshore wind will be a $1T industry by 2040, but it's needed now
By far the most wind turbines have been built on land and for good reason: it's much cheaper. As long as there is space/not too many people complaining it makes more sense to build on land. Not sure exactly but on land installed wind is probably ~10x the installed capacity offshore. However on land turbines are pretty much maxed out at about 7,5MW, due to logistical difficulties of getting larger blades, towers and nacelles transported over the road. These limitations don't apply to offshore sites, so the up-scaling continues. In the last few years typical offshore turbines have grown to about 9MW, but that is not the limit. Within a few years we should see 12-15MW turbines being installed, which should bring the cost down. Combined with the better wind conditions offshore (at least around the North Sea) offshore wind may become cheaper than expanding on land.
tda··on Designing better data tables (2017)
I recently stumbled upon jExcel. I use it as an editable datatable that allows copy pasting to and from excel. That's what all my users end up doing anyway with any non trivial dataset, so might as wel make it look and behave as much as excel as possible
tda··on Update Complete: U.S. Nuclear Weapons No Longer Need Floppy Disks
I remember when my uncle showed me his Sony mavica. You could just take pictures, take out the disk and put in it your computer and the files where there. Viewing your own pictures on a pc was almost magical, as until digital cameras became common digital pictures were just pretty rare (I only had some stock pictures that came with software). Funny thing I still prefer the "put card from camera in computer" method to transfer pictures with my DSLR
tda··on ET Don't Phone Home
That sounds like home assistant icm with esphome. I flash all iot devices I buy with a firmware I trust (or at least is under my control) which is surprisingly easy to do with esphome. I pass a yaml file and a USBtty device to a docker and out comes a new firmware flashed to any of the hundreds of esp32 or esp8266 based iot devices. I have power metering wifi sockets and home brewed breadboards with sensors and 16A/240V power switches all flashed with a firmware the manufacturer has nothing to do with.
tda··on International Repair Day
Because of the cost of labour a lot of effort has been put into minimizing labour at the cost of capital (resources, automation etc). This again puts a negative pressure on wages as one would otherwise be automated away. By making labour cheaper there is less incentive to minimize labour at the cost of resource use (e.g. disposable products vs reusable ones that need maintenance). More demand for labour should increase wages for lower skilled labour. Less people would "drop out of the ratrace" so to say, as there is more demand for them. There is already implicit recognition for this in Europe. In the Netherlands it is very acceptable (albeit illegal) to not pay taxes for a cleaning lady. In Belgium there is asystem where everyone can get a few hours of subsidised household a week that negates the tax pressure, etc. But instead of all these small adjustments to make the tax system workable I would love there to be a wider debate on what the grounds for taxation should be. In my proposal you get taxed for what you consume in resources and land use, regardless what you use it for. I think that would be a pretty fair premise to start with, and perhaps a few exemptions are needed to make it work.
tda··on International Repair Day
There is plenty of energy available from the sun in one way or the other, and there is no inherent harm in utilising that. So in my ideal tax system only finite resources should be taxed, primarily land usage (including use for agriculture, and somehow based on demand) and raw materials (including oil, coal etc). Things like labour, "value added", energy use and co2 emissions would be exempt. Imagine hiring an expert to do repairs would cost about the same per hour as you can make after taxes. In North West Europe a plumber or painter typically costs you about twice what a programmer makes after taxes in the same time. Because of 50% tax on income + 20%VAT. So even if you are not so great at DIY it is (or seems) very often much cheaper to kludge it yourself that to hire an expert expert to do it for you. What a waste
tda··on International Repair Day
If we would decide to tax raw materials instead of labour and income, repair would make economic sense again. Raw material usage is not sustainable as the resources are finite. Labour on the other hand is very sustainable, given enough time the supply of labour is infinite and usage of labour is sustainable. What we tax and what not is not a given, but something that can and should be revised to gnudge the world into better shape. Even though I greatly sympasize with the right to repair, as long as it is uneconomical to do repairs due to incentives (taxation) making it so, we are not really addressing the root cause and one could argue that this repair day is distracting attention from the real issues
tda··on Most U.S. Dairy Cows Are Descended From Just Two Bulls
Especially because before 1950 the Gros Michel was about as popular as the Cavendish now. And then it got wiped out by a fungus so instead of diversifying, all banana plantations collectively switched to Cavendish. Now there is a new fungus the Cavendish is susceptible too, so perhaps in a few years we'll all be eating something else. Hopefully more than a single alternative variety is found this time...

https://en.wikipedia.org/wiki/Cavendish_banana: "After years of attempting to keep it out of the Americas, in mid-2019, Panama disease Tropical Race 4 (TR4), was discovered on banana farms in the coastal Caribbean region. With no fungicide effective against TR4, the Cavendish may meet the same fate as the Gros Michel."

tda··on Literally Suffocating in Meeting Rooms, A Little
Though it really depends on what you want to do with the data, I can really recommend to use esphome in combination with homeassistant/influxdb/grafana. You can configure the sensors with a simple yaml file, compile and upload to the chip and then add it to a homeassistant dashboard. Long term trends can be queried from influxdb and presented in a grafana dahboard
← PreviousPage 15 of 18Next →