« first day (33 days earlier)      last day (4901 days later) » 

5:03 PM
@sbi, you have been leading the charge on the C++ faq. if it weren't for your efforts, it wouldn't even be getting the discussion it has. thanks for your efforts
 
sbi
@John I'm a bit surprised you should think this way. I definitely do not feel so.
 
@sbi to what do you refer?
 
sbi
Besides, if it isn't for all of us doing something for this FAQ thing, it's a still-born idea anyway.
@John "you have been leading the charge"
 
that is my impression. you and several others. i, for example, certianly had almost nothing to do with it (tho i've been thinking of writing a couple faqs)
and if it werent for the effort, nothing would happen
@sbi: you may not like the comment i just added to your post in meta. :) let me know if you dont
 
@sbi I agree with John. A lot of people grumbled that we needed a FAQ and a lot of people are now contributing to the FAQ, but at a bare minimum, you helped to nudge it into existence.
 
5:23 PM
i'm about to post a stupid, newbie question. limber up those votes to close!
 
That's not a stupid question. That's a good question, IMO...
 
@James: thx. "stupid" in the sense that I should already know the answer
 
5:42 PM
@sbi: I know you've written several good posts about why one should not using namespace std;. Do you know of a good one that we can turn into a FAQ?
Preferably something that discusses the multitude of issues that it causes
 
5:54 PM
@James: for your consideration: stackoverflow.com/questions/1452721/…
I know i have written a detailed answer recently, but i cant seem to find it
 
I made this a FAQ, is this okay with you guys?
2
Q: Lifetime of temporaries

frunsiThe following code works fine, but why is this correct code? Why is the "c_str()" pointer of the temporary returned by foo() valid? I thought, that this temporary is already destroyed when bar() is entered - but it doesn't seem to be like this. So, now I assume that the temporary returned by foo(...

 
IMO, if this is going to be markeed FAQ, it should be more complete
Some things I'd add: more details about what a full-expression is, how temporaries are related to return-by-value, RVO...
LOL my rep right now is 12345
 
@JohnDibling A full expression is the satisfied smirk I have on my face after I've eaten a nice big steak.
 
@JamesMcNellis LOL
@JohnDibling full-expression is already explained in the accepted answer, isn't it?
 
@Fred: It is explained, but in Standardese only. For a FAQ I think it would be helpful to explain in English, with the Standardese as a reference or footnote
 
6:33 PM
Here is a potential FAQ item
36
Q: What does the explicit keyword in C++ mean?

SkizzSomeone posted in a comment to another question about the meaning of the explicit keyword in C++. So, what does it mean?

 
@JohnDibling go ahead and retag it, it's definitely a faq
 
I am stumped (and it doesn't help that I don't have a C++ compiler on this machine).
Why is the std::distance template selected here instead of the user's distance function?
2
Q: distance calculation error in c++

user466441#include <iostream> #include <cmath> #include <vector> using namespace std; int square(int a){ return a*a; } struct Point{ int x,y; }; int distance (const Point& a,const Point& b){ int k=(int) sqrt((float)((a.x-b.x)*(a.x-b.x))+((a.y-b.y)*(a.y-b...

The user's function should be an exact match for the arguments.
std::distance also matches but is a template.
This is going to be a /facepalm moment for me, I know it...
 
I don't know.
 
6:49 PM
Me neither.
 
any body knows about dia sdk function get_libraryName....?
Any body have idea about the usage of this function....?
 
@James: I am replying to the post in question
 
@Cisc
@CiscoIPPhone : I need to find the correct .dll/.exe from where the function enumerated. For this I am using get_libraryName which to me should return file Name(.dll/.exe) in which the function was originally defined.
But It returns every time NULL(BadPtr=0x00000).. Is there any way out to retrieve the exact file Name from where the function was being defined and used ?
 
sbi
7:06 PM
@JamesMcNellis The only one I have is this one, an only loosely related side-point to some other question: stackoverflow.com/questions/2879555/2880136#2880136.
@John @James Thanks for the praise, but I really don't feel like I deserved it.
@JohnDibling Wow, that guy invented self-answering FAQs more than two years before we did!
And it is a good FAQ entry. Re-tagged so.
 
@JohnDibling The suspense is killing me.
 
@CiscoIPPhone ..??
Can u see and answer accordingly..plz
 
sbi
@JamesMcNellis Same here.
 
7:23 PM
@Hassan: I don't know - I haven't used dia before. There doesn't seem to be a function that does what you want.
But you can get the decorated or undecorated function name so you could search some specific dll's or exe's for that somehow.
 
sbi
Look, we weren't first!
23
Q: Permission to start a series of advanced regex articles

polygenelubricantsThere are many problems with what I perceive to be countless dupes of low quality questions in the [regex] tag. Rather than complaining about it, I've decided to take matters into my own hands. I'm thinking that I should start a series of [regex] articles. I do fear retaliation from the communi...

Nor are we last either:
0
Q: Creating an FAQ tag like the one that is available on meta for each stackexchange

the_drowDo you think it's neccesary to create an faq for stackoverflow for instance that answers frequently asked questions about programming? I think it would be very useful to do such a thing in order to avoid duplicated answers and to pre answer those kind of questions. What do you guys think?

 
@James: Posted. Sorry it took so long, it was hard to write
@James: I may edit as questions & comments come in, but right now its time for lunch! yeah!
 
@CiscoIPPhone : As any indication there in undecorated or decorated function name....?
I mean any indication of the source DLL in decorated or undecorated function names...?
 
7:39 PM
nope
 
So how can we detect then from which DLL this function came from ..?
as u indicated that undecorating can lead us towards finding the exact name of the dll..?
 
No, I'm saying if you get the name of the function you could search some specific dll's or exe's for that name. I don't know how but I've seen several programs do something similar, like dependency walker.
 
8:05 PM
Oooh it's lively here! :D
-ish.
 
sbi
8:36 PM
Oh, after all these meta discussions about an FAQ and whatnot, it feels good to just provide an honest answer to a good ol' question out there in the trenches, fighting for the rep. :)
 
@sbi, oh sure. you're gonna make me delete my answer arent you!
 
sbi
@John Huh??
 
@sbi: i'm just kojing around with you
*joking
 
sbi
Ha, shot down the leading answer to stackoverflow.com/questions/4219286/…, now the fight for position #2 is raging!
@John Yeah, I've just seen your answer. I wonder why for so long nobody had the idea to tell that newbie that new is out in C++ and stack variables are hip.
 
@JohnDibling #$^&#@#%#&&**^%(#%@ I knew it was going to be because of ADL.
 
8:52 PM
@James: Yeah, I love & hate ADL
 
sbi
@John Don't we all...
Ah, I meant to up-vote GMan's answer, but ran out of votes for today...
 
doesn't casting an out-of-range value to a signed type result in undefined behavior?
 
ohhh!
i propose: a [tag-faq] tag, which has high weight in the "faq" section of a tag
so we could have [regex-faq] and [c++-faq] questions, all of which have relatively higher weight in the faq section. or they could be listed first in the faq list
 
It does @avakar
 
9:07 PM
@JohnDibling i find it ugly that a "void main" answer is a faq answer now. skizz should prolly fix it?
 
I think that's why boost::numeric_cast was made
 
@litb: i didntn't notice this. yes, definitely
FAQs should not have non-Standard code
 
sbi
@JohannesSchaublitb I just went and fixed that.
 
@sbi ohh nice!
you know, i'm that shy guy who doesn'T wanna edit ppls answers
 
@sbi: I think I have a stalker. Someone just wnet through my day and downvoted everything
@sbi including my posted question which, by all rights, is not a down-votable question
 
9:14 PM
@JohnDibling It wasn't me, honest!
 
2
Q: C++: "Roll-Back" or Undo Any Manipulators Applied To A Stream Without Knowing What The Manipulators Were

John DiblingIf I apply an arbitrary number of manipulators to a stream, is there a way to undo the application of those manipulators in a generic way? For example, consider the following: #include <iostream> #include <iomanip> using namespace std; int main() { cout << "Hello" <&l...

 
We need another FAQ
"What is the correct way to use the iostreams and what does correct error checking look like?"
 
oh god i'm plain stupid on streams
this is a facet that i have no clue about.
lol i like that pun. but it's not my creation xD
 
That is not funny. (Ok, yes it is)
 
i have four words for ya: THIS IS NOT FUNNY! ahahaha
the chat should have an answer editr
 
9:23 PM
That would have been funny if it wasn't four words :3
 
so we could work together on faq questions and answers
cisco dude it was ballman
 
Then we can divide up who posts each of them and then all upvote all the FAQ questions!
:-D
 
yes, i knew communism would win
 
sbi
@JohnDibling There's a script running that will detect such runs and negate them. I once had someone doing this to me for three days in a row. At first I was concerned and flagged for the moderators, but they told me to calm down and they were right. The next day I had all my rep back.
@JamesMcNellis Now why did you feel like you need to speak up and say this??
 
(That was a joke, lest there is any confusion)
 
9:29 PM
humoroverflow.stackexchange
make it now
I can picture the questions. "Why did the chicken cross the road?"
 
there should be the possibility to anonymize a SE account
 
sbi
Ha, brought it down to zero! stackoverflow.com/questions/4219286/… Such a stupid answer!
 
but still using the same email address as for the other sites
 
sbi
@JohannesSchaublitb What do you mean?
 
yes, i did the 1 -> 0 downvote xD
@sbi so that it doesn't display the "related accounts" of one
 
sbi
9:31 PM
Now why would anyone up-vote your comment explaining what your answer says, but _not: up-voting your answer?
@JohannesSchaublitb Good that one deserved it!
 
i also upvoted your comment xD
lol
 
sbi
@JohannesSchaublitb <shrug> Just don't connect them.
 
@sbi Yeah, that was probably a dumb idea. I'm not always very smart.
 
(the 8 one i mean=
)
 
sbi
@JohannesSchaublitb Oh, so you have been that bastard! :) Good to know. Now that i have you here: Why did you do this???
@JamesMcNellis Yeah, that gave you away.
@JohannesSchaublitb ?? (I suck at l33t.)
 
9:34 PM
@sbi no i upvoted your comment from 7 to 8 i think. i didn't upvote your other comment that currently is at 1
in fact it shouldn't only be used, but it cannot be used for it at all
thus i don't understand why it should be "C++'s closest cousin to C-style casts"
 
sbi
@JohannesSchaublitb Wow, I have a comment with 8 up-votes? Where's that?
 
@JohannesSchaublitb most people don't understand C-style casts, much less C++'s additions
 
@sbi yep it's on that weird zero-score answer
 
That answer is no longer at zero.
 
9:40 PM
@sbi: its on the cast answer you targetted for extinction :)
 
i'm glad i brought all the question, accepted answer and zeke's answer to zero by downvotes here: stackoverflow.com/questions/4175327/c-restrict-with-typedef !
i'm such a pedantic retard, but he said "The restrict keyword doesn't exist in ANSI C". possibly he means ANSI C89 though. do you think i should leave a comment?
 
sbi
@JohannesSchaublitb Oh come on, I'm dying to know which one you're referring to! (I must have dozens of zero-score answers.)
@JohnDibling Ah., that one!
<sigh>
Thanks. I'm soo much calmer now.
 
no love for exception safety? :(
2
A: C++: "Roll-Back" or Undo Any Manipulators Applied To A Stream Without Knowing What The Manipulators Were

FredOverflowSaving and restoring state is not exception-safe. I would propose to shuffle everything into a stringstream, and finally you put that on the real stream (which has never changed its flags at all). #include <iostream> #include <iomanip> #include <sstream> int main() { std::...

 
sbi
No, I meant my answer in that fread. That guy asked a question regarding it in a comment, mentioning a possible problem with my answer. I replied to him in another comment, explaining why I don't see a problem in that. Someone thought my comment reply was good enough to up-vote is, but apparently didn't think the same about my answer. I don't get it.
 
9:52 PM
I think some people are more willing to upvote comments than answers, because upvoting a comment doesn't give rep.
Why do some people allegedly think this? I have no idea.
 
@JohannesSchaublitb "ANSI C" usually means C89, yes
 
maybe they feel bad to make ppl lucky
 
@FredNurk Is C99 not standardized by ANSI??
 
ANSI standardized it too
 
@FredOverflow: ANSI standardized C in 89, which was then endorsed by ISO; for C99, it was the other way around
 
9:55 PM
So shouldn't "ANSI C" mean "the latest C standardized by ANSI"?
 
@FredOverflow The issue is Very Slow Uptake of C99. E.g. by Microsoft. So by default "C" still refers to "C89"
 
but it seems like "ANSI" is somehow connected to "old school" to some, and so they when they hear "ANSI C" they think "ah the old school C"
 
@FredOverflow: it isn't wrong to say C99 is accepted by ANSI, but that's not how "ANSI C" is most often used
 
@JohannesSchaublitb Ah, when sizeof was a pure compile time operator, those were the days...
 
i bet when people are asked "What's ISO C?" more ppl would ask "C89 or C99?" than when people are asked "What's ANSI C?"
@FredOverflow haha
 
9:56 PM
@JohannesSchaublitb: "ANSI C" is just what it was called, back when you had many flavors of C; "standard C" wasn't common usage then
 
rather than the "old school" interpretation
 
@JohannesSchaublitb Maybe when they hear "ANSI C", they think "C ANSICH" :-)
 
haha
"ah the switzerland version of C"
 
@James: How is C not "real"? :)
 
9:58 PM
that nick keeps reminding me of that "James Kanze" troll of comp.lang.c++
 
Ha ha ha. I only troll in good fun though. (However, maybe he thinks the same thing of himself...)
 
@JohannesSchaublitb Actually, James is a pretty decent guy -- just strongly opinionated...
 
lol
yes sometimes i love him
 
sbi
@JohannesSchaublitb Huh?
 
but sometimes i'm like "arrrg why don't you quit trolling me" lol
@sbi someone from usenet xD
 
sbi
10:00 PM
Well, I do know James Kanze.
 
@JerryCoffin like with the sequence point debate... i tried to tell him ten times what it is about. and he kept telling me i'm making up fun things
 
sbi
@Johannes I have been around in c.l.c++.m when you were still wetting your diapers!
 
@JohannesSchaublitb Do you have a link to that discussion? Is he on SO as well?
 
sbi
Yes, JK is peculiar. But if you want to know anything about streams, just ask James or Dietmar.
@FredOverflow I don't think so.
 
10:02 PM
@FredOverflow dunno. i don't think he is
 
@Fred: I'm all about exception safety.
 
@JohannesSchaublitb Yeah -- he's a bit at the opposite end of the spectrum form you. He's quite a bit older (~60), and if memory serves was one of the founding members of the standard committee. I think (a bit like me) he's just gotten sick of some of the hair splitting debates.
 
sbi
Altough, since Alf appeared here, I think anything is possible.
 
@sbi Yes, but even James will open admit that Dietmar is the king of streams!
 
@sbi You mean when we all had, erm... "resource leaks"? ;)
 
sbi
10:03 PM
@FredOverflow Haha!
 
@JerryCoffin well i don't care whether he's sick of hair splitting debates. i value such an opinion, actually
 
@sbi: Did you get my point about the temporary vector yet? :)
 
Actually James Kanze is on SO as of yesterday
:-)
 
sbi
@JerryCoffin Would he? I dunno. Actually, now that you brought this up... I can't remember James admitting anything, ever. :)
@AlfPSteinbach No!
 
10:04 PM
To many Jameses though. James1, James2, James3 ...
 
sbi
You're pulling our legs!
 
It's like those Bruces in Python forums
No I'm not
It's the secret cabal of clc++m mods out to take over SO. Now I'm wondering about @sbi ... ;-)
 
@JerryCoffin i'm also kinda sick of hair splitting debates
 
@AlfPSteinbach People with a lisp (no, not the programming language, that funny talk) would pronounce "sbi" as "fbi", ever noticed that? ...
@JohannesSchaublitb Well, what is the best way to split hearts? Binary split? Banana split?
 
but sometimes those debates just happen :)
 
10:07 PM
@JohannesSchaublitb sick, you say? "Do you mean ANSI C99 or ANSI C89?"
 
@sbi I could probably dig it up if necessary -- as I recall, he once told about how there was a debate going on in the standard committee about changing iostreams because they were too slow, so during the debate Dietmar wrote a version that eliminated the problem under discussion.
 
@FredOverflow cut split :)
@Fred wasn't a hair split
 
@JohannesSchaublitb oh, i wrote hearts. i really meant hairs!
 
ANSI C99 and ANSI C89 are 10 years in between
 
@JerryCoffin :-)
 
10:08 PM
it's like a man with hair and a man without hair
 
@JohannesSchaublitb But there was also C95...
 
@Jerry yes and in the moment we are at C 2007 iirc
although C95 was a normative addendum made in parallel to C89...
 
sbi
@FredOverflow You're all free to find out my identity, and if you've been a regular in c.l.c++.m during the times I have, it's actually not that hard. But please do so in private. I have been very open with my opinions for more than a decade, and I now value my privacy.
 
@JohannesSchaublitb I seem to recall its being 2008, but don't really care either way. and the word isn't "addendum", but "corrigendum", FWIW.
 
Who is that BE Student, anyway? He is always asking very strange template questions...
 
sbi
10:09 PM
@JerryCoffin I remember that. He was once asked why this died. Forgot the reason, though.
 
@JerryCoffin the term is "technical corrigendum" for corrigenda to the standard
 
@sbi I have never been in c.l.c++.m
 
but C95 wasn't a corrigenda to C89 at all
 
@sbi not sure what you mean by "this", but if it was Dietmar's implementation, I think same reason as Andrei's YASTLI (or whatever he called it): it's just too darned much to do for one man
 
it was an addition for supporting alternative token macros and wide character functions and such. C89 were untouched by that.
 
sbi
10:11 PM
@AlfPSteinbach I think he had a complete implementation, no?
@FredOverflow Oh damn, is he back? He makes me wonder whether EDG started to resort to outsourcing to India... (No offense, @Prasoon.)
 
@sbi Yes, but this time with a real-world question about lvalue->rvalue conversion. No templates whatsoever.
 
@sbi That would be only of iostreams. But he did some good things. I met him only once, when he spoke at an Oslo C++ Users Group meeting. Impressed.
 
@sbi I believe it was reasonably complete, but (if memory serves) predated them being templatized. Before that, it was something one person stood a chance of doing in his spare time, but now they're just huge...
@JohannesSchaublitb I sit corrected! :-)
 
@JerryCoffin Can you also sip corrected? :) (You were that whiskey guy, right?)
 
sbi
10:16 PM
@AlfPSteinbach I spent two evenings in a pub with him. (One was also with Erwin Unruh, the Siemens C++ guy who might have written the first ever TMP "program".)
 
@FredOverflow No -- I was the wine guy, but I certainly enjoy sipping that. A good Cabernet is hard to beat...
 
@JerryCoffin I sip corrected, then :)
 
@FredOverflow A fine idea. Too bad I still have work to get done (and, looking at the clock, a son to pick up from school...)
 
sbi
One of those evenings someone (after we all had quite a few beers) told how, during one standard meeting, one evening Dietmar furiously hacked away on his notebook while everyone was doing smalltalk. When everybody started to think of going into the hotel room, he came up with that hacked implementation of GCC, that used all German keywords instead of the English once (for, int). That got a lot of loughs.
 
10:19 PM
@Fred: I'm the whiskey guy!
 
sbi
@JerryCoffin I think that was after the standardization. (I don't think I would have been able to even follow the discussions in c.l.c++.m before 1989. :))
 
i wish i could join a standards committee meeting some time :)
let's hope it's in germany again soon
 
@JerryCoffin That's awesome.
 
@litb, @alf: how does one go about getting on the standards committe?
 
Bruces, did I say Bruces? I meant Stevens. Although Bruces appropriate for Python!
 
10:24 PM
@JohnDibling comeaucomputing.com/csc/faq.html#B7 (I assume that's still up to date; who knows... parts of the FAQ are not up to date anymore.)
 
@JohnDibling I think, one requirement for doing a decent job on a standard committee is to be a little more diplomatic than me. When required, that is.
 
sbi
@sbi That very evening (only a few beers later), I also asked Erwin about that notable event of him presenting that TMP thing. (It would actually spit out template-computed prime numbers in an endless row of error messages, in case you haven't heard about it yet.) He told me that he always had the suspicion that template had become Turing-complete, and always meant to prove it mathematically, but never actually got around doing so.
So, while discussing things and hacking around one evening during a std commitee meeting, he came up with his program. Ho told me that, when he showed this to Bjarne, Bjarne just covered his eyes and tried to look away.
 
0
Q: What is the status of ranges in C++?

FredOverflowSometimes I get tired of all this my_vector.begin(), my_vector.end() noise. Last year at boostcon, Andrei Alexandrescu's keynote speech was titled Iterators Must Go (video) Is there any progress on introducing ranges into C++, so I can finally say std::sort(my_vector)?

 
good boost experts get free access to the committee, iheard. i find that mean though :)
 
sbi
@JohnDibling The easiest would be to have your national body nominate you.
However, I think they're always open to guests, too.
 
10:26 PM
@johannes: i think anyone can sit in. I've never been to a standards committe meeting though
 
interesting
 
@JohnDibling You pay 1.200 dollars, and at the second or third meeting you can start to vote.
 
we have one guy called V-ille in ##c++ that is on the committee
 
@johannes: remember schildt was on the committee
 
sbi
10:27 PM
When they were here in Berlin, Alisdair tried to talk me into coming to the meetings.
Only I had work to do.
And did I mention that I hate reading the standard?
 
when they were to frankfurt, i had study work to do :/
dammit i really missed the drama
 
@JohannesSchaublitb When is the next germany meeting and where?
 
sbi
@AlfPSteinbach Nominally.
 
@FredOverflow dunno xD
 
@JohannesSchaublitb Frankfurt was were they pulled concepts, right?
 
10:28 PM
yep
 
sbi
@JohannesSchaublitb Yep, that must have been really interesting!
 
I'm glad I didn't go, I might have tried to kill myself right there (just kidding)
C++0x without concepts? Goodbye cruel world... ;)
 
sbi
@FredOverflow That dayI was rounding up a C++ seminar I had been giving at a company over several weeks, with the last day giving an overview over C++0x, spending a lot of time explaining concepts. - The very hour they pulled the plug on them!
 
We can proudly say there are no concepts in C++ -- easy to learn!
 
@sbi Well, maybe they'll reintroduce concepts in the next standard after C++0x
@AlfPSteinbach And who needs novels when one can spend the evening reading STL error messages?
2
 
sbi
10:31 PM
@AlfPSteinbach It's also easy to fail without concepts. And when you fail, you need a second monitor just to be able to see the error messages!
@FredOverflow LOL!
 
Zwei doofe, ein Gedanke ;)
 
lol
2 * 0xd00fe
3
 
Yesterday, I implemented disable_if and confused true with false. The error messages in my test code were spectacular.
Isn't there a tool that translate STL error messages to human readable form?
 
it's called clang
lol
 
Isn't that a compiler?
 
sbi
10:33 PM
@JohannesSchaublitb Yeah, lets switch to German again...
@FredOverflow stlfilt by Leor Zolman.
 
@sbi Speaking of switch, I want to switch over strings!
 
good time to dig into perfect hash functions!
 
i still don't understand the business with perfect hashing
 
sbi
@FredOverflow So? Switch to C#.
 
10:35 PM
@sbi My C# book hasn't arrived yet, and C++ has taught me never to learn any advanced programming language without a book ;)
"An STL Error Message Decryptor for C++" LOL
@JohannesSchaublitb Perfect hashing is hashing without collisions. Of course this is only possible if you know the set of values beforehand. For example, if you have only 100 fixed, statically known strings, it is reasonable to find a hash function that computes 100 distinct hash values from those.
 
sbi
@FredOverflow If you know C++, you'll pick up C# in no time. Except for LINQ (which is good for many things besides DB's), which took some time for me to love, and their many different syntaxes for lambdas, I couldn't say I really had to actually leanr anything.
@FredOverflow ISTR Scott actually recommending this in EC++!
 
@sbi Well yeah but for example, struct and class are very different beasts in C# right? Somewhere I read that structs should be immutable. I want to know why. If this immutability of structs really is important and not some voodoo programming, I bet Jon Skeet will have written about it.
@sbi ISTR as in "Internationales Steuerrecht"? :)
 
"I seem to remember"
 
sbi
@FredOverflow "I seem to remember"
 
makes sense
@FredNurk oh another fred! hi there
 
10:39 PM
hello, been getting @notifications for you for the past day :)
 
@FredNurk hope you enjoyed them ;)
@sbi: Ah, the vector finally has a name, great ;)
 
actually, wasn't sure if @Fred notifies the last of us to speak, or both
 
hm, dunno
 
someone else say "@Fred"
 
sbi
@FredOverflow C# divides its type system into value types and (potentially polymorphic) class types. Not a new concept, just something you will need to have heard about. A struct will create a value type, a class a class type. Value types are best when immutable. But there's types crossing the border. (Like the immutable string type, which is a class...)
@Fred
 
10:41 PM
@FredOverflow yeah but i've no clue how to actually create such a hash function
someone told me it's guaranteed there is at least one perfect hash function for any fixed set of strings
 
@Johannes: Taking the first four letters of the user name would not be a perfect hash function in this chatroom right now :-/
 
@sbi I was confused by C# compiler errors this morning because I used this->. Nothing's quite as embarrasing though as when I "corrected" someone's C++ answer on SO and accidentally forgot the : after public. :-O
 
@FredOverflow: that notified me, and I was the last to speak; did it notify you?
 
sbi
@sbi @Fred And which one of you got notified?
 
but so far all i found are random algorithms that just try a couple of fixed hash function and experiment with parameters until one works "out of nowhere"
 
10:42 PM
@JamesMcNellis Actually, that was my answer, I remember it vividly :)
@sbi What exactly do you mean, notified? I see it in purple here.
But I only get "notified" when I'm not here
 
@JohannesSchaublitb: unless you know something about the data beforehand, that's almost the only reasonable approach
 
sbi
@JamesMcNellis Yeah, I've been living in this schizophrenic state for quite a while now. Almost all my questions are C# questions, almost all my answers are C++ answers.
 
@FredOverflow: by "notifies", I mean it highlights "@Fred" for me and shows a blue circle on my avatar
 
sbi
@FredOverflow There's this colored number overlay over my avatar to the left of where I enter messages.
 
@FredNurk Oh yeah, that both happened
 
10:45 PM
@sbi This would be the C++ standard, which didn't come out 'til 1998. Templatizing iostreams happened only shortly before that (~1995 or 1996?)
 
sbi
@Fred So now we need to attribute you as @FredN and FredO.
 
@FredOverflow: then it appears to notify all matching users
 
sbi
@JerryCoffin Yeah, 98. I always mess this up. In the end of 1989 I was just starting to break through the Iron Curtain. I had seen a printf statement by then, midn you...
 
What about the space in freds name? does @FredN really work?
 
10:47 PM
@FredO: yes
 
sbi
@FredNurk Yeah, good to know how this works. I'm glad you found this out. Now I won't have to wonder in case someone comes around with a nick starting with "sbi"...
 
@sbi well, there's no way around this, he'll get all your notifications :)
 
sbi
@FredOverflow @FredN Of course! Just look at the message this one links to. It starts with FredNurk!
@FredOverflow Oh well. Just as long as I get them, too, all I can wish for is that I won't get all of his...
 
@a @b @c @d @e @f @g @h @i @j @k @l @m @n @o @p @q @r @s @t @u @v @w @x @y @z hello everbody :)
did that work?
 
10:50 PM
why not? too short?
 
sbi
@FredOverflow @addressing only works with at least the first three letters matching.
 
okay, I'm not writing down 26^3 prefixes here :)
And ^ is exponentiation, not exclusive-or :)
 
sbi
3^26!
 
@... does this work!?
 
@sbi no, 3^26 would be length 26 of 3 different characters
 
10:51 PM
@JamesMcNellis Can I notify myself?
 
sbi
@Johannes You will have to ask the user whose nick starts with three dots.
 
@FredOverflow that works with google. i did that once and caused the google counter to overflow .)
it said something like "-1 pages found" or such xD
 
sbi
@FredOverflow Uh oh, I should go to bed.
 
@FredOverflow: " ".join("".join(["@", a, b, c]) for a in string.ascii_lowercase for b in string.ascii_lowercase for c in string.ascii_lowercase)
 
sbi
@JamesMcNellis You can even reply to your own message. While the UI won't help you, you can always put the :xxxxxx number in front of your message yourself.
@sbi I do this once in a while.
 
10:53 PM
hmm
 
sbi
@sbi It's easiest when you pick a message right in front or after yours and then just fix that one digit.
 
okay let's see...
 
sbi
@JohannesSchaublitb What you eating?
 
for (char x = 'a'; x <= 'z'; ++x)
{
    for (char y = 'a'; y <= 'z'; ++y)
    {
        for (char z = 'a'; z <= 'z'; ++z)
        {
            std::cout << '@' << x << y << z << ' ';
        }
        std::cout << "hello there!\n";
    }
}
;)
 
@sbi bananas
 
sbi
10:55 PM
@Johannes Hmmm!
 
only 96kb of text! here is one line:
@sba @sbb @sbc @sbd @sbe @sbf @sbg @sbh @sbi @sbj @sbk @sbl @sbm @sbn @sbo @sbp @sbq @sbr @sbs @sbt @sbu @sbv @sbw @sbx @sby @sbz hello there!
 
('aaa'..'zzz').map{|x| "@#{x}"}.join(" ") + " Hi everyone!"
yay ruby
 
I bet you can do it in like 20 chars with APL :)
 
sbi
@FredOverflow Got me!
 
GET A ROOM, RUBY FAN!
 
10:56 PM
@JamesMcNellis ahahaha
 
:-) I'm just kidding. I love scripting languages that make stuff like that so easy.
 
Ruby is my calculator. I have an irb console open almost constantly for little things like that
 

« first day (33 days earlier)      last day (4901 days later) »