GPSBabel / gpsbabel

GPSBabel: convert, manipulate, and transfer data from GPS programs or GPS receivers. Open Source and supported on MacOS, Windows, Linux, and more. Pointy clicky GUI or a command line version...
https://www.gpsbabel.org
GNU General Public License v2.0
470 stars 125 forks source link

move floor to C++20 #1206

Closed tsteven4 closed 2 weeks ago

tsteven4 commented 10 months ago

drop Visual Studio 2017. use default member intializers for bit-fields. use std::numbers::pi, std::numbers::inv_pi

tsteven4 commented 2 weeks ago

We have difficulty with certain combinations of Qt and Xcode. Qt 6.5.3 doesn't work with Xcode 14.2, but works with 14.3.1. There are other problematic combinations as well.

moc fails with

Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/concept:318:1: error: Parse error at "::"

https://bugreports.qt.io/browse/QTBUG-117765 https://bugreports.qt.io/browse/QTBUG-118086

tsteven4 commented 2 weeks ago

@robertlipe the downside here is Qt 6.5.3 didn't work with Xcode 14.2. Qt had a fix in 6.5.4, but that isn't public. Alternatively Xcode 14.3.1 works.

robertlipe commented 2 weeks ago

Lovely. Thank you. I'd thought about dusting off #1207, but yours is (of course) in much better shape while mine was mostly "try all the things" mode. I may see if there's anything worth actually picking from it as I was mostly just experimenting with what was new. (I'd started a list a few days ago for another project) Offhand:

The colors of https://en.cppreference.com/w/cpp/20 are interesting. The narrowing and widening of this table from release to release is, too. Several of the players from the C++11 days are just gone. This project relies on those first five columns. I'm not certain we rely on anyplace other than MacOS that has Clang-only/primarily, so maybe we can mentally collapse those, but there's a very solid message that three years after formalization those columns are pretty solidly green. (The ones missing are legit hard ... and ones we don't care about.)

In a former job, we relied on products built on (because we were the ones building...) Edison and Intel tools. I'm legit surprised to see Nvidia and Cray representing actually making a strong go of their on on keeping up the with language "just" for their numeric computing world. C++ hasn't quite reached the complexity of web browsers where we have WebKit/Blink (where the former is a quite signncant fork) and Gecko as pretty much the only 2/3 distinct code bases capable of consuming that specification.

It's interesting the all of the entries on the left (general purpose computing) are multi-platform and all but one are open-source. We sure didn't see THAT coming in the 80's and 90's when a compiler seat license was $4500...and the one that's not open source but now a rather solid green column was so so incredibly terrible then.

Maybe the development and the developers have hit an equilibrium and pace where the survivors are actually keeping up with the produced standards... Yay? Still, I'm glad I'm not in the compiler business. Beyond EDG and MS, it's not clear there still even IS a compiler business since the other contestants are all propped up by platform sales and not really reliant upon sales of a purchaseable product called a "compiler".

Anyway...

I'm not that worried about building on old Macs. We haven't had anyone report that they were building on a Mac (or Windows) in many years.

My 2012 iMac (the first Ivy Bridge ones with the thin edges that make them Extra Hard to work on) hasn't been able to build GPSBabel well in a long time. My M1 handles it like a breeze. If Tim Apple doesn't mess it up and I can get a M4 Mini in Q4 or so, I'll be looking for one of those - and a new monitor to replace this perfectly lovely one that's attached to it since they REMOVED the ability to use target display. (Hmm. Maybe i could boot from an ancient OS and run it as a Thunderbolt monitor...) Four 3.4Ghz cores with 33G is still not a bad computing environment, if only it ran a supported OS. I'm annoyed that they don't support older hardware than they do, but that's the tradeoff.

tsteven4 commented 2 weeks ago
  • If I were building GPSBabel from scratch today, lat and lon would have unique types as would radians and degrees. Multiplying something bo 90_d to get a quarter turn and not pass the wrong "double" to things like grt_circle_distance() would be so nice. But not nice enough to open the code up and try to retrofit it.

There is a least one outstanding related bug. The bend filter passes locations in radians to linepart. and expects the returned position to be in radians.

tsteven4 commented 2 weeks ago

another bug, simplify passes locations in degrees to gcdist.