« first day (915 days earlier)      last day (4035 days later) » 

12:00 AM
Because I (funny enough) just found out they work 10 minutes ago :D
 
@Rapptz: Oh, I see. It sounds to me like it is not very well supported though :0
 
It works in Linux and Mac OS X with ancient 4.4 GCC
but MinGW, the port for Windows, had some issues with it.
 
Remember the programming contest I mentioned long time ago? (I'm the Reptinium guy) I just don't know if whatever they use for qualifying this stuff supports that
 
I usually do: std::stringstream ss; ss << yourString; int i; ss >> i;
 
You can use my lexical_cast
template<typename T>
T lexical_cast(const std::string& str) {
    std::stringstream ss(str);
    T result;
    if((ss >> result).fail() || !(ss >> std::ws).eof())
        throw std::bad_cast();
    return result;
}
 
12:02 AM
Ah, basically what I did but with proper error handling
 
Thank you guys. Have some Reptinium.
 
wut
 
That joke wasn't very popular =/
Nvm. Thanks!
I'm picking up C++ and, well, it does grow on you =D
 
C with Classes?
 
@Borgleader well, there's an assignment in one of my classes to make a write-up for a theoritical game. The game does not actually exist. You know what I mean?
 
12:07 AM
Sourceforge is giving me 500 errors.
 
@Crowz Oh well, I'd say in general the dlls you'll find are those of possibly 3rdparty libs (zlib, pnglib, physx, fmod, directx, ...) and possibly your core components (ai, rendering, networking, ...)
 
"Implicit instantiation of undefined template 'std::_1::basic_stringstream<char,std::_1::char_traits<char>, std::_1::allocator<char>>"
 
@Borgleader So like OpenGL would be a third party thing?
 
On line stringstream ss;
What just happened 0.o
 
I don't know.
 
12:11 AM
@Crowz Well yes, because opengl like directx is not developped by the people who make the game, therefore its a 3rd party. likewise in the list of core components i gave earlier theres networking. well maybe your game uses a 3rd party for networking so it would go into both sections
 
XD. I'll take a look later. Cya, and thanks again!
 
excellent, thank you!
 
Aw man. My edit bumped the question to the front page.
 
@Crowz you can check the list of dlls i gave you for starcraft, it sort of mimicks what i told you, fmod is a sound library, theres d3dcompiler somewhere in there also and a few others
also, the size of the game will likely influence the amount of dlls youll have
for a game like pong you might fit everything into the executable because of how simple it is
and for starcraft 2 well, you have a whole bunch of them
 
@Borgleader very very small game. Gomaku made into a game with some graphics and sounds and networking. Nothing special
 
12:16 AM
well you could say have your core exe with the game logic and then have a graphics dll, sound dll, networking dll + 3rdparty libs
is my guess
afaik there are no strict rules on this
 
@Borgleader Ahahaha they actually use several versions of CRT? Terrible
 
@CatPlusPlus I wouldn't be surprised if it was one set for WoL and the other for HotS
 
Ahahahah
Firefox's new engine is 2 major versions away
Dammit
 
if its 2 versions away doesnt that mean you can get nightly builds for it?
 
12:44 AM
@Borgleader what does "afaik" mean?
 
As Far As I Know
 
As far as I know?
 
@Borgleader I don't trust nightly builds
 
why not just say the words?
It's a lot more aesthetic
 
too long to type
 
12:57 AM
tltt
 
People are lazy
I'm all for not using acronyms unless for comedic value
 
A cat says other people are lazy... oh the irony
 
What's happening in here?
 
Absolutely nothing
 
Oh irony, I see
 
1:02 AM
No, really
 
How boring.
Well, lets talk about something, like the fact that I can't sleep.
 
@TonyTheLion You can sleep -- you just don't realize it right now.
 
Hahaha, yeah my body thinks I'm still in California.
But I'm really in the UK again.
 
Mawning
 
Mawning
How is Domagoj?
 
1:05 AM
I have no idea, theoretically, I'm good. But every time I wake up, I feel like a train wreck. You? :D
 
I'm good, I'm just unable to get to sleep
 
How would one explain constructors to someone who's just learning about it?
 
Which is why I've decided to pop into the lounge
Yep jet lag
 
I hate when that happens. Takes a week for me to revert to a normal sleep cycle.
 
1:07 AM
Apparently I can't watch that video on my iPad, meh
 
You really like being on iPad, huh? :D
 
Yeah, the going forward in time is the most annoying
Yeah, I quite like the iPad
Lots of coffee tomorrow at work for me
 
Tony My Lion <3
 
Oh, no time to recuperate?
 
Nope
Didn't want to waste a day of my holiday time on that
 
1:11 AM
Wait what
 
I'll be fine working, I'll prolly recover faster that way
 
how do I stop being bad you guys?
 
What do you mean "being bad"?
 
Xeo
> So when you do something like (+) <$> [1,2,3] <*> [4,5,6], you can think of it as adding together two non-deterministic computations with +, only to produce another non-deterministic computation that's even less sure about its result.
ITT: Insomnia.
 
http://video.nhl.com/videocenter/console?id=240031
Boston Hockey Fans FTW
 
1:26 AM
Hmmm
 
@Crowz Me? Probably pretty poorly. Wait -- I mean really well, of course! :-)
 
1:53 AM
I wish I was made of butter
 
Do you think it is possible, similarely to how you can make keys be pressed without physically being pressed, to fake the controller?
 
did you ask google?
 
Yes.
 
and what did you find?
 
I found a few controller emaluators, but they use OTHER controllers, of which I still don't have. Or, at least, that is what I found looking for an emaluator. For faking the events, I have found nothing. Apparently nobody else has wanted to do it :\
 
2:03 AM
Henry Ziegland thought he had dodged fate. In 1883, he broke off a relationship with his girlfriend who, out of distress, committed suicide. The girl's brother was so enraged that he hunted down Ziegland and shot him. The brother, believing he had killed Ziegland, then turned his gun on himself and took his own life. But Ziegland had not been killed. The bullet, in fact, had only grazed his face and then lodged in a tree. Ziegland surely thought himself a lucky man.
Some years later, however, Ziegland decided to cut down the large tree, which still had the bullet in it. The task seemed so f
 
LOL
 
That reminds me of the death thing.
 
The difference between keyboard and controller state
 
Hm?
 
is that the OS supplies an API for modifying the keyboard state
whereas xinput doesnt from what I could see
 
2:08 AM
I couldn't find it either. This is quite unfortunate.
 
So your "option" for now could be to wrap the XInput API, and add that functionality yourself.
 
Then again... I suppose there are not adequte input methods on a keyboard to really test the parts that are different.
 
it should be too hard
 
In case no one knew this.
 
question. How does Netflix know when the credits are? Does someone manually do that, or is there some algorithm to identify the frame?
 
2:12 AM
Credits of what? A TV show?
 
Yeah
 
I was not aware the credit frames were treated any differently than other frames.
 
I'd guess after the first episode it becomes routine.
 
You know how, when it hits the credits, it has this thing for "next episode playing in 15 seconds..."
 
TV shows are on a strict schedule, its not hard to store this kind of info in a database
the credits are always x seconds long where x varies by series
 
2:13 AM
@Borgleader but down to the second? Netflix seems to do it the moment the credits come on
 
Yeah, usually if every episode is 23 minutes and credits are 35 seconds then you can probably guesstimate around it
 
As I recall star trek episodes would always last the same amount of time and from one week to the next it would only vary by at most 2-3 seconds
 
@Crowz TV shows follow a pretty explicit routine
The only thing they usually vary is actually when the opening will start.
Sometimes they extend it or play it later than usual.
 
Now I'm really impressed with people who make TV shows
 
Not that impressive to me.
 
2:24 AM
2-3 seconds? Even a sentence in dialog would cut it close
 
You could have users report errors and they can fix it too
 
You know google gravity?
 
@Crowz That's why they probably film each cut with a few seconds before and after so they can hone in on the perfect time during editing
im guessing here
they might also have optional camera angles and other stop gaps
 
I think someone manually enters it
or its at least per tv series
its pretty dead on everytime
I mean if someone has to run a video file thorugh a compressor or something to get it on netflix, having them pick a timestamp
is trivial
 
@Borgleader I doubt the usually need much of that. Writers have a pretty fair idea of how long particular dialog should take. As they're writing a show, they split it up into segments, with specific times assigned, so by part-way through a segment, they can signal the actors whether to slow down or speed up a bit to fit. By the time it comes to editing, I doubt they need to do much to get the times correct.
 
2:40 AM
That's highly possible, like I said, I'm just guessing
 
I don't like recursion
and I really hate when teachers have specific parameters to use in methods
 
@JerryCoffin you're a knowledgeable person. do you know a good source of information I could read to help me with designing a the core module system for a multithreaded game engine?
 
3:01 AM
@Borgleader Can't think of anything right off.
 
everything I ask on /r/askscience gets no responses ;_;
 
Ok thank you
 
@Crowz Recursion is often badly taught. It's less about self calling functions than viewing a big problem in terms of smaller ones, until you get something trivial.
 
Like recursing through a tree
 
@JerryCoffin eh, I always think of it as putting stuff on a function stack until a base case is reached, then you can pop everything off the stack one at a time until you get to your bottom piece
it animates kind of oddly in my mind, building a big stack then it coming back down. Seems counter-intuitive.
 
3:05 AM
in that question: stackoverflow.com/questions/16072486/… MIke Seymour tells me something strange, that I have never read about, that I am sure, because it is contrary to 99%anything I have done as for std::map, std::list and and std::vector for the past 7 years ( because sometimes i do std::vector<int> simply)...
he says: "(raw) pointers in lists are a bad idea unless you've got some other data structure to manage the objects themselves."
except using shared_ptr to manage their memory I don't even grasp what he means.
 
@Crowz That, IMO, is the problem. You're thinking of the mechanism, not the problem.
 
I suppose, I think in Merge sort thinking of the problem is a little easier
 
It's like fibonacci
thats a recursive problem
 
super easy one too
 
@Borgleader ...but one that should almost never be solved recursively.
 
3:08 AM
@JerryCoffin what about recursive with memoization?
 
@JerryCoffin Sure, but it's 1 line of code done recursively
 
@Crowz only when/if you just want to demo memoization.
 
@Borgleader one line? Isn't it 3?
 
@Borgleader ...and still trivial iteratively.
 
@JerryCoffin but more natural recursively
 
3:10 AM
if(n==0) return 1;
if(n==1) return 1;
return fib(n-1)+fib(n-2);
 
@Borgleader not universally so.
 
user1357851
if((n ==0) || (n==1)) return 1; return fib(n-1)+fib(n-2);
 
user1357851
1 line
 
@Crowz Shittiest recursive function.
 
Hello, Cold World
 
3:11 AM
Towers of hanoi is up there too.
 
user1357851
code world?
 
@Rapptz It has its pros and cons
 
No, it has 0 pros and tons of cons.
 
0 pros? really?
 
Name one.
 
3:12 AM
I can name at least two: it's short and clear.
 
Anyone who knows the mathematical definition can easily see that it will produce the correct results.
 
ooo someone's using fancy C++
 
@Code-Guru Anyone who knows the mathematical definition can also make it more efficient.
 
sure
 
3:13 AM
Recursive functions like that are crappy, just like the factorial recursive function and towers of hanoi.
 
you said to name a pro...so I went overboard and named three ;-)
 
You repeated the same one three times.
 
recursion is good for ray tracing
 
variations of the same one, yes
 
user1357851
if((n ==0) || (n==1))? return 1 : return fib(n-1)+fib(n-2);
 
user1357851
3:15 AM
ITT how many statements can you fit into 1 line ...
 
@Telkitty Why the if and the ternary operator?
 
user1357851
forgot syntax, don't use if this way often
 
@Telkitty you have redundant operators
 
@Telkitty return n<2 ? 1 : fib(n-1) + f(n-2);. Still crappy though.
 
3:18 AM
That's close to what I did
why is it crappy?
 
user1357851
what if n < 0?
 
@Telkitty unsigned n;
 
@Borgleader Step through the calculation of fib(5) and count how many times it calls fib(1) and fib(0).
 
@Code-Guru I know that, I'm talking about in terms of recursive implementations why is this one crappy
 
@Borgleader Exactly because it calculates the same value many times.
Of course, I don't know of a better recursive implementation off the top of my head. All the optimizations I'm familiar with are iterative.
 
user1357851
3:22 AM
Wannabe really fast? Have a hash (lookup) table;
 
@Code-Guru TMP would help a bit.
 
user1357851
speed is usually the trade off for memory usage ... unless you are a really sucky programmer
 
@Rapptz unless the variable is only known at runtim
 
If you're seriously using the recursive implementation then you should expect it to be bad
:S
 
Hehehe
 
3:27 AM
I feel like switching over to snake_case and shit.
 
why?
thisCase is theBestCase
 
user1357851
Okay here is my today's wimp question: Hashtable (or Hashmap) and a huge case statement, which one is faster (consider both are well written).
 
@Borgleader Yeah same here but certain things are starting to look weird.
i.e. sizeType vs size_type
 
@Rapptz yah...I'm not all that familiar with TMP. I assume a recursive template simply pushes the computation to compile time rather than run time. The algorithm is still pretty terrible.
 
LikeWhat?
 
3:31 AM
and my classes are all uppercase but my namespaces are lowercase so it looks like gears::Parser and that looks wrong..
 
i dont see a problem
 
I don't know who I am anymore.
 
I don't know who you are, either.
 
@Borgleader All C++ classes are lowercase!
vector vs Vector, thread vs Thread
 
I prefer my types with capital letters
 
3:35 AM
do you do using Vector = vector<T>
 
user1357851
You could be some skinny Negeria scammer & some 60+ year old fat white lady pay you $11 a day to provide her some personal services
 
no. i always keep the std:: first, that helps me distinguish between standard types and mine
its a personal preference
 
gnite all
 
3:53 AM
Hello C++ !
@Code-Guru Hola!
 
user1357851
Aren't you a java/android guy? :p
 
Hey, yeah. But I think you seem to be too these days, don't you?
 
@Rapptz I used capitalized for (most) template parameters, but otherwise, yeah, all lower case.
 
All my classes are uppercase, my namespaces are lowercase, headers are (usually) lowercase, names are in thisCase
 
what about your member variables?
 
4:03 AM
falls under names (identifiers) so thisCase
 
oh you dont have special rules for them?
I add _ at the end
 
nope
 
hai scott
 
user1357851
@ScottW heyo, what's this:
 
user1357851
17 hours ago, by Zoidberg
user image
 
4:40 AM
OMG! You people are so crazy about taunting that java sucks statement. @ScottW And I feel sorry for the rejection of your proposal ;(
 
Zoidberg loves no one but himself
"I have to love someone" "Why not zoidberg?"
 
@ScottW A doubt you people might be of same gender. That is why he doesn't love you guys. Lol..
 
I'm watching Fringe on Netflix
This series is great :)
 
user1357851
4:59 AM
@Appu you are not getting it, in this room, every regular is emotionally bound to any other regular, they just don't want to admit it
 
@Telkitty Great people and so the great room :)
 
She's projecting, she's the one who loves us all
 
@Borgleader The series start great, but it degrades over time. Later seasons seems like the power of love is driving the universe.
I specially love how they some times interchange the planet, with the galaxy, and the universe.
 
The power of love is driving this room, so it makes sense
No spoilers please :)
 
user1357851
"emotionally bound" could mean many things: love, hate, annoyance, anger, attachment etc etc
 
5:07 AM
I still have to watch the season that is just coming out.
And yeah, do not worry, no spoilers. :P
 
I saw Leonard Nemoy not too long ago in the episodes, I was happy
 
Well shit.
 
Accidental I hope =/
 
Yes it probably is
 
It is impressive that it seems like a fragment went directly to the car.
 
user1357851
5:12 AM
Yeah I agree, Fringe started nice, but it deteriorated somewhere between season 4 & 5. I literally could not go through with the first 2 episodes of season 5, so I stopped watching
 
Ah so youre no longer a FringeKitteh
(I'm on season 2 atm)
 
Anyone had luck with lambdas in sigc?
I ended up with some VERY ugly code to get it to work
 
pastebin it, ideone it, but plz dont onebox it
 
Anyone know WHY such strange templating actually works here?
Got late at night, was tired, and was just trying to get sigc to work with lambdas
So, finally wrote this one line of code, that got the whole thing to work. No clue WHY it works though (there's another parameter after a variadic template parameter, why's that work?)
template<typename returntype,typename... args,typename functor>
 
Why couldn't you just use std::function?
 
5:21 AM
sigc doesn't take an std::function
I was trying to bind a lambda to a window destroy event
Using gtkmm
 
what does sigc take?
 
you can use std::function::target to get the function pointer iirc.
 
wont there be implicit conversion?
 
Lambdas don't have regular function pointers to my understanding
No, it wasn't working
 
lambda -> std::function -> std::function::target ?
 
5:22 AM
Oh you're asking why lambdas don't bind to a function?
 
This should be trivia for some of you guys...
 
Anyone know how std::function actually works?
How does the return type inferencing work?
 
std::function<Return(Params...)> ?
 
Yes
How does it infer the return type for operator()(Params...)?
 
5:29 AM
It's a template parameter (return_type) i.e. std::function<T(Args...)> is the same as T func(Args...). Unless I don't follow :S
 
@IDWMaster There is no inference.
 
Hi guys
someone with experience of POCO C++ libraries?
I need to use a cache as described in this post. But just like the poster, I dont fully understand the syntax of the cache strategy. Please enlighten us :P
 
Link dumping is not appreciated here
 
Oh Sorry! :/
 
I feel nooby for never hearing about it before
but it looks okay. Well I only saw the Types slide..
 
6:00 AM
@EtiennedeMartel You'll never corrupt me. =[
NEVER!
 
:( answer got accepted then unaccepted.
 
Lol
Get owned. <3
 
Happened to me too a few times
 
@ThePhD :(
 
15
Q: Zoidberg curve, can't reach "zoidberg" solution

Ander BiguriI am trying to plot the Zoidberg curve in Matlab just for fun. I just copied the equation shown there and defined the sgn and theta functions but I can't achieve the Zoidberg plot, instead I got this: but I should have gotten this: Here is my code: sgn function: function result=sgn(in) i...

^^ wtf is this? :) /cc @Zoidberg
 
6:09 AM
flagged that answer
wth
 
I like it.
 
0
A: Zoidberg curve, can't reach "zoidberg" solution

GalaxyI'm not member of stackorflow. May I have your email for question?I need your help as soon as possible

I meant that one ^
 
user1357851
best pick up line ever: I'm not member of stackorflow. May I have your email for question?I need your help as soon as possible
 
Thats a pickup line?
More like "I'm desperate" line
 
user1357851
On most other questions, yes. On that particular question? I don't think so ...
 
6:17 AM
Damn, those Selkaths are really ugly and unpleasant. The Sith should've bombed Manaan instead of Taris.
 
lololol
Is that the water planet?
 
General hint: you would have found far superior answers if you had specified your actual problem (what you are trying to achieve). The way you are going about it now, has the classical signs of a suboptimal approach, but... we can't tell: XY problemsehe 14 secs ago
 
@Borgleader Yup, I can't believe how pretty it looks after 10 years.
 
^ my reaction in a nutshell
 
6:35 AM
lol
 
2
A: Poor performance of vector<bool> in 64-bit target with VS2012

James McNellisstd::vector<bool> is not directly at fault here. The performance difference is ultimately caused by your use of the signed 32-bit int type in your loops and some rather poor register allocation by the compiler. Consider, for example, your innermost loop: for (int j = i*i; j <= n; j += i) i...

^^ I think that deserves some more points.
 
I gave a +1, it's interesting so far.
 
@DomagojPandža Oh btw, do you by any chance have interesting articles for me to read on multi threading engines? I've found a few articles on gamasutra and a video from intel (which was really too high level to be useful) but thats it =/
 
@Borgleader Nope, data on game development and game middleware development has always been scarce, if not non-existent. :D
 
And yeah it's a beautiful planet, it reminds me of Kamino
 
6:43 AM
Truth in advertising ^
 
Theyre both dreaming about being fabulous
 
I had at least 3 moments throughout the answer where I wanted to upvote. Sadly, not all of them appear to have worked :) — sehe 7 secs ago
 
Xeo
Hmm... TIL ZipList in Haskell ... @FredOverflow: Shouldn't the Haskell Fizzbuzz be rewritable with that?
 
@sehe Just saw that. :)
 
Xeo
6:49 AM
@NicolBolas I swear to infinite monkeys, that there exist 1000 numbers, which would produce same hash, for smartest hash-function alive. — Ajeet 4 mins ago
> smartest hash-function alive
 
@Xeo lol
Which is true though - for any fixed-length hash function.
 
How is that a question?
 
Xeo
It's not, that's why my comment below that
 
Should I.. vote to close as NARQ? I don't know.
 
Xeo
@Mysticial Would the "smartest hash-function alive" use fixed-length integers? :P
 
6:52 AM
:)
 
@Xeo I used to think I know the obvious differences in Java between hashSet and hashMap, until I went through all the answers and I discovered hashset is synchronized in Java, so while it is by default synchronized, it is probably slower compared to map for small number of elements. I am just looking for "Did I miss anything I should have known ??" — Ajeet 58 secs ago
 
@Rapptz It actually isn't necessary to VTC bad questions like this. If someone can answer it, let them. If it goes unanswered and unupvoted, it eventually gets auto-deleted by the periodic cleanup script.
 
Xeo
Wait, periodic cleanup script?
 
eh?
 
70
Q: Auto-deleting old, unanswered zero-score questions after a year?

Jeff AtwoodRelated to meta.su efforts: Old unanswered inactive questions with low views/votes and meta.sf efforts: Cleaning house, really old, unloved questions We already auto-remove negatively voted unanswered old questions automatically after 30 days, network wide, with no human intervention required...

 
6:55 AM
Yeah well, it has 2 upvotes so that renders that useless.
 
Xeo
Downvote it if you think it's a bad question
 
I don't. I actually don't have an opinion on the matter.
 
user1182183
d24w6bsrhbeh9d.cloudfront.net/photo/7083781_460s.jpg I seriously don't understand why that is on the front page, I'm sure you can get hundreds of errors on one line..
 
@Xeo lol
 
user1357851
@Rapptz LOL, maybe you should go and have kids, this is the Nth time you posted an image of a baby & call it cute
 
6:57 AM
Well excuse me for finding things cute.
 
user1357851
I am only tellking you what it usually means from a subconcious point of view :p
 
user1182183
@Telkitty seriously we don't need any more idiots in this world.... @Rapptz JK :P
 
Well, I've passed the CPPQUIZ. Do I get a cookie or something?
 
Yes
 
I did too! <3
I want my cookie! <3
 

« first day (915 days earlier)      last day (4035 days later) »