« first day (4022 days earlier)      last day (909 days later) » 

3:04 AM
2
A: Why can I assign a new value to a reference, and how can I make a reference refer to something else?

Amir KirshIt is to be noted that since C++20, it is possible to change the reference held by a reference variable inside a class, using placement new, like in the following example taken from this SO post: struct C { int& i; // <= a reference field void foo(const C& other) { if ( this != &other ) {...

^LOL wtf is this
 
 
3 hours later…
6:00 AM
@JerryCoffin Heard about gravitational lensing? Red shift? Have this theory ever been independently verified (star's gravity being accurately measured and compared using another method)?
 
 
2 hours later…
nwp
8:19 AM
@TelKitty Yes, through their orbits for example.
I don't understand why you are so skeptical of everything scientific.
 
Scepticism is the attitude taught by the elite university that I have attended. The only way to advance is to think differently.
 
nwp
Arguably the only way to advance is to build upon existing knowledge. You're not thinking differently, you're probably not thinking at all, you're just claiming that everything is fake which will not advance anything.
If you double-checked the research, compared with alternative methods or tried to come up with alternative but equally valid explanations that attitude would have merit.
Though that said I agree that our methods of verifying and distributing knowledge are lacking.
 
High school physics is also called classic physics, it is verified by hundreds of years of experiments. They are not exact, but close enough for almost everything we do on earth.
Science is rigorous, unless it can be verified through many different independent methods, I would call it just highly theoretical.
 
nwp
8:40 AM
A lot of modern physics starts out highly theoretical. There is nothing wrong with that. And science is not shy about saying "We don't know how that works".
 
 
4 hours later…
nwp
The return type is DEDUCED, says so in the documentation 🤡
 
 
1 hour later…
2:16 PM
@Mgetz I liked your explanation - given the right mindset it will lead to insight.
I upvoted before I submitted my answer
 
I mostly pingged it at you to get validation I wasn't smoking something :)
 
nwp
> asymchrony
I wish it was typoed "asynchromy" instead. Aka "gray".
Also I just had my first experience where git auto-merged something incorrectly. I guess I'm lucky, but it's scary.
 
 
2 hours later…
4:24 PM
@Mgetz Nah your comment is precisely the guiding principle, U think
@nwp Yeah that stuff scares
 
 
3 hours later…
7:04 PM
random question has anyone gotten modules to work beyond toy programs?
 
not using them, found that unity builds and manually implemented precompiled headres was sufficient for medium size C++ programs
 
7:18 PM
@Mgetz not even in toy programs
Do any compiler vendors ship actual modules already?
@Mikhail I found that both these are grossly unnecessary in practice. Just don't include the world in your interfaces and life is fine.
 
5x faster end-to-end compile time using unity builds
saves electricity, prevents polar ice caps from melting, saves polar bears
 
@sehe all of them the issue I've run into is that almost all OS headers include macros for crap. So... yeah that just dies if you need to include an OS header in an interface.
 
also manually implementing precompiled headers means modularizing your code into libs that are linked, which is pretty normal, especially for rarely modified utility functions or 3rd party libraries
 
7:38 PM
To me sounds like the things that you should be doing anyways.
 
8:33 PM
dude try out the unity builds, 5x faster build times, no source changes
smaller binary size
improved code gen
 
write the CMake for me plz
 
:53292689 set(CMAKE_UNITY_BUILD ON)
set(CMAKE_UNITY_BUILD_BATCH_SIZE 0)
99â‚£ consulting fee
 
8:48 PM
nooooo
 
99 Francs (parfois typographié 99 F) est un film français réalisé par Jan Kounen, sorti en 2007. Il s'agit de l'adaptation cinématographique du roman du même nom de Frédéric Beigbeder. == Résumé == En 2001, Octave Parango est un jeune concepteur-rédacteur dans une grande agence de publicité parisienne, la Ross & Witchcraft. Publicitaire de talent, il est aussi cynique, égoïste et irresponsable et mène une vie de débauche, faisant notamment un usage immodéré de la cocaïne. Il est chargé avec son collègue de travail Charlie de mettre au point la campagne publicitaire d'un nouveau yaourt que va lancer...
dude is named after a GNU implementation of the MATLAB language
 
Still haven't watched that one even though it's supposedly a classic
 
my advice is to break the movie into 16 minutes segments and watch them simultaneously, possibly on 1.25 speed
also writing tests for constexpr functions that error at compile time is hard
#pragma expected compile time error
 
yes
at least assert fails as expected
 
 
2 hours later…
11:09 PM
> Projects can set UNITY_BUILD_UNIQUE_ID to cause a valid C-identifier to be generated which is unique per file in a unity build. This can be used to avoid problems with anonymous namespaces in unity builds.
I'll politely decline this mess.
 
@sehe the only reason your code won't build is if you have an ODR error, its actually a very good check for that kind of error
try the flag see what happens
also unity builds highlight the advantages of clangs more general optimization strategy, I've seen 20% difference between exe build size comparing clang to gcc with unity builds. Almost no difference without unity builds.
 

« first day (4022 days earlier)      last day (909 days later) »