« first day (355 days earlier)      last day (4576 days later) » 

7:00 PM
0 - 18 is definitely a kid
 
0 - 18 is negative 18.
 
@RMartinhoFernandes oh you bot
 
Als
@IntermediateHacker: If 16 is not a kid then what is a kid?
lol
 
it's a range, not a minus sign
 
everything up to 16 is a kid
 
7:00 PM
> “They taste like Chicken!” ~ Aliens on People
 
– is range.
 
Ok, I give up. I'm a kid.
 
@CatPlusPlus oh you pedant
 
Als
C++ has only half open range
 
@IntermediateHacker good, you've now officially become a member of this chat. You've survived our trolling attempts :P
3
 
Als
7:01 PM
that is not shown as -
 
> Humans decided to slaughter the Neanderthals because they smelled and talked funny. A couple Neanderthals were also raped, thus enriching the human gene pool and giving rise to redheads.
 
@IntermediateHacker so are you into hacking then? Seeing you nickname...
 
@TonyTheLion thanks. I'm starring that. :D
 
@IntermediateHacker heheh :)
 
Als
starry times again?
 
7:03 PM
star wars
 
Als
Star everything and break the room!
 
STAR ALL THE THINGS!!!
 
Please don't. You'll make the Ape mad.
 
@TonyTheLion Well, actually i got my name from here:
30
Q: Why are bad developers offended by flaws in their code?

IntermediateHackerI am working on a small open-source project. I have a habit of reviewing the code and suggesting some better ways when I see badly written code. Some good and very experienced developers who I know take it as a compliment and sometimes even thank me for reviewing their code. Their code has very ...

 
Als
@RMartinhoFernandes: Bonobo is the word
lol
 
7:04 PM
See the comments on the first answer
 
@Als Bonobos are apes.
 
@IntermediateHacker oh cool
 
@TonyTheLion you read it already?
 
@IntermediateHacker I'm busy
 
@TonyTheLion No prob. reading questions is boring anyway. :D
 
7:05 PM
lolz
 
Is it just Win 8, or when you resize a window along the taskbar does it snap to where you dragged it
I realise that description is a bit crappy and vague
 
yea it's not anything I can parse
 
It's perfectly clear.
 
@RMartinhoFernandes maybe you can parse English and variations thereof
but you're a bot, you could have been programmed to parse most anything
even if it doesn't make sense
 
CANCEL STAR ALL THE THINGS!
 
Als
7:07 PM
fuck i totally forgot I have a training tommorow
Linux training!
 
@TonyTheLion It was sarcasm.
 
lol, I fail to parse sarcasm
:(
 
How does a conductor learn his job? By train training?
 
conductor training?
 
That one wouldn't be funny.
 
7:09 PM
stop starring random shit
it's supposed to be for interesting or funny tidbits
 
first I thought you wrote "constructor"
 
lolz isn't funny
 
Als
Uh the C++ smarty pants
 
shared_ptr<pant>?
 
can someone please cancel all the stars!?
 
7:10 PM
make_shared(pants)
 
Als
on it
 
> All around us we see peace in action. For instance, the first world war was an excellent example of how some peace can involve flying bombs, debris, destruction, bullets, gore, blood, and corpses. This is known as "dynamic peace".
 
@JohannesSchaublitb I've cancelled mine.
 
why are you making the pants shared but not the content
 
@TonyTheLion On the other hand, who would want to share his pants?
 
7:10 PM
@RMartinhoFernandes are you surfing some quote's site
 
@RMartinhoFernandes Lol.
 
@JohannesSchaublitb The pants content is private.
 
@FredOverflow not me
 
STOP THE RUSH
 
7:11 PM
@JohannesSchaublitb I lulzed :)
 
give me time to read all comments
 
READ FASTER :)
 
:( edited to :) ?
 
yea, cause that first was a mistake
used the wrong parenthesis
 
Als
7:12 PM
 
reddit answers it's own questions :)
 
does the smarty pants library include an intrusive ptr?
 
@JohannesSchaublitb for girls, it definitely should...
 
Als
it has an unique_ptr for sure
lol
 
what about shared_ptr?
 
7:14 PM
With OOP, how are you meant to pass data to a class?
Apart from setting public vars
 
Constructor parameters? Function parameters?
 
@KianMayne the old Get/Set methods?
operator overloading?
 
I need data to be in the class before the very start
 
Xeo
@KianMayne Constructor?
 
7:15 PM
I want these :)
 
Was anyone of you guys into Lego Technic as a kid?
 
Als
you need data in the class?
 
This was my favorite:
 
Als
or class object?
 
Xeo
7:15 PM
@FredOverflow Guilty.
 
@FredOverflow Me!
 
I remember getting it for Christmas and being the happiest child on Earth!
 
@FredOverflow Never. I was into programming.
 
@Als As in variables that are used all throughout the class that can be different in each instance
 
Als
I didn't I ended up being a geek, with laptop vying for wine, women and money.
 
7:16 PM
I still am...
 
@KianMayne Constructor parameters.
 
I must say that building the Lego Technic stuff was always lots more fun than actually playing with it afterwards. Maybe that's why I became a programmer ;)
3
 
Xeo
class Foo{
int x_;
public:
Foo(int x) : x_(x) {}
};
 
@RMartinhoFernandes Thanks :)
 
Xeo
somehow, that doesnt quite work...
 
Als
7:18 PM
okay I am going to go and have some s....
Bye.
 
@Als Going to get "affected"?
:D
 
Xeo
 
OK Thanks everyone :)
 
Xeo
I hope nobody has a problem with dark humor
 
7:19 PM
@Xeo looks a bit like Stephen Hawking...
 
> "Nonsense, they couldn't hit an elephant at this distance." - Last words of John Sedgwick, in response to a suggestion that he should not show himself over the parapet during the Battle of the Wilderness.
 
Xeo
Yeah, but do you know the original pic?
 
post it
 
Its the pic from an interview with Steve Jobs and Bill Gates
 
@FredOverflow It's a meme.
 
Xeo
7:20 PM
@IntermediateHacker Correct
 
Ah, and Steve isn't visible because of what happened yesterday?
 
Xeo
 
not very funny
 
7:22 PM
Is starting with anything other than brute force not premature optimization?
5
 
@Maxpm lol. @JohannesSchaublitb can I star that?
 
Is writing in C++ premature optimization?
 
@IntermediateHacker WTF do you want to "start"?
 
7:24 PM
I mean star
 
sorry,
Sometimes typos can ruin you...
2
 
That's what happens in NetHack.
 
pubic members.
 
I tend to write everything generically with templates. A case of premature... ejaculation? :)
 
7:25 PM
Gosh, what?
 
Oh dear.
 
@FredOverflow Lol.
 
You know, template wankery and stuff. Lots of angle brackets.
 
Xeo
I need a language that doesn't syntax error on ( . Y . )
3
 
What is that? Boobs?
 
7:27 PM
@Xeo CPlusMinus.
 
8 is my boobs literal
 
No Syntax Errors , just gives weird runtime behaviour.
:)
 
Gosh, what did I start?
 
@Xeo In Haskell, you can have at least ((.) (.))
 
the good thing is, it works just as well for representing a balls literal
 
7:28 PM
did I come in at the wrong time?
 
I'm pretty sure it's not a syntax error in Brainfuck. How appropriate.
 
@JohannesSchaublitb lol
 
@Swati Er, possibly.
Hi, btw.
 
gosh it's 11:30 Already?
Way past a kid's bedtime. I'm off
 
Xeo
@IntermediateHacker No, 21:30 :)
 
It's 21:30 here.
 
3:31 PM.
 
You are 2 hours behind me
 
@Xeo 20:31
:D
 
@IntermediateHacker Then you have two additional hours to write awesome code!
 
7:32 PM
Part of my library will allow users to output colored text to the console. Which syntax is preferable, out of these...?
 
that's depressing. maybe that's why i never wrote awesome code.
anyway i'm off!
bye
 
Foo.TextColor = RED;
Write("This is in red.");
Write("This, too.");
 
Bye :)
 
Write("This is in red.", RED);
Write("This is in the default color.");
@IntermediateHacker Bye.
 
7:33 PM
I prefer stateless.
 
I would put RED as the first parameter.
 
21:35 here. the washingmachine just takes it spin dryer phase.
 
@FredOverflow Putting it as the second allows you to set a default argument, and saves an overload.
 
I would go for two overloads instead.
 
Interesting. I prefer the "source" parameter up front, with modifiers of the source coming after. I use this convention on functions that operate on indices and arrays, as well.
 
Xeo
7:35 PM
@Maxpm The Ragnarok Online Server Emulator eAthena had a nice syntax for this (imho), gimme a sec...
 
@Maxpm +1
 
What about a blend of both, where users can set the default color but get more specific if they so choose?
 
Sorry for the stupid question but just to clear things up
A class when instantiated, will execute the constructor, then will it run main()?
(C#)
 
@KianMayne No. It will execute the constructor.
 
That makes no sense.
 
7:38 PM
@KianMayne Do you seriously think that every time an object is created, the main function is executed? How would that be useful?
 
main() is a free-standing function; it is not a member of any class. It is in the global namespace, and is the "entry point" of a program.
 
@Maxpm With your second version user code can already do auto const write_in_red = [](std::string const& s) { Write(s, RED); };
 
@FredOverflow Good point, like I said, stupid question
 
@LucDanton Good point. IAGNI, I suppose!
 
auto x= [](int x){}; => what is the type of auto here , if i not want to use auto ?
 
7:40 PM
Will there be any difference if I name the primary function in my class main than if I named it something else?
 
Xeo
@MrAnubis something you can't spell out
or std::function<void(int)>
 
@Xeo can you? :P
 
you can write something other than auto for the type of x (not using auto at all, too).
 
Xeo
@MrAnubis No, it's a unique, compiler generated name
 
@KianMayne What do you mean, your class?
C++ is not a pure-OO language.
 
7:41 PM
but then it's not without polymorphism if you want to store the lambda
 
@MrAnubis You can do auto factory = [] { return [](int x) {}; }; decltype(factory()) x = factory(); but that's silly.
 
hm wait, not true entirely
you can do the alexendrescu trick with const ref
 
Xeo
void (*p)(int) = [](int x){};
 
@Maxpm Like I said ^ up there C#
 
If you have a class called Foo, the constructor will be called when you make a Foo; if you define a main() function, it will only execute when called explicitly.
 
Xeo
7:42 PM
would work
 
or rvalue refs
 
Xeo
but only for stateless lambdas
@JohannesSchaublitb I love that one
 
@Maxpm Thanks
 
@JohannesSchaublitb How is that not polymorphism though?
 
Xeo
but what good is it, if it can only be executed in the destructor? :P
 
7:43 PM
@KianMayne NP.
 
@LucDanton because there is no polymorphism
 
@Maxpm Especially for being patient with me :L
 
@JohannesSchaublitb Using something that is not a guard_type or whatever as a guard_type?
 
don't know what to answer
 
Xeo
static void display_title(void)
{
	//ClearScreen(); // clear screen and go up/left (0, 0 position in text)
	ShowMessage("\n");
	ShowMessage(""CL_WTBL"          (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)"CL_CLL""CL_NORMAL"\n");
	ShowMessage(""CL_XXBL"          ("CL_BT_YELLOW"            eAthena Development Team presents            "CL_XXBL")"CL_CLL""CL_NORMAL"\n");
	ShowMessage(""CL_XXBL"          ("CL_BOLD"       ______  __    __                                  "CL_XXBL")"CL_CLL""CL_NORMAL"\n");
hmm
no indent -.-
 
7:44 PM
@LucDanton i meant guard_type &&g = make_guard([]{});
 
Xeo
well, it plays with some weird character codes
 
Right, decltype(make_guard([]{})) isn't going to be guard_type, so that's polymorphism.
 
there is no polymorphism. the dtor called at end of lifetime of g is ~SomeWeirdDerivedClass(), statically
 
@Xeo That's a pretty egregious use of macros, IMO.
 
Xeo
CL_BOLD is "\033[1m" for example
 
7:45 PM
I think that's my updater class done then :D
 
the dtor does not have to be virtual
 
@JohannesSchaublitb Polymorphism means "many forms".
Virtual is just one way to do that.
 
Hm i think it can be argued at length whether it's polymorphism on CS sense tho :)
 
@JohannesSchaublitb std::stringstream foo; /* populate foo */ std::getline(foo, line);
~stringstream() is used at the end of the lifetime, statically.
So, polymorphism.
 
@LucDanton so there is no polymorphism then either
 
7:47 PM
Dynamic allocation != polymorphism.
 
Xeo
@Maxpm Well, I gotta admit, it's also written in C ;)
 
@JohannesSchaublitb std::getline doesn't expect an std::stringstream.
 
@LucDanton yes that part is polymorphism
 
@Xeo Well there you go. I might see it using << operators in C++, but I don't really like that, either.
 
but in the guard example we did not have such part I think
 
7:48 PM
@JohannesSchaublitb You're using an object through a base case that provides a common interface to all derived types.
 
just had a reference binding of a base&& to a derived rvalue.
@LucDanton not at all. I'm not using the reference at all
it just is there to lenghten the lifetime of the rvalue
 
Xeo
@Maxpm Well, actually there aren't any macros in there, if you replace #define CL_BOLD "\033[1m" with char const* const CL_BOLD = "\033[1m";
 
@JohannesSchaublitb Running the destructor counts as using, especially when the destructor does useful work.
 
at the end the dtor call is done not through the reference but directly on the temporary by the compiler
i like the race conditions going on :)
 
The base interface might be struct guard_type {}; but the implicitly generated ~guard_type() is part of that interface.
 
Xeo
7:49 PM
No wait, forget what I said, that won't work for string literal concatenation
 
@LucDanton indeed it is
 
Xeo
So, the color "codes" need to be macros. Well, not that much of a problem, right? ... right? :(
 
you say that this is polymorphism: struct base { }; struct derived : base { void f(); }; int main() { derived d; base &b = d; d.f(); }
but I say it is not
 
Tried BF3 again, but hell, not buying this game, ever.
 
It's polymorphism. The 'implementation hook' might be rules about destructors but that doesn't make it any less polymorphism than using dynamic dispatch or template instantiation.
 
7:51 PM
It's just so much noise it's not fun at all.
 
Just like exception handling is polymorphic when it comes to matching the handler, and so on.
 
first wikipedia sentence says "In computer science, polymorphism is a programming language feature that allows values of different data types to be handled using a uniform interface."
but we do not use such a feature
 
Xeo
C++ chat room pedantism at its finest :)
 
of course if we would use the reference to work with it as a type erasing tool I would agree it is polymorphism (because in the end we would need virtual functions anyway to communicate with the 'boxed' value)
 
lol
 
7:54 PM
Go away!
 
Xeo
@LucDanton No! If @Johannes goes, our walking C++ standard is gone too!
 
im not yet :(
I try hard.
 
Xeo
what? walking?
;)
 
@JohannesSchaublitb You can communicate anything you want as long as you pass it in the constructor and wait for the destructor to run.
 
7:58 PM
indeed. but I communicated it without polymorphism then becasue I did not go over the reference
 
It's true there's only one polymorphic hook but that doesn't make the whole thing any less polymorphic.
 
i did it with a static dtor call
there is no polymorphic hook lol
1
A: In C++, for some type T, how can I obtain a "const T**" from a "T*"?

K-balloT const* x = new T[5]; f(&x); or T *x = new T[5]; f(&const_cast< T const*& >( x ) );

I believe that he needs to use reinterpret_cast instead of const_cast here
 
When writing a namespace extension (System.Security.Cryptography.Extensions), how do I actually put it into the System.Security.Cryptography namespace?
 
double checked the spec. it actually works with const_cast too. very nice
 
Xeo
@KianMayne C++ != C#
 
8:08 PM
@Xeo I know
 
Xeo
Good, do you know in which room you are too? :)
 
@Xeo Yep :L
C# room is just so...inactive
 
I think most people here don't really know much about C#..
Aaarg...
*NULL
 
8:41 PM
@StackedCrooked what you want to know?
 
8:55 PM
If I start a new process (using code from the same assembly) then the starting process gets killed by the new process, will the child stay alive?
 

« first day (355 days earlier)      last day (4576 days later) »