« first day (177 days earlier)      last day (4755 days later) » 

8:00 AM
... bad one apparently.
 
sbi
@FredOverflow Tina seems to just have changed her nick to "Model".
@AProgrammer If you reload this page, you'll see this.
 
Confirmed
 
yep @sbi is correct, she's changed her nick
it's not like we don't know it's really @tina... hahah
the last people to fool is a bunch of C++ programmers...
how was your weekend @sbi? Happy it's monday? LOL
 
Als
@Model: Haha its Model as in Fashion Model or Model as in MVC
 
@Als hopefully not a View -Model.... :p
 
Als
8:08 AM
@Tony: :D, I don't think that Desktop Notifications work for me...I think some script issues with my Browser or my RAM woes
 
sbi
@Tony I had a few things to attend to on Sat, went to a friend's birthday on Sat night, and spent most of the beautiful spring Sunday tending to my garden, ending in a small BBQ with two friends/neighbors. And I spent way too much time on meta.stackoverflow.com/questions/86733. :)
@Als I suppose this is a Chrome-only thing? Because I don't see the link you referred to?
 
Als
@sbi: The link is seen here,Right below the starred Messages ------------>
 
sbi
@Als Well, it isn't for me. OTOH I have a loudspeaker symbol at the top left corner of the bar on the right, which, when set, makes IE beep whenever I'm mentioned, but which fails for FF.
 
Als
@sbi: Yeah i do have it, it's the Audio Notification, The link that I am referring says "desktop notification", As Tony explained indicates visually if you are mentioned..Strangely, though wont work for me
 
@sbi BBQ sounds like a nice thing to do :) Esp with the nice & sunny weather. I sat outside coding for a little over the weekend. That was nice :) Oh yes; I noticed that the meta question has been absorbing your attention...
 
sbi
8:14 AM
@Als That's the bottom right hand corner of my chat window.
 
Als
@sbi: Yes...strange though...Looks like IE, doesn't render that at all...uhoo...Missing implementations in IE
 
sbi
That's the top. Note the loudspeaker icon.
 
Als
@sbi: Yeah thats in sync with what i see on Chrome
 
sbi
@Tony Note that the BBQ was a very small one (just three of us), and that it was the very last thing after a day of digging (I still need to properly cleanup my fingernails), planting, and seeding, so it was well-deserved. :)
 
@sbi :)
 
sbi
8:26 AM
@Tony: When Adam posted out of context the "juiciest" of statements to be found in the sex debate we had here, I somewhat went over the top. That got me really worked up.
 
@sbi I really annoys me when someone posts something out of context to make it look bad, when if it is placed in context it is actually fine
The media is good at taking things out of context to make them look bad, if you ask me
hello tina!
 
Als
Model Tina!
 
@Model hi, how can we help you today?
@Model yea I'm feeling in a helpful mood
 
Als
:) its all help day today
 
@Model you mean you overloaded operator== ?
@Model if you write clear and understandable english, you can
@Model post a question on SO, then I can look at it and see if I can help you
 
sbi
8:44 AM
@Tony Yeah, and it's usually the very same people who complain about the media doing this who do it themselves if they feel like. What really gets me into a murdering frenzy is the attitude "yeah, we normally detest of this or that, but in this case it's justified."
What good for are principles, when you only apply them to others, and throw them overboard at whim?
 
@sbi yes, I have noticed that critics mostly criticize what they themselves do in others...
 
sbi
Like that guy explaining to me how ordinarily people turn fanatic when you touch their pet peeves, and by doing so calling me a "raving lunatic". I wonder if he didn't answer anymore because he realized how well the situation fit his statement? But then, such people usually don't see this..
@Tony I guess that is a very good one-sentence summarization of what I needed three paragraphs for. :)
 
@sbi :)
@Model no cuz I don't read chinese
@Model without context, I don't know what that is all about? Sound? Light? What?
 
@Tony Looks more like Korean to me..
 
@StackedCrooked I'm not well versed enough to make that distinction
 
8:54 AM
@Tony :)
 
@Model I would really appreciate if you tried to write correctly spelled english... it comes over as rather careless if you write your english full of spelling mistakes
19 mins ago, by Tony
@Model post a question on SO, then I can look at it and see if I can help you
@Model the whole point of SO is that you can POST a question with ALL data on it, so people can read it themselves and understand what you're trying to do and then help you resolve the issue. If you don't want to make use of that, then I don't see what you're doing here... I or anyone else cannot help you with only half of the data or an image with some matrices on it...
3
 
@tina: What is the declaration of LUT1?
 
@Model yes, do you understand what a pointer is for and what the difference is between a pointer and an array?
I think that will help you...
@Model that indicates to me, that you're not entirely sure, you should go read up on it, and make sure you understand what it is and how it works...
 
@tina: You are accessing 1D array using two indexes, that does not make much sense.
 
@Model you probably want ptr1[i][j]=LUT1[ptr1[i][j]];
 
9:11 AM
am I just being silly or does C++ actually require one really understands what is going on, and without that, you're just shooting yourself in the foot?
 
looks like he's aftet LUT1[i * w1 + j]
that is, if you want to convert 2D array coordinates to 1D coordinates (linear)
 
9:28 AM
Hi,

Im using Japanese string as whar_t i need to convert it to char*, Is there any method or function to convert wchar_t* to char* without loosing data
 
gcc, VS?
 
visual studio 2008
 
@Athreya like this
  wchar_t* wstr = L"A wide character string.";char* ascii = new char[wcslen(wstr) +     1];wcstombs( ascii, wstr, wcslen(wstr) );
 
sbi
No, you're right. C++ brings very few abstraction in the core language, which enables you to write code close to the metal. (But it brings a lot of features to create your own abstractions, and accordingly brings many of those in its library.)
You can't use concepts like arrays, pointers without fully understanding them, and Tina has shown several times that she doesn't. Nor does she seem to be willing to submit to the process of properly learning them. Fred's excellent explanation regarding pointers and arrays as well as Alf's excellent and very comprehensive pointer tutorial had been poin
@Athreya That question makes no sense. Let me explain...
You need to distinguish between the way a string of text is encoded and the underlying data types to store this representation.
 
cpx
9:32 AM
@Athreya It depends on your character encoding. You can use this function msdn.microsoft.com/en-us/library/dd374130%28v=vs.85%29.aspx
 
@Tony i tried using the wcstombs() function im loosing data
 
sbi
wchar_t and char are just that: data types. If you store strings in them, you need to specify an encoding in which you want to store those.
 
@sbi Yes you're right, I have even pointed her to that tutorial of @Alf, but to no avail... she's now come to a point where it's annoying me, and seeing I don't get annoyed very easily, that's quite an achievement. It just shows some people don't think before they do, and that is re-action, ie just copying from others
 
@Athreya If you are writing code for Windows specifically, skip all the weird gotchas in the crt->os code page mapping. Just use MultiByteToWideChar and WideCharToMultiByte to do the conversions
 
@Athreya im you'll always loose data, cause you're converting a wide to a narrow...
 
sbi
9:35 AM
The only way I know of to store arbitrary strings in 8bit data types is using some multi-byte encoding. The most common and universal one is the UTF-8 encoding of Unicode characters. Is that what you want? If not, please explain.
 
the first parameter is explicitly the code page of the 8byte string.
 
@sbi yes I need unicode UTF-8 encoding
 
sbi
@Tony No, you don't. A proper multi-byte encoding allows you to store arbitrary strings in 8bit char types.
 
WideCharToMultiByte(CP_UTF8,...
 
With a correctly set locale, wcstombs should do the work, but the length won't be the result of wcslen.
 
9:36 AM
@sbi er, the only multibyte encoding that can actually store arbitrary characters, is utf8.
 
@sbi heh, I learned something again :)
 
sbi
@Athreya Then I guess you won't get far without either a library supporting Unicode or sumbmitting to OS specific stuff. @Chris' advice might be best if you're on Windows.
 
@tony im using oracle oci library to parse a sql statement which contains japanese string.. the oci parse method accepts char * as argument
 
Athreya specified "Japanese" characters. I'd expect shift-JIS or EUC to do the work in this case.
 
(which is a somewhat self referential statement, because "arbitrary characters" typlically means, arbitrary characters from the unicode character set")
 
9:38 AM
@Athreya oh I have experience with OCI, not a good one therefore, but experience nevertheless
 
sbi
@ChrisBecke Well, if you want to be picky, then even UTF-8 can't store really arbitrary strings. Last time I looked, Elvish wasn't accepted for Unicode (though I think Klingon was).
 
I need to passs wchar_t* to the parse statement
 
@Athreya, "Japanese characters" is a little under specified. They could be encoded in unicode (in which case wchar_t* would contains UTF-32" or UCS-16 and char* UTF-8) or in another encoding (SHIFT-JIS, EUC-JP, ISO2022-JP...)
 
so i tried converting wchar_t to char * but i loose data in conversion of japanese string
 
Arrghhh Multibyte Encoding contains singletons.... :p
 
9:39 AM
@Athreya, on which OS?
 
if the parser needs wchar_t, surely you are converting TO wchar_t from char?
 
A variable-width encoding is a type of character encoding scheme in which codes of differing lengths are used to encode a character set (a repertoire of symbols) for representation in a computer. Most common variable-width encodings are multibyte encodings, which use varying numbers of bytes (octets) to encode different characters. (Some authors, notably in Microsoft documentation, use the term multibyte character set, which is a misnomer since representation size is an attribute of the encoding, not of the character set.) Early variable width encodings using less than a byte per chara...
 
@aPROGRAMMER WINDOWS xp 64 BIT
 
sbi
@Tony It's a very common pattern with Tina. She comes here and asks for help, people like you are in a helpful mood and try to, but soon become annoyed at her inability or refusal to state a proper question, context and all, to type understandable sentences, and her unwillingness the study tutorial etc. she's been referred to.
4
 
In which case, the correct Winapi to use would be MultiByteToWideChar(CP_ACP,...
 
9:41 AM
Did you do a setlocale("", LC_ALL) when you tried to use wcstombs?
 
sbi
@Athreya Which compiler? (Because the width and encoding of wchar_t is platform-specific, and for the C++ standard, the compiler+library combo make up the platform.
 
@Aprogrammer No, ill try that
@sbi VS-08
 
@sbi yes, so now I'm no longer going to try, I'm sorry but if you want help, you have to be willing to be helped too! It's not just a one sided game.
 
sbi
@Tony Indeed.
 
@Athreya Standard functions related to character sets are depending on the locale set up properly.
 
9:44 AM
@chris I need to do the other way round convert from wchar to multibyte but by doing so im loosng data
 
sbi
@Athreya In that case wchar_t strings would, per default, be encoded as UTF-16, while char would be whatever encoding your Windows installation uses. (Of course, you can store anything you want in them, but if you have a string literal in your code, that's what they default to.)
 
@AProgrammer Ok, thanks ill do that
 
@Athreya Windows never uses utf-8 for its default code page. so you will always loose data when converting from wchar_t to char*.
 
sbi
@Athreya Then there's a WideCharToMultiByte() function.
 
9:47 AM
you can coerce both WideCharToMultiByte (Windows API) and wcstombcs (cruntime) to convert to a utf-8 encoded string. But you cannot use the result with any OS functions (Except to convert it back to wchar_t first).
 
sbi
@Tony Dad's der bunny! :)
 
@sbi yes i tried using the WideCharToMultiByte() but i loose data in doing so
 
@sbi the only one that seems to have enough patience with her is @Alf, though that said, he hasn't been here either, maybe that means something?!!
 
@ all is there any method in OCI I can parse a wide character sql statement
 
WideCharToMultiByte(CP_UTF8,... // wont loose data.
WideCharToMultiByte(CP_ACP,...   // will loose data
 
sbi
9:49 AM
@Athreya What target encoding did you specify? How did you verify you lost data? As @Chris said, you can't do much with a UTF-8 string on Windows, except convert it to something else.
@Tony :)
TBH, I, too, worry about @Alf being absent for so long. Since he's here, he's never done that.
 
@Athreya none that I have seeen
@sbi yea it's a bit weird... maybe he's now working full time and has no more time to spend here
 
@sbi I specified utf-8, while debugging I checked the locals the japanese string is converted to junk as soon as I covert it to char*
@chris thanks I'll try what you mentioned
 
cpx
@Athreya Its just multibyte
 
@Athreya DevStudio cannot display utf8 encoded strings in its debug window properly
 
sbi
@Athreya How did you see they were junk? I don't think the debugger can display UTF-8 strings and without proper decoding, they'd be gibberish.
 
9:52 AM
It will try display them using the default ansi codepage, which will loose some characters.
If you need to validate, outside of devstudio, what a particular sequence of bytes might represent, I find this tool helpful: flounder.com/localeexplorer.htm
 
I've installed the utf-8 encodng
it decodes the the japanese string
 
@Athreya I dont know what that means.
 
sbi
@Athreya: One way to check whether they are proper UTF-8 representations of the strings you fed in would be to write them to disk, and embed the files's context as is into an XML file that claims to be UTF-8-encoded. Any XML viewer (like IE) will be able to parse that.
 
@ all i've installed language pack
 
here's a question for those experienced in quoting the standard:
1
Q: How do I quote the C++ Standard?

MeThinksI find that sometimes in answering or reading answers to C/C++ questions on SO, I have to quote/read some clauses from the C standard or C++ standard. Is there a convention or even standard way to read or quote the standard(s)? Essentially, what is the conventional way to read/quote the standard(...

 
10:01 AM
@Athreya That doesn't matter. The utf8 support is there, but applications still have to know when to use it. DevStudio does NOT try to use anything except the default codepage when displaying char* strings so it will display utf8 strings incorrectly.
Dont worry about it. If you want to check the string, convert it back to wchar_t and make sure thats ok. If a string can convert from wchar_t* to char* and back to wchar_t* then you know there is no loss.
 
@chris when I insert the same statement in DB i get junk value..
 
The DB api will probably be expecting a default os encoded string if passed a char*.
convert the result of the OCI parsing back to wchar_t
and then submit that to the db.
 
@chris thanks for the suggestion ill try that
 
sbi
@Tony What a silly question. Or am I missing anything?
 
@sbi it is a silly question for sure... but thought it'd be a laugh posting it here :p
@sbi migrated to the place for silly questions... hahah :p
 
10:20 AM
I need to confess something. I love the development process of Java applications with Eclipse. Hm, I don't like the name of this method, let me just press Alt+Shift+R and rename it, done. Hm, this method is too long, let me just mark these lines and press Alt+Shift+M and extract them into their own method, done.
I wish it was that easy to refactor C++ code.
 
@sbi I don't believe tina is real. I believe we are being gamed by some psych students doing a study on how much more helpful people in internet chatrooms are when faced with an persona which is perceived to be female.
 
@ChrisBecke possibly....
 
65,574 questions tagged C++. We have crossed the 16 bit boundary today!
 
@FredOverflow ive used plugins for devstudio for native c++ that do just that.
 
@ChrisBecke How well do they work?
E.g. do they ever get confused?
 
10:24 AM
Perhaps. I never found them compelling enough to keep installed.
But when I did use them they worked rather well.
Right click->refactor->rename
You could select a block of code and choose to turn it into a function
that it would automatically add to the class, and infer the parameters needed.
 
cpx
I think we also need an option to ignore the replies directed at the user we have on 'ignore'.
 
sbi
@FredOverflow Visual Assist works reasonably well, considering that they won't have an internal model of the code in memory (VA has a somewhat fuzzy compiler), but it does get confused. If eclipse's refactoring for Java compares to what VS does for C#, then you'll be disappointed when it fails. If you come from an IDE where a global replace feature is all you have for refactoring, you'll love it.
@ChrisBecke You mean they're testing a model (ha!) of male/female online communication? Mhmm. That makes me wonder what we're tested for with you. :)
 
@sbi Been wondering.... :P
 
@sbi just patience :P
 
sbi
@ChrisBecke VA greatest strength is that it's much better than VS' built-in "Intellisense". Of the several dozen VS-using C++ developers I have shown this, only one was not scratching at his manager's door to buy it for him within two days.
 
10:36 AM
@sbi I am one of the contrarian developers who finds VA annoying.
 
sbi
@ChrisBecke Actually, I would have been surprised...
@FredOverflow I'm amazed at what some people look out for. At a place I used to work developers played the game of trying to get interesting SVN rev numbers for their checkins.
When interesting revision numbers (think 20000 or 32768) came up, people started to pile small changes on the side which wouldn't needed to be committed right away, and which they, if the number was real close, would commit in rapid succession in order to get the interesting number.
 
@sbi what keeps some people amused is quite interesting to me :)
 
sbi
Of course, some were above that - and only tried to get a "pure number", which was one that was achieved with a single checkin right on the spot. :)
 
10:52 AM
@sbi hehe :)
 
Xeo
ohayô o/
 
sbi
11:22 AM
@Xeo ??
 
Xeo
@sbi hello in japanese :)
 
sbi
Anyway, I'm not sure whether Kevlin is just late or whether some important step really has just been made, but in case it's the latter:
For C++0x watchers: FDIS just sent to ISO.
@Xeo Oh. Well. I wouldn't even know how to pronounce this.
 
@sbi I've met this guy :)
 
sbi
@Tony When and were?
 
Xeo
@sbi just like it is read :) o - ha - yo (long second o)
 
11:25 AM
@sbi I guess the new thing is that they finished integrating the changes from the last meeting into a single spec
 
sbi
@Xeo Are you kidding? I read "o/" as o-slash. I doubt that Japanese have a slash in their greeting.
 
What is FDIS?
 
final draft something soemthing
 
Xeo
@sbi oh, that. that was just a smiley, a guy waving his hand :P
 
international standard, I think
 
sbi
11:26 AM
@FredOverflow Final Draft of International Standard?
 
@sbi Dev Conference in London, march last year
@sbi hahahaha :)
 
sbi
@Xeo Aren't Asian smileys supposed to be horizontal?
@Tony Is is as charismatic as I think he would be?
 
Xeo
@sbi ┐( ̄ー ̄)┌
 
@sbi nice chap, easy to talk to :)
 
sbi
@Xeo Not that I could read these, but at least I might have realized it's a smiley. :)
 
11:28 AM
 
@Xeo that's like trying to express a smiley in templated code.... complex
 
Xeo
@Tony really? i think japanese smileys are rather intuitive.. the above would be kind of "can't be bothered"
 
@Xeo "can't bob" is much easier and communicates better imho
haven't seen @FredNurk around for ages... it says on his profile he's taking a break from SO... wth?
 
God I love closing questions as duplicates! It gives me this warm, fuzzy feeling of having cleaned something up.
A bit like removing code duplication.
 
11:44 AM
@FredOverflow yes it's good to clean up :)
 
sbi
@Tony Hadn't he posted a message over the weekend?
23 hours ago, by Fred Nurk
If C++ has taught me one thing, it’s this: Just because the system is consistent doesn’t mean it’s not the work of Satan. -- Andrew Plotkin
Anyway, gotta go and leave the house now. See you later.
 
@sbi hahah, how could I have forgotten... I even starred it
 
@sbi The FDIS -- the draft on which national bodies have to vote, with the changes voted last meeting -- has just been sent to ISO by Pete.
IMHO, it is just a procedural step. But an important one. I don't think technical changes are now possible, either the standard is accepted, either it is rejected.
 
Am I rational enough for this question to have any meaning?
 
12:00 PM
@ChrisBecke what question?
 
@Tony ill take that as a vote of no confidence in my rationality then.
 
@ChrisBecke if you were making sense, I'd try a sensible reply, but you just aren't making any sense...
 
@ChrisBecke Are you trying to play with self referential sentences?
 
Well, I thought the question was self evident. There is one statement that needs a yes or no answer.
 
@ChrisBecke so essentially that question is asking itself whether it makes sense, hmmm
infinite recursion detected!!!
 
12:09 PM
Well, something like that.
The question Im interested is more complex: (a) is it possible to have a debate with an insane person. (b) how do I know that Im not insane. (c) does it matter?
 
@ChrisBecke to know that you first have to define insanity
 
@Tony and you can't define insanity unless you know you are sane.
 
@ChrisBecke no, you can define insanity by looking a good dictionary.
that would be the sane thing to do
 
how do you know? you could be an insane person telling me that. the dictionary could be written by insane people.
its like christians telling you the bible is the word of god.
 
@ChrisBecke do you like helping people?
@Model yes
 
12:15 PM
yes. But I strongly suspect that helping people is not particularly sane.
 
@ChrisBecke nothing to do with sanity, its just a belief
@ChrisBecke then you should not be here...
 
i don't like belief. Its unsubstantiated.
 
@ChrisBecke I don't care whether you like it or not, it's just what it is
 
@Model I strongly suspect that BYTE does not exist in your environment because you have not #include <windows.h> yet
 
@Model look up what a datatype is
@Model what error?
 
12:17 PM
some man told me "this book, the bible, is the word of god", and I told him, I have another man here who tells me the same thing about the koran. Both of you can't be right.
 
@ChrisBecke that's why it's belief .... 'nuff said
 
i have no idea what single is
its not a c++ type
its not a winapi type
so it must belong to some other library.
right click on it if you have an ide and ask to see its definition.
 
@Model As I said before and I'll say it yet again, POST a question on SO!!!
 
Im sure the Bible, and the Quran, are both traditionally 'Holy'.
Holly is a kind of mistletoe that you hang up during christmas and try to kiss girls under
Holly (Ilex, ) is a genus of approximately 600 species of flowering plants in the family Aquifoliaceae, and the only living genus in that family. Description and ecology Holly berries are somewhat toxic to humans, though their poisonous properties are overstated and fatalities almost unknown. They are extremely important food for numerous species of birds, and also are eaten by other wild animals. In the fall and early winter the berries are hard and apparently unpalatable. After being frozen or frosted several times, the berries soften, and become milder in taste. During wi...
Allthough ill give you that I do need to make a correction: "christians would hang up during christmas and try to kiss members of the opposing gender under"
 
@Model what is what?
 
12:24 PM
that is where you ask complicated questions
 
@ChrisBecke I don't think she has realized yet that SO is there for that purpose.
@Model can you learn to use Google?
 
@Tony and hence my question. one of us is insane. possibly both. how do we find out?
er, thats visual basic
Single corresponds to "float".
vs "Double" that would correspond to "double"
 
@Model no I've never seen Single
@ChrisBecke are u talking about me and you or tina and yourself?
 
@Tony well, to include tina would make 3 of us that are possibly insane.
 
12:35 PM
@ChrisBecke I'm pretty sure about my sanity, not sure about yours however.... seeing that I don't actually know you
 
from my POV both of you are insane. but can I be sure I'm sane enough to make that assesment?
 
@ChrisBecke so who is then sane to you and by what definition of sane?
 
@Model, Don't worry, they are insane.
 
@AProgrammer lol :p
@Model yes double is used in C++
 
@Tony which returns us to my opening question: am I sane enough to even ask that(this) question?
 
12:40 PM
@ChrisBecke Since when sanity is a prerequisite to ask questions?
 
@ChrisBecke fuck knows, if you cannot answer that question then you've obviously lost it
 
its a prerequisite to understanding the answer
 
@ChrisBecke it's like asking, "which was first the chick or the egg", it never ends
 
The chicken and the egg is easy: the egg was first.
 
@ChrisBecke what are you actually trying to do?
 
12:43 PM
@ChrisBecke Why? More often than not, insanity is selective. And you never stated that you wanted to understand the answer.
That depend on the context. You never gave us enough information about the context to answer. Most probable answer in contexts where both are defined: none.
 
BYTE is defined in windows.h has unsigned char
'byte' is defined... I have no idea. byte in this context is just the word people use to refer, generally to an 8bit unit.
byte might also be a typedef for unsigned char
your c/c++ data types are char, int, float, double
everything else thats not a pointer or struct is made up of combinations of those, prefixed with short, or long
 

« first day (177 days earlier)      last day (4755 days later) »