Note that it'll be impossible to get the rest of the world to adhere to the same interface design guidelines - like with noexcept, volatile etc. But it's worth having a sane standard library
@StackedCrooked Something seems off still http://coliru.stacked-crooked.com/a/36565637d3e46cb3 - note how the output is incorrect (3 "science" instead of 3 "science" - also note the ldd output in the end: it tells me that the graph library so is not found (yet it does run...?)
"The current answer(s) are out-of-date and require revision given recent changes." - do you mean, I edited the question to mean something else. Regardless, it is still unclear. — sehe5 mins ago
*Handyman slowly stole elderly woman's belongings*
The family friend stole thousands of dollars worth of goods including a clothes line, kettle, fridge and binoculars.
@sehe I don’t think I ever told you, but I actually am very sceptical of decltype(auto) return type deduction. we had fun with it when writing those get overloads in tandem with constexpr if for conciseness, but I still can’t shake my doubts
In learncpp.com, I am reading that when you initialize an fixed size array, it's length has to be a compile time constant. But on sites like codechef or codeforces, I can even create fixed length arrays with taking it's length as an input in C++. Why ?
I don't really understand why I can't have a variable size array on the stack, so something like
foo(int n) {
int a[n];
}
As I understand the stack(-segment) of part of the data-segment and thus it is not of "constant size".
@sehe Yeah, luckily it happened right at the end, although it ruined the atmosphere of this masterpiece momentarily... Hamelin's scarbo is seriously good!
Apparently it pickles the state of the program and unpickles it in the new process, which produced strange errors considering I didn't know it used pickle :v
It is: it's often great for simple things, but I've already run in my share of tricky things that require to know a bit more about how things are handled in the background :p
I already had a few headaches working with NumPy and PyQt
Anyways, mp on python is a nightmare on Linux where you start getting mallow failures and other random fuck. An error in one process would often not propagate to the parent. Now your program is failed but not closed.
I had so many problems with python multiprocessing, and no amount of bandaids could fix it. C++ would have been a better option.
Wait, apparently it's the multiprocessing.Queue that uses pickle, not the forking itself :hum:
And that's where I realize that I didn't use a Queue to communicate between processes but to have some guarantee that when I push something in from the callback called when another process finishes doesn't add something while something is popping from the queue (if it's thread-safe, this should work too?)
Nope, the forking does pickle/unpickle too apparently >.>
A task is meant to be initialized with some variables, then launched once and only once. I guess that I can use that property to safely initialize some of the biggest variables to something relevant only in the start method. That should avoid most of the pickle problems and keep fewer things in the main process.
Yeah and the underlying reason for pickle is that each process has its own interpreter and you need to send the complete object information. That's no bueno for large arrays.
It's like how you serialize to json in js when cloning objects
@Morwenn Oh, sorry. He was a comedian best known for insulting his audiences. Going to one of his shows was pretty much asking to be the subject of a roast.
@Morwenn I'm not sure people really know you a lot less than they do most other people--but in your case, they realize they don't know you because you're harder to fit into a simplistic stereotype.
For my assignment I am asked to sort student's test scores from low to high, then to sort the student's names alphabetically. I have successfully sorted both ways. My problem is I am not able to print both of them out. I used do-while loops for my bubble sort function so it only prints out my las...