« first day (2076 days earlier)      last day (2879 days later) » 

12:00 AM
@Mysticial Uh?? Don't you have access to the webpage? via ssh or whatever
 
@KretabChabawenizc We have internet access, but only through remote desktop to a "dirty" machine that's allowed to outside.
And transferring of everything (except pixels) is disabled through that remote desktop session.
 
I don't get it, is a windows machine?
 
yes
 
Also what kind of company has such "security measures"?
 
finance
They don't want people trying to steal stuff. And they don't want to get infected by something.
And it has happened before.
 
12:04 AM
@Mysticial On the other hand, at least it's not as bad as the work I was doing when I was in San Francisco, where the only communication allowed with the outside world was writing notes on paper (I filled something like 8 legal pads with notes that summer--and I hate writing by hand too).
 
@JerryCoffin ow by hand?
 
Can't take photo?
 
@Mysticial p sure you can still automate data transfers
 
You can screen capture. If you screenshot on the dirty box, it's on the clipboard of the dirty box so you can't paste it locally. If it's on your local box, you can save it locally, but you can't transfer it out.
 
Have a program on the bridge machine that converts data to some kind of pixel format, and on your host copy screen and parse it
 
12:08 AM
@KretabChabawenizc But there's no program locally to do that.
 
@Mysticial Certainly you can, by sending keyboard events
@Mysticial You have a web browser, no?
 
@KretabChabawenizc Yes, but the one within the company network can't talk to outside.
So you can't download anything into the network. Nor can you transfer anything out.
 
So how do you get access to internet?
 
Yes you can use pixels and keyboard events to transfer between the network and the dirty box to get data in and out of the network, but no such program exists on the network. So you need to either write your own, or copy one from the internet manually byte-by-byte with a hex editor.
 
> So you need to either write your own
 
12:10 AM
@KretabChabawenizc Like I said, remote desktop into a "dirty" machine which has access.
 
And I am sure your job involves tools that can let you write such a program which isn't that complex
 
Also if you get caught trying to do unauthorized transfers in or out of the network, you're fired and you might get sued.
Also, you can't email out of the network either.
 
Ah well that's orthogonal
 
screenshot first, then have a text recognition that put the result into the clipboard :)
 
Point being, if a human can access internet somehow, so can a machine.
 
12:11 AM
@Mysticial Yeah--pen and paper.
 
They disabled all forms of data transfer in/out of the network except for pixels and keyboard events. (or paper)
If you plug a USB device into your machine, armed security will descend on you.
 
Still enough :)
You only need 1 channel in and 1 channel out no matter what
 
They are all wired up to 24/7 surveillance. Everyone needs to use PS2 mice/keyboard.
 
Isn't PS4 nicer or XBOX even
 
Snrk.
 
12:14 AM
The security is this insane because of something that happened a few years ago.
Someone stole a bunch of stuff with a USB hard drive. Tried to escape to China to start his own hedge fund using the information, but was caught. And he's in jail.
 
Oh, damn.
 
Oh I think I heard about that guy
We must have colleagues in common :)
The guy from Tsing Hua?
 
no idea
 
Is it possible to write a template that takes a lambda with the signature [](int, T*) {} and deduce T somehow? or maybe through a template template parameter?
 
Ell
12:34 AM
I'm sure it is possible
template<class lambdaT> argT;
Oh waiy
Every lambda has different type right
So the specialisation thing won't work :3
Maybe you could decltype(std::function(lambda)) and specialise for std function
But eh idk
 
http://coliru.stacked-crooked.com/a/97e5d2567b918fab
I have several functions that follow this double if pattern to return the vector of T. So I would like to pass a lambda to a template that does this pattern and somehow extract T from the lambda (because the return type is std::vector<T>)
 
Ell
template<class lambdaT> class argT; template<T> class argT<void(int, T)> { public: using MrT = T};
argT<decltype(mylambda)>::MrT
Idk. Sleeping now, night!
 
night
 
-.- I'm not proud to be North American as of late; lots of recent attacks on Muslim people in retaliation for Orlando, despite the strong evidence that the shooting was made by an individual with no ties to 'terrorist' organizations
 
@Borgleader bind_traits
And then perform all the SFINAE you want.
 
12:47 AM
http://coliru.stacked-crooked.com/a/0f2caff7dc28c7f4
This is what I have now, its not bad but I dont like repeating the type.
(I have more than 2 functions that use this but 2 was enough to show the use case)
 
@Borgleader You're definitely going to need bind_traits
 
Ok, I'll take a look at that tomorrow. It's not as simple as I would have hoped :P
 
Just copy/paste.
Well, I mean.
There's some backing type traits
But they're really not all that hard.
 
bby, its 9PM thats when I go to bed :P
 
Oh, rite.
Sleep well, honeybunches. <3
 
12:57 AM
ty <3
 
 
1 hour later…
2:05 AM
This bug is driving me up the wall.
 
If it's not UB then it should not be too bad
 
It's not UB, but it's not working either.
And there's no indication as to why it's not.
 
2:19 AM
can't you step through the code or maybe pipe into a log to see what's not working?
 
I think I have figured it out.
std::mt19337::operator() takes a base-class version of std::mt19337.
Not the actual std::mt19337 itself.
So my binding library throws, claiming the thing isn't of the right type
when it technically is, just some stupid shitty base class.
And now I'm kind've upset because what the fuck is the library breaking contract for and exposing an implementation-defined base type.
Fucking......
 
why do you use that shitty PRNG?
 
I'm not
 
mersenne twister is large, slow and bad
 
Someone wrote a test
that binds to it
and they're asking me why it's not working properly
So I have to use it and fix it.
 
Why the need for triple buffers?
 
Because they allow me to reduce the amount of mutex locks at both the producer and consumer side.
 
2:48 AM
This whole compile-time prefetching thing works great for the very localized prefetching that I was doing. But it results in a template instantiation explosion when I try to scale it up to large scale.
So I'm trying to see if I can do some sort of dynamic-ish thing.
 
Interesting @StackedCrooked
 
The problem is that prefetch instructions are compile-time only. But maybe I can NOP out a prefetch stream by setting the stride to zero, and setting the pointer to something global like errno or something.
 
would like to see performance penalty embodied in so many buffers
 
@Mysticial AbstractSingletonProxyFactoryBean
 
@StackedCrooked L1 and L2 prefetching are easy enough to do statically. But L3 prefetching requires that I spread out the instructions over a large amount of code.
I can't "cluster" L3 prefetches together because they will quickly queue up and saturate the memory bandwidth.
So I need to slow down the L3 streams. I can do that by controlling the stride that I increment the prefetch pointer in each loop. That can be done at run-time.
But I can't "cancel out" a prefetch instruction. There's no "conditional prefetch" in x86.
But I can make it point to a static location.
So it just prefetches the same line over and over again.
Actually, errno is bad choice. It's thread-local - which is an extra indirection.
I'll try the function pointer for memcpy(). That should be pretty safe.
 
2:55 AM
@Mysticial Not sure if understand. What if you put the prefetch inside an if-block?
 
famous last words
 
@StackedCrooked The branch will kill everything.
Even if it tends to go one way for the duration of a loop.
 
Assuming it's a predictable branch..
 
We're talking tight loops where every cycle matters.
 
I see.
 
2:56 AM
I'm already taking a 1-2% hit for having a prefetch instruction in there at all.
This might become more of an issue with AVX512 because the word-size is 64 bytes. So every load needs to be prefetched. Whereas with AVX(2), every 2 words need to be prefetched. IOW, the number of prefetch instructions will double with AVX512.
There's no multi-cacheline prefetch.
 
@Mysticial So maybe just go for the template explosion and see what it gives?
 
@StackedCrooked I'm worried about binary size and icache.
 
I figure.
 
The compiled size of the binary has already gone up by 1 MB since I started this thing.
 
If you could find a way to reduce one of the template instantiation multipliers.
 
3:03 AM
That's what I'm trying to do with the L3 prefetch.
Make it dynamic.
Since it's memory bound, it'll be limited to 1 per loop anyway.
So I can go ahead an insert one per loop, but make the stride (the # of bytes to increment the prefetch pointer in each loop iteration) configurable a run-time. And make it NOP-able by setting the stride to zero and the pointer itself to some (safe) static location.
I say "safe" because bad things happen if you try to prefetch a bad pointer.
 
Hm, I suppose you mean performance-related? I heard prefetching a bad pointer doesn't segfault the program.
 
Yeah, it won't segfault. But it will to a TLB lookup.
 
The prefetch instruction doesn't retire until it finishes the TLB lookup. In the case of a TLB miss, it'll take a while.
And if the pointer pointer to unmapped memory, it'll take a while.
In Skylake, they added an exception such that prefetching a null pointer is a no-op. But I'm not ready to fuck over the older processors, lol.
 
I'd assume if you want top performance, then you'd not care about old CPUs.
:)
 
3:08 AM
Haswell and Broadwell are not "old" yet. lol
 
does GPS work in tunnels?
 
@Mysticial Prefetching the same line repeatedly has no extra cost?
 
@StackedCrooked Aside from decoding the instruction itself, I would hope not.
 
it should not, because GPS depends on satellites?
 
That cacheline is gonna get into the cache very quickly. And once it's there, it won't be hogging anymore bandwidth.
Ideally, I'd have it prefetch something on the same stack frame as the loop. But the prefetch object itself will be created elsewhere and passed around (by value) multiple times before it finally gets used.
All other solutions involve putting a branch before the loop, which isn't any better than just repeatedly prefetching a global.
 
3:17 AM
multi-threading for idiots - do dumb things faster!
 
looks like civil discussion is souring
@KretabChabawenizc
 
3:37 AM
@KretabChabawenizc ce truc est trop bien
 
Well, I "fixed" those bugs.
 
> Dans un registre plus light, on ne mange pas de pâtes chez mes parents. Jamais. A la limite des tagliatelles fraîches, avec une très bonne sauce/viande, une fois par an.
pourquoi.guif
 
4:05 AM
 
4:42 AM
@StackedCrooked I see what you mean by everything does to shit in Kabaneri.
 
Xeo
I haven't seen it yeeeet :<
will have to wait till Saturday
 
@Xeo Saturday is a long time from now. I mean like... England might not even be part of the EU anymore.
 
Xeo
lol
 
5:03 AM
It's the best for England to stay in EU, but it's good for fireworks if England leaves ...
 
@StackedCrooked Fuck, I just finished ep10 only find out that it came out on Monday. FUCKFUCKFUCK.
 
5:22 AM
@LucDanton I carry another message from Cicada: Fil de grande qualité: "Flair vérifie dehors". "Son légitime". J'approbation.
 
5:43 AM
> Which Bear Is Best?
I’m glad to know there are other people out there who want to know the answers to the same pressing questions as I do
 
0
Q: Why does my vector not rotate correctly OpenGL/GLM?

Ashwin GuptaI am trying to learn how to do some transformations on 3d points in OpenGL. Using this cheat sheet I believe that I have the correct matrix to multiply to my vector which I want to rotate. However, when I multiply and print the new coord, I believe that it is incorrect. (Rotating 1,0,0 90deg cc s...

 
Ven
6:13 AM
@sehe qdump
 
user1804599
6:35 AM
The OpenGL license prohibits help vampires from using it and that's why it doesn't work.
 
user1804599
Bende gij zwakzinnig of wa?
 
7:07 AM
I'm finally starting to understand how to design circuits, after banging my head against textbooks and videos for a while. If all goes well, I might mess around with a microcontroller somewhere down the line.
 
Hey guys! Wondering, can anyone suggest to me some cool data structures that they think i've never checked out before?
 
Remove allocator support from `std::function`:
Should we remove the interfaces outright rather than deprecate?
SF F N A SA
12 3 0 0 0
@OneRaynyDay Skip list, bloom filter.
Leonardo heap.
3
 
@Morwenn heard of both of them - thanks though :)
Never heard of leonardo heap - interesting, lemme check that one out
 
It's only used in smoothsort.
And it proves that Dijkstra was insane.
 
Interesting... I've never heard of smooth sort either. What on earth?
@Morwenn What the actual hell is going on
reading the lemma right now is blowing my mind
 
7:25 AM
@Morwenn didn't know there were problems with std::function's allocator support
 
@OneRaynyDay Yup... Dijkstra.
@StackedCrooked I often heard that it was broken, but this isn't among the things that keep my interest, so I don't know more :/
 
Reading the paper.
I suppose it makes sense.
5
A: What's the point of std::function constructor with custom allocator but no other args?

T.C.std::function's allocator support is...weird. The current spec for operator=(F&& f) is that it does std::function(std::forward<F>(f)).swap(*this);. As you can see, this means that memory for f is allocated using whatever std::function uses by default, rather than the allocator used to construct ...

 
@Morwenn Oh gosh, have you actually read through the rigor of the proof of the leonardo heap?
I'm so confused by the random conditions and definitions he set up to prove so far. Trying to go through the entire proof
 
user1804599
@OneRaynyDay B+-tree
 
user1804599
@OneRaynyDay distributed hash table
 
user1804599
7:38 AM
@OneRaynyDay cons list
 
@Bassie Hmm interesting :D this is similar to a recurrent neural network structure actually
(In a basic view of the image online, not completely sure yet)
 
@OneRaynyDay Nope.
 
Distributed hashtable? You mean across computers?
@Morwenn Damn, okay -I feel the impending doom of having to write another stack overflow post to try and understand this
 
user1804599
@OneRaynyDay yes
 
thanks guys, this is pretty interesting to see
 
7:41 AM
@OneRaynyDay Have you read this article or the original paper?
 
user1804599
@OneRaynyDay relational database
 
user1804599
relational database is the most badass data structure ever
 
@Morwenn keithschwartz's
 
Ven
once people start having babies through dating apps, artificial intelligence algorithms will technically be selectively breeding humans
 
I'm looking at the rigor proof of the lemma
 
7:45 AM
@OneRaynyDay std::pair
 
@StackedCrooked java's Object object
@Bassie I guess you could consider that a data structure, yeah :^)
 
Meh, just a record type.
 
user1804599
8:28 AM
namespace std {
    template<typename _A, typename _B>
    using pair = tuple<_A, _B>;
}
 
user1804599
8:47 AM
sendfile is super rad.
 
user1804599
Oh wait, Protestant, not Catholic.
 
user1804599
Ugh, PHP's recursive mkdir fails if the directory already exists.
 
9:12 AM
So, @BartekBanachewicz, are you still doing LaTeX or have you chickened out? :)
@Bassie How long did it take you to find/type the ae ligature? :)
 
Ven
sum it!
 
user1804599
@wilx a second
 
user1804599
google ae, copy
 
user1804599
9:27 AM
What's a reasonable delay between two automated requests to avoid rate limits?
 
@Bassie Oh, nice. :)
@Bassie That depends on how are the rates limited...
 
user1804599
I don't know.
 
nwp
rand() % 5000;
uninitialized in milliseconds
if you don't like the outcome just re-roll
 
So it looks like I missed a joint EWG/CWG discussion on template argument deduction for constructors due to needing to sleep some more today. :P
 
Ven
You had one job, @Griwes.
and you did well.
 
9:34 AM
From the wiki it looks like there was a concern about partial type specification, so basically people wanted to be able to write tuple<std::string [possibly something here]> t = { "foo", bar, baz };, and there was a lot of bikeshedding on the syntax.
 
user1804599
css y u no xpath
 
There was talk about tuple<std::string, auto...>, followed by comments that auto in this context could only be a type (lol, untyped types biting our asses again).
There was a comment from Chandler that sometimes we need that, like in small_vector<3> v = { 1, 2 };.
There will be some NB comment about this, but hell knows what happens; Bjarne and few others apparently said that we should leave it as is for now, and worry about specifying the arguments explicitly later (read: not at this meeting).
There's some function pointer (and virtual function pointer) stuff scheduled for the afternoon, and I expect this to be fun.
 
Wait is the lobster a bass now
I don't cope well enough with those chameleon users
 
Ven
do you have a hard time with me as well?
 
@Griwes That one about comparison?
 
9:46 AM
> P0172R0 Abominable Function Types (Alisdair Meredith)
P0312R0 Make Pointers to Members Callable (Barry Revzin)
P0187R0 Proposal of Bitfield Default Member Initializers (Andrew Tomazos - To be presented by Jens Maurer)
P0130R0 Comparing virtual functions (Scott Wardle, Roberto Parolin)
P0191R1 C++ virtual member function pointer comparison (Daniel Markus)
This is the afternoon agenda.
 
Abominable Function Types - like, C functions?
@Ven No. You're nice and boring :)
 
yeah
 
I know your avatar isn't stationary but I don't really see those
 
unfortunately the function pointer stuff is not like, "Remove all function pointers from the language"
 
@sehe "For the purposes of this paper, an abominable function type is the type produced by writing a function type followed by a cv-ref qualifier."
 
9:54 AM
oh that. Yeah. That leads to much boilerplate, missed cases or bugs
 
emm, android was giving me black screen of death
seriously I didn't even try to debug it into oblivion ...
toughen up android, toughen up
 
@Griwes Nice :D
 
Meh, the comments from Chandler about compiler exploding because out of memory if reflecting on the global namespace wasn't lazy weren't noted down.
 
user1804599
@sehe ?????????
 
user1804599
I uses to think ovens had no temperature limit and they'd just get hotter and hotter until they melt
 
10:09 AM
@Bassie Thanks for the confirmation
Nobody else does that pathological question mark bombing thing
@Bassie You already told us that. Oh wait. thanks for re-confirming.
You're now truly authenticated
 
Yay, I found a new MIT-licensed sorting algorithm to steal.
I'll probably have to fix a few things though. The author mentions memory leaks, which seems obvious considering that there are raw new and delete all around the place.
 
@Morwenn ?
 
I'll probably try to fix the memory leaks tonight.
 
yeah I already saw that
meh
 
@Morwenn just use scopes
 
10:17 AM
I also got an answer for BlockQuicksort today: it's GPL licensed :/
@набиячлэвэлиь That's the plan.
 
@Morwenn that doesn't matter
I can implement it myself from the paper description
 
Yeah, but I'm too lazy to implement it by myself.
 
@набиячлэвэлиь that’s for scrubs
 
Might as well steal code and blame the original authors when it doesn't work x)
The library interface already requires efforts to maintain, so it's better if I don't have to maintain the algorithms by myself.
 
10:40 AM
Apparently a huge part of <algorithm> could be marked constexpr for C++19/20.
 
nwp
is there any chance we get constexpr new?
 
No.
 
nwp
:(
 
page 6, algorithm 3
if numL != 0 then
shouldn't that be ==, not !=?
 
10:43 AM
Dunno. Is it the same in the provided implementation?
 
nwp
@набиячлэвэлиь you should be able to new stuff up in a constexpr context as long as you delete it in that same context. This would allow you to use for example an std::string in a constexpr function, which should be allowed but isn't.
 
@Morwenn ah, it is indeed ==
so a mistake in their paper
 
nwp
this should totally compile
 
@orlp There are also mistakes in the implementation though.
 
nwp
10:45 AM
@набиячлэвэлиь why not?
 
@Morwenn for some reason they insist on [begin, end]
instead of [begin, end)
@nwp you can use a custom allocator for this
 
nwp
@orlp I thought about that, but dismissed it when I heard placement new is also forbidden in a constexpr function. I'll have to look into how you did that, thanks.
 
I still don't get what T temp = std::move(smaller ? *i1 : temp); is supposed to do.
 
@Morwenn in what context?
 
nwp
10:52 AM
@Morwenn how is that unclear? looks very reasonable to me.
 
@Morwenn does that even compile?
@nwp T temp = temp;
how is that reasonable?
 
nwp
it updates temp if there is a new smaller value
and the self-assignment gets optimized away
 
@nwp no, that's the initialization of temp
 
nwp
oh, ignore everything I said
 
@Morwenn that's UB, but can never 'trigger'
apparently the compiler doesn't give a flying fuck: coliru.stacked-crooked.com/a/c76754da80bc1be1
 
10:55 AM
@orlp I don't know, I replaced that strange thing by your median of 3 when I tried to get the algorithm to work.
 
nwp
I need a vacation
 
@orlp UB? Isn't it just initialized with garbage?
 
@Morwenn don't think you're allowed to access a variable before initialization?
 
lol Bjarne trying to dismiss making pointers to members callable because unified call syntax
 
@Griwes Tell him that Barry's proposal has the Lounge seal of approval and that UFCS doesn't seem to be going anywhere these days anyway.
@orlp Apparently it's allowed, I guess that a points to uninitialized memory then it is assigned itself, so still uninitialized memory. It should be safe for scalar types.
 

« first day (2076 days earlier)      last day (2879 days later) »