« first day (311 days earlier)      last day (4629 days later) » 

2:54 AM
Hey there, anyone up?
 
 
2 hours later…
dip
4:53 AM
test
 
test failed...
 
 
1 hour later…
6:55 AM
A friend of mine just send me that
 
it's interesting
I wondered, when using Qt UI framework, is it better to derive from an object like QPushButton to create buttons, or just use it as is?
 
7:20 AM
Aaaah I'm going nuts :P
 
not good
 
Anyone got an idea why if I call glClear() more often then I swap buffers, it blocks the call
 
Hmm, has anybody noticed, that if you add the /MP option to VS 2010 compilation that you get strange periods of it sitting and doing nothing during the compilation?
 
Ie puts my performance to shit (probably around 30fps)
 
It looks like some kind of deadlock but it always recovers.
 
Random pictures?
 
No, they all have a good view. C++.
 
I'm not seeing it
 
But srsly, wondering if its question worthy or not
 
7:26 AM
 
#glClear() calls > #swapBuffer calls causes thread blocks for no reason and puts my window refresh rate to dodge. Does it sound legit or maybe I just have a platform issue?
 
@Daniel not familiar enough with OpenGL to answer your question, your best bet is probably to ask on SO proper
 
sbi
@TonyTheTiger Nice.
> In good OO programming, we don’t make class hierarchies in order to satisfy our inner Linnaeus.
I should like that.
 
@sbi :) :)
 
7:35 AM
Might do that Tony
Just really don't want it to turn out to be an ubuntu problem :p
Or something stupid like that haha
 
well, it is what it is, you'll only find out by asking.
 
Getting a guy on gamedev.stackexchange chat room to test it for me :D
If he has the same issue, then it'll be a question worth asking \
 
@AlfPSteinbach YUCK!! That looks scary even without the girl with the broom.
 
Rob
There's an adrenaline junkie who does headstands out on peaks like that... saw it on discovery channel I think
 
7:47 AM
I'd happily do it... with a parachute :p
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=115289

Describes my problem
 
Rob
 
"Maybe it's the same bug as I encountered some time ago. It seams that if you call glClear() more than once before you do a SwapBuffers() it'll either hang, kill performance or something else. I've seen that happend on many cards."
 
@Daniel isn't that the entire point? Assuming vsync is enabled (which is the default), it'll block until the next monitor refresh cycle. Or did I misunderstand?
 
Rob
Ughhhh I hate vsync
At least in gaming, utterly worthless
 
No, its not vsync
The vsync occurs when you swap buffers (ie put whats on the backbuffer on to the screen)
At this point, its just clearing an already clear backbuffer more than it swaps it
Yes completely redundant, but does not explain the performance death that is occuring (15k fps -> 20-30fps)
 
7:53 AM
@Daniel if you're going to worry about performance, do it properly
fps is a worthless measure
look at seconds per frame
15k -> 30fps sounds much more dramatic than it is, because it's an inverse scale
look at how much slower each frame actually became
 
I understand that
 
you added about 33 ms to each frame.
@Rob more worthless than rendering more frames than you actually see?
that sounds like a good definition of worthlessness to me. ;)
 
In any case
I've just done a test, its only when I call glClear about 10,000 times more than swapBuffers is called
It starts cutting the FPS down
 
Rob
@jalf When creates input lag, which is a significant amount of the time, then yes
 
(lol)
 
7:55 AM
@Rob in that case, we're talking about badly written applications being worthless.
I think most people can agree with that one
 
Rob
Hmm, so you think it's the implementation of vsync?
 
@Rob no
 
I was comparing this (simplified obviously):

int i = 0;
while (1) {
i++;
glClear(GL_COLOR_BUFFER_BIT);
if (i % 10000 == 0) glxSwapBuffers( ... );
}

VS

while (1) {
glClear(GL_COLOR_BUFFER_BIT);
glxSwapBuffers( ... );
}
 
I think it's the implementation of teh application that uses vsync
Why should its input processing be slowed down by the rendering mechanism?
 
Rob
Good question, but I've seen it happen in every gpu-intensive D3D / OGL game I've played.
 
7:57 AM
@Rob no you haven't
because you haven't tested with and without vsync on EVERY gpu-intensive D3D/OGL game you've played
 
Rob
...
yes I have
on my PC at least
 
really? Why?
Why do you enable vsync on EVERY game, if you believe it's worthless?
 
Rob
I only have about 5 PC games, and I fiddled with all of them before eventually forcing vsync off in drivers
 
ah, that would have been relevant information, woudln't it?
rather than implying that EVERY PC GAME SUFFERS FROM THIS PROBLEM
 
Haha... most of the games I play sit on like 45fps... vsync makes no diff anyway haha
 
7:59 AM
we're actually talking about 5 games
also, I don't believe the discovery that "most games are badly written" is going to win you any nobel prizes.
@Daniel and the second version takes 30ms per frame?
 
Rob
@jalf Where did I imply this was some grand discovery?
Just reflecting on my experiences.
 
Correct Jalf
 
@Rob it's just my snarky way of pointing out that yes, most games are terribly written, and you shouldn't expect them to be well-behaved
 
Rob
Haha alright.
 
So frame times for those exact loops are respectively:
0.000066667s

and

0.04s
(on average)
 
Rob
8:02 AM
I'm going to play a few games of chess and head to bed
goodnight all
 
night
 
for clearing the buffer 10k times? I'm not sure if 30ms is what I'd expect for that, but I certainly wouldn't expect it to be fast
 
Granted
But I didn't expect that either
Hence, my confusion
It was a mistake that it occured at all, but still curious
 
what resolution, out of curiosity
 
1024 x 768
vsync off for this
(obviously)
 
8:06 AM
just a quick back-of-the-envelope calc says you're using 900gb memory bandwidth/second just on clearing the buffer
 
hahaha
That was my second guess
 
and gpus are complex beasts, which try hard to optimize everything and hide the latency, but if you do something "bad", that latency can easily surface, and it's usually a killer
and I highly doubt gpu drivers are optimized for repeated clear calls. ;)
so overall, I think the only problem is that you wrote bad code ;)
 
But why would that not occur when doing the glxSwapBuffers at the same time
The CPU delay is just enough it gives the GPU enough time to keep up with the calls?
Haha yeah
Agreed.
My first problem was, was finding that somehow my O/S was leaking 2GB of memory with no programs open
 
@Daniel it does occur, IMO. When you do 10k times as much per buffer swap, your frame time goes down by a factor 10k
 
After a reboot, I noticed I'd forgotten I'd forgotten to swap buffers in my loop (commented out), and it was absolutely KILLING my fps
 
8:09 AM
@Daniel heh
 
Which I thought was curious
And hence.
 
yeah, it's amazing the things that can happen when you forget to remove some old test code
 
Heh. OK on a completely unrelated (yet related to the previous anecdote), any reason why my used memory is sitting on 2.3gb / 4 on Ubuntu, yet my combined memory from all root/user processes is only like 300mb
 
I'm not sure how Ubuntu does it, but modern OS'es tend to hold on to previously used memory, rather than just freeing it immediately
basically a cache, so that if you should launch the same apps again, it can reuse the memory and speed things up
 
Yeah, thats the logical idea
 
8:12 AM
and if you need the memory for something else, it's released
so it could just be that
 
But I've never seen it like this b, free memory in the system diagnostics is saying 50mb, total memory 4,000,000 (4gb)
 
but just a guess
ah
something caused by memory fragmentation then?
 
No clue. going to throw a 2GB vector at it and see if a) crashes or b) releases
 
sbi
Allegedly, in an act of solidarity with the rebels, google maps has renamed Tripoli's Green Square back to Martyrs' Square.
 
hahaha
That worked
Yeah must have just been a cache
#include <vector>

struct aarr {
int x[4000];
};

int main() {
std::vector<aarr> test;

size_t size = 0;
size_t max = size_t(2048) * 1024 * 1024;
while (size < max) {
test.push_back(aarr());
size += sizeof(aarr);
}

return 0;
}
Reset the free memory back to 3.5gb instantly and then froze, but killed the process and its still there
So it must've been kept in cache or some such by the O/S
 
sbi
8:23 AM
In other news, it seems yesterday someone has written to a sidewalk in Ottawa the last words to the public by the Canadian politician who had just died of cancer:
desmond.yfrog.com/Himg734/… (Darn, Markdown failing me again.)
 
sbi
@DavidRodrĂ­guezdribeas Hi!
 
Quick question... some time ago I watched a Channel9 video about a new concurrency library that microsoft was developing, but I don't remember the name... anyone may know? What I remember: It had a vague similarity to futurures in C++0x, tasks were being defined, and connected through things like "continues_with()"...
 
sbi
That?
 
Howd you get that 900GB figure btw
Even if it was back of an envelope
 
sbi
8:27 AM
@Daniel Who is the "you" you're talking to?
 
@Jalf
 
I don't think it was that one... that seems to be more related to programming C++ on a video card than a task abstraction for regular c++
but thanks for the link
 
sbi
@Daniel You might want to learn how to refer to specific messages. See the newbie hints, prominently linked to the right.
 
@sbi I'm familiar with the syntax, its just no one else was really talking here for the most part, so directional conversation wasn't necessary. Meanwhile Jalf and I had been talking for a small while.
 
sbi
@DavidRodrĂ­guezdribeas Actually, from what I understood, it was meant to abstract away whether you're parallelizing on a video card, a massive parallel CPU, or a dual core.
And it is the new concurrency library MS is developing and which was introduced by Herb. I wonder what else you could be referring to?
 
8:30 AM
0
A: Ambiguous call of overloaded constructor due to super class (pass by value)

wilxOverload resolution is done before access checking, that is why even the protected base class' members are considered. Overload resolution is described in chapter 13.3 of the standard. My interpretation is that binding const AutoVector ov to Vector ( const Vector& original ); is user defined...

Check the answer's reasoning, please.
 
In the video I refer to, Herb was not the one presenting... and on a first look it seemed to be just *future*s from C++0x, so I did not understand the reason
 
@Daniel 1024 * 768 pixels, each pixel is 4 bytes, and each is rendered 30 times per second
just multiply up
 
So I did not pay attention... now I think that it might be something else
 
sbi
@Daniel I'm sorry if this came across as harsh. It wasn't meant to. I noticed you were talking to someone else earlier, but I didn't remember who that was, whether there was only one or more of them, and whether you were referring to that discussion or something else you had seen in a link that I might have missed.
 
and it's possible I messed up :)
 
8:32 AM
Yeah fair enough, I got a completely different figure is all, same calculation, but using the decimals, came out a bit less, points the same though.
 
sbi
@DavidRodrĂ­guezdribeas I'm sure you will find every video of him (especially if posted to Channel 9) from his homepage.
 
Btw, comments on my method of tutoring object oriented encapsulation?

class Female {
float weight;

...

float getWeight() { return (weight * 0.6); }
};
:D
 
heh
 
@sbi The problem is that it was not Sutter, and I don't remember the name of the people / group presenting
 
8:33 AM
you should probably use float consistently, if you're goign to multiply by 0.6. ;)
 
Hahaha true
 
also that link of Tony's is a must-read
 
sbi
@DavidRodrĂ­guezdribeas Oops. I'm not paying attention, it seems.
 
if only because it's something I've been saying for ages and I love it when people agree with me ;)
 
Hmm, you're implying that all women are fat.
 
8:34 AM
No, I'm implying all women lie about their weight.
And age. If you infer a variable to it
:P
 
anyway, I think it's a pretty good example to illustrate that simple point, that an object's internal state can be decoupled from what it tells the world
but don't push it further than that. Please don't make the class derive from a Human base class or something like that
 
Hahaha, yeah, I've never bothered with that
 
Hey, that's how I was taught this thing at school!
 
and look where it got you!
 
What does that mean?
 
8:38 AM
nothing, just joking :)
 
We used a boat hierarchy.
 
sbi
@RMartinhoFernandes You derived woman from boat? That seems... odd.
 
Gosh no.
With CargoBoats, and CruiseShips and all kinds of stupid stuff like that. In Java. With stupid rules like every object must have empty ctor, copy ctor, a ctor with a parameter for each field, a getter/setter for each field, and must override the clone method, the toString method, and the equals method (pity that overriding equals without overriding hashCode breaks the contract, but no one told us that).
So we spent most of the time writing boilerplate, or asking some computer program to do it for you if you were smart.
 
The type of polymorphism I prefer to use, is in a simple game environment; maybe tic tac toe.

class Player {
virtual void turn();
}

An AI derived class implements their turn with various logics, depending on what AI you chose (aggressive defensive blah blah)
A human derived class implements an interface for the player to interact with the game.

With which you can choose to have AI duke it out, or 2 humans, or different kinds of human vs AI games. All with the actual gameplay completely abstracted away, leaving only the interface for the "player" class to use
Maybe "controller", "AI" and "player" would have been better words than the respective "player", "ai", "human"
But you get the point.
 
8:59 AM
> You can’t fake the ability to turn a duck into a penguin by moving its duckness into an animal of some other species that can be replaced at runtime.
I love this one. Thanks for the great link @Tony.
 
@RMartinhoFernandes :)
is it normal that an inner join of 11k records takes more then 10secs to execute?
anyone know how you could possibly speed that up?
 
Do you have indices?
(I have no idea about the time it should take, and it depends on lots of stuff like the machine and the data types, but 10 secs for 11k records sounds like there's room for improvement.)
 
9:16 AM
@RMartinhoFernandes yes, the primary key cols are indexed
 
Data types?
And I assume you're joining on the primary keys.
 
the primary keys are integers
yes join on primary keys
 
You're sure it's the inner join that takes time? If it's not a simple query, you should use the query analyser.
 
it's a very simple query, just a select of one entire table, joined with another table, of which 2 cols are selected. The inner join is done on the primary key of the latter table, with a number field that matches up with ID's in the first table
 
Show the query and the schema.
 
9:26 AM
@TonyTheTiger: Have the RDBMS that you are using give you the query plan.
 
Also execution plan.
 
don't know that MS Access (bwah) gives you that much information
 
Wait, what.
 
9:30 AM
meh I know, but that's what it is
 
Well, without an execution plan, it's hard to tune performance.
I have no idea if Access can give you that, but I've never seen that option.
 
me neither
just googling
 
No, with Access it's normal.
Because it's even less of a database than MySQL.
dBASE III was better.
In any case, show schema and the exact query.
Probably there's an index missing.
 
Maybe it's just Access being as fast as it can't.
 
hmmm
well it has a "analyze performance" tool
but running it on that query, gives no suggestions
lol
thanks MS for your great fucking tools
lol
ok
this is the query that's so slow, sorry for the dutch col names
SELECT tbl_Artikel.*, tbl_AdresGegeven.Marge, tbl_AdresGegeven.Naam
FROM tbl_AdresGegeven INNER JOIN tbl_Artikel ON tbl_AdresGegeven.AdresGegevenID = tbl_Artikel.KlantID
ORDER BY tbl_Artikel.ArtikelID;
that's what it looks like in SQL
 
9:47 AM
Try indexing KlantID.
 
says it's indexed, but it allows duplicates
 
The query is slow when running it from Access? You didn't by any chance happen to run it from a good ole DB connection?
It could just be Access taking its time to display the data.
 
@RMartinhoFernandes yes I'm running it from access
the result set contains > 11k records
 
So, there's only one thing left to do.
 
this db is a front end and back end though, could that be a reason for slowness
 
9:51 AM
Export everything, get rid of Access and install PostgreSQL.
 
though they're both on the same machine
 
export to SQL server?
 
is PostgreSQL actually good?
or are you joking
 
9:52 AM
Yes.
 
I'm tempted to say anything is better than Access, but I reserve judgment about MySQL.
 
If I were joking, I'd say MySQL.
 
hahah
 
But even MySQL shouldn't have much trouble with 11k records.
Hell, probably even SQlite could handle it.
 
meh, I guess access is for very small dbs for personal use only, not industrial use
 
9:53 AM
Definitely not. There's a reason MS sells SQL Server.
 
@RMartinhoFernandes definitely not, what?
 
Definitely not for "industrial use".
 
I don't think even MS knows why they made Access.
 
@CatPlusPlus for people that don't really understand DB's to be able to create something useful, of some kind
and have front end and back end, easy to make
 
People who don't understand databases cannot make useful databases.
No matter what they use.
 
9:55 AM
whereas with SQL Server, you'd need to create front end with code or something, or really know how to use SQL
@CatPlusPlus that's true, but MS Access gives them the idea they can though
 
There are GUI designers for most DBMSes out there.
I don't find them very useful, prefer to write SQL or use an ORM.
 
true, but I'm talking more about the forms aspect you have in access
so it looks like an app
 
It's craptastic.
 
true taht
 
10:29 AM
Yell ow..
Can someone tell me anything about the anatomy of the task bar?
..on windows 7. Are the application 'tiles' windows?
I sometimes get the task bar without any of the tiles, wondering what's going on.
(well, I know I got my buggy program to blame for this but I mean in more detail..)
 
10:44 AM
@72con prob better of asking on SO proper
 
What tiles?
 
10:55 AM
the tiles for each application
SO proper?
 
You know, make it an "official" question.
Nets you a bigger audience, and a better facility to describe your problem.
 
ic.. yeah, probably should.
 
i was reading about first class objects and wikipedia says first class object is an entity that can be constructed at run-time, passed as a parameter, returned from a subroutine, or assigned into a variable. now i dont understand what is meant by contructed at runtime? is it talking about initialisation or dynamic object creation or something else?
 
(oh, and thanks!)
 
11:10 AM
@lovesh int i = 42 will construct an object of type int when the code is executed (at runtime). But you can't do anything like that to create a function at runtime in C-like languages, where functions are created at compile-time
So functions aren't first class entities in those languages
 
any of you took a student loan to get your degrees?
 
@jalf memory for variables is allocated at compile time right?
 
Memory allocation != object construction.
 
@lovesh only for static variables
code is generated at compile-time for adjusting the stack pointer at runtime so that memory can be allocated
@TonyTheTiger only to cover the last 4 months or so
 
@jalf oh... I'm just looking into a loan, but I'm not sure I want to be paying off a loan for the next 10 - 15 years
 
11:14 AM
@RMartinhoFernandes then what do you mean by object construction?
 
question is whether that's really worth it
 
@TonyTheTiger depends on what your options are, I guess
No one wants to spend 10-15 years paying off a loan
people generally do it because the other options are worse
 
@jalf oh... hmmm my only other option is to find a job, and hope that I can eventually get one I enjoy
by the sheer matter of having experience
 
and quitting school?
 
I"m not in school currently
 
11:16 AM
ah, and not entering school then
 
but since I don't have a degree, I was considering maybe I should go back to school and get one
I figure that, with a degree, it'll be easier to at least be considered for most jobs in this industry, where without, you don't really get looked at
 
honestly, do what you want to. If you want to go back and get your degree, having to pay off a loan is a small price. And if you don't want to, then it'd suck to also have to pay off a loan
in addition to wasting time doing something you don't want to do
 
And if you don't want to do it, it's likely you won't perform well.
 
@RMartinhoFernandes exactly
 
@RMartinhoFernandes what is the difference between memory allocation of an object and object construction?
 
11:20 AM
memory allocation is merely reserving space for an object to sit in, object construction is creating the object in that reserved memory, and initializing all it's variables
 
@lovesh Memory allocation is just getting space for it. Construction generally involves, appropriately, a constructor call.
 
@lovesh calling malloc allocates memory, but it doesn't construct an object into that memory. An object is constructed when its constructor is invoked
 
@jalf i am not talking about objects as in OO programming and C does not have object so no constructors. can u give some example in C in which memory allocation is different from object construction?
 
I think everyone here assumed you were talking about C++.
Not sure why ;)
 
afaik a struct needs to be constructed
 
11:24 AM
and in c++ when i call new obj memory is allocated by the constructor call(at lesst i think it this way)
 
the memory is first allocated to sizeof(obj) and THEN is the ctor called
else where would the created object be placed in memory?
 
@lovesh Memory is allocated by a call to operator new(sizeof(obj)) (it's a function), and then the constructor is called, passing the pointer returned by new as this.
 
@TonyTheTiger i dont get this. are you talking about C? afaik? what does that mean?
 
C can have objects, it just doesn't have supporting language constructs for them. Well, it doesn't have language constructs for anything, really.
 
There is no notion of construction built into the language C.
You just grab memory, and stuff data in it.
 
11:39 AM
C++ has placement new for construction without allocation.
 
@RMartinhoFernandes what i understand now is that in C object creation = memory allocation + object initialisation am i correct?
@CatPlusPlus construction without allocation? then where would the contents be placed?
 
@lovesh It still requires a previously allocated memory region. It just doesn't do it automatically.
 
In a preallocated memory area.
 
oh thanks
 
@lovesh Yes, I think that's it.
 
11:43 AM
@RMartinhoFernandes can u please give a simple example of this?
 
char buffer[sizeof(T)]; T* ptr = new (buffer) T; Probably more complicated with alignment shenanigans.
 
void* mem = malloc(sizeof(foo));
foo* obj = new(mem) foo;
The allocation can also be done with operator new(sizeof(foo)); which allocates memory, but doesn't call a constructor.
 
Skype is such a piece of shit.
 
@RMartinhoFernandes thanks a lot
@CatPlusPlus alignment shenanigans?
 
@lovesh Dunno if that buffer would be aligned properly.
 
11:51 AM
Data structure alignment is the way data is arranged and accessed in computer memory. It consists of two separate but related issues: data alignment and data structure padding. When a modern computer reads from or writes to a memory address, it will do this in word sized chunks (e.g. 4 byte chunks on a 32-bit system). Data alignment means putting the data at a memory offset equal to some multiple of the word size, which increases the system's performance due to the way the CPU handles memory. To align the data, it may be necessary to insert some meaningless bytes between the end of the la...
 
every time @CatPlusPlus says someting which makes me feel dumb and then @RMartinhoFernandes says something which makes me feel i can improve. :)
 
Is standard-layout enough to use memcpy, or is PODness required?
 
12:09 PM
@CatPlusPlus why?
 
@TonyTheTiger It's the first IM I've ever seen that hangs and freezes every other day. Not to mention it's slow as hell.
 
@CatPlusPlus it is a bit slow, but guess what, it's MS owned now
lol
 
Maybe they'll ditch the current UI completely, then.
 
mine's just updating, after I just opened it
 
@RMartinhoFernandes when we say void *p=malloc(99) should'nt the compiler padd it automatically to fill 100 bytes. i checked my compiler for sizeof(p) and it shows 99 bytes?
 
12:24 PM
I want to create a subrect of my window in Qt for doing OpenGL graphics stuff on it, do I just create a class derived from QGLWidget that defines the boundaries of that rect? Can someone give me some guidelines?
 
It's a widget, so it'll have positioning/sizing members.
There are several OpenGL examples.
 
hmmm yes, I see they just add the widget to a part of QHBoxLayout object, so I guess the widget then stays within those boundaries.
 
Layouts are generally a better idea than manual positioning and sizing.
 
12:40 PM
hi
@RMartinhoFernandes Must be "trivially copyable". There's a type_trait for it
 
12:52 PM
OMG!!!!
EPIC NEWS!!! I have a job interview for C++ job in game industry (they do hardware/software)
 
Hardware?
 
@TonyTheTiger ooh cool, who and where and when? :)
also make sure to read up on everything so you can ace it ;)
EVERYTHING!
 
@jalf Brussels
I think it's gonna be hard
@CatPlusPlus kinetics, motion detection etc (like the playstation move kind of thing)
@jalf its gotten with the CV you helped me create :)
 

« first day (311 days earlier)      last day (4629 days later) »