« first day (6 days earlier)      last day (5157 days later) » 

01:37
Do do do do do.
Echo echo echo...
02:20
The best part of Visual C++ 2010 is that since the IntelliSense engine uses EDG, it's frequently very obvious when you've done something right that the Visual C++ frontend just doesn't like.
 
2 hours later…
04:25
A C++ programmer walks into a bar...
 
5 hours later…
Rao
Rao
09:44
:O!
Grasshopper has arrived to learn!
hello, anybody used TinyXPath around here?
anybody here?
I have arrived.
@GMan, can you help me?
@Tony Maybe. :) To your second to last question, no, I haven't used it.
oh ok
09:53
What problem are you facing?
that I have no idea how to find an attribute using XPath
1
Q: Get attribute using XPath with TinyXPath & TinyXML

TonyI'm trying to write a function that will get me the attribute of a set of XML nodes in a document using XPath with the TinyXPath library, but I cannot seem to figure it out. I find the documentation on TinyXPath is not very enlightening either. Can someone assist me? std::string XMLDocument::G...

maybe there is an easier to use library out there to use with XPath
Hm, I don't know any of those libraries, so it's hard to say :/
ok, do you know any other library that I can use for XPath searches?
maybe a more intuitive one...
Nope :[
ok thx anyways
09:59
I do know pos shouldn't be an int, but a std::string::size_type.
And your check should be if (pos != std::string::npos)
But those are just language correctness things, I doubt that'll solve anything.
cool, well I always like to improve my code
:)
:] In the case of std::string, you can just use std::size_t instead of std::string::size_type, they're latter is required to be the former.
@Tony Have you thought about libxml? It supports xpath.
@Haspemulator no I have not; I'll check it out
It's quite heavy, and have C-style API, but it's powerful.
10:04
libxml windows friendly?
Yes, it's cross-platform and open sourced.
Cool :)
boost not have XML/Xpath support?
Not sure about boost...
But we use libxml for Windows Mobile, works well.
it's like an irc for stackoverflow , cool :D
10:07
I'm new to MFC, what AfxMessage mean, I mean why they have Afx all the time ?
@Tony Boost has some things that will parse XML, to generate more abstract results. For example, Boost.PropertyTree.
sbi
sbi
@GMan Gman, why's that?
But AFAIK, there's nothing to parse it directly, per se.
@sbi Why what :)
The first version of MFC has started being developed in 1989 by a group at Microsoft known as the application framework technology development goup - known as the AFX group.
According to a widespread belief, AFX stands for "Application Framework eXtension". According to George Sheperd and Scot Wingo, however, the legend goes like this: "AF" didn't sound so great by itself, to they added "X" to get a three-letter acronym. The X doesn't really mean anything.
sbi
sbi
@GMan (I have linked to the message I was referring to.)
10:09
thats for @nXqd
@Tony Thanks Tony, I always love IRC like :)
@nXqd you're welcome ;)
@sbi Ah, didn't see that. Will have to get used to it. Because std::string is basic_string<char, ..., std::allocator<char>>, and basic_string<T, ...>::size_type is std::allocator<T>::size_type, which is always std::size_t,
sbi
sbi
@GMan You mean std::allocator<T>::size_type is always std::size_t???
stackoverflow.com/questions/3994488/… Anyone answer my question please , I do really need help .
sbi
sbi
10:12
That would mean all container<T>::size_type would be superfluous, wouldn't it? What am I missing ehre?
@nXqd get involved in open source projects etc to improve your skill
or create a project of your own
@sbi Yes, std::allocator<T>::size_type is always std::size_t. They aren't superfluous for two reasons: 1) You could use a custom allocator, which may have a different size_type, so you can't, in the most general case, assume it's size_t. 2) The "default allocator" containers actually use an implementation defined size_type, and not allocator<T>::size_type/std::size_t. I don't know why this is, but it is.
So only specifically in the case of basic_string<T>::size_type is it std::size_t via std::allocator<T>.
I'm not sure why there's that inconsistency.
@Tony How can I join, I've never joined one before , I like working with other people to improve my skill .
Hm, I think I see why. Quote: (Same idea in C++0x/C++03, just clearer wording) "size_type can represent any non-negative value of difference_type"
sbi
sbi
@GMan You mean std::vector<T>::size_type doesn't have to be std::allocator<T>size_type, but std::string<T>::size_type has to?
10:19
@sbi Exactly. Because in the containers (I just figured out), it's ultimately dependent on the iterator types for the stored element. Continuing, difference_type "is identical to the difference type of X::iterator and X::const_iterator"
So the range of size_type for containers is dependent on the possible range iterator differences would make. Damn confusing.
The implementation could use iterator_traits<T> to figure it out, and since that could conceivably be specialized, it can't be guaranteed to be size_t, even though for all practical cases it will be.
I would also like to join open source project
I assume since basic_string generally assumes it'll be working with integer types, iterator_traits won't be specialized so it can just assume std::allocator<T>::size_type/std::size_t.
This is why C++ is fun.
sbi
sbi
And here I thought std::basic_string was, among other things, an STL container like all the others.
2
@sbi It really should be. (With best practices applied to the stdlib, it would be. Obviously it's too late to change now.) It could easily just be std::vector.
Almost all of the stdlib containers have too many member functions that could be reusable free-functions instead. There was a GOTW where basic_string was basically refactored into nothing but a vector.
@nXqd, go to dream-in-code.net or browse in sourceforge for some open source projects
10:26
@Tony Thanks for help , I'm gonna find a good project and join them this night .
nice one :)
you C++ coding at work? or you still at school?
@Tony Yes, I'm still at school :)
@nXqd COol
I'm in love with coding but I just finish my exercise at school, free time I want to code more but I think I should have so to lead a path for me :)
@Tony how I can view the list of open source projects to join in sourceforge
10:32
@Tony If stack has friendlist, I'll add you :P
just search sourceforge... most projects on there are open source
@nXqd, doubt it has
I'm always on stackoverflow
@Tony ok , I'll be on stack in my free time now on :D
Cool man :)
@nXqd whats your ambitions?
@Tony Yup , I wanna become a great programmer :D
lots of practice then :)
10:45
Hello
@Tony Yup, I think so but sometimes you work too much, you're tired and it's not efficient . I try to find a good way to effective coding . I have my life too :)
Coffee at 3:30AM? You bet.
I think 4-6 hrs effective coding is gonna great for me :D [ beside school exercise :) ]
yea, theres gotta be a balance
What is the future of c++??
10:47
C++0x
I concur
Is c++ still effective?
of course
it is a great langauge
@Arman Yup. C++0x is a bit late, but better late than never. Hopefully they can get new standards out more frequently after this one, to add standard improvements more often to keep up with the times.
Do a little search, C++ is quite fast compared to another language, I think it has its way :)
@Tony Sometimes, I have problem in coding like I try to create socket in MFC, why not Socket* socket = new Socket(port,type,socketaddr); but we must have gettaddinfo .... blah blah blah . Because of curiosity, I do many searchs and get tired =)) At last, just a little explanation and few of them cares about how it work, just use :)
10:57
yes, well thats the faith of a programmer im afraid
I have to do lots of research too
and experiment with new libs etc to get what I need
like this annoying XML/XPath adventure Im in
hyellop
wow, I learn XML in school now, but I just do a little reading and writing in C# . I'm reading a book "Learning XML 2nd" but it's too much theory :)
lol
well XML itself isnt too hard, its more searching it using XPath in C++ thats harder
yup :D, C# is too easy compared with C++, I prefer C++ :)
yes C++ is nice
takes some getting used to after doing C#
lol
11:08
@Tony Do you have any good production in C++ ?
@Tony i had to write a small code piece in C# and was so happy to see just 1 type of string :)
@nXqd what do you mean exactly?
@Tony I mean a simple program you created in C++ :D I'm willing to see it :P
@Samrat yes, unlike in C++ where you can use different types of string
Simple one, not really
It doesn't mean anything else, just want to see they way you create product :)
11:18
are you looking for some C++ examples to learn from?
@Tony Yes , like a chat program with server and client, can send picture :D . Code from you gonna be great :D
@nXqd haven't got anything like that right noz
just view some of the question I've been asking on SO, lots of C++ stuff there
ok, thanks :)
:)
11:58
anybody know how to easily generate GUID in C++?
12:17
@Tony: return 0x402C1DCCDDD611DFACDCD958DFD72085; :)
12:44
@Tony: Seriously though, try boost or ooid
 
1 hour later…
13:48
@Firas boost has a GUID generator?
@Tony: I don't know if they accepted it into Boost yet (I guess they did, since its on the site), it's a header implementation of a generator.
oh ok
@FirasAssaad have you perhaps used TinyXPath lib?
No, unfortunately. I used RapidXML and TinyXML before. They don't support XPATH though.
My only experience with XPATH was in Ruby and not C++
ok
14:30
@Tony msdn.microsoft.com/en-us/library/ms737591(v=VS.85).aspx I've tried these simple client and server but I wonder what is server name ? How can I know it
@nXqd that is the source for just a client that will send some data
you need to have a server that listens and will accept the data sent by the client
@Tony Yes, I do have the server from this msdn.microsoft.com/en-us/library/ms737593(v=VS.85).aspx But the client require server-name to work but I don't know the name of server , what is it ? I don't see any name variable in Server code ?
if they are both running on same machine, you should use localhost
the most important is the server address
argv[1]
I think argv[0] is normally your app name
argv[0] is your app path and name and you need to supply argv[1] which is the IP address of your server
so in case of localhost it is 127.0.0.1
@Tony Thanks , I'm trying this :D
:D
14:44
so the server-name is mainly our IP ? [ maybe a human name if we have DNS right ? ]
yes you need run your client like this from cmd line: myclient.exe 127.0.0.1
@nXqd: You use humans as servers? That's not very healthy
so the ip address provided becomes argv[1]
DNS just resolves www.somedomain.com to an IP address
@FirasAssaad, @Tony: So Client > Server > IP > Server app to resolve ?
solve* :">
[ I'm not english native so sometimes I'm wrong fix me :) ]
the server app just listens on a port 27015 (in this case) and the client connects to that port through the local loopback address (ie localhost) 127.0.0.1
so you need to supply that ip to your client so it knows what server to connectto
the ports are hard coded in your app as a constant
14:51
@Tony: I have this getaddrinfo failed with error: 11001 when running client, server is running in background
and its on the same machine?
have you tried to debug and look whats the values on this line: getaddrinfo(argv[1], DEFAULT_PORT, &hints, &result);
@Tony Yes, I'm running both on my machine, no virtual machine. They're both on the same machine / OS
ok
@Tony One more problem, I've changed command arguments in project option to 127.0.0.1 but argv[1] is always 'D' .
D?
you need to supply the arg when you start the program
14:57
@Tony : Firstly I try to run program : Client.exe 127.0.0.1 but it's "error: 11001 when running client" so I try to debug it, and I change command parameters in project option to 127.0.0.1 to debug but argv[1] is still 'D'
and when you run it like you did the first time and put a break point at getaddrinfo, what is argv[1] then?
@Tony: 'D'
@Tony iResult = getaddrinfo("127.0.0.1", DEFAULT_PORT, &hints, &result); this works :D
lol
cool
@Tony lolz, everything works like champ :))
so thats weird you get D when you pass it as an arg
happy everything works now
:) :)
15:05
@Tony yes, it's quite wired . Next step: try to send a picture :D and save it to a place :)
:) have fun
15:37
Wow, there are actually people in the C++ room.
Either that or GMan brought in some bots to keep him company...
;-)
at last I and tony are not bots here ;P
 
1 hour later…
17:03
Hello
hello
@nXqd, what do you do?
@Arman yeah, I'm coding client / server to send and receive file from each other :)
Oh thats great.
@Arman how about you ?
17:14
I am student.
I want to learn c++.
Can you help me.
@Arman I'm a student too, we can help each other to study :)
Oh yeah, thats great idea.
@nXqd, I want to learn the standard's of c++.
Sorry I am not also good in english.
@Arman me either :D I'm Vietnamese ^^
@Arman Have you learned any lang before ?
No I directly start with c++. Is it good approch?
@Arman It's ok :) we can start :D
@Arman everyone like writing a simple Hello World program
@Arman Do you have Visual studio ?
17:25
Yes I have.
@Arman msdn.microsoft.com/en-us/beginner/cc305129.aspx you can check this, it's from M$ if you have any prob, i'm here to 3 am [ my time ]
@nXqd I have Visual Studio, I know the begining of c++. I want to go to one step up.
@Arman OK, have you created GUI or just console prog ?
does anybody know the cli/C++
i'll be much appreciated
@nxqd I have created windows base application in c++ using windows api.
17:31
@Arman have you created a simple windows explorer /
?
No I haven't. I have just create the window base application with one or two functionalities.
@Arman You should start create paint or windows explorer :)
@Arman: just in simple mode :P
@nXqd, any refrence please or book.
@Arman one more, If you want to clearly understand and get far in C++ , you should implement some algorithm first :)
Book : introduce to algorithm, The C++ programming language
What type of algorithms?
17:38
there are tons of books to learn C++
you can start with choosing one of them
and just a suggestion don't concentrate on windows based applications first
just start learning the language
@Incognito Ok I will.
have chosen a book already
No I haven't.
Ok thanks.. I will check this.
17:44
@nXqd have you found a project to join ?
@Incognito not yet, I don't find any proj just doing my simple now . Do you have any I can join ?
@Arman : you meet the master :P
@nXqd, I have. :-)
yes
actually I have the idea to start a project
@Incognito wow, it's great . how is it ?
do you have knowledge of OpenGL ?
17:48
not at all :|
it will require you some OpenGL, basic QT and C++
also some knowledge of graph theory
I've had basic in graph theory but in OpenGL I've never tried it before .
no worries I am also not an expert on it
what about QT ?
nothing too :)
I can learn it , I just do code in c# , I've heard about it when using linux but I've never programmed with TQ
QT
ok I'll tell you when the project will be opened
I will put it on sourceforge
17:55
ok, you can send mail to open . I'm eager to joining your project
18:33
what bp returns ?
I follow this proj : codeproject.com/KB/IP/…
hi
just try this chat bye!
lolz
 
2 hours later…
20:20
@JamesMcNellis: don't worry, a chat will break out any moment now
 
1 hour later…
21:29
hi an one there..?
21:48
hi all
hi
22:07
o/
22:18
Hello!
22:30
Hello
22:42
@RogerPate And what a chat it was!
I'm glued to my seat
22:59
Does anyone get the logic in the naming of tchar?
'template' perhaps (and it predates c++ templates)
doesn't really matter, any name would be arbitrary
why, did you run across something that tries to explain it?
23:18
just curious. besides, the whole windows api seems arbitrary to me.
sometimes old design decisions don't make sense 20 years later
I frequently find that design decisions I made last year don't make sense this year.
2
23:39
interesting point. I suppose you just have to get used to the inconsistencies.
inconsistencies are inevitable when you maintain backwards compatibility
so you either have to live with it, or break older code by wrapping up in a new library (as msft is doing with the shift to C#)
Funnily enough, I completely resented the use of TCHAR, TEXT() and the like. Now I'm programming a C++ library which needs to be compatible with char and wchar_t projects, so now I'm using them everywhere.
I only use TCHAR if I must be compatible with something or someone else; otherwise stick to a single string type
c++03 stdlib's string types suck; 0x's utf-8 string type will be much better
Oh, does C++ support implicit conversion between void* and other pointers for arguments?
because it seems to.
no
where do you see that? (code example on codepad.org would be good)
23:49
Ah, I think I see why I'm getting this behavior. HWND must be a void* under all those layers of abstraction.
yeah, winapi sprinkles void*s everywhere, hides them in typedefs
a simple handle class (e.g. struct HWND base class) would be more appropriate in C++ — but the winapi is C

« first day (6 days earlier)      last day (5157 days later) »