« first day (383 days earlier)      last day (4581 days later) » 
00:00 - 17:0017:00 - 23:00

5:00 PM
Multiplayer RTSes run deterministic simulations.
 
yup
 
@DeadMG if they can do it, you can do it easier in C++
 
14 mins ago, by Praetorian
Any of you guys familiar with boost spirit?
Stop ignoring me, dammit! :) I just need some quick advice if learning how to use it would be beneficial for parsing a file I have
 
Do you want everyone to say "no"?
 
5:09 PM
never used it
 
I know some basics.
 
@CatPlusPlus ok, cool, maybe you can help me then
 
no ideas
 
date Tue Nov 1 08:23:48 am 2011
base hex  timestamps absolute
no internal events logged
// version 7.6.0
   0.004398 1  248             Rx   d 8 00 03 00 00 04 00 03 00  Length = 240000 BitCount = 124
   0.004660 2  209             Rx   d 8 88 7D E7 7D 79 7D 80 7D  Length = 226000 BitCount = 117
   0.004862 2  20C             Rx   d 6 80 7D 88 7D 2A 03  Length = 194000 BitCount = 101
   0.005060 2  20B             Rx   d 6 79 7D E7 7D 52 03  Length = 190000 BitCount = 99
   0.005303 2  20D             Rx   d 8 25 7D 7D 00 00 00 80 7D  Length = 234000 BitCount = 121
That' what the file looks like, and I need to decode all those hex byte values, and retain values of some of the other fields as well
so, would it be better / easier / more maintainable to use Spirit or just do it manually?
 
Dunno.
 
5:14 PM
oh well, thanks anyway
 
wow! it's five o'clock! time to start heading home me thinks
 
It probably won't need much more than 'skip 5 things', 'read number', 'read N things'.
 
Ok, so the grammar would be really simple then
 
does std::hex affect input streams?
would appear so
which makes reading even easier :)
 
eh, it should be simple enough to parse them without Spirit
 
5:24 PM
Hello :)
 
double d; is >> d; int i; is >> i; unsigned int hex; is >> hex; std::string s; is >> s; is >> s; while(is >> hex) { // process hex }
 
@DeadMG especially since I'm not at all familiar with EBNF notation that would be a lot simpler
 
anybody know some good software or library for creating a windows installer for your app?
 
nsis?
installshield?
wise?
 
are they free?
 
5:27 PM
nsis is
 
@IntermediateHacker WiX, that's free too
 
thanks, secondly how do u set file associations ?
e.g I want all pdf files to open with my app?
 
IS sucked, AFAIR.
 
I believe all of the mentioned installer frameworks provide such a feature.
 
you'd have to do it with Windows API
 
5:28 PM
@IntermediateHacker you can do it using a reg file, add some lines to the registry
 
any tutorial or documentation? on the reg. file or win api?
 
MSDN probably has a sample
 
SO probably has a question on it
 
in case u r wondering why I am so eager, it's the first time I've ever created a software which is actually usable enough to be released to the general public.
 
5:31 PM
what have you created?
 
earlier I just made in-house tools for my own convenience.
 
@IntermediateHacker There are several examples here
 
@DeadMG I am creating a pdf converter
 
PDF to what?
 
The Default Programs API is the stuff recommended nowadays.
@IntermediateHacker I don't want my PDFs to open on a PDF converter by default. I want them to open on a PDF viewer.
 
5:32 PM
for now , Pdf to text and pdf to images
@RMartinhoFernandes In that case how do u add "convert..." to the context menu?
@Praetorian thanks for the link.
 
@IntermediateHacker Using Shortcut Menu Handlers maybe?
 
thanks again. :)
by the way , are there actually any psychics in this room? ( the caption)
 
I knew you were going to ask that.
 
ha! that means u'r the psychic?
 
No, it means I am a liar, because I didn't really know that.
 
5:40 PM
dammit, so in the end it means I am an naive idiot
 
Let's try it. Say something.
Damn it. The two-minute edit window is gone. I can't pretend to be a psychic anymore.
 
5:57 PM
perhaps it means psychicks
?
 
argh
I wish the university would just fuck off and leave me to learn on my own
they're still bitching at me for the project brief thing, and it's not in my capacity to produce one without the damn phd student
 
How come it doesn't?
 
google "do a barrel roll"
8
 
@Praetorian wow
@DeadMG Here we have self-study option. It's much cheaper since you don't have to pay for the classes, only the exams.
 
urgh
well, I'd really like it if my university could accredit me for knowing things like how to actually write and use abstractions, or shader programs and other 3D graphics, or useful things like KISS and DRY
but instead, you lick the lecturer's ass or you get nothing
 
6:09 PM
We pay only for repeats here.
 
But the profs sometimes forget that it exists. I know somebody who did this and he was given zeroes on assignments he didn't turn in. Since he didn't participate in the classes, he was never notified of the assignments.
@CatPlusPlus You don't pay for university as long as you don't need to repeat?
In Belgium college is not very expensive. It's € 578,70 for one year.
Books not included.
 
There are some small fees when you apply, but in total it's under ~25€.
 
Nice.
 
Well, it varies from one place to another, and how many applications you do, but it's still cheap.
 
If your parents are not rich then you get a scholarship and it's only 80 EUR then. But you don't get this scholarship when repeating for the third time.
(And beyond.)
 
6:15 PM
There's a studying mode when you only attend on weekends, every two weeks. That's paid per semester.
 
Cool, this would allow you to get a degree while having a full-time job. There's no such thing here.
 
Yeah, that's the idea.
 
nice
in my university, we should attend minimum 45*6 hours of classses per semister
to get eligblity to write exam for engineering cs
there are 8 seminsters
Zzzz
 
We're using ECTS, and have minimum thresholds for that.
 
The Greeks are opposed to the referendum. There's something inherently wrong with this statement.
 
6:20 PM
and teachers teach such low quality. I mean at 7th sem they are teaching me how to connect to database in php :|
 
Yesterday a colleague educated me that inside one enum multiple enumerators can share the same value. Jee, thanks for the lesson.
 
@StackedCrooked the greeks were once great warriors, great thinkers and great politicians. they had a culture where most of our current fears were absent. how they have devolved.
not to mention how we have failed to take care of the heritage the old ones left us
now i'm getting sentimental
 
@AlfPSteinbach So have the Italians and the Persians. Am I starting to see a pattern here?
What are our current fears that they didn't have? (Fear of accidentally making a politically incorrect statement in public?)
 
that too
 
Fear that the Internet stops working!
 
6:26 PM
I apparently fail at drawing quads with triangles.
 
@RMartinhoFernandes Don't speak of such a thing. Jesus!
 
fears of not fitting in with the herd, in all ways. perhaps shocking to some, Socrates etc. often engaged in homosexual activities, or what would now be lumped into that concept bin. and they made friends with people from other cultures without hesitation. they invented all kinds of outrageous theories. afaik it was only the pythagoreans who were afraid of new thoughts, but maybe they were more turkish than greek?
 
Rectangles.
 
@AlfPSteinbach Socrates was not a mainstream Greek even in his time. Today it's much the same that intellectuals are very unlike most of the population. (Homosexuality is not always included though..)
Is Google Maps really just JavaScript? It's kind of baffling how smooth it all works (grabbing the map and moving it around).
 
6:32 PM
It's not really that smooth. And yes, it's just JIT image loading.
 
@StackedCrooked i think it uses different techniques for IE and other browsers (HTML 5 for other browsers, and the Microsoft thing that SVG was built on, for IE)
 
It's quite an achievement.
Well, they probably pumped a lot of manhours into it.
 
cpx
opera fails a barrell roll lol
 
@cpx barell rollol
 
BROFL.
Also, Opera fails a lot.
 
6:36 PM
Opera isn't even open-source.
How high-and-mighty they are.
I wonder where they get their funds from.
 
allocator<node<T> > alloc;
is something wrong with that?
 
@AlfPSteinbach Free thinking was a common trait of many ancient cultures. Babylonians were very much into freedom of religion, as long as the religion was tolerant of others.
At the same time, they were very prone to moral decay.
 
@bamboon Not necessarily. But this means that you have a custom allocator for the node type where you perhaps wanted one for T instead.
Unless the T object is a non-pointer member of the node type.
 
There's a pattern of free-thinking cultures to turn in on themselves. To the point where they devour each other when liberty no longer checks against itself.
 
No, it's just an allocator where type is node<T>.
 
6:42 PM
yeah T is infact a non-pointer member of node
 
Without a common standard of morality, free-thinking leads to moral anarchy, and weakens the culture group.
 
thanks
 
It's the southern countries that have a lifestyle of low-productivity relative to the northern countries. They have now been surpassed by the northern countries and are struggling to catch up with.
 
hyper-productivity often leads to productivity overlap though.
Thus, wasted productivity... non-productivity. Kinda like live-locking, looks like your busy.
Busy-ness (not to be confused with business) has been the measure of success lately.
 
he he. "The subject has caused controversy in most of modern Greece. In 2002, a conference on Alexander the Great was stormed as a paper about his homosexuality was about to be presented. When the film Alexander, which depicted Alexander as romantically involved with both men and women, was released in 2004, 25 Greek lawyers threatened to sue the film's makers,[13] but relented after attending an advance screening of the film" - [Wikipedia]
 
6:46 PM
I don't think civilization started in the south because the people there were inherently superior to the rest of the world. I think there must have been circumstantial factors that promoted cultural development. (I think geographical circumstances are an important factor.)
 
yes, definitely devolved, but so are we Norwegians. once we were vikings.
 
Vikings were a nice civ in Age of Empires II. You got the wheelbarrow upgrades for free.
@Xaade Here in Flanders especially.
So who is actually evolving then. Is it the Japanese?
 
Asia as a whole is evolving
 
Ah, I see I received my keyboard cover in the mail today.
Finally, now I can stop wasting keyboards.
A little visual variation.
I used to hate PDF links. But these days they are cleanly rendered in my browser almost as if they were web pages. The world has become a slightly better place.
 
7:03 PM
@StackedCrooked yes you are spot on with respect or PDF
I like the way chrome renders it.... dont like to open it on any other browsers
 
@StackedCrooked Yeah, it's freakin hot. Hard to do labor in 90% humidity at 40 degrees.
(Disclaimer, I have no idea what degrees in F is 40 degrees C).
 
Nobody knows.
 
40 degrees is nothing compared to one million degrees.
 
40C where?
 
7:13 PM
Mesopotamia. Where civilization started.
 
@StackedCrooked lol
<3 /b/
 
I'm bored.
 
Play some game
 
Fix my code.
 
Play a game of patience.
I heard Lisboa is one of the greatest cities to visit in Europe.
 
7:32 PM
Can I mergesort an array in-place?
 
I think Sarkozy and Merkel must be good friends by now.
@FredOverflow Yes.
 
> Sorting in-place is possible (e.g., using lists rather than arrays) but is very complicated, and offers little performance gains in practice, even if the algorithm runs in O(n log n) time. (Katajainen, Pasanen & Teuhola 1996) In these cases, algorithms like heapsort usually offer comparable speed, and are far less complex. Additionally, unlike the standard merge sort, in-place merge sort is not a stable sort.
Dammit, no.
Only in linked lists it is possible.
 
Too bad, I really like the simplicity of Mergesort.
 
Why do you want to do in-place sorting?
 
7:37 PM
Is Reddit breaking up with me??
> It's not you, it's me.
 
Sort of.
 
So, we're done with the Internet for today.
 
@StackedCrooked Because in-place is cool?
 
You're dating Reddit?
 
Reddit's down, nothing happening on SO.
 
7:38 PM
I'm frequenting Reddit.
 
I don't know what else to do.
 
I can die now.
 
Non-in-place sorting algorithms somehow feel out of place to me.
 
Merge sort is nice on multi-core.
 
Well, as long as SO isn't down...
13
Q: Does overloading '==' get you '!='?

prelicIf I manually overload the == operator for a structure, do I get the != operator for free (presumably defined to be the boolean opposite), or do I have to overload it manually (even if to just return !(this == rhs)?

> The only thing that's free in C++ is the noose you end up hanging yourself with.
lol
 
7:43 PM
@FredOverflow A game programmer once told me that alcohol gives you anti-aliasing for free.
 
Hola
1
Q: How to deduce, at compile time, the root of an inheritance tree common to two types if one exists?

jaredhoberockI have a problem where I need to discover the common ancestor of two types (with one or zero base classes) if it exists. Is it possible to build a type trait to solve this problem? In code: template<typename T1, typename T2> struct closest_common_ancestor { typedef XXX type; // what...

 
Maybe type traits could help here.
 
I don't have the TMP-Fu skills required to answer, but I think that's an interesting question, so I put it here.
 
23
A: Does overloading '==' get you '!='?

K-balloOverloading operator == does not give you operator !=. You have to do it manually and the canonical way is to implement it in terms of operator == as in !(left == right). The semantics of the operators are not dictated by the standard. You could very well overload operator == to mean equality ye...

I don't get @Als note
Does he mean don't implement != in terms of ==.
 
Yeah, it's confusing.
 
7:52 PM
No, he means == should test equality, not inequality.
 
I think he meant, don't implement != to actually MEAN ==.
Otherwise, I'm going to have to disagree. != should always be in terms of ==. For obvious integrity.
Is there ever a case where != and == would result in the same answer?
 
I don't think so
even NaN is != NaN, but it's not == NaN, as far as I know
 
They're edge cases at best.
 
I could see cases where you can test inequality for sure, but not equality. Like, testing if a blood sample is from the same person using only blood type
 
8:07 PM
allocator<node<T> > alloc; I dont get it to compile, compiler gives me tons of warnings
 
@bamboon If you only get warnings, then it builds...
 
sorry i meant errors
 
Warning! Warning! An error occurred.
 
@Xaade Then what would == return if they have the same blood type?
 
strange thing is, code works, then I add that line and its chaos
 
8:09 PM
What are you trying to do?
 
Hello there, I've got a quick question: Can expression *(i + 1) = *i--; result in undefined behaviour, where i is random access iterator (could be pointer, too). My knowledge about sequence points and related UB fails me in this case.
 
Why do you need to declare an allocator?
 
acc c++ exercises of implementing vector and list class
 
@Vitus Looks like it is.
 
@Vitus Just don't do it!
 
8:10 PM
@Vitus Plus this code is both ugly and confusing.
 
You don't need knowledge about sequence points. You just need to stay clear of that kind of ugly code.
 
@RMartinhoFernandes That's what I meant to say.
 
I know it's ugly, I know it's confusing; but I wanted to know. :)
 
97
Q: Undefined Behavior and Sequence Points

Prasoon SauravWhat are "Sequence Points"? What is the relation between Undefined Behaviour and Sequence Points? I often use funny and convoluted expressions like a[++i] = i;, to make myself feel better. Why should I stop using them? If you've read this, be sure to visit the follow-up question Undefined Beha...

If you really must know, it's all in there :)
 
@bamboon Would be hard to help you without the errors and/or the code. But the chat is the wrong place to ask long questions, I suggest you ask it on SO (you can then come back here and post a link to the question).
 
8:13 PM
> The verdict is that Boost.Endian is CONDITIONNALY ACCEPTED
 
@R. Martinho Fernandes: Been there, but pointer arithmetic and dereferencing seem to make it very confusing.
 
@RMartinhoFernandes What does that even mean?
 
yeah I know but there are tons of errors
 
@Vitus Are these pointers or some other kind of iterator?
 
8:13 PM
@bamboon There always is when you start messing with templates.
 
@EtiennedeMartel Means that Boost.Endian is pretty close to being in the distribution.
 
doesnt even work with int
 
If it's not a fundamental type:
26
Q: Undefined Behavior and Sequence Points Reloaded

NawazConsider this topic a sequel of the following topic: Previous Installment Undefined Behavior and Sequence Points Let's revisit this funny and convoluted expression (the italicized phrases are taken from the above topic *smile* ): i += ++i; We say this invokes undefined-behavior. I pr...

 
Well, since this used to be part of template code that expected random access iterator, it could be both.
 
@bamboon Write that on SO. You'll have more luck there. Because without your code, it's awfully hard to help you.
 
8:15 PM
0
Q: Compile time typeid without RTTI with GCC

KyleIs there anyway to get compile-time typeid information from GCC with RTTI disabled? Under Visual Studio, a simple command like const char* typeName = typeid(int).name(); will appropriately return "int", even if RTTI is disabled. Unfortunately, GCC can't do the same. When I try to call typeid with...

 
yeah actually I am more complaining than looking for help^^
 
"How to do runtime type information at compile time with runtime type information disabled?"
 
@Vitus Well, then don't write it like that, because it's UB with pointers.
 
Alright, I thought so. That's what I wanted to hear. Thank you very much.
 
@CatPlusPlus Compile time reflection, eh?
 
8:16 PM
Also I just love that RTTI is disabled "for performance reasons".
 
@CatPlusPlus That's the reason they used to disable it at Ubisoft Montreal.
 
Oh, and it's not like I'm going to use this in code. It was more of an academic question.
 
I can understand disabling exceptions for that (as stupid as it is), but RTTI?
 
How would that significantly slow anything down?
If you don't do any runtime type checks, it should cost nothing in terms of time, and a little in terms of space.
 
8:17 PM
But PERFORMANCE.
 
@CatPlusPlus Is important, especially when in bold.
 
I have a feeling that everyone is disabling for performance reasons, because everyone is disabling for performance reasons.
And nobody actually stops to think.
 
It makes no sense to me.
 
@CatPlusPlus Bad ideas spread about as well as good ideas.
 
I don't see how it can affect performance unless you are actually using it.
And if you are using it, then well, don't disable it.
 
8:19 PM
Maybe in 1998 it did.
 
It's like not using templates because VC++6 has trouble with them.
 
But hell, then too much comments would affect performance.
 
Comments? They dramatically slow down the code!
 
I know for sure, I don't want to ever work on AAA game.
 
You know what else affects performance? The increment operator.
 
8:20 PM
It's even worse than webdev.
 
There were a hell of a lot of macros in Scimitar (AssCreed's engine), because templates slowed down the build too much. They also rewrote most of the STL containers because the implementations they had did too many cache misses for their taste.
(I'm not saying they are legitimate reasons, it's just what I was told)
 
EA did they own STL, too. But it apparently has some noticeable benefits.
 
> The STL lacks functionality that game programmers find useful (e.g. intrusive containers) and which could be best optimized in a portable STL environment.
 
Yeah, I was aware of that, but reinventing the wheel is a core game development concept.
 
This sounds like a good reason.
> STL containers won't let you insert an entry into a container without supplying an entry to copy from. This can be inefficient in the case of elements that are expensive to construct.
This was addressed in the new standard.
 
8:25 PM
game developers care about such things.
never expected that
in times of crappy ps3 and xbox games
 
AAA game development is all about micro optimizing the shit out of everything
 
Boost has intrusive containers.
 
@bamboon The tech is rarely to blame when a game "sucks". It's mostly a game design problem.
@CatPlusPlus Ubi Montreal did not use boost because it took a few years to build.
 
@EtiennedeMartel in terms of game design of course, but I mean graphics etc
BF3 looks good though
and runs even on lowend hardware
 
The PS3 and the Xbox 360 have 5 years old hardware. Considering most games are cross platform, then concessions must be made.
The PS3 has 256 MB of RAM, IIRC.
 
8:28 PM
yeah but unfortunately they are made against the PC.
 
Most gamers game on a console. The hardcore (i.e. non casual) PC is a small market.
 
yeap sucks
 
That's why CoD is made first for the 360, because that's where their target audience is.
BF has always been a PC-centric franchise.
But it's not necessarily a bad thing. Games are not any less good now than they were before. Of course, with nostalgia, it's easy to overrate an older game.
 
of course they are not worse, but they could be lot better
 
Quality is a subjective thing. I must have spent about 250 hours playing StarCraft 2. I'm eagerly waiting for my BF3 copy to arrive. Skyward Sword is making me regret the fact that I don't have a Wii. I can't wait for Mass Effect 3 to come out.
For me, quality equates to the amount of time I can spend playing a game without getting bored by it. And according to that metric, there are a lot of great games around.
 
8:36 PM
type do a barrel roll into google.com
 
@awoodland Yeah, we all did, look at the sidebar.
 
damn too slow again
 
@deadmg: you were right in a way. the Windows console window input functionality, or the runtime library's support for that, is too bug-ridden to use the scanf family for interactive input. in short wscanf generally fails on non-ascii characters in interactive input (e.g. when one uses codepage 65001)
 
I'm always right :P
 
8:51 PM
Damn, still half an hour before this boring class ends.
 
You're better off implementing console yourself with GDI, rather than using the built-in one, if you're serious about it being functional.
 
Windows CMD sucks quite badly.
 
I can't help but love cmd.exe's rectangular selection.
 
I love it to death.
 
I barely ever need it.
 
9:00 PM
I know a sysadmin who regularly has to put up with that shit. He prefers working on Linux.
 
A sysadmin using cmd.exe? Lol.
 
Well, he has since moved to powershell. But anytime he had to go back to cmd.exe, we could hear his soul being slowly drained away.
 
I kind of like the cygwin bash shell. It
is not perfect.
But better than cmd.
 
What's there for sysadmin to use, anyway?
Windows Server is GUI driven.
 
Now this looks like fun way to play racing games
it's like a proper simulator
 
9:13 PM
user image
4
 
@CatPlusPlus Haha that's right :P
 
@TonyTheLion he he i can't believe it i mentioned that one to a friend about a month ago, i remembered it from my childhood (an English course with books and cassettes).
 
@CatPlusPlus "askew" and "tilt" work too
 
@AlfPSteinbach haha
 
It's funny how many questions on SO I answered just by looking into the documentation.
Even if I never used the thing.
 
9:27 PM
8
A: What can I get from a struct pointer?

David Heffernan What can I find out about a struct from just a pointer to it? Nothing. This pattern, opaque pointer, is used to hide implementation. The fact that you can infer nothing about what is behind the pointer is in fact by design.

See the comments.
> I have a knowledge of machine language but not a debugger. If I wanted to print the struct using the debugger what could I do?
 
I love how OP keeps repeating "is there anything I can do?"
 
Some people have a really hard time getting abstraction.
 
Some people just fail at listening/reading.
 
@RMartinhoFernandes i upvoted the only reasonable answer, namely to use a debugger. strange that it had 0 upvotes.
 
9:48 PM
^ Above average opening.
 
@CatPlusPlus "There's nothing we can do."
@RMartinhoFernandes The language you are looking for is C#.
 
@StackedCrooked epilepsy attack
 
hi all
my colleague didn't believe me that a global variable by default is 0 in C and C++
 
you'd have to be so moronic to use a global variable, I forgive that kind of slip up
 
cpx
hmm, static initialization?
i don't know about C
 
10:07 PM
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhi
mmn, that was ineffective as well...
 
10:27 PM
@JohannesSchaublitb tell him i said so
at one time i could never remember how to spell "colleague"
i had to look it up every f***ing time
it was very annoying
 
00:00 - 17:0017:00 - 23:00

« first day (383 days earlier)      last day (4581 days later) »