Live data from Hacker News

Trains in Switzerland are not allowed to have 256 axles

twitter.com

41–50 of 92 posts

Re: Trains in Switzerland are not allowed to have 256 axles

#41
post #28

TIL: Per the article, this 256 limitation also applies to number of users in WhatsApp conversations and the maximum block height of a Minecraft world.

Also reminds me of the maximum amount of coins you can have in runescape: 2.147B. They even created silver coins worth 1000 normal coins as a workaround for people who get to a “max cash stack”. (Max value in java, even though the game is non longer written in Java)

The language is irrelevant; this is the maximum value of a 32-bit signed integer. Specifically, 2,147,483,647.

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.

Re: Trains in Switzerland are not allowed to have 256 axles

#42
post #2

To save you the click through: > 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…

"There have been plenty of times where a hardware issue has been covered by a software fix, but only in Switzerland have I seen a bug fixed with a bureaucracy patch." 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 ru…

It's also a silly quote because people workaround broken software all the time.

Re: Trains in Switzerland are not allowed to have 256 axles

#43

In similar news, popular athletic app Strava has announced that they will be dropping Bluetooth support because of an issue with their code. https://support.strava.com/hc/en-us/articles/360032979131-Re... 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 e…

They obviously have a head and tail indicator already, so they don't merge all the trains together. The issue is that they overload the axle mod 256 counter with the train indicator, instead of using a separate byte.

Re: Trains in Switzerland are not allowed to have 256 axles

#44

The "fixed with bureaucracy" thing is entertaining, but it's probably a delusion that the fix is effective. 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,…

What if Swiss trains consist of 30-40 cars at most? Then the rule is purely technical and doesn't even have to be remembered.

Re: Trains in Switzerland are not allowed to have 256 axles

#45
post #28

TIL: Per the article, this 256 limitation also applies to number of users in WhatsApp conversations and the maximum block height of a Minecraft world.

Also reminds me of the maximum amount of coins you can have in runescape: 2.147B. They even created silver coins worth 1000 normal coins as a workaround for people who get to a “max cash stack”. (Max value in java, even though the game is non longer written in Java)

I think OSRS is still all Java, no?

Re: Trains in Switzerland are not allowed to have 256 axles

#46
post #44

The "fixed with bureaucracy" thing is entertaining, but it's probably a delusion that the fix is effective. 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,…

What if Swiss trains consist of 30-40 cars at most? Then the rule is purely technical and doesn't even have to be remembered.

Very fair point. As long as that condition holds, then I guess it's a non-issue.

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.

Re: Trains in Switzerland are not allowed to have 256 axles

#47
post #14

This section is not present in the 2015 or 2016 edition of the rulebook: https://www.bav.admin.ch/bav/de/home/rechtliches/rechtsgrund... Seems like overflow detection (or more bits) were added to the counters at some point.

Yep. They routinely run fairly long trains over the Lotschberg and Gotthard lines through the base tunnels that I’m pretty certain are approaching 256 axles, but I have yet to see any with more.

Most likely the main transalpine lines now allows >256 axles while other secondary lines have not been upgraded.

Re: Trains in Switzerland are not allowed to have 256 axles

#48
post #44

The "fixed with bureaucracy" thing is entertaining, but it's probably a delusion that the fix is effective. 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,…

What if Swiss trains consist of 30-40 cars at most? Then the rule is purely technical and doesn't even have to be remembered.

Actually, the longest regular Swiss trains seem to top out at 44 cars. This is because of passing siding lengths being much smaller than other countries such as the US. There are longer trains that are scheduled on routes with longer sidings however such as a the main north/south routes.

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.

Re: Trains in Switzerland are not allowed to have 256 axles

#49
post #24

If the law prohibits 256 axles, it should really prohibit any multiple of 256. A 512-axle train would similarly be erroneously detected as having zero axles.

That would be a freight train consisting of 128 units. Not likely in Europe, where the average freight train has 25 to 30 wagons, and the longest freight train seems to measure 835m, which will put you in the neighbourhood of 40 units. I'm not even sure that one would fit on the Swiss network; it runs or ran between Hamburg and Denmark, a route which features not quite as many elevation differences and tunnels.

Considering this, the chances of even hitting the lower 256 axle mark are probably negligibly remote as well.

Re: Trains in Switzerland are not allowed to have 256 axles

#50
post #48
post #44

Earlier quoted context omitted.

What if Swiss trains consist of 30-40 cars at most? Then the rule is purely technical and doesn't even have to be remembered.

Actually, the longest regular Swiss trains seem to top out at 44 cars. This is because of passing siding lengths being much smaller than other countries such as the US. There are longer trains that are scheduled on routes with longer sidings however such as a the main north/south routes. 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.

Yeah, a bit of light browsing yields a 25 to 30 unit average for European freight trains¹.

https://www.allianz-pro-schiene.de/themen/aktuell/740-meter-...

Post reply on HN