« first day (173 days earlier)      last day (4793 days later) » 

2:03 PM
Are pointers really that hard for you?
 
@tina, @alf wrote a good article on pointers
 
I explained pointers to a 14-year-old boy once by having him point at stuff
 
@tina go to his profile on SO and then to his blog, it's on there somewhere
 
pretty visual explanation: just point at something
 
@RonaldLandheerCieslak good point!
 
2:04 PM
now if someone else moves the something being pointed at, you have a stale pointer
the trick was for him to understand that he was pointing at the spot, not the object
so when I moved the object away, he had to keep pointing at the same location (that took some repeating)
 
blog is short for weblog, these days most personal websites are blogs
I think he's an atheist.
 
@StackedCrooked that never prevented God from doing anything ;-)
 
@RonaldLandheerCieslak I can't deny your logic :)
 
can I have a base class with a private ctor and their derived have public ctor?
 
@RonaldLandheerCieslak Unless the object is aware of the pointer, and moves the pointer whenever it moves...... mwa ha ha ha
 
2:10 PM
Jawohl
 
@Tony you can have a base class with a protected ctor
 
what if god is an atheist? or does he not believe in himself?
 
@Xaade I was explaining pointers in C
 
@Tony if you base class has at least one protected or public constructor.
 
@RonaldLandheerCieslak Unless the compiler is totally whack and does it for you!!!!
 
2:11 PM
@Tony yea, maybe he lacks self-confidence.
 
@Xaade I don't think a standard-compliant compiler can do that..
 
:567460 or friends... it is nice how you can befriend your childs...
class child;
class pbase {
   friend class child;
   pbase();
};
struct child : pbase {
   child() : pbase() {} // ok, we are friends!
};
 
@RonaldLandheerCieslak I you're a good singer then you can explain pointers in C minor.
 
@StackedCrooked or in C sharp :)
but I was explaining pointers in C to a minor
 
@RonaldLandheerCieslak Nah..
 
2:14 PM
and there wasn't any singing involved
 
@DavidRodríguezdribeas Can't you do it with a static method in the class, that creates itself????
 
@DavidRodríguezdribeas I knew I should have written "accessible from the children"...
 
@Xaade not if you want to be able to create an instance of the child
 
@Xaade I don't think you can do that since it's the derived class that calls the base constructor.
 
Well obviously you can just make the base class abstract.... then you can't instantiate the base class, which is what it appears you want to do right?

Otherwise I don't really get what your design goal is.
 
2:17 PM
@Xaade, if you want to be able to construct objects of derived types, the derived types must be able to construct it's base subobject
 
@Xaade I'm not the one asking the original question
so I don't know much more than you do
 
@RonaldLandheerCieslak I figured that response..... you was more of a.... public address...
 
dammed english language
you they.... who am I addressing.... the world may never know
 
@Xaade on peut parler français si tu veux
of nederlands..
oder deutsch
but I still think english isn't all that bad
;-)
 
2:19 PM
when speaking french (something) you (something.....
 
the @Ronald kinda implied me, though
 
un peux
 
I'm learning Nihon-go.
 
See.... that's the funny thing.... I didn't know how to respond to your comment, yet use the public addressing form of *you*.

I was using the link as a response, but not necessarily addressing you....
Maybe make a multi-line link..... it doesn't do the @name.
 
@Xaade I guess you could've used "they"..
 
2:22 PM
I think they need to have two options.... one to reference another post, one to reference another post and poke
@RonaldLandheerCieslak Do you have to make things so simple?!?!?!?
 
is horrid or what? pastebin.com/4iTnzK5c
question is, if I don't know whether the variable is a string or whatever, how else can I write this in a better way?
 
@Tony I've seen worse
but yes, it's ugly
 
@Tony catching errors is slow
 
there's no need to throw exceptions here, btw
 
@RonaldLandheerCieslak yea, I agree, so what would be a better way to do it?
 
2:29 PM
@Tony What is the type of m_spInterpreter? Can you ask for its type?
 
@StackedCrooked its an object that parses and executes python scripts
this is a COM object in this case, but I've written it without the COM
the problem is whether to go get a stringvariable or a double variable, if you have no idea what the type of variable is before hand
 
it's guess work, but how do you tell a machine to try one thing and if it fails just try the other, and if that fails, we could log an error
 
It should support some mechanism for querying it's type I think... Do you have control over the class' source code?
 
@StackedCrooked yea
but god knows if you can query the type of a variable in the python 1.5 api
@RonaldLandheerCieslak thx thats definitely a lot better
 
2:36 PM
@Tony Perhaps you can draw some inspiration from this: stackoverflow.com/questions/5319216/…
 
@StackedCrooked thing is these variables are essentially converted to PyObjects and then gotten from there converted by the GetStringVar functions.... so I can only know they are PyObjects....
 
I think thats the point
in languages like python
variables are typeless
they are whatever type is appropriate and needed at the time
 
unless you have some way of controlling GetStringVar function that can prepend a type???
 
@Tony Have you considered using Boost.Python or SWIG?
 
@StackedCrooked I have indeed, but I am stuck with Python 1.5, which I doubt are supported
 
2:46 PM
@ChrisBecke Not typeless -- dynamically typed.
 
It appears as if the data parser determines if you can put the pyObject into a string (or double)....

This appears to be the way of knowing what type the object supports.....

It's similar to having text, and trying to do an toInt on the string....
 
/nick InNeedOfCorrection
get born. learn c++. die.
 
@ChrisBecke That's what typically happens to those that learn C++......
get born. learn .NET. live.
 
no one makes it out alive.
 
Yeah, that's why you avoid the minotaur.....
if you totally back walk out the front door....
 
2:52 PM
the star-questions @GMan set up aren't fair. because if you make the reasonable assumption that frequently asked questions are about important topics, then the starers for option "source for definitive Q&A's to important C++ topics." include those for "lean in the direction of frequently asked StackOverflow questions only", and so the former is always going to have more stars the the latter
 
@JohannesSchaublitb You're thinking too mechanical....
To me, the point is obvious.
 
@Xaade that's all the template mechanics getting to him :p
 
@Xaade not sure what you mean
 
Should FAQ be responsive, or should they be pre-emptive.
 
i'm just imaging how people would vote reading those two options
 
2:55 PM
Should they attempt to find topics with frequent questions and respond to that demand. Or should they simply attempt to have definitive information about topics and let people come to them.
 
i'm not considering the point of the options, which is clear to me
 
@JohannesSchaublitb It would be better if you read the second one first.... but I naturally read in that order, because stickies go in reverse chronological order.
 
hm I see I probably made a logic error. What I wanted it to say in addition is ", even if they are not asked frequently." at the end. But even without that, such a statement is already assumed because it doesn't say otherwise.
i'm not sure...
 
StackOverflow already is a Q&A site. Why would we need another FAQ?
 
Als
@Xaade: My vote goes for "Attempt to have definitive information about topics and let people come to them"
 
3:03 PM
It would be a FAQ inside a FAQ.
 
@Xaade Are you also starting to think that there is a metal body under litb's skin? You are not the first there, you know....
 
Als
I believe C++-FAQ should have important concepts explained in a definitive way
and not just FAQ which are asked on SO
 
BTW, I was inclined to star both, and that means that they don't make a clear division of the domain
 
@Als Ok, but then it is not a FAQ anymore (as in "Frequently Asked Questions")
It would be more like a variation of the "Effective C++" books.
 
Als
@StackedCrooked: True but it usually stems that most people ask questions which are based on a concept or their lack of understanding of it..Such q can be the directly redirected over to the FAQ
it would still have a linkage
I guess it would be a great plus for new developers
 
3:09 PM
Then it's a "List of frequently unasked questions" (the questions that should have been asked).
Short would be: FUQ
 
Als
In that case the format of self posing a Q and then answering it to explain a concept shouldn't have been put forth in first place
 
struct A {
  void a();
  void a(int);
};
template<typename T, typename Func> func(T* class,  Func fn);
A foo;
func(&a,&A::a); // how to tell it wich a to pick?
 
Als
but it is and its a excellent one
 
sbi
@JohannesSchaublitb "Do you want the subset or the superset?" Where's the problem in this question?
 
@ChrisBecke I don't see a solution without some helper code...
@ChrisBecke func(&a, boost::bind(&A::a, _1, _2)) ; // just a guess
 
3:16 PM
I love FUQs....
They are far more useful.... as people a lot of times don't know the right thing to ask. Otherwise, explain the ability of high rep users to edit questions and answers.
 
@ChrisBecke Or if you want the first one: func(&a, boost::bind(&A::a, _1))
 
use the old, non automatic boost::func syntax
 
@StackedCrooked Short FUQs are far more enjoyable than FAQs that don't get anywhere....
 
@Xaade Yeah, nothing beats a good FUQ.
 
Als
@Xaade: FUQs ...would be nice...again who decides what exactly qualifys for a FUQ?
 
3:19 PM
@Als Well, first it would have to be consensual.
 
that depends on how frequently theyre not asked
 
@ChrisBecke Yeah, like why didn't C++ support the COMEFROM feature?
 
Als
@Xaade: consensual is hardly what you get really
 
C++ FAQ: If you're new to C++, then go buy a book on C++ and read it cover to cover. Then come back with any questions you might have. [suggested books here] </end of FAQ>
 
I don't ask myself that question every day as I wake up
 
Als
3:21 PM
@StackedCrooked: Q's like that would make it only for Geeks
 
@Als That would require the use of ErRor Free.
 
um, this is c++ right?
 
NOTE: You might need to read that last one aloud.
 
And why doesn't C++ have line numbers? I miss those..
 
@StackedCrooked Because C++ programmers are geeks.... all the line-numbers would be 555-5555.... if we asked.
 
Als
3:22 PM
I guess FAQ FUQ or whatever we name it...Seems everyone agrees to disagree on what it shall have!
 
I think, if we all got on top of the topic at hand.... everyone would agree on what a FUQ should be, and how often we should do them....
 
C++ FAQ:
Q1: I am new to c++, where do I start?
A1: i_am_a_geek?answer<Q2>:exit(-1);
 
@Xaade you could never do them enough :)
 
@Tony At least someone caught my thrown exception.
 
@Xaade hahah :p
 
sbi
3:25 PM
FWIW, I'm in favor of the FAQ idea only answering truly frequently asked questions. That was the original idea, after, all. (However, I can't vote for it, since I pinned both of those messages, which seems to count as a starring them.)
 
sbi has joined the electorate....
 
@sbi Wouldn't you achieve this by sorting SO C++ questions by number of views?
 
where would we put this FAQ anyway?
 
Hmm... except my trigger happy refresh button would foil your plans.... mwa ha ha
 
and why do we need more c++ FAQs than parashift.com/c++-faq-lite
 
Als
3:27 PM
Usually some Qs get definitive answers & really nice ones, explaining a concept in great deal but they wont find a place in FAQ just because the Q was not frequently asked. I believe its really a loss to lose all those precious definitive explanations..What can be done about this?
 
sbi
@StackedCrooked How would doing this give you definite and comprehensive answers?? (You might want to actually read the link I posted.)
 
The most frequently asked question by the aspirant C++ programmer is: Why doesn't my program work?
 
Stack Overflow would need specific support of Faqs for this to move forward. I like the concept of FAQs having standalone related answers though.... so that the editor can provide a forward direction, but the community could communicate usefulness of each section (par voting).
 
sbi
@ChrisBecke <sigh/> "That was the original idea."
@Xaade ??
 
lol
 
3:29 PM
Hello, can I ask somthing?
 
In that case, the answer is obvious, and its in the phrasing of the original idea
 
sbi
@Kostas You just did so.
 
Als
Usually some Qs get definitive answers & really nice ones, explaining a concept in great deal but they wont find a place in FAQ just because the Q was not frequently asked. I believe its really a loss to lose all those precious definitive explanations..What can be done about this? Did this go through or my conn stuck up
 
the FAQ is the place to answer the questions we don't want to answer, over and over.
 
@sbi Haha
 
3:30 PM
@sbi I would give you a list of truly frequently asked questions. I didn't say anything about it being a comprehensive list of definite answers. :)
 
Does anyone know, if there is a yacc example for languages like javascript?
 
sbi
@Kostas Look to the right. There's a bold link to the newbie hints. They answer your question, and many others. Please read them first. It's what they were made for.
 
@Kostas this is C++ lounge, 'nuff said
 
extending it to cover unasked questions consitutes the kind of project killing feature creep that should best be avoided
 
hey.. are variable variables possible in c++?
 
sbi
3:31 PM
@Tony yacc is used from C or C++ programs.
 
make it a FAQ first, and FUQ it up later
 
@c4rrt3r No only constant variables.
 
@ChrisBecke if they are unasked are they by definition then a question?
@sbi my ignorance got the better of me it seems
hahah
 
Als
What about answers with definitive concepts that wont find place in FAQ....A new tag for them perhaps?
 
@StackedCrooked ok, thanks!
 
3:33 PM
in my theory, every possible information already exists. they just need to be represented
 
@Als Something like a "Did you know?" section?
 
sbi
@Als What answers?
 
The electorate doesn't really accomplish anything these days. they just forward the voter's intent and fudge the numbers through state balancing (by giving a state a flat set of votes by default, so they get more equal representation, then getting population based votes).

The intent was two fold. One to allow a representative to vote (electorate can vote in opposition to their constituents), and two was to equalize the states slightly.

Both of those are obsolete concepts. States can be equalized mathematically, and the electorate don't really ever cast a vote outside the results from thei
 
The point of a FAQ is to be concise, so ppl with a potential question can quickly find it.
 
@c4rrt3r aren't variable 's by definition variable, unless qualified with const
 
3:34 PM
@ChrisBecke AFAIK conciseness is not part of the definition of FAQ. Not that I disagree.
 
Als
@Sbi: Lets say a OP asks a Q and an answer to it summarizes a concept of C++ nicely but the Q wont be asked that frequently so it wont find a place in FAQ...A way to preserve that effort that went in for explaining that conncepts?
 
@ChrisBecke Again, SO would need more integrated support for FAQs....
 
sbi
@ChrisBecke Please go now and read the original thread on meta. The FAQ idea had a specific goal. It would be a success even if new users wouldn't find it.
 
@Tony I assumed variable variables where like variables in superstates, like in quantum mechanics.
 
sbi
@Xaade This confuses me even more. What are you talking about?
 
3:35 PM
@Tony agree, I was thinking if i have variable var1-36.. if is there any way to loop them.. without array
 
@sbi don't bother, some people can write english, but obviously don't understand it
 
1. FAQs aren't searchable.
2. FAQs aren't by default locked to the owner.
3. blah blah blah
4. FAQs can't be alternatively sorted by editors preferred order.
 
@ChrisBecke with a cast
 
Als
Probably everything shouldnt be crammed up in FAQ but have separate Flags
 
@c4rrt3r not sure what you're saying?
 
3:37 PM
@sbi forget it.... it's was a corny simile anyway.
 
sbi
@c4rrt3r That's what arrays are for. (You can't play with variable names in C++. They are pure compile-time entities.)
 
@sbi ok, i was just wondering :) thanks!
 
@c4rrt3r if you declare them consecutively on the stack as volatile then you could iterate them by calculating the memory offsets. But that would be bad. And requires a loop anyway.
 
OR
heheh
You can use macros
macros have that name building thing.... I've used it before.
then you can have a macro that takes a number. That number references a macro with the number at the end. Then you create the number of macros you need for your largest size. Then you use the macro to call it's decremented version, and build the name for your variable using that same number.....

It's like templates.... only worse.
 
sbi
@Xaade Indeed, I forgot this. @c4rrt3r: @Xaade has indeed a point there, but I'd advice against doing it. Strongly so.
 
3:44 PM
@c4rrt3r you can use a std::set
 
sbi
@c4rrt3r: Please state what you want to achieve, rather than asking about what you thought a means to do that.
 
@c4rrt3r ...Or you could generate the code using a Vim macro. There are many ways...
 
@DavidRodríguezdribeas that cast was not looking simple
 
When I had my very first programming experiences found it odd that if you iterate one million items, that you're gonna check one million times if you're there yet.
It seemed so wasteful.
 
Actually I tried and I did not manage to implement it as a cast *inline*, but you can create a variable and use it:
void (A::*_detail)() = &A::a; // This will select the void argument version, then
func( &a, _detail );
At any rate, I find it strange that you want different signatures to be managed by the template (it would not know how to call the method: how many arguments to provide?)
(Unless you are doing some dark metaprogramming magic inside to determine it)
So you can move that knowledge to the template:
template <typename T, typename R, typename Arg>
void func( T* obj, R (T::*fn)(Arg) ) {
(obj->*fn)( (Arg)0 );
}
Take a look at boost::bind sources (or std::bind if they are available in your implementation)
 
3:52 PM
Good morning/afternoon/evening, all.
 
@JohnDibling taking care of all time zones there ;)
 
I'm Internationalized!
 
@DavidRodríguezdribeas template<> func has template specializations to pickup the different numbers of args.
 
Then just use that as part of the signature of the function argument as in the example above (if there is a single argument, then expect: R (T::*)( Arg1 ), that way the compiler will resolve the specific member pointer for you
 
hmmm
0
Q: copy integer to buffer if buffer have enough space in C

chandrawibi have a function to copy an integer into buffer if the buffer have enough space void copy_int(int val, void *buf, int maxbytes) { if (maxbytes-sizeof(val) >= 0) mempcy(buf, (void *) &val, sizeof(val)); } the problem is it always copies the value to the buffer even when maxb...

was answered already :)
 
3:59 PM
@Tony and? if you got a better answer or more information that is worth adding, add it :D
 
@thecoshman no I was trying to see if I knew the answer and I had a suspicion it was the sizeof(val) causing the problem, but now I have my answer
I didn't know you could do sizeof(variable) instead of sizeof(type)? thought it was only valid for types
 
sbi
@Tony It's valid for expressions and types. Expressions won't be evaluated, though.
 
you can sizeof a variable
 
@sbi Cool I learned something! :)
question for @JohannesSchaublitb
0
Q: Class design for self-linked classes with generic pointer type

JohHi there, I am currently modifying a complex class that has nodes pointing to themselves just like linked lists or graphs. I want it to be used in shared memory using boost::interprocess functions. Now I am looking for the way to redesign it such that it stays generic and involves least changes. ...

 
4:32 PM
Here's how that would work.... heheheheh

#define MYSUM1(varname) varname##1
#define MYSUM2(varname) varname##2 + MYSUM1(varname)
#define MYSUM3(varname) varname##3 + MYSUM2(varname)
#define MYSUM4(varname) varname##4 + MYSUM3(varname)
#define MYSUM5(varname) varname##5 + MYSUM4(varname)
#define MYSUM(varname, count) varname = MYSUM##count (varname)

#define ASUM(x,y) BSUM(x,y)
#define BSUM(x,y) x + y;

int _tmain(int argc, _TCHAR* argv[])
{
int item = 0;
int item1 = 1;
int item2 = 2;
int item3 = 3;
 
sbi
@Xaade I wish you hadn't posted this. Someone pass me the brain-bleach, please!
 
Well, I "looped" a sum without an array, with variable names ending with a number in order.....
It's no different than the recursive counting template.... isn't it?
 
Hi everyone, I was wondering about patent and if there a website where I can for example check if an idea is already patent and to what places it is legalized to, i realise this is a very generalized question but was hoping that perhaps some one could lead me to something usefull in regards.
 
you can try to patent an idea.... then you'll find out.....
@sbi should I make a FAQ?
 
well I think it is already patented and I dont really want to patent it even if it is not, I was thinking on producing something like trackion.com or preyproject.com which tracks devices etc
But I am afraid that doing so i might fall into the patent thing etc, so i was looking/trying to find some information about patents ;)
 
4:39 PM
Can you hand out your version of something for free even if it's patented???? As long as you don't make a profit...... or if something is patented you can't do it.

I mean, I'm thinking like, I make something for a friend, but the idea is patented... it's kinda unfair for some company to come in whiny-like
Do patents rely on the object cost being a barrier to a free alternative?
Are do they expressively forbid the production of any like item, even if it's a handout?
 
@Xaade I see your point, well I am planning to make some money out of it but on a localized region, a patent is usually tied down to regions right like mercosul or to whatever their pay to extend it right ?
 
Anybody know a preprocessor magic to include a file if it is present? Or to do some preprocessor conditioning based on presence of a file on the system?
 
@Xaade Now implement it with the boost preprocessor as an exercise
 
Can someone explain why this program keeps outputting "1"?#include <iostream>

int main()
{
volatile int var0 = 100;
volatile int var1 = 101;
volatile int var2 = 102;

std::cout << "&var0: " << &var0 << std::endl;
std::cout << "&var1: " << &var1 << std::endl;
std::cout << "&var2: " << &var2 << std::endl;
}

$ g++ -o test main.cpp ; ./test
&var0: 1
&var1: 1
&var2: 1
 
@StackedCrooked sweet!
 
4:50 PM
(I'm sorry if I broke the chat..)
@DavidRodríguezdribeas yea, I was actually trying to submit a reply for the iteration puzzle...
 
If you want the addresses you can force a cast to (void*) (no volatile), and that will print the addresses... My guess is that there is some overload of operator<< for volatile pointers somewhere...
 
Address of volatile seems to be "1" each time. If I use a non-volatile it does give an actual address.
Aah
@DavidRodríguezdribeas That makes sense.
 
xaade thanks for the hits, appreciate it, got to leave now so cya everyone.
 
Kind of... I mean, it might be doing something weirder like not being able to use any other overload and ending up in a cast to bool... which seems more reasonable.
Note that the compiler cannot implicitly cast away the constness of the pointed type:
volatile int a;
int * p = &a; // error, casts away volatile!
 
@DavidRodríguezdribeas That's a very reasonable explanation. Thanks for taking the magic away, bastard! :)
 
4:54 PM
And that probably rules out all pointer overloads of operator<<, which means that it will convert to bool (implicit conversion)
@StackedCrooked lol... magic is hardly ever magic
 
sbi
template<typename T>
void print_type(const T&)
{ std::cout << typeid(T).name(); }
That's what I usually do when something like this comes up.
 
// If I add this then the application results in a stack overflow:
inline std::ostream& operator<<(std::ostream & os, volatile int * var)
{
os << const_cast<int*>(var);
}
 
If you add a std::cout << std::boolalpha; you will see that those are no ones, but rather true's
 
Why? ...
@DavidRodríguezdribeas Heh, I had never heard of "boolalpha" before..
 
it makes true look like true, and false look like false, rather than 1/0
 
5:04 PM
@StackedCrooked: That's because the volatile int* overload is a better match than the void* overload
and you're infinitely recursing
 
@DeadMG thanks, I also noticed that you can't really overload foo(int*) and foo(volatile int*);
 
Again overload resolution and conversions... you provide an overload for `volatile int *`, and that will match the `&var1` perfectly, no conversions required.
Now you cast away volatile-ness, and you try to call with an int*, and the compiler tries to resolve the best call, it finds operator<<(..., void*), and operator<<(..., int volatile*), and the second conversion is better
 
Fun stuff..
 
@StackedCrooked You can do it, there is no reason for the contrary
 
sbi
@StackedCrooked Yeah, boolapha is the lesser known brother of @balpha.
 
5:08 PM
but remember that C++ is compiled top-down, so the function has to be defined in advance
 
sbi
@DavidRodríguezdribeas Declared!
 
~/svn/stacked-crooked/PlayGround/LoopVariables $ cat main.cpp
#include <iostream>

void foo(int * ) { std::cout << __PRETTY_FUNCTION__ << std::endl; }
void foo(volatile int * ) { std::cout << __PRETTY_FUNCTION__ << std::endl; }

int main()
{
foo(0);
}
~/svn/stacked-crooked/PlayGround/LoopVariables $ make
g++ -o test main.cpp
main.cpp: In function ‘int main()’:
main.cpp:8: error: call of overloaded ‘foo(int)’ is ambiguous
main.cpp:3: note: candidates are: void foo(int*)
main.cpp:4: note: void foo(volatile int*)
 
std::ostream& operator<<( std::ostream& o, int * p ) { return o << (void*)p; }
std::ostream& operator<<( std::ostream& o, int volatile * p ) { return o << (int*)p; }
 
sbi
@StackedCrooked That's because 0 is convertible into any pointer type. Use typed variables instead.
 
@sbi !!!!! my god, DECLARED (I had written declared or defined, then I removed the wrong side of it...) my bad, now I am going to go look at the wall and repeat 100 times "declared not defined", "declared not defined"...
 
5:11 PM
:D ~/svn/stacked-crooked/PlayGround/LoopVariables $ cat main.cpp
#include <iostream>

void foo(int * ) { std::cout << __PRETTY_FUNCTION__ << std::endl; }
void foo(volatile int * ) { std::cout << __PRETTY_FUNCTION__ << std::endl; }

int main()
{
int a = 0;
foo(a);
}
~/svn/stacked-crooked/PlayGround/LoopVariables $ make
g++ -o test main.cpp
main.cpp: In function ‘int main()’:
main.cpp:9: error: call of overloaded ‘foo(int&)’ is ambiguous
main.cpp:3: note: candidates are: void foo(int*) <near match>
 
sbi
@DavidRodríguezdribeas Ah, don't sweat over it. Reading my FAQ entry explaining the difference between the two a hundred times will absolve you. :)
 
I haven't had much sleep though I might be overlooking something here....
 
sbi
@StackedCrooked foo(&a);
 
@sbi Oops
 
@StackedCrooked The problem there is not with the two functions, but with the usage: the conversion from 0 to either int volatile * or int * is just as bad for the compiler
 
5:12 PM
@DavidRodríguezdribeas @sbi My sincerest apologies...
 
@sbi I can type "declare not define" much faster than I can read your FAQ...
 
@DavidRodríguezdribeas Yeah, I meant to write &a actually.
 
sbi
@DavidRodríguezdribeas So?
 
@DavidRodríguezdribeas So among two bad choices it doesn't have a preference? :)
 
So I prefer typing that 100 times:
#include <iostream>
int main() { for (int i = 0; i < 100; ++i ) std::cout << "declare not define" << std::endl; }
 
sbi
5:17 PM
@DavidRodríguezdribeas Why would you type that a hundred times? Just compile it and run it once.
Anyway, I need to leave to meet with a few friends tonight.
See you!
 
@StackedCrooked Not exactly, among two equally bad choices it does not have a preference. The compiler would prefer generating 100 error messages "declare not define" than having to read the FAQ so many times, but in the case of conversions from 0 to int* or volatile int* it does not make up it's mind... then if you offer any of them conversions on one hand and reading the FAQ...
 
@DavidRodríguezdribeas Taken out of context it seems that you want to remind yourself to focus more on the "what" and less on the "how"...
@DavidRodríguezdribeas Are you interleaving two answers here?? I'm confused...
 
Just kidding, the problem is not that both are bad, but that they are equally bad, given a third choice (conversion to bool) that is worse, that is immediately removed from the set of potential overloads...
 
5:41 PM
whats up earthlings
 
@Tony the sky?
 
@SamBloomberg yes that is up
but so is the ceiling
 
@Tony Only if you are under it.
And that was redundant (or at least obvious)
 
Oh god.
But can it divide by zero?
Actually, it would be more amazing if it wasn't cloud based.
 
5:49 PM
@SamBloomberg Why?
 
With the cloud, it isn't really one computer (or even a cluster). Its a virtual computer. I mean it is really something to actually physically have that many cores.
 
@SamBloomberg You have a point. Botnets are usually not referred to as supercomputers also.
Actually, this makes me wonder if botnets are sometimes use for encryption cracking?
 
They are I believe
 
Cool, I want one.
 
Well, you could get EC2
you can get a micro instance for free for a year
The most cracking I really need to do though is just WEP cracking, and that is stupidly simple.
 
5:54 PM
Yeah, it's like calling Crack();
 
10000 cores?
I got 45000 on my laptop ;)
 
it isn't really 10,000 cores
its just a bunch of computers that add up to 10,000
Which I can bet has bee ndone before
wait, 45000 on your laptop? what?
 
I'm kidding :)
only 2
 
Good... All of a sudden I thought I was way behind
I need a new laptop...
 
i have this
 
5:58 PM
Nice. I have an old HP dv6700
which I just found out has a video card with a defect that easily overheats
 
that's cool :)
 
I need a new one because its 3 years old lol
And its dying (not to mention I dropped it and it has cracks in the case)
I was thinking of a netbook, but I'm not too sure how well it could compile large C programs, not to mention having a small keyboard.
 
I can't tell you about large compilings
but mine has the best keyboard ever
 
Yeah... I have a gaming computer that took around 30 minutes to compile a mod for the source engine (counter-strike engine if you don't know what Source is)
So I think a netbook would die in a fire if it tried anything near that.
 
probably ;)
1 gig ram is barely enough
and i have linux :)
 
6:01 PM
My laptop has 3 I believe
I'm running ubuntu
 
me too
 
and to my surprize compiz runs like a dream
I <3 the desktop cube and wobbly windows
 
yeah windows look like walls when using win
 
Also, the Faenza icon set is amazing
 
my theme is pretty basic
 
6:04 PM
But I don't know how I feel about ubuntu unity and gnome 3 shell for 11.04... I kind of like how my desktop looks
 
the default one
 
ah
I'm using the default theme with Faenza icons (along with AWN for a dock)
 
i'm trying to install those icons
i'm curios now :)
 
I think you need to add a ppa. Once its installed, just go to themes and customize your current theme (if you are using the default theme for 10.10, then use Faenza-Dark and not Faenza)
Faenza-Dark is for dark themes, and Faenza is for light themes
 
COOL! :)
they look much better
 

« first day (173 days earlier)      last day (4793 days later) »