« first day (997 days earlier)      last day (3952 days later) » 

3:00 PM
I'd rather wait til Win9
 
@DeadMG: previously i asked a question in this chat forum and it appeared dumb to you ,and you have asked the fellow people to down vote me, then the day i was unable to post questions in this site ... please tell me any solution regarding this
 
@vamsi Your tears of pathetic whining fill me with joy.
14
 
"chat forum"? yeah you do look like a dumb
 
i mean this chat room @Abyx
 
I need to upgrade to window 8 ... I have been say that for ages :p
 
3:02 PM
@vamsi doesn't matter, really
 
@EtiennedeMartel it not the best way. Just a joke. — zszen Jul 4 at 6:54
 
I wonder what a smart pointer would look like in real life..
 
@Telkitty猫咪咪 no you don't
 
ughfuck
C function pointers, we meet again
 
@Abyx:now what need to be done to get my previous previlage ?
 
3:03 PM
@Abyx ok ... lemme rephrase: I feel the need to upgrade to window 8, even though I don't actually need to :p
 
auto c_fun_ptr = make_cfptr([&state] { foo(state); });
somebody write that ^
 
@DeadMG: what should i do now in order to get the previous status ?
 
Not possible in standard C++.
 
@vamsi delete account, maybe
 
3:04 PM
use magic.
 
Needs executable memory or arbitrary limitations.
 
My Little Template
 
ffs, I keep forgetting auto x = Foo(); isn't the same as Foo x; ... damn you D
 
open new account ? @Abyx
 
@R.MartinhoFernandes I can accept arbitrary limitations :D
 
3:05 PM
@vamsi What makes you think I have any interest in helping you?
 
@vamsi certainly not.
 
@BartekBanachewicz Worked on it for Standardisation before.
 
@DeadMG aaaaand?
 
because even you are also a boy like me , when you started developing ,@DeadMG
 
3:05 PM
@BartekBanachewicz: then ?
 
@BartekBanachewicz Aaand you might be able to get it through Committee if you have giant balls and put in quite a bit of effort.
 
@vamsi she's a girl, Daisy
 
@vamsi Yep, and I got banned from a few places, and I had to move on and change my ways, as will you. Goodbye.
 
@vamsi edit your bad questions so they're better and possibly get score back, and answer questions. Actually look on Meta
 
@BartekBanachewicz No really, does this exist? Or will someone please?
 
3:06 PM
@BartekBanachewicz Answering won't change questionban.
 
i couldn't edit , many are closed
 
@DeadMG Yes, it will.
 
2 mins ago, by R. Martinho Fernandes
Not possible in standard C++.
@vamsi you can edit closed questions
 
@R.MartinhoFernandes Huh. I coulda sworn the last time I read about it that it does not have any effect.
 
that's what closing is for dammit.
 
3:07 PM
@DeadMG Well, assuming he gets upvotes from the answers.
@BartekBanachewicz Make a static array where you store the lambdas as std::function or something, and have a different function for each element in that array that calls the respective element.
 
ok i'll check that on ..thanks @BartekBanachewicz
 
With that the total number of function pointers returned from cfptr that can be active at the same time is fixed by the size of the static array/number of predefined function callers.
You can make it fancier, but that is the basic idea of the limited solution.
 
What if I just wanted to bind this
 
@Telkitty猫咪咪 I did and I regret it now. UI is so annoying and those new fullscreen apps are useless %)
 
and only do that on WndProc
 
3:09 PM
@BartekBanachewicz Makes no difference.
@BartekBanachewicz Use Get/SetWindowLongPtr.
 
@BartekBanachewicz Same thing.
@BartekBanachewicz Windows has functionality for that. See puppy above.
 
hmm
so my WndProc will be static
and inside I just have to get my this from the window
brilliant.
 
@DeadMG or GetProp(hwnd, "your name of choice");
 
> unexpected precompiled header error, simply rerunning the compiler might fix this problem
Well, that's new.
 
hahaha PCH strikes again.
 
3:13 PM
WinAPIOGLWindow* window = static_cast<decltype(window)>(reinterpret_cast<void*>(GetWindowLongPtr(hWnd, 0)));
you gotta love that.
 
@R.MartinhoFernandes Fun fact: rebuilding does nothing.
 
Even rebuilding the PCH?
 
I would like to express my disaproval fo the new Qt Syntax for overloaded functions: connect(ui.cmbGain,static_cast<void (QComboBox::*)(int index)>(&QComboBox::currentIndexChanged),this,&Slim2::bitModeChanged);
 
All the projects fail for that reason.
 
@Mikhail That's new?
 
3:14 PM
design choice question! :D I have about 5-6 events I want to be able to subscribe to, on_aEvent([=](){}) or on('aEvent', [=](){}), ie, API bloat or impl bloat :S
 
@Mikhail That's not "new" at all, that's the Standard syntax for getting an MFP from member function pointers.
 
I thought it was just regular C++.
 
@Daniel Definitely not the second one.
 
@R.MartinhoFernandes I discovered they are a bitch when the syntax is overloaded. You need to do crazy casting...
 
@DeadMG reasons?
 
3:15 PM
because
no user is gonna know what the fuck the legal values for that string are.
 
@Mikhail Yeah, but it's not about Qt. It's just how it rolls in C++ :(
 
and they could enter on("HOLYSHITWHATTHEFUCKEVENTISTHISGOINGTOFIREON", callable).
 
@R.MartinhoFernandes They could have made an API without overloads
 
@DeadMG used Node.js before? :P
 
@BartekBanachewicz that's down right beautiful..er..yeah
 
3:15 PM
I don't give a shit about Node.JS.
 
@Mikhail Oh, that is a good point.
@Daniel It's not like it makes a big difference in a language without static typing.
 
Hm, a KB article says it might be caused by ASLR moving modules around.
Since PCH files are not supposed to move between compiler runs, then it might fuck up.
 
@R.MartinhoFernandes of course, but in this case we have static typing... as a dev, what would you prefer?
 
@BartekBanachewicz I did that at one point, too. but at the moment it looks like I have no need for those shenanigans! :D
 
If the set of possible events is fixed, then the first one.
 
3:18 PM
@melak47 well if you use a proper windowing library
 
@BartekBanachewicz lolnope
 
@ScottW I'm not gotta star that.
 
@melak47 ?
 
@ScottW It looks good
 
@R.MartinhoFernandes interesting, even if it didn't get optimized out (good chance it would), for some reason I favour the second :|... ah well, my boss is more traditional so first one it is
 
3:19 PM
@BartekBanachewicz at the moment I send messages from the main thread to my other thread that does stuff from the wndproc when something interesting happens
 
@Daniel It can't be optimized out effectively, because the shitty stringly-typed first argument can't be guaranteed to be constant.
 
@Daniel Why would you favour the second? The only advantage it gives is having a flexible set of events, in exchange for losing compile-time checking. If you have a fixed set of events, you lose the checking, but don't get the benefit.
 
@melak47 um, and how do you do that without extracting your userdata from WndProc?
 
@BartekBanachewicz global var that stores the thread id to forward interesting messages to. :P
 
3:21 PM
I need a gravatar for my asylum tweet feed
 

alcohol isn't Java

Jul 18 '12 at 14:27, 12 seconds total – 2 messages, 2 users, 0 stars

Bookmarked Jul 18 '12 at 14:28 by refp

 
@melak47 oh fuck me if you call that a solution
@R.MartinhoFernandes that's not even funny
 
python is unnaturally intuitive
 
@BartekBanachewicz Everything's funny.
 
Xeo
ITT: Robot's drunk.
 
3:22 PM
@BartekBanachewicz it solves my "1 window" problem. :)
 
@R.MartinhoFernandes yeah no rationale to be found here. I can't say why, probably because I've been working with node to much lately its made it 'look nice' in my head
 
found it
 
@melak47 I can't possibly realize why you didn't just use that damn SetWindowLongPtr
 
@BartekBanachewicz I used it before. I think I forgot. :)
 
@Xeo I haven't had any alcohol since last Friday.
 
3:24 PM
but mainly, because not all messages are just interesting to the window, and I don't want to like..have callbacks in my window for crap :S
 
@melak47 why exactly?
 
Xeo
@R.MartinhoFernandes ITT: Robot's so sober, his brain is simulating drunkenness.
 
@BartekBanachewicz why exactly what?
 
@refp alcohol also takes your memory :<
 
Xeo
Woooooops. Camera inverted. Now that feels awkward on mobile
 
3:25 PM
@Xeo Thats how people trip down the stairs
 
@BartekBanachewicz say I get a keydown message, and I want to be able to react to that, but it doesn't do anything on the window
why do I want to go through the window :/
the window doesn't own or know about any of the other logic
 
Tony, why?!
 
cause its funny
 
3:28 PM
wait, they would be your mistress, they are lioness :p
 
@Telkitty猫咪咪 Fresh meat!
 
@Telkitty猫咪咪 indeed
 
@StackedCrooked in a cage
 
The cage is to prevent them from escaping during transportation.
 
dat pun
 
3:30 PM
@BartekBanachewicz you still there? typing up a storm? or did I kill you with my stupidity :x
 
@melak47 because the window receives that message maybe?
@melak47 exactly. That's why it should propagate the event further
I mean if you click your mouse on the window, you click on the window
 
@BartekBanachewicz how? to where? the window doesn't know anything
 
> Since you bought My Little Pony: Friendship Is Magic, we think you might also be interested in these comics.
 
@StackedCrooked we need to sub them with Americans or Australians - they are way too skinny, we don't want to exhaust the lionesses from chewing on the bones now, do we >_<
 
@melak47 to what's inside it obviously
 
3:31 PM
man, I've been pwning the starboard in the last hour
 
there's nothing inside the window
 
@DeadMG and my twitter feed
 
@melak47 wait what.
 
@DeadMG There are three messages there. Does that count as pwning?
 
@melak47 your application is inside the window
 
3:31 PM
@R.MartinhoFernandes It does when they're all in the last hour.
 
I don't give a shit about Node.JS.
 
@BartekBanachewicz my application has a window. why would my window own my application? o.O
 
I should have called it Lounge Zoo
because this place is just like a zoo
 
@DeadMG To be fair, Roboto is much more effective at starboarding.
 
@melak47 because everything you display is inside that window?
 
3:32 PM
@DeadMG Ok. I guess I just have higher standards for starboard pwning.
 
so logically every click on the window propagates to what's inside
 
@TonyTheLion Maybe you should automate it and just tweet anything we star.
 
and that's how every fuckin OS on the planet does that.
 
I'm not writing an OS
 
@R.MartinhoFernandes I have no idea how to do that?
 
3:33 PM
@melak47 doesn't matter.
 
what am I supposed to do, notify the swapchain that a pixel in it has been clicked?!
 
well i got only downvotes , will that lead to ban ? @BartekBanachewicz
 
@vamsi probably
 
@TonyTheLion Twitter has an API. For stars you would need something else though.
 
if (isStarred(message)) tweet(message)
 
3:33 PM
i mean 5 downvotes @BartekBanachewicz
 
@R.MartinhoFernandes hmmm yea
 
@melak47 if the only thing inside the window is OGL context, then technically yes, every pixel clicked is to be handled by the underlying app
how else would you want do that?
 
@BartekBanachewicz the window doesn't have an OGL context
 
@melak47 so what does it have?
 
it doesn't even ahve a directx context :p
 
3:34 PM
so what does it have?
 
it has a hwnd
 
epic. and?
 
member functions.
 
what.
I am asking about the application.
 
How do you pronounce "hwnd'?
 
3:35 PM
h-wind
 
you didn't understand at all
 
haych-wind
 
"window handle"
 
@melak47 what's displayed on that window?
 
3:35 PM
I am very eager to post questions , i can't be in this position pls help me @BartekBanachewicz
 
aych-wund
 
@vamsi yes, you can be in this position.
 
hwund
 
@BartekBanachewicz whatever. 3d stuff
 
@melak47 so every pixel of that window is managed by your renderer right?
 
3:36 PM
but the window doesn't own the stuff, the application does. the window doesn't even know about the stuff
 
yes i can be , but i don't want to be :( @BartekBanachewicz
 
oh we're all silly, its clearly howned
 
@melak47 and that's why it propagates the message to the app
 
@BartekBanachewicz it doesn't know about the app, how is it going to do that
 
@melak47 because the app tells the window it's interested in getting info about clicks
i.e. registers the callbacks.
 
3:37 PM
bah humbug
 
@vamsi Seriously, go away or I shall flag for a moderator.
 
@melak47 what.
 
man, it looks strange to not have int or false be keywords.
 
false is not?
 
@BartekBanachewicz I don't want callbacks being called from the WndProc when windows feels like it. what if I'm doing crap while it's mutating crap.
 
3:40 PM
@melak47 it's not "when window feels like it". It's when user clicks the damn mouse
is your app able to tell the user to stop clicking the mouse while it's processing?
 
@BartekBanachewicz nop
 
Wide has nop as a keyword?
 
starting to think that was a mistake.
 
@BartekBanachewicz I'm not going to mutate my world state with the click while idk, I'm drawing that world state
 
@melak47 then don't mutate it T_T. Save that click callback for later use.
put it in the queue or whatever.
 
3:42 PM
you are the one responsible for this , really stackoverflow is becoming so mean that it is not encouraging new programmers, but all the old programmer's who got into this site , asked so dumb questions and got reputation like 100ks or more , what about the new ones who are now getting into the cs, really u wan't to flag for moderator , won't that moderator be seeing your 1919 messages containing the word "fuck" , do whatever you can or downvote me !!
@DeadMG
 
@DeadMG Technical or ickiness reasons?
 
> ickiness reasons
lol
 
@vamsi no, you're responsible for not reading the FAQ and About, and responsible for posting shitty questions
 
@BartekBanachewicz so...in every stupid callback, I'm going to queue up the event to a stupid queue - when I could just be doing that directly without going through the window and stupid callbacks?
 
@vamsi I doubt many people with 100k rep have accumulated that by asking dumb questions.
 
3:43 PM
@melak47 and how is that "directly" again?
 
@BartekBanachewicz send message to thread directly -> bam it's in a queue
 
i can point out many questions @R.MartinhoFernandes
 
@melak47 that way you lose abstraction over the OS
 
if you are putting raw Windows messages to it it's really not much better.
 
3:44 PM
-4
Q: I heard that using STL libraries, because they are basically bullet-proof, is not good for optimization. Is this true? [C++]

user473973I would figure that because so many people use STL libraries, there should be some optimization in them, but I'm not really sure. Thanks!

 
but I don't have to set up 50 callbacks
 
you do have.
 
Most people with 100k+ rep have zillions of answers posted.
 
except in other place
IOW wrong abstraction level again
also it's not 50.
 
no, I only have to write down cases I care about. If I do everything via callbacks in the window class, I'll have to be able to set a callback for everything.
 
3:45 PM
@melak47 well yes, but only in the window class
the code using it only sets the ones it needs.
 
obviously, yes
 
@R.MartinhoFernandes: i agree with your blog , but isn't that even 50 % of my argument is correct ?
 
so you write that once in the window class, and you get good abstraction.
@vamsi no, it's 0% correct
and if you want to add any other OS to that it's dead simple.
I mean sure you can move that to another thread
but then what?
you have to wrap that anyway
 
@BartekBanachewicz how am I going to know what kind of events I want to be callbackable? what if I don't cover all cases? (oh you want to be able to distinguish enter from numpad enter? sorry, no callback for that)
 
@vamsi You can just look at them and see for yourself.
 
3:48 PM
@melak47 then set up "generic event callback"
 
think it as a person with 30 reputation @BartekBanachewicz:do you think this website is really encouraging new programmers ?
 
@vamsi it's encouraging people who can read and want to improve.
I was also downvoted early on.
But that's because what I wrote was bad, not because people are mean.
 
but you have not got banned like me
right ?
 
Apparently I can read better and learn faster.
 
you mean to say i don't
 
3:50 PM
@melak47 so if you are 100% positive you'll fuck up the window class, don't write it at all
@vamsi perhaps. Ban isn't really easy to get.
 
@R.MartinhoFernandes Mostly just ickiness. It functions fine, it just feels wrong. There are no reasons to want to define a variable called false. But there are also no reasons for me to feel compelled to ban it.
 
I mean I won't use that class besides toying, because it's a toy
 
perhaps with 5 downvotes @BartekBanachewicz
 
@vamsi You don't get downvoted for being a new programmer, you get downvoted for asking shitty questions and/or going about asking questions in a shitty way (for example... linkdumping).
 
@vamsi weird, looks a bit too early imho.
meh, go and answer a few yourself and it'll be lifted
 
3:52 PM
135 upvotes :P
 
@vamsi that's not much
 
haha now can you see a bit of my argument , atleast now ?
 
@vamsi 135 upvotes on a question isn't really that much.
 
@vamsi That person has 2k rep, not 100k.
 
not to mention the probability of reputation cap.
 
3:53 PM
1094
Q: How do I remove a Git submodule?

R. Martinho FernandesHow do I remove a Git submodule? And by the way, is there a reason I can't simply do git submodule rm whatever ?

 
Konrad Rudolph, Cambridge, United Kingdom
186k 38 406 655
 
1094 upvotes :P
 
@vamsi and both two top answers are wrong. First should be: Java is just handicapped and don't have normal functions. Second should be: it is convention (like third answer).
 
@R.MartinhoFernandes oh god it's over 1000 already :S
 
@BartekBanachewicz I get 1-2 per day.
Sometimes more.
 
3:54 PM
sick.
 
@vamsi What about this?
 
@BartekBanachewicz I just don't see how it's supposed to work, I have the main message loop and window proc running on a different thread from the application stuff, and what..I get a click, so I call the OnClick callback, which takes the message, and stores it into a generic event queue in the application, which processes it the next frame it runs? or what
 
Hey guys, I have been updating my C++ knowledge to 11 (been away from C++ for a while). I am trying to get my head around the new smart pointer constructs.
 
@KonradRudolph: follow the thread , is this website really not encouraging new programmers is my question and discussion going on ..
 
@R.MartinhoFernandes well you asked that back in 2009, you would have gotten less than 10% of that if you asked it this year
 
3:57 PM
@LeaHayes They're not new, just upgraded. Smart pointers were in C++03 too.
 
@LeaHayes "new smart pointers" ???
you never heard shared_ptr before?
 
Evgeny: I've heard of the boost ones, but never used them
 
Yes, I would mind.
 
lol thought so :D
 
3:59 PM
@melak47 The window itself decides when to get events from OS
 

« first day (997 days earlier)      last day (3952 days later) »