« first day (2157 days earlier)      last day (2805 days later) » 
00:00 - 11:0011:00 - 00:00

Ven
12:15 AM
hi
 
@Ven hello, yes, this is dog
 
@Aaron3468 While I was grabbing dinner, another thing crossed my mind. All the failures on non-overclocked machines were on Windows.
I have yet to see anything on Linux yet. (I run both, but more Windows than Linux.)
 
Ven
@набиячлэвэли why is dog up at 2am?
 
The guy who's been smashing all the records for the past year runs exclusively Linux.
 
12:20 AM
@Mysticial D:< Don't you go implicating my babeh!... but honestly that sounds promising.
 
@Aaron3468 Yeah, I wish it was that simple. Because so many things are different.
Different compilers. Different API end-points.
But it does point away at the hardware problem. I'll need to do some tests for this. But unfortunately, my laptop cannot run Linux.
MSI doesn't like Linux.
 
Yep, STDCALL, etc
 
@Ven because was dueling @Nooble in CoD:UO and then needed to do some shit
 
Ven
i see
 
12:26 AM
@Ven I smoked his bitch ass, then he smoked mine
 
haha my "copy to malloc and run" code works
 
It was a good day
not having used an AK might have been related to it
 
Ven
hi johanes
 
hello johannesburg
 
12:29 AM
lol
 
Reading the transcript is fun.
 
Ven
yes hi
 
I need to look at C++ conferences.
And start submitting to like every single one.
 
this pic is also on the english wikipedia. i think it's from a video game
 
12:36 AM
@ThePhD remind me, you're a student, right
 
"Man of the people." https://t.co/t1MH55ELmw
/cc @sehe
 
@Griwes Yep.
I can't check if a class has been defined yet, can I?
Goddamnit.
OKay, so, question.
optional<T&>
Should this have a value_or method ?
Because sometimes people put abstract base classes into optional<T&>
I feel like get_or is more appropriate.
Why the fuck did they have to rename it value_or.
Standard can go fuck itself.
Whatever. optional<T&>::value_or now returns... a reference.
Intuitive.
 
@ThePhD My working theory is that they are so afraid of an interface that's uniform across classes to the level where you could start defining concepts like "functor" and "monad" that they purposefully, even if not consciously, sabotage them.
@ThePhD Did you at any point apply to the C++Now S/V program, and if not - why? :P
 
@Griwes S/V what?
 
Student/Volunteer.
The thing @blelbach runs. :P
 
12:51 AM
No, I didn't because I wouldn't be able to present?
 
present what
 
My... paper?
 
The program doesn't require you to be a speaker, dummy.
 
That got rejected?
WEll yeah that's the point.
 
?
 
12:52 AM
I need publication / conference experience as a speaker. That's what my institutions will be looking for.
"I went and worked as a volunteer" doesn't really cut any bread for them.
"Doesn't really cut any bread" -- where did I get that expression? Did I just make it up now? What was it even supposed to mean?
I am a lost, lost individual.
 
Eh, going as a not-speaker first isn't bad.
Especially since you pay virtually only for the food you eat during the stay. :P
Also having some people know you doesn't hurt.
(And by that I mean it's worth knowing Bryce when you want to start going to the US based conferences as a speaker. :D)
 
Sigh. Is it too late to start applying?
 
For this years? Kinda, since the conference was in May... :P
 
Well yeah I know that, but I mean for next year and stuff.
 
(That's for C++Now, the thing in Colorado, not for CppCon.)
This year's was announced in like March.
(Of this year.)
 
12:57 AM
Oh, wow. I guess I'll wait, then.
I might need to take a year off and just do strictly publishing work / conference attendance, and get an internship and save all of the money so I can specifically spend it on travel expenses and the like for all the conferences.
 
@ThePhD The S/V program for C++Now is especially valuable, since the conference doesn't pay for travel and hotel espenses of the speakers.
CppCon OTOH does that, which is nice.
 
That is why I wanted to apply to it first. But I goofed up, so. :<
Either way. I have to go buy a calc book tomorrow and get started on lots and lots of homework problems.
For now I'll spend a handful of time just... doing more computer-oriented homework stuff, I guess.
Toodle-oo.
 
Xeo
You should haul your ass to Meeting C++ :P
 
 
1 hour later…
2:21 AM
@sehe Oh, yeah, I forgot in the meantime...
 
https://clips.twitch.tv/starcraft/ThoughtfulGooseKappa @smixity @x5_PiG @YoanMerlo xDxDxD u guys are hilarious
xD
 
user5378087
A* a = nullptr;
 
user5378087
void test( A* a ) {
a = produceA( ); // returns A*
}

why does my pointer outside the function still points to nullptr?
 
user5378087
I guess that inside the function a copy of a pointer was made...
 
That's correct
If you understand the difference between pass-by-value and pass-by-reference, it applies also to pointers.
 
user5378087
2:32 AM
So... can I pass a "reference" to a pointer for my function?
 
have you used references before?
 
user5378087
yes... actually I'm using a library and it uses pointers...
 
to clarify, the actual C++ language references that look like void some_function(foo& my_reference_parameter);
 
@Aaron3468 So I just went through all the tests my laptop ran last night and noticed that one of the AVX512 binaries failed through Intel's emulator... It said it tried to write to a null pointer. lol This time it's in multi-threaded code, but since it's also through Intel's emulator I can't really draw any conclusions. So make that 2 errors in one night and 3 in a week.
And of course the error doesn't repro when I run it again...
 
pass by pointer is awesome, kiss of death if you are doing it 'right'
 
user5378087
2:39 AM
It's SDL
the code is something like

SDL_Window* window = nullptr;
...
void openWindow( SDL_Window* window ) {
window = SDL_CreateWindow( ... ); // This returns SDL_Window*
}
 
user5378087
but inside the function the pointer is another object...
 
Have you used C++ references yes/no
If no, now is the time to read up on them!
I just put BUTTER on my keyboard jfc
Salty so at least honor is safe
 
user5378087
Maybe I'm forget about something, but I used before...
 
there’s probably a reference on references somewhere
 
if you are using a laptop, keyboard can be hot - butter on hot keyboard, think about it, just think about it!
shiny keyboard for the win!
 
2:48 AM
@Telkitty D:
 
@jaggedSpire :D
 
@Aaron3468 Ahahaha... Looks the temperature sensor on the laptop motherboard is recording 90 - 100C under load... Um... I'm not sure what that sensor is measuring, but whatever the case is... that's about 40C too high for anything on the motherboard.
My old dual-Xeon server from 2009 with ECC memory also gave memory errors when the north bridge overheated...
 
@Telkitty :D
 
@Mysticial O.o Well that could very well be the issue... Faulty thermal protection in BIOS?
 
I'm gonna try dusting it out first.
@Aaron3468 I fired up Prime95. Then I booted up HWmonitor to see. The first thing I noticed was that the CPU temps were reaching 90C. Then I stopped Prime95 and booted up my Pi program and ran that stress-test. And it went up to 95C. So the CPU's themselves are almost at throttling range. Then I noticed that the motherboard temp sensor was also at 90C.
When the laptop was new the temps barely touched 80C.
I'm not willing to sustain any processor above 85C for extended periods of time.
 
3:00 AM
but then how do you cook your eggs
 
user5378087
I switched

A* a = nullptr;
void f( A** a ) {
*a = produceA( );
}

And it worked...
 
Those are not references
@LucDanton On the GPU, obviously
 
user5378087
@PatrickM'Bongo yes, but i'm not sure if I can "mix" references with pointers because the "produceA" from the library returns a pointer. If I'm saying stupid things, please advice me again and I'll read about references.
 
@LucDanton Cellphones also work fine for that :D
 
When you pass an object by value to a function, a copy is made. Everything you do on that object within that function remains local to that function. Pointers are no different in that respect. What you want is to pass your original pointer by reference.
 
user5378087
3:08 AM
@PatrickM'Bongo I know it... but the symbols "*" and "&" is confusing in this case. I never see before passing the "original pointer by reference". Anyway, I guess I'll read about it...
 
> "We hope you enjoy using our software as much as we enjoyed designing it"
 
user5378087
(I'm learning C++, so these questions can be a shame...)
 
If you have more questions you may want to ask in the C++ Q&A room instead
 
@Mysticial Yeah, running mine above ~75C was causing more than a few issues. It turned out the cpu cooler wasn't screwed on tight enough to make contact while I was stress-testing the build. Now it's rare I see 55C
 
Laptop surgery time.
 
user5378087
3:12 AM
@PatrickM'Bongo thanks for answering and that advice. I didn't see the "other rooms" on the right.
 
I stopped paying attention to the temps when I noticed they were so low for a laptop.
 
you are probably not doing much on your laptop
 
I guess that explains why my overclocked boxes are usually more stable than my stock boxes. Simply because I monitor them a lot more closely.
I should probably get a dedicated box for running 24/7 unit tests. Laptops aren't really meant to be abused like this. Come on AMD, your Zen better be good.
 
Yeah, monitoring the hardware environment is a lot more important when you're pushing it to the limit. Engineers usually don't care what happens beyond the specifications they test
 
> J’ai commencé l’informatique à 13 ans, j’en ai maintenant 46. Cela fait donc maintenant 0x21 ans que je suis dans ce milieu et plus de 00010100 ans que je travaille.
fucking nerd
 
3:27 AM
@Aaron3468 Speaking of which, I haven't looked at the temps on my AMD box in almost a year now. I've never cared since it runs at stock with an AIO water cooler.
Wow... I didn't see much dust fly out when I cleaned it. But it looks like 15C drop in temps across the board.
The mobo temp sensor is touching on 76C which is still very high. But at least it's not the 90C+ I saw earlier.
 
Whoa, that's crazy
 
It was enough dust to make me cough. But not so much in the visible spectrum.
When I dust out my desktops, I take them outside. I don't do that in the apartment. That'd be insane.
But my main laptop is the one that stays on 24/7.
 
I need a laptop that I can developing both ios, android ... & possibly window's phone applications on. I have tried to port an existing android application onto my macbook, but it was more complicated than I expected.
 
@Aaron3468 The temps are still about 5C higher than when the laptop was new. But the code has also had a year of new (temperature increasing) optimizations.
 
@Telkitty Apple hates everything else enough that developing for windows or linux is tough, and getting Apple development tools on the other OSes is blasphemy. You might need Win/Linux with a hackintosh dual boot
I find that for general software, windows is ideal. For development tools, linux is full of them. Mac... well, they're flashy and they have a couple good programs for designing media like photos and music, but don't have anything the others don't (aside from the apple brand)
 
3:45 AM
Looks like the temps are creeping back up again. Still a cooler than before, but not the 15C from earlier. Guess the heatpipes have a lot more specific heat than I imagined.
Whatever the case is, it's high enough that I'm uncomfortable running unit tests on it anymore.
 
I want a development box that I can travel with
@Aaron3468 sounds like work load for a week - install window/hackintosh then setup development environment on both
after that still have to config for individual apps
also I heard about how apple purposely sabotage hackintosh OS with every new version
 
4:00 AM
Apple goes to absurd lengths to protect its intellectual property. They even sued samsung for using a similar design, which samsung chose to pay in nickels to spite them
 
@Mysticial Can't you run a dedicated box for builds?
Some spare computer or whatever
 
I hate CMake.
 
@PatrickM'Bongo I actually don't have any spare boxes.
 
I also hate the Linux development model.
 
As much as I like building computers, I've been pretty good with resisting the urge to build what I don't need.
 
4:04 AM
"Just get it from your package manager" Fuck you, include the source code and distribute it you piece of shit.
 
I have 3 desktops here, but all of them have a purpose and can't be "tied-up" with 24/7 long-running unit tests.
 
@ThePhD Haha, it's nice that the packages are managed, but I much prefer when the language can make and distribute the modules. It's why I also dislike package managers and cmake
< Loves the idea of shovelling every responsibility to the language so that I don't have to deal with shitty third-party programs. Just shitty libraries I can rewrite myself if needed.
 
I just don't like Linux's distribution model.
On one hand, they always have the source available.
On the other hand, there's so many patches and black magic to get working with <CURRENT DISTRO> that it's a bit unwieldy and kind of difficult to get moving.
And there is, of course, the utter lack of support for building <Not Linux> that you just don't want to bother with trying to make cross-platform shit that depends on notable Linux libraries, because at the end of the day the complex Arcana required to make this stuff work is mindboggling.
 
I've stuck with windows mostly because it has a backwards-compatibility fetish that makes code reasonably compatible with other platforms.
 
Windows does a pretty damn good job at the backwards compatibility thing.
 
4:18 AM
Which is pretty surprising, considering it's GCC that has rigidly maintained backwards compat in its compiler for a very long time.
 
Not only will it run shit built 10 years ago. But I can build shit now and have it run on Vista.
In Linux, I build on one machine, and it absolutely will not run anywhere else unless it's the exact same distribution with the exact same level version of libc and shit.
Unless I link statically. But that's not always possible.
 
Yeah, it's because windows is one of the few projects that doesn't get distracted by shiny new compatibility-breaking interfaces every third update or so. Which can be a downside in itself in some cases but I haven't really noticed it.
 
You're "supposed" distribute the source code instead of the compiled binary. At least that's what FOSS wants. But obviously that's inherently incompatible with closed-sourced software.
 
Linux has the problem that its demographic is usually happy to hack everything (so you can't rely on very much consistency) Q.Q Which is sad because there are some nice distros.
 
The alternative is to distribute obfuscated source code.
But because you have the extra indirection of compilation in the middle, it leaves the program vulnerable to miscompilation.
There's also no easy way to enforce compilation options if you do actually go the obfuscated source route.
 
4:27 AM
@ThePhD Maybe it's due to windows being so closed-source and conservative, where linux can basically be recompiled/modified by anybody.
At the end of the day though, I'm pretty comfortable in any ecosystem. The internet really helps; a few days of research can solve most issues I have with new operating systems or languages
 
God bless the internet.
I don't know how ANYONE on a Linux distribution got shit done or tried to share things.
That must have been a fucking absolute nightmare.
 
@ThePhD I think there's a reason package managers are standard on most distros, but not on windows :^)
 
@ThePhD distribution is complex, development is easy
 
Statisticians would be so proud. Look at me implying that correlation == causation
 
cor relation = causation
 
4:39 AM
Oh man
Compiling FreeGLUT and I'm already depressed.
I'll do this crap later.
 
Oh, I got it to compile, but there was a cmake macro I had to change, and then a macro I had to declare before the include
 
I got the configuring and the generating done.
I just... I'm not looking forward to linking this with whatever software my school wrote.
Bwah. Bwwuaaaaah.
 
-l*
 
But just a heads up, FreeGLUT doesn't have some of the features you take for granted. I found out it doesn't exactly support resizing, etc. It literally just draws windows for output and assumes you aren't an end-user that expects a flawless experience
 
4:58 AM
Q.Q It always makes me sad when a 2d sprite game is lagging because I know that means the code base is horrendous. A Galaxy S4 is not a puny phone by any means...
 
@Mysticial that’s not true, there are degrees of compatibility
 
@LucDanton From what I've seen, those "degrees" are uselessly small.
When I built on Ubuntu 15.10 it ran on 16.04, but not on 15.04. When I built on 15.04 with GCC5 installed, it ran nowhere else.
 
it’s the use of absolutes I object to
 
I was able to get some improvement in compatibility by setting the library search path to local and copying some of the .so's into the local directory.
 
@Mysticial You simply need to be reasonably careful. It's certainly doable.
 
5:08 AM
I don't remember the details, but while it made it run on one extra system, it crashed on the others. (some offset/relocation error)
 
@LucDanton On the other hand, language's purpose of distinguishing things from eachother causes absolutes to be one of the more efficient means of expression
 
Clearly false because it causes people to correct others
 
@Aaron3468 I meant in this instance, not in general
 
@PatrickM'Bongo Sure, I'll amend my statement; absolutes are an efficient means of expression, but may cause inefficiencies in a conversation because the other person is a pedantic ass ;)
 
^ case in point
 
5:12 AM
> corrects self; was correcting others apparently
Anyways...
@Mysticial How often do you need to rely on hacks like this?
 
I challenge those misconceptions because they tend to exacerbate the status quo and lead to a self-fulfilling prophecy imo. achieving compatibility takes lots of work
@Aaron3468 it’s not even a hack
 
@Aaron3468 I gave up. The moment I attempt to copy any of the dependencies locally, it causes relocation errors on at least one of my test systems.
 
Likely an issue with your library load order
 
O.o I see...
 
Copying dependencies locally works fine on Windows. But not on Linux.
 
5:19 AM
@PatrickM'Bongo lol
 
@LucDanton pls
 
@Mysticial at the very least you know about LD_LIBRARY_PATH right?
 
@LucDanton yes
 
since apparently we’re checking for the easy stuff :D
 
If you properly set up your library path there's no reason you'd get relocation errors
 
5:22 AM
I could either set LD_LIBRARY_PATH to include the local directory. But I found it easier to include ./ into the linker for the library search path.
And prioritize it before going into the system paths.
 
LD_LIBRARY_PATH is for the benefit of the runtime loader, not the compile/link-time linker
 
That method let me run the 15.04 + GCC5 build on 15.10 IIRC. But it caused a relocation error on 16.04.
 
You're still doing something wrong
 
I actually have no idea what load-time relocation errors are about, I don’t think I’ve ever looked or run into that one
 
At work everything is built on a centos 6.4 and the binaries are shipped onto various distros, and everything works
 
5:24 AM
then again I tend to shy away from the more ambitious or even exotic stuff in that regard
 
@LucDanton The only time I get them is when I attempt to package the dependencies locally. If I omit the dependencies, it gives the usual dependency not met error.
 
Yeah, hence your relocation error is because you're loading another library than the one you expect, with symbols at different addresses
 
There were also a few cases where it actually got into the program. But would crash the moment it tried to do some API call like pthread_create or something.
 
I have been feeling sick the whole day - upset tummy. Just feeling sick in the tummy with no other symptoms
 
Static linking was the only way I was ever able to get anything to work on all my Ubuntu installations.
 
5:28 AM
if we’re really talking about the typical system library like libc, pthread, and the lot then yeah it does sound like you were doing something wrong
 
But that also means I can't use Cilk Plus since that's dynamic link only. And I won't be able to use libnuma either.
 
binaries ship all the time
 
@LucDanton C'est ce que je me tue à lui dire mais il en à RAB donc merde
 
@LucDanton Don't they do a different binary for every single Linux distribution and every single version of that distribution?
 
@Mysticial who is they and what are we talking about?
 
5:29 AM
The package manager picks the one that's supposed to work on your system.
@LucDanton Distributors
 
it depends, there’s not one way of doing things
 
I was quite pissed off when I found out that Intel doesn't allow static linking for Cilk Plus.
And I'm even more pissed that I can't statically link libnuma.
 
@Mysticial even for things distributed via e.g. apt and all that jazz, for binary software package foo there will be exactly one foo-1.3.5 for version 1.3.5
which will require some e.g. libc version as a minimum, but is expected to work with newer versions as well
 
libnuma has two problems:
1. It doesn't have the static linking exception in the license. And I'm not going to go out of my way to support the whole "allow user to re-link" bullshit.
2. libnuma pulls in sockets since it supports some remote node bullshit. Sockets can never be statically linked for some reason which I haven't bothered to read about.
 
(addendum: it’s one version per arch)
 
5:35 AM
@LucDanton I'm sure it's possible. But as of right now, it's well beyond my capability. If that makes me incompetent, that's fine. Whatever the case is, it's unfortunate I was only able to the "run everywhere" binary for Windows, but not Linux.
 
so in any case I don’t want to say it’s easy or that it shouldn’t be frustrating to the user or that you suck because you couldn’t do it, but from my (limited) knowledge shipping software is plainly a hard problem no matter where
 
@Aaron3468 So I got two simultaneous failures within an hour or restarting the unit tests after cleaning out the laptop. One in each of the AVX2 binaries. One single-threaded, one multi-threaded. Again both in AVX2 and memory-intensive code. IOW, something is really fucked up at this point.
30 minutes of Prime95 didn't fail. And an hour of my stress-test didn't fail either.
 
Unless the code uses files, console output, maybe some simple GUI features and no special hardware, shipping it is usually nontrivial. Sometimes the only solution is to have a wrapper module and then plug the OS-specific library in behind it
@Mysticial Oh wow. At least you're reproducing the error consistently now
 
Perhaps something is up with the unit tests themselves. But that doesn't explain why I would get heisen-errors on single-threaded code. Unless the code is somehow offset-dependent.
On possible way would be if malloc() and new were not deterministic for single-threaded apps. In that case, between runs, the addresses they return are not the same offsets from the randomized base address.
So if the code had some sort of array-out-of-bounds, it could corrupt other blocks in one run, but not another.
Likewise if I'm reading uninitialized data, that could change between runs if malloc() and new are not deterministic.
 
6:06 AM
So whats everybody working on?
 
my lvl 46 Guardian
 
Debugging heisen-errors.
 
I submitted 3 first author papers last month, and they got rejected. I'm writing some muli-threaded C++ as a form of denial, I'm told this is the first step of grief recovery - but I don't believe them.
 
fun to read up on stackoverflow related stories on Quora and Reddit
 
@Mikhail Ow, what were they about?
 
6:10 AM
almost gossip level quality
 
@Mysticial System to detect cancer, system for assessing embryo quality and 3D cells, and some experimental work on measuring microtubles. I built the system.
 
dirty little deeds ... speculations ... probing ...
 
I've seen the reliability of my code go up when I realized I could chain functions together by passing other functions to them. For example, I used to have a queue that had Work ComputeEngine::getWork(), sometimes this failed and returned a failed object, also ownership wasn't clear, often requiring a deep copy. Now with bool ComputeEngine::GetWork(std::function<Work> I can chain together things, and avoid deep copies.
 
6:48 AM
@Mikhail Did they give you a good reason for the rejections?
 
@Mysticial No, which means the work isn't exciting
 
oh, that sucks
 
Yeah, thats the problem with academia, bad ideas don't get killed :-)
 
I know what you mean though. When I had my pi paper reviewed, there were 4 people. 2 weren't interested, and rubber-stamped it because it "set a world record". The other 2 were interested, but only one of them was actually an expert in the field. That expert in the field ripped me for not detailing one of the algorithms.
I withdrew the paper.
In the end, I never got anything published - which probably contributed to me getting pushed out.
 
Typically you get anything published, just in a bad journal. But yes, its not very rewarding, which is sad because naive people (like me), and perusing a PhD to do rewarding work.
 
7:04 AM
I have heard worse reasons
 
Like picking up chicks
 
never heard of that ...
my old friends persuaded PhD because ... that seems cool
 
You can touch women in places if you have a "Dr" in front of your name.
 
@Mikhail Oh, is that the purpose of a Ph.D?
 
yeah, usually places that seem to have something going wrong
 
7:06 AM
=.= I pick up concepts very easily, but my algebra is absolutely terrible. Guess which part every one of my lecturers has emphasized so far?
 
My old friends went on to do PhD because 1) they have nothing else better to do 2) Engineering undergrad seemed hard, so by doing a PhD in Engineering, they would prove their ability to be better than the rest of the peers ...
 
 
1 hour later…
8:17 AM
@ThePhD They never renamed it value_or. It was always named like this, ever since Boost's times.
oh, optional<T&>
well, obviously
we're returning the value_type, which is... T&
...now I think references were a mistake
At least how they work currently
 
Xeo
8:52 AM
@milleniumbug Didn't the standard forbid optional<T&> or something?
or did they budge and include it?
 
not sure, ask ThePhD
 
9:03 AM
They didn't budge in. Which is why std::optional is not a very useful type, because you still need to write a ton of boilerplate to get yourself an optional supporting that.
(Basically replace all the references with reference_wrappers and then add a massive amount of code that makes the wrappers invisible.)
Weak typing https://t.co/DwrHmB18dy
lol
 
Xeo
@Griwes Meh.
At least they seem to have gotten variant right-ish?
 
@milleniumbug you were right about my question being downvoted
 
9:19 AM
@Xeo I deeply disagree and find at least two out of three ways to avoid the retarded empty state to be superior to actually having it.
(One is doubling the storage for the cases where it could get into the empty state, and the other is disabling assignment when the types inside are retarded and aren't nothrow movable.)
> If a variant holds a value of a reference type, the implementation may choose to store it in the form of a wrapper type such as std::reference_wrapper.
Hmm, at least they didn't fail at that.
 
9:40 AM
@Griwes I guess we'll start to get used to seeing T* as a poor man's optional <T&>
 
@sehe Unless you're look at sane people's code - that'll have a hand-rolled optional that supports the sensible semantics.
also value_or taking a value is a huge mistake
Or, should I say, only having value_or taking a value is a huge mistake.
There needs to be one that takes a lazy value, or, since apparently "we don't need those on the language level", a callback producing such.
(And "you can write it yourself with the current optional" is a giant pile of crap, since that defeats the point of standardizing it in the first place.)
 
@Griwes With this mindset we don't need value and value_or either
Just have explicit operator bool and operator*
 
@Aaron3468 Updated my laptop's BIOS to pick up the microcode update which fixes the Skylake bug. Wanna make an guesses on whether it has any effect on the errors?
 
> > Sunless Sea creative director guest writing content for Stellaris
> Well, having played sunless sea myself, if there's anyone that can make squid people more interesting it's Alexis Kennedy.
 
@Mysticial my CPU seems fine with that. But I don't over clock
@Griwes what do you mean. Should it take a ref or an optional
 
9:56 AM
@sehe There should at least be another overload taking a callback to generate the value lazily.
I'm also almost confident that should be the only overload.
 
@Griwes ah
 
10:10 AM
@sehe That bug isn't related to overclocking. But it only seems to affect "complicated load patterns". I can't say whether my code falls in that category, but it's worth taking a shot at it.
My laptop isn't overclocked either. (It can overclock, but I chose not to because of the overheating.)
 
user4710450
10:25 AM
Hi all
 
user4710450
What is Thread Cancellation?
 
user4710450
Is it like killing process, just for threads?
 
user4710450
Anybody online?
 
Ven
No
 
10:32 AM
Please respond
 
user4710450
Please help me
 
user4710450
Nobody is online in C++ Quetion/Answer room
 
user4710450
I have exam two days from now :(
 
user4710450
 
So I have replaced my MS Natural 2000 keyboard with MS Netural Ergonomic 4000 keyboard.
It sucks to have to relearn typing.
 
10:38 AM
Something with "ergonomic" in name forces you to relearn typing? lol
 
@Griwes Yes, it is the split one.
 
Ven
@Mysticial tried electric fence? Hahaha
 
The previous one was curved but not split.
4
Q: What exactly is a cancellation point?

code_fodderI am trying to get my head around what exactly a cancellation point is in c++. I have read: man page and What are pthread cancellation points used for But I am still a little confused on certain points. For example, I am using the file write() function. Apparently this is a cancellation point. ...

 
user4710450
I know what cancellation points are, they are points from which we can cancel a thread in a synchronous thread , but what deos canceling a thread really mean?
 
@Ehsan It stops existing.
 
user4710450
10:42 AM
Can we resume that thread?
 
@Ehsan You cannot resume what does not exist.
 
user4710450
@wilx Yet the book says we can use pthread_join on them!
 
Xeo
@Griwes Oh what, they left that in? Man....
 
@Ehsan That makes sense because in this sense it is not different from a thread exiting of its own volition and being joined.
 
@Xeo Oh course, how else would it be unanimously voted in at the plenary?
(There's a lot of people who want to reject every good solution that's proposed on the committee.)
 
user4710450
10:46 AM
@wilx I'm totally confused about pthread_create,pthread_join, ... Maybe I should take a break :|
 
(And sadly some of them are quite vocal in their national bodies. :|)
 
@Ehsan Furthermore it makes sense because cancelling a thread is not immediate action with immediate result. The thread might not be in a cancellation point for it to be cancelled. Waiting for it to be cancelled using pthread_join makes sense.
 
user4710450
@wilx Um, I am understanding a bit more
 
user4710450
So with pthread_join we are waiting for the cancelation not the thread execution?
 
Thread cancellation is IMO a very broken feature.
 
10:48 AM
Calling a pthread_cancel basically sets a flag on the thread. If the thread gets into a cancellation point (function) or calls pthread_testcancel itself to test for the flag, it gets cancelled.
@Griwes It is wrt/ C++.
 
user4710450
I should have thought about it when I took Parallel Programming course this semester :(
 
@wilx It causes a ton of PITA at every place that needs to support it for it to work.
For no gains really, since an atomic flag that's read by the thread in specific places is trivial to implement manually. (And horrendeous to implement otherwise.)
 
Ell
@Griwes instinctively it is to me too
 
@Griwes But it is hard to cooperate in such manner that you could interrupt a thread waiting for a read() or such.
Cancellation is useful IMHO in some limited fashion.
 
@wilx Err, does cancellation actually help there?
 
10:54 AM
@Griwes Yes, it does. read() system call is a cancellation point, AFAIK.
 
Okay, it is. Hmm.
That's terrible either way though.
If you're spinning up a thread to call read(), you've done something horrendeously wrong.
(Should be using some async API to avoid spinning up unnecessary threads.)
(If there's no async I/O API on your platform, the thing you did wrong was... chosing the wrong platform.)
 
@Griwes You are oversimplifying here. The process could be doing something else but also blocking on read().
 
@wilx ...?
If you have a separate thread where you are reading and you can possibly want to cancel that task, you're doing something wrong.
 
@Griwes Why? It seems reasonable for some sort of read-transform-write pump.
 
@wilx Because a thread that's blocking on those calls wastes resources.
 
10:59 AM
@Griwes This sentence makes no sense.
 
Seriously, did you not attend the "don't spin up threads to do blocking I/O if you can avoid it" lecture?
 
FFS, this is C we are talking about.
 
@wilx Blocking I/O wastes resources. Better now?
 
00:00 - 11:0011:00 - 00:00

« first day (2157 days earlier)      last day (2805 days later) »