« first day (3827 days earlier)      last day (1124 days later) » 

1:02 AM
Yeah, it's a funny opening FMPOV because it's thought to be a positional opening rather than an aggressive one yet it begins with giving up a pawn :).
 
1:15 AM
std::initializer_list should have a .empty()
 
1:59 AM
 
 
6 hours later…
8:22 AM
@sehe sasy?
 
 
1 hour later…
9:45 AM
Does anybody have real experience with introducing ranges in large codebase and how it affects compile times. I know I can compile toy examples, but IDK how it works in 100k-1M LOC codebase if we allow ppl "randomly" including <ranges>. If it matters I care about latest versions of MSVC/clang/gcc, but obviously any data point is valuable.
 
I don't have the experience, but I think that there are some articles around describing such experience
 
nwp
Optimizing code for compile time feels so bad to me.
It also brings a new meaning to "highly optimized code".
 
@Morwenn do you remember their titles, most stuff I see is just: hate on ranges since map reduce looks horrible, or some general intro stuff to ranges...

@nwp when you wait 20 min for build every time you touch a GOD header... not fun :)
 
nwp
Well, that's a separate issue to including ranges.
I understand that short compile times are a desirable property worth putting effort into, but still, "compile time driven development" just ... feels bad.
 
@NoSenseEtAl I don't remember at all
The state of compile time in C++ is rather sad ^^'
 
10:10 AM
@nwp yes, also CMake is terrible, concepts do not help with error messages... but I still like a lot of parts of C++ :)
But anways thatks for the replies, maybe somebody will see this and reply with their experiences.
 
 
1 hour later…
nwp
11:15 AM
if (const auto version = next(R"(Version: (?<version>\d+))").captured("version"); version != "1")
Should I add //checking version to the end of that line?
 
 
3 hours later…
2:12 PM
I'd probably use a helper function for parsing the version.
Maybe even a helper class with operators for comparison.
 
nwp
2:25 PM
I don't know. My next function is already such a helper function and I don't know what else I could put in there.
In theory I could reduce it to if ( next(R"(Version: (?<version>\d+))") == "1") if I parse the <id> (using regex probably :D).
Actually there probably is a way to get the first capture without knowing the id.
Actually then I don't need the ID and can just do if (next(R"(Version: (\d+))") == "1"). That looks almost reasonable.
Actually I can't because I need the value. So if (const auto version = next(R"(Version: (\d+))"); version != "1") is as good as it gets.
Editing regexes in code with regex should unlock an achievement.
 
 
7 hours later…
9:48 PM
With C++11 you can even clean up more with brace initialization: std::vector<std::string> ret{std::istream_iterator<std::string>(buffer), {}};. And with C++17 you can even say std::vector using CTAD :) — sehe 1 min ago
@JerryCoffin I was actually looking for one of your answers splitting strings by other delimiters than whitespace, because ISTR you wrote one.
Maybe I'm misremembering and it was Dietmar Kühl or somebody elase
@nwp Definitely not, but what @StackedCrooked said
 

« first day (3827 days earlier)      last day (1124 days later) »