« first day (3261 days earlier)      last day (1670 days later) » 

3:41 AM
I started initializing global variables by evaluating a lambda. Are you guys proud of me?
std::map<enum,setting_structure> settings = []{return the_structure;}( )
 
 
2 hours later…
nwp
6:10 AM
You should use auto. That way forgetting the () at the end is more fun.
 
 
1 hour later…
7:31 AM
Anybody got good talks from cppcon?
 
user7659542
7:49 AM
Why are people against typedeffing structures?
 
user7659542
even Linus Torvalds is against it
 
user7659542
it is IMO totally OK to typedef. People saying that by not typedeffing you don't clearly see what the identifier is, are wrong imo
 
@tra in c++?
 
8:04 AM
maybe those are the people that refuse to use IDEs and they're mad that they can't see the original type
 
 
2 hours later…
user7659542
9:38 AM
@ABuckau No C
 
user7659542
@PeterT at my current company they force you to prefix your variable's identifier with its type, so IIRC if you hqve a structure you ll have something like: myStruct_t strFoo = {0};
 
user7659542
besides that imo the argument that you don't know the type is only valid when declaring the variable
 
yeah hungarian notation is still used in a bunch of styleguides
 
user7659542
later on in the software you are left with the identifier only. So, unless you prefixed the variable with "str" or smth like that you will not know the type regardless of whether you typedeffed
 
When we had a webdev team they used it for php and JS code
 
user7659542
9:45 AM
just typedef all your structures.
 
12:18 PM
@traducerad suffixing with _t is technically UB on POSIX
 
 
3 hours later…
3:23 PM
In multiple inheritance, both parents might supply the same function. For example, struct C : A, B and struct A {bool is_valid()} and struct B {bool is_valid()}. What if when you do c.is_valid() it calls both functions (in order of declaration). Maybe returns the last one's value... Is there some dystopian std::future where this would be a good idea :-)
 
 
2 hours later…
user7659542
5:38 PM
@Mgetz never heard about that! source?
 
user7659542
it is part of many coding standards and I remember even being taught that at uni
 
FWIW none of this applies to C++ if the symbol isn't in the default namespace
or a reserved namespace
 
6:10 PM
^^ FFFFFFFFUUUUUUUUUUUUU
Though everybody saw it coming.
Gonna need to test my 4 x 32GB DIMMs before they sit out the 30-day return period.
 
@Mysticial I'm actually a bit surprised, I realize binning is probably holding them back though
 
Probably a combination of several things:
1. They underestimated the Epyc demand. Since that has higher profit margins, they're moving all their Ryzen supply there instead.
2. They fucked up the boost clocks (set them too high) on the Ryzens and they can't get enough good bins to actually meet what they advertise.
3. TSMC's 7nm capacity is completely overstretched since everybody wants it.
TSMC's gonna make a killing. And everybody knows it. :)
 
@Mysticial 1) good for AMD 2) bad for AMD but fixable longer term as the process matures, even six months from now TSMC will have higher yields 3) I really hope they don't have a mysterious 'fire' like another fab did recently...
 
6:25 PM
"mysterious" sounds ominous
 
@Rick sabotage is a real thing and happens all the time. It's just generally not talked about because it's embarassing
 
@Mgetz "Planned" sabotage to reduce supply and jack up prices.
 
@Mysticial there is some of that usually that's acknowledged so they can give excuses as to why
but honestly it's in TSMC's interest to keep AMD happy here and shipping chips.
 
@Mgetz TSMC doesn't need to limit supply right now.
You do that when there's an oversupply. Like in the case of ram and flash.
 
6:30 PM
@Mysticial well given that this is the best marketing they've had in ages... exactly
 
7:22 PM
 
 
2 hours later…
9:41 PM
what's faster write read from a file by signaling, or using a socket to transfer data?
Or is this a meaningless distinction and I'm just being pedantic.
by signaling I mean, you write to a file and then another program reads from that file once it receives the singal via WebSocket or some other messaging protocol that the write has finished.
 
10:04 PM
... why not just send the data over the socket protocol?
touching the disk is gonna nuke performance
 
I hear that reading from a file is faster than getting data from a database
 
depends on what the database is, where it's located, and how you're querying it
you're comparing three completely different things you would do in completely different circumstances
you can probably query a local file faster than you can a remote database, but that doesn't mean much
 
If it was just a simple query, and reading from a file. Reading from a file would be faster. in an apples for apples comparison
 
but it's never apples for apples because databases aren't bulk storage, they're not meant for that kind of operation
all you're saying is that "If I use Tool X for a situation it was never meant for, it's not as good as Tool Y that is meant for that"
I mean, congratulations, you're right, but...
if you start saying "I need to read data from a file and then query it afterwards", then you may well lose to the database who spent a billion dollars and 20 years doing that as efficiently as possible
 
Well now I'm just wondering if reading from a file is
faster than a TCP transfer
 
10:10 PM
that's exactly the same bucket
depends on if the TCP transfer is from a local process or a remote one
and even if it was local, the motivations to use the two are completely different, so there's little point comparing their performance
 
The assumption is that it's local
 
right
so what you're saying is "Can my machine transfer memory between two processes faster than it can transfer memory between two processes but also roundtripping it through the disk"?
 
I guess yeah, assuming a solid-state drive and a shit load of data
 
just another reason that this comparison makes no sense
 
it is clearly a hypothetical
but if there is an edge I would like to know
 
10:14 PM
I fuckin goddamn love the questions on the course evaluation forms.
 
it's a hypothetical that makes no sense, as you're comparing things that are totally different and no apples-to-apples comparison is possible, not to mention a thousand real-world conditions that could change the result
 
let's say I wanted to compete with Google, I am not going to use some stupid database. I am going to build my own.
because I know that will be faster
Am I really going to do that, no. However, it's still a nice to know
also, you mentioned a port, do you mean OSPF
can you even use OSPF between different processes?
 
Q 4. Have you experienced harassment as defined by law?
A 5 grade radio box.
Result: 5- out of 7 has experienced prosecutable offenses during my class. Maybe I should just drop the mic with "peace out", get your comp-sci education from a mofo that doesn't know what an application server is, and gets surprised by intellisense.
It is grade A insulting.
 
@Puppy why do you have to rain on my parade. Can't you just entertain my wacky and crazy ideas about what is possible :-)
 
that's how we ended up with Javascript
 
10:27 PM
That was an arrow threw the heart!
 
Fortunately this is just 2 hours of my week, the others were quite pleasant. But I loathe this kryptonite that is unknowingly deployed.
@Rick Javascript was a beautiful language up until they introduced the class keyword.
 
@CaptainGiraffe true, java people muck everything up.
 
@Rick Yes, we should be searching for a new Australia for the Java devs.
 
@CaptainGiraffe or just shoot them into outer space
 
@Rick Where do we put the python devs?
 
10:31 PM
purgatory
 
Indeed. And the bash devs?
 
same thing
 
And the Rust devs? they can play with us?
 
I don't know, conflicted.
 
@Rick I'm conflicted too. Why not just let them play?
 
10:35 PM
well, they like riding bikes with training wheels. That's not considered cool by some.
To be honest, once you learn C++ javascript, python, bash, rust and ruby is just a variation on a theme
and java
I would like to see a truly new language. Something that follows a new paradigm like parallel programming. Where the semantics are completely different.
 
11:27 PM
@CaptainGiraffe Javascript was a terrible language through and through from the beginning ;p
@Rick Unfortunately, the simple fact is that 3GLs like C# can express pretty much whatever we need already or with simple continuing evolution; there's just not much market for more. Quantum languages is probably the only ones coming up any time soon.
 
@Rick Assuming you're reading soon after writing, the disk hardware probably won't be involved. A typical OS will cache the data, so one process will write to the cache, and the other will read it back in from the cache.
The file still will still usually go through some of the file system driver, where the other uses the sockets drivers. There may be a difference in speed, but it's not nearly as obvious as just "writing to the disk will obviously slow things down."
 
@Puppy :-O
@JerryCoffin cool, so it might make sense in situations where you need to store the file anyway.
 
@Rick Yes, it's entirely possible. As with anything about performance, only testing will give a solid answer--and even then, it's open to change from one OS to another, including what look like fairly minor patches to an OS in some cases. Just for example, a while back MS did some re-architecting to improve speed of socket connections inside a single machine.
 

« first day (3261 days earlier)      last day (1670 days later) »