« first day (3623 days earlier)      last day (1328 days later) » 

1:06 AM
Now I understand why there tends to be social instability after a pandemic.
 
1:16 AM
For example, closing down has costed some landlords dearly. Yet governments are unwilling to give much tax concession to the landlords. This is just an example. Then there is the tourist industry, retail industry, hospitality. Obviously the pie is going to be divided differently and some people is going to resent that.
I never understand some people's over eagerness for closing down when the chancing of someone getting COVID-19 is comparable to a car accident. Are they really that scared or are they benefiting from the closing down. You know the government doesn't have infinite amount of resources to compensate for the closing down and it's much easier to close down a economy than to restart the same economy. By the time the world is in a depression and COVID-19 is still going on, it might be too late.
 
2:08 AM
So anybody work on anything cool? I'm preparing for the interview process for a LIDAR company.
 
 
8 hours later…
user7659542
9:45 AM
Since when does the C standard consider external linkage as the default behaviour?
 
user7659542
I was pretty sure that when you re not specifying anything internal linkage was the
 
user7659542
default behaviour
 
I think it's implementation defined
 
user7659542
@PeterT what does that mean?
 
linux gcc/clang usually exports by default, msvc usually hides by default
 
user7659542
9:47 AM
 
user7659542
see page 144
 
user7659542
you see in the example they declare int i4; (same for i1) and comment next to it that it has external linkage
 
oh yeah, for linkage between translation units, I mixed that up with linking between libraries, which is ouside the scope of the standard
 
nwp
Today I learned.
But it does make sense. extern int i; in the header and int i; in the source. If int i; didn't have external linkage it wouldn't work.
 
user7659542
@nwp no, IMO eevrything should have internal linkage to limit the scope, that s it.
 
user7659542
9:53 AM
What seems to happen here is that if you declare a global variable it automatically has external linkage
 
user7659542
which is also contradictory IMO because
 
well it is kind of awkward that header files and source files are the same to the compiler. Having everyhing in a header be internal by default would be weird
 
user7659542
why in that case do you have to specify extern in your header file to be able to share the variable amongst multiple translation units?
 
user7659542
If it were really extern by default you would not have to specify it in the header file
 
nwp
@traducerad Maybe it would be the better default, but how would you share a variable across translation unit boundaries then? You'd have to declare it and additionally specify the linkage. That seems redundant.
@traducerad You don't have to put it in the header. You just need a declaration.
 
user7659542
9:55 AM
@nwp yes you do. extern int i; in the header
 
nwp
You can do that. You don't have to.
 
user7659542
if you don t specify extern in the header you can t share the variable
 
user7659542
@nwp oh, that s something else...
 
nwp
Sure you can. Just put extern int i; in another source file.
 
user7659542
10:15 AM
@nwp are you saying that if I were to put int i; in a common header file (rather than extern int i;)and extern int i; in multiple other source files I would still only end up with one instance of that variable i which is now shared between all those source files?
 
nwp
No. You'd have to put int i; in a source file and extern int i; in various other source files. Unless you treat your source and header files weirdly.
Interestingly you can achieve the effect you described via inline int i; in the header.
 
user7659542
10:59 AM
@PeterT On a tangent. How do you know this is implementation defined? I never know when something is considered "UB" or even implementation defined.
 
user7659542
Is it just because you have read the C/C++ standard 200 times by now and remember never having read anything about this in it?
 
nope, I just make shit up :D
 
nwp
Lol
If it's good enough for the president it's good enough for C/C++.
2
 
user7659542
11:23 AM
@PeterT tell me your secrets
 
user7659542
@nwp I heard bleech and UV treatment is good enough too for the president...
 
my secret is being bored enough to browse the C++ tag on SO.
It's like immersion language learning by listening to a clique with a heavy regional accent
 
user7659542
duly noted, I ll try to be more bored from now on
 
2:41 PM
My secret takes its roots deep down into brain masochism.
 
 
2 hours later…
4:39 PM
Just reached a milestone for cpp-sort 1.8.0
Finally :o
 
5:12 PM
@Morwenn oh?
 
 
3 hours later…
7:46 PM
Anything good at CppCon 2020?
@Morwenn std::array<int, 5u> So are we all doing suffixes now (5*u*)?
` return std::is_same<std::array<int, 5u>,std::array<int, 5>>::value;` <= True
 
Hey all. What do you think is the most exciting C++20 addition? Modules, Concepts, Coroutines or Ranges? (Or something else?)
It's coroutines for me.
 
.contains()
#include <numbers>
 
8:01 PM
@Mikhail Ah, I didn't know about that one.
 
#include <format>
I've been using so much C++20 that I've had a few minor issues backporting
 
Hm, I probably won't need <numbers> very often at my current job.
 
well if you want M_PI
 
Format is really welcome though.
 
std::span has been popping up in the wild, a lot of people "stanning" for "span"
I also used std::latch instead of a condition variable/mutex combo to do synchronous thread launches
 
8:06 PM
Yeah. It's those little tools that often make a real difference.
 
I'm quite happy with C++20, the only real issue this that CoderPad (popular interview software) is set to C++17 by default :-)
 
@StackedCrooked is modules actually a thing?
@Mikhail I'm using it... it works
 
@Mgetz It's officially part of C++20.
 
I'm also using it, but mostly because of the job security!
 
8:14 PM
@StackedCrooked and a garbage collection hook was in C++11... and removed afterwards?
just because something is in the standard doesn't mean it'll be used or implemented
I have yet to see how modules really prevent the IMPL pattern
 
PIMPL?
 
at best they are a better precompiled header
 
What was the idea behind the "garbage collection" support in C++?
 
@Mikhail yes? you can use multiple names for it
@Mikhail it was MS and another vendor trying to get certain implementations of C++ as 'standards compliant' but it never worked out and didn't make sense
 
Okay, but then instead of pointer to implementation it becomes "implementation" :^)
 
even MS never actually used it
 
Actually the Hitler video was probably influential because all the famous C++ people commented on the reddit thread, wasn't it /r/cpp's highest post at one time?
 
Yep. Even Bjarne made an account specifically to answer to that post.
 
I didn't make the video though.
Andy Prowl made the video and posted it here.
I put it on reddit without asking him first.
I was a jerk.
But he was thankful I posted it on reddit.
So all ended well :)
He should have gotten the internet points though.
 
8:22 PM
@StackedCrooked well you could have made Bjarne make a youtube account... that would have been unforgivable
 
If he has a Google account, the he has one.
 
I mean we all occasionally email him, some of my coworkers used to put him in memes and anonymously email the images
My personal contribution was bugging him about issues with iostreams, which is not C++'s best feature
For example, I'm still offended that ` std::cout<<static_cast<unsigned char>(100)<< std::endl;` prints 'd' instead of 100
this is really annoying when using 8 bit cameras
 
@Mikhail Yeah.
 
@Mikhail std::byte?
 
8:29 PM
 
Pretty sure Apple is the looser, kids will just choose hardware that plays their games
 
@Mikhail apple owns the high school market
 
Not sure about that. Apple doesn't make gaming PCs and their products cost money. I don't think they own anything past the show-off hipster market. I think they are more popular in graphic design (for example Sketch).
 
 
1 hour later…
9:39 PM
 

« first day (3623 days earlier)      last day (1328 days later) »