« first day (2081 days earlier)      last day (2850 days later) » 

12:18 AM
lemme guess, since brexit, unconf will never be in London again? :p
 
12:30 AM
I'm trying to get these guys to do it in Montreal.
But apparently spending a thousand bucks for a plane ticket is too much for them.
 
I'd be down for Canada. I could drive up there.
 
c++ is better than c right
 
@user2997204 Depends on what you mean by "better"
 
@user2997204 Confirmed.
 
12:37 AM
i mean everything, speed, libraries etc
cuz ++ means its better right? (new version)
 
@user2997204 C is deprecated.
 
@user2997204 It's a completely different language that reuses some of its syntax.
 
@EtiennedeMartel That statement is inaccurate.
 
Not exactly completely different
 
12:38 AM
@EtiennedeMartel the C++ spec is based off of the C spec directly.
 
ok but
but i thought C was older so C is better for really low lvl coding?
or not?
 
(You might pedant your way through it but face it, seeing C++ as having nothing to do with C means you're less likely to learn it the wrong way)
 
@user2997204 C++ is a super-set of C. C is not inherently faster or better, even for low-level coding.
 
Age in that sense is irrelevant
 
12:39 AM
The only major non-zero cost abstraction in C++ is exceptions.
 
I was thinking all that because
I want to do DLL injection and I dont know what programming language to pick
 
class CPlusPlus : C
 
@blelbach Not a strict superset. Some C code doesn't compile in C++.
 
there ya go
 
@EtiennedeMartel It is not a strict superset, but it is based off of the C11 standard.
 
12:41 AM
@blelbach what's your beef with terminate? :)
 
Well. Now.
 
does it not always terminate?
 
It does not.
 
@blelbach Not right now, but yeah. Soon.
 
Why doesn't it?
because you can call a function on terminate?
and that function can be infinite looped?
 
12:41 AM
No.
 
oh. when does terminate not terminate?
 
Anyone have a basic design I can use in a fractal?
 
That's one of the two terminate() UBs I will be killing
the other UB is when you throw from terminate()
 
@blelbach Depends on the ABI, really.
 
yeah, but terminate is like a last resort
you can't recover from it
why would you throw?
 
12:43 AM
@EtiennedeMartel Please explain :p
@TrevorHickey It's not about "why would a sane person do this"
 
y u no explain
 
It's about "can the compiler assume that no one will do that?"
the answer right now is no.
the compiler cannot prove that you will not throw from a terminate handler
which means it must be prepared for that
 
I see. so throwing from a terminate_handler is UB
and you don't want it to be?
 
Right.
 
y u no explain what UB mean
 
12:46 AM
This is not actually about fixing terminate() or removing UB. It's about allowing a compiler to safely make some assumptions about terminate() that will lead to better code gen, specifically better code gen in code which is being vectorized
@Darkrifts Undefined Behavior
 
cool, I see. whats the state of things when terminate is triggered?
 
hasn't the whole stack unwound?
 
An acronym which should be on this pages list of acroynms or not
 
UB is in the acronym list linked from the rules btw
 
12:47 AM
@TrevorHickey Nope. It is unspecified if the stack is unwound or not.
 
(quickly goes to verify I'm not wrong)
 
@blelbach I mean, it's far from free, but modern implementations make you pay the cost only when you're actually throwing, which shouldn't happen often.
 
yea, because you could call terminate directly I suppose
 
@EtiennedeMartel This is untrue
 
Time to intentionally cause UNDEFINED BEHAVIOR :D
 
12:48 AM
@EtiennedeMartel Any external function call that is not marked noexcept comes with a price.
 
wish noexcept was the default
 
There is a reason large chunks of the C++ community turn off exceptions.
noexcept should be the default, we fucked that up, Dave A admitted it apparently >.>
Sorry
 
So, what are some examples of causing UB in C++?
 
and exception specifiers are also garbage. they are depreciated, right
 
yes
err
no that didn't go in
 
12:49 AM
If you turn exceptions off, does throw immediately result in terminate being called?
 
that was one of two papers we didn't have time to process last week
@TrevorHickey Depends on your implementation. It's usually just unspecified
 
@blelbach Any other examples of C++ undefined behavior I can mess with?
 
@TrevorHickey Compiler errors in some compilers, others just abort / terminate.
 
@Darkrifts Attempting to modify a string literal in C or C++03
 
neat
 
12:51 AM
High quality implementations will abort on exceptions with exceptions turned off
lower quality ones disallow it
 
Disallow what... the throw itself?
 
so much of the STL uses exceptions; how do you feel about that? :)
 
@TrevorHickey We should fix that
 
agreed
 
Let's start with axing bad_alloc and making operator new noexcept
OH WAIT
If you do that, 85% of the STL doesn't throw
 
12:53 AM
I heard new never even throws on some implementations
no matter what
 
#define throw if (true) std::abort(); else

#define try

#define catch(...) if (false)
@HWalters That's what -fno-exception does basically
@Darkrifts left shift operator on negative values is also ub
In C
We may have fixed that
 
can you really make something like new noexcept?
 
@blelbach Left shift is like 3 << 1? Moves the bits in 3 over by 1?
 
Yah
 
what happens when new actually fails and you are out of memory?
 
12:56 AM
So it'd be undefined behavior if something like -1 << 1?
 
@Darkrifts In C, I believe that's correct
 
Hmmm
 
@TrevorHickey OOM killer eats you on Linux. Similar thing kills you on Windows/Mac
 
I need to find an ezpz undefined behavior with numbers for c#
 
OOM killer is faster than you so you die before you could handle it anyways
 
12:57 AM
TO TEH INTARWEBZ
 
Signed integer overflow is UB
A bunch of other stuff
Like the entire standard library is a pile of UB
 
ah. well I'm not sure about other OSes. embedded real time and such
 
every library function with a pre-conditio has UB if that pre-condition is violated
 
So, if I move an int past the 2.7 billion limit, it does something stupid?
 
@Darkrifts It's not that it does something stupid
 
12:59 AM
Does UB though?
 
It's that it does something which neither the standard nor your compiler needs to specify
UB is not inherently stupid. You just have no guarantee about what could happen
 
EXPERIMENTATION
 
A unicorn could charge out of your computer screen and murder you.
You never know. Because UB happened (and the Abstract Machine contains a unicorn)
Anyways. terminate() should terminate and not have UB
mike drop
 
What about setting unsigned things to negative values?
 
@blelbach I've only ever heard of like... maybe 1? case of someone actually handling bad_alloc. Almost nobody would ever handle an OOM case like that and generally just terminate.
I wonder. Does -f-no-exceptions trigger the STL on g++/clang++ to call most of its parts noexcept?
 
1:11 AM
@ThePhD TBF on systems with virtual memory its pretty hard to get an OOM
 
@Borgleader Yeah, which is what makes the bad_alloc exception kind've sadface.
It's a pedantic correctness that could probably be done away with.
 
1:24 AM
I feel like structured bindings came so close to being abusable for reflection of simple structs, but not quite.
 
48612913 | 48367765 | 14150501
 
1:42 AM
@Darkrifts true
 
That's what I got from some c# pointers with some address incrementation junk
yey random address's values
 
Which stackExchange is the proper place to ask about a C++ example from boost?
*the reasoning behind code from a c++ exmaple from boost
 
@USERID_UNK This one in all likelihood. It's certainly possible to fit understanding code questions into the guidelines.
 
@chris Ok thanks
 
int X = 0;
funtiems = &X;
Output.Text = "";
funtiems++;
(*funtiems)++;
Output.Text += *funtiems + " | ";
funtiems++;
(*funtiems)++;
Output.Text += *funtiems + " | ";
Output.Text += funtiems[1337];
Managed to crash myself only half the time with ^
 
2:24 AM
1000 lines of code, 300 of them are debug
coz ... log file for the win
 
2:38 AM
@Borgleader On at least some (e.g., Linux, at least as typically configured) it's essentially impossible--the OOMkiller starts summarily killing processes rather than telling your process it used up memory.
 
3:33 AM
Parameter packs make me the sads.
 
So... I've come across a seriously bad case of Intel Compiler pessmization. And I can't find a work-around for it.
It's rare that the Intel compiler pessimizes code. This is the first time it's happened in a performance-critical place and I can't find a work-around. Fuck.
 
That actually sounds uncharateristic of Intel.
 
It does.
I don't have a small SSCCE that repros it, but when I pass a large object by pointer or by reference into a function. It null-checks it before the first access to its members. If it is null, it segfaults on a null-pointer.
The only thing that does is that if it's null, it crashes on deferencing a null pointer rather than a bad pointer.
In the normal case, it's just run-time overhead. And it does this even for references.
I can't find any relevant flags that could affect this behavior.
 
3:56 AM
I don't get it.
Why wouldn't it just access the thing straight away and let the kernel / code segfault?
 
Exactly. I don't get it either.
 
Why do the check and then segfault / fail... in a completely different fashion?
"But it's a BETTER segfault" ???
 
It actually seems to do the check once for each member that's being accessed.
So if I touch 10 things in the object, it checks it 10 times.
 
Sounds like a degenerate case, really.
 
It's doing it in a branch-free manner. But it still means there's 3 extra instructions for every member that's accessed.
 
4:54 AM
rip chat
 
@Darkrifts The chat is dead. Long live...well, anyway.
 
meh
 
5:15 AM
WTB fold expressions.
if ( (some functions<Args>(args)) || ... ) { return x; }
Or whatever the syntax is.
I don't know how to emulate that without recursion, and recursion is costing me right now.
 
Ell
Compilation time?
 
Yeah.
And compilation space.
50+ arguments, which means there's an instantiation of a function with 50 args, and then inside of that, 49, arguments, and then 48...
 
Ell
Hmmm
Can you use a fold expression or something?
Idk :P
 
Wonder if I can use a cosntexpr bool or something...
 
5:31 AM
 
Ell
@ThePhD wait what's wrong with this?
 
Don't you just hate it when you want undefined behavior, but it doesn't happen
 
@Ell I can't use fold expansions.
 
user6225166
@ThePhD what do u want to do?
 
I don't even know what a "fold expression" is
<-- skrub
 
5:34 AM
@GNACBetombo I want to stop doing a computation if an earlier one succeeds for a parameter pack, without recursion.
 
Well, you could put them in separate if statements
Inefficient though
 
Caveat: using VC++, so no fold expressions.
 
Idk
 
Ell
Yeah I've no idea how you'd do that without recursion
 
What is a fold expression though?
 
5:45 AM
help
getting weird output for program
 
1) They need to know what you want 2) what you're getting and 3) How you're trying to get it
 
My output where it says "number of a's".... I get an enormous integer
instead of just... well, the correct integer.
 
What number do you get?
Is it ~2.7 billion?
Well, you could initialize the variables by making them start as 0 or something?
 
solved
thank you
you're my hero
 
:D
Congrats @Donnie, you had what I think is undefined behavior
"Y U NO CRASH" - Me 2016
Well, in any case, variables w/o a value can do weird things, so look out for that
 
5:56 AM
Lesson learned
And it is such a typical mistake too
after typing that all up in under 15 minutes I felt proud of myself for a novice and then I am stuck with perhaps the most simplest error
 
Hey, atleast you arent going like int X = 0; int* Y = &X; Y++; std::cout << *Y;
Don't question the whole thing, but basically * means it's a thing called a pointer or multiplication
Y points to X
 
6:24 AM
Sometimes you have blue screen of death, other times you have black screen of death. But today, I encountered stripe screen of death ...
My life is more complete!
 
O.o A phone? That looks almost like a screen update test
 
lol
gg
 
the beauty of having your own apps to test on mobiles is the strange abnormalities sometimes you get to witness :p
maybe not beauty but you get what I meant >_<
 
:-/
 
fun
I intentionally made a situation to cause Undefined Behavior once
Didn't crash (cue sad music)
 
6:37 AM
MSVC will typically omit lines that cause UB
for example, calling delete on an incomplete type
 
I'd just do strange things with pointers to mess with the runtime
This is my attempt at crashing
 
@Telkitty :D I dusted off my 3DS and ran a hack; it's beautiful to see the screen flash numerous times. The hack was interesting to look at: a buffer overflow pushes a jump instruction onto stack, which jumps to desired instructions in the ROM (with nearby jumps to the next piece) to create a backdoor
Mobile platforms have so many easter eggs
But the hack reminded me of how you can make a secret message by sending paragraph indexes from a popular book
 
sell it as a piano app.
Enough people are dense enough they won't notice it's not actually correct
@Aaron3468 I love the unsollicited use of "But" there
@ThePhD you can't. You can use bool cosntexpr; though
 
I don't intentionally making phones to display those ... abnormalities. But sometimes my superbly (bad) coding hacking skills (at times) making those abnormalities to manifest themselves occasionally >_<
 
@USERID_UNK I'm looking for it now
ENOENT
 
6:53 AM
Y U NO CRASH
 
So these easter eggs are cool, but they're in the way because you wanted to do something more useful than turning your phone into a lovely paperweight
 
@Telkitty Sell your services as a magician. You'll be great at parties
ITT people loudly complaining about UB manifesting in the wrong way
 
You know a program's high quality when it has a crash warning on one of the features
 
@blelbach He doesn't get an authoritative voice anymore. He deserted C++ :)
 
#c#
 
6:58 AM
c##
 
#define
 
@ThePhD derpiest highlighting of the day
 
Looks like he highlighted everything but a few spots
 
Hmm, where have have you used boost::optional?
 
Sometimes, when I get comfortable in a language, I forget how much behaviour is arbitrarily defined... I had to use a C-like language and I spent the first two days trying to figure out whether it supported classes, what type of passing it did, and how it defines constructors
 
7:00 AM
C-style masterrace
apart from Objective-C
 
Sometime soon, I'll probably pick up an ATTiny Microcontroller. My sister doesn't have a green thumb, so she'd appreciate a 'water me' indicator that flashes irritatingly when her plants are thirsty.
expected ';' before string constant
cout << "l" + C "l";
 
gg no re me
 
I got it working, but I'm not exactly sure why you'd want to print l<char>l for every <char> a to z or why you'd loop while true
 
I mean, to fix it you'd just have to add a +
And because why not?
 
7:17 AM
I guess. One silly project I did when I first began with C++ was a caps alternator; type in a sentence, and it obnoxiously alternates caps for each letter, then puts the string into your clipboard. I trolled a few message boards back then...
 
nah too obvious
 
how2clipboard
I need to not obnoxiously alternate caps, but something to completely scramble a sentence :P
 
@blelbach They're stupid, their implementations are terrible, or both.
 
It also could reverse the sentence and had bold/italic support too ^_^;
 
I have an idea
 
7:47 AM
in TeX, LaTeX and Friends on The Stack Exchange Network Chat, 1 hour ago, by yo'
> The IT department say there's more free space in the EU now, namely 1 GB.
 
Funny, but the inaccuracy ruins it for me.
 
@R.MartinhoFernandes Haha. Yeah. But it still is funny! :D
 
That's what I said!
 
@R.MartinhoFernandes I am not saying you did not!
lol
 
Dear lazyweb, is anyone using GDB visualizers for boost::optional etc.? I can't seem to find a recent enough answer (to avoid wasting time on old ones)
> "lol"
 
7:59 AM
@sehe No, you are!
 
no u
 
@Mikhail Where not? It's literally central to my C++ coding. I've just refactored a lot of XML import code last week to stuff way more readable by using "monadic" parsing and combination of candidates
 
user image
4
That's a 17th century rant against singular 'you'.
From The history of the life of Thomas Ellwood
 
Let's tell them about "they"
 
Ven
8:27 AM
Hi.
 
8:43 AM
Lo.
 
@R.MartinhoFernandes "Fuck you" would have been the appropriate response :P
 
9:00 AM
@sehe BTW, I vocalize the "lol" sometimes. :D
 
I often vocalize it mentally.
Which isn't even vocalizing.
But whatever :P
 
@StackedCrooked I think it is. It's also the process which inhibits speedreading
@StackedCrooked Fuck thou
 
@sehe did you mean "fuck thee"?
 
9:17 AM
@ScarletAmaranth Yes I didn't
@TahaRehmanSiddiqui Drive by linking is bad nettiquette and against the room rules. I'll remove your message so you won't get downvoted for it by the less patient...
2 messages moved to bin
 
@sehe Sorry, my bad!
seems like i already got one
 
Ok. I'm sorry for that. I haven't looked at the post enough to know whether it was deserved or undeserved.
 
@ThePhD My variadic talk is in.
 
Ven
gratz
 
9:43 AM
@ThePhD Good luck. Mine didn't make it
 
@AndyProwl Dear Andy, we are terribly sorry to inform you that your talk was kinda shit.
 
Ven
utter bollocks
bottocks
 
@ScarletAmaranth Oh so it was you who reviewed it
how else could you know the exact wording of the review
 
:D
I've had one of my papers rejected in a very similar fashion :D
 
10:03 AM
Beijing residents have put up with choking smog, trash-filled rivers and toxic running tracks. Now they have another concern -- sinking.
An international study led by Beijing-based researchers has discovered that the city is dropping by as much as 11 centimeters (4 inches) in some districts per year.
 
@sehe Huh
 
@Telkitty looks like the movie 2102
 
@Griwes My talk was rejected. =/
"Too domain specific."
 
What was it, exactly?
 
"Writing a Lua wrapper in C++"
From the reviews, I think I did a bad job of explaining that I was going to review 12 other Lua bindings in C++, because people thought all I was going to do was talk about sol2 and how to make it efficient and fast.
... Someone was also concerned about not knowing who I was, and that I might be multiple people.
 
10:13 AM
cough
 
>:l
EITHERWAY, for the reviewers who did seem to catch everything I was saying, I had a higher grade and they were willing to strongly accept me.
But the others were much harsher and asked questions I was almost certain I had answered in my outline/proposal, such as "am I a single person", "are you going to review multiple libraries", and "how this was going to appeal to a broader audience" (e.g., the talk was about wrapping up plain C APIs, not just Lua, but Lua was going to be the big demo case).
Takeaway: write a more pointed, in-depth, clear proposal.
 
@ThePhD What is there to "Huh"? Did you look at the screenshot? No need to look further than the first ... ~10 words or so
@ThePhD They're on to something
 
@sehe The yellow color?
It looks... normal to me.
@sehe If I have to become a big name without a place like CppCon under my pseudonym, then so be it.
They made me jump ten thousand hoops to ID myself, and I even sent in a picture at their request as well as relevant identifying information.
 
@ThePhD lol. "library's use case" is somehow code?
 
10:28 AM
Oh. Shrug.
 
So. That's what you're doing. Not looking at things, making a lot of noise and then shrug. Constructive. You could have just ignored it form the start :)
 
Except, even if it's hours late, now that I saw it I already when and corrected it. The shrug was because "that's a minor thing, I thought I had botched an entire highlight" (because I had for some little code bits before and I thought I had left something out).
 
10:41 AM
Let's see... don't be discouraged submit a poster...
Well, I can't do a poster. I used to do lightning rounds in speech and debate so many I could throw my hat into the Lightning Talk ring.... I'd need to watch previous lightning talks and understand their formats to see if it'd be a good way to tell people about wrapping up a C Library in a C++ API...
 
10:59 AM
In other news, I don't plan to go the Issaqah to present my proposal anyway. If it isn't accepted because of that... Well, it won't be accepted, but that's pretty much it. Whatever.
 
Hahaha
@Morwenn Your proposal? For integration of parts of cppsort to the stdlib?
 
@ThePhD You're extrapolating. I only proposed to weaken the requirements of std::sort, std::stable_sort and std::inplace_merge to accept forward iterators :p
But yes, that one.
 
Right, sorry. You had shown me the proposal, I should have used the more accurate description of it.
 
This still gives me goose bumps!
 
Ven
11:09 AM
hi @Morwenn <3
 
@Ven Hey :3
@ThePhD Too bad for your CppCon talk :(
 
@Morwenn It is kinda sadface, yeah.
After looking up the lightning talks format, I don't think presenting Lua wrappers that way would be the right thing to do either. There's a lot of nuance and benchmark discussion I want to do, and I don't think that'd work for that.
So I think, in the end, I'm just gonna have to wait for another conference.
 
How are lightning talks differents?
 
Ven
much shorter? :c
 
@Morwenn 5-15 minutes, generally meant to be more on the humourous side of things.
I definitely need at least 30 minutes to discuss 12 different Lua frameworks.
 
11:22 AM
Oh, ok.
 
I could cut that number down, but if I do then I get "ThePhD is biased, he didn't review {X} framework".
Which is something I already get from the Lua mailing list and other places.
 
Rich please, you even improved them :(
 
@ThePhD kek
It's literally impossible to always review all of frameworks that compete with you.
Just review 2-3 of the most popular and 2-3 of the most neat. vOv
 
Do it like me: when something's better, steal it, make it better, and integrate it :D
Except when you can't make it better because it's already kek.
 
SLB3. =_=
Someone MADE me look at that framework. And it turned out to be a trainwreck on wheels.
 
11:40 AM
@ThePhD At least it got those!
 

« first day (2081 days earlier)      last day (2850 days later) »