« first day (2683 days earlier)      last day (2251 days later) » 

12:00 AM
@ratchetfreak Partly. Also partly because Qt is just plain ancient, and quite a few decisions have never been revisited even though they make a lot less sense now than they did decades ago when they were made (e.g., at that time, using COW to save memory was extremely common simply because memory was so much more expensive, and most people had relatively little of it).
 
COW can be a viable or even great strategy if you have a dedicated type for a specific purpose that COW makes sense for
the problem comes when you try to take something that's generic in essence that can be used in very varying ways, especially if those ways can include write-heavy, and then try to slap COW on it.
 
@JerryCoffin and backwards compat prevents them from going from scratch
 
for instance having an Image class might not be a bad place to put COW directly, if you design the interface appropriately, since you know in advance that it's mostly useful for storing very large images and most image algorithms don't involve just changing a single pixel
 
typical image processing libraries would just grab the underlying pointer, like img.data() and then do the work
 
nah
if you are trying to use a COW image, you would provide a function which takes a function that accepts the underlying pointer, then produces a new image object based on the result of that transformation (on a copied buffer)
 
12:05 AM
and QImage will assume you will write to that pointer so does a copy if it's not the only reference to the underlying buffer
 
Yes, but the per pixel computation is typically done on the pointer rather than repeatedly hitting the [] operator
 
yes, but who gives a fuck about that?
 
It means you gotta get your mutexes straight
 
no, it really doesn't.
if you have a COW image you don't need to give a shit about mutexes.
e.g. Image Mutate(std::function<void(byte* data)> mutation) { auto copy = deep_copy(buffer); mutation(copy); return Image(copy); }
reading the existing image, mutating a copy of it, and returning a reference to that copy is read-only and can be done without any mutex involvement.
the problem with Standard containers and COW has nothing to do with mutexes or atomic operations
it's that their interface simply doesn't support the kind of bulk mutation and returning read-only copies of individual items you really want
 
or they have to conservatively copy whenever you may be able to write
 
12:09 AM
yeah, but that's what having a proper interface is for, i.e., you don't return things the user may be able to write.
 
So, basically their interface supports both kinds of mutation...
 
it supports basically all kinds of mutation, ever
which is really bad for COW because you need to offer bulk mutation as a new object only and not expose writable references
 
Kinda, but it also good for performance
 
not in this context at all.
the interface I've suggested would perform far better
 
mutex is faster than a deep copy
 
12:11 AM
it's also not remotely copy-on-write, which is what we were talking about.
 
depends on how many times you are taking the mutex
 
you can ask Adobe how well throwing a mutex on it worked for them
the bottom line is that it's really hard to reason about the mutex and get it correct and do so efficiently all the time
 
deep copy only has to happen once on each new "copy" of the data
 
compared to the COW/immutable approach which is really easy to use and guaranteed correct
and you only pay one deep copy per bulk mutation
instead of randomly mutexing things all the fucking time
 
Yeah, I think we all agree. Its cow on default, especially when moving between threads or on assignment operations, but critical sections are operating directly on the underlying pointer...
 
12:13 AM
no, I think we don't agree about that at all.
a COW image would not offer critical sections or allow operations directly on the underlying pointer.
 
or rather it is cow on default
 
it is immutable.
if you want to write, you have to copy, that's the whole point
 
Yeah, sure, I'm just saying how it is done right
 
the only time the data in the buffer is not immutable is when the object is the only reference to it
then it's the user codes responsibility to not let 2 threads operate on the same object
 
@ratchetfreak Best to forget about that case as it's imposisble to prove in concurrent code and just introduces random edge cases even in the best case.
@Mikhail No, that's not how it's done right at all.
 
12:15 AM
not unless you make the user code guarantee that each object will only be operated on by a single thread at a time
 
in that case fuck COW in the face; just use a plain std::vector, use a shared_ptr if you want to share it, job done.
the whole point of having an immutable COW object is that it handles concurrency nicely without a significant performance cost (and introduces potential optimisation opportunities like incredibly cheap equality checks)
if you don't need that you don't need COW.
and if you ever mutate any thing in that buffer, you've fucked yourself and defeated the point and negated all the potential benefits
 
12:56 AM
@Puppy Not really true at all. As I already alluded to above, one fairly common use of COW is simply to reduce storage requirements. Another possibility that can be interesting is an immutable buffer, and writes are just stored as deltas to the original. Assuming a lot of data and small changes, this can be quite useful as well.
 
1:37 AM
oh baby i missed the qt discussion
I wonder what Qt6 will be like... and if they'll not use moc and use the c++ stl for containers
prolly not because they'd have to rewrite everything
I still think their direct/queued/auto signals model is great. Forces you to think about your multithreaded-ness just enough but doesn't let you ignore it outright
 
 
1 hour later…
2:44 AM
anyone here is knowledgeable about linux configuration?
 
3:00 AM
 
on your day of graduation, as a man, you will be wearing a dress and a fancier
 
Better than Buffalo Bill's "woman suit" en.wikipedia.org/wiki/Buffalo_Bill_(character)
 
3:14 AM
based various elements of Gumb's MO on six real-life killers
 
3:50 AM
FBI Director Jack Crawford pacifies him by repeating that Gumb is not in fact transsexual, but merely believes himself to be.
 
 
1 hour later…
5:16 AM
CVE-2018-?????: It turns out Bruce Schneier is just two mischevious kids in a trenchcoat.
4
 
> This one computer in Missouri
son of a
 
 
2 hours later…
7:25 AM
https://stackoverflow.com/questions/48859911/i-see-no-meaningful-optimization-advantage-of-constexpr-in-this-example?noredirect=1#comment84723224_48859911

This guy is pissed at me because of the flagging.
(-_-)+
- would be great if you stop bother people by seeing your link on the top of this question
 
8:20 AM
Have you guys ever really wanted to inherit from std::vector or similar just to have functions that operator on a vector that contains specialized objects? Is the unified call syntax going to fix that?
 
nwp
@Mikhail You can inherit from std::vector just fine. The Tour has an example with it. I have never needed that though. I have no clue what unified call syntax has to do with that.
 
It feels dirty. Idk, I have maybe 5 functions that perform specific operations on std::vector<MyObject>, that are called from multiple places. I think with the unified call syntax I could write my_vector.one_of_those_functions() without them being members of std::vector, or maybe I don't understand.
like x.f(y) resolve to f(x, y) so that I don't have to f as a member of x's class
 
nwp
You could, but I don't understand why you can't just call one_of_those_functions(my_vector). If it is super important you can use inheritance to make my_vector.one_of_those_functions() compile.
 
Yeah, I'm doing one_of_those_functions(const std::vector<my_object>&) but it feels dirty because they aren't sufficiently compartmentalized...
feels
 
nwp
8:40 AM
Arguably free functions are the good, extensible and reusable version and member functions are the bad version, at least according to He-Man.
 
Ven
Hi
 
Scott Meyers?
 
nwp
Yes.
 
Ven
🙏
 
Basically, its like I have a std::vector<std::tuple> sometimes I need to set .first, and sometimes .second, and the boilerplate is making me sad.
 
nwp
8:52 AM
Maybe you can concentrate the boiler plate in a custom iterator with value type std::tuple_element<N, std::tuple> so that other algorithms don't need to worry about tuples.
 
That sounds like an interesting approach, if I recall correctly, Qt actually has something similar built in.
 
nwp
boost probably also has that
 
Also not sure if I should file a bug to the people at Boost that their small vector container crashes the NVCC compiler
 
nwp
That sounds more like a NVCC bug than a boost bug.
 
Yeah but NVIDIA hasn't bothered to respond :-(
 
nwp
9:08 AM
Looks like boost doesn't care about NVCC, so I don't think they would consider it a bug. A feature request "Support NVCC" might be the way to go.
 
baby quail so small compared to a baby chick
 
9:36 AM
also I got new baby chooks
3 of them
 
 
1 hour later…
10:39 AM
@Mikhail but making a compiler crash is always (at least) a compiler bug, see if you can make a mcve of it sans boost
 
11:30 AM
@sehe small update: it was the git status prompt being slow af
I blame windows being slow to launch processes
now it's delightfully instant after pressing Ctrl-C again
 
11:50 AM
so I guess I'm an official zsh convert
yay
 
 
2 hours later…
Ven
1:32 PM
@BartekBanachewicz what took you so long?
 
@Ven it didn't work well enough for me before
 
Ven
8
A: Toy virtual machine

MorwennA few notes to complete what @vnp already said: When you open several namespaces at once and close them at once, you better indent only once since the double indentation won't add to clarity but will produce "longer" lines. A future revision of the standard may introduce nested namespaces defin...

@Morwenn-spotting while researching some C++ stuff
 
@BartekBanachewicz isn't it basically like bash (with extra things) right out of the box... iow, if you are happy using bash, jumping to zsh should be seamless?
 
@thecoshman It was really slow for me
also I found a new <3 chrome addon
it's called Quick Tabs
and the only thing that keeps annoying me is the fact that chrome extension popups have those weird size limitations for no reason whatsoever
 
1:51 PM
@BartekBanachewicz strange...
 
@thecoshman not really
the git prompt was a part of the problem
Remember I work on Windows
 
oh you poor thing
 
it's generally much better ux than the hobbyist OSes
but sometimes you hit an issue like that
 
2:54 PM
turns out the cloud is just other people's computers
10/10
 
 
1 hour later…
4:17 PM
@nwp You can, but it's nearly universally accepted to be a terrible idea.
 
Ven
@Puppy Also, std::vector's dtor isn't virtual IIRC, so I guess you need to keep that in mind
 
one of the reasons why
 
@Puppy sup
 
not much
on holiday this week
you?
 
4:50 PM
@Puppy doing stuff
was gonna ask if woofington is happening
 
well essentially, my boss declined to allow me to steal some of my code from work for builds, etc
I'm pretty sure that I would just write that again if I tried to, well, write it again
might be best if you did some of the build stuff
 
5:20 PM
hello, guys. don't you remember where something like "c++ community guide" page at SO was located?
there were FAQ and other informative stuff
 
no
 
nwp
@pushandpop This? You get there by clicking the c++ tag and then "learn more".
 
@nwp something like this, but more informative. There were also small articles provided by people from community...
well, maybe it was redesigned since my last visit.
i guess, if there would be any page similar to it then people would know it. thank you for your help.
 
5:47 PM
it was SO Documentation
that was closed :(
@nwp in case you're interested... (look above)
 
@BartekBanachewicz are you actually doing dev on Windows?
 
6:15 PM
@Puppy yes
 
was thinking about writing a build in C#, since 90% of what's needed is actually really trivial
 
6:45 PM
@Borgleader
0
Q: What to do if a user profile contain some kind of rudeness?

Paul KaramI came across a user profile which has some rudeness in his title. Here's a screenshot: Is this kind of title allowed here in SO? (or in all SE sites?). Isn't that against the be nice policy? What's the best way to deal with this? Ignore it or should I flag one of his posts for a moderato...

 
@Puppy well i code on OSX occasionally as well
 
I hate you
 
Do we really need all that
 
well, that depends on what you're willing to live without, I guess
hmm
I thought I already eliminated all the bits I didn't need but actually, there's some stuff like bundlin dependencies that we wouldn't need
if you don't minify or bundle you acn make life simpler because you don't need to do things with sourcemaps
cachebusting is a litlte more awkward#
maybe we could just set a property on <script> tags so that they are never cached?
 
jww
7:38 PM
Hi Everyone. We caught a bug report for Fedora 28, PPC64-le. Also see github.com/weidai11/cryptopp/issues/588. I have two questions... (1) is Fedora 28 is considered stable; (2) what version of GCC ships with Fedora 28?
 
@jww given that the official website for Fedora lists 27 in the download page, I'm assuming 28 is rawhide ("to-be-released-version")
(this is also what the OP of the linked issue says BTW: "Fedora 28 (Rawhide: development branch) ppc64le")
 
8:14 PM
@Mysticial a) lol, b) that wasnt worth writing a meta post about
 
@BartekBanachewicz OK, I actually stripped a bunch of stuff that's not important and ended up with something with so few of the features I implemented for work I can't imagine them complaining, so I just pushed it.
 
jww
Thanks @milleniumbug. It looks like GCC 8. That explains a lot. Ugh...
 
GCC now using BrowserVer?
 
 
1 hour later…
9:54 PM
So I'm slightly sad that's there's no motherboard that will take all of these at once:
 
isn't that the kind of thing you find out before buying? ;p
 
who says he bought them?
 
@AF_cpp talk is cheap. And as in this case, often merely confusing. Your prose wastes a lot more mental bandwidth than a MCVE of 40 lines would. — sehe 51 secs ago
@Puppy maybe he never intended them for a single mobo when he bought them, and now he's sad that it didn't happen in the mean time
@Mysticial is that 16x8gb
 
10:20 PM
So I have spent about 3 hours digging for shit in caves in Minecraft so that my kids have materials to play with when they play the game.
And then I drowned.
And of course all of the shit disappears after few minutes.
FML.
Thank Notch for creative mode.
 
I suspect the farm where I got 3 baby chicks underfed them.
no matter how much I feed them, they are never full
 
@wilx now I know what modern slavery is :P
 
@milleniumbug The things you do for kids... :)
 
@wilx turn on creative for a bit?
 
@ratchetfreak I did. But then you stop getting trophies.
Well, they probably do not care though.
 
10:44 PM
@Puppy two different machines. I decided to swap the memory between them because the aesthetics didn't work out in one of them. (The set on the right lights up.)
@sehe They're all 16gb sticks. So 256GB total.
 
how about we device an email system that filters out mass spams?
like the receiver email server will ask questions for sender to answer
 
noooice
 
only if the sender successfully answer those questions will email be sent through?
 
@wilx My kids are really capable of doing that themselves :) And that's for the best
 
@sehe My kids are 4 and 6 years old. They would be dying all the time in the caves.
 
10:48 PM
Yeah. Well. That might be a little early then :) Plenty of games to go around
I'm not sure. I think summer 3 years back. So they were... 7/8
But they're completely hooked. For completely different reasons. The youngest is the hacker and doesn't live if there's no redstone involved. The oldest goes for the "real story play" - they often complement eachothers world really nicely
 
@sehe Yeah, I always buy max density unless the price premium is too high.
 
Which would be, the last 4 years?
Maybe 3
 
when will mods get introduced?
 
@sehe We play in peaceful mode only. Even I can barely handle the zombies.
 
I hate those. I mostly don't like games much
@ratchetfreak They figured them out.
Raise tinkerers, a joy forever.
Actually, my son makes resource packs. I have no clue how.
 
11:04 PM
these days its all tinkering in json
 
Ah. I have not actually looked at it. I saw some rainbowy unicorn stuff though.
So, it was clear that was request from big sis
 

« first day (2683 days earlier)      last day (2251 days later) »