« first day (483 days earlier)      last day (4466 days later) » 

12:00 AM
Does in C++ exist some features , which can cast from string to a type abd use it in generic?

For example, I have some string from my mail body , which I got via IMAP/POP

and want in dynamic runtime put it in generic
 
Unless you build your own reflection/type system, no.
 
for example, there is some info in mail body as : INT -> 0x222 etc and I want dynamicaly recognize some info from mail and put in some generic functions
as type and etc
 
you'd have to write that yourself
 
pity... :( and pity, that <typeinfo> isn't very rich for such features :(
in C# it's possible
 
C# has different goals.
> This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
No info beyond that.
I am the bloody application's support team.
Graah.
 
12:05 AM
@CatPlusPlus yeah ;) you are right, C# has such bad stuff :(
 
Language is a tool. If C++ doesn't do what you want, you can always use another one.
 
@CatPlusPlus or write some new feature for this language
by yourself
 
If you can afford it.
 
@CatPlusPlus yes :)
 
@user1131997 Wut.
 
12:07 AM
@EtiennedeMartel What "wut"? :)
 
user868935
The differences is just by preference. And the chances of someone writing a function that will match any upgrade is like getting struck by lighting. If it does happen, just ad character to you function name. Young programmers fall into the pitfall of trying to make their code look like it came from the Matrix. The more complex the code looks, the more work you have to do to process it in your head.
 
Yeah, right, name your functions function_aaaa.
Even though there exists a feature to avoid exactly that.
Namespaces are not "complex", they're intrinsic to the language.
 
@user1131997 What do you mean by "C# has such bad stuff"?
 
Also it's funny if you get rid of std:: just to produce horrible mess of pointers, useless class hierarchies and circular dependencies.
I'm sure it'd be less complex without those 5 characters.
 
user868935
add a character, delete character, rename it, whatever. Saves you on typing and file size versus scattering std::~~~::std everywhere. I'm not knocking it. I'm just saying why type more for easy fixes?
 
12:11 AM
File size doesn't matter.
Typing doesn't matter, either.
 
Use namespaces. That's it.
 
You write the code once, read it many times.
 
user868935
Then like I said earlier: "preference"
 
Removing namespaces reduces maintainability.
 
And many times, somebody else is going to read it.
 
12:11 AM
It's not "preference", it's just simple truth.
 
that C# often fails with executing one program on different PC with different OS ( with statement, that for example: WinXP has 3.5 and Windows Vista/7 has 3.5 .net framework installed & in real life I have bad expirience, that one program couldn't work on some OS, where there is version of .NET FW, which is needed for program exectuing ), also there are some NON-documental errors in runtime/debuging.

Also C# has bad reverse support.
 
user868935
Thats your preference.
 
Fine. Don't complain when you get fired for incompetence some day.
 
user868935
Angry, arent we? lol
 
Yay, the problem is not in WinMain.
I love debugging by guessing.
 
12:13 AM
@Paul Wait, are you trying to justify not using namespaces?
 
user868935
Lets just agree to disgree Cool Cat
 
user868935
@EtiennedeMartel No, I use using namespace
 
@user1131997 The problem is not really with C#, but with .NET. And I never encountered any problems about compatibility.
 
often .net programs report some incredible errors, which is known only for MS-developers, which works at MS
 
I'm on SO to help people write better code.
 
12:14 AM
@Paul I meant putting your code in namespaces.
 
user868935
I dont use std::
 
@user1131997 I've been doing C# for 3 years now, never seen anything like that, I can't say "often" is the good word.
 
If you don't want to listen to me, listen to @sbi, who's been writing C++ longer than you live.
 
@Paul Okay then. I just hope you don't put using namespace std; in header files.
Because that's shoving your preferences down other people's throat.
 
@EtiennedeMartel may be at you work, you are working only with RIA ( Silverlight ) or where there are only Windows 7 minimum
 
12:16 AM
@user1131997 Nope. .NET 2, 3.5, 4. WinXP and 7. Never used Silverlight, though.
 
@EtiennedeMartel I had a lot problems with WinXP , with .NET programs, often with WPF on WinXP and some system services
 
user868935
Just because someone has been doing something for a long time doesn't mean they are the know-all be-all Cat
 
Now you're going into amusing mode.
 
The thing I always liked about .NET was the whole "install the framework, then it works".
 
user868935
A big part of being a good programmer is by being a good listener
 
12:17 AM
@Paul I don't see you listening.
 
And even bigger part is producing maintainable code.
I'm sure you use single-letter variable names everywhere to save on typing, eh?
 
user868935
I listened, but I don't have to agree with everyone's opinions
 
It's a collective opinion of really experienced programmers.
 
I spend most of my time looking at my screen, holding my head in my hands, because I don't understand what the fuck the code I'm looking at is supposed to do. Typing faster is not going to make a big difference in my productivity.
 
user868935
The way I see it, std:: sort of future-proofs things. But the things it future-proofs, are so minor
 
12:19 AM
How many C++ projects you've participated in?
Written by more than one person?
 
No, std:: simply categorizes stuff. It means "anything in there is part of the standard".
In C, people used prefixes and such for the same purpose.
 
@Paul if you spend a lot of time on SO, you'll start to notice that the more experienced and higher ranked C++ers tend not to use it. It's hard to really understand until you've had issues because of it in something you wrote yourself. I'd bet that once upon a time, even @CatPlusPlus used using namespace...
 
But in C++, you got namespaces, which are better because you can use using statements to save some typing.
 
At the beginning, because C++ teaching materials suck.
 
Except for a few books, yeah.
 
12:20 AM
using namespace std; should be a compilation error.
 
@CatPlusPlus At global scope? Yeah.
 
At any scope, really. std should not be flattenable.
 
user868935
Thats your opinion Cat
 
user868935
It's like pepsi or coke
 
it doesnt flatten std
 
12:21 AM
Stop stating the obvious. Of course it's an opinion. Nobody's stating facts here.
 
Evolution is an opinion, too, eh?
 
@CatPlusPlus once I naively used 'using namespace boost' in my cpps to get shared_ptr, bind etc... I regretted that when porting to -std=c++0x :/
 
Namespace aliases > using namespace.
 
using namespace is a precondition to using namespace aliases
 
@CatPlusPlus I'm no creationist but technically, yes it is :P
 
12:23 AM
or you create a namespace alias without actually using the namespace
 
Right.
 
but that would not be useful!
evolution is not an opinion
stating that evolution happens is
 
user868935
pepsi or coke gentlemen. pepsi or coke... lol
 
pepsicoke
xD
 
user868935
lol
 
12:25 AM
7 Up.
 
I found the crashing line!
 
user868935
I like tiki punch lol
 
Or not.
 
@CatPlusPlus Woo!
Joy and pussies.
 
@JohannesSchaublitb agreed
 
user868935
12:26 AM
Its all computer love! (no homo)
 
I bet it has to do with wchar_t handling.
 
Fuck those wchar_t.
 
It crashes on boost::filesystem::exists
 
user868935
ok what is boost? I hear people talking about it more lately
 
Oh dear.
 
user868935
12:28 AM
lol
 
It's a set of mostly awesome C++ libraries.
So awesome, in fact, that it's basically used as a staging ground for stuff that will probably become standard at one point.
But you wouldn't like it, they put all their code in namespace boost.
 
user868935
I use namespace
 
And they're used by the same programmers who discourage use of using namespace.
> Boost.Filesystem V3 and later requires std::wstring support.
If this is the faulting thing, I'm gonna be angry.
 
user868935
I think everyone needs to sit back from their screens and take a quick breather and walk if off... lol It's get hostile in here
 
@CatPlusPlus Do you need a reason to be angry?
 
12:32 AM
I'm perfectly calm.
 
@Paul You say that because you don't know me. I never get hostile about anything.
 
user868935
@EtiennedeMartel Cat is a passionate programmer
 
He has a tendency to get angsty at times. But he's cool.
 
user868935
No offense taken
 
But I could really drink some Coke right now.
 
user868935
12:34 AM
lol
 
... Coke ...
 
(Coke > Pepsi, by the way)
 
Same thing for me.
 
My fingers keep pressing ctrl+c on this chat
 
12:34 AM
I like Miranda from Pepsi
 
Linking takes so long. :<
 
@CatPlusPlus ?
 
by the way
so disappointing to find that GPGPU won't do parsing, just lexing :(
 
yo, @DeadMG
 
Oh, it's not inside fs::exists
@DzekTrek I'm just debugging live.
 
12:39 AM
@CatPlusPlus :)
 
Ah-ha, gotcha. GetFileAttributesW.
Now what I'm supposed to with that.
 
By the way, why are you messing with Win32?
 
Messing?
 
I don't know, I saw you talking about WinMain.
 
Because that's the entry point, it's a GUI app.
 
12:45 AM
OooOooooOOoohohohoOOOOh.
I see.
 
I'll facepalm hard if this is stdcall miscompilation.
 
coke light > coke
 
Oh the joys of native programming. All that performance, no app crashes faster than a native app.
5
 
How about that, it works with a literal.
So, back to libstdc++.
 
12:49 AM
@JohannesSchaublitb Weakling.
 
Yeah. What do you need teeth for, anyway?
 
Real men eat with their fists.
 
Do a barrel roll and punch that tree!
 
Then eat it. With your fists.
EXTREME!
 
1:08 AM
folks
 
Evening.
 
Oh my, I think I've fixed it.
It's probably related to stupid wctombs.
 
1:24 AM
How can I create my own new operators with OP-code in C++ ?
 
What is OP-code?
 
Overriding operator new is very specialised thing.
 
I mean not overloading, but creating another new operator
defining new symbols like: *&*
for my new operator
and declare function in its body
 
You can't define entirely new operators in C++.
 
here is sample of overloading:
template<class X> bool operator&&(const X& x, const X& y)
{
return x < y;
}

But if I want to create MY OWN new?

In overloading I can't define my own symbols for operator
 
@user1131997 It's impossible.
 
@user1131997 You can't.
 
@StackedCrooked I don't need to override, I wanna create new one
But such operators as: << & ||
and etc are defined somewhere
 
Yes, in the language.
 
In the standard. C++ gives you no mechanism to create operators.
 
1:29 AM
Isn't difficult to add new definition, where standart operators are defined
 
You'd have to modify the compiler.
 
@CatPlusPlus isn't it possible with reverse engenering?
 
Reverse engineering of what?
 
of compiler
 
GCC and Clang are open-source, you don't have to reverse engineer anything.
 
1:30 AM
If the compiler is open-source then there's not much point in reverse engineering it.
 
aahh :) forgot about these compilers
 
But good luck modifying C++ grammar.
 
I often use MS compiler , which is close :)
and forgot, that there are GNU , which are open
Clang based on LLVM, right?
 
Mozno bit, ne znayu
A zachem ti sprashivaet eto?
 
@DzekTrek Это ты мне? :)
 
1:33 AM
Konecno, brat :)
 
@DzekTrek В плане зачем? :) Потому что наверное интересно ))) А что кириллица не работает у тебя? :)
 
Da, u menya klaviyatura ne podrzhivaet kirilicu. Ya v Amerike, i ne znayu kak stroitsya kirilicu na klaviature.
 
@DzekTrek а что за ОС у тебя? никс какой-то?
 
u menya Windows64
nikakoy niks
 
Oh God the gibberish is all over the place.
 
1:37 AM
Я узнал, что у меня
есть огромная семья
И тропинка и лесок
В поле каждый колосок
Речька, небо голубое
Это всё моё родное
Это Родина моя
Всех люблю на свете я.
Uraaaaaaaaaaaaaaaaaaaaaaaaaaaaa................
 
@StackedCrooked What do you mean under "gibberish"? :)
@DzekTrek понятно ) Я тоже под Вендой 64 , Хоум Бейсик правда
 
> unintelligible or meaningless speech or writing; nonsense: he talks gibberish.
 
guys
English, please
 
@user1131997 konecno, druzya ;) ne znayu zachem, no mne Win ocen nravitsya
 
@StackedCrooked It's russian, not gibberish )))
 
1:40 AM
Ye, we should talk in English, so that all can understand. ;)
 
@DzekTrek У меня еще Gentoo стоит в параллель )
@DzekTrek Allright :)
 
That's nice, Gentoo is user-friendly OS with abundant support. ;)
What is the weather like in Moscow now? I have seen weather forecast for Poland, and it doesn't look well at all.
 
@DzekTrek Frosty && snowy
@DzekTrek 5:44 AM right now :)
 
I assumed. :(
Wow, you should go to bed, it's very late. :)
 
@DzekTrek I'm without going to bed :)
 
1:45 AM
:D
 
@DzekTrek Have argued with my girl, and can't sleep 2nd night
 
Slavs can function without sleep, right? :)
Why?
 
@DzekTrek not only without sleep ))) in USSR without sex functions ))) joking
 
Haha :)
we haven't lost the sense for humor at all. :)
 
@DzekTrek Some internal problems with our communication between us in our relations
 
1:47 AM
I see, keep on. It's just a temporal crysis in the communication. It will pass very soon.
 
@DzekTrek It will be very good :)
 
It is going to be very good. :)
What do you study?
I see in your profile it's Institut aeronautiki v Moskve?
 
@DzekTrek Where? In general or where? :) I have finished Institute with master's program, so my education is ended :)
@DzekTrek Moscow Aviation Institute, physical-mathematics faculty
 
nice, so do you plan to work somewhere, or you have already found a job? :)
awesome.
 
№ 806

Calculus Mathematics and Programming
 
1:51 AM
this looks bad-ass! :)
 
@DzekTrek I have begun to work from the 1st course ;)
@DzekTrek nowdays, I'm living for pleasure using % from my bank-account
 
:) Ye, you must sometimes relax, you can't work all the time. ;)
so, where do you work?
 
@DzekTrek now only for myself, earlier at 4 companies officially and sometimes with individual orders
1st official work was at my University
2nd at one Science department, where we were building Linux disrtos , based on RHEL
this is the second: vniins.ru
 
That's nice. Doing part-time jobs or freelancering is now IN. :)
 
the 3-rd one was : we where building GPS programs another Science department
 
1:56 AM
cool!
 
the 4-th was: eng.r-style.com
Where I have worked on Megafon project, buildind Silverlight applications for them
Now, I'm relaxing only, living for % from bank account, surfing web, meeting girlfriend
and that's all )))
 
so you are very experienced in the IT field. In what languages do you code?
 
@DzekTrek seems to be I'm not good IT-specialist at all )))
@DzekTrek cause I'm asking silly questions on SO , which implements me as not really good specialist
 
come on, but you have been involved in so many projects, you must be good one!
 
@DzekTrek so I have good diploma && some work-records )
@DzekTrek but not good enough knowladge
 
1:59 AM
everybody do that, vizu mne, ya toze troluyu sdez ;)
just be persistent, and you will see the results in 1 year.
 
@DzekTrek I don't care about trolling me or etc ) I will be pleased if I learn Haskell/Lisp/Plan9/C++ well
and don't care about smth else :)
 
That's nice, well as previously mentioned source codes for all these languages can be downloaded from www.hackchina.com There are many beginner level examples, which will suit you just fine. That's a nice step toward learning something, so give yourself a try.
 
@DzekTrek thnx
 
If you don't understand Chinese, just click, in the upper right corner, on the US flag and it will switch to English. ;)
@user1131997 np. :)
 
Can someone tell me what this error is saying? ideone.com/eCCA7
 
2:07 AM
OK, it's very late here too, so I have to go to sleep. ;) It was nice talking to you, @user1131997 . Remember, be persistent, and dreams will come true. See you later.
 
@DzekTrek cu 2 :)
@LearningC may be you have forgot to #pragma lib smth?
 
@user1131997 What is #pragma lib smth? Is it C++? I'm using C
 
@LearningC A #pragma is a implementation-specific preprocessor statement
 
@EtiennedeMartel Sorry I don't know what that is so I probably better not use it.
 
@LearningC en.wikipedia.org/wiki/C_preprocessor read info about #pragma
Compiler-specific preprocessor features

The #pragma directive is a compiler specific directive which compiler vendors may use for their own purposes. For instance, a #pragma is often used to allow suppression of specific error messages, manage heap and stack debugging and so on.

C99 introduced a few standard #pragma directives, taking the form #pragma STDC ..., which are used to control the floating-point implementation.
Many implementations do not support trigraphs or do not replace them by default.
@LearningC the type of error, you have posted here, seems to be often, that you have forgot to #pragma some library or don't define unicode ( #define UNICODE ), often people got such erros because of not #pragma some *.lib files
for example, if you are using Winsock and #include <Winsock2.h> and you forgot to pragma #pragma comment(lib, "Ws2_32.lib") you get similar error
with non-understanding symbols
 
2:16 AM
I never used #pragma lib smth before
 
@LearningC you should try
 
@user1131997 ok where do I put it?
 
@LearningC post2us all you code, and we shall solve your problem
not only the output of compiler
 
@user1131997 it is a lot of code. I don't want to waste your tiem
it has 3 files
 
@LearningC you may post some part
 
2:18 AM
functions.c checkers.h and project1.c
 
@LearningC the definitions of your program, not some functions, which are not close to sovlign your problem
@LearningC I have looked at many projects with more files and a lot if line via svn/git :) so you won't make surprise for me
 
Ok but how do I post all 3 files?
you want me to post on 3 different link?
Here is the code. I think like 27 and 36 are the problems when I try to use is_jumper
 
@LearningC there are some services for team-development where you can upload all project-files
 
@user1131997 is it similar to idone
 
@LearningC do you work with WinAPI ?
 
2:23 AM
what is winAPI?
 
@LearningC return TRUE; is it from WinDef.h => #define TRUE 1 or it's your own definition without including Windows.h and else?
 
i have it in checkers.h
 
you have posted me 2 functions, but not your definitions
 
#define TRUE 1
I have that in checkers.h
Where can I post my whole project?
 
code.google.com
sourceforge.net
 
2:37 AM
@user1131997 ok here are the 3 files ideone.com/HdP0t ideone.com/I0hhg ideone.com/NA84V
 
@LearningC you have a link time error.
 
@user1131997 what is that?
 
@LearningC error message is telling you that you have declared a method or free function in your .h file, but you have not created a definition for the method or free function
@LearningC it's a problem on linking level of your output program
 
@user1131997 sorry can you dumb it down a little for me.
wait I think i found the issue
I typed is_jump which is wrong I needed is_jumper
 
@LearningC wrong definition / declaring
and so the result
 
2:47 AM
@user1131997 Yup. Thanks a lot for the help
 
@LearningC you are welcome! :)
 
Hi everyone, could you please help me on this stackoverflow.com/questions/9237184/…
 
yes I have increased the heap and stack sizes to maximum in Command Line and Linker section
 
@daerty0153 could you post me all your options of Compiler you have enabled?
some options may ignore another, which can cause such problems as yours
 
3:04 AM
/F 800000000 /Zm 1000
in Command Line in C/C++
 
@daerty0153 you should dump all options, which are using by default
@daerty0153 I think, you may understand, that's not only options , which were using compiler
 
Xeo
> STL: I am definitely thinking I'll do a "Core C++" series, including TMP but also template argument deduction, overload resolution, name lookup, etc. [from here]
 
3:20 AM
@user1131997 I'm afraid I have to leave for some important work. Could I get back to you in 1/2hr?
 
3:32 AM
I get really tired of answering questions like this
0
Q: Access violation reading location with simple program

triple07Ok so I'm doing a program for class when I run across a bug I've never seen before and no idea what to do about it with only minimal experience with using the debugger, so I've come here hoping someone here can set me down the path to fixing this bug. My bug is the access violation reading locati...

 
This is why I should really man up and start writing that damn tutorial.
 
Please
Or just write a list of the 50 most common mistakes
One of which would be what this guy is doing, reading in to a pointer that points to a string literal
 
I could do both.
 
You should make a community-editable list of common mistakes
 
3:35 AM
And it could be required reading before you post a question with the C++ tag
 
@Xeo Cool!
 
I wonder what would be the best format for that.
Yeah, a community wiki or something.
 
Xeo
#include <iostream>
int main()
{  /*Compiles in Clang!*/
  auto l = []{ std::cout << "Yay\n"; };
  l();
}
 
Do lambdas allow access to global variables when the capture is completely empty
 
Xeo
Sure
Captures are only for the enclosing scope
 
3:38 AM
Then why did you post that example
 
Does anyone know php here? I need help in php and no one is there in the php room
 
Xeo
@SethCarnegie Because Clang didn't compile it until yesterday or so
 
@user1079641 People in the C++ room know everything
and more
 
Xeo
@user1079641 Tough luck.
 
@user1079641 What did you need help with
 
3:41 AM
@SethCarnegie Yeah, but we don't like to admit that for PHP.
 
@Etienne Yeah, I forgot with PHP it's "the more you know the less you know"
 
Rather, the more you know, the less you want to know.
 
3:54 AM
$path = $_SERVER['DOCUMENT_ROOT'];
$path .= "/res/style/main.css";
include ($path);

that is my code which imports the css file. Apparently, php is printing it out the css code instead of using the styles.
 
Xeo
@StackedCrooked $ sudo star it :P
 
@user1079641 that's not enough information
 

« first day (483 days earlier)      last day (4466 days later) »