« first day (171 days earlier)      last day (4795 days later) » 
00:00 - 15:0015:00 - 00:00

12:00 AM
@Martin - cp -rf /w1/cs4551/dmr5803/ ./
Files doesn't have write permissions, does that mean I cannot copy them
-rw-r----- 1 dmr5803 cs4551sv 10855 Jan 17 23:31 Makefile
 
Looks like you are trying to overwrite a read only file.
Try doing this in a clean directory.
 
@Martin - Ok, will try it.
 
Xeo
oh well, I'm going to give in to the sleep too. g'night.
 
@Martin - Clean directory ? Do you mean to create a new directory and cp in to that directory. I tried it but in vain.
 
12:16 AM
@Mahesh: Do it in four steps then:
cd /w1/cs4551/dmr5803/
tar cvf ~/tmp.tar *
cd <Where you want it>
tar xvf ~/tmp.tar
 
@Martin - Ok, will try it.
@Martin - Even while doing tar, it says for some of the files permissions are denied
tar: nachos/c++example/list.cc: Permission denied
 
Then you do not have permission to read the files.
Ask the owner to give you permission.
 
@Martin - Yeah I see it now on ls -l option. For some of the files I have read options but some of them I don't. Thanks for the help.
 
1:14 AM
Mmmmm, nachos.
 
cpx
1:40 AM
0
Q: Virtual calls in inheritance

cpxHow would i know if call to a function is resolved at compile-time or run-time from any class? For example - In the following, From Derived class when show() is called, would it be resolved at runtime? #include <iostream> using std::ostream; class Base { public: virtual void show() ...

 
1:54 AM
@cpx you now have two answers - one from me, one from someone else
the thing that was missing in the other answer was devirtualization - but I'd already started typing, so I didn't edit the other answer..
so there's some redundancy..
you're reading and writing from ptr[i][j] in the same expression
i.e. between two sequence points
undefined behavior :)
hmm..
wait a sec..
pow = function or macro?
I forget.
if it's a function, there's a sequence point there - function call is a sequence point
ok, it's supposed to be a function..
so never mind the undefined behavior bit..
 
hello there? Does anybody know how to use VB6? Can I ask you for a help?
 
@RonaldLandheerCieslak Do you mean to say i = i + 1 is undefined behavior? :)
@aerohn I used to program in VB6, so sure, but it's very off-topic.
 
@aerohn Also, you should probably upgrade to something much more recent...
 
I'm tired
never mind
guess I shouldn't be coding either..
I'll just get a cognac and turn in
watch a movie, maybe
hmm..
@tina forget anything I said
:D
 
2:04 AM
@RonaldLandheerCieslak I'll assume cognac was a typo and you meant Johnnie Walker Black.
 
nope - it's gonna be a very old cognac
one I bought last time I was in Europe
or a Corenwijn - which is the dutch version of whiskey
I have a nice old one
hmm..
I really shouldn't be coding right now ;-)
 
ah, I'm a beginner programmer... Don't intend to bother you. Do you have some site of VB6 Tutorial? Just want to know how to connect to database using Adodc. Please?
 
if you're a beginner, don't start with VC6
it'll give you bad habits
 
What do you mean?
 
VC6 isn't a real C++ compiler - and it's not a very good C compiler either
VB6 is off-topic here, AFAIK (this is Lounge<C++>, after all)
but either will give you bad habits
 
Doc
2:11 AM
@RonaldLandheerCieslak Can you elaborate?
 
I think you're talking at cross-purposes: you're asking about V B 6, but he's commenting on V C 6. VC 6 is quite old, and (according to some) encourages bad coding habits, so you're better off with a newer version. VB6 is equally old -- but at least IMO, the newer versions are no improvement.
 
on those bad habits?
 
Doc
@RonaldLandheerCieslak Yes
 
both V B 6 and V C 6 are old - geriatric, actually
 
xDD
Like the scoping of for initializers being tied to the outer scope, wasn't that in VC6?
 
2:13 AM
VC6 is pre-standard for C++, and doesn't support things like namespaces well
it has no support to speak of where templates are concerned
and it has all kinds of bugs when scoping variables is concerned
@xDD yeah, that's VC6
I spent a few weeks porting VC6 code to VC9 about a year back
 
@JerryCoffin VB6 was the last of "classical" Visual Basic, before it moved to .NET and, AFAIK, became isomorphic to C#.
 
yes
parenthesis?
 
@GMan Yes, I know. That's 2 and a half strikes against it already... :-)
 
Do you mean, I better use VB.Net?
 
personally, I'd say don't use VB dot anything
if you have to use one of the .NET things, use C#
 
Doc
2:16 AM
@RonaldLandheerCieslak How come?
 
@aerohn Start with C#. As much as the old me wants to like Visual Basic for nostalgic reasons, there's really no purpose in it anymore. C# is more widely used, has more resources, etc.
Can do everything VB can. You could arguably use VB6, since it's different...but that's also very old and obsolete.
 
couldn't have said it better
 
So that basically wipes VB from the list of worthwhile languages
 
Doc
@GMan VB.NET and C#.NET are virtually the same thing. A decent VB.NET programmer can be fluent in C#.NET in a couple days.
 
...but our school uses VB6.
 
2:18 AM
@GMan Not that it was every really on that list...
 
Doc
Sans a few things... They all compile to CLR anyway.
 
@aerohn then your school uses an obsolete language to teach?
 
...perhaps.
 
@aerohn That's unfortunate, then. Your best bet is to find books in a library. I learned primarily from three books.
 
I mean, VB6 has been deprecated/obsolete for a decade now
 
2:20 AM
I think I still have them, let me see.
 
@aerohn do they give you the toolset - VB6 compiler etc.?
 
Yeah, lol. B'aw, memories. Anyway: 1) Visual Basic 6.0 - Step-by-Step: Halvorson 2) Visual Basic Blue Book: Aitken 3) Visual Basic Black Book: Holzner
 
hey - anyone here remember QBX/PDS?
 
You can learn most of VB6 from those books, along with the internet for the esoteric stuff.
 
@RonaldLandheerCieslak ...and before!
 
2:22 AM
my very first basic compiler (not just interpreter) Quick Basic Extended "Professional Development System"
oh, I had GWBasic too
 
My first language was QBASIC. :)
 
but QBX generated .EXE files
and that was great!
didn't take long before I went to Borland, though - Turbo had a nice ring to it
 
Doc
@aerohn It depends on what your plans are. There is some merit in knowing VB.NET should you need to support legacy libraries in your future.
 
I guess if you have to use VB6 for school, you don't have much of a choice
I had to use a translated-to-dutch version of Pascal for school once
that was a real pain
 
2:27 AM
gotta love it
1100 IF INKEY$<>"" THEN GOTO 1100
 
lol
 
the fun thing with that is that you can see how the program evolved by the line numbers
ye know: 10, 20, 30, 34, 35, 36, 40, etc.
 
@RonaldLandheerCieslak Probably written by somebody who knew perfectly well that a blocking call just ended up with the BIOS doing the same spin loop...
 
at some point you had to re-number all the lines
brings back memories :)
1170 IF (PEEK(&H410) AND &H30)<>&H30 THEN DEF SEG:GOTO 1291
 
The readability is stunning. :)
 
2:31 AM
yeah, don't you just love the DRAW commands
line 1790 and further
I turned my first PC into an alarm clock with BASIC
had it play a melody to wake me up
 
Thanks for the advice dudez! then where should I start learning C#?
 
seems like a good place to start..
download Visual C# express and start hacking at some example code
 
...seems the software s just a trial version.
 
does anyone here have a working 5.25" disk drive?
 
Doc
@aerohn Actually it's completely functional. With VS Express and SQL Express you can get quite a bit done
 
2:38 AM
@aerohn Go here: microsoft.com/express/Downloads/#2010-Visual-CS Download C# 2010 Express.
It'll be more than enough.
@RonaldLandheerCieslak I have some disks, don't have a drive anymore.
 
@GMan me too - I'm pretty sure my alarm clock code is on there somewhere
if it's still readable after so many years
I remember the melody it played, though
 
Haha nice. I lost all my old coding projects. :( (Which included a clock!)
 
oh, I'm pretty sure most of my old code is lost, too - but I still have a lot of those 5.25" floppies lying around. that just might have some code left on them
and I don't have a working drive either, so it's just gathering dust (until the children find them - then they'll be turned into toys and the code will be lost forever)
wow - I can't believe I'm reminiscing on decades-old BASIC code
:D
 
:D
 
Doc
@RonaldLandheerCieslak In the Tao of Writing, one of the writing exercises suggests the writer destroy their written work after completing it.
Perhaps you can just chock it up to a taoist exercise :)
 
2:56 AM
hmm.. the wayback machine doesn't seem to have my old site either..
just the site I had in France..
ah well.. Tao it is, then
 
Doc
@RonaldLandheerCieslak archive.org?
 
@Doc yeah. it has a version of the site I had in France
but none of the sites I had back in the Netherlands
 
Doc
:[
 
which is where I posted some of my BASIC code
plug-ins for a game called VGA Planets
 
Doc
hehe
 
3:12 AM
anyways, time to go to sleep - good night :)
 
night
 
night
hey guys, I am looking for some interesting field from computer science to make my final project, does anyone have suggestions? I read about bioinformatics, and it seems interesting, but maybe I will not be able to finish something...
 
Doc
3:54 AM
@IHawk genetic algorithms
simulated annealing
 
cpx
4:49 AM
later all.
 
bye
I'm confused. Some friends in the south-east say there's this nasty storm, friends up here in the north-west say there's a nasty storm, and some friends south-west say there's a nasty storm. Is half of the country covered in a storm? I don't see anything on it... :x
According to this, only my south-eastern friends are telling the truth: spc.noaa.gov/products/wwa
 
5:25 AM
Just got up again. What a delight working with a team 12 hours out of sync with you.
 
5:51 AM
 
6:04 AM
Is there any sort of console based ldd-like tool for Windows? I need to check that a bunch of DLLs and executables are not linked to debug run time libraries.
Hah! I just noticed "Where trespassing Singletons are shot on sight."
Nice.
Heh, I like one of the comments to this video on youtube: ""I've.....seen things....you people wouldn't believe....."

Brain fucked. Wubwubwubwubwubububub.
"
 
Ha, yeah.
 
6:26 AM
Now that /users/recent is gone gone gone
how do i find a list of recent comments to my commnets & posts
that might need responding to?
 
No idea.
 
On SO parent?
I haven't written a lengthy answer in a while: stackoverflow.com/questions/5547852/…
 
Has anybody noticed that MSVS 2010 is sometimes for unknown reasons picking "CustomBuildStep" for item type for random foo.cpp file instead of the C/C++ source?
...after conversion from MSVS 2005 project.
 
4
Q: String literals not allowed as non type template parameters

Anisha KaulThe following quote is from C++ Templates by Addison Wesley. Could someone please help me understand in plain English/layman's terms its gist? Because string literals are objects with internal linkage (two string literals with the same value but in different modules are different objects), yo...

 
6:47 AM
@GMan does markdown support footnotes, or did you hack them together yourself in that post?
 
@jalf Naw, I just put some nice symbols in. :)
That's one of two features I'd like though: Collapsible sections and reference lists.
 
yeah
The markdown implementation I use on my blog supports footnotes. Was hoping for a second when I saw your post that the same had been rolled out on SO
 
Ha, no, but glad I could trick you.
 
sbi
@Martin What do you mean? Didn't you say you work in the Northwest of the US? Why do you get up at European morning?
 
Working with a team in India.
Its only midnight here.
So its 12 noon there
 
7:01 AM
Oops, @sbi's here; that's my cue to leave! :)
2
 
sbi
@Martin So you get up at midnight in the US to work with a team in India?? Wow, I thought time shift is a big problem when off-shoring, but they are compensating that by making their employees work at night... I hope they're paying you excellently for that?
@ChrisBecke Yours should be at stackoverflow.com/users/27491/chris-becke?tab=responses. You reach it by clicking on your name and then on the responses tab.
 
7:16 AM
No. But I will be in late tomorrow.
 
sbi
@GMan I removed the c++-faq tag from that question. Now I see you added it. Do you really think this is an FAQ?
 
I'm not sure if it's been asked before on the site, but it's definitely a FAQ elsewhere (overall). That said, my criteria for FAQ wasn't strictly frequently-asked but rather a place to go to for definitive answers to "important" C++ questions.
For example, the link you gave me would be a FAQ question, since it's a definitive answer to an important C++ issue.
But I don't feel strongly about it at all.
 
sbi
@GMan It's just that I thought we'd add what is asked frequently, so we have questions to link dupes to. But I'm not feeling strong about it anymore either, so feel free to add those tags if you think that's the way you want to take the FAQ idea.
 
Meh, sounds like we need a poll. We're equally unenthusiastic. :)
Now how do we poll...
Star this message if you think FAQ's should lean in the direction of frequently asked StackOverflow questions only.
6
Star this message if you think FAQ's should learn in the direction of being a source for definitive Q&A's to important C++ topics.
13
Meh.
Now I can't vote. Haha.
 
sbi
7:35 AM
@GMan: I pinned these messages, so others can see them to vote on.
 
Sweet. Interesting experiment. :)
 
7:45 AM
G'Night everyone.
 
sbi
@GMan's going to bed, that's my clue to stop wasting time and start to work...
 
@sbi Read your article on SO, you do have a valid point...
 
sbi
@Tony You mean that rant on wordpress? I wish I could express the same information using a third of the words.
 
@sbi Yes I mean the wordpress rant....
 
8:08 AM
so what shall we rant about today?
 
Uhm... let see if I can condense the rant: Damn them, they hace actually removed the users/recent page... oh, no, that is not your rant, that's mine! BTW, I won't rant about it, but I am trying to be less active in SO/chat.so... it was taking too much of my otherwise wasted time
Ah, and the users/recent being removed is my rant today! Darn!
@Martin: following the comments on the meaning of defining a friend function inside the class vs. outside, it not only documents, but it changes the behavior of lookup:
 
@DavidRodríguezdribeas yea well, I don't disagree that SO chat can be a time waster... but it's nice to sometimes waste time with people whom share the same interest as oneself
 
(I posted here, besides the comment, as well... I depended on users/recent to get notified of comments and it is no longer present. Until I get used to the "users -> responses" thingo, I am using this as backup
@Tony I am not bailing out of SO, just reducing the time spent.
 
@DavidRodríguezdribeas oh ok.... sure I can understand that :)
 
8:24 AM
Like sbi, I'm terrible at actually going to bed.
 
@GMan seems like it
stay up then
I suffer from the same "sickness", if you wanna call it that
 
lol. i will for a short while
 
I hate going to bed, and I hate getting up in the morning.... so there's always that dillemma
maybe you can advice me
I have a function that currently returns a bool, however internally it is based on a function that returns an Enum, which turns out has another value I need, now I don't wish to change my boolean interface, as I use it in while loops... how could I best adjust to take that third Enum value into account too?
bool OracleConnection::next(unsigned int numRows)
{
	try {
		res->next(numRows);
	}
	catch (oracle::occi::SQLException& e)
	{
		std::string msg = e.getMessage();

		std::stringstream ss;

		ss << "[OracleConnection::next]: Error occured while looping recordset: ";
		ss << msg;

		if (_logger)
			_logger->logError(ss.str());
	}

	int status = res->status();

	if (status == 0)
		return false;
	else if (status == 1)
		return true;
}
status variable can be value 2 too
I use it all over my code as such while(connection.next()) and I want to keep it that way
 
That's okay. Since you mapped zero to false, just return the enum.
 
@GMan so the while will still work, even if it's value returned is 2?
 
8:33 AM
yea
assuming you want 2 to continue the loop
 
oh cool... :)
yes
 
yea. the value will be converted to bool
for integer types (enum is an integer underneath), 0 is false and anything else is true
 
and what if I just return the status variable itself?
fine you just answered that
 
@GMan LOL
 
: D
sleep time, this time, night
 
 
1 hour later…
10:18 AM
Is there a way you can pass a Type of something to a function, not an instance of the type, but the Type itself, so you can say func(typeof(int))?
 
func<int>()?
are we talking about C++?
 
@jalf yes
@jalf I'm trying to wrap this following function (setDataBuffer) in my class, but one of it's args is the type of data (eg string) the buffer will contain, I'm just wondering how I should do that?
 
make it a template?
 
type
Type of the data that is provided (or retrieved) in the buffer.
oh ok
 
 
1 hour later…
11:36 AM
what's the easiest way to check the type of a template parameter?
 
@Tony don't.
 
create a template specialization that implements the interesting type differently
 
@AlfPSteinbach I guess then I cannot use templates for what I'm trying to do...
@ChrisBecke that would require me to create specializations for N types, and n is a big number, I'll use an enum instead
 
template metaprogramming doeth sucketh sometimes
 
@ChrisBecke in this case it probably would have been handy, but it's just not applicable I guess
 
11:41 AM
@Tony it's just a case of you asking for help with imagined solution, instead of help with problem. forget about imagined solution. ask SO question about problem.
 
I wanted to make a class that wrapped a lua state object, and allowed methods on it to be called like c++ methods... but I need to template out a prototype for each conceivable combination of parameters.
 
0
Q: Wrapper for setDataBuffer (OCCI)

TonyI have an OracleConnection class that uses the OCCI Oracle API to access the database. I now need to go fetch multiple rows of records from the database and this is done with the ResultSet::getDataBuffer(...) function of the API. This function takes a series of arguments, one of them being a bi...

 
12:35 PM
Seems like a relatively simple traits class could solve that
 
@ChrisBecke my first thought is "phoenix", but @Jalf may be right..
 
oh, unless the type/enum is only determined at runtime
but it would be fairly trivial to make a traits class which maps, say, a type double to the value OCCIBDOUBLE
 
@jalf what do you mean type is defined at runtime?
you have to specify at compile time what type the databuffer is going to be, cause you know what you're getting from db
 
ok, then it would work
 
@jalf cool, not that I have any idea how I'd do that, can you post a simple example as an answer?
 
12:55 PM
ok, posted a quick example on your question
hope it makes sense. Was a bit of a rushed job ;)
 
@jalf yes thanx, yours and @sbi's combined give me enough to work with :)
 
1:25 PM
@jalf is this valid (if a type maps to to multiple oracle types)?
struct oracle_type_traits<std::string> {
	oracle::occi::Type type OCCICHAR;
	oracle::occi::Type type OCCISTRING;
};
 
whats wrong with this ? it says: 'paraTela': identifier not found, even with argument-dependent lookup
int _tmain()
{
    ifstream inStream;

	inStream.open("C:/Users/In06/Desktop/infile.txt");
	paraTela(inStream);

	system("pause");
	return 0;
}

void paraTela(ifstream& arquivoStream)
{
	int prox;
	while(arquivoStream >> prox)
		cout << prox << endl;
}
 
no, you're declaring two variables with the same name (type) in the same class
 
@jalf so I'd have to name them differently I guess
 
the idea is simply to declare a variable named type inside each class definition
which has the correct OCCI... type
 
??
 
1:30 PM
you can have multiple ones with different names, sure, but then it becomes less general. The idea here is that no matter what type T is, you can ask for the oracle type it maps to with oracle_type_traits<T>::type. If the specializations start having different members, it's no longer as generic
 
@jalf but what if the C++ type (string in this case) would map to different types, can I create two traits with a std::string in?
 
@Tony then you have to make up your mind. If I pass a std::string to your function, what should it do?
 
cause an OCCI::CHAR is not the same as a char in C++, it can have more then one char
 
@cyberrog the function isn't visible at the point where it's called. Either move the definition of paraTela up above main, or declare it at the top without defining it: void paraTela(ifstream& arquivoStream);
@Tony well, it's up to you what makes sense. The traits class is just able to provide type-specific information: "If T is a std::string, here are the members and typedefs you should use"
if the C++ type doesn't tell you everything you need to know, or if the logic diverges too much for different types, it won't do much to help you
 
sbi
@cyberrog In order to be able to call a function, that function needs to be declared before the call. (You can define it later.) See this for what's a declaration and what's a definition and what they are needed for.
@Tony: I'm with @jalf on this. If you want to automatically determine the enum from the type, there has to be an unambiguous mapping from one type to one enum. Multiple types could map to the same enum, but each type must map to only one enum.
If this won't work, you can always overload the function template with a plain function that takes an additional enum specifying what DB type this should map to.
 
1:46 PM
@sbi ok that makes sense, for starters I'm only gonna be implementing the one's I need
@sbi so what do I pass to my wrapper function for type, just the oracle_type_traits<T>& t ? and the function is of course templated on T
lol I just got 1278 build errors on my last build... haha :p
 
sbi
@Tony Nonononono.
For one, a traits class is just a compile-time entity. You don't pass objects of it around, only the type.
 
just pass the type itself. Like getBufferData<std::string>, for example. Then internally, the function can get the Oracle type id from oracle_type_traits<std::string>::value
 
sbi
Then: The wrapper "knows" the type it is supposed to serve, so it can access oracle_type_traits<T>::type all by itself. Users shouldn't even need to know that traits template.
 
@sbi oh ok. Oh Gosh I'm such a noob in that area...
 
sbi
@Tony This article is more than 15 years old, but TTBOMK still a very good introduction to traits.
 
1:55 PM
@sbi I do understand the idea behind them, just I've never implemented them or explicitly had to use them
doesn't type need to be defined in the non-specialized version of the template for it to be visible to it?
template<typename T>
struct oracle_type_traits;
 
No, each specialization is completely independent of all the others
 
no type there, but in the specializations I do have
 
they don't have to have the same members or anything
 
sbi
@Tony Template instances are types, and different template instances (having different actual template parameters) are different types. As any other types, they can be radically different from each other.
Besides, if you only declare, but don't define the primary template (the one the others are specializations of), then that makes your compiler spit nasty error messages into your face when you screw up and try to instantiate it with something you don't have a specialization for, because a primary that isn't defined can't be used by the compiler.
 
@sbi I'm used to getting spit cryptic messages at me.... I think my brain must have turned cryptic since I've dared diving into C++... hahah
@sbi I like the use of advanced geek acronyms such as TTBOMK, haaha
 
sbi
2:13 PM
@Tony Sorry. I think I've said this before, but I have been in Usenet for so long, using these is deeply ingrained into my brain now.
 
@sbi I realized that, but I learned something :)
 
sbi
Oh, @GMan's pinned poll has started to accumulate votes. I really like the abuse of the pinning system for such straw polls. :) Vote, vote!
 
@sbi voted already
 
@Tony how is it going with CUDA?
 
@Nils oh getting lost in matrices and texture memory....
not quite got my mind around it yet
 
2:18 PM
Texture memory
have not use that so far
 
@nils me neither, but was reading manual and it started talking about that, so I had to know what it was talking about, looked up textures and then I got lost into the gory details.... pfff, perhaps wasn't such a good idea
 
hehe ic
 
@Nils ic?
 
I see
 
:)
 
2:21 PM
I wonder how printf works.. guess it just writes it into some kind of buffer on the GPU which is automatically written back and then printed out..
 
@Nils prob a similar concept to the printf in c
 
yeah but it's not printed instantly
and not at all if you abort a kernel
 
@nils if you're wanting to show it in the host debugger you need to retrieve the string to host memory, else you need to use a CUDA debugger, as suggested here
1
Q: printf inside CUDA __global__ function.

Jose VegaI am currently writing a matrix multiplication on a GPU and would like to debug my code, but since I can not use printf inside a device function, is there something else I can do to see what is going on inside that function. This my current function: __global__ void MatrixMulKernel(Matrix Ad, Ma...

so what is wrong with this:
template<>
struct oracle_type_traits<std::string> {
	static const oracle::occi::Type type = oracle::occi::Type::OCCISTRING;
};
compiler says it cannot find OCCISTRING cause it's supposedly not part of the Type enum, but it is
 
2:38 PM
That's old, if you have a Fermi card you can just use printf(..) in the code.
@Tony ^
 
@Nils oh ok, well that was my 2 cents worth try, which is wrong, damn :(
 
lol
@Tony What are u doing for living?
 
@Nils programming
 
ok
who could guess
 
lol, currently C++, but in the future there will be other languages too, and I have an interest in GPGPU programming and perhaps graphics programming if I can ever get my head around it
network security is another interest of mine....
 
2:46 PM
quick q for anyone who knows. I always thought that in the iostream library, openmode binary only affected formatted i/o functions (>> and <<), not unformatted ones(read, write). Am I wrong about that?
 
Ah cool, I never coded C++ for money :(
@BenjaminLindley have to pass, sry
 
00:00 - 15:0015:00 - 00:00

« first day (171 days earlier)      last day (4795 days later) »