« first day (3317 days earlier)      last day (1614 days later) » 

12:05 AM
All this mess because of pronouns. I knew we should have never added auto to the English language.
 
 
1 hour later…
1:09 AM
@user4581301 Maybe we just need to make auto work like in C++. comment = [](auto you, auto pronoun) { you << "Hi, Nice to meet " << pronoun; }
 
1:23 AM
You forgot, "and so long, and thanks for all the Fish!"
 
1:53 AM
Who in the world would think "So long and thanks for all the Fish!" (either the phrase or the book) could possibly be inappropriate or offensive? Douglas Adams is appropriate for all occasions!
 
2:31 AM
I think it's the context, or lack thereof. if I was a dolphin it would just be funny. But in context of gender pronouns saying "so long and thanks you for all the fish" I can't imagine what might go through a person's mind trying to figure out what that means.
 
 
3 hours later…
5:07 AM
@Rick ...but "I don't understand" isn't quite the same as "spam, inappropriate or offensive".
 
 
2 hours later…
7:01 AM
Hello Im having problem with defining the include path in visual studio
I currently know how to specify include path
but the code Im trying to import is large
and the header file is scattered everywhere after the include directory
is there a way to say, include all directory tree after the include directory?
 
 
2 hours later…
8:45 AM
Looked like doomsday >_<
Bushfire area looked scary in real life than in that picture.
 
8:56 AM
@TelKitty without context I would say that's a sunset
 
9:27 AM
@ratchetfreak Except it's 3 hours from sunset.
 
9:57 AM
is it common that lambdas cause access violations (when used improperly)? :<
 
when anything in C++ is used improperly access violations are the least of your worries
 
i'm just trying to find the cause at this point and wondering whether i should just throw out all the lambdas cause they seem unstable
 
lets hop on over to chat.stackoverflow.com/rooms/116940/c-questions-and-answers and see how badly you are misusing lambdas
 
 
2 hours later…
user7659542
11:42 AM
Some junior dev who barely knows C++ created a function which uses 7 arguments. SOme other dude with 15 years of experience, didn't say anything about that and thinks that s OK. I peer revieuwed his code and asked to put them in a class/struct or whatever he believes is the most suited
 
user7659542
He ended up creating a class with just 7 variables, which are all public. No getters, setters or whatsoever
 
user7659542
I am not a c++ expert neither
 
getters and setters are overused anyway
 
user7659542
I told him that having all your variables public is bad practice and he should at least use getters/setters
 
user7659542
He didnt. And our SW achitect just merged that crap in our master branch, knowing the issue.
 
11:44 AM
They've been made into some rituatual in some languages like Java and people forgot why they ever started doing it
 
user7659542
@PeterT Encapsulation
 
right, why encapsulate a simple collection of values that you're just passing over
 
user7659542
If you need to set the variables values at some point do it through a function, not by accessing them directly
 
if you need to then introduce it at that point
this "pre-emptive future-proofing" is just weird
 
user7659542
first question I asked myself was, should he be puttingt those 7 related variables in a struct or class?
 
user7659542
11:46 AM
I don t know what best practice is in C++, he ended up choosing a class and other people seemed to agree
 
that's just a style question, I would use a struct, but it's not the strangest thing to use class
 
user7659542
I think maybe a struct was more suited, if the endgoal was to not use getters/setters
 
user7659542
Then, comes the question about getters and setters
 
user7659542
That s what everybody learns during their first classes at uni
 
user7659542
variables in a class should not be public.
 
11:48 AM
not everything you learn in uni is ordained truth from the gods
 
user7659542
When would you allow having public variables?
 
when it's useful to me, often on internally used types. Pretty much everything not on a module boundary is fair game imho
 
user7659542
well
 
But honestly, all of this is style questions, you need to hash it out with your co-workers
 
user7659542
the system's configuration is contained in that 7 variable class. How much CPU's there are, amount of RAM etc... The application code uses that class to know what it should do, if you have a configuration A it does foo if the system has configuration B it does bar
 
user7659542
11:52 AM
is that on a module boundary for you?
 
user7659542
it does smth like:
 
well if it's just some immutable settings then make it a struct with all const data-members, problem solved
 
user7659542
void A::init(B* configurationClassObj)
{
    if (configurationClassObj->nrRam == 8)
    {foo();}
    else{bar();}
}
 
user7659542
Something along those lines was written
 
well how about void A::init(const B& configurationClassObj)?
 
user7659542
11:56 AM
@PeterT So you don't have to implement a getter?
 
I don't see a good reason to
 
user7659542
Simply because that is considered good practice in C++, ie putting your variables in private so you don t access them directly
 
like I said, if it's an immutable configration object just make the data-members const that offers a lot more "protection" than the silly religious setter
 
@traducerad I'm cringing more at the brace style than anything else
 
user7659542
@ratchetfreak those are the coding style guidelines we have to follow here
 
12:04 PM
@traducerad POD data-passing structs where there are no invariables to maintain between the members have no use for getters and setters
 
I wonder if you can even contort clang-format to spit that out
 
a struct containing only data members and no other special functions whose only purpose is to collect a bunch of data members for passing between functions and with no long-term life expectancy doesn't need getters and setters
 
user7659542
Thx
 
user7659542
In that case what is a good example of when getters/setters are a must?
 
user7659542
12:19 PM
@ratchetfreak btw in my case the life expectancy is the entire life time of the program
 
for configurationClassObj in your example code?
 
user7659542
@ratchetfreak si senor
 
user7659542
it is set once at the beginning, but afterwards its value influences the product behaviour during the sw life time
 
making the members private and the functions to change them public, with no logic in them is kind of...weird.
 
user7659542
@ABuckau isn t that the whole point of setter functions?
 
12:30 PM
assuming they have some logic in yhem, yes. if yheyre naked, its kind of weird.
except to futureproof like mentioned earlier..but that doesnt (imo) seem like a very good reason in some cases.
you make yhe members private, but the public methods do nothing but set amd get them: then they have no point..unless you change their implementation in yhe future.
for all intents and purposes youre still just making them public
is that incorrect?
 
user7659542
I guess not?
 
unless its somehow calculated / effects other members, in that case it makes perfect sense to use a getter/setter
futureproof it...why not. but i cam see why it might be weird.
 
 
5 hours later…
5:14 PM
A bit late, but this may be somewhat relevant: idinews.com/quasiClass.pdf
 
5:31 PM
20 years too late yeah
 
5:47 PM
As a C++ Software-Developer, will I benefit from in-depth knowledge of computer architecture and operating systems? After all C++ is a lower level language that directly manipulates the memory. Or is just the basics enough.
 
@ratchetfreak 20 years (or even more) hasn't changed the fundamentals involved here. In my opinion, the vast majority of the time, using getters and setters (at all) is a mistake, at least in C++. They usually point to a design that's somewhat broken. When a class has members that need to maintain invariants, those variables should usually be defined as types that maintain the invariants on their own, and the "setter" will be named operator= and the "getter" some operator T.
@Strict It depends (heavily) on what sort of development you end up doing. Most of what I do at the moment is oriented toward networking, so it doesn't require deep knowledge of caches and such--but what I was working on a year ago (or so) was deeply involved with invalidating, updating, etc., a distributed cache. I needed intimate knowledge not only of caching protocols and such, but also a lot of PCI/PCIe details that most people never touch (e.g., BARs) to even begin doing the work.
 
6:14 PM
I wonder if this is a violation of the CoC:
Not directly related to the topic at hand, but I guess under some interpretations, it's mocking the issue and thus "not well intentioned".
 
@JerryCoffin aren't networking programs difficult to write in C++ since the bottleneck tends not to be the hardware?
 
@Rick Networking programs are difficult to write in C++ because there's no language standard library and the OS-specific APIs are easily misused.
At least those are the two that we seem to run into the most at work.
 
@Mysticial I've looked at rsocket since it gives you that granularity at operating at different layers of the network but it seems to be under developed
 
Everybody who tries to do raw networking (via POSIX) ends up reinventing the same fucking sender/receiver loops with the same fucking bugs. Nobody checks for partial sends. So when a message gets split due to traffic (which is when it's the most critical), it corrupts the stream and brings everything down.
 
@Mysticial Trying to make people laugh is always a good intention.
 
6:28 PM
Granted, part of that is just incompetence in our part. But still, there can be a better API.
 
A more amusing point is that many "networking programs" written in other languages have a big internal cpp part. For example, the node.js backend. This means that cpp is actually used but only by those people cool enough to know how to use it.
 
@Rick Ours is not a typical "network program". I currently work on a program called MUDLAN: afcea.org/content/…
 
Is that some kind of DnD larping thing like BatMUD?
 
@JerryCoffin Speaking of which. I'm picking up a Nintendo Switch and the new Pokemon after work today. Knowing myself, I'll probably play a few hours on my big TV over the weekend. After that, it'll only be on the plane or on the toilet. So it'll probably take me months to clear the game.
 
Along with actual network stuff, it has quite a bit of "stuff" working directly with all sorts of diverse hardware, and so on, using all sorts of protocols--everything from basic serial ports (RS-232, RS-485, RS-422) to Ethernet, and some weird military ones.
 
6:35 PM
@JerryCoffin that actually looks really cool and cutting edge, I could only dream of working on something like that. I am assuming you guys are doing stuff at the port level or doing some other pioneering tech.
 
@Mysticial Sounds pretty cool. And a good way of rationing the game so you get months of enjoyment from it, instead of a night or two of fun, then disappointment that it's over (though, I suppose for any new game, we can take their rationing it over time as DLC can be taken for granted).
@Rick It's a rather strange combination of cutting edge and drearily ancient "stuff" that's been in use for decades (but will remain in use for even more decades).
 
I remember taking 50 hours of play time to clear Pokemon Sun/Moon. I got quite a few hours of that on the flights to/from Hawaii (coincidentally where the game is based off of). Then it took like another month after that with several spurts where I wasn't taking a shit.
 
@Mikhail Once you remove all the acronyms and such, it's basically a flying hotspot that knows how to talk a number of different military protocols, and has a range of something like hundreds of miles instead of hundreds of yards. And, being military-ish, it supports lots of security, signals that are hard to intercept or even observe, and so on. But ultimately, a hotspot to give you networking anywhere.
 
@JerryCoffin I wonder dealing clusters of autonomous units and high bandwidth requirements, I am assuming you guys are doing GPU programming at some level in the control flow.
 
@Rick Sadly, I can neither confirm nor deny any such speculation.
 
6:51 PM
@Mysticial this is why I moved away from Winsock and sockets in general to stream based tools
 
@Mgetz I've tended to go the opposite direction--websockets...websockets everywhere!
 
@JerryCoffin I kinda plan on living off grants. Did the univeristy contract you guys?
 
@Mgetz streams have their own set challenges, the model just changes from a concurrency model to multiplexing but issues relating to scaleability remain the same.
 
@Mikhail Yeah (along with quite a few others--vendors for radios, antennas, etc).
 
 
1 hour later…
8:06 PM
 
8:18 PM
@Rick coroutines FTW
 
-7
Q: theory of everything is bullshit

WilliamThe missing link that's giving us all depression by: KY-LA-20 I am so frustrated by what I have realized today that I have to say something about this before I start to go insane wondering if the catholic church was literally controlling Stephen Hawking all along or if he just didn't care about ...

 
8:35 PM
@Mysticial what the shit
 
@Borgleader the theory of everything
 
8:54 PM
@Mysticial so apparently Intel is releasing patches nearabouts now thats going to slow down everyones CPUs?
 
@Borgleader Not everyone's CPUs. Just Intel CPUs. :)
 
I meant everyone who has one but yeah
Do we know exactly by how much?
 
varies by application. 0-4% is what's being reported right now.
 
and random question, have you used llvm-mca at all?
 
mca?
 
8:59 PM
https://llvm.org/docs/CommandGuide/llvm-mca.html
Machine Code Analyzer
 
oh that. No I haven't.
 
9:19 PM
what even
I couldn't even follow that post
 
49
Q: My profile's about me randomly changed across all sites

PeilonrayzI have two styles for my user accounts: Accounts under the Peilonrayz pseudonym. Same username and picture, similar about me. Accounts that have been anonymized. Random name and picture, and no about me or other settings. Due to getting a couple of yearling badges I looked at an anonymized ...

^^ /cc @JerryCoffin
Well I guess it finally blew up.
 
9:49 PM
@Mysticial Which probably translates to 10-40% for real-world workloads. :-)
 
@JerryCoffin good point
 
@Mysticial My requested pronoun isn't dismissive of anything. It's an honest evaluation of how I see myself and how everybody should actually think of me. They are clearly being dismissive of my imminently reasonable request.
 
@Mysticial oh lordy....
 
@Borgleader Moral of the story: If you step on enough land mines, one will eventually blow up.
 
10:09 PM
@Mysticial That reads like a Markov chain output.
@JerryCoffin The solution is to do all real work on machines that have nothing worth stealing.
So you get all the speed.
 
@EtiennedeMartel I do that the easy way: I simply don't have anything worth stealing in general. :-)
 
10:26 PM
I've found that getting married helps a lot in that respect. Somehow everything of value disappears, and those with no value at all stay around forever. I still have a pair of boots I was issued in the Air Force (because I need a pair of heavy-duty boots so badly in San Diego, I guess). On the other hand, my twelve thousand dollar spectrometer? Disappeared years ago--thrown away because she didn't know what it was.
On the other hand, I'm pretty sure the spectrometer would now be obsolete anyway. Old enough that I'm pretty sure no 64-bit driver ever was or will be written for it.
 
10:46 PM
Since I suppose CMs (mostly) don't read what's said here, I decided it would probably be appropriate to add a note to my profile:
"No, that is not a joke or a protest nor intended to be dismissive of anything or anybody. It's how I actually think of myself, and how you should think of me. To any moderator or employee who might consider editing this out (again), please control your impulse to be so dismissive of my requested pronoun just because it apparently does not fit your personal notion of what is proper or reasonable."
 
11:31 PM
I feel like I am one of those very few persons who venture deep into the ocean to hunt down the monster sharks when most other people are still in the crowded town discussing what disease the current rat infestation might bring.
 
@TelKitty I don't venture deep on the ocean. My knees still hurt from the last time I did that.
 
user8104581
@Mysticial This is the greatest one yet
 

« first day (3317 days earlier)      last day (1614 days later) »