« first day (235 days earlier)      last day (4706 days later) » 
01:00 - 20:0020:00 - 00:00

1:32 AM
Arghh, another day wasted failing to install Gentoo. I was expecting the remaining steps to be easy. I should probably give up now and try another distro, but I think I'm too stubborn for that.
 
@MartinhoFernandes What problems are you having? (I run it at home, no issues)
 
The first day I messed up lots. But I got over it. Today I repeatedly failed to get X working.
 
ok
 
I have yet to figure out why, but I'm thinking I forgot to include the appropriate drivers in my kernel or something.
 
I came up with a new proof for P = NP, and I'm a tad more hopeful
although I'm guessing that nobody wants to listen ;p
 
1:37 AM
@DeadMG I'm interested.
 
@MartinhoFernandes Every problem I've ever had with Gentoo (literally) was caused by conflicting USE flags. They have to be overridden on a per-app basis pretty regularly
 
But not very hopeful.
 
ok
first- the problem, it's subset sum but with only positive integers
I asked on math.stackexchange.com and apparently, 3SAT (whatever that is) can be reduced to subset sum with only positive integers, and therefore it's NP-Complete
so
I figure that, firstly, any elements in the input set above the target (W) can be discarded
 
3SAT is a special case of the boolean satisfiability problem.
 
since they obviously can't be used to sum to W
and secondly, that even if you had an input set of 1,2,3,4..., it must be of a size less than W, else you'd be including W
 
1:40 AM
Sure, you're limiting yourself to positive numbers.
 
therefore, necessarily, N < W
 
@DeadMG You're in school and haven't done boolean satisfiability? What degree are you getting? :-P
 
Ok. But picking all the combinations of N numbers in a set is about O(N!)
 
sure
haven't finished yet
well, I figure that you can split the combinations down by inequalities
let's say that you're currently looking at an 8-cardinality solution
obviously, only some of them will sum to W, because if you have 8 * 7/W > W, it's gonna head a lot over W
there are still a lot of combinations left, and I know that it's still exponential
but I had another idea
if you look at the maximums required in each inequality bracket
for example, if I said that 7 * (0 to 1/8 W) + (1/8 W to 2/8 W) = 7/8 W to 9/8W
then this necessitates having 7 values in the range 0 to 1/8W
but that leaves basically no values left for the other ranges- and they have the same limitation
I'm pretty sure that for a cardinality of 8, it came to 18/8ths of W that would be needed to use all the combinations
which is obviously impossible, since we previously decided that N < W
the trouble is that I'm not completely sure how quantitatively this factor comes into play, as you go from 2 to N-1
 
> 7 * (0 to 1/8 W) + (1/8 W to 2/8 W) = 7/8 W to 9/8W
 
1:47 AM
not quite
 
Is this a new restriction you're imposing?
 
no
excuse my brief logical farts, I'm quite sick and tired
the point is that if you want to max every combination of inequalities, then you start to need far more numbers than is numerically available in the input set
making it mathematically impossible for you to actually use every combination of inequalities
so even if they increase exponentially, it's still impossible for you to be able to use all of them
 
But that doesn't help much. You want to make it "more feasible" not "more impossible".
 
no, I want to make it more impossible
because the less combinations result, the lower complexity it has
 
Hmm, then I'm not understanding your argument above.
 
1:52 AM
if there are exponential combinations even after inequality filtering, then the algorithm is still NP
and I know that it is, because the Partition function has an exponential asymptotic behaviour
so I want to invalidate many of those exponential combinations
 
Right, but I don't see where in your argument you get rid of that exponential growth.
 
well that's why I said that I wasn't sure how quantitative it is
because I don't know how many inequality combinations you can remove by virtue of there not being enough values to satisfy them
 
But even if you can show that many many many combinations can be ignored to a point that complexity gets polynomial, you still need a P algorithm to do that selection.
 
nah, you don't have to generate all of the combinations to prove that they can be ignored
all you'd have to do is quit generating once you cap out on a certain range
 
That's an algorithm.
 
1:57 AM
well, if the quantity of combinations that remain is in P-space, then it should be possible to generate them in P-time
ignoring the possibility of lookup tables, of course, which might be viable since the inequalities are going to remain the same for all problems
 
What about the number of different inequalities?
Isn't it combinatorial too?
 
well, I know that the number of inequality combinations that could yield W is exponential
the issue is discovering whether or not the limitations previously described can solve that problem
 
I don't think I can help with that part of the math (and certainly not right now).
 
no, me neither
;p
 
But I'd be very surprised if it turned out that P=NP.
 
2:03 AM
I find it rather unlikely, too
that doesn't stop me from trying
 
But very happy, because that's the useful proof.
The opposite would be kind of a disappointment.
"NO, you can never ever solve this problem during this universe's lifetime."
:(
 
lol
 
God's way of telling us to stop messing with his business.
 
humph
God can fuck himself, I'm gonna mess with whatever divine business I feel like
 
(I was using God as a poetic way of saying Universe, not in the sense of that "divinity" thingy some people have going on)
How do quantum computers (if/when we get them) mess up with complexity theory as we know it?
 
2:18 AM
things that used to be brute-force only, like infact NP-Complete problems, now can have their complexity square rooted
it's still exponential but not as bad
and quantum computers have their own special complexity class which can reduce very tough algorithms to P-space
I don't recall the details (QP and BQP I think they are), but there are algorithms that can run on quantum computers massively faster
 
@DeadMG Does that mean we can get bubblesort linear? :)
 
no
there's a BQP and an EQP, which is bounded error and exact quantum polynomial time
In computational complexity theory BQP (bounded error quantum polynomial time) is the class of decision problems solvable by a quantum computer in polynomial time, with an error probability of at most 1/3 for all instances. It is the quantum analogue of the complexity class BPP. In other words, there is an algorithm for a quantum computer (a quantum algorithm) that solves the decision problem with high probability and is guaranteed to run in polynomial time. On any given run of the algorithm, it has a probability of at most 1/3 that it will give the wrong answer. Similarly to other "bou...
in fact, RSA encryption will be officially fucked by quantum computing, as they depend on integer factorization being unfeasible
 
If we have quantum communication channels (actually, we already have those), one advantage is that you know when someone is eavesdropping.
Because observation changes the stream.
 
lol
yeah
you know
I figure that the reduction must be a lot
because for the step where the divisor = N, then there's only one combination left.
so for divisor = N, then it must come out to be 1
 
2:39 AM
Just to make sure I understood your logic above: the plan is to enumerate only a few (polynomial) possible combinations and testing those is enough to solve the problem, right?
 
yes, because I've proved that the others can't make it
 
I still don't understand how you're going to pick the combinations to enumerate.
 
because we can limit them by which sub-ranges they require in which quantities
if there are only 6 values between W/x and W/(x+ 1) for some x, and your combination wants 7, then tough kaboodles
 
Ok, but you need to work that out for all values of x, right?
 
sure
but x is capped at W itself, obviously, and even iterating from 1 to W will only be W^2
 
2:45 AM
What if there are a billion values between W/x and W/(x+1) and your combination wants 7?
 
then the resolution will increase later
if there are a billion values between W/x and W/(x+1), then the scale of this particular problem will necessitate cleaning at more than 7-cardinality sets
 
But isn't it possible that the only correct subset has cardinality 7?
 
sure
but even at cardinality 7, then there will be some reduction
after all, even polynomial remaining combinations at a billion input values is still an awful lot of combinations
 
@DeadMG I don't dispute that. But that reduction has to be into P-space, always.
 
oh yes
all I'm saying is that throwing out large-scale numbers doesn't really make any difference
as long as the reduction is into P-space, then it's into P-space
of course, whether or not it actually is remains to be seen
 
3:00 AM
0
Q: Big if else statement

lesliegIf have a big ( about 100 plus) if else statement like below and the if else condition might be irregular(for example some depends on 3 variables, some on 4), is there any way of making it simpler? Basically I have a table of around 100 plus rows, with the a,b,c and d as the column. Based on a,b...

Ugh.
 
3:52 AM
Can the compiler inline stuff I didn't ask to?
Does GCC do it?
 
@MartinhoFernandes Yes and yes; 'asking' the compiler to inline is risky business unless you know what you are doing though. Thankfully there's no standard way to do this.
 
So the inline keyword is pointless, right?
It doesn't guarantee inlining, and it isn't required for the compiler to inline stuff.
 
It's used when you need to define something in a header.
I guess inline should be the special_ODR_exemption keyword.
 
Oh, that.
I'll just lump it together with volatile. Keywords that have some special use cases but there's a common misconception about their use.
 
4:18 AM
@MartinhoFernandes This is some kind of follow-up to stackoverflow.com/q/6263222/78845 , right?
 
@Johnsyweb Oh, didn't notice that. Ugh, I'm scared of what comes next.
 
@MartinhoFernandes Me too.
 
 
1 hour later…
5:36 AM
Hi
Basically I am from Electrical background. I am just learning algorithms. Are there any links that explains the algorithmic efficiency terms ? How to calculate a particular logic's efficiency and so on. Thanks.
 
6:21 AM
@Mahesh "count the nested loops" is a pretty good rule of thumb
 
 
3 hours later…
9:40 AM
Mornin
 
heya
 
9:59 AM
lulz
 
 
1 hour later…
11:20 AM
why is it so quiet here today?
 
@jalf Dunno. Middle of the week?
 
sbi
@jalf It's quiet because nobody speaks up.
 
@jalf - But when do logarithmic efficiency comes into picture ? If it is a loop, then it is O(n).
 
@Mahesh and two nested loops (often, roughly speaking) mean that it is O(n^2)
three nested loops, O(n^3)
 
@jalf - When log(n) efficiency comes ? Could be useful, if you give sample snippet for it. Thanks.
 
11:38 AM
@Mahesh what do you mean?
if you're traversing a binary tree, for example. You have N entries, but the depth of the tree is only log(N), so doing a single lookup has logarithmic efficiency
you just follow the code. How many times is the code executed for input of size N? Then you have your answer
 
12:03 PM
@Mahesh also if you have any logic within the nested loops, then you might have a heuristic algorithm, and those can be a pain to get the correct analysis.
If you have an array of size n, and you go through every item. That is O(n). If you have a matrix of size n*m and you go through every item, then you have O(n*m) or if it is n*n then you have O(n^2)
Also to note on big O is that if you have an array of size n. And you go through every item + 1. Then that is O(n)
Lower order terms are omitted
so if you have an algorithm that has the complexity of x^2 + 2x + 2, then that is O(x^2)
Just realized that he's gone.
Oh well.
 
he'll get it when he comes back
 
I think he get's a notification as well in his inbox
anyways, lunchtime.
 
12:29 PM
what's new humans
 
> A set of synchronization edges, S, is sufficient if it is the minimal set such that the transitive closure of S with the program order determines all of the happens-before edges in the execution. This set is unique.
Wait, I thought Java was supposed to be simple? :)
 
@FredOverflow, my guess is that sentence is part of the memory model and per essence, memory models aren't simple. Especially when you don't express them in math but try to do it in english.
 
1:13 PM
I've come to the point where I'm saying: "Fuck it, I'm adding a non-const overload."
I guess today is a bad day.
 
oh darn :(
 
A slice of time in the life of a C++ developer
 
I'm just kind of tired, and finding that my working memory is smaller that it usually is.
 
call _heapmin
 
1:23 PM
Xeo: I improved the make_array code to include static type checking. Should be fairly usable now.
 
@DeadMG I wish I could reboot myself.
That's what sleep does I guess..
 
the brain's pause for garbage collection
 
@ÓlafurWaage the link under the newbie hints on the right is that video
 
ahh didnt see it
 
1:52 PM
@TonyTheTiger i lol don't know lol if that lol makes sense.
 
touche
 
911
 
:-)
 
1:54 PM
a, with a nose. Haven't seen those in a while.
 
I show my age ;-)
 
How old are ye?
 
At least 1 year, 11 months.
 
Old enough to have read the first edition of TC++PL, but I didn't really use C++ before the second edition was out.
 
1:58 PM
Over 40?
 
Yes: 43
 
:-)
I'm a whippersnapper.
 
2:10 PM
Oh great. I'm out for a day. When I come back, someone commented the hell out of my code to fix some bug that wasn't there in the first place.
And now the damn mandatory Windows Update policy is going to forcefully reboot my machine in 15 minutes. This is going to be a bad day.
Arhgh.
 
@MartinhoFernandes can't you just press 'later'?
 
No, simply move the window so that it is mostly out of the way. If you say later it comes back 5 minutes later.
 
@TonyTheTiger No. It's not the annoying "please reboot" popup. It's a mandatory domain policy.
There's nothing I can do, short of killing off processes in dangerous ways.
Yeah, and someone stole my mouse!
I'm rebooting. brb
 
2:51 PM
@ÓlafurWaage - Thanks for the info.
What is the best book you recommend for algorithms ?
I am preparing from that book.
 
@Mahesh I used this one in my algorithms course: amazon.com/Algorithms-Parts-1-4-Fundamentals-Structure/dp/…
 
@ÓlafurWaage - I am sorry to ask but is it easily understandable ?
 
3:05 PM
@Mahesh Sedgewick's books are (by far, at least IMO) the worst you can get on the subject of algorithms. They explain algorithms poorly, incompletely, and sometimes just flat-out incorrectly (e.g., at least in the older edition of the same book, his description of "B trees" was almost (but not quite) completely different from the algorithm that normally goes by that name. Although it has little to do with the algorithms, his use of C++ is also quite poor.
I'd look at Knuth (The Art of Computer Programming), Cormen, Leiserson, Rivest and Stein (Introduction to Algorithms), or Aho, Ullman and Hopcroft (Data Structures and Algorithms).
 
@JerryCoffin - Could you please suggest a good book for algorithms ? Also, do the book I posted earlier by Elliot B.Koffman is good? I find it easy to understand.
@JerryCoffin - Ahhh ... we posted the message in a split second difference :)
 
I can't really say anything about the Koffman book itself. I don't find the title encouraging though -- algorithms books that put the name of a programming language in the title are frequently quite poor (but that's a general observation -- I haven't looked at this book, so it could be an exception to the general rule).
 
@Mahesh it's not that good. And I agree with @JerryCoffin I didn't touch the book and used the teachers material when I studied it.
We also had a pretty tough teacher, so I didn't learn algorithms as well as I had hoped.
 
@ÓlafurWaage - Algorithms is one good and tough subject tested on many interviews.
We get to it when we practice more, I believe.
 
I took a second course in algorithms (algorithms and programming under pressure) where I learned a great deal more. So I hope I'm set :)
 
3:16 PM
@ÓlafurWaage "Programming under pressure" is redundant. :-)
 
@JerryCoffin part of the course was to practice for a programming competition and to try out for the team that would compete in the nordic programming contest.
 
@ÓlafurWaage That makes sense. Still redundant though (IMO). "Programming under even more than the usual level of pressure" maybe...
 
@JerryCoffin - I believed most of you guys are experienced professional programmers. To what extent learning algorithms is helpful in real job. Or is it just to test a student how far can he fit for the position.
 
I hated parts of it but in hindsight, it was a good thing to do.
 
@JerryCoffin To test his grasping power and so on ...
 
3:19 PM
@Mahesh you won't be solving hard algorithmic problems on a day to day basis. But studying algorithms is key to know how to approach general problems.
 
@ÓlafurWaage - Agree.
 
Depends heavily on the job. Quite a few people (e.g., web developers) spend most of their time on UI issues, which typically have little or nothing to do with algorithms. If you're doing C++, however, there's a lot more chance you'll put it to real use.
 
Builds a solid foundation on which much more can be added.
 
@JerryCoffin - Just checking whether my library has the book you suggested ... brb
 
The only real question at that point is exactly what parts you use, and how often. It's pretty rare to write a basic algorithm like a sort yourself. A lot more common when you get into an area where there's less likelihood of finding a library that handles the task entirely for you.
 
3:30 PM
@JerryCoffin - It has one. Will check it out. Thanks for the info.
 
@AProgrammer Did C++0x "steal" its memory model from Java? I understand Java is the first programming language with a memory model?
("steal from" as in "being heavily influenced by")
 
@Mahesh Surely.
 
@AProgrammer I have also read the first edition of TC++PL... a few weeks ago :)
 
Just learned: no matter how easy a feature looks like, don't implement it without careful planning. Users will become dependent on it, and they will find bugs that you may not want to fix.
 
user379888
Repo taken back :(
http://stackoverflow.com/questions/6279485/unusual-behaviour-of-my-program
 
3:45 PM
Rooms* r_ptr[9999];
@JustAnotherProgrammer On a side note, how many elements to you think this array has?
 
@JustAnotherProgrammer if you try to isolate the problem to a smaller test case, you may even find it yourself.
 
Whoa. I love to watch these "wall of code" questions.
 
If you don't, at least you'll get more people interested in it.
 
"Hi, <wall of code> what is wrong?"
 
> Hi, <wall of code> what is wrong?
@ÓlafurWaage This looks much better ;)
 
user379888
3:48 PM
@FredOverflow: Sorry , it was a fellow programmers code and I had to implement it further. I personally think that the answer to your question should be "As many as the stack can hold"?
 
No. If the stack can hold twelve billion, it won't have twelve billion.
 
user379888
@FredOverflow: Sorry but I have never heard of a limit of elements that an array can have.
 
@FredOverflow no quotes?
 
@JustAnotherProgrammer What? When you say int a[100]; then you get 100 elements.
 
user379888
@FredOverflow: Yes, I agree with that.
 
user379888
3:53 PM
@FredOverflow: There were 999 rooms to be booked, my fellow programmer added another digit by mistake. Sorry for that.
 
I'm not sure Java is the first language with a memory model. I think you can consider that Algol 68 and Ada have memory models even if it isn't called in such term. I'd be surprised if no research language in concurrency had one. Then there is the question of Hardware Description Languages (Verilog, VHDL. ...) which for sure are well defined in term of parallelism, but are they programming languages?
The one from C++ isn't copied from Java, see Hans Boehm's papers, some of them explain why (for one, the Java model intend to be UB-free at the cost of performance, the one of C++ allows to
 
@FredOverflow I would say "not really" both to C++0x's memory model being particular close to Java's, and to Java being the first language that defined a memory model. Concurrrent C would be a counterexample (though C++0x isn't based particularly closely on Concurrent C either).
 
@FredOverflow To be clear, I read it before the second edition was published ;-)
 
my stackoverflow is in some kind of mobile mode
does anyone know why?
it is all in text
other stackexchange sites are fine though.
 
Isn't the C++ model influenced by the POSIX one?
 
3:56 PM
?
like how?
developer.nvidia.com/content/… btw this might be interesting
 
@NeilG Like this?
 
@LucDanton AFAIK, POSIX leaves that totally out of its scope.
 
user379888
@NeilG: This can be your internet problem, I think its ipv6 day today isnt it ?
 
@Martinho yes
 
Yay, I'm not alone.
 
3:58 PM
@AProgrammer Needs some guarantees to make pthreads work
 
Only happens at work, because of some stupid proxy settings or something.
 
user379888
I just saw a glimse that they are working the ipv6's implementation and the internet connection might not work smoothly
 
Blocks the CSS and JS.
 
@justanotherprogrammer: Okay, thanks. I'll just wait it out
 
user379888
@NeilG: Sorry you can't.
 
user379888
4:00 PM
Can anyone help me stopping this decrement in my repo. I am continuosly loosing my repo due to the last two questions I have posted. I feel sorry and I have lost a lot of my repo :'(
 
@LucDanton I'll have to reread that part and see if they define it. POSIX tends to be grossly underdefined at time in order to keep all preexisting implementations conforming.
 
@AProgrammer A bit of google-fu lands me on a presentation by H. Boehm arguing that the posix memory model is not enough
 
user379888
 
I don't know of a UNIX system written in C++, unless you count Windows as a UNIX system..
 
4:02 PM
@JustAnotherProgrammer delete them and work on the formulation?
 
user379888
@MartinhoFernandes: Sorry, I would try to write good questions
 
user379888
@AProgrammer: I tried deleting it but it says that the question can not be deleted within two days.
 
What's up?
 
A quark flavour.
 
@DeadMG Interesting I lost track of where crypto is.. however since d-wave claims to have quantum computer, this may change the game
 
user379888
4:09 PM
If r_ptr is a pointer ,can we do r_ptr[no].vacant();
 
user379888
Or is it restricted in C++?
 
I wonder if there are asymmetrical crypto methods which do not relay on int factorization.. maybe I need to study a bit of crypto again..
My crypto prof published a lot last year, I can read none of the paper, thanks to the springer Verlag :(
 
Last I heard quantum computers could be built to factorize numbers up to... 15.
Which is far from what is required to break RSA and such.
 
Well here too I believe it when I see it..
 
It means a present day (I mean, last year's model) quantum computer is not better at breaking RSA than my seven year old cousin. :)
 
4:19 PM
Yes you can have one.
 
@Nils The kind of computer D-wave claim they have is not the kind that can break public-key encryption
 
why do you know?
do you have one? :D
 
Because I looked it up
 
I bet Google told you!
It can't keep a secret.
 
IIRC it was a combination of reddit, Wikipedia, and some news articles
 
4:22 PM
Does anyone know of a C++ example that illustrates "false sharing"?
 
false sharing?
 
@Nils It's when cache and multithreading work against each other.
 
ah because the l3 cache is shared
well would be interested in that too
 
No, because of e.g. cache coherency, and on any level.
 
Scott Meyers' talk on CPU caching sparked my interested. But good information seems to be sparse.
 
4:26 PM
ah sure, because you might have more threads than cores..
 
Aha, this should be a good start herbsutter.com/2009/05/15/…
 
^ Herb likes multicores :D
Cool! Hellgrind (part of Valgrind) can detect inconsistent lock orderings
 
4:46 PM
I have a question
why is it everybody and his dog orgasms over XML and dynamic loading and stuff when they have absolutely no use case for it?
1
Q: Drawbacks of using reflection for a component based system at loading-time

RavelineI'm coding a little casual game in Java using Slick2D. This game use a lot of different "objects", managed in a composite way. So, firearms, furniture in the map, NPC and player character will be composites objects using components to define their behaviors. Since I'm going to need a lot of, f...

for example
 
For all you know he's doing it for its own sake, i.e. learning how it works/adding something to the resume. The fact he's doing a casual game may be additional motivation.
 
5:03 PM
@DeadMG Btw what's the use case for XML? My mind is a bit blurry on this matter because in the wild it seems that everything is a use case for it.
 
@DeadMG I can imagine that it's nice to be able to add new game items by simply dropping an xml in the game folder instead of having to modify code, recompile, etc...
 
@MartinhoFernandes Making people go insane.
@StackedCrooked Well, principle is nice. I think I like declarative API in the decent embedded language for that purpose better than plain data files, though (at least, it's nice in Python).
Also saves you the manual mapping and stuff, you just need to execute it and have it register itself.
 
5:18 PM
@CatPlusPlus You haven't tried to write YAML then :)
 
@StackedCrooked I did. At least it's not as verbose as XML.
 
@CatPlusPlus reading YAML is fine, but writing valid YAML is really hard (I never managed to do it)
 
I never wrote any really complicated stuff, but I don't think I've ever had problem with syntax.
 
Well, didn't really work for me.
 
I'm used to significant whitespace and related shenanigans, though.
 
5:21 PM
@CatPlusPlus Loading JSON in JavaScript is interesting. No need to map anything.
I'm tempted into XULRunner again.
Why am I always attracted to the things that pain me? :D
 
@StackedCrooked I think there's a deeper conclusion here than just "Herb likes multicores". I think this demonstrates a bit of a problem at Microsoft. Regardless of results from profilers and such, the real bottom line is that developers largely work to make code usable on the hardware they have available. When/if their hardware is this far beyond what normal users have, they'll almost inevitably produce code that's unusable on more normal hardware.
It's tempting to give developers faster machines to optimize their time, but (much as I hate to say it) this temptation must be avoided if you want to produce useful, usable results.
 
@CatPlusPlus But you need to sandbox it.
If it's non-executable data, you don't have that problem.
 
It's fine (and entirely reasonable) for developers to have high-end machines, but they should only be at the high end of what they really expect a normal consumer to have, not way beyond it. E.g., right now, a machine with something like dual quad-core processors is as much as most should be allowed (and even that's almost too much).
 
Development is one thing and testing is another. The average PC is infested with adware and stuff. I really wouldn't like to develop on that.
I'd appreciate a 24-core machine if only for the faster build times.
 
@JerryCoffin But if developers could save, say, 20% off their compile times, that adds up to a pretty major productivity boost, which, for example, could free up time to actually improve the product
 
5:39 PM
@jalf And it's not just the compile times that you save. Faster build cycles help you to stay in the flow instead of getting distracted.
 
@MartinhoFernandes Sandbox is nice and all, but usually not strictly necessary.
 
6:19 PM
@jalf Entirely true -- at least in theory. That's why it really is extremely tempting to provide them with excessive hardware. The fact remains that in every case I've seen this done, it does a lot more harm than good.
 
user379888
6:47 PM
@CatPlusPlus:You there?
 
I know that everyone expresses this sentiment, but I just have to say it again
I HATE ANONYMOUS DOWNVOTES :(
2
 
user379888
@DeadMG: I hate them when the count goes below -1 .
 
Xeo
7:08 PM
@sbi: I added this question to the c++-faq because we don't have one in there yet, and the title is clear enough to just link to it on new questions / answers that use eof() to check for eof.
@DeadMG I LIKE ANONYMOUS UPVOTES :)
 
@JustAnotherProgrammer Maaybe. Why?
 
@DeadMG Anonymous downvotes are indeed annoying, but questions tagged both c and c++ annoy me more
2
 
7:25 PM
they definitely suck
I came across a very rare question recently (today or yesterday) tagged C and C++ when the author clearly meant C++, a rarity
most of the time people who use C and C++ clearly just mean C.
 
I've seen one where OP posted a C++ snippet, tagged with both, and then argued that you can have code that uses both C and C++.
Because it used getenv or something.
Lol, someone just posted a question with their SMTP details in it. The power of copy, paste, send.
 
7:52 PM
@JerryCoffin and how can you be sure of this? If you do one thing, you can't really know what would have happened if you'd gone the other route
how can you tell, when you give developers fast hardware, that everything would've been better if you hadn't?
apart from this, I don't really follow the logic in "programmers must write software that runs well on slow computers. Therefore they must compile their software on slow computers as well"
 
well, logically, you would only want/need that effect when it comes to optimizing
not when you're writing the UI code or pre-compiling the API headers
 
I'd say that if you're relying on the programmers to design and test and decide whether the software is nice to use, then you've got a much bigger problem than whether they're testing on a suitably slow computer
 
how random does it get?
366
Q: Understanding "randomness"

TrufaI can't get my head around this, which is more random? rand() OR rand() * rand() I´m finding it a real brain teaser, could you help me out? EDIT: Intuitively I know that the mathematical answer will be that they are equally random, but I can't help but think that if you "run the random nu...

 
user379888
ofstream infile("new.txt",ofstream::binary);
while(!infile.eof( ))
{
infile.read((char *)(&r_ptr[i]),sizeof(Rooms));
r_count++;
}
infile.close();
My compiler says:syntax error : 'while'
I don't get it, please help me out. Thanks
 
sbi
@Xeo Contrary to popular believe, I am not Uncle FAQ, so you do not have to run every entry by me.
 
7:58 PM
lol
 
user379888
Please help me out with the code :'(
 
@JustAnotherProgrammer what's the Rooms variable?
 
@JustAnotherProgrammer: www.stackoverflow.com
 
01:00 - 20:0020:00 - 00:00

« first day (235 days earlier)      last day (4706 days later) »