« first day (1458 days earlier)      last day (3481 days later) » 

9:00 PM
@Loopunroller We must be professional.
@Loopunroller Yes indeed.
 
@LightnessRacesinOrbit I love you.
 
Ell
@LightnessRacesinOrbit you really don't want to know
I'm writing terrible code
 
go on show me
@Loopunroller <3
 
It's okay
Everyone's writing terrible code
 
Ell
9:01 PM
@LightnessRacesinOrbit I still have some momentum so I'm gonna try and fix it for a while first
 
i'm not
i'm trolling imgur
 
Ell
but I'll show you when either it's finished or I'm giving up :P
 
@Ell SHOW IT TO ME BITCH FACE
 
Ell
you'll need a welding mask
 
OR I'LL SLAP YOU SO HARD YOU'LL REGENERATE
 
9:01 PM
@LightnessRacesinOrbit YOU'RE NOT BEING PROFESSIONAL LIGHTNESS STOP IT STOP IT
 
Ell
Patience, patience ;)
 
@Loopunroller I approve.
 
Scrotal Recall: "After being diagnosed with Chlamydia, twenty-something Dylan Witter embarks on the task of giving the news to his previous sexual partners. Joining Dylan on this daunting adventure are Luke and Evie, who have been by his side for the past decade. Each episode will cross another name off the list of women with whom Dylan needs to share his less than thrilling news."
WTFF?!
 
@Ell Patience Raced out of Orbit
@VáclavZeman Great; thanks for that.
Somebody make me room owner so I can bin this shite.
 
9:05 PM
Do you guys want to see the most epic guy of all time?
 
Totally inappropriate for Stack Exchange.
 
user1804599
No.
 
@Loopunroller Ok.
@rightfold Did you used to be an owner?
 
lol, a flag
 
9:06 PM
@Mysticial Is it so surprising?
@Loopunroller old
 
@LightnessRacesinOrbit I'm still laughing my ass off, I only found out today
 
hey, I need more downvotes here please
 
This guy owned her so hard, It's ridiculous
 
@Loopunroller meh
 
Hmm, a bad day again! Prematurely (from my vision of day structure), ran out of down-/close votes today. Can I do some additional? (e.g. blaming here?)
 
9:08 PM
@LightnessRacesinOrbit Take off your glasses, Lightness
Why don't you take them off so we can see you
 
Ell
@Loopunroller this newsreader is so stupid
 
user1804599
 
@Loopunroller pfft fine
 
@LightnessRacesinOrbit Not at all. It's not uncommon that someone who is easily offended wanders into this room. We just invalidate those flags and move on.
 
user1804599
9:12 PM
Those are among the worst boobs ever.
 
@Mysticial The post was clearly inappropriate for Stack Exchange, violating several codes of conduct. You know this.
@rightføld wtf man
 
Ell
> error: indirection require pointer operand (std::tuple<int *> invalid)
f_storage(std::get<Is>(*argument_transport)...);
ah I see.
 
@LightnessRacesinOrbit Lovely! You're on right track showing them these attractive girls! That always was a great idea!
 
Ell
@LightnessRacesinOrbit raunchy ;)
 
9:15 PM
@Ell That was a good day
 
@LightnessRacesinOrbit Gotcha, so you are Alexandria Morgan?
 
Ell
Jesus fuck I just saw the views
wow
 
@Loopunroller I've heard that name before; it's some imposter pretending to be me -.- I tried to get Google to take their posts down but was denied :(
 
@LightnessRacesinOrbit Haha
 
"jesus fuck" is my favourite exclamation atm btw
 
9:17 PM
We are taking down http://data.stackexchange.com for a memory upgrade - it'll be back shortly.
 
Side note: "In true RAII style" - it could hardly be farther away from that, really. RAII is where lifetime controls resource acquisition. (Yeah. The name is confusing. Even Stroustrup agrees). — sehe 17 secs ago
@rightføld it's just the picture/shirt choice
 
@Loopunroller sounds like very badly scripted. I mean. Look at that outfit. Look at the bad acting from both sides. (Too short pauses in between responses, subtle smiles breaking through that sun-glassed face)
 
@sehe Coincidences like that happen, you know.,
 
Ell
It looks like my thing is close to compiling
 
9:25 PM
@LightnessRacesinOrbit Kinky
 
star it then
jesus fuck
 
Ell
I think I segfaulted the compiler
 
ice ice baby
 
@rightføld That's not true at all.
 
@LightnessRacesinOrbit Stop saying jesus fuck.
 
9:28 PM
syntax is relevant for the user.
if you use a familiar syntax for a familiar operation, they will grasp it quickly.
 
Why //! [0] is used in Qt projects?
 
user1804599
Ugh.
 
@Loopunroller why the jesus fuck should I
 
if you pointlessly re-invent a new syntax for an operation when it already had a common perfectly good syntax, they will not like you.
 
@LightnessRacesinOrbit Because of da rude Sandstorm in your vag.
 
user1804599
9:29 PM
Whether your syntax is (expr, expr, expr) or { expr; expr; expr } makes not a single fucking difference semantics-wise.
 
if you pointlessly re-invent a programming language for performing everyday tasks when there was already a perfectly good programming language, we will not like you*
 
Ell
I get a segfault with clang++ and g++ on coliru. I'll try doing it locally...
 
oh wait ^_^
@Loopunroller how darude
 
user1804599
The former syntax is indeed terrible, and the latter isn't, but that doesn't change a thing regarding the behaviour of the expression.
 
9:29 PM
@Loopunroller yeah. call me silly, but I don't really believe in coincidences when it's clearly blown up "news" anyways
 
yes, but semantics of the language are not the only thing that's important.
 
@sehe You seriously think that's all scripted? Wait -- are you being ... ?
 
it also matters how efficiently those semantics are conveyed to the programmer.
 
user1804599
Syntax is most important, and that's why I don't pick a terrible syntax like C++'.
 
Ell
@LightnessRacesinOrbit okay but I warn you this code is terrible coliru.stacked-crooked.com/a/6911f0eb0f722ad1
 
9:31 PM
don't get me wrong- C++'s syntax in most respects is pretty shit.
 
Ell
really terrible
(suggestions welcome!)
 
but "statements" is just fine.
function_traits? Get out of here
 
brb passing out from reading that code
 
@Loopunroller Not necessarily "all". But yeah, I feel that "interview" is nothing spontaneous. Something like, maybe he agreed to do the interview in exchange for a sum of money and the giggles. Next thing he registers with a casting bureau as The Wellknown Mr. Outahand-Party. Everyone wins :)
 
Ell
I'm p sure I don't need void* at this poit
 
user1804599
9:31 PM
Expressions are much easier to work with than statements are. You can put them wherever you want.
 
Ell
but I haven't changed it yet
because I want the compiler not to segfault first
 
@sehe Well, that is indeed possible.
He just seems to much of a badass guy.
 
you can easily turn statements into an expression with a function (inc. lambda)
 
user1804599
Or just not have statements in the first place.
 
user1804599
They solve no problem.
 
9:32 PM
Anyway, gotta revise for my physics test tomorrow - It's about oscillations
 
they solve the problem of effectively communicating to the user the order of side effects
 
user1804599
So does an expression of which the whole purpose is that.
 
@Loopunroller Seriously. HD footage of him running around naked for no apparent reason, how's that not camera-pleasing. That was in the light of day. I stopped watching about halfway though
@Loopunroller Good luck
 
user1804599
Which, in addition, as all expressions, yields a result.
 
not really
 
user1804599
9:34 PM
Besides, side-effects are not very common in functional programming and use of sequencing expressions is quite rare.
 
statements vs expressions gives a much clearer segregation of "Stuff that produces a value" and "Stuff that produces a side effect".
 
@Loopunroller Be careful though. Vacillation about oscillation causes perturbation.
 
almost out-trolled myself there
whoops
 
Ell
@LightnessRacesinOrbit what'dya think? :D
 
@Ell my doctor has advised me not to speak to you any further
 
9:36 PM
@sehe Don't need it. Got ~100% on all of the previous ones :)
 
Ell
haha that made me lol
 
This is fairly easy stuff atm.
 
Ell
also wait I do the need the void*. I ought to use boost::any instead I guess
 
@LightnessRacesinOrbit yeah. I can feel the bruises on your ego from that :/
 
Ell
@sehe No, he's just pleased to see you
 
9:37 PM
@Loopunroller so, like, between 98% and 102%?
 
@LightnessRacesinOrbit I knew someone would say that.
 
@Loopunroller did you know it was going to be me?
 
Okay, rather ~96. That's pretty shit, but I lost marks because I fucking forgot to write the "The solution is..." sentence -.-
 
@Ell Although he'll orate that he's pleased to not see me
 
you forgot to write the actual solution....
loser
 
Ell
9:38 PM
what am I to do now that the compiler segfaults?
 
Hej björn.
 
user1804599
Switch to a sane programming language.
 
user1804599
@JohanLarsson Hej borg.
 
@Ell It's undoubtedly a virus. Throw away your computer and get a new one.
 
@Ell Switch to Styx.
(two wildly contrasting opinions, there)
 
Ell
9:40 PM
@JerryCoffin uh oh. I ought to apologise to @StackedCrooked I guess :/
 
@Ell basic little hello world still works. you did no permadamage, evidently.
oooh wait, caching
 
Ell
nah I'm sure it hasn't really done anything
 
hah yeah you broke it
 
@Ell Yup. And to all other users of coliru.
 
Ell
Wait wut. it actually broke it?
 
9:41 PM
no ^_^
 
Ell
haha oh :P I'm so gullible
and confused :P
 
yep.
Homeland or old SGA? Well, not that there's new SGA, but y'know...
 
Ell
wait I'm an idiot.
maybe.
I'm assuming the compiler is segfaulting and not my code
maybe my code by some miracle actually compiles
 
you are indeed an idiot.
to this I will attest.
 
user1804599
Hmm.
 
user1804599
9:46 PM
This is an overloaded intrinsic. You can use llvm.sadd.with.overflow on any integer bit width.
declare {i16, i1} @llvm.sadd.with.overflow.i16(i16 %a, i16 %b)
declare {i32, i1} @llvm.sadd.with.overflow.i32(i32 %a, i32 %b)
declare {i64, i1} @llvm.sadd.with.overflow.i64(i64 %a, i64 %b)
 
Ell
hey it was my code after all.
2
 
user1804599
So does "any integer bit width" refer to actually any, or only 16, 32 and 64?
 
user1804599
I would love it to work on 8-bit integers as well.
 
user1804599
Let's see.
 
user1804599
Ah, it works. Neat.
 
9:58 PM
@rightføld Any.
 
user1804599
Yay, then I can implement integer overflow exceptions.
 
So @Dell sent 8GB DIMMs in 16GB boxes. Sorry for the data.stackexchange outage - it'll be back soon...64GB short. http://t.co/6CocObATm4
 
Accepted answer: '

You use strnlen to find the length of a string that might not contain a zero.

As an example, you might have a buffer of bytes read in from the network. You don't want to modify the buffer by writing a zero into the end, so you use strnlen to find the length of it as a string.'

[sigh]
 
Hm. New module paper.
 
Ell
10:11 PM
link?
 
user1804599
fail
 
Ell
yep.
My bad :P
oh wait. I saw that one
so technically I still haven't seen the link to the "new module paper"
 
I already read the original.
Not sure what the changes are in this one.
 
when can we expect this to get into the standard? :0
 
Build System still iffy
kinda lame.
I thought they'd improve upon that rather than saying "we don't want to mess with this"
Stupid.
 
user1804599
10:16 PM
TIL about sibling call optimisation.
 
@Grandstack the next standard is expected in 3 years, so not earlier than that I would say
 
Ell
I wonder if it's possible to check if A is derived from B with typeid.
I think I need much more than typeid can offer
 
ye I know, but can this make it into 17?
so hyped for all this new stuff
 
@rightføld wut?
I've never heard of it.
 
user1804599
If you have int f(int x, int y) { return g(x, y); } int g(int x, int y) { … } (note the identical signatures), the tail call in f can be replaced by an unconditional jump to g.
 
10:23 PM
Oh. That's what it's called.
I didn't know it had a name.
 
user1804599
Me neither.
 
@Grandstack I'd estimate a ~70% chance that it makes it into 17.
 
user1804599
Though I know that objc_msgSend does it.
 
I wonder if they do the same thing for virtual functions with identical signatures.
virtual foo(){}
virtual bar(){ foo(); }
Does it do the extra jump, or does it put foo() in the vtable for bar.
 
@Mysticial Probably iff it can devirtualize the call.
 
10:26 PM
@JerryCoffin Why would that be required? Just just put the same function pointer in two different places in the vtable?
Unless I'm missing something else...
 
@Mysticial I was assuming you meant that calling foo was only part of bar. Yeah, if that's all bar does, then just filling the same address into both slots in the vtable should be fine.
 
ah, I should've clarified.
That optimization is something I would like. Though, it probably doesn't matter anyway in all the places I use it.
Typically, I design the parent class to do have multiple methods that do the same thing and provide a default implementation for all of them. The child classes can override if the have something more efficient.
 
@Mysticial About the only way I can see it having a significant effect on speed would be if it added enough call depth that you overflowed the on-chip return address cache. Other than that, both the call and return are 100% predictable, so you'd be saving (roughly) the time for one register load. Unless the function was really trivial, that'd usually be lost in the noise.
 
@JerryCoffin I recently (a few months ago) refactored the algorithm dispatcher for my pi program. So instead of putting switch statements in a dozen places (and all the bugs that resulted from them getting out of sync), I turned it into a virtual inheritance class where I could do:
algorithm.muliply(x,y);
algorithm.multiply_with_less_memory(x,y);
Both of which have (the same) default implementation. And the sub-classes selectively override whichever they feel like with something more efficient.
 
@Mysticial I'd love to see the reaction if you posted that on Stack Overflow. How many people would happily "inform" you that a single multiplication is so much faster than virtual dispatch that this would obvious be a huge loss? :-) (And yes, I'm pretty sure they'd be mostly the same people who would automatically assume you've never profiled your code).
 
10:41 PM
Why don't you use traits rather than single dispatch?
 
traits?
 
Oh wait. Sorry.
I misread badly.
You do overriding.
 
@Rapptz ...as opposed to insurers, who do underwriting. (I apologize in advance for the poor quality of puns I'm producing today).
 
Well.
I think even with overriding traits would be better than a virtual function.
But I don't know too much on the subject.
 
@Rapptz Traits allow only compile-time selection. I'm guessing (though it is only a guess) that in this case, it's probably doing things like "if this number is less than 1000 digits, use algorithm X; if it's >= 1000 digits, but less than a million, use algorithm Y; if it's greater than a million digits, use algorithm Z".
 
10:47 PM
Yeah you're right.
 
user1646075
@Mysticial this being the y-factor program?
 
@JerryCoffin Yeah pretty much. It's even worse than that. There's actually two inheritance trees. One for algorithm parameters and a singleton tree for the algorithm itself.
If I want to perform a multiply, I walk the global algorithm table to select an algorithm object. That object has a factory method which returns parameters to actually perform the operation since each algorithm has multiple sets of parameters that can be used.
 
@Mysticial I typically do something like this: coliru.stacked-crooked.com/a/680e3d8a9a708360
 
Smaller tasks will bypass one or both of the levels of indirection. I typically hard-wire them to the lowest-level algorithm which can get inlined completely.
@Rapptz That method doesn't work, because I call the methods through a pointer to the base class.
 
I actually tend to prefer this over inheritance for my API designs.
 
10:53 PM
@Mysticial Yup--the important point (for inheritance vs. traits) is that the selection happens at run-time, not compile time.
 
@Mysticial What if you derived from it, and only overrode foo?
 
@Mysticial Yeah I figured.
It's a different ball-game if you store them.
But you can technically do something like poly (was it poly or dynamic?) or Boost.TypeErasure any that still allows you to use traits rather than inheritance (at least disregarding implementation lol)
 
Most of the program is actually like this:
const Algorithm* algorithm = get_algorithm(size,threads);
temp0 = algorithm.forward(x)
temp1 = algorithm.forward(y)
temp0 = algorithm.combine(temp0,temp1)
x = algorithm.inverse(temp0)
Where temp0/1 is raw bytes containing data that is specific to the algorithm that is being used.
 
@JerryCoffin Yeah if you're storing them that's true.
But if you're not storing them as a member function or an array then I don't think it's a big issue.
has anyone found out the difference between Modules v1 and Modules v2 paper?
 
Ell
11:09 PM
can dynamic_cast only be used to cast between parent and child?
I'm trying to cast a void* but it ain't workin
 
@Rapptz V1 was pretty old. The interesting comparison is probably to V6: open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3347.pdf
 
@JerryCoffin I meant the 'new' papers by Gabriel Dos Reis.
 
@Rapptz Oh--you mean between N4214 and N4047? Sorry--I'm a bit slow at times (and really slow the rest of the time!)
 
@Ell You can also sideways-cast with it.
but the pointer must have a static type which is polymorphic and point to an object of that type.
 
Ell
ah yeah of course.
I'm going to have to wrap all my class types somehow
 
11:16 PM
boost::any?
 
@LucDanton Lol, just encountered the same problem
 
Ell
@Puppy yeah might use that. but not sure if it works
for what I want
 
it can be re-implemented so that boost::get<Base>(boost::any(Derived())); works.
it doesn't work that way OOTB.
 
Ell
At the minute I'm trying to get inheritance information from a typeinfo which I know you can't do with just a typeinfo
 
that's... not entirely true.
 
Ell
11:18 PM
@Puppy Not in a portable way at least
IIRC you can do it with itanium
 
that's still not entirely true.
 
Ell
Oh?
 
exposing inheritance features is something the Standard requires, it's just not very convenient or efficient to get at it without a proper interface.
 
Ell
my problem is that at the minute, my runtime dispatcher will only pass a Derived* to a signature with a Derived*
@Puppy do you have any links?
or terms to google?
or just any general leads I can investigate
 
@Ell try { throw (D*)0; } catch(B* ptr) { /* derived */ } catch(...) { /* not derived */ }
 
11:24 PM
I can't decide how to organize this page. I suck so much at this UIX design thing.
 
Ell
@milleniumbug That works?
man that's hacky
@Sofffia UX is hard
so is design in general
 
There was an article on Dr. Dobbs that did exactly that.
 
I've not seen anyone other than myself exhibit this technique (along with exception vomiting), but it's possible that someone else also discovered it.
 
Ell
yeah that is really hacky
but it works
 
@Rapptz Between those, it looks to me like mostly a revision in the paper, without much in the way of (immediately obvious) changes in what's actually being proposed. Most of the changes that show up right-off are things like extra explanations and examples though, not what look like they'd end up as changes in normative language.
 
11:27 PM
indeed.
 
best to use this in general and you can employ Itanium-specific fallbacks for Itanium compilers.
 
Found it.
 
@JerryCoffin Ah that's a shame.
 
Ell
@Puppy yeah
 
11:29 PM
also note that dynamic_cast can sideways-cast and this cannot.
 
Ell
My first approach was to have a map of typeinfo to std::function<bool(void* obj)> and to register classes, creating aforementioned function with [](void* obj) { return dynamic_cast<T>(obj) == nullptr;} but obviously that doesn't work because of void*
there is probably a way I can do it for class types though
because the class types used are known before needing to be dispatched
 
struct MostDerived : EmptyPolymorphicBase, T { using T::T; };.
then construct an instance of MostDerived and store an EmptyPolymorphicBase*.
then you can simply employ dynamic_cast.
 
Ell
I completely forgot about multiple inheritance xD
 
moron
 
Ell
@Puppy this is a brilliant idea
 
11:31 PM
^^
I know.
 
Ell
thank you :D
 
anyway I gotta get to bed
work in the morning.
 
Ell
me too.
Goodnight :)
@deadmg of course I haven't tried boost any yet which might just work so I'll give that a try too
 
> Jason, the problem here is that grokdeclaratol call set_decl_tls_model on variable that is uninstantiated template.
Does that mean there is a function called grokdeclaratol (grokdeclarator?) in the insides of GCC?
 
guess so
 
11:45 PM
Taking a moment to appreciate how @JohannesSchaub-litb is retroactively lying, and hexa knew all along
 
@sehe wait wut?
 
Profile pics are always updated in the transcript.
 
 
Actually, I take that back. There does appear to be at least one change in the proposal itself. "In a previous design, we required the module declaration to be the first declaration in a module unit; that requirement wasn’t necessary (as acknowledged at the time). To support gradual transition from the current compilation model to a world with module we allow toplevel declarations to preceed the module declaration in a module unit. Such declarations
do not belong to the nominated module. They belong to the global module."
 
Oooh MOAR imaginary internet points coming my way ^
@Sofffia kiling the joke, aka cpt obvious
 
11:48 PM
I knew it
 
@Mysticial I was genuinely surprised as I didn't know I had time-traveled in that tab :) I still thought it was funny
 
@JerryCoffin Ah. That's not really a big change though.
 
Do they not have source control for C++ proposals?
 
Ell
Could you guess by what factor modules will speed up compilation?
 
0%
 
11:53 PM
-12%
 
I've sped up compilation by upwards of 25% simply by stripping out unused headers and doing a lot of PIMPL.
 
@Mysticial the latter impacts code clarity though =/
 
@Mysticial Authors might have, but that’s probably not what you’re after. One of the columns in the proposal lists is ‘Previous Version’ though.
 
Ell
Man I'm gonna have to get out of bed and code again
 
@Mysticial Also, might I suggest: fastbuild.org/docs/home.html (depending on the size of the project it might help)
 
11:55 PM
@Mysticial I suppose the author probably does, but I'm not sure the committee does. Beyond putting something like "version X" or "revision N" in the title, they don't even have an official mechanism for saying what paper this replaces/updates/revises.
 
> I once was so high I spent an hour searching for my phone, with my phones flashlight.
4
lol
 
@Borgleader I don't do it to the point where it becomes obfuscated, but if a header file doesn't need a full object definition, I add a declaration in that file and avoid pulling in the header for it.
@JerryCoffin Proposals need to have full source control with unit tests and automatic versioning. :) God what has Google done to me...
 
@Ell That'll depend immensely upon how the code is structured. For code that uses only minimal headers (e.g., just uses stdio.h) it might make almost no difference at all. Some parts of Boost that take nearly forever to compile could benefit immensely (I'd find improvement by a factor of 10 or more entirely believable).
 
Ell
I guess it mostly benefits template heavy code?
 
@rightføld I'm sorry.
 
11:59 PM
@Ell Template-heavy code tends to be the slowest to compile now, so that's certainly where the biggest improvement seems possible/likely. To an extent, compare times with/without precompiled headers to get at least some idea of what you might see with particular code. They're not identical, but it can give at least some notion of what to expect.
 

« first day (1458 days earlier)      last day (3481 days later) »