« first day (214 days earlier)      last day (4734 days later) » 
00:00 - 16:0016:00 - 00:00

4:00 PM
day, day :P
so, how has your day been?
 
4:14 PM
laze-tastic
 
Als
4:36 PM
@TonyTheTiger: Hello there!
 
ZOMG.... ugh....
So I finally get the difference between lvalue and rvalue. Then xvalue pops in and says, I'm not l or r, but x and r is pr and x and l is gl. WTH....
This is worse than understanding a clopen set
Can anyone explain when to know that a xvalue isn't an l or an r value, and when it is a gl or pr value?
 
78
Q: What are rvalues, lvalues, xvalues, glvalues, and prvalues?

James McNellisIn C++03, an expression is either an rvalue or an lvalue. In C++0x, an expression can be an: rvalue lvalue xvalue glvalue prvalue Two categories have become five categories. What are these new categories of expressions? How do these new categories relate to the existing rvalue and lva...

 
I read that already
I'll try again.
So, pr excludes x. gl includes x.
 
I dislike the highest-voted answer's treatment of "object"
"variable" would be better
 
> You can't force a programmer to do anything except jump through hoops.
 
4:44 PM
The result of calling a function whose return type is not a reference is a prvalue
That's the part I don't get
 
all glvalues are associated with variables, even if you can't see the variable name
 
What the hell wouldn't be a reference.... does he mean a real value.... like (5).
 
int global_var; int& f() { return global_value; } // the result of f() is an lvalue, even though code calling f "can't see the variable name"
@Xaade int g(); // g returns a prvalue
literals, such as 42, are also prvalues
 
Ok..... so pr is a primitive.
 
no, the "p" is pure
 
4:46 PM
I know
 
you could replace int in my g example with a UDT
 
prvalue is NOT an object that can expire
 
no, that part of that answer is misleading too
all rvalues, including prvalues, are "nearing the end of their lifetime"
or "expiring"
 
nearing end of lifetime, meaning nearing end of scope or accessibility?
 
scope controls lifetime, not the other way around
but that's not going to be helpful
given some type T, "T()" is a prvalue, it is a temporary object
 
4:49 PM
I thought scope ~= (equivalent) lifetime.
 
for variables, yes
because the scope of a variable controls its lifetime
 
T() is a prvalue..... meaning it's not an xvalue, meaning it's not about to eXpire?
 
T() is a prvalue, meaning it's not an xvalue, but it is still "nearing the end of its lifetime"
 
Then what's the usefulness of designation xvalue?
If I don't consider xvalue it all makes sense.... soon as I try to understand that.... it all becomes muddy again.
 
The x in xvalue is just an x. It means nothing special.
xvalues are everything that isn't an lvalue or a prvalue.
 
An xvalue (an “eXpiring” value) also refers to an object, usually near the end of its lifetime (so that its resources may be moved, for example). An xvalue is the result of certain kinds of expressions involving rvalue references. [Example: The result of calling a function whose return type is an rvalue reference is an xvalue.]
A prvalue (“pure” rvalue) is an rvalue that is not an xvalue. [Example: The result of calling a function whose return type is not a reference is a prvalue]
AHHHHHHH
I think I got it....
It all revolves around 2 properties.
Whether a "thing" object or otherwise can or cannot be moved.

Whether a "thing" has an identity (a name that can be referenced).
prvalue doesn't have an identity. lvalue cannot be moved. glvalues may or may not be moveable (whether they are x or not), and rvalues may or may not have identities (whether they are pr or not).
 
@sbi I'm amazed at how stupid Sony can possibly be.
 
you got it
 
hilariously stupid, obviously :P
 
5:01 PM
@FredNurk Oddly enough, I understand the i-m-I-M terminology way easier than l-gl-x-r-pr
 
"Remember all that compromised information from a while back? Of course you do! It was yours! We're treating it as valid again."
2
 
@MartinhoFernandes This combined with the fact that particular companies are now going multiplatform (looking at you squaresoft), maybe the thing that makes me leave playstation.
Last time I checked, I can't remember MS shutting down indefinitely whenever they get hacked.
 
@Xaade When did that happen?
 
I'm working on trying to understand why all the authentication data and confirmation data and payment data were all accessible with one hack, much less on the same server in the same location.
 
-1
A: Distinguishing Pass-by-Reference and Pass-by-Value

DeadMGIt's typically preferred not to pass by non-const reference if possible and to use the second form. This is because firstly, the second sort plays much nicer if you want to pass the return value to another function, and secondly, because the compiler's optimizer will deal with unnecessary copying...

noes, anonymous downboat :(
 
5:08 PM
@DeadMG Gotta hate those downboats..... Next to impossible to travel up in them.
 
honestly, I don't mind downvotes or being downvoted
but it does seriously fuck me off when there's no comment
I mean, it's not like there's an existing comment and the other guy could be just like, "Well, what that guy said about his downvote"
 
@DeadMG Maybe they don't understand why you think pass-by-reference is bad, since you may want to sort the actual thing you passed in.
 
@FredNurk Wow, you never downvoted?
 
check my profile
 
ret = sort(ret);, oh noes, terribad
1393
Votes Cast
all time by type month week day
1393 up 610 question 219 45 4
no downvotes recorded
 
5:12 PM
@DeadMG So you can't modify a const-reference, but you can assign to it?
 
@MartinhoFernandes I have some vaguely-strong ideological reasons for that, but no time to go into them now
 
no, if you're the caller
the difference between vec = sort(vec); and sort(vec); is trivial on the calling side
so there's really no point
 
@MartinhoFernandes If I ever downvote, I try to remove before the vote is locked in, I messed up once. Reason being, my whole point is to encourage someone to make a change, if they don't respond within the lock period, they never will.
 
@MartinhoFernandes however, prog21.dadgum.com/57.html does a decent job of introducing most of it
 
@Xaade: What if they went to sleep after posting?
the lock period is only about five minutes
you'd have to wait days to ensure that they actually chose not to respond
 
5:14 PM
And if they edit, you can take it it back.
 
yeah, but not if they comment
 
@DeadMG Hmm.... I think I should post on Meta to remove the locking mechanism for downvotes.
 
if you downvoted them, for example, because you misread the answer/question, then they comment telling you that you didn't, then you're fucked
 
I think the locking mechanism defeats the intended purpose.
 
in my opinion, the locking of anything is stupid
it's my comment/vote/answer/chat sending, it's under my control, end of story
 
5:15 PM
Locking upvotes makes sense.
 
seriously though, overloads of the same name with completely different behavior are the primary cause of death among kittens: stackoverflow.com/questions/6048280/…
 
no, it doesn't
again, what if you just misread the answer?
just for the simplest example
 
The locking is there to prevent some jerks from doing "tactical downvoting".
 
@FredNurk Overloads should accomplish the same thing, only differing in their accepted arguments and returns.
 
Or something.
 
5:17 PM
@Xaade see the linked answer; he proposes completely different behavior
 
@FredNurk Good thing compiler stops him.
 
@Xaade it doesn't, the proposed overloads are on T& and T const&
 
perfectly legal to overload on constness like that
 
hmmm
oh well.... not my code.
 
I think he could just have one function that does both jobs
with some "proper" application of metaprogramming
 
5:18 PM
I rarely overload unless I want to reduce arguments (instead of allowing default parameters), or on a constructor.
 
I also don't overload often
especially since rvalue references means that copying is much less of a big deal for me
 
@DeadMG WORSE idea than what he has.... now you don't even know they do different things, unless you have the code.
 
there is no "they", it's just one function
 
@DeadMG I've dealt with the god-method / god-class constantly.... it's evil.
 
but, on reflection, you could only use that kind of technique if you could overload operator= on the class
 
5:20 PM
@DeadMG Having one method that performs differently based on the type of argument passed in is worse than overloading two methods that perform differently.
 
no, it wouldn't be based on the type of argument
you return a proxy object with a conversion operator
 
@DeadMG Having one method that performs different operations is bad.
 
if the conversion operator isn't called, then you know that nobody took the return result
it performs the same operation- sorting it's argument
 
No it doesn't
It either sorts the argument, or creates a sorted copy.
 
"Make x be sorted" != "Produce a sorted copy of x"
 
5:23 PM
before you call the function, you have non-sorted data, and after it returns, there is sorted data
the only difference is where you put the sorted data
 
And if the user doesn't have source available (they loaded a dll), they're screwed on knowing that there is a difference or not.

There's no reasonable expectation that the original argument (when passed by reference) is the one sorted.
 
@DeadMG and what happens/does not happen to the original input.
 
Let me ask you, what if I had an array that contained Original added order, and I mistakenly pass by reference instead of by value, and I lose my Original added order.
 
it's not about that, it's about taking the return value
if you don't take the return value, then you must intend for the original to be modified in-place
 
Oh god, that's even crazier.
 
5:25 PM
@DeadMG your "only difference" is exactly what Martinho just pointed out!
 
Which is a real-case scenario, because I have a grid where the items added order is significant, and I don't want to include a column just to preserve this sort option.
 
@DeadMG auto x = sort(y); is not the same as sort(y); for the exact same y?
 
@DeadMG auto x = deadmg_sort(input); // where does your conversion operator get called?
 
Is that what you mean?
 
I prefer the name of the method to convey the meaning of its operation. Not the argument list.
4
 
5:26 PM
@Xaade: Don't know why you keep talking about the argument list, it's the same
well
it's true that in the case of automatic type deduction, you could have a slight problem
 
gcc has been compiling for over an hour, of course there's no progress information shown sigh
 
I hadn't considered that
 
you'd think I'd remember this kind of thing from last time
 
What are you compiling?
On what are you compiling?
gcc now for Tandy!!!
 
ok, slight change
 
5:29 PM
@Xaade oh, I guess that was ambiguous :) I did cd ~/code/gcc; git pull; ./configure; make
 
sbi
> The Commando Pattern is used to get in and out quick, and get the job done. This pattern can break any encapsulation to accomplish its mission. It takes no prisoners.
 
@Xaade my laptop is several years old, so that doesn't help
 
sbi
Haha!
 
@sbi Typical pattern use in a non-formal environment.
 
@sbi nice title: Resign Patterns
Ailments of Unsuitable Project-Disoriented Software
 
5:32 PM
I suggest that every programmer should have to maintain my product for a period of 3 months as training to teach what not to do.
 
rlc
@FredNurk pretty much the same reason why there are so few comments on my blog: my policy is that it has to add value to the content on the blog (not just comment on it or talk about it). I do answer all the comments, though, even if I don't post them
@DeadMG: I haven't downvoted your answer, but I did notice that it didn't answer the question..
 
Not for Programming 101: Professor Xaade: List of topics include: God-Classes, multi-inheriting from several God-Classes, Using external painting class to paint faux controls, instead of using owner-draw controls, Using broad settings instead of deriving several times to create unique controls, Deriving from a base class that contains a pointer to the window of the derived class instead of deriving from a enhanced base cwnd class.
 
@rlc if I ever publish a blog, I think I'll make "private comment" the default, where you check a box if you want to encourage me to include your comment on my blog publicly, but the ultimate decision is up to me
 
pretty sure that I covered a lot of reasons why you'd want the first one
 
@sbi on a mission to abolish all known OO patterns?
 
5:38 PM
@FredNurk I would like their to be two separate comment areas, one public trash area, and one public moderated area. I find trashy comments amusing, but would like them collapsed by default.
 
rlc
@DeadMG yes, but the question was why you can't do both at the same time
 
goddamnit
 
that means someone (probably me) would have to administer the trash area
 
I can't make automatic type deduction live with lazy evaluation
 
@TonyTheTiger I'm beginning to realize that if there was such an important OO pattern that's useful enough to be repeated so often, why not see if it can be a template... otherwise, stop implementing it so often, because it's not generic enough to be applied so religiously.
 
5:40 PM
@Xaade hmm, I do agree that patterns can be used somewhat too often
 
@TonyTheTiger E.G. Singleton
 
but a pattern that actually fits the situation that you are using it for, surely can't be wrong
abuse is always easy, correct use is always hard
 
@Xaade people do (try to) write a singleton template
 
it's not difficult to write a singleton template
 
rlc
@FredNurk Alexandrescu's singletons are a good example of that
 
5:41 PM
@Xaade the problem is such a class template doesn't alleviate any of the problems of trying to force a single instance in the class itself, even if the class itself doesn't actually prevent multiple instances
 
49 mins ago, by sbi
http://www.engadget.com/2011/05/18/psn-logins-exploited-again-sony-takes-sign-in-pages-offline/
 
@FredNurk sorry didn't see that
 
no need to be sorry, just pointing it out :)
 
oh ok
 
5:43 PM
from the engadget article, they weren't cracked again; but anyone with the previously purloined info could use it to reset any account
 
@FredNurk obviously Sony isn't taking it seriously enough or their security personnel have no idea how to make the system fool proof
or rather, patch the hole
really a dev job I guess
 
If Singleton templates lower the barrier of using Singletons even more, I'm strongly opposing them.
 
@FredOverflow yep me too!
 
@TonyTheTiger well, they could've noticed they're susceptible to this before bringing it back up, but if someone steals all of your customers' data, how exactly would you implement password resets? :(
I suppose you'd have to rely on the security of customers' email login systems, and if you didn't hash passwords, hope they didn't duplicate login info
 
@FredOverflow I tried to create a simple sfml window yesterday using a basic console app under VC++ 2010 but for some reason I get an access violation
 
rlc
5:47 PM
@FredNurk use the serial # of the game console, perhaps?
 
could it be that it needs to be another type of app?
 
@TonyTheTiger That is not enough information to help you out, sorry.-
 
@rlc if that was included in the customer db, assume the attackers have it
if it wasn't in the customer db, how do you associate the serial number with an account?
 
rlc
@FredNurk agree - it's just the first thing I thought of that might not be in there..
@FredNurk you wouldn't: they'd have to create new accounts or get the info from the console itself, if it's stored there..
 
5:49 PM
I may be missing information on the original PSN hack; I don't know if all the customer data was potentially exposed or not
 
@TonyTheTiger Is that official example code?
 
but I posed the above more as a theoretical question :P
 
@FredOverflow I literally copied the code to create a window
the main etc... is what MS VC++ creates
 
Maybe you are not allowed to go to full screen for some reason. How about opening a normal window?
 
I've thought the alternative to a singleton is a factory that uses GUIDs or other identifiers. The factory could provide access to the "singleton" or even convert the singleton to a different type (by copy-constructing a different type and returning that), as long as both types share a base class/interface.

This solves the problems of having it be tightly coupled and having the code rely on a certain type, while allowing the user to enforce singleton referencing and global access.
 
5:52 PM
@Xaade the alternatives to a singleton are either 1) passing the object to each function (including passing it to a constructor and storing in a data member as a reference) or 2) using a global
 
@Xaade How is a global id for an object any different from a global name for an object?
 
rlc
@FredNurk ruling out 2, that leaves 1
 
@FredNurk I thought the point of a singleton was to avoid passing around an argument to 50 methods that don't use it, to get to one method that does.
 
#2 can be wrapped in a function if you want lazy-init, etc., but the key is you describe the purpose of that variable rather than the side-effect of "this is one thing used many places"
 
@Xaade You don't pass objects unless they are needed.
 
5:54 PM
@rlc it doesn't always make sense to rule out 2; e.g. logging
 
rlc
@FredNurk the purpose of the variable should be clear from the name of the singleton anyway
 
@rlc Yeah, like cout. Wait, what does that stand for, again? :)
 
rlc
how is Logger::getInstance() any different from clog ?
 
@FredOverflow A calls E returns calls B, B calls C, C calls D. D and E needs an object that A must instantiate. How do you get object from A to D without passing it through B and C which don't use it.
 
@rlc clog implicitly means stderr logging, "Logger" says nothing about destination
or about flushing behavior
 
5:56 PM
@FredOverflow not sure, but I tried your suggestion: imagebin.org/153876, imagebin.org/153877
no go obviously
 
rlc
clog can be redirected as well
 
"clog" is a poor name, however
 
rlc
so it doesn't inherently say anything about flushing or destination either
 
@TonyTheTiger What is the value of VideoModesCount?
 
@FredOverflow In those cases you either pass through B and C which don't use the object, such that B and C have arguments they don't use. Or you have some method of global or semi global access.
 
5:57 PM
@rlc sure it does, through convention and documentation
 
@FredOverflow VideoModesCount = 51
 
Hence singleton.
 
rlc
@FredNurk the same can be said about Logger
 
Unless you can get to the object that contains method D, and pass the reference to the object before calling down to D, but now a bunch of classes share a reference to your object..... which isn't much different than global variable.
 
@rlc no. classes are behavior ("logging"), variables have purpose ("logging to stderr")
 
5:59 PM
sf::RenderWindow window(sf::VideoMode(800, 600, 32), "Lounge<C++>");
while (window.IsOpened())
{
    // ...
}
@TonyTheTiger Does that work?
 
@FredOverflow what include is RenderWindow in?
 
@Xaade I'd rather pass an object down explicitly than having an implicit dependency.
#include <SFML/Graphics.hpp>
 
@FredOverflow Really, then you can't avoid passing it through methods that don't use it to get to a method that does use it.....
 
rlc
@FredNurk you're assuming that convention is used universally?
 
And what is Win32 API calls, other than implicit dependency, especially if you happen to have an hWnd handy.
 
6:01 PM
@Xaade If D and E need an object that A instantiates, why doesn't A pass it to D and E?
 
@FredOverflow Because A doesn't call D directly. A calls B calls C calls D.
 
rlc
Logger::getInstance(Logger::stderr__, ...) << message
 
Therefore in that hypothetical, B and C must have the object as an unused argument.
 
rlc
arguably more verbose than clog << message, but no less valid
 
@FredOverflow nope, doesn't work
perhaps it's just not compatible with MS VC++ 2010 yet
 
6:05 PM
Is there no simple VS 2010 project one can download?
Are you using dll or lib?
 
@FredOverflow dll
@FredOverflow not that I've found, only for 2008
 
You can import those.
 
@FredOverflow uploading a project inherently increases complexity by an order of magnitude, so while there are simple projects, there are none you can download
 
@TonyTheTiger Did you add the library path to your project in the linker settings? And did you add the libraries?
 
@FredOverflow yes
 
6:08 PM
@TonyTheTiger Make screenshots of those settings and post them here.
 
Don't use semicolons to separate the file names, use spaces.
sfml-system-d.lib sfml-graphics-d.lib sfml-window-d.lib
Also, what is the % stuff that comes after that?
 
@FredOverflow not sure, but it adds that automatically
they changed a lot of this stuff in 2010
 
What is it, I can't read it here, screenshot ends there :)
Does it work if you use static libraries instead of dynamic libraries?
sfml-system-s-d.lib sfml-graphics-s-d.lib sfml-window-s-d.lib
 
6:16 PM
@FredOverflow removed it before I could post it
@FredOverflow no
 
Can you put a breakpoint on the line where it crashes and then step into the call to see where it actually fails?
(That's what debug builds are for, right?)
And please don't tell me you don't know how to debug ;-)
 
@FredOverflow yea I know, I have done that, it fails even before it gets into the ctor of RenderWindow
the last thing it goes through is the ctor of WindowSettings
next step it crashes
 
And have you looked at the SFML forums for similar problems?
 
first gonna try it under vs 2008
 
@TonyTheTiger It seems that could solve the problem...
 
6:22 PM
@FredOverflow it works under 2008 :)
interesting :P
Thanks for the help @FredOverflow :)
 
rlc
6:45 PM
This is amazing: bellard.org/jslinux
I wonder how anyone finds the time to do such a thing :-)
 
@rlc I don't see an SO account for him
 
rlc
@FredNurk that might explain it :-)
 
7:17 PM
@rlc It doesn't do anything with the dir command, how useful can it be?
 
rlc
@Xaade have you tried ls?
there's a hello.c file and a compiler
 
open doesn't work
 
rlc
?
cat hello.c
vi hello.c
emacs hello.c
all if which work
 
7:39 PM
geez... that's what's wrong..... I'm thinking up DOS commands instead of linux ones....
 
@rlc Don't forget he wrote that: de.ioccc.org/2001/bellard.c
(It is "just" a C compiler at least able to bootstrap itself)
@rlc I think he wrote that version of emacs as well.
 
@AProgrammer WTH, he compressed the code using defines?
 
@Xaade, see de.ioccc.org
 
@AProgrammer Oh I love macros.... there must be some limitations.... otherwise, I can make it so confusing it could never be read.
 
@Xaade I suggest you learn TeX. The macro language is interesting.
 
7:51 PM
@AProgrammer It started out as a frustration over bad use of macros, and developed into a love of confusing/complicated macros.... more or less a love of the irony of the pain they cause.....
I'm insane aren't I? It sounds similar to Stockholm syndrome. That's insane isn't it?
 
In psychology, Stockholm syndrome is a term used to describe a paradoxical psychological phenomenon wherein hostages express empathy and have positive feelings towards their captors. These feelings are generally considered irrational in light of the danger or risk endured by the victims, who essentially mistake a lack of abuse from their captors as an act of kindness. The FBI’s Hostage Barricade Database System shows that roughly 27% of victims show evidence of Stockholm syndrome.G. Dwayne Fuselier, “Placing the Stockholm Syndrome in Perspective,” FBI Law Enforcement Bulletin, July 1999,...
 
It's a survival instinct.... not a syndrome. At least IMO.
If you become empathic to your captor.... you have a greater chance of survival, because your empathy can impede the captors motive for harming you.
Either they become sympathetic, they get their illusion fulfilled (they may be torturing you, then suddenly realize they want you to be their child), or they no longer enjoy the pain they cause because you are not suffering.
 
I don't see how that makes it less of a syndrome
 
Is it any different from a dog becoming attached to their owner?
Being captive doesn't automatically assume abusive captivity.
Cats self domesticated due to survival advantages.
 
Perhaps you're not using the word 'syndrome' the way I do then
 
7:58 PM
Ah, I'm using the cultural definition.
Technical definition means a set of symptoms that occur together.
Cultural definition implies a problem.
I don't really understand the real definition, because it doesn't seem to be all that helpful.
In which case commonly associated features would qualify.
Animal pack instinct would be a syndrome.
 
rlc
@AProgrammer that's otcc. tcc is a more complete and non-obfuscated version of that
@AProgrammer yes, he did
@Xaade chickens are a much better example, IMO: they are eaten but wouldn't otherwise have been so successful
 
@rlc Thank you....
Lesson learned, chickens have Stockholm syndrome.
 
8:30 PM
@Xaade That would be true if your emotions had a real influence over your captors' emotions, which isn't necessarily the case. You could make about as good of a case for being captured teaching people to act well. Also note that it depends critically upon the captors doing at least a little can be perceived as kindness. I don't see any reason that would be the case if it really was survival instinct.
 
when you have something like 1.f in an OpenGL function as arg, does the f just mean it's a floating point value?
 
@TonyTheTiger Indeed, 1. would be a double literal by comparison
 
@TonyTheTiger 1.f means a float literal rather than a double literal; doesn't matter what you give it to
 
@FredNurk so I guess it's just an OpenGL convention to pass it like that or is that how it should be done?
 
Depending on warning settings you can get error messages due to the narrowing double -> float conversion
 
8:38 PM
@JerryCoffin Anything can be perceived as kindness. Captor passes out drunk and forgets to beat his victim.
The victim would be appealing to that "kindness" in an effort to reduce pain.
It would require a lot of desperation on the victim's part, but it's definitely an effort to survive.
 
I'm not sure what this clock.elapsedtime() function does in relation to the rotation of the frame that's being applied, but does anyone know what that is called, how should I google it for an explanation: glRotatef(Clock.GetElapsedTime() * 50, 1.f, 0.f, 0.f); ?
 
@TonyTheTiger If all the parameters were constant the frame wouldn't move
with this however the first parameter is a function of time
(sort of)
Also it's independant of your FPS
 
@jalf, @AProgrammer: don't suppose you'd agree [function-object] should be aliased to [functor]? stackoverflow.com/tags/functor/synonyms
maybe others have the required score; I don't
 
if e.g. the first parameter were increased by a constant each frame, the rotation speed would depend on how many times glRoratef is called each second
Does this make sense?
 
@LucDanton so the clock time influences the rate at which the object rotates, if it wasn't there it would 'rotate' in relation to the fps of the screen?
but don't we have to reset the clock then on every frame?
for that to work
 
8:48 PM
@TonyTheTiger It's not so much the clock time but the function of time (so here since it's linear it's the 50 coefficient. So if you change that 50 to 100 you'd see the frame rotate twice as fast.
 
@LucDanton my frame doesn't rotate...
or the cube
 
@TonyTheTiger If you're doing a tutorial/following an example you'll have to refer to that
I don't know what glRoratef does in particular
(and what the parameters mean)
 
@LucDanton oh ok
well thanks for the explanation of what it does, I think I get it, but I will probably need to read up a bit on things
 
@Xaade Nearly anything, anyway. The point, however, is that purely as a survival instinct perceiving something as kindness wouldn't be necessary at all -- quite the contrary, the more unremittingly cruel the captor was, the more desperately one would work to influence them to be less so.
 
more like, the harsher you perceive your captors, the more likely you are to give up
 
9:14 PM
hmmm OpenGL matrix stack
interesting :)
 
9:33 PM
bad
 
hi, I am interviewing for a C (not C++) video engineering programmer co-op position tomorrow. On my resume, I said that I am 'advanced' in C. What level of questions should I expect? Any specifics to go over before the interview? thanks in advance
 
10:02 PM
you should search on programmers.stackexchange.com
they frequently have interview-related questions there
 
whats bad @DeadMG?
 
a matrix stack
 
why?
I don't entirely get its concept yet, but you can tell me why its bad anyways
and what is the good way then?
 
well
it's bad because you're trying to reason about implicit variables that you can't see
it doesn't clean itself up
and the good way would be to have a Matrix object/class
 
implicit variables being the transformations,etc you place on the stack?
 
10:12 PM
the number of OGL questions I've seen on SO which summed up as "I forgot a glPopMatrix()"
yeah
 
but I don't see how you could solve that with a class
this is a data structure
 
well, not by implementing it on top of that
but if you look at Direct3D, then you just have a Matrix struct, some operator overloads, and that's it
no implicit variables, no missing pushes and pops
 
what's it called in Direct3D?
 
D3DXMATRIX or XNAMATRIX
D3D10/D3D11 aren't tied to a specific mathematical supporting library, and you can use the old D3DX9 ones or the new XNAMath
or roll your own if you really want
 
but the opengl matrix stack is to control the sequence of transformations, this is just a struct with some operators defined on it
as far as I understood it
 
10:16 PM
yeah
but if you do
D3DXMATRIX result = RotationMatrix * TranslationMatrix;
then that's just as controlled
 
oh I see
 
except it's not implicit, and it's controlled easily, and much more foolproof
 
oh yea, I see that
true
 
and nobody ever forgot to pop result off their stack, cause guess what? compiler does it for you
 
 
1 hour later…
11:42 PM
(a) C++11 doesn't exist yet, so shush
(b) wtf's going on here? this doesn't look like usual SO format, and the sole deleter isn't a mod and has like no rep
ah, the deleter is the OP
still, I'm sure there's something odd here
 
room topic changed to Lounge<C++>: C++0x is dead, long live C++11! (even if Tomalak says it doesn't exist)
 
00:00 - 16:0016:00 - 00:00

« first day (214 days earlier)      last day (4734 days later) »