Trains in Switzerland are not allowed to have 256 axles
twitter.com
twitter.com
> This may be a great obscure fact, but it is not an example of European regulations gone mad. To keep track of where all the trains are on the Swiss rail network, there are detectors positioned around the rails. They are simple detectors that are activated when a wheel goes over a rail, and they count how many wheels there are to provide some basic information about the train which has just passed. Unfortunately, they keep track of the number of wheels using an 8-digit binary number, and when that number reaches 11111111 it rolls over to 00000000. Any trains which bring the count back to exactly zero move around undetected, as phantom trains.
From: "Humble Pi: A comedy of maths errors" by Matt Parker (https://mathsgear.co.uk/collections/books/products/humble-pi...), page 191.
edit: Added quote attribution.
That's an amusing perspective, but it actually looks like it might be a hardware issue that cannot be patched purely with software, as it arises in the trackside devices that detect passing trains.
I hope the method for verifying compliance with this rule does not suffer from the same problem (it may be moot: a train of 64 20 meter wagons would approach 1.5 km in length; not unusual in some places, but perhaps not Europe.)
It is a bit of a stretch, but Boeing's MCAS problem might be also classed as a software issue 'fixed' with a bureaucracy patch, as the failure to make use of the available hardware to make the MCAS software fault-tolerant was 'patched' with an FAR directing pilots to the existing trim runaway procedure.
Strava aren't fixing the bugs, just dropping the feature altogether. They even admit that other athletic apps implement Bluetooth without bugs, so it's not a platform limitation.
So sometimes people decide that an easy fix is a better choice than a "correct" fix, which would be either adding bits to the train axle counter, or implementing a way that didn't care how many axles there were- such as having a head and tail indicator for a train, and not counting the axles in between.
Most likely the main transalpine lines now allows >256 axles while other secondary lines have not been upgraded.
Signed number (just 64bit) is the correct number type for such operations.
it allows for comparison with errors. Working with unsigned numbers is error prone... and I started with 6502 that didn't have signed numbers.
The idea is preventing the overflow by being able to check for negatives easily. Having negative gold is likely better than leaving someone with 4billons of. For instance stuff like "max(0, balance)" just doesn't work with unsigned ones.
There was one player who managed to kill so many new players that his 32bit karma turned negative via integer overflow and he was free from all the filthy red status.
(Max value in java, even though the game is non longer written in Java)
Java (and other languages) have other ways of representing numbers which allow larger values, but once you've encoded values into wire protocols and persistent data structures, they tend to be hard to change.
But that limitation makes no sense for WhatsApp user limit count. Presumably every user has an id number identifying them (maybe a long integer). You need to maintain a list of these users so your array is already way larger than 8 bits.
Can someone intuit why the 256 limit in WhatsApp?
From personal experience people there seem to follow the rules very meticulously.
Why Japan’s Rail Workers Point at Things - 959 points: https://news.ycombinator.com/item?id=14011793
I should start doing it with shampoo when I shower.
Considering this, the chances of even hitting the lower 256 axle mark are probably negligibly remote as well.
But yes, this is probably not an issue in Europe.
So while the train is within that segment, the value of the counter is non-zero. Once they exit, all the axles should get counted again in the opposite direction and reset the count to zero.
The problem with 256 is that the count would be at zero while you were in the track segment.
In theory we could still have a 512 axle ghost train.
For one thing, this rule is not intuitive and people aren't likely to remember it. People have an easier time remembering and following rules whose reasoning clicks with them. It's not a recipe for success to say, "Oh, there's this one weird thing that you can't do, and it isn't going to make sense to you why, but remember not to do it."
I also wonder whether, even if someone in the industry does know the rule and really wants to follow it, there's an easy method to know whether their train has 256 axles. Is there a procedure in which axles are counted or an automated system that does it? If it's a manual procedure, is it time-consuming and is there pressure to skip that step when you're in a rush?
And, if a fallible human being should make a mistake and run a train with 256 axles, is there any protection against the phantom, undetected train scenario, or is it a silent failure?
There are apparently trains bigger than that in some parts of the world (such as the US and Australia) but maybe conditions in Switzerland prevent that from happening? This is way beyond my level of knowledge though.
Most European trains rarely exceed 22 cars for the same reasons as they have to be able to be passed by express trains in stations.
https://www.allianz-pro-schiene.de/themen/aktuell/740-meter-...
Freight trains of 1000 meters are exceptional in Europe. You would need an axle every 4 meters to come up to 256.
The axle limit is completely theoretical. The are plenty of other limits a train would exceed before.
> "Any trains which bring the count back to exactly zero move around undetected, as phantom trains."
https://en.m.wikipedia.org/wiki/Handcar
:D
I'm surprised they didn't also ban 255 and 257!
Why does Norway do it? When their ships pull into home port, they Scandinavian. ;)