« first day (103 days earlier)      last day (4843 days later) » 
00:00 - 21:0021:00 - 00:00

9:00 PM
@DeadMG you asked why we have them, you'd have to ask whomever was arguing over them why they were doing that
 
sbi
@DeadMG Ah. Right. Bugger.
 
@sbi: Indeed, else we wouldn't need lvalues and rvalues as a separate distinction
 
sbi
@DeadMG In that example, is ref a variable? Because I don't think it's an object. <awaits_correction/>
 
I actually have no idea
and it's not really important to the point, so
 
@sbi In C++98 and C++03, ref is not a variable. In C++0x, it is :)
7
Q: Why was the definition of a variable changed in the latest C++0x draft?

FredOverflown3035 says: A variable is introduced by the declaration of an object. The variable's name denotes the object. n3090 says: A variable is introduced by the declaration of a reference other than a non-static data member or of an object. The variable's name denotes the reference or object. ...

Now variables are either named objects or named references :)
 
9:12 PM
hey
I'm actually feeling a lot better right now
 
How come?
 
probably because my flatmate gave me some drugs to take
I bet as soon as I lie down / they wear off, I'll be terrible again
 
@DeadMG Is your flatmate a doctor? :)
 
no
but it's not prescription so
 
Ah, so it's "over the counter"?
I think that's the term...
It's called "rezeptfrei" in Germany.
 
9:15 PM
yes
I had some of my own but gave to my sister for period pain, and she never replaced :(
 
Tell her it's your time of the month. She'll understand.
2
 
rofl
she's two hundred miles away
and as a male, I don't have a time of the month
 
int counter = std::numeric_limits<int>::max();
++counter; // over the counter, get it?
 
that's terrible
 
@DeadMG Then tell her you have undefined behavior or something.
 
9:18 PM
she wouldn't get the joke
 
sbi
@FredOverflow Well, then that's clear now!
 
9:37 PM
@DeadMG: did you by any chance brush teeth with cold water?
 
sbi
(Do (you (like (LISP (syntax))))? (A nice controverse over Dijkstra in the comments to the question.)
 
hello again!
who's around?
what interesting subjects are there to converse about?
acyclic graphs used the Minimum Spanning Tree Algorithm or AVL Trees.... or maybe coffee?
 
9:53 PM
@Alf: I fixed that bug ages ago :P
 
10:32 PM
i don'T think that a pointer is an address
i think when one says "pointer", it's the general concept of either a pointer object, pointer value or pointer type
@FredOverflow I think the context signifies what meaning should be taken.
 
10:47 PM
@JohannesSchaublitb Guess you're right.
What is a good growth strategy for hash tables? If the number of elements exceeds the number of buckets, I increase the number of buckets with the following formula:
n = int(n * 1.618033988749895) | 1;
Does that sound sensible?
 
that constant factor is rather precise
 
Hey, why not make that a real question? :)
0
Q: Hashing growth strategy

FredOverflowWhat is a good growth strategy for hash tables? If the number of elements exceeds the number of buckets, I increase the number of buckets with the following formula: n = int(n * 1.618033988749895) | 1; Does that sound sensible? (The | 1 part makes sure I get an odd number.)

@FredNurk Well, every double has the same precision, right? :)
I might as well use that precision :)
 
why not on SO?
 
Because it's not a problem that has a "right" answer I guess.
Also, I have already nearly reached my daily repcap on SO ;)
 
sure it does, you just haven't determined what criteria matters more/most to you yet
it's 22:57 SO time :P
n * 16 / 10 | 1
 
10:59 PM
Why not n * 8 / 5 ? Less risk of overflow :)
 
true
I like adding a small constant to grow faster in the (usually more common) smaller cases, but what you have is fairly standard
@FredOverflow though if you get close to INT_MAX/16 buckets... :)
 
In that respect, the * 1.618 solution is safer. And I really don't care about a single FPU multiply instruction once every rehash.
 
I wasn't trying to optimize it
 
So what was that * 16 / 10 business all about then? :)
 
was just thinking how integer math is often so much simpler and that's only different for 1 out of every 60 bucket sizes or so?
 
11:06 PM
I see.
 
or, in other words, 1.6 is nearly as good as 1.618033988749895 :)
 
Okay, but 1.6 and 1.618033988749895 both take up 64 bits, and neither is faster or slower than the other. So why not go full precision? :)
Of course, you could argue that parsing 1.618033988749895 is a little slower... :)
BTW, some time ago there was a funny mistake in an answer on SO.
Someone wrote about "parse by value" vs. "parse by reference" :)
 
heh
@FredOverflow just thinking idly
 
@FredNurk about IEEE754?
Here is the IEEE754 representation of the number: 3ff9e3779b97f4a8.
And here is some dirty C code used to find it :)
union
{
unsigned char a[8];
double d;
} x;

x.d = 1.618033988749895;
for (int i = 7; i >= 0; --i)
{
printf("%02x", x.a[i]);
}
Yes I know, technically undefined, but it works here :)
Funny. If you google that number, all you get is MATHLAB introductions :)
 
00:00 - 21:0021:00 - 00:00

« first day (103 days earlier)      last day (4843 days later) »