« first day (591 days earlier)      last day (4371 days later) » 

12:06 AM
Pluuurt.
 
posted on May 29, 2012 by Herb Sutter

It’s time for, not one, but two brand-new, up-to-date talks on the state of the art of concurrency and parallelism in C++. I’m going to put them together especially and only for C++ and Beyond 2012, and I’ll be giving them nowhere else this year: C++ Concurrency – 2012 State of the Art (and Standard) [...]

 
1:07 AM
@Cicada Some float, int, maybe some std::string?
 
1:20 AM
Weehoot. I tamed the XSL beast. Including rotten MS-specific extension for two-pass transform and versioning using different template modes...
Can't say I like XSLT more than I did before - but it sur feels nice to get things working regardless
Don't fall asleep now
that would be a waste of time
 
 
1 hour later…
anyone around
?
 
Yodok concentration camp (also romanized Yodŏk, Yodeok, or Yoduk) is a political prison camp in North Korea. The official name is Kwan-li-so (penal labor colony) No. 15. The camp is used to segregate those seen as hostile to the regime, punish them for political misdemeanors, and exploit them with hard labor. Location The Yodok camp is about from Pyongyang. It is located in Yodok county, South Hamgyong province, stretching into the valley of the Ipsok River, surrounded by mountains: Paek-san to the north, Modo-san to the northwest, Tok-san to the west, and Byeongpung-san to the sout...
 
3:33 AM
@Feeds > P.S.: I haven’t seen this much attention and investment in C++ since last century – C++ conferences at record numbers, C++ compiler investments by the biggest companies in the industry (e.g., Clang), and much more that we’ve seen already…
Interesting evolution.
 
I think what it says is not that C++ is good, but that other languages are too constrained.
 
Folks VS 2008 is giving me hard time, can anyone help?
 
@KodeSeeker upgrade to vs 2010
 
lol
 
@CheersandhthAlf: :-/
I wish ,I need VS 2008 to use a lib package designed specifically for it.
Just cant get the damn linker to locate the lib package
 
3:49 AM
just add the lib file to the project
as a file
the simplest is often the bestest
 
@CheersandhthAlf: Inside- Header,Resource or Source files?
I meant inside which of those folders^
?
 
are you sure that that matters?
ok put it in resource
cause you know, it
is not a source file
 
@CheersandhthAlf: Actually I dont have a clue, this is the first time Im trying to link something
 
by the way, i think it is a good idea to always delete the "Header" virtual folder. silly microsoftism. they always invent idiotic ways to arrange things
 
@CheersandhthAlf: I get this weird popup when I try to add the lib to the resources folder and it says 'Matching Custom Build Rule Not Found'- Would you like to create one ?'
Is that normal?
 
3:54 AM
no, it's microsoft
 
lol
but I do proceed saying Yes, right?
or am I looking in the wrong place D:
 
no you don't want a custom build rule
 
okay
 
ok then, right click your project, choose properties, find the paths to library directories, add the path to your lib directory, then find linker, inputs, add your library there
that's the hard way
should work
 
paths to library directories? I couldnt find that.
however the linker does have this lib as an external dependency
@CheersandhthAlf^
 
4:01 AM
u just need to look closer
"Configuration Properties" -> "VC++ Directories" -> "Library directories"
 
@CheersandhthAlf: Does VS 2008 have a 'VC++ Diectories' tab?
I dont see one , however VS 2010 did seem to have that tab
 
dunno, look around?
 
wow microsoft is truly nuts , VS 2008 has that menu at a totally different place, any hows , thats done. So I also have a bunch of custom headers , can I just drop em into the Header files folder ?
@CheersandhthAlf^
also is 'New Filter' same as New Folder?
 
yes. it's just more microsoft idiocy. they think of the folders as "filters", where VS should automatically put files depending on the filename extensions. lunatic. but there you have it: VS 11 is even more.
 
4:19 AM
@CheersandhthAlf, well , I tried dropping in the header files and then going to C/C++ - Additional Dependencies specifying there the path to the header files and alas VS says cant find the header files!
 
4:32 AM
0
Q: C++ algorithm to find 'maximal difference' in an array

dlibI am asking for your ideas regarding this problem: I have one array A, with N elements of type double (or alternatively integer). I would like to find an algorithm with complexity less than O(N^2) to find max A[i] - A[j] for 1 dynamic programming dichotomic method, divide and conquer so...

^ Today is the day for silly questions.
 
@CheersandhthAlf: I was able to include the header files , but then VS says '1>LINK : fatal error LNK1181: cannot open input file 'StanfordCPPLib.lib''
why could this be happening? Sorry for the noise, I ve been stuck on this for like 12 hours now lol
 
it doesn't find it. means the path to lib directories does not include right directory
oh it's the stanford ting
 
Yeah
 
the lib etc is in the first exercise i think
 
Well I have the lib
Its just that VS doesnt seem to find it
 
4:36 AM
i think it's best to rebuild the lib
if u have the sources
 
nope I dont
which is why I chose VS 2008
and in Linker->Input -> Additional Dependencies-> Do I give the full path to the file or just StanfordCPPLib.lib?
 
i think you have the sources
namely in StanfordCPPLib\include\private
at least it appears that i have them :-)
 
haha
Nice.
this spawns a new series of questions.So if I rebuild it, I could use it from VS 2010?
 
yup
disc-lamer: i haven't done it
 
yeah well I just want to get my code running. Im okay with VS 2008 as long as it works
Spent the whole of yesterday trying to figure this out . Sigh.
 
4:41 AM
I think nker->Input -> Additional Dependencies only accepts lib filename
 
yup
and the ide says-'1>LINK : fatal error LNK1181: cannot open input file 'StanfordCPPLib.lib''.
btw my VC++Directories has the following entry that I added'D:\pathto libe file' , I see the other entries have a $ symbol and mine doesnt
Is THAT the problem?^
@CheersandhthAlf: Something like that^
 
no, the $ is used to get the value of a macro
but maybe it helps to add backslash at end?
probably not though
i would check whether the path is valid
oh, it's in "Executable files", that's wrong
 
oh?
 
in the drop down list there should be something like "libraries"
 
mother of god
 
4:49 AM
he he
by the way the library apparently works with visual c++ 10.0
i tried the "warmup" thing (first thing students should do) just now, it worked
 
oh yeah Ive tried warmup
 
only problem was that the project was configured as GUI subsystem instead of console, easily fixed in linker settings
 
I was stuck with their graphics lib
I hate IDE's, I tried out the out the others with Sublime Text
 
hm i need breakfast
 
Eclipse has given me enough pain for an IDE
lol
@CheersandhthAlf: Thanks a ton mate.
 
5:10 AM
hi everyone...
I need some sample programs for c++ socket programming between c++/cli and c++
or some examples
 
5:37 AM
Stupid OCL. Why is map called collect, WHY.
 
template <int _size = 10 >
class Picture {
vector<Shape*> vec;
public:
void add(Shape*_s);
Picture();
virtual ~Picture();
void print_all();
void add(unsigned int i, Shape* _s);
void remove(unsigned int i);
void print(unsigned int i);
void extend_all(int percent);
void move_all(int x, int y);
void move(int i, int x, int y);
};
Picture<int> ::add(Rectangle<int>* r0) {
// Rectangle<int> *r1 = r0.clone();
// vec.push_back(r1);
}
I've got the above template which I don't understand how the _size=10 fits into the template. Thus when I go to try to make an instance for an object Rectangle<int>, i
 
just make your own class
note that the above class appears to violate the Rule of Three
if your listing is correct then it's pretty unsafe, so perhaps not expect it to be meaningful
 
It is an assignment so I need to stick with the format.
what is the Rule of Three?
 
if you need to specify either a destructor, a copy constructor or a copy assignment operator, then you probably need to specify all three
in other words, if you need to take charge of destruction, then you also need to take charge of copying, and vice versa
 
Cute! Thanks for the rule of three. What sort of format do I need in my add(Rectangle)?
 
5:44 AM
the above class apparently takes charge of destruction without doing anything about copying, so that most likely, copying those objects will have ill effects...
you should be able to do
 
I can handle the problems with a debugger. I just need it to compile.
 
Picture<10> pic;
Rectangle r;
pic.add( 1234, &r );
but what it means -- ask your professsor :-)
 
I need to define the meaning of add(Rectangle). You show me how to use it in main.
it keeps giving me compile errors which make no sense.
 
then you know what it should do?
a definition would look like this:
template <int _size >
void Picture::add( unsigned i, Shape* shape )
{
sorry about that copy paste
 
let me try...
Picture<int _size> ::add(Rectangle<int>* r0) {
// Rectangle<int> *r1 = r0.clone();
// vec.push_back(r1);
}
template <int _size = 10 >
class Picture {
vector<Shape*> vec;
public:
void add(Shape*_s);
it complains about parameter 1. The meaning is SUPPOSED to be the initial size of the structure, i.e. the vector.
 
5:57 AM
so that pictures with different initial vector sizes, are different types
somehow that doesn't quite make sense to me
 
It doesn't make sense to me either, but presumably the guy knows what he is talking about.
 
assume that he doesn't
what is it that you're trying to learn?
 
This is an assignment on templates. What the template actually gives me is a total mystery in this case. It is stupid that the size of the vector could be a double or anything other than an integer.
 
well i can't make sense of "the size of the vector could be a double"
maybe you didn't notice that the template parameter here is an integer value
 
Neither can I. Thus what does the template give? More important how do I just give the compiler something it will be happy with?
int main(int argc, char** argv) {
Circle<int> *c = new Circle<int>();
Circle<char>*ch = new Circle<char>(2, 3, 3);
Ellipse<double>* e = new Ellipse<double>(1, 2, 2, 4);
Square<unsigned int> *s = new Square<unsigned int>(3, 4, 5);
Rectangle<long> *r = new Rectangle<long>(Point<long>(1, 3), 2, 3);
Picture < 6 > pic;
Here is the main. Presumably the vector starts of with size = 6
 
6:05 AM
and what is your assignment, verbatim?
anyway, so far the code you've shown -- presumably handed out to you -- has been repulsive, to say the least
ungood stuff
it must be like learning to play the piano with a piano that's grossly out of tune
 
template <int _size = 10 >
class Picture {
vector<Shape*> vec;
public:
void add(Shape*_s);
Picture();
virtual ~Picture();
void print_all();
void add(unsigned int i, Shape* _s);
void remove(unsigned int i);
void print(unsigned int i);
void extend_all(int percent);
void move_all(int x, int y);
void move(int i, int x, int y);
};
Give meaning to the above. Let the vector accept a rectangle.
 
which school or university is this?
 
The truth is that I'm trying to help a friend of mine with his assignment. The Open University in Israel. The rest of the problem I can handle but this template has got me stuck.
 
For an Open University I think you must have a link to the assignment
So why not just ask it as an SO question
provide the link, show your best effort so far, along with any compilation error
note that even MIT's Open University C++ courseware has suffered from extreme low quality
 
I thought it was just stupid me not understanding something obvious to the rest of the world. Apparently it isn't completely obvious to everyone else.
 
6:10 AM
it's better now though, it helps that they get feedback
 
Maybe what I will do is simplify the problem to something which I can solve and solve that one.
 
well i wouldn't dismiss the possibility of me being stupid. remember Heinlein's "Never underestimate human stupidity". but that also goes for whoever made the assignment
try first to post link to the assignment
maybe you have misunderstood the assignment, and maybe others can help you understand better what it's about
 
I have to contact my friend for that - I don't know what the link is.
The assignment is posted. I cut and pasted it above.
 
jjj
help
 
Thanks for your help. I will just remove the template<int _size = 10>. Let the vector take the default size and be done with it.
 
6:16 AM
sounds ok
^ Example of Norwegian lady
(She's just got a role in US science fiction move "Patriot Act")
 
Is that a tail?
 
In Scandinavian folklore, the Huldra (in Norwegian culture, derived from a root meaning "covered" or "secret"), or the skogsrå or skogsfru/skovfrue (meaning "Lady (read, counterpart of a Lord) of the forest") or Tallemaja (pine tree Mary) in Swedish culture, is a seductive forest creature. Her name suggests that she is originally the same being as the völva Huld and the German Holda. A male hulder is called a huldu, or in Norway a huldrekall. Male hulders do appear, called Huldrekall. This being is closely related to other subterrestrials, usually called tusser. Like the female counterpar...
yes
 
Ken
6:41 AM
@CheersandhthAlf Where would you recommend to learn from good quality C/C++ if open university is not so great, and university itself is not an option?
 
I think MIT Open University got their act together, it seemed like.
 
1177
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are released every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a good C++ book...

 
And now also Stanford offer their C++ courseware on-line
But as the @cat indicates, the bestest is a good book, like "Accelerated C++" if you know a bit already
 
Not-open universities are notoriously bad at teaching C++, too.
 
Ken
@CheersandhthAlf Thanks for the info. I've been doing PHP and web for a long time, and never got to the C programming courses in college. Been meaning to dig in for a while now. Thanks.
@CatPlusPlus Excellent, thanks for the link!
 
sbi
7:00 AM
@Pubby No, it's just an unnaturally enlarged tail bone.
@Ken Be sure to take this literally: "...there are many bad C++ books out there. And we are not talking about bad style, but things like sporting glaringly obvious factual errors and promoting abysmally bad programming styles. And it's even worse with online tutorials." It's really true.
 
Ken
@sbi I believe it.
I will say the same thing about search optimization, internet marketing, and making money online.
:)
 
sbi
Haha!
@RadekdaknokSlupik JFTR: I did not miss that, and I resent it. Your entry in my book of bad deeds of chat users has gotten another mark for it.
@Als Seeing that you wrote this 4:30am my time, I am not sure what you are asking for. Of course I was fast asleep at that time.
 
Ahh
so Stanford course ware discussion eh
 
sbi
@RMartinhoFernandes Why you? Because you're the only one here expected able to keep tabs on everyone.
You're supposed to have total recall, remember?
 
My software engineering course: "you cannot test your own program".
This is not even stupid. This is actively harmful.
 
Ken
7:10 AM
Purely curious, is there any value in learning C before learning C++ ?
 
Well folks, Im stuck on a Stanford courseware implementation myself
 
If you want to learn C++, learn C++. If you want to learn C, learn C.
There's no other configuration between the two.
 
but by learning C++,doesnt one know C by virtue of it being a superset?
 
No.
You'll know parts of syntax and bits of semantics, and that's about it.
C code is written in vastly different way than C++ code.
 
Ken
7:13 AM
I presume the C++ is the more common, and thus more practical?
 
Languages are tools. The most practical is the one you need right now.
 
@CatPlusPlus: Could you help me out with a question . Im a C++ noob .
 
Ken
@CatPlusPlus touche.
 
yeah going from Java to C++, is killing me already.
?
 
What's graphics.h from?
Oh gawd "change management" and a whole slide with a diagram of how "change management" should be done. With at least 5 forms in it.
If this is what big companies do, then no wonder software is so crappy and stagnant.
I wouldn't want to change anything either, if changing a thing involved 5 forms.
And a crappy versioning scheme few slides after than.
 
7:24 AM
graphics.h is an external header file
 
And mentions CVS.
And ClearCase.
 
I have it mentioned in the Header files subfolder
 
@KodeSeeker No, really? I would've never guessed.
 
haha
Well pardon my ignorance
 
We have no idea what setColor is, or what it does. Unsolvable problem.
And a crappy merging scheme. Reading those slides makes me cringe.
 
7:26 AM
setColor is defined in graphics.h--What does is'setColor(color) Sets the current color The color parameter is either one of the
standard color names or a string in the form "#rrggbb".'
 
Well, that's underdocumented. What's the type of color, and do you have an implementation of that?
 
you mean its definition of setColor in graphics.h?
 
Yes, definition, not just declaration.
 
Henceforth.
 
7:31 AM
well graphics.h just has the prototype- void setColor(std::string color);. Im sure your looking for something else,right?
 
The body.
 
Now that's just mean.
 
Oh okay
is there any way I can access the code in the lib file?
 
@Cicada Hi there. You haven't slept much either :)
Good morning
 
@KodeSeeker is it an open-sourced library?
Otherwise, no, unless you want to reverse engineering it.
 
7:38 AM
@sbi :)
 
@sehe Hello there. Oh well, 6h is way enough!
 
I've slept 20h.
 
@Jeremy, I think it is: I have access to header files and private files
 
@CatPlusPlus You're a cat
 
sbi
Um.
 
7:41 AM
lol
 
sbi
Can't beat an insect at speed.
 
But then again idk, if those were the files that went into the build in the first place
 
                 ___             ____
                /__/\     ______/___/\
                \  \ \   /          /\\
                 \  \ \_/__        /  \
                 _\  \ \  /\______/__  \
                // \__\/ /  \       /\  \
        _______//_______/    \     / _\_/_____
       /      / \       \    /    / /        /\
    __/      /   \       \  /    / /        / _\__
   / /      /     \_______\/    / /        / /   /\
  /_/______/___________________/ /________/ /___/  \
  \ \      \    ___________    \ \        \ \   \  /
 
@KodeSeeker you should try fixing those link warnings, they may be the source of the problem.
 
@Jeremy: I got a comment on my question here: stackoverflow.com/questions/10794553/… about running in debug mdoe, but being a noob I really didnt get the comment. Could you elaborate?
 
7:52 AM
@Jeremy No, they're not.
Well, most of them are not. If linker gets confused and links in both debug and release CRT then yeah, it might be the reason.
That's rather rare, though.
 
Thats what I was suggesting. I think its probably safe to resolve them before stepping any further imho.
sigh I hate linking errors.
 
I've only seen that happen once.
I hate everything about C++ toolchains.
 
StanfordCPPLib is that the release version of the library or debug version?
because you're compiling in release
 

« first day (591 days earlier)      last day (4371 days later) »