« first day (1468 days earlier)      last day (3494 days later) » 

user1646075
2:00 AM
hey, speaking of correcting, who's responsible for the blatant error in the room title?
 
Not me
 
user1646075
someone in italics
 
@nightcracker That's weird...
 
user1646075
or italy.
 
@aclarke What blatant error? You think it should be "Scene" instead?
 
2:01 AM
@MarkGarcia it confuses me because I would think perfect forwarding would solve this
 
user1646075
yes, yes, that's better.
 
@MarkGarcia that's why I ask
 
@nightcracker Me too.
 
The confusing part is how the first line works.
Not how the second one fails.
pass in nullptr instead of 0 and it compiles.
 
2:03 AM
I have no idea why 0 is compiling in your first example.
 
I've noticed that
 
Hm.
 
Oh I missed that: explicit shared_ptr( Y* ptr );
Oh well.
 
Yes.
 
Why is the first line???
 
2:04 AM
Well, now is a good time as any to go bye-bye. I need to go finish an Global History essay, so I will see you guys later. For now, have a link to some random wikipedia article, in memory of me.
 
@Nooble Later.
 
user1646075
@Nooble ciao for niao.
 
user1646075
and do your homework!
 
Most likely 0 is first converted to a int*.
 
user1646075
2:07 AM
i can say that cos i'm a parent. With the power of Maths.
 
it doesn't make sense
 
Yep.
 
the first line shouldn't compile :v
there's no conversion from int to shared_ptr
I went and checked libstdc++ and the constructor is indeed explicit
 
Compiles in GCC too...
 
user1646075
but zero is speshul when it comes to pointers ??
 
2:11 AM
Integer types are.
 
TIL libstdc++ uses inline namespaces
 
it is perfect forwarding
the compiler is treating 0 special there
 
if it was perfect forwarding we wouldn't see a difference in behaviour
 
No, the problem is with the 0 -> shared_ptr conversion.
 
Ell
2:13 AM
I can't see a great use case for inline namespaces
Besides literals
 
ADL?
 
@Ell It's great then!
 
@nightcracker protip: don't use 0 for a null pointer constant
 
Ell
I continually forget how ADL works
 
18
A: What are the advantages of using nullptr?

PuppyThe real motivation here is perfect forwarding. Consider: void f(int* p); template<typename T> void forward(T&& t) { f(std::forward<T>(t)); } int main() { forward(0); // FAIL } Simply put, 0 is a special value, but values cannot propagate through the system- only types can. Forwarding...

 
2:16 AM
you could make a case that C++ should start making #define NULL (void*)0 instead of #define NULL 0.
but NULL is Unofficially Deprecated™
 
please
 
?
 
#define NULL ((void*)0)
I don't want NULL + 1 to be even more wtf than it already is
 
Ell
#define NULL nullptr
 
user1646075
hah
 
2:18 AM
@Ell YES!
 
@nightcracker It's already valid.
 
Ell
Is *nullptr guaranteed to do anything by the standard? Or just Ub?
 
NULL in C++ has to be 0 not (void*)0.
under Notes.
@Ell Compile error.
 
@Rapptz I was talking about making sure you wrap the entire thing in parentheses
 
Ell
Making my thing work with rvalue references may be tough
 
2:20 AM
@nightcracker It's not valid in C to do that.
 
user1646075
@Nooble geeez.....
 
user1646075
 
nor C++.
 
Ell
I wonder if there exists a rvalue_reference_wrapper
 
22
Q: Is ((void*)0) a null pointer constant?

user4164058I'm reading this blog post and under the section Null pointer constants and parenthesized expressions the author references § 6.3.2.3 and § 6.5.1 from the ISO C standard and says: It doesn't say that a parenthesized null pointer constant is a null pointer constant. Which implies, strictl...

 
2:21 AM
#define ADD(x, y) x + y
ADD(2, 3) * 3 // oops
@Rapptz I thought we were talking about your hypothetical?
5 mins ago, by Rapptz
you could make a case that C++ should start making #define NULL (void*)0 instead of #define NULL 0.
 
Sure.
 
@aclarke "Christian dark ages" sure do fit well from true a Christianity POV.
 
@aclarke lol 'The Chart' in Lounge<C++>
The epitome of 'bad history', 'horrible internet pictures', etc.
 
lol
This university assignment requires you to use polymorphism
        auto add = std::dynamic_pointer_cast<expr::Add>(node->data);
        auto subtract = std::dynamic_pointer_cast<expr::Subtract>(node->data);
        auto multiply = std::dynamic_pointer_cast<expr::Multiply>(node->data);
        auto divide = std::dynamic_pointer_cast<expr::Divide>(node->data);
I have no doubt I'm doing something terribly, terribly wrong
 
Ell
I want my 3d thing to have no inbuilt shaders, but a sensible way to pass matrices from the scene graph to them
and a sensible way to pass vertex attributes
I have no idea about how I would go about this
 
user1646075
2:25 AM
@MarkGarcia luckily the middle east kept the candle burning...
 
user1646075
a lot of lurnin's were destroyed, however, from that lineage.
 
user1646075
next era of great advance is probably going to happen in China. time to learn Mandarin.
 
"Balance" in accounting doesn't make any sense to me. If debit > credit, then it is debit balance. But when looking at a T-table it looks like it's adding more "weight" to the debit.
 
damn
I broke Sphinx.
 
user1646075
@MarkGarcia /mumbles something about The accounting equation — Assets = Liabilities + Equity
 
user1646075
2:31 AM
with all three, there's perpetual balance.
 
wow
ok this has never happened to me
I literally edited ~80 lines of code in a design change from manual memory management -> automatic
compiled and worked first go
not even a typo
 
note to self: .. class:: struct my_class breaks sphinx.
 
I pray for the day a good C++ manual doc tool comes along
 
@nightcracker Because IDE.
 
2:34 AM
@MarkGarcia vim without any C++ specifics
 
Sphinx is pretty great.
 
Sphinx is OK
 
user1646075
@MarkGarcia yeah, if you were using vim i'd be impressed
 
it's pretty great seeing the alternatives
 
I have no qualms about it.
 
2:34 AM
@nightcracker Because auto-complete.
 
but in an absolute sense it's a baby step into the right direction
 
user1646075
waaaaa?
 
What don't you like about it?
 
@Rapptz I want a doc system like cppreference
 
2:35 AM
You can do that if you want.
you have full control over the page format really
 
@Rapptz In my experience Sphinx has no actual support for when it gets slightly more complex in C++
 
Such as what?
 
@Rapptz I have that in HTML too, that doesn't make HTML a doc system for C++
 
cppreference is a wiki
 
I have some pretty complicated code and it accepts what I feed it pretty nicely.
 
2:36 AM
I mean cppreference's format and quality of docs
 
The latter is on your hands bud.
 
Yes?
How do you expect Sphinx to write good quality docs for you?
 
You can get p much the same from Sphinx, except without the wiki part
 
I mean things like automatic cross-references, standard ways to add code examples, nothrow specifications, etc
 
2:37 AM
Everything doable
 
^
 
C++ is not special (well it is but it's different kind of special)
You don't need Super C++ Documentation Thing to be able to document it
 
to be able? of course not
I can document C++ in html
for it to be pleasant is a whole different story
 
I can do cppreference's format but I chose not to because it's a lot of effort to me.
 
Sphinx is one of the best documentation systems atm
 
2:39 AM
AFAIK I can't disagree with that
yet I've not been too happy with sphinx the last time I used it for C++
 
When'd you use it?
 
think it was 1.5 y back
 
It's a framework, if you need to automate more things then automate more things
 
Oh it wasn't that good back then.
I use a custom version of sphinx.
 
@nightcracker Good time travel ther
It's 1.2.3 right now
 
2:42 AM
I believe he meant 1.5 years ago
 
Possibly
 
silly cat
I told him to keep my time machine a secret
:(
 
user1646075
you haven't told him yet...
 
as far as manual documentation goes I'm pretty satisfied with Sphinx.
 
2:59 AM
Sphinx seems to autolink to objects.
I don't remember enabling this.
Must have been a side effect of an extension.
 
Is it just me or is mathjax no longer working on stackoverflow?
 
Ell
Someone make me sleep please
Drug me or something
I should have drank
 
user1646075
see beer
 
4:23 AM
can I use alignas with new?
 
Will it align the pointer?
 
What are you trying to do?
 
this turns out to be a rather dumb question, the compiler can't make sure that the runtime gives me an aligned pointer
 
You want your points aligned to 128 bit boundaries? So that half the space is wasted?
 
I want multiple sets of 4 floats aligned on a 16-byte boundary, with at least one float before that (obviously not aligned to that boundary)
these guys get fed to SSE instructions
I can do that with std::align, I just never cared about aligning things before now and didn't know what was the right way to do it.
 
4:30 AM
4 floats on a 128 probably? I normally allocate it and put a divide by 128 assert in, it but I'm probably doing it wrong.
 
yes, you most likely are
I know that the os x runtime always allocates things on a 16-byte boundary, but I'm pretty sure that it's not a standard guarantee
 
user1646075
i thought it was, actually - worst case alignments in general
 
user1646075
not a guarantee but de-facto
 
msdn says that on win32 it's 8 bytes
(but 16 on 64-bit windows)
 
Doesn't AVX2 need 32-bytes?
 
4:34 AM
is avx2 a thing?
I thought there was avx and then avx512
 
user1646075
@zneak that'll be the worst case on platform then. I seem to recall that the lower level malloc() companions have variants that let you choose the alignment factor. nfi how that's accessible with new
 
anyways, avx512 introduces zmm registers which are addressed with zmmword ptrs, and these guys are 512 bits, so that's probably the required native alignment for them
ymm registers are 256 bits and probably need that alignment too
 
I don't know if ZMMs are found in any processors. I build with them in ICC but I can't run it anywhere. I have never seen an Intel Mike in the wild.
Knights Landing will be built using up to 72 Airmont (Atom) cores with four threads per core, each core will have two 512-bit vector units and will support AVX-512F (AVX3.1)
sounds dangerous, although I think they do 'in-order' execution. So we might have to optimize code...
 
I'm kind of looking forward to avx512
I was feeling extra clever this afternoon, I'm doing that for a class assignment and I'm pretty sure I'll be the only person vectorizing their code but I was pretty disappointed to see that the computer we'll be running the code on only supports sse4.2.
that'll be a meagre 4x speed increase :(
(or slightly less than that... anyways)
 
So 74*1024/32 is 2304 floating point operations per floating cycle making them similar to a GPU in terms of throughput. I guess the win might be if they make them easier to program...
 
4:58 AM
am I doing something unfathomably stupid?
addps	xmm8, xmmword ptr [rdi-rdx]
clang says "unknown token in expression" at ]
oh I bet it's the -
 
user1646075
can't see, but the title sez it all..
 
All the compilers on Windows that support AVX will align the stack to 32 bytes when the AVX flag is enabled.
 
yeah op deleted it
 
user1646075
because they got hammered?
 
5:08 AM
it only had one close vote, though Rapptz did point out like 3 other identical questions
 
AVX doesn't require alignment. All memory operands allow for misalignment. But of course if you can align it, then it's generally faster.
 
Yeah OP deleted it.
There's always std::align
 
@Mysticial If I got the wrong alignment shit segfaults
 
@Mikhail If you're using movaps/d then yes that requires alignment.
 
yeah, that's what I'm using
 
5:10 AM
But no compilers generate that anymore. They all generate movups/d since it isn't any slower if the memory is aligned.
 
std::align?
 
yes
 
It seems fancy albeit I've never used it.
 
it doesn't have the most convenient interface with its void* reference
@Mysticial: memory operands that target xmmwords/ymmwords will segfault (unless it's a movups)
 
yeah seems like it
 
5:11 AM
addps, mulps, etc segfault if you don't align their memory operands
 
@zneak Not on ymm registers.
 
tbh I thought new would return an aligned pointer if you used alignas.
I haven't seen anything that confirms this though
 
I'm not sure about VEX-encoded xmm though. My bet is they won't segfault either.
 
I'm surprised
not like the computer I'm writing this for supports avx, anyways.
 
Intel has been hard at work to get rid of the need for movaps/d.
 
5:13 AM
movups/d probably?
 
Starting from Nehalem, movupa/d is never worse than movaps/d.
 
I'm thinking of moving my constexpr stuff out of gears/meta
What should I name it?
 
The broadcast memory operand in AVX512 is pretty cool.
The linear algebra people are probably wetting their pants from that.
 
haven't looked too much into it, just barely know that it exists
though i do notice that it's big enough to fit a 4x4 float matrix
speaking of vector stuff, here's a funny one
the Xbox 360's CPU did more flops than the Xbox One's [and the PS4's] CPU does
even though it was released 7 like years earlier
 
Basically, with the broadcast memory operands, you can implement a matrix multiply with only FMAs and usual looping instructions.
And a small number of stores.
 
5:33 AM
@Mysticial Hey while you are here can you help me with an FFT question? dsp.stackexchange.com/questions/18792/2d-fft-vs-2-pass-1d-ftt . Basically, I want to make do IO while I copy and take the FFT of scan lines as I raster my full FFT. I i'm not sure how the FFT looks in 2D
 
> Added silent automatic updates for uTorrent client
This is getting really common.
 
@Mikhail 1D FFTs and 2D FFTs are identical in every way except for the twiddle factors that are applied.
 
user1646075
@StackedCrooked yeah - now that the big players have gotten away with forcing it for so long...
 
@Mysticial Do they use a rectangle (2x2) as the twiddle factors in the 2D case, or do they do 2 passes of 1D fft?
 
@Mikhail It depends on the implementation. The more optimized 1D FFT implementations will do a 2 or 3-stage transform that looks like a 2D or 3D FFT but using the right twiddle factors to make a 1D FFT.
 
5:37 AM
@Mysticial So do you think I can save something when trying to do an FFT of a 1.5GB file on the GPU by doing 1D FT on the rows while the file is copying (which is overlapped with the IO) and doing a 1D FT on the columns after the copy is done?
 
The real problem is how you're going to do both the rows and columns efficiently. No matter how you lay it out in memory, one of them will have bad memory access or you will need to do a transpose between them.
Overlapping is possible. I've never attempted it though since I've only worked on CPUs.
 
@Mysticial Okay, I'm going to try to do the ugly ones that miss the cache first while the IO is going and do the nice row wise ones right after the data is loaded
 
65
Q: Can a 7 days full 100% CPU load "burn-in" / "stress test" damage a modern notebook?

Tom StevensWhen I buy new computers, I usually do a "burn-in" with 100% CPU load for, say, seven days, in a well ventilated place. This is to find out if the computer has problems before I invest time into setting it up for me let it "steam out" some of the "plastic/chemical gasses" before I use it in m...

Kinda interesting.
 
user1646075
sounds nuts.
 
@Mikhail That's one of the reasons why I don't use FFTs that don't fit in cache.
Prime95 is forced to. Not surprisingly, it's memory bound.
 
5:55 AM
 
cancelled the insurance before it starts - I suspect that the owner builder course that I have done was misleading - the course put in a lot of effort into persuading people into purchase insurance - but both fair trading & work cover said that I didn't need one!
 
6:46 AM
@BartekBanachewicz I had auto f(...) { }, and changed it to auto f(..) -> void { } later
 
7:00 AM
pff finally
after much hard work my program can figure out that the derivative of log(asin(1/x^(1+x*4))) is

1/asin(1/x^(1+x*4))*1/(1-1/x^(1+x*4)*1/x^(1+x*4))^0.5*-(x^(1+x*4)*((1+x*4)/x+4*log(x)))/(x^(1+x*4)*x^(1+x*4))
 
u sub
 
go fuck yourself
lol
I'm so done with this
 
Got my solar eclipse glasses for tomorrow.
 
u sub is short for u substitution you nub
learn to use it
:@
 
@Rapptz I know
@Rapptz I'm differentiating
@Rapptz not integrating
 
7:11 AM
Still useful for derivatives.
 
anyone knows of an article describing the implementation of the SDL event queue ?
 
user1804599
@nightcracker he's lying.
 
user1804599
He just said that you are the sub in your BDSM relationship.
 
oh shit
 
7:32 AM
This truck is hauling ass
 
user1804599
7:47 AM
Hmm.
 
user1804599
> The Coq Proof Assistant
 
user1804599
> The Cock-proof Assistant
 
user1804599
8:11 AM
dammit I want Option and map fuck you Python
 
user1804599
def map_noneable(f, x):
    if x is None:
        return None
    else:
        return f(x)
 
user1804599
So useful.
 
@rightføld What?
 
@VáclavZeman map_noneable wraps f to accept None as a parameter.
Duh.
:-p
 
user1804599
For example: map_noneable(phonenumbers.parse, row[acquaintances.c.general_phone_number])
 
user1804599
8:18 AM
Instead of None if row[acquaintances.c.general_phone_number] is None else phonenumbers.parse(row[acquaintances.c.general_phone_number])
 
@rightføld What are you iterating?
 
user1804599
I'm not iterating anything.
 
user1804599
map is not only for iterables.
 
user1804599
None is cancer but c'est la vie.
 
8:38 AM
map_noneable?
terrible name lol
Why not fmap?
Or something.. iunno better.
 
user1804599
Eh, because it's not fmap.
 
user1804599
There's no Some/Just.
 
user1804599
It shouldn't even be called map actually.
 
user1804599
W/e we have mapNullable in our PHP library so this is familiar to us.
 
user1804599
Also fmap is a terrible name for map.
 
8:44 AM
Haskell job openining in SV
For a senior dev
Who's gonna apply? :D
 
user1804599
You.
 
user1804599
Oh wait senior.
 
Yeah :(
I wish I had twice as much experience
I also wish I got an interview invitation from digitex today
I've read trough their webpage and its really interesting
 
@rightføld informed twitter replies > kneejerk jokes :)
 
@rightføld Considering any value in Python can be None, I think of everything as Just x :v
 
user1804599
8:57 AM
:D
 
heh, I found a job offer with an example in asm
 
user1804599
Job's offerfeest.
 
Good morning everyone!
Sun's shinin' in Hamburg.
 
huh, bluescreened. Haven't seen that happen in a long time
 
@jalf How did you write this into the lounge?
 
9:02 AM
@jalf Start being paranoid of your hardware now.
> ed
 
user1804599
@Rapptz Except None itself!
 
user1804599
What if you want Just Nothing? :D
 
@Loopunroller do you only own one device capable of connecting to the lounge?
 
(None, None) obv
:p
 
@BartekBanachewicz Nope, but my Blackberry is practically useless for it :D
 
9:03 AM
implicit nullability is such a bad concept
 
And apart from that I only have a Laptop
 
I don't get why so many languages chose to use it
especially high-level ones
 
user1804599
Because Java has it.
 
oh, right.
 
@BartekBanachewicz What do you mean? Like every object has a specific null-state?
 
9:04 AM
@Loopunroller I have this cool trick where I reboot my computer
 
I mean in dynamically typed language, it's rather normal that the Any type has one (or more, like in JS) null values.
@Loopunroller yep.
 
@BartekBanachewicz That is such a bullshit.
I don't understand it either.
 
it's adding "null" to the sets of values for every types you create whether you ask for it or not
while ironically most of them can't really be null / you don't want to care for that
int add (int x, int y) {
    if (!x || !y)
        handle_error();
    return x + y;
}
I bet everyone wants to write code like this.
or even better, split the condition and add "x is null" and "y is null" :P
 
user1804599
@BartekBanachewicz Adding any X to all types is annoying.
 
user1804599
Nullability, identity, you name it.
 
user1804599
9:08 AM
Equality.
 
another company using haskell (also aparently using Poles)
 
@CatPlusPlus Discovely.
@sbi I have two weeks to live.
No, just kidding.
 
@BartekBanachewicz You should probably add special cases when only either x or y is null and return the other (non-null) variable.
 
Can't diagnose anything from "sometimes I feel nausea in the morning" as a male.
Food and sleep diary it is.
 
user1804599
> timestamptz is accepted as an abbreviation for timestamp with time zone
 
user1804599
9:14 AM
Hmm.
 
@Loopunroller ew
@R.MartinhoFernandes a male robot
 
@R.MartinhoFernandes are you sick much while on holidays?
 
that's called double fail
 
9:17 AM
A gamergate is a reproductively viable female worker ant that is able to reproduce with mature males when the colony is lacking a queen. Most commonly occurring within the primitive species of the poneromorph subfamilies, gamergate females differ from their fellow workers by a combination of elevated fecundity and aggression-related mutilation of competitors' secondary sexual characteristics. Subsequent to their first mating event, however, aggression is no longer needed as females secrete chemical signals that lead the workers to accept their role as reproducers for the colony. Gamergates exist...
5
 
8GB flash drive is full, for apparently no reason. I investigate and the culprit turns out to be a folder .Trashes in the root.
So yeah, fuck OSX that's so dumb.
 
9:42 AM
heard about this website that centralizes most restaurants that deliver food at home in my city, and it has a nice feature for group orders
it generates a link, you pass it around and everyone adds whatever they want to the order
and it's saved in real time on the server
 
@R.MartinhoFernandes @CatPlusPlus @Jefffrey @SamDeHaan @Puppy so what's the deal with Nomic? Are y'al still wanting to play?
@R.MartinhoFernandes o_0
 
it sounds so simple and useful
 
@AlexM. nice
 
@R.MartinhoFernandes that is amazing
 
@R.MartinhoFernandes Wow. Iff hoax then very very very well done :)
 
9:46 AM
@R.MartinhoFernandes Does it do transcoding?
 
> gamergate females differ from their fellow workers by a combination of elevated fecundity and aggression-related mutilation of competitors' secondary sexual characteristics
just...
 
@R.MartinhoFernandes :O look how smart the starboard is with that!
it solves the problem of annoyingly long link, by just removing the link altogether. Very good job!
 
@thecoshman You know. That's because he never posted the link (see chat.stackoverflow.com/messages/19568831/history)
A gamergate is a reproductively viable female worker ant that is able to reproduce with mature males when the colony is lacking a queen. Most commonly occurring within the primitive species of the poneromorph subfamilies, gamergate females differ from their fellow workers by a combination of elevated fecundity and aggression-related mutilation of competitors' secondary sexual characteristics. Subsequent to their first mating event, however, aggression is no longer needed as females secrete chemical signals that lead the workers to accept their role as reproducers for the colony. Gamergates exist...
@thecoshman Star that ^ I'm p sure it will show the link. Because, you know, it is a link
 
I suspect dumbness not smartness.
@thecoshman It causes the problem of not being clickable.
 
@R.MartinhoFernandes as I commented on, did I not?
 
9:58 AM
oh wow, that's cool feature
 
@sehe I figured as much.
@TonyTheLion wait, did you wiki poo?
 
yea, I wanted the Poo, Pile of
but it don't have a wiki page
my day is ruined
 

« first day (1468 days earlier)      last day (3494 days later) »