« first day (1058 days earlier)      last day (3908 days later) » 

6:00 PM
@melak47 Darn, thanks. Thought i was automatically in debug mode since it was in debug configuration.
 
It seems that one compilation request on cppreference results in 5 compilation requests on Coliru. So I assume that's a bug in cppreference. I mailed them about it.
 
@DavidKron that works? I haven't tried the c++ test stuff yet
 
Xeo
@StackedCrooked Ignore additional requests within a certain timeframe?
 
Clicking the "Share" button on cppreference also produces multiple popups, which seems to confirm this.
 
Yeah i worked, awesomely
 
6:01 PM
@Xeo For now I made requests handling sequential with a 3 second sleep added to each request.
 
But seriously, you need a better VPS provider.
 
@DavidKron so these C++ unit tests are usable?
 
@Xeo I could do that but I need to learn more about Sinatra then.
 
:lol:
 
This was the mail I got. It seems something went wrong, but I don't know what.
Maybe it was one of @sehe's boost spirit tests :P
 
6:03 PM
You have a swap enabled, that's what.
 
@StackedCrooked It wasn't
 
@sehe just kidding
 
@CatPlusPlus I'd hope he did because... it's a 512Mb VM and compiling anything non-trivial is gonna be a challenge without swap
^ I hate when this happens
 
512MB? Seriously? No wonder it dies on 5 concurrent requests.
Get more RAM jesus.
 
Xeo
@sehe Serial upvoting?
 
6:05 PM
@CatPlusPlus :) He's busy (?) annexing my 1025MiB VPS as a backend server /cc @StackedCrooked
Yup. It does get reversed, but meanwhile there's repcap. Also, it's intermixed with likely genuine (or legit) upvotes.
 
Even with 1GB you'd still need to run like 2 requests tops.
 
I think you are right about my VPS provider sucking. Last time I upgraded to 1024 MB my instance got really slow and unstable. After changing back to 512 MB it was stable again.
 
@StackedCrooked huh
 
yes very weird
 
You should probably work on making this thing easy to deploy.
VPS ain't gonna cut it if it keeps growing.
cppref probably should run their own instance.
 
6:09 PM
It's not just a program. It requires different user accounts for the webserver and the sandbox. It has specific dependencies. It needs to remove setuid root from some programs on your machine etc..
I have an installer script that automates this.
But it's not just a program, it's a whole machine setup.
And that's hard to avoid I think.
 
@StackedCrooked virtualization :/
 
I guess I should try to have a virtual machine image which can be loaded by a host machine.
I experimented with this but didn't succeed to run a VM on my VPS. Got certain errors, don't remember which exactly, but it's a route I abandoned back then.
But probably I should try it again.
 
A deployment works if you can make a fresh VM, run one thing and have it ready.
 
But lately I've been looking in to Linux Containers.
 
@LucDanton do you have any insight on the relation (or relative merits) of Boost Lambda as opposed to Boost Phoenix? (I've never tinkered with Boost Lambda but it looks quite full featured and possibly friendlier to use?)
 
6:16 PM
This seems a better choice performance-wise.
 
You want security, not performance.
 
@CatPlusPlus I vouch for this then
@CatPlusPlus Actually...
 
@CatPlusPlus Linux Containers also provide security.
 
try changing the default compiler from g++ to clang.
 
> PS: I'm a self-taught Windows Native C++ developer, ignorant of the standards.
> ^ my excuse if I'm doing really non-standard things here. here
 
6:23 PM
> I decided to const_cast the initializer_list values and still move them out. An eviction order needs to be enforced.
2
LOL
 
1
Q: Why use 1 instead of -1?

acidzombie24At 29min mark of http://channel9.msdn.com/Events/GoingNative/2013/Writing-Quick-Code-in-Cpp-Quickly Andrei Alexandrescu says to use 0 as a constant and mentions hardware knows how to handle it. I did some assembly and I know what he is talking about. Then he says prefer 1 next rather then -1. -1...

Please write a complete question; most people will not go and watch 30 minutes of a linked video to see what the background to the question is. — Amadan 37 secs ago
^^ lol... but... but... it's a good video!
 
ah, man
 
Andrei is weird. How can you put variadic variadic template templates and efficient assembly constants in the same talk?
 
why do I even bother to keep eating food.
 
because humans need food
 
user1804599
6:36 PM
Does .NET do automatic vectorization?
 
Xeo
@BillyONeal Is the ... at the right place? It looks really weird to me, but I'm not used to ... yet. — FredOverflow 4 mins ago
@FredOverflow: It's theoretically at the right place
He wants v.emplace_back(arg0), v.emplace_back(arg1), ...
 
i really like the question :D , maybe it is because of binary things!0 is 0 and 1 is 1 but -1 is some thing like 001010! i don't know! — user2675751 8 mins ago
 
Xeo
Unfortunately, pack expansion is not allowed at the statement level
 
@FredOverflow keen observation
 
6:41 PM
has anyone read this?
Been around for yonks, but I wondered if a Lounger has read it?
 
@TonyTheLion I already know that one. This guy rocks. He probably has no life outside of IT, but in his domain, he rocks.
 
$215.10 for hardcover
 
@TonyTheLion Buy the other book by Bentley first. (Programming Pearls)
 
$0.90 for used paperback
 
user1804599
lol
 
6:44 PM
lol
@FredOverflow oh yea, I should get that one
@FredOverflow He does rock. Some wise advice from that interview.
Who in this room even has a life outside IT?
 
user1804599
I want to write software.
 
@TonyTheLion Dude, the book is 30 years old. I bet at least half of their guidelines on efficiency are wrong by today's standards.
 
@TonyTheLion Not me!
What a silly question...
 
user1804599
I did until I left high school.
 
6:46 PM
I didn't until I right low school.
 
Why did you edit your question with the fix from my answer? Are you saying the question remains, even with the edit? It's unclear now — sehe 40 secs ago
 
@FredOverflow It may still have some gem in it?
 
@FredOverflow I see you are hopeless.
 
user1804599
Man.
 
user1804599
I don't know what to do.
 
user1804599
6:47 PM
I'm so bored.
 
@TonyTheLion Maybe... what are the examples written in? C? Note that there was no public release of C++ in 1982 yet, and no C standard.
 
Xeo
Write a new language
 
Thank you I will definitely add that functionality. — user2757849 1 min ago
^ lol. He doesn't know that "removing an error" is not quite the same as "adding functionality"
 
It seems that our Polar Bear here is quite addicted to SO.
 
Just started watching You're Under Arrest!.
Old anime comedies seem to be much funnier than modern ones.
 
user1804599
6:56 PM
Please indent your code correctly. — not-rightfold 3 secs ago
 
user1804599
People are morons.
 
@StackedCrooked I haven't watched that many older anime but I can agree on modern anime sometimes being just not funny (even if it's a comedy).
 
Indeed.
School rumble is probably the funniest anime I've ever seen. But the first few episodes are a little boring.
 
Xeo
It's been quite a while since I last watched any anime :/
 
7:06 PM
Google Image search for "School Rumble" is a pleasure to the eye :P
@Xeo :(
Right, I forgot about Needless.
I shall watch that first.
 
user1804599
Needles.
 
user1804599
 
@user2757849 I think I've found the culprit, though. You will want to mind your consts and signed/unsigned comparisons :/ — sehe 8 secs ago
@not-rightfold He could totally have been expected to say that. On a regular wednesday
 
user1804599
Gehaktdag.
 
@not-rightfold morons are people too
 
user1804599
7:11 PM
Mormons.
 
user1804599
I'm going to write a tool.
 
Make sure to finish it.
 
user1804599
I found this when googling "infinite winrar einstein".
 
user1804599
I'm glad I have multiple legs.
 
@not-rightfold looks like it's from a VN
 
user1804599
7:16 PM
Verenigde Natie?
 
no silly, visual novel
 
@not-rightfold What exactly were you hoping to find by googling for "infinite winrar einstein"? Seems a strange phrase to search for.
8
 
user1804599
@StackedCrooked OIC.
 
@JerryCoffin obviously he was searching for ... erm ...
 
@StackedCrooked Yes?
 
7:18 PM
I can't even think of anything remotely fitting :(
I'm a failure.
 
It's best to not think about it.
 
unique_lock<mutex_type> list_lock(_mutex); fails in boost::signals2::operator() :E
 
@melak47 _mutex should be mutable.
 
^ how not to ask questions
 
@StackedCrooked ?
 
7:19 PM
Just guessing.
 
mutable mutex_type _mutex;
 
user1804599
user image
10
 
The universe is infinite?
 
We don't know.
 
7:20 PM
why does the unique lock acquisition fail :/
I'm not even calling operator() from multiple threads :(
 
user1804599
@StackedCrooked My dick is, and it's part of the universe, so yes.
 
@melak47 Because you haven't filled the proper form.
 
@not-rightfold That's very good.
 
@CatPlusPlus you said I should use signals, don't mock me now :<
 
user1804599
@melak47 Use concurrent queues to communicate with other threads.
 
user1804599
7:21 PM
No more lock shit.
 
@melak47 "don't mock me now" reminds me of this song by the Beatles
 
@not-rightfold it's not my mutex
 
user1804599
So?
 
user1804599
Encapsulate the thing into an actor and you won't access it from multiple threads anymore.
 
but I'm not accessing it from multiple threads to begin with
 
user1804599
7:23 PM
Then why are you using locks.
 
@melak47 then don't lock silly
 
I'm not locking
 
user1804599
Remove it.
 
user1804599
Then what's the problem.
 
@CatPlusPlus I thought we knew that it was finite?
 
7:23 PM
@melak47 then what is your problem buddy?
 
user1804599
Hmm.
 
user1804599
I could implement Paxos.
 
user1804599
I wouldn't be bored anymore for a while.
 
@not-rightfold I see. That does make it seem much more reasonable.
 
Mystery solved.
 
7:27 PM
@StackedCrooked I have one thread doing: win->eventqueue.push([&win, wparam, lparam]{win->OnKeyDown(MapLeftRightKeys(wparam, lparam), static_cast<uint16_t>(lparam)); });, and one thread consuming the std::function<void(void)>s in that queue, and calling operator() on them.
 
Very good.
I often use tbb's concurrent_bounded_queue for that.
But that doesn't seem to be related to the problem.
 
and if I press too many keys too quickly in succession, it blows up on the lock in operator() in the OnKeyDown which is a boost::signal2::signal<void(Key, uint16_t)> :/
which I don't get, because only one item from the queue is consumed at a time :/
 
You have to be a little more specific than "it blows up".
 
"Access violation reading location 0xFFFFFFFFFFFFFFFF" when it does EnterCriticalSection(&cs_); deep in the lock
 
0xFFFF... is a magic value for ..freed memory?
I don't remember which exactly.
 
7:34 PM
nothing in the mutex is new'd
 
@StackedCrooked Don't they used 0xDEADBEEF or something like that?
 
Could be.
I remember there was 0xcdcdcdcd... as well
 
win->eventqueue.push(std::bind(std::ref(win->OnKeyDown), MapLeftRightKeys(wparam, lparam), static_cast<uint16_t>(lparam))); works better, though I thought that was exactly what I had before which caused other problems....
 
0xFFFFFFFF has no special meaning in MSVC. It usually means you're storing -1 in an unsigned int though.
 
or UINT_MAX ;)
 
7:38 PM
That too :P
 
@MohammadAliBaydoun he is dereferencing it
@FredOverflow int or long?
 
Dereferencing -1 doesn't sound like a good idea.
 
or well long long
 
@FredOverflow :)
 
@melak47 do you use pointers as ints at all ?
 
7:41 PM
@A.H. nope
 
Yeah what moron would dereference 0xFFFFFFFFFFFFFFFF.
 
did you initialize the mutex correctly?
 
it's not my mutex..and the problem seems to be gone now without the wrapping lambda
 
did it capture something by ref from the stack ?
or a pointer by value
 
I captured a pointer by ref, and some values by value :D
 
7:43 PM
pointer by ref as in ** ?
 
Window* win; [&win]{}
don't ask me why
 
:P
 
considering that variable is in function scope, that was not a great idea :E
 
who the fuck wrote long long -1 though
 
7:46 PM
some part of your code is turning against you
 
@A.H. the part where I captured a reference to a local variable maybe? :p
 
well melak it depends, because that could totally be valid if it was say main
 
yeah, uh, it was in my WndProc? :p
 
oh bad
 
7:50 PM
@StackedCrooked It's needlessly ecchi ?
 
does this look alright?
template<class F, class... Args>
void push(F&& fun, Args&&... args)
{
    std::lock_guard<std::recursive_mutex> lock(producer);
    back->push_back(std::bind(std::ref(fun), args...));
}
 
Xeo
@StackedCrooked I told you that the ED was totally random :P
Since you don't even get to know the Pretty Girl Squad yet
 
@Borgleader Needless is the title of the anime :)
 
</bad pun>
 
@Xeo Only just finished episode 4.
 
7:51 PM
HELLO DOG.
 
@Borgleader :)
@ScottW Yes, this is @StackedCrooked.
 
so I had I compiler exam today, totally forgot how to build LL(0) and LL(1) parse tables
really sucked
 
user1804599
I'm watching a video about Paxos and it makes my head hurt.
 
@ScottW hey
@not-rightfold the family of protocols (read half a line from wikipedia)?
 
@A.H. Ouch. I remember doing those in my compiler class, couldn't do it to save my life now though
 
7:53 PM
yay, eventqueue.push(win->OnKeyDown, MapLeftRightKeys(wparam, lparam), static_cast<uint16_t>(lparam)); works now.
 
user1804599
@A.H. yes.
 
So, I have just finished 329th ep of Naruto Shippuden.
 
@ScottW I'm doing fairly good.
 
I love how during the fights they destroy locations in size of small states. :)
 
GAH
I commented back in all the other push calls, and now it sucks again
 
7:55 PM
Please don't use pastebin gratuitously: it makes the question incomplete and adds annoying linebreaks. I just spend 2 minutes restoring the mess. — sehe 26 secs ago
 
If I was a fairy then I good make pun by saying "I'm doing fairy good."
 
I lose events now :/
 
Alas :(
 
I'm doing fairies good :/
 
the hell
 
7:57 PM
@ScottW oh you!
@ScottW I'm reminded of the keyhole scene.
 
function keys come through fine, other key presses get lost 90% of the time :(
 
@sehe you could have totally used regex to remove the linebreaks :P
 
@user2757849 Well, I can't help you. If you can't even figure out how to change that, you deserve to read a good book on programming, not more spoonfeeding. Head over here: the-definitive-c++-book-guide-and-listsehe 4 secs ago
^ gosh
@A.H. What do you think I used? Assumptions assumptions. I exaggerate things to get the point across. Of course I'm not spending 2 minutes polishing turds.
 
@sehe hehe my bad, should have known better
 
@sehe You answered a noob question again? :P
 
7:58 PM
@A.H. Here's what I used:
 
@melak47 Shouldn't you std::forward the arguments?
 
'<,'>g/^[^D]/-1 join
That's excess typing, though .../-1j would have been enough
 
@FredOverflow I don't know, should I?
 

« first day (1058 days earlier)      last day (3908 days later) »