« first day (967 days earlier)      last day (3987 days later) » 

12:51 AM
#pragma once
#include <Windows.h>
#include <string>

// TODO: reference additional headers your program requires here
void AttemptShutdown();
void Initialize_RPC();
static HDESK m_desktop;
string sha256();
Why do I get "missing type specifier" on sha256()?
 
std::string not just string
its declared inside the std namespace
 
Ah, right. Missed that one, thanks
 
ewwww your global variable embarasses me
also I doubt that you meant every TU that includes the header to have it's own global
 
C++ N00B WARNING
 
1:22 AM
@DeadMG I was thinking of starting to work on "support" systems for my engine. And through reading on the subject of Engines I've come to the conclusion that Reflection was pretty darn useful. Have you ever attempted that in C++ before?
oh hai @JerryCoffin
 
@Borgleader Hello.
 
how've you been?
 
user142019
Praise the paracetamol!
 
user142019
I can eat a truck full of paracetamol.
 
@Borgleader The core issue with reflection is how to generate the metadata.
 
1:30 AM
Well I found this, but I'm not completely sold on his approach
 
user142019
Use a language that offers reflection if you want reflection.
 
@Borgleader Friends of my wife's visiting from the Philippines. Took them to the top of Pikes Peak on the cog railway. Then a short tour of the Broadmoor. Now too tired to think straight (and my gout has been acting up, so my left foot hurts).
 
user142019
Such as C#, Go or Python.
 
@JerryCoffin That sounds like the perfect time for an alcoholic beverage of some kind..
@rightfold I can't believe you, of all people, would recommend using an existing solution instead of rolling off your own.
 
@EtiennedeMartel Would be, but for one minor detail: alcohol makes gout even worse.
 
user142019
1:32 AM
@EtiennedeMartel If I can suggest anything that isn't C++, I suggest it.
 
@EtiennedeMartel Our little boy is growing up!
 
user142019
With the sole exception of Java.
 
@JerryCoffin No, he's just compensating for Cat's absence by crapping even more on C++.
 
user142019
> of all ponies
 
@JerryCoffin Oh cool that sounds like a nice trip :)
 
user142019
1:32 AM
Did you say that or did you say "of all people"?
 
@rightfold In that case you're banished for (even accidentally) hinting that you could suggest PHP.
 
@rightfold Its a game engine, in C++. So no, I'm not gonna use C# or Python or wtv else
 
@rightfold Of all people. Because I know you're not a pony.
 
user142019
13 hours ago, by rightfold
PHP > C++
 
user142019
@EtiennedeMartel Damn, I still don't know.
 
1:34 AM
@rightfold As I said, banished (for idiocy, in case that wasn't obvious).
 
user142019
Ponify is hilarious.
 
@rightfold Shine on, you crazy diamond.
 
user142019
Shine on you, crazy diamond.
 
@rightfold I said the human version.
 
@Borgleader It was, AAMOF.
 
1:34 AM
@rightfold My comma placement was deliberate.
 
user142019
So was mine.
 
user142019
SO was Jeff's.
 
1:48 AM
is saying "true facts" a tautology?
 
@Crowz Yes.
 
2:28 AM
@EtiennedeMartel are you watching WCS?
 
@Borgleader No, I'm playing LoL
 
Oh cool. Speaking of LoL. I bought Foxfire Ahri (skin) and Sejuani yesterday. They were on sale.
 
3:05 AM
Hey hey
Yuck I see people are talking about LoL XD
Is this not allowed? cout << "That also happens to be : " << x * 2.54 << end;
 
endl not end
 
derp
I'm tired been playing civ 5 non stop the last 2 days lol
About to take my old lady out to go get the new Animal Crossing
 
lrn2readcompilermessages
 
no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)
Was the error message ><
 
Well yeah, you have << operators, and one of those has something wrong on the rights side
which means it can't be cout and clearly the text isnt the issue, that leaves either x * 2.54 or end
 
3:13 AM
Ah I didn't see the end thats why I thought it was the x * 2.54
 
@Borgleader Meh, skins.
 
@EtiennedeMartel But but... Foxfire!!!!! <3<3<3<3<3 I have very few skins. I got 2 for free (you can barely tell theyre skins tbh) and then I got Guquin Sona and Foxfire Ahri. Oh and best of all: Pulsefire Ezreal :D
 
@Borgleader You mean tits?
 
Ezreal doesnt have tits
 
Indeed.
 
3:15 AM
I do play Miss Bewbs (Sona) a lot though
 
But both Ahri and Sona do.
@Borgleader That nickname applies to most female non-Yordle characters.
 
LoL has such a toxic comunity.
 
To be fair, almost all female champions in LoL have huge racks
 
Because their made by men lol
 
*they're
 
3:16 AM
@user2442335 It's getting better and better, thanks to the whole Tribunal system.
 
meh
I hated how everyone on LoL thought they were better than they really were
 
@user2442335 Everyone.
No hyperbole there.
 
and acted like every game was so important, if they were so good why were they playing random pugs.
 
@Borgleader Anyway, just played Brand for the first time. I like it. He has quite the insane combo.
 
std::tribunal tribunal;
tribunal << offensive_player;
tribunal >> tolerable_player;
 
3:18 AM
@user2442335 You seem to be talking about the vocal minority.
 
Maybe I'm just bad luck.
Because it's the reason I quit playing.
 
@EtiennedeMartel lol yeah. But so do a few other champions. Malzahar comes to mind
 
My favorite champion is currently Malphite.
The tank that kills shit.
 
All online games have piss poor communities now.
 
@user2442335 All.
Again, no hyperbole.
 
3:20 AM
Name one game then!
 
StarCraft 2.
 
Never played it.
I just got done with Neverwinter Online.
Wow what a train wreck.
 
Never had trouble with any player in Guild Wars 2
 
I'm sensing you have very high expectations.
 
Maybe so, but it's just that the developers don't care.
 
3:21 AM
@user2442335 Maybe you're just anti-social.
 
Nah, I like meeting friends online.
Just the game was broken
And exploiters were running the show
 
It's a F2P MMO that was rushed to release. What did you expect?
 
and it's suppose to be an "open beta" but it's really not. It was an excuse to rush out an incomplete game and to fall back on.
 
@EtiennedeMartel Better than Final Fantasy 14, at least Neverwinter was F2P :P
 
every week was a new exploit with nothing done to remedy the influx of new duplicate goods.
@Borgleader You going to play the new 14?
 
3:23 AM
A guy at work pays for Neverwinter.
Like, he buys random shit.
 
Poor guy
 
He never was very smart with his money.
 
It's a decent game.
 
@user2442335 Unless it gets stellar reviews, no.
 
just plagued with PWI grubby paws.
 
3:24 AM
He once spent a hundred bucks for a sword in Maple Story.
 
WHAT?!
 
@Borgleader It's free if you already bought it. So you can at least try it.
I hate people who think f2p is really free ><
 
I haven't. I was going to but then I watched reviews and changed my mind.
 
LoL is a good f2p system
 
I guess freemium is a better term
 
3:25 AM
Yeah
But Neverwinter is Pay to win.
 
Thats the case in a lot of freemium games
 
They swore it wasn't going to be.
 
Most of them do
 
After they had the 200 dollar founders pack announced
 
@user2442335 It's never pay to win until the suits tell the designers how to do their job.
 
3:26 AM
They were like Don't worry it's not p2w guys
Yeah dude Perfect World really smeared their crap all over this one.
I hate that company so bad, they make all these shot gun MMOs and then just abandon them for the next one.
My idiot "friend" bought the 200 dollar founders pack lol
 
Are those the same guys that ruined the Star Trek MMO?
 
Didn't even play the game for a month.
Yes
They bought cryptic
 
I was really down for that game until I played the beta. Saved me 60$
 
haha
You gonna play Wildstar?
That game looks neat :)
 
Wildstar? Haven't heard of it. I'm looking into Star Citizen. I'm sad it's still more than a year out.
 
3:34 AM
Looks like Eve
I'm trying to play Eve with friends right now but i can't get into it.
 
Looks better than Eve tbh
As for Wildstar, it looks like the offspring of WoW and Borderlands
 
Ah maybe the visuals but the game play seems neat
I do love me some WoW and Borderlands though...
 
Yeah I meant WoWs visuals meets Borderlands humor
 
lol meat
I saw that edit :P
 
Cant hide it, pencil icon shows ive edited my message
 
3:46 AM
almost midnight, almost time to get the new Animal Crossing!
 
4:01 AM
And now for some McDonalds.
 
 
1 hour later…
5:02 AM
user image
3
 
 
2 hours later…
Xeo
6:58 AM
-1
Q: what kind of language feature is suitable for similar functions with only several different lines?

changhao yanI have a programming problem and I thought it for several days, but still without good solutions. There are several big, long and similar functions, in which only several lines are different. For example: void bigfunc(){ //blabla.. int i, j, k; //only this part is diffe...

...
 
Why is there a pure C answer on a C++ question? — Etienne de Martel 7 secs ago
 
Because the OP's shitty question has a lot of languages.
Haskell, C++, D.. shit man.
Pick one.
 
Xeo
Also, damn, I could swear I wrote an answer on how partial ordering works. Can't find it, though...
 
I'm Learning C the Hard Way, and am working on use of valgrind. Problem is, it's "mostly broken" on OSX 10.8. Should I not worry about it, or is there an alternate I can use until I get my Linux back?
 
Xeo
7:22 AM
" The traditional and error-prone way is to do this manually." -- Have you ever written any C++ code? — Xeo 8 secs ago
Sometimes, the amount of bullshit in answers is unbelievable.
 
7:48 AM
@Xeo Hey there. What would be your preferred technique for writing 'try ADL first, otherwise defer to some fallback' functions? E.g. std::begin (nevermind the array overload, not relevant here).
 
Xeo
@LucDanton: I actually used std::bind like that for our server-side command handling.
@LucDanton Any reason not to include the fallback in the ADL? Or are we talking different names too?
 
Oh, bad example here. I meant writing an adl::begin in the first place I suppose.
@Xeo The fallback of std::begin is calling a member.
 
Xeo
Anyways... ranked_overload([]foo, fallback); :D
Joking aside, no idea right now, and I'll be gone for the rest of the day in a few minutes (D&D time again)
 
Xeo
And man, I really need to think about what to do with lifting-lambda invocations and not having a catch-all template.
 
Xeo
8:08 AM
Alright, see ya tomorrow.
 
user142019
9:01 AM
hi
 
user142019
gut
 
Will func never be called - while (1 || func()) ?
@ScottW Why...? And BTW, will func be called or not?
@ScottW Also, if (1 || func())
 
user142019
@ShuklaSannidhya No, of course not.
 
Is this implementation dependent or it will be so on all compilers?
 
user142019
Short-circuiting is required.
 
user142019
9:12 AM
It's not implementation-defined.
 
user142019
That would be the most retarded thing in the universe.
 
@rightfold Thank you. ♥
 
user142019
@ScottW me too
 
user142019
Hi @KonradRudolph.
 
user142019
 
@ScottW Don't forget your neef.
13 hours ago, by Tom W
user image
 
9:28 AM
@rightfold Is it legal to increment argc and argv?
 
mawning
 
@TonyTheLion
 
9:56 AM
@ShuklaSannidhya I'd say yes because they're arguments of main and only main can see them, but why would you do that?
 
@Tuntuni I want to loop through argv. Don't want to use array indexes...
 
While reading an article I've spotted such a weird thing:

{
std::unique_lock<std::mutex> locker(g_lockprint);
std::cout << "[worker " << id << "]\trunning..." << std::endl;
}
why do they acquire a lock before cout'ing?
 
@ShuklaSannidhya Well I guess you could but then you won't be able to use argv again.
 
user142019
@zerkms if two threads use std::cout at the same time, you're screwed.
 
9:58 AM
is that because multiple threads may output simultaneously and mix the output?
 
@zerkms Never used locks in practice but from what I've read, if multiple threads are using a stream there is a possibility of corrupting it.
No guarantee in which order the characters come in.
 
yep, makes sense. thanks
 
that awkward moment when your girlfriend accidentally posts the wrong link in the chat window and it’s about dicks
 
user142019
She was finding out whether all dicks are that small.
 
Dat moment when your girlfriend is looking at dicks other than your own.
Ohhhh SNAAPPP
 
9:59 AM
(well it was a Cell paper about duck penis evolution … but still ^^)
 
:P. Lawl duck penis.
 
@rightfold The answer is yes ;)
 
@KonradRudolph I just stumbled upon your answer on std::cin.ingore. Could you tell me how I would solve this? When I press c in my main window the console activates and I can enter commands. I enter the command, console deactivates and the main window is running again. Now, If I enter something into the console while it isn't active (won't be displayed), next time when I activate it those characters I entered while it wasn't active will be input.
How would I ignore them?
I used numeric_limits<streamsize>::max() but it just keeps ignoring forever.
 
@Tuntuni You can’t use C++ streams for that – they are streams, not synchronous interactive input readers – you need a library such as the Posix readline instead
 
@KonradRudolph Can't I somehow ignore all the characters on the beginning of the console loop?
To get a clean start.
 
10:06 AM
@Tuntuni Yes, that you can do, and cin.ignore(std::numeric_limits<streamsize>::max()) does work there
it doesn’t keep ignoring forever, only until the next \n is pressed
 
Well I'm pressing \n but it doesn't want to stop ignoring.
 
Oh, yes, you need to specify that it should stop at '\n'
 
some one showed me a really good online C++ compiler any one know of one?
 
cin.ignore(numeric_limits<streamsize>::max(), '\n');
 
It did C++11
 
@KonradRudolph Yup tried that right now but then, if I don't enter anything, I have to press enter in order for the console to accept input.
 
@Tuntuni Yes, of course – you’re explicitly telling your program that you want that
 
@KonradRudolph Ah.
 
@KonradRudolph wow even better :D
 
@KonradRudolph Does std::getline consume the \n?
 
10:17 AM
yes
okay, getting breakfast
 
0
Q: Fade effects in Ubuntu

JohnIs there any application that is able to fade in/out the whole screen in Ubuntu? Also I would like to access it from terminal like bellow: app-name screen-fade-out or app-name screen-fade-in Related to this question.

Can be released an application that does this in C++?
 
@Tuntuni Try looping getchar()
 
Linking console executable: F:\Untitled1.exe
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings
 
@true What for?
 
10:23 AM
"Does std::getline consume the \n?" It looks to me like he is trying to read input without pressing ENTER, must be a mistake ^^
 
user142019
I'm back.
 
Ell
Me too
 
user142019
> cplusplus.com
 
user142019
That's a bad terrible website. Don't use it.
 
user142019
 
10:29 AM
Well the problem is solved for commands that have number arguments - since I'm using cin's operator<< for those, the \n is left in the stream and automatically picked up by ignore. But, for example, command "exit" doesn't require any input so the \n was already consumed by std::getline which makes ignore block until I press \n. Doing std::cin.putback('\n') for the "exit " command does the trick.
 
Is return type needed for main ?
 
Ell
int
yes it is required
 
user142019
C++ sucks at I/O.
 
lel
 
@Ell Why? GCC doesn't warn...
 
Ell
10:33 AM
@ShuklaSannidhya okay, then no
 
Lol
 
Ell
I don't know why it isn't needed. I don't know why you wouldn't write it
 
I think only C++ requires it to be int.
C allows it to be void, right?
 
@Ell What's the standard?
 
user142019
GCC implicitly uses int if you don't specify a return type
 
user142019
10:35 AM
because it's a piece of shit.
 
user142019
Use -Wall -Wextra -Werror -pedantic-errors.
 
85
Q: What should main() return in C/C++?

JoelWhat way is the most efficient way and why? int main() or void main()? if int main() then return 1 or return 0?

 
Ell
@ShuklaSannidhya I don't know. Do you have a copy of it?
 
user142019
@Tuntuni No.
 
user142019
It must be int.
 
10:35 AM
Wat. I've seen void main() all over the place in C and then compiler never warned.
Could it be the settings?
 
user142019
54 secs ago, by rightfold
Use -Wall -Wextra -Werror -pedantic-errors.
 
> GCC
Ain't nobody got time for that.
 
10:46 AM
Would it be bad if I used C's I/O and C++'s file I/O?
Meh, fuck it, I'll just limit the number of chars the user can enter. GG.
 
user142019
Use Haskell's I/O.
 
user142019
Or Python's.
 
If only I could. :p
Yay, got it.
 
user142019
Embed Python.
 
variadic templates increase code size.
Luckily, I don't give a shit in debug mode.
 
user142019
11:00 AM
BLOAT
 
the starboard is fulll of funnies
I mean Full.
 
I like the one about SO questions.
Question edited by "Grammar Nazi". ahaha
 
@rubenvb So does pretty much everything else.
 
user142019
 
11:16 AM
user image
2
lol
 
user142019
I have to make a portfolio.
 
user142019
But I have nothing to put into it.
 
user142019
Since I never finish everything.
 
Ell
@rightfold Of experience?
 
user142019
Yes stuff you've made.
 
Ell
11:17 AM
@rightfold Then let's work on something together! <3
How about postduif + webclient
 
user142019
It has to be done for tomorrow.
 
Ell
we best get started then.
 
user142019
I have that 3D WebGL Moon I made.
 
Ell
Nah, I kid. I have exam tomorrow anyway
 
I don't have a portfolio either
 
11:18 AM
@Ell Same here. Which subject?
 
still got a job
 
Ell
Nor I. I need one
@Tuntuni Further maths. The exam is further pure 1
 
user142019
Pastebin widget for OS X.
 
@Ell Math here too.
 
are the C++Now 2013 presentations public yet?
 
Ell
11:19 AM
@Tuntuni Which one? I forget if you are Uk or not. And exam board
 
@TonyTheLion hello, do u know how capture key event if program is not focused? MFC
 
Ell
@Klasik hooks
Keyboard hooks.
 
@Ell Not UK. Erm, rotating geometric bodies.
 
Ell
@Tuntuni Ahh right. I don't know anything about that :P Mine is complex numbers, matrices (I guess transformations could be rotation :L), induction and other little bits
 
@Ell Are you practicing right now or fooling around? :D
 
Ell
11:22 AM
@Tuntuni Practising right now :P
Got a paper in front of me
But I just got back from a party
 
@Ell Haha same here. Just started, though. You could say I was also having a party - with OpenGL. YEEAAAAAAAAHHHH
 
Ell
@Tuntuni what opengl thing are you working on?
 
@Ell I started matrix transformations with the help of glm last night. Quite interesting.
 
Ell
And also, this exam is fucking hard :(
 
Are glRotate, glScale, etc. deprecated?
 
Ell
11:26 AM
I am going to fail for sure.
@Tuntuni yes
 
And glMatrixMode?
 
Ell
@Tuntuni If it's not in the reference (opengl.org/sdk/docs/man), it's deprecated
I have it open at all times, it is essential
 
@Ell Thanks, will remember that. :)
So now, we're on our own when it comes to transformations?
We have to manually multiply the matrices, etc.?
 
Ell
well. You can still multiply matrices in glsl shaders
 
I have 3 uniforms in the shader. The model, view and projection matrices and I update them from the code where I apply translation, rotation and scaling.
I just started though. I'm planning on making a game over summer.
 
Ell
11:29 AM
eg you can have two mat4s projectionMatrix and viewMatrix then do output_vert = input * projectionMatrix * viewMatrix or whatever
 
1 week of school left.
@Ell mhm
 
Ell
Yeah that's right, what you said
I'm pretty tired atm, I haven't slept in 24 hours haha
But yeah, on the cpu use glm for matrix calculations, for the gpu you can do it in the shaders
 
Lol.
 
Ell
brb, washing :P
 
@Ell Got it. :)
Haha ok
 
11:31 AM
do I need use dll to get keyboard hook?
 
lots of work happening here, as always
hmm optionparser.h++ or my own crap which is already written.
 

« first day (967 days earlier)      last day (3987 days later) »