« first day (2201 days earlier)      last day (2741 days later) » 

11:00 PM
@JerryCoffin Why that is seriously funny. I just barely managed to get my drink out of my mouth before the accident happened.
 
You make a copy so you don't have to do that
 
@Mikhail And then aggregate them at the end? What's the broader problem you're trying to solve?
 
@Mikhail tearing or shearing or something like that
 
that’s more the knitting kind of thread
 
11:19 PM
@CaptainGiraffe Damn! I was more successful yesterday.
yesterday, by ThePhD
Fuck my water is all over my jeans.
 
@Mikhail Two threads should never be trying to write to the same data if you can find an alternative... Even if you deep copy the state into each thread, figuring out how to merge their changes to the data can become an extremely difficult task. Ideally the output of each thread should be clearly independent of eachother, even if they rely on the same input
That's the kind of state leak I was mentioning which deep copies can't prevent
 
@Aaron3468 That's what I was trying to say.
I don't see how deep copying solves anything.
If anything, deep copying solve the case where you're trying to read a mutating object. (read + write race) Then you can lock down the entire object, make a deep copy and hand it off to the reader.
But it doesn't solve the write+write race situation.
 
Well, deep copying really helps if each thread just needs a mutable object temporarily for record-keeping (e.g, progress flags). But really, immutable references are better. Both approaches prevent shared state. Neither solution prevents state leaks when the threads need to synchronize back to the same object.
 
> Bordeaux: La ville élue la plus « tendance » au monde
I don’t want to take all the credit but
 
@Aaron3468 How does an immutable reference work? Does it lock down the object until the reader is done?
 
11:26 PM
@Mysticial So I think we're basically catching onto the same problem; it helps, but doesn't cure the underlying issue
 
@Mysticial with an appropriate type system, yes. which is what happens in Rust, hence all the memeing
 
@LucDanton Ah. Yeah, in the recursion status example that I posted earlier, I was trying to find a way to not have to lock down the entire computation and stall all the threads while the reader thread walks the tree and prints out the status.
 
I should clarify that I didn’t take 'lock down' in the concurrency sense. it’s not that mutations to the object are queued or serialised, they’re not allowed at all
 
@Mysticial Read-only access to a shared resource. A second thread might see the resource after it changes, but finish before the first thread. Then the first thread overwrites some other resource they both dump to... Access to data should branch outwards, never being merged back by multiple threads. But practically, sometimes you need to write to the same object using multiple threads; in which case the data they produce shouldn't overlap without a protocol for merging without loss
It makes intuitive sense if you imagine threads as chefs in a kitchen. But in practice it's remarkably easy to accidentally have two threads sharing the same responsibility and tripping over eachother.
 
@Aaron3468 I think I got lost somewhere in the 3rd sentence. lol
 
11:35 PM
@Aaron3468 ...at which point, we're basically building a "high speed Git" (interesting how the same problems crop up in many different areas).
 
@Mysticial Sorry, it's not an easy concept to describe. The 'intuitive sense' part is all you need to read.
 
Oh. So you just "trust" that the threads don't overrun each other. Or you make it impossible for them to overrun each other?
 
And considering that git doesn't always get merges right, it's a good idea to avoid their problems if at all possible ;) @Mysticial You assign the threads to 'cook different meals', or different parts of one meal. You don't want 3 chefs in charge of salting the soup because they're bound to mess it up.
 
@Aaron3468 Yup--I'd also note that a number of distributed file systems have encountered and dealt with the same basic problem with varying degrees of success--but to be successful at all, most include some sort of way to customize merging by file type (and, like Git, you still end up with manual merging semi-regularly).
 
@Aaron3468 Ah. So basically static or dynamic division of the work.
 
11:44 PM
> 'Nobody calls it Czechia': Czech Republic's new name fails to catch on
 
The Czech Republic has a new name?
 
@LucDanton New motto of the Czech Republic: "at least most people don't call us Czechoslovakia any more."
 
@GundolfGundelfinger Czechia un nouveau nom pour la République Tchèque ?
@jaggedSpire it’s supposed to be a short form name, so it’s officially the Czech Republic as well
 
@LucDanton ah
I'd not heard.
 
@JerryCoffin it opens a whole new door of misunderstandings with respect to Chechnya though!
 
11:50 PM
Exactly. No matter how you approach it, overlap of responsibilities (particularly writing/mutation) creates a threading problem with no perfect solution @Mysticial
 
> Change it to Czech-no-Slovakia so people know that the Slovaks have gone their own way.
@JerryCoffin that may work better
 
@LucDanton Might at that.
 
@Aaron3468 Well yeah. Most of the parallelism that I do is statically partitioned.
In most cases, it's over-partitioned to give the threads some flexibility to handle load imbalance.
 
What does over-partitioning mean?
 
@Mikhail over-decomposition
"Over-decomposition" is the proper academic term for it.
 
11:57 PM
Sorry, I'm ignorant of these kind of things. What does that mean?
 
Basically where you decompose a task into more than there are threads/cores.
 
Yeah, that is almost always required.
Also threads aren't real
 
@Mikhail Of course threads is real (unless explicitly declared integer). It's only names starting with i through n that are integer by default.
 

« first day (2201 days earlier)      last day (2741 days later) »