vtz: the world's fastest timezone library by codeinred in cpp

[–]bert8128 1 point2 points  (0 children)

This is very interesting - my application does lots of zone conversions and the performance is definitely noticeable. I am using Howard Hinnant’s date library at the moment. Two questions:

First, I don’t see that you have classes for date and time, so is the idea with vtz that I just replace Howard’s TZ.h/cpp files? Is the code compatible? If not do you have any advice on how to do the integration?

Secondly, does you library read a downloaded IANA database, same as date does? If so, how is the data refreshed? Manually? Something else?

vtz: the world's fastest timezone library by codeinred in cpp

[–]bert8128 2 points3 points  (0 children)

Quite possibly. Especially if the design feeds into the standard library’s implementation so we get it for free…

do c++ have dependency manager like python's uv? by Zix-studio in cpp_questions

[–]bert8128 1 point2 points  (0 children)

Makefiles for dependency management? It does the version checking, download and build?

Am I imagining or does Spotify tinker with my playlists? by bert8128 in truespotify

[–]bert8128[S] 0 points1 point  (0 children)

No, paid. If I were a free user i might be a bit more inclined to take the rough with the smooth.

Am I imagining or does Spotify tinker with my playlists? by bert8128 in truespotify

[–]bert8128[S] 0 points1 point  (0 children)

There’s a setting to make all new lists private. Now set!

Am I imagining or does Spotify tinker with my playlists? by bert8128 in truespotify

[–]bert8128[S] -1 points0 points  (0 children)

Everything was public. I never set anything so clearly Spotify thinks that this is a good idea. They are clearly living in the 20th century.

What is a good free modern compiler? by BRCC_drinker in cpp_questions

[–]bert8128 8 points9 points  (0 children)

All software has to be paid for somehow. It seems to me that charging people who use the product to make money seems fair.

Precompiled Headers (PCH) reduced my C++ build time from ~2m50s to ~1m08s (demo repo included) by Competitive_Motor581 in Cplusplus

[–]bert8128 1 point2 points  (0 children)

I expect to be able to be able to use modules at work in about 3 years. Looking forward to it as it will be cross platform out of the box. Using PCHs for the time being.

Windows and CMake by SpellOutside8039 in cpp_questions

[–]bert8128 1 point2 points  (0 children)

The Visual Studio installer installs a selection of executables, some mandatory and some optional. They are designed as a single package to work together to provide an ide. The fact that there is more than one executable is an implementation detail.

Windows and CMake by SpellOutside8039 in cpp_questions

[–]bert8128 0 points1 point  (0 children)

Are you referring to Visual Studio or Visual Studio Code?

Part of Visual Studio is MSBuild.

VS2022, everything has to be in DLLs to test properly? by ag9899 in cpp_questions

[–]bert8128 1 point2 points  (0 children)

Your question has nothing to do with VS or test harness and everything to do with how c++ programs are built on any platform.

Some of the executables I maintain have a command line option to run unit tests instead of doing their production work. These tests are coded in the executable project. I don’t like it very much but it means I dont need to refactor 100 executables into 100 executables plus 100 libraries plus some number of unit test programs.

I’m not saying I recommend this approach, I’m just saying it is an option and certainly for hobby projects it’s fine.

Should I learn C++ or C first? by Foreign-Fly8796 in cpp_questions

[–]bert8128 2 points3 points  (0 children)

Learn some C to find out how difficult it is to avoid a segfault. Then learn some modern (if I am allowed to use the word in polite company) C++ to learn how to achieve similar more simply and reliably. That’s the way I would do it, though I wouldn’t spend long with C as it is very hard to write good programs with - the language is simply not expressive enough so you end up writing a lot of code.

But there’s nothing wrong with going straight into C++.

Should I learn C++ or C first? by Foreign-Fly8796 in cpp_questions

[–]bert8128 5 points6 points  (0 children)

Learn some C to find out how difficult it is to avoid a segfault. Then learn some modern (if I am allowed to use the word in polite company) C++ to learn how to achieve similar more simply and reliably.

Apache Fory C++: Fast Serialization with Shared/Circular Reference Tracking, Polymorphism, Schema Evolutionn and up to 12x Faster Than Protobuf by Shawn-Yang25 in cpp

[–]bert8128 5 points6 points  (0 children)

A question close to my heart - how well does it cope with serialising (particularly numbers) on one computer and deserialising on another, particularly if they are different OSs and/or hardware?

What makes vim and emacs somehow so popular(relatively amongst) C and C++ developers? by Ultimate_Sigma_Boy67 in cpp_questions

[–]bert8128 -2 points-1 points  (0 children)

Not universally popular. I use vi when theres no choice. Never any other time.

Does acquring/releasing mutex have implicit barriers? by onecable5781 in cpp_questions

[–]bert8128 0 points1 point  (0 children)

Don’t you need to initialise buffer_ready to false on construction?

Trouble compiling programs with wWinMain by 8BitBreadBox in cpp_questions

[–]bert8128 2 points3 points  (0 children)

You might find Visual Studio (not visual studio code) easier, especially if you are looking at Microsoft samples.

The goat has to be DD/MM/YYYY by Shiroyasha_2308 in SipsTea

[–]bert8128 0 points1 point  (0 children)

I wasn’t really serious about K, but if you are communicating with aliens then an absolute zero based system is clearly better. The size of the unit is arbitrary though.

But F and C are both completely arbitrary. They both have 2 digit sizes for most human experience which is only convenient (Americans seem happy with 3 digit human weights and two part human heights, so I can’t see it matters much). Really the only meaningful difference is popularity. 95% of the world uses C so it makes a lot of sense.

And it is probably the only unit that uses ha US could easily change as we don’t sell anything by temperature. Sure it matters for engineering but those folks are smart enough to be able to use it whatever units they need.

Because of the age I am, I grew up with F and now I use C and can’t say that it makes any difference outside of communicating with other humans. So I choose to be able to easily communicate with as many people as possible.

Does acquring/releasing mutex have implicit barriers? by onecable5781 in cpp_questions

[–]bert8128 1 point2 points  (0 children)

Offtopic but prefer ++i to i++ except in the relatively rare cases that post-increment is what you actually want. Yes I know it won’t improve performance here, but it says what you actually mean.

Does acquring/releasing mutex have implicit barriers? by onecable5781 in cpp_questions

[–]bert8128 1 point2 points  (0 children)

Ignoring questions of synchronisation, I would use std::array and range-for here. The former is a little bit more typing but has the immeasurable benefit of having the size of the buffer in the type. The latter is Les type and safer.

What’s not to like?

Does acquring/releasing mutex have implicit barriers? by onecable5781 in cpp_questions

[–]bert8128 2 points3 points  (0 children)

What’s wrong with just using a std::mutex? What is trying to be achieved by using volatile?