« first day (2141 days earlier)      last day (3033 days later) » 

nwp
nwp
14:00
uhm... no
is there a version of cdecl.org for C++?
it's the same for the most part
nwp
nwp
it returns a const reference to a float[256]
@nwp oh shit, fucking snapped on the &
replace reference with pointar maybe :v
fucking hell that's obscure
nwp
nwp
14:03
just imagine the pointer being a reference and the function being a member function that is const
why do people feel the need to fuck up with peoples minds so much?
nwp
nwp
never mind
this is pretty close
Ven
Ven
@nwp int (F::* (FD&&)) () && :')
@nwp I meant "not one track repeated over and over"
@Ven ewww.
14:16
@JerryCoffin Is that curable?
nwp
nwp
@Columbo yes, with significant side effects
Such as?
nwp
nwp
death, mostly
@Columbo see "Death"
the thing is, I really care about my family and friends, and they all tell me that I should stop being human
So I should probably kill myself, it's just the best thing to do, otherwise I'll get some serious problems with my human attitude
Thanks guys
14:18
you can fake you aren't human
nwp
nwp
well there are other ways, but they are arguably worse
just like the cat girl who argues she was born a cat in the body of a human
only that you know that's false, and she suffers some sort of mental illness
nwp
nwp
yeah, a cat would never argue
just slap you in the face or something
@LucDanton lmao
anyone here have some VS installed?
14:22
@orlp gtfo
?
what?
(i'm obviously kidding)
nwp
nwp
@orlp they do
in case you assumed there was comedic value in that, you are mistaken
@nwp oh cool
@orlp of course there is no comedic value in having vs installed, poor you!
14:27
@R.MartinhoFernandes I am. Thank you for asking :)
found a WinAPI flag called CRYPT_KEK
8
@Luc @Griwes decided to be annoying and mention P0137R1, send help
This conversation is going to be annoying, since Luc has me plonked. :D
@orlp Yes.
@Columbo Maybe, but if so I'm not aware of it.
14:42
FTR:
1b) wg21.link/P0137; Richard Smith's current WIP draft can be found here. That paper went through multiple CWG reviews, starting from when it was N4430, and has consistently maintained that the status quo is "malloc alone is not sufficient to create an object", so I think it's fair to assume that CWG is in agreement with that statement. — T.C. Jun 6 at 19:32
Android: currently supported devices - 10513, all devices 13362
Didn't know there are so many different versions of android ...
Ven
Ven
You fold me right round, baby right round...
14:56
@wilx You might try different software. LuminanceHDR seems to have a decent reputation, but there are certainly a lot of alternatives. For example, HDRMerge might work out better for you. To be fair, however, I should add that years ago I had roughly the same idea you do, but long ago pretty much gave up on the whole idea.
yeap, being called a newbie in a sneaky way
'years ago, I was like you, then I advanced'
:p
back from suspension xd
Ven
Ven
what did you do?
and why did you come back?
well, it was a time out
i told @orlp to gtfo because he used or was asking about VS (i'm sorry, it was uncalled for)
Ven
Ven
yes, don't mess with our math nerd.
15:02
nab
why so hostile recently
@Griwes because i'm talking about how he said he'd celebrate if i died in meta
Ven
Ven
Why would meta kill you
@ChemiCalChems oh no!
(that was sarcastic if you can't tell)
shut up nab
15:06
@набиячлэвэли bro, chill, no need to get agressive, i'm just asking what is the difference between celebrating someones death and telling someone to gtfo
Ven
Ven
what
that escalated quickly
Ven
Ven
calm down y'all
i'm chilling, just getting things straight in my obviously illogical brain
i was told to ask when i had a question, and i did so
Ven
Ven
don't stir shit up please
i'm afraid I can hardly count you as the victim here when you jumped on orlp for exactly no reason.
15:18
@Ven yeah, i know, that's why i said sorry, but that doesn't mean someone can do the same thing to me
Ven
Ven
sure, you're allowed to use the same report tool he used (or some other people did) against you then.
@Ven true
Flags, flags everywhere
Oof
Gotta come in here and see what's happening in the programming sewers
19
Flag all teh thingz!
15:28
what's getting flagged now
@codeMagic i think it's justified especially once it's not the first time
@Griwes him telling me to gtfo
lol
I don't know since I don't know the context. But, imo, there's rarely a need to flag really
@codeMagic the guy has been aggressive towards me several times, and i must agree, there is rarely the need to flag
I just came to see what all the fuss was about. Seems more interesting than working, atm
15:30
I can't remember when was the last time I've seen a flag-worthy message in the Lounge.
i'll drop the argument
a flag-worthy message
wait, I take that back
the latest starred message is definitely flag-worthy
15:50
@LucDanton C++17 concepts?
16:06
@caps sure
@Ven It wouldn't, directly--but spending too much time there would probably be about enough to make even the most positive people start thinking about suicide, because all of humanity is clearly shit.
@JerryCoffin beer and relativism really help coping with meta tho
Ven
Ven
@JerryCoffin Much like telkitty?
oh, what a nice avatar.
@LucDanton I thought concepts weren't going to make it into C++17?
Ven
Ven
they're not.
but there's still -fconcepts on gcc
16:12
@caps okay?
@LucDanton Just trying to understand where we will be using concepts in portable code in 2016.
take a laptop in a plane and send concepts to the stratosphere
Ven
Ven
on a gcc branch
Luuuuc Daaaaanton and Coooonceeepts, sitting in a (GCC) Braaanch, Com-pi-ling!
@Ven Is this similar in implementation to Concepts Lite that was on clang?
Ven
Ven
dunno, I don't do C++.
16:16
@Ven Telkitty provides insufficient evidence to draw conclusions about humanity.
Ven
Ven
@JerryCoffin I thought at some point to offer her services to NASA, so they could nerve-check their astronauts before sending them up there. Good idea or not?
@Ven Probably pointless.
Ven
Ven
:(
@JerryCoffin no longer needed ;)
wanted to check if something compiled in VS
16:36
@orlp OK
As future guidance, if there's any question, it's usually safe to assume the answer is no. :-(
@JerryCoffin lol
16:50
....
I added -fwrapv as an argument and my code became 4% faster CC @Mysticial
@orlp That's a lot.
Wait... Isn't that supposed to make things slower since it disables certain optimizations on signed integers?
The best part is that -fwrapv disables optimizations...
Or do I have it backwards?
it forces the compiler to use two's complement wrapping signed integers
instead of 'using' UB
I know. But what did it do to your code?
16:58
I guess I could diff the assembly
@Jimbo Welcome. Make yourself home. And make a bed too, the previous one got destroyed by buffer overflows.
@Mysticial the diff is a mess in the relevant bits
from a quick glance it doesn't really seem to be doing anything fundamentally different
just the scheduling seems slightly different
I'm just going with heuristic hell (change seemingly irrelevant part to trigger/not trigger some optimization heuristic)
We need an -ONO flag, as in "oh no!"
17:15
@orlp Does it have a lot of tight loops?
Hi, can someone take a quick look at this ideone.com/jqV7rL and confirm if it is undefined behavior?
@Mysticial it has some
I've learned the hard way to unroll the fuck out of everything.
it's for my sorting algorithm, the partition code are tight loops
and I do manual unrolling (8x)
automatic unrolling always ends up sucking in my experience...
I've had bad experiences with automatic unrolling. So I always do it manually.
And then there's vertical vs. horizontal unrolling. (or a combination of both)
17:17
What's vertical and horizontal unrolling?
These are terms that I made up, but they're obvious enough where I won't claim that I made them up.
Vertical unrolling is when you merely copy-paste the loop body several times without doing much else to it.
Horizontal unrolling is where you manually interleave different iterations.
Vertical unrolling reduces loop overhead only.
ah yes I've done both
horizontal unrolling was important for some SIMD code I wrote to get maximum execution port usage
Horizontal unrolling increases the amount of ILP. But at the cost of more registers and potentially more port traffic-imbalance.
I've found that neither one is strictly better than the other.
In larger loop blocks you need to do a combination of both when under register pressure.
For small loops, vertical unrolling is usually sufficient since the OOE window is large enough to do the interleaving for you.
But for larger loops, or loops with really long critical paths, that won't work.
@Mysticial I totally get what you mean lol, I compare range concatenation to 'vertical' loop composition myself
Too much horizontal unrolling (even when you have the registers for it), can sometimes backfire if the loop starts with like a dozen loads and nothing else to do in the middle of it.
17:29
I recently experimented with this GCC extension that allows you to typedef a xmm or ymm.
typedef uint64_t ymm __attribute__ ((vector_size (32))) __attribute__((aligned(32)));
It seems to work quite well.
How does that work? It allows you to do +/- on the type?
 typedef int v4si __attribute__ ((vector_size (16)));
 v4si a, b, c;
 c = a + b;
@Mysticial exactly
It sounds like something you can do with a custom type. Though you can't do that in C.
Wtf is the compiler doing in there? lol
17:33
I have no idea :)
It's generating stupid shit because AVX doesn't have 256-bit wide integer operations.
looks like valarrays
Godbolt is kinda better at displaying asm.
That looks more sane since AVX2 is enabled.
The reason why you see shift instructions (vpsrlq) in there is because there's no SIMD for 64-bit integer multiply.
So it emulates it with multiple calls to 32 x 32 -> 64-bit multiply and does the necessary shifting/adding to combine them.
Ah. I see.
17:40
And believe it or not, 3 calls to 32 x 32 -> 64-bit multiply + adds and shifts still beats unpacking it into scalar registers and repacking them.
I like this GCC extension though. It makes SIMD more approachable.
No need to learn the mm_* incantations.
GCC 6.1 isn't ready for AVX512 auto-vectorization: godbolt.org/g/gtqcGq
@StackedCrooked I do my own thing when I'm writing vector-agnostic code.
It's something I came up with in grad school. It works so well that it almost made me laugh when I see proposals of variable-length vectors. (like ARM's recent announcement)
17:57
a visualization of pdqsort
oh neat
enum class A { ... }
std::array<A, 3> a; // FAILS -.-
@orlp The insertion sort threshold seems pretty high :).
@Mysticial insertion sort is fast :)
tight loop
the visualization does not accurately represent how fast each operation is
that would be a really cool visualization: accurate delays with cycle counts
@StackedCrooked Btw, GCC is doing something extremely stupid with the memcpy.
        mov     QWORD PTR [rdi-4080], r8
        mov     QWORD PTR [rdi-4048], rcx
        vmovdqa YMMWORD PTR [rsp+104], ymm7
        mov     QWORD PTR [rdi-4016], rdx
        mov     r8, QWORD PTR [rsp+32]
        mov     rcx, QWORD PTR [rsp+64]
        mov     rdx, QWORD PTR [rsp+96]
        mov     QWORD PTR [rdi-4072], r8
        mov     QWORD PTR [rdi-4040], rcx
        mov     QWORD PTR [rdi-4008], rdx
        mov     QWORD PTR [rdi-4000], rax
        mov     rax, QWORD PTR [rsp+112]
        mov     QWORD PTR [rdi-3992], rax
Don't use memcpy(). It's slow. Remember, the programmer always knows better than the compiler!
18:04
It should use simd mov?
Yeah. But it isn't.
Even rep mosvq is faster than that bullshit, right?
I'm actually serious about avoiding memcpy() - but only for SIMD types. Even ICC trips up on it.
The reason is that memcpy() has no concept of SIMD itself. It only sees addresses and lengths.
@Mysticial what compile flags did you use for gcc
And current compilers aren't smart enough to "undo" the memcpy() abstraction.
18:06
@Mysticial Always? Well, I don't :P
So don't use memcpy() on SIMD types. Assign them directly. Then the compiler will stick with SIMD moves.
Note that this rule extends to structs of POD types. The standard requires that POD assignments are equivalent to memcpy(). So that's how the compilers implement them.
@Mysticial it works for me
So if you assign a POD with SIMD types to another. The compiler will memcpy() or whatever bullshit it inlines to. So you need to define your own copy-assigment/constructor that manually copies the individual fields.
do you have -march set?
@orlp Yes. But it doesn't always work out that well.
18:09
oh wait
I'm dumb
godbolt was still set to clang
gcc fucks it up, clang gets it right
clang is pretty good at eliding memcpys
in particular clang 4.0
rust devs have made a couple of commits that improved that part of the LLVM backend
it also elides the memcpys when doing type punning of an union using memcpy
to avoid UB
GCC in particular has an optimization that tends to pessimize certain loops with manual SIMD. It recognizes that you're copying data. And replaces it with its own shitty memcpy().
It's called: ftree-loop-distribution-patterns
@Mysticial regardless, shouldn't you most of the time use memmove and not memcpy?
@orlp memcpy() implies restrict. So it's supposed to be even better.
@Mysticial other way around, no?
nope
got them mixed up
I thought memmove was the dangerous one
or well, 'dangerous'
18:14
@orlp memmove is the one that can handle overlapped source/dest. memcpy requires that they're completely separate.
@Mysticial what about rep movs?
@orlp I haven't seen any compiler generate them.
Not that I've actually tried to generate it.
@orlp Activates a special path in the CPU that's ~10% faster than otherwise. SIMD moves can still be ~15% faster (going from memory on the numbers).
rep is too inconsistent across processors and requires alignment to be efficient. SIMD moves are better for the general case - even the misaligned case.
finally replaced some enum classes with standalone types
18:19
@Mysticial this one is with an artificially lowered insertion sort limit i.imgur.com/QzFG09F.gif
(again, this seems faster but does not accurately represent the speed of insertion sort in a modern CPU)
40 lines of boilerplate to fix enum class...
i really hate whoever designed the feature
@Mysticial I've seen VC++ produce it.
@JerryCoffin Clearly VC++ doesn't know what it's doing since it shouldn't be generating it. :D
@gnzlbg and the enums still have no features whatsoever
I want iteration and enumerator count at least
18:37
@Mysticial At least when I saw it do so, it was about the best you do could for a general purpose move. You could get a little more speed by doing SIMD moves, but it'd blow up if the data had a bit pattern that looked like a NaN. I don't know whether they still do or not (but it'd still make sense with /O1, since the code can be really small).
@milleniumbug That would be really nice
@Mysticial something that you can see very well in the visualization is that pdqsort first scans and then swaps elements in chunks (which are unrolled tight loops)
@JerryCoffin That was the case for the old x87 FPU moves. The SIMD moves don't do FP exceptions even for the floating-point types.
I've noticed that compilers will actually emit the wrong type of SIMD move. IOW, it's all the same underneath - just a different opcode.
@orlp I didn't notice the chunked swapping.
18:54
@Mysticial you mean still not after I point it out, or you notice it now after I said it?
I haven't looked again.
ah
I just looked at it again and I can't see it. lol
Probably too fast for me to notice the batch swapping.
Ell
Ell
@Mysticial you should fix it
It mentions -ftree-loop-distribute-patterns. I'm not alone!
Fuck that optimization.
I'm glad I only use -O2. -O3 has never worked well for me.
19:04
I always use O2 as well
O3 is occasionally faster in some microbenchmark
but overall O2 is often faster
IIRC O3 also had some bugs
I do a lot of stuff with floating-point hacking that will break with -ffast-math. Sure I can turn it off manually, but it's still another reason why I avoid -O3.
ICC defaults to fast-math regardless, so I have to force it off.
660W power brick for a laptop.
2 GPUs, desktop chip + overclockable.
Ell
Ell
19:22
Ridiculous
19:34
> an 8 cell Li-Ion 89 Wh battery (battery life from zero to some depending on configuration)
2
@Mysticial Welcome to the "set your lap on fire" games
Ven
Ven
Duh, I should write more asm once in a while.
My current gaming laptop is has 1 GPU, overclockable laptop chip, and IIRC 300W power brick.
The battery life is about 2 hours if I don't tax the CPU or GPU and I dim the screen.
That thing probably games better than my desktop. But I haven't done any serious gaming in years. (by "serious", I mean hardware-intensive)
Ven
Ven
I'm still not sure at times whether test is and, cmp is sub, till I look it up. But now I have a mnemonic: "test" sounds like "et", french for "and". \o/
test con
19:47
89Wh battery. The power brick is 660W. IOW, it will last about 8 minutes running at full power. AHAHAHA
> La France vient de remporter son 4ème titre à la suite de champion du monde de monocycle sur basket.
Ell
Ell
@Mysticial why do you have a gaming laptop? :V
Not by choice. This was back in October last year. Here's what I needed:
1. A Skylake processor to test on. (not necessarily a laptop)
2. A new laptop.
3. The laptop needed to be "gameable" - but not high end.
4. The laptop needs to support SSD + HD.
5. The laptop needs to support over 32GB of memory for compilation.
6. The laptop needs a 17 in. monitor 1080p or I can't code for shit.
I didn't want to get two machines. And the only thing at the time that could satisfy all of those was a high-end gaming laptop.
So I got the one with the shittest GPU (GTX 970m). And manually upgraded the memory to 48GB.
That "shitty" GPU is better than the one in my desktop which I do all my gaming on when I'm at home.
Ell
Ell
@Mysticial fair enough I guess
All the workstation laptops were either unreleased or were ungamable.
All the gaming laptops had totally overkill GPUs and some shitty 16GB of memory.
The choice was obvious get a gaming laptop, upgrade the memory, and not game on it.
20:02
@Mysticial 32 gigs to compile? wtf are you building?
I actually wanted to take it up 64GB of memory so I could do simultaneous builds off a ram drive when I'm on the road. But I would've had to disassembly the entire laptop to get to the back-side memory slots.
When I'm on the road, I keep everything on a ram drive or encrypted on the disk. That way if someone steals it, they won't get the data. The moment it shuts down, it's lost.
And if you don't have the login password, the first thing you're gonna do is shut it down and take out the hard drive.
@ChemiCalChems My Pi program. Each binary needs about 2 - 4GB to build. There's 12 binaries. But they don't all peak at the same time. Building one set of them totals out to about 20GB. If I want to build the developer, private-beta, and release ones all at the same time, it peaks to about 30 - 40GB. So it's impossible for me to do that with a 16GB ram drive when I only have 48 GB of ram.
@Mysticial can't you separate the binaries into smaller libs and dynamically link?
@ChemiCalChems They're compiled differently in each of the binaries.
@Mysticial you must have small code units
What do you call the addition when you add two numbers in a column?
20:11
@ChemiCalChems The opposite actually. Each binary is compiled from single module. So there's no parallelism within each binary. I get the parallelism by building multiple binaries simultaneously.
The program has two compilation modes, multi-module which is more what you'd expect. There's about 200+ modules. And single-module where a single Main.cpp pulls into all the other .cpp files and everything is compiled as one.
@Mysticial then the binaries are the smallest code units
That's ugly, but it drastically simplified the build scripts and enabled IPO back in the days where compilers couldn't do that across modules.
seems nice
The multi-module build only works when I compile within Visual Studio. So it's for development only.
Each binary takes 2 - 4GB to compile because after preprocessing, the compiler is seeing essentially a single file with about 400k lines of code that are heavily templated.
Ah, so just a whole ton of compiler tokens need to be kept in memory at the same time
20:19
yeah
So it's more of an inefficiency of the build system rather than the program legitimately needing 30+GB to compile everything at once.
But for now, the memory problem is still solvable by throwing bigger hardware at it. So I'm not gonna fix something that isn't broken.
4
Q: Is it stupid to not save the last two characters of a password hash

JensBOk, it's late, it's friday, I've had a few beers and was sitting thinking about password hashing (great start to a question isent it?). As any good password storing developper I have user unique salts that I use to generate password hashes. ie I store a uniquesalt and SHA1(salt + password + "app...

/cc @Mysticial
Exactly. And it also serves as a natural defense against non-technical users compiling the program and getting irritated when they suddenly have no memory left and only could get a couple thousand digits.
> I've had a few beers
> great start to a question isent it?
> isent
@Aaron3468 The build script is quite stupid right now. You double-click on a .cmd file. It starts 12 other scripts each of which invoke a single command: cl main.cpp -D <binary name> <options>
So it opens up 12 other terminals. When they all disappear, the compilation is either done or failed.
user3790646
20:32
Page Not Found
lol, build system. The fun thing about programming is that as long as it's personal or limited use, the responsibility for flawless execution or design does not fall on your own lap.
user3790646
did you save the html? :P
> for those of you with at least 10k rep
@AndreyErick nope
user3790646
sad :(
20:33
@Aaron3468 well it's not a very good present for those with less
I guess it still could be
@jaggedSpire i feel excluded
I just don't hate you all that much
to give such a terrible present <3
xD fair enough
Question, on entertainment websites such as hackerrank is it a great idea to fully engineer solutions by using proper objects, state and shallow nesting, or should I yolo it and make monolithic code that solves only the case presented?
@jaggedSpire The guy is trying to delete the entire hosts file. I don't know if that's intentional or just a side-effect of stupid programming. But wow...
20:36
@Mysticial beautiful, isn't it?
the sheer majesty of such a massive concentration of stupid
it brings a tear to my eye
actually more like I spent several minutes giggling when I saw it but still
@jaggedSpire /cc @Borgleader
If the rest of you want a screenie, remind me in 5 hours. I can't do it at work.
Ven's got it, I think
yep!
/cc @AndreyErick @Aaron3468 @ChemiCalChems
@jaggedSpire oh my god...
user3790646
damn it lol
20:50
> cout<<"VIRUS";
Hahaha
wait wait wait
remove(file)?
it's removing a fucking string from who knows where?
I personally think the two different file path conventions are a nice touch
user3790646
it's removing a folder
@AndreyErick i do understand, but in what header is that?
it's removing the hosts file
20:52
He just tries deleting hosts, then writing a new one, but all he had to do was open the file in write mode xD
@jaggedSpire where is the function defined, if anywhere?
user3790646
prolly fstream or cstdio
cstdio
hmm
@ChemiCalChems c library
20:53
yeah
user3790646
I was faster
welp, gg with collisions with std::remove xd
reasons to never using namespace std
@jaggedSpire exactly
the compiler would have reacted just like me
user3790646
hahaha
20:54
well, no
also are there even situations it would mess with the overloads
it would have known it couldn't be calling std::remove
presumably not
@jaggedSpire wouldn't it know that std::remove has no overload taking only a std::string?
it's also in namespace std, like most other c standard library functions
20:55
therefore it should call cstdio remove?
@ChemiCalChems that's not a std::string
@jaggedSpire const char* sorry
always fuck that up
@ChemiCalChems I mean that's how overload resolution works
@jaggedSpire therefore the compiler wouldn't have to complain really, in this case at least
it's both in the global namespace and the std namespace btw
20:57
of course, it's not cool to have those awful collisions
why are you having collisions?
@jaggedSpire well, there aren't any collisions right now, but using namespace std; there could be in the near future if you start writing anything at all
especially in big ass projects

« first day (2141 days earlier)      last day (3033 days later) »