« first day (375 days earlier)      last day (4565 days later) » 

1:00 PM
:)
 
@RMartinhoFernandes yes , but not very strongly
 
@acidzombie24 It collects a list of candidates. And then picks the most appropriate one according to a set of complicated and never ending rules. These rules take conversions in consideration.
@MrAnubis Well, an lvalue is something that has an identity. This means you can take its address.
 
sbi
@RMartinhoFernandes Not yet, but I have it open on my desktop...
 
@MrAnubis Since it is an lvalue, you can do this: ideone.com/A2KR5
 
got an article , really helped accu.org/index.php/journals/227
 
1:04 PM
Also note that there are a few more something-values in the neighborhood with C++11.
 
user34537
FML i cant remember how to write a conversion op. ideone.com/ZRLVX
 
@acidzombie24 Needs to be a member :)
 
user34537
i tried, no luck
 
@RMartinhoFernandes Thanks :)
 
user34537
ohhh
 
1:06 PM
Syntax is a bit off too. Try this: ideone.com/TyYcM
You can see the list of candidates it picked in the compiler error.
 
user34537
ah ha, its operator char*(){...}
 
user34537
wait
 
Pastebin filtered as Personal Network Storage and Backup.
Awesomesauce
 
@Xaade What? You mean you can't use pastebin at work?
 
I'm using pastebin as personal network storage. All I have to do is base64 encode all my files.
@RMartinhoFernandes occasionally I get portions of the page to work.
 
1:10 PM
What?
 
user34537
So its true... this does work http://www.ideone.com/e4s4L
I had no idea it would look for `-` in a conversion
 
I use my facebook status as a temporary copy/paste buffer. It's usually more descriptive than the crap my friends post in their statuses. Though it's a bit weird if I get a like.
 
user34537
@RMartinhoFernandes How did you remember that conversion op? Its been so long since i used it but i remember teaching it to ppl
 
I'm using C++ with some frequency these days.
 
1:11 PM
@RMartinhoFernandes so assignment operator in expression results in lvalue , right?
 
(And I have a good memory too :)
@MrAnubis Yes, assignment operators return lvalues.
 
user34537
whats the dif between lvalue and rvalue?
 
user34537
i get the impression rvalue you can still use . or -> on. So.... whats the dif??
 
An lvalue has an identity. This means it has storage associated, so you can take its address.
 
@RMartinhoFernandes cracked.com was previously filtered under category "Tasteless". You're filtering due to "tasteless"ness.
 
1:13 PM
@Xaade What's cracked.com? Do I want to know?
Oh, humour site.
 
@acidzombie24 read this also accu.org/index.php/journals/227
 
@RMartinhoFernandes It's a humor site, mostly in the form of X things of this category which make it funny.
Magazine style I suppose.
 
So, where do you work exactly? Eurasia? Eastasia?
 
user34537
i think T& operator[](T*, ptrdiff_t) is invalid... where can you put it to not have it an error?
 
Microsofr(R) C/C++ Optimizing Compiler has stopped working
grrrr
 
1:17 PM
@acidzombie24 operator[] can only take one parameter :(
 
all from trying to change a declaration to auto.
 
user34537
@RMartinhoFernandes exactly but that link shows what i pasted
 
And you can't overload operators for builtin types, if that's what you're trying.
@acidzombie24 Oh, I see. That's referring to what the builtin operator would look like.
> For every (...) object type T there exist candidate operator functions of the form (...) T& operator[](T*, std::ptrdiff_t);
 
user34537
&-f; ----> The negate operator is of the form T operator-(T) and therefore -x is an rvalue.
I can still take the address here...
 
user34537
Foo& operator-(Foo&a) {return a;}
 
1:21 PM
No, you can't.
@acidzombie24 But that's your custom operator.
 
@RMartinhoFernandes I work in a office with white walls, white ceilings, and white floors. Where it's frowned upon to have more than a couple of pictures.
 
If you write Foo operator-(Foo&a) {return a;}, it produces an rvalue.
@Xaade Sounds like Oceania :)
 
Apparently distractions impede productivity, but general sanity is not required.
Which makes sense when I look at the source code.
 
user34537
ok but you said you cant take the address of a rvalue (unless you meant lvalue is guaranteed to have an rvalue)
 
1:23 PM
Comments are Captain Obvious rambling.
 
@acidzombie24 Yes, you can't take the address of an rvalue.
 
Man, you know what other feature in C# I'd like to see in Visual C++? "Hey, you just changed a class/property/method/delegate/etc name. Want me to go fix up the rest of your code because of that stupid typo you made last night whilst drunk?"
 
I have a light, but even that is blocked from view.
 
@acidzombie24 look at the error: ideone.com/kwFVg
 
there is texture n the ceiling though.... I suppose its there in case gravity turns off, so I know which way is up.
I now have three monitors though.
 
1:25 PM
At least there's an upside then :)
 
lol
 
user34537
var + 1 = 2 + 3; // error, var + 1 is an rvalue
ummmm it isnt is i declare Foo var; instead of int var;
 
If you make your overloaded operators return lvalues.
 
user34537
-_-
 
user34537
well you cant say rvalues cant do it if an operload exist....
 
user34537
1:26 PM
overload*
 
yeah, but I used the new third monitor for email and this website project management stuff. So they'll get off my back for not using it.
 
If your overloaded operators return rvalues, you can't take the address.
 
user34537
so its only an rvalue if it returns an rvalue and rvalues are native types like int....
 
They asked me to put more comments on my project status, so now I occasionally add, "Still working on it."
 
so what would be the best way to keep track of positions of the squares on my canvas?
 
1:27 PM
@acidzombie24 No, it's orthogonal to that. You can have int lvalues.
Given int x;, then x is an lvalue.
 
I was thinking divide it into a grid, but then I'd have to move my squares by size of one grid square
 
user34537
@RMartinhoFernandes: This is very confusing then. Sometimes something is an rvalue but sometimes the same expression is an lvalue cuase of something else in code.... (and i'm not talking about #define 's)
 
@acidzombie24 It depends on what is involved.
 
@TonyTheLion class Point { int x; int y;};
 
If there are custom operators involved, you need to take those in consideration.
If a function returns a reference, it is an lvalue, because you can take the address.
 
user34537
1:29 PM
An rvalue cannot be used to initialise non-const reference <--- thats much better
 
@acidzombie24 Right, but that is no longer 100% true in C++11 :)
 
user34537
O...M...G... WTF
 
@acidzombie24, the easiest way to remember it, is that an expression is a generic term. Like the english-language, it can be many, many things. All the things, and none of the things. When dealing with lvalue and rvalue semantics, as R. Martinho pointed out, the lvalue has an identity. Expressions can therefore become something with an identity.
 
@acidzombie24 Best not go there yet.
:)
 
user34537
lets just throw that terminology away
 
1:31 PM
But it's actually important!
 
@acidzombie24 + means very little on it's own. You have to look at it like operand1 + operand2 is actually result = +(operand1, operand2)
 
"operator+" you mean.
 
meh..... pseudo code
there's no result = either
 
@Xaade oh, and what coordinate of the square would you take? Top left corner?
 
point being, you're setting a temporary value to operator+(op1, op2).
 
1:32 PM
I've seen many explanations of this lvalue thing, but they all seem to miss the point of it all, which is identity.
 
user34537
@Xaade i like that.
 
@TonyTheLion I typically go with center, if it's an even length, I go with top-left pixel of center
unless you use floats to represent the .5
 
user34537
hmm. if rvalue=temp value and lvalue = it has a nontemp address somewhere (ie what was returned was a reference or ptr) then i'll remember it as that
 
@TonyTheLion, I told you center last night :D
 
@acidzombie24 That's it!
 
1:35 PM
@MooJuice last night, I was confused :P
@Xaade oh interesting
 
Ok, well how's it going? Did my suggestions work?
 
If I have int f(int x) { return x; }, and int g() { return 42; } the call g() is an rvalue. But if I call f(g()), then inside f, x is an lvalue. If you can grok this, you got it.
 
@TonyTheLion it's center because you can do more things with center, like bounding box/sphere, distance, etc.
 
@MooJuice well, that was for the collision detection, I did solve that, not quite the way you said, but it works
 
user34537
Really, a fucking article could just say that at the top. Sure, people will understand it and wont need to read a whole page or more. But really if your writing that much for something as simple as what i said in two sentences then (it should be considered as) your doing it wrong
 
1:36 PM
you're* :)
 
I'm now need to solve the issue that when a square is at the bottom of my canvas, it needs to also act as a "bottom" for any squares landing on top of it. Which is why I need to know where any square is at a given stage
 
@acidzombie24 Yeah, but your simple explanation is lacking for more general purpose
 
user34537
@MooJuice i hate when ppl complain about that. One girl does it to me all the time. In emails i get that right (most of the time) but in chat... i am so lazy
 
It doesn't go into what can be moved or not.
 
@Xaade your* :)
:P
 
1:37 PM
grammar nazis
 
@acidzombie24 Why does it irk you? :)
 
And, l-values can be temporary.
 
user34537
@Xaade: I'm sure for the most part you'll realize temp values would get an error if you tried to modify it
 
@TonyTheLion Is the grid ginormous?
 
user34537
yeah? in what case is lvalue a temp?
 
1:38 PM
@acidzombie24 uh.... no?
 
user34537
you just said "And, l-values can be temporary."
 
As explained, an lvalue has an identity. Feel free to rape it as much as you like.
 
user34537
brb tho
 
and sure, they can be temporary as Zaade said
that just means anything you do to it is temporary also :)
 
int& f(); f()?
 
1:40 PM
class A { public int value; }; class B { A* getAnA() { return new A; }; int main() { (new B()).getAnA()->value = 45; }
 
Doesn't compile. But I get it.
 
A* getAnA() surely ?
 
@MooJuice Forgive him, he's been through some weird C++ <-> C# interops.
 
@RMartinhoFernandes no it's not that big
 
Sorry, I'm going back and forth between C++ and C#
 
1:41 PM
Ouch
Forgive completely
I know your pain.
 
@TonyTheLion Then instead of tracking where each square is (or in addition to it, if you need that for something else), track what squares are free on the grid.
Have a matrix of booleans or something.
 
@RMartinhoFernandes but if I split the canvas into a grid, I have to move my squares by one square on my grid, else I can have half filled squares. Or would that not matter?
 
@TonyTheLion Just to make sure I'm not confusing with someone else, you're writing a Tetris game, right?
(Everyone seems to be doing it these days.)
 
yea, just for lulz
 
@acidzombie24 you can send a temporary into a method, which would assign it a reference making it an l-value, but it's still temporary because at the end of that line of code, it dies.
 
1:44 PM
I assume there's only one moving piece at a time.
 
So you only set the grid squares as occupied when it lands.
 
but it can land anywhere
 
When moving, you check if the square below if occupied (which now is just a simple indexing operation).
If it is occupied, it can't move past it.
 
hmmmm
 
1:46 PM
oh, that kind of collision.
 
You'll also need similar checks when moving sideways.
 
he has to check each of his bottom most squares to see if they're about to hit a fixed object.
 
user34537
@Xaade: ah ha. Well.... To quote myself "hmm. if rvalue=temp value and lvalue = it has a nontemp address somewhere (ie what was returned was a reference or ptr) then i'll remember it as that"
 
11 mins ago, by R. Martinho Fernandes
If I have int f(int x) { return x; }, and int g() { return 42; } the call g() is an rvalue. But if I call f(g()), then inside f, x is an lvalue. If you can grok this, you got it.
@acidzombie24 Do you understand that example?
 
1:47 PM
@RMartinhoFernandes I can grok it :)
 
@RMartinhoFernandes either way, both are temp
 
@TonyTheLion Yeah, we've been through this with you a while back :)
 
user34537
i believe i do :)
 
It took me a while to understand it all, so you're not alone on that count.
 
You got it in you, then :)
 
user34537
1:49 PM
now i am thinking rvalue=a value as in byvalue while lvalue = byref/ptr
 
@RMartinhoFernandes you did indeed :)
 
Not quite. x is passed by value above.
 
user34537
but.... i think i get it. Maybe fuzzy on a thing or two but i think so
 
user34537
oh crap lol
 
user34537
are you sure inside f x is an lvalue?
 
1:50 PM
ok, so I have a vector<square> and I need to get the current one that's moving, when it hits the bottom and move on to the next square.
 
@acidzombie24 Yes. &x is valid.
 
it's simple. R-Value has no identity, L-Value has identity. Temporaries die at a certain point.
 
now I have this code to do the swap
std::vector<block>::iterator found = std::find(rects.begin(), rects.end(), *current_r);

	if (found != rects.end())
		current_r = &(*(++found)); //crash when it gets to end, as it tries to deref the one past end iter.
 
user34537
oh right cause like... copy constructor and such... i got it now
 
user34537
there isnt such a thing for x
 
1:51 PM
Inside f it gets an identity: x.
 
but there is a problem as you can see, now how could I best resolve this?
 
user34537
but i remember a few things now
 
user34537
i remember an error relating to returning Foo while Foo() was private.
 
@TonyTheLion Why the ++?
 
@RMartinhoFernandes cause I want to move on to the next one
 
user34537
1:52 PM
or was it Foo(Foo) being private taht got it... well something like that
 
user34537
i get it now
 
I'm finding the current one, and then using the returned iterator to move to the next item in my vector
it's probably the wrong way to go about it
 
Is the vector changing frequently?
You could just store the iterator instead of a pointer.
 
user34537
I got a Q for you guys. It may start a flame war but........... oh and it isnt language specific
 
In fact anything that would invalidate an iterator would also invalidate a pointer, so that's not an issue.
 
1:54 PM
&(*(x)) = x?
 
If you store the iterator, you don't need to "find the current". You just ++current.
 
user34537
@TonyTheLion why are you using a vector? why not deque or list?
 
@Xaade True for pointers, but not iterators.
 
user34537
deque > vector in ALL cases. Except one
 
&*it is a common idiom to get the address of the element an iterator refers to.
 
user34537
1:55 PM
and that one is when you need to access ALL the elements as a single large char* which should never happen
 
@RMartinhoFernandes iterators have some operator overload on * or &?
 
@Xaade On *.
Get the element referred to.
 
@RMartinhoFernandes well, it will have pieces added to it I assume
 
@RMartinhoFernandes operator overloads obfuscate.
 
@Xaade It's all because of pointers :(
@TonyTheLion And that could cause resizing and invalidate your pointer to the current. Have you considered if that's a problem?
 
1:56 PM
@RMartinhoFernandes use a template that returns the object.
 
@Xaade I didn't design the STL!
 
@RMartinhoFernandes so I'd literally have a variable std::vector<block>::iterator current = rects.begin(); just in my class?
 
myInterator = interator<Type>; myInterator.GetObject();
 
@RMartinhoFernandes meh, that would be a problem
 
@TonyTheLion Actually, that's pretty much the same as the pointer.
What I meant is that you can just ++current instead of looking for it in the vector and incrementing after.
 
1:58 PM
Or in C# explicit cast operator.
 
@RMartinhoFernandes oh cause the vector is contiguous in memory
 
@Xaade Or a traits class with a specialization for pointers.
@TonyTheLion Right, but keep the invalidation issues in mind.
 
hmmm, so when the pointer is invalidated, I'd need to reinit it?
 
@TonyTheLion Yes, you can't use invalid pointers, other than re-assigning them.
And that would mean looking for it again.
 
right
 
2:00 PM
Maybe you need to change your design a bit.
What's that vector holding btw?
(Don't say rects :)
 
a struct
 
Right, but what is it in the game?
 
the blocks that move
 
Blocks that were placed? Blocks that are coming?
@TonyTheLion Ah, the current falling piece?
 
Hey! Back again
Don't flee :)
 
2:02 PM
@RMartinhoFernandes the pieces that need to fall and the one that is falling
 
Is there a better way in C++ to find out if a class inherits another, other than using dynamic_cast and checking if the result was null?
 
though I'm not really removing the one's at the bottom atm, perhaps I should do that and put them in another vector
@LewsTherin I'm running :P
 
@MooJuice std::is_base_of in C++11.
@TonyTheLion I think you should separate the one that is falling from the other ones.
 
@TonyTheLion awww ye big scaredy cat :P oh wait lion xD
 
@RMartinhoFernandes oh... not sure I'm following your train of thought on the design here
 
2:04 PM
@RMartinhoFernandes So, if I have class A that derives from B, calling that on an instance of A (given B as the argument), will be true?
 
@LewsTherin growl
 
@TonyTheLion Maybe I'm misunderstanding what that code is for :)
 
@TonyTheLion more like miaow lol
 
@RMartinhoFernandes you're talking about the code I posted just earlier right?
 
@MooJuice std::is_base_of<Base,Derived>::value is a compile-time constant.
@TonyTheLion Yes.
 
2:07 PM
@RMartinhoFernandes right, well that code is supposed to change the rect that currently responding to move events to the next rect in the vector, when the current has hit the bottom of my canvas.
make sense?
 
@RMartinhoFernandes are you free? lol
 
@LewsTherin Does it look like it?
 
no he's busy answering my questions... like a boss :P
 
@TonyTheLion Ok, so the vector keeps track what future pieces to come, that it?
 
@RMartinhoFernandes Things are so simple for you I assume multitasking would be easy for you.. oh well my bad :(
 
2:08 PM
@RMartinhoFernandes Thanks man, that works nicely.
 
@RMartinhoFernandes yea
 
@TonyTheLion lol yeah
 
`if(std::is_base_of<T, typeid(pit->second))
return boost::shared_ptr<T>(boost::dynamic_pointer_cast<T>(pit->second));`
Love it.
 
@TonyTheLion Is there a reason to keep the current piece in that vector once it landed?
 
@RMartinhoFernandes no, only cause I haven't written the code to move it out yet
 
2:10 PM
Ah!
Then you could just pop it out.
 
right
 
A std::deque is probably more appropriate.
It lets you pop pieces off the front, and push new ones then into the back.
Then you don't need to look for the next piece. It's always the one in front!
 
user34537
like i said ealier deque is superior in all cases except one
 
and then I'd add it to another vector so then I have a place where all the pieces at the bottom are, so from there I can probably figure out how to get those pieces to also act as a canvas bottom, so pieces landing on top of it, are also landed
 
Keep in mind that pieces that have already landed may not be whole.
That is, once you score a line, it will chop off parts.
 
user34537
2:15 PM
btw whats your favorite way to make webapps?
 
user34537
i like asp.net. but i dont do it in the standard way. also my code is hideous. But i dont like non statically compiled languages so....
 
@RMartinhoFernandes that template argument seems to refuse a typeid() as the second template argument, is there a way around that or am I being stupid? At this point in the code, I don't have a concrete type.
 
@MooJuice decltype.
typeid is to get a std::typeinfo.
 
hi, does someone here have worked with metro applications in c++?
 
@RMartinhoFernandes thanks, that's perfect.
if(std::is_base_of<T, decltype(pit->second)>::value)
return boost::shared_ptr<T>(boost::dynamic_pointer_cast<T>(pit->second));
 
2:20 PM
Doesn't dynamic_pointer_cast return a shared_ptr already?
 
It does indeed. :)
Thanks for pointing that out.
 
user34537
have any of you used unqiue_ptr?
 
Yes.
It's awesome :)
 
user34537
i found only one place to use it and i was to lazy. Its a bunch of functions with that return a unique ptr except... I just assume its unique i dont use it :x
 
I don't understand.
 
user34537
2:23 PM
Its a lot of functions i need to change if i wanted to use it (like 1k maybe)
 
As an example, unique_ptr is mighty useful when you need to return a pointer and pass ownership.
 
user34537
i know how to use it. I jsut havent bc i need to change a lot of functions to use it
 
Man, don't you hate it when you spend the time to answer a non-trivial question with a comprehensive answer with examples and it lies there dormant, like an unwanted step child?
 
I assume it is the dhcp that assigns an ip address to a computer... Is the dhcp on the router? Because I don't understand how it can give to my laptop 192.168.1.1 and my desktop 192.168.1.2 . Is it a stateful server?
 
0
A: Creating HTML form using XML to define layout C#

Moo-JuiceOne way to achieve this would be to devise some objects that represent the various HTML entities that you want to generate. Note, this is a very, very simplified example. You could have a base class with all kinds of trickery and reusability in it. But that's out of the scope of the question a...

 
2:30 PM
@MooJuice I have a bunch of those :)
 
:)
 
Ok I assume everyone is tired about talking about routers and network cards. Who wants to talk about tcp endianness?
 
It's big endian. Endian of story.
 
Ha ha. I wish :)
So every tcp uses big endian? Regardless of the underlying architecture?
 
yep
"network order" is defined as big endian.
 
2:36 PM
And am I right in saying as humans, we naturally write in big endian format?
 
Yes (at least in the Western cultures I'm used to).
 
when we're not dealing with computers, yes
 
user34537
hey guys quick simple question
 
user34537
is there any statically compiled language to do webwork? all i can think of is C# and java, nothing else
 
it used to not always be so clear cut; for example "four-and-twenty blackbirds, baked in a pie"
but these days it's pretty much all big endian
 
2:38 PM
The thing is I have a port number, 1234 which I must translate into big endian format! And I don't understand why? :S htons(1234) 1234 is already in big endian, won't it just make it 3421?
 
As long as no one uses PDP endianness, I'm fine.
 
because it's not necessarily big-endian from the computer's perspective
 
@LewsTherin It's the bytes that count.
 
in a little endian system, for example, 256 is 0x00 0x01. in a big endian system, it's 0x01 0x00.
 
Still baffled. What do you mean from the computer's perspective or the bytes that count. Would I do htons(1234) on every platform?
 
2:40 PM
@LewsTherin 1234 is 04D2 in hexadecimal.
 
user34537
chao you got it mixed up
 
That's written big-endian.
@acidzombie24 No, he's right.
 
@acidzombie24 no i didn't. :)
 
@LewsTherin But if you are on a little endian system, 1234 will actually be stored as D204.
 
user34537
ummmm
1,0 is 1 in little endian
 
2:41 PM
@RMartinhoFernandes yeah so there should be no reason for me to do a htons, because 1234 is already big endian
 
user34537
and 256 in big
 
@LewsTherin, as the function name says, "host to network short". It will convert it if it needs to.
 
So you need to convert.
 
So because I don't know what platform the client would be run, htons may translate accordingly?
 
SO, imho, always use it.
may?
It will.
 
2:42 PM
It will do the right thing.
 
@acidzombie24 and i said, 256 is 0x01, 0x00 in big endian
 
What I mean is, if I am on Unix it wouldn't translate to big endian if I am on windows it will.
 
user34537
oh i must be dyslecti
 
@LewsTherin It's not about the OS, it's more about the architecture.
 
It doesn't matter if you are on *NIX, or Windows, or IoS
htons() will convert whatever the ordering is on the host, to that of the network.
 
2:44 PM
It does it right, that's all.
 
user34537
i dont know how i said the right thing AND read your as wrong wtf -_-
 
lol
it happens
 
@acidzombie24 Selective blindness
 
You feed "might be wrong" into it, and it spits back "it's right".
 
@RMartinhoFernandes So even if I am running Ubuntu on my Windows, it still stores bytes as little endian ?
 
2:45 PM
I'm confused by that.
 
user34537
@LewsTherin but i also wrote my answer as 1 and 0 while his answer was 0,1 (256)
 
You can run Ubuntu on Windows now?
 
@LewsTherin yep. depends on the processor, not the compiler or os
 
@LewsTherin you're overcomplicating things imho. It doesn't do anything but convert what you give it from the host to the network byte-ordering system.
 
except on processors that support both (which are out there)
 
2:46 PM
@LewsTherin if the host byte ordering is the same as the network byte ordering, no change occurs. Otherwise, it modifies it for you.
 
@MooJuice I just want to know whether that function converts all the time.
@MooJuice Ah thanks. The answer I was looking for lol.
 
@LewsTherin no. on big-endian systems, it's a no-op
 
@cHao Which means there must be a way for that function to check if the archi uses big or little endian
It's hard to concentrate, some girl is checking me out lol
 
Yes, use htonl.
:)
Or compiler-dependent type-punning tricks.
 
int i = 1; char* c = (char*)&i;
 
2:48 PM
Guys I think I get it, thanks. :P
 
the most portable way is to use hton*. but you can do some magic with pointers
 
if *pc = 1 then little endian
otherwise big endian.
 
@MooJuice Yeah mine is little endian, I tested it before. I assume that's an easy way
 
Please, someone, upvote this, so the OP sees a solution rather than a "You're doing it wrong" answer.
0
A: why is this while loop causing 100% cpu

XaadeYou're eating up the CPU in that loop. What you need to do is let the OS wait for you (which sets the wait process on low-priority so it occurs in idle time). How you do that in Windows is WaitForSingleObject. How you do that on iPhone is with NSCondition. Here is link: How do I use NSConditio...

Feel free to correct any parts about my answer that are technically wrong.
But the other answers leave the OP hanging.
 
Oh boy, the whitespace! It's everywhere!
 
2:50 PM
lol
"Why is this loop eating up my CPU?"
Because you're doing nothing but loop.
I upboated, btw.
 
@MooJuice You can assume the user has another thread. It's just that he's using a flag as a "signal" instead of an event proper.
 
@RMartinhoFernandes Or with volatile.
 
My standard reply to "why is my CPU pegged at 100%" is "Are you sure that is bad? Don't you want programs to use all those transistors you paid for?"
 
BUT IT MUST BE AT 0% OTHERWISE IT'S WASTED.
 
@CatPlusPlus Blah, as if anyone cared about that.
 
2:52 PM
Yeah, I don't get that logic either.
 
@RMartinhoFernandes It will still use every cycle, it just won't block everything else doing it.
:P
 
@Xaade Oh, I'm not saying it's an answer to that question.
 
Thanks
@RMartinhoFernandes hence :P
I've never programmed on iPhone, but researching that answer, I've determined I never want to. Convoluted much.
 
sbi
@Xaade Ugh. Is that Objective C? It surely looks ugly as hell.
 
[[NSAutoreleasePool alloc]init] is just plain unreadable.
And don't get me started on function signatures.
 

« first day (375 days earlier)      last day (4565 days later) »