Show HN: Performant intracontinental public transport routing in Rust (github.com)
I made a public transport route planning program that's capable of planning journeys across Europe or North America! There's only one other FOSS project I know of (MOTIS/Transitous) that can do transit routing at this scale, and in the testing I've performed mine is about 50x faster. I've spent a few weeks on this project now and it's getting to the point where I can show it off, but the API responses need a lot of work before they're usable for any downstream application.
Example query (Berlin to Barcelona): https://farebox.airmail.rs/plan/52.5176122,13.4180261/41.380...
There are some bugs still. Notably, it's not capable of planning the return trip for this route, nor the reverse of the trip from Seattle to NYC that I gave in the blog post.
Blog post: https://blog.ellenhp.me/performant-intracontinental-transit-...
Repo: https://github.com/ellenhp/farebox
Side-note but in the past some have criticized my writing style and it's been a bit hurtful at times but if you have constructive feedback on the blog post I'd appreciate it. I'm trying to get better at writing. :)
25 comments
[ 4.6 ms ] story [ 75.2 ms ] threadBut, bus from New York to St Louis and then backtrack on Amtrak. Ouch. I know the train options from NYP to CHI are slow, but I didn’t think they’re that slow (they’re not)! Nevermind having to take a greyhound for 1000 miles.
edit: also if you look at the Berlin to Barcelona trip you'll see a bus, which makes no sense to me whatsoever, so I suspect that some of the high speed rail trips didn't make it from the GTFS feed into the packed timetable that I'm serving itineraries from.
Hopefully, the existence of a black-box oracle makes it easier to find out where the gaps are.
[edit] As someone who reads and writes (and reviews) a ton of writing and technical documentation -- and is very picky about it -- there is nothing at all wrong with this writing style. Literally my only nit is consider incorporating URL shortening, I always bristle at %20 in URIs. Especially ones that wrap.
https://git.sr.ht/~mil/mobroute
https://git.sr.ht/~mil/transito
https://www.eurail.com/en/plan-your-trip/rail-planner-app
Nobody would say “Performant intracontinental public transport routing in C++”, or any other combination. It’s just something around the Rust language.
Turns out people do, actually: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
Obviously it's rarer with C++ than with Rust, but it happens in the same proportion with pretty much every language when its on a popularity boom (we've seen that with JavaScript a decade ago, then Go and python, now Rust).
If you were reading an article about a concrete bridge you wouldn't expect "New bridge built out of concrete!" would you? But "New bridge built from 3D printed stainless steel!" is a perfectly reasonable title.
Why would you post this before checking?
https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
Even without checking it makes sense to post "written in C++" (same as written in Rust).
I wonder if some people are lazy to think or just driven by emotions.
Great work :) Nice to see alternatives poping up. There used to be navitia https://github.com/hove-io/navitia/ but its company is slowing closing thing, so I would not bet on it for the future.
I’m a co-maintainer of gtfs-structures, if you have any feedback using that crate I’ll be glad to hear from you (specially since you consume a lot of different gtfs, you must have tripped on some issues).
Just out of curiosity, did you consider other algorithms, like CSA? It’s been a while I’m out of the algorithmical stuff, so I’m just wondering pros and cons of different algorithms.
https://news.ycombinator.com/item?id=42407250
A lot of writing advice out there is... weird. There seem to be a couple different varieties. One is "first year university students do X too much, so nobody should do X at all!" This advice is usually "directionally correct" for many writers, but it shouldn't be taken as an absolute. The book Style offers better balanced versions of much of this advice. For example, it shows several examples of when the passive voice can actually increase clarity.
The other bit of weirdness in English-language writing advice goes back several centuries. There was supposedly an "arms race" of grammar advice, where each writer tried to ban more things than the next. The result of this was a bunch of rules that nobody has ever actually followed. Strunk and White is notoriously guilty of this. E.B. White was an excellent writer, but he routinely ignored the rules he proposed. Sometimes he ignored the rules on the very page where he proposed them! This kind of constantly-ignored advice is suspicious, because writing advice should ultimately be based on the common practices of well-respected writers, not on "zombie rules" that have been passed down for centuries without ever having been obeyed.
One good source for telling the "zombie rules" from the useful ones is Merriam-Webster's Dictionary of English Usage. This categorizes advice into rules that good writers actually obey consistently, rules which affect how formal your writing feels, and rules which have no basis in actual practice.
Weirdly, this tendency towards "zombie rules" may be less of an issue in other languages. For all that English-speakers love to make fun of the Académie Française, the Académie's grammar advice seems to be a lot more evidence-based, or at least focused on the well-established differences between spoken and written French.
I tried entering some coordinates as input, but it returned an empty array instead. I’m wondering if this means there’s currently no public transport route added around that location.
(minor) fyi: It works with multiple, comma separated GTFS files.
I may also be conflating inter-agency routing with ingestion of multiple feeds.