« first day (783 days earlier)      last day (4167 days later) » 

user1182183
1:00 PM
so many options in VS2012 >_>
 
@GamErix Just yesterday someone was talking about getting stack trace in VS12
 
user142019
lol IDEs.
 
user1182183
ye it was in debug> or view>
 
user1182183
searching for it and it was me
 
user1182183
ah call stack -> ctrl+L
 
user142019
1:01 PM
LLDB is the best.
 
@Griwes It was him :S
 
user1182183
 
@R.MartinhoFernandes I thought so, I just wasn't sure of that.
 
@Zoidberg'-- There are no debuggers that are not a complete piece of shit.
 
user1182183
ok I don't see anything that my DLL called? <routeconnectorplugin>
 
1:02 PM
:'(
 
@GamErix it just means that an exception was thrown and caught. It might not be a problem at all
unless the exception is thrown/caught in your code
 
user1182183
@jalf before I attached the debugger the application crashed
 
user1182183
with:
 
user1182183
--------------------------

SA-MP Server: 0.3e-R2
Exception At Address: 0x76F4B9BC Module: (KERNELBASE.dll)
 
user142019
LLDB knows the internal structure of std::vector so I don’t have to dig through layers of base classes and other shit.
 
1:03 PM
go to debug -> exceptions, and make it break on thrown c++ exceptions
 
@Zoidberg'-- VS knows that too.
GDB too.
 
user142019
Awesome.
 
Seriously, that is not a superb feature, it's just par for the course.
 
user142019
@R.MartinhoFernandes since which version?
 
user1182183
@jalf they are thrown :p
 
1:03 PM
@bamboon that's where you park your dreams?
 
user142019
I never had that in GDB.
 
user1182183
but how the hell do I debug a KERNELBASE.dll exception? :/
 
@Zoidberg'-- Dunno. I have confirmation of it on version 7 here: stackoverflow.com/a/2123260/46642
 
user142019
daknok% gdb -v                                                                ~
GNU gdb 6.3.50
 
user142019
My software is obsolete!
 
1:06 PM
@GamErix look at call stack
 
user142019
I’ve never used VS’ debugger, though.
 
user1182183
@Abyx I did
 
user142019
I like how LLDB lets me write arbitrary C++ expressions.
 
user1182183
 
user142019
Anyway, I’m gonna get my ass out of bed and have something to eat.
 
1:07 PM
 
[rmf@persephone ~]$ pacman -Si gdb | grep Version
Version        : 7.5.1-1
[rmf@persephone ~]$
@Zoidberg'-- Very.
 
@GamErix it clearly says std::out_of_range
 
user1182183
@Abyx what could that apply for? ;o it doesn't show any line in my code
 
user1182183
 
user1182183
but I clearly see its from the c++11 runtime
 
user1182183
1:09 PM
so it's my application?
 
@GamErix Seems to come from RouteConnectorPlugin
the kernelbase stuff is just for throwing/handling the exception
 
user1182183
ok set a few breakpoints, maybe I can narrow down to a few lines of code
 
and if you right click on it, you can load debug symbols for kernelbase so you can get a bit more info about where it happens
why don't you just make it break when the exception is thrown?
 
user1182183
I break and it takes me to throw.cpp from MS
 
user1182183
:P
 
1:11 PM
@jalf it's implementation of RaiseException function
 
... and then you view the call stack, and select the frame below it
and the frame below it, and the frame below it... until you get down to your code
 
user1182183
wait now it does work :o
 
user1182183
too many executions and it crashes..
 
user1182183
grrrr
 
user1182183
can global variables be the problem? (but they're used ONLY in one thread)
 
1:14 PM
why don't you just press F1 and read all the stuff there...
 
@jalf rather my nightmares
 
Hi. I need to create one conditional variable for each thread I create. Since the number of threads are given by command line, is it possible to create the conditionals variables dynamically?
Something like an array of conditional variables...
 
user142019
What is a conditional variable? A variable that holds a Boolean?
 
@Favolas do you mean condition variables?
they can be created like anything else, sure
 
user142019
If you want a variable that is local to each thread, use the thread_local storage specifier.
 
1:26 PM
@jalf and ohters. Yes. condition variables. They should be global to all threads
I was think something like
pthread_cond_t *cond_variable
than, in main, malloc with the size on number of threads...
 
gawd, that sucks. How did you guys download visual studio 2012?
 
@bamboon torrents
 
user142019
Using a torrent.
 
Xeo
@bamboon From MSDN, if the Desktop Express version suffices.
 
@Xeo actually, I have to check the differences between pro and desktop.
 
user1182183
1:38 PM
what should I do when a concurrent queue .... locks?
if(QueueVector.try_pop(RecievedData)) ..
 
user1182183
forever
 
user1182183
like I called push to many times? O_o
 
@GamErix what do you mean by locks? blocks?
 
user1182183
@bamboon try_pop always returns false in the second thread after a few pushes from the first thread
 
@GamErix that should actually indicate that your queue is empty
 
user1182183
1:41 PM
hm
 
user1182183
the push doesn't work?
 
user1182183
oh yeaunsafe_size returns 0
 
user1182183
woot
 
user1182183
playerid is somehow 123456748937284
 
user1182183
when joining the server XD
 
user1182183
1:43 PM
imposibru as max is 1000, :o out of bounds error
 
user1182183
well then I have to compile my plugin in no_hooks mode
 
@Favolas they don't need to be global, they just have to be shared between the necessary threads
Visible to multiple threads != global
 
user142019
Use message queues if you want to communicate between threads.
 
Namaste
 
meh
database failing to connect
suckage
 
1:53 PM
can somebody try to run this on MSVC? ideone.com/Ccsdey
 
user1182183
@bamboon in VS2012, C console application?
 
@GamErix errm, C++ yes
 
user1182183
just a sec
 
user1182183
just an empty console window
 
user1182183
int _tmain(int argc, _TCHAR* argv[])
{
std::launch::async | std::launch::deferred;
while(true){}
return 0;
}
 
1:56 PM
so it obviously compiles
then it's definitely a bug in clang/libc++, thanks.
 
user142019
@bamboon std::launch::async | std::launch::deferred;? Why such a useless statement? It does nothing.
 
user1182183
@Zoidberg'-- don't ask me, I just helped someone ;)
 
@Zoidberg'-- because clang/libc++ has a problem with it. That's just minimal compilable example
 
user142019
oh. wat.
 
you can add some std::async stuff if you want sense ;)
 
user142019
2:05 PM
I’m learning about integrals.
 
user142019
 
user142019
What does dx mean?
 
user142019
Wikipedia is being cryptic as always.
 
integrate over x?
 
dx - very small bit of x
 
2:06 PM
Integral of the function f over the variable x in the interval [a, b].
 
and big S is the sum of all small bits of x
 
user142019
Oh okay, so I could’ve also written \int_a^b f(y) dy?
 
No.
That is meaningless.
@Zoidberg'-- Oh, if you keep the integral sign, yes.
(AFAIR, the d-something parts cannot show up alone, unless you are a physicist)
 
Nice bug. 2 points if you spot it.
 
user142019
Oh okay.
 
2:08 PM
@StackedCrooked ?
 
user142019
I have also seen something like this (IIRC):
 
user142019
 
dy/dx can show up
 
user142019
Or is that incorrect?
 
@bamboon Fixed.
 
user1182183
2:09 PM
ok I think I just have to rewrite ALL THE SHIT in my plugin and remove the fucking sampGDK which is just problems.
 
user1182183
Hey guys do you know anything about calling not-exported functions from a parent process from a DLL
 
@R.MartinhoFernandes I remember being taught some mathematical manipulation of infinitesimals. Not very interesting stuff, it mapped to linear algebra I think.
 
user142019
@StackedCrooked “1 objects” should be “1 object”.
 
@Zoidberg'-- Nice :)
That doesn't explain the segmentation fault though.
 
user142019
So? It is a bug so I get two points. :D
 
2:12 PM
Sigh ok, here you are: +2.
 
user142019
37
A: New users can't create new tags: show a singular or plural message?

Jeff Atwoodhttp://twitter.com/codinghorror/status/1165936105 Dear Next Person Who Opens a Pluralization 'Bug', I will personally come to your house and bludgeon you to death with a giant S But not you. I like you. You're nice.

 
@LucDanton I was taught Weiertrass calculus :/
@StackedCrooked Order of destruction of bases?
 
user142019
@StackedCrooked I don’t get a segfault on my machine.
 
@R.MartinhoFernandes Order of destruction of function-local statics.
 
Oh, the LeakChecker is not the inherited one.
 
2:15 PM
Silly me, the std::set didn't need to be static.
 
user142019
Here is valgrind’s output: gist.github.com/4233504.
 
Now I wonder, can I do something similar for detecting access to destroyed objects?
 
@R.MartinhoFernandes I think construction is problematic, can't downcast this.
 
@LucDanton Downcasting this is not allowed? Ah, in constructor.
 
Ya. I don't think dynamic_cast<void*>(this) helps either, it's conceptually the same operation I would think.
 
user1182183
2:20 PM
hm could anyone help me with a "troublesome" (for me) extern call to a function?
 
tl;dr make Checked accept a T* in its constructor.
 
lol, of course it is.
 
Small mistake.
I'm storing string, lol. That will be a set of one.
I could also pass typeid(this) to the base constructor.
But that's a little more intrusive.
 
user1182183
if the main program has this and I am not able to edit it, can I from a DLL, call that pNetGame->GetPlayerPool()->GetAt((BYTE)params[1]);?
 
hello there
 
user1182183
2:23 PM
if I know what pNetGame is defined as?
 
@StackedCrooked Um double check that as well.
 
Oh, just read your previous comment.
If Checked already takes T* in its constructor, then I don't need to pass any more type info.
I should probably think a little more before speaking.
 
Anyway 12.7 has some nice examples.
@R.MartinhoFernandes I'd search more to freshen up on those things (can't remember if I did some myself or not), but I think this laptop is melting.
 
mawnin
 
mawnin
 
2:30 PM
__TIME__
 
@Abyx Oh you!
 
meh
whatever, it's mawning for puppy
so I said mawning
 
it's always mawning for puppy
 
user142019
spawning puppies
 
user142019
They see me parallelizin'. They spawnin'.
 
2:39 PM
lol
lol
 
user142019
lol
 
that would imply that puppies do work
which as everyone who knows me will tell you, is certainly not true
 
user142019
They fuck each other and then they spawn new puppies.
 
user142019
I can finally do internet banking. Now I can buy shit online.
 
@Zoidberg'-- oh gawd, what era have you lived in?
 
2:44 PM
16 year old era.
 
user142019
I’m gonna work on Hexapoda again.
 
user1182183
well to not spam this chat I have made a question :p -> stackoverflow.com/questions/13765362/…
 
user1182183
any suggestions on how to improve my question?
 
burn the sample code with FIRE
 
user142019
@GamErix needs more goulash.
 
2:48 PM
lol, BOOL
BOOOOOOOOOOOL
 
user142019
Make your bracing consistent.
 
m_ is not hungarian notation, btw.
 
user142019
pFoo is
 
user142019
Brace yourselves. But do it consistently!
 
user1182183
;p
 
user142019
2:53 PM
user image
5
 
user1182183
@Zoidberg'-- I think you can't just add food to a question :P
 
user1182183
Or is that how most fat people get fat?
 
user1182183
anyway, is that question I posted answerable, or is it imposible?
 
user142019
Oh cool I still had the Hexapoda logos for 404 and 500 pages.
 
3:21 PM
Can I access the base members through a derived class without creating a pointer?
why does Derived d not give me access to it's base members?
 
> One of the major advantages of free software is that the community protects users from malicious software.
Ahaehaehaehehahehahaehhaehae
I don't really have to read further
Oh wait, I did, it gets even more hilarious
 
> Once in a while, users who know programming find that a free program has malicious code. Generally the next thing they do is release a corrected version of the program; with the four freedoms that define free software (see gnu.org/philosophy/free-sw.html), they are free to do this. This is called a "fork" of the program. Soon the community switches to the corrected fork, and the malicious version is rejected.
He's really out of touch with reality, isn't he
 
@R.MartinhoFernandes well it's definitely annoying to have amazon ad's all over my dash panel..
it was the first thing I removed...
 
who's that?
 
user142019
3:23 PM
@TonyTheLion Private inheritance? Shadowing?
 
@Zoidberg'-- I can't change the inheritance
and I don't know what shadowing is
 
user142019
RMS? Radek Marvelous Slupik.
 
@TonyTheLion What
 
@Zoidberg'-- Seriously, you don't want to be RMS.
 
3:23 PM
Code
 
user142019
@R.MartinhoFernandes I agree. I don’t want a beard made of parentheses.
 
@CatPlusPlus Yes, he is. The guy is completely mad. When he came to my university for one of his preachings, it was a mess.
 
> by promoting Amazon, Canonical contributes to them.
 
user142019
@TonyTheLion if it is private inheritance you can only cast to superclass using a C-style cast (and only using pointers I think, but casting is a hell).
 
In other news, people want money
 
user142019
3:25 PM
@TonyTheLion Anyway, explain what you want. Example?
 
> Most free software developers would abandon such a plan given the prospect of a mass switch to someone else's corrected version.
Ahahahahahahah
As if majority of Ubuntu userbase knew what they were doing
 
user142019
I’m a free software developer and I don’t give a fuck about what people do with software.
 
class Base { /* lots of public member functions */}; class Derived : public Base {} Derived myDerived; myDerived.myBaseMemberFunction();
 
user142019
And I don’t give a fuck about whether software is free software or not as long as it does the job and has a decent UI.
 
this is what I want
is that possible?
 
3:27 PM
1
A: pointers difference between c and c++

R. Martinho FernandesYou can fix both of them by using the correct types: char const* c = p + 6;

 
> Any excuse Canonical offers is inadequate; even if it used all the money it gets from Amazon to develop free software, that can hardly overcome what free software will lose if it ceases to offer an effective way to avoid abuse of the users.
 
Seriously, WTF.
 
@TonyTheLion No.
 
user142019
@TonyTheLion wait.
 
Everyone is suggesting a frigging cast.
 
3:27 PM
Private inheritance is equivalent to private composition.
 
@R.MartinhoFernandes, and a static_cast at that? O_o
 
it's meant to be public inheritance...
lol
 
user142019
@TonyTheLion you can cast to private base class using a C-style cast, but you don’t unless you’re stupid.
 
@Zoidberg'-- look! It's not a private base, it's public!!! I changed it!
 
Then it should work if that member function was public in the base class.
> C++ is strongly typed, C is not.
 
user142019
3:29 PM
So, Tony, is this what you want?
 
user142019
class Base {
public:
    void foo();
};
class Derived : public Base {};
Derived myDerived;
myDerived.foo();
 
user142019
Because if that doesn’t work, I’m losing my faith in C++.
 
@TonyTheLion Congrats on the promotion.
 
@CatPlusPlus Also, this fucking quote ahahaha
 
This is the kind of question where I just drop a zillion downvotes and recover the rep lost by posting the right answer.
3
 
3:30 PM
@Zoidberg'-- yes
 
HOW DARE YOU EARN MONEY'
 
user142019
@TonyTheLion well that should work.
 
Oh hey, chat notified me that I replied to myself
 
my compiler has lost it
 
@CatPlusPlus Come on, do you really need to be laughing at RMS?
 
user142019
3:30 PM
@TonyTheLion but beware of polymorphism issues.
 
Thanks chat, I wouldn't know
I don't need, but I want
 
oh it's silly intellisense
FUCK intellisense
srsly
 
user142019
Use SublimeClang!
 
@TonyTheLion, I hate it when it does that.
 
@CatPlusPlus You are better than this.
 
3:31 PM
I was just about to point out that it works on GCC 4.7.2.
 
Never trust Intellisense errors
They're pretty much useless
 
IntelliSense is a joke.
 
joke is IntelliSense
 
@R.MartinhoFernandes Okay, let's laugh more at people answering that question
 
IntelliSense almost ruined my life
 
3:33 PM
Odd thing about IntelliSense; it felt miles ahead when it appeared, now it feels badly implemented and outdated.
 
I guess it saves you from silly mistakes before recompiling, but it does act up sometimes. You kind of have to learn where it messes up.
 
user142019
I don’t use inferior tools.
 
Qt Creator's Intellisense seems to be improved in version 2.6.
 
C++ is not strongly typed. — Cat Plus Plus 6 mins ago
@CatPlusPlus Your comment made me think of that article.
 
user142019
If you need something as “IntelliSense”, the language is flawed.
 
3:35 PM
Most notably, this part.
> "Weakly typed" means "this language uses a type verification system that I find distasteful", and "strongly typed" means "this language uses a type system that I find attractive".
 
When using Qt Creator my windows appear with "old" style on Win8, is this normal?
 
@EtiennedeMartel "Way, dude." is one of the best lines Eric ever wrote.
 
Meh, this is a valid characteristic of a type system
That people don't grasp the difference is not my problem (TM)
 
sbi
Hey, robot, do I see you tonight?
 
3:36 PM
FWIW my definition of weak type system is "a type system with implicit conversions"
One where type of a value can change without you explicitly requesting it
 
@sbi Sorry, I have the office party tonight.
 
@CatPlusPlus Like non explicit constructors?
 
sbi
@R.MartinhoFernandes That's what I'm talking about, dude!
 
user142019
3:38 PM
Weak typing is annoying.
 
Did not know you were coming.
 
user142019
I’m looking at you, PHP and JavaScript, and to a lesser extend, CoffeeScript.
 
sbi
@R.MartinhoFernandes Good.
@R.MartinhoFernandes Traditionally, they invite old employers. The boss is very generous in that regard.
 
@sbi But you never worked for this company ;P
 
sbi
3:39 PM
@R.MartinhoFernandes One of the guys you work with was my trainee once.
 
C++ is weakly typed. Python is for the most part strongly typed (because it has bool coercion). Haskell is purely strongly typed.
 
user142019
Bash is one of the few languages I know that hasn’t got a crappy type system. Because it has no type system.
 
It does
There are arrays
And strings
And sometimes numbers
 
user142019
Ruby is also strongly typed, I think.
 
3:41 PM
Tries to be witty => Turns out is just ignorant.
 
user142019
Bash has arrays? Ohlol
 
Ruby I don't know
Probably yes
Though it's likely to do bool coercion as well
 
user142019
nil and false are false, the rest is true.
 
user142019
That may be the only weak part of it.
 
user142019
Oh and string interpolation calls .to_s, but I consider that explicit.
 
3:42 PM
Oh it's definitely not the only weak part of Ruby
Okay, battery is over, time to go home
 
user142019
PHP is almost as terrible as Java.
 
@Zoidberg'-- Hey hey hey I heard that.
 
user142019
PHP is at least hilarious. Java is just sad.
 
@Zoidberg'-- What makes it "hilarious"?
 
user142019
All the inconsistencies and bad design decisions.
 
3:44 PM
baaah
 
user142019
All the bad design decisions, i.e. all the design decisions.
 
isn't the difference between PHP and Java that Java has design decisions?
 
user142019
After a few weeks of Java in school, I’ll crave PHP.
 
"Thou shalt not overload thy operators"
 
thine?
 
3:47 PM
No idea. I just pick something random that sounds like archaic English.
 
user142019
Arabic English.
 
sbi
@Neal you a sheep?
 
> From Middle English thi, thy (“thy”), apocopated form of thin, thyn, thine (“thy", also "thine”),
@jalf Apparently "thy" is the apocopated form of "thine".
 
@sbi not that I know of...
 
@R.MartinhoFernandes ah, ok
 
user142019
3:49 PM
I need a central message queue for IPC over a network.
 
@jalf I guess I speak apocopated Middle English, while you speak regular Middle English.
 
I'll just pretend I know what apocopated means
 
@jalf It means "cut off".
It is used when a word loses some sounds at the end.
 
so the apocalypse is when the world gets cut off?
 
@Zoidberg'-- Yea all they taught in my later years of college was Java... twas terrible...
 
3:50 PM
lol
 
@jalf Nah, apocalypsis in Greek means "revelation".
It got associated with the end of the world because of the Book of Revelations from the Bible, which describes the end of the world as seen by John in Patmos.
 
did you read Wikipedia entirely?
 
No, but I have read some portions of the Bible.
 
oh right
 
@R.MartinhoFernandes You poor bastard.
 
3:55 PM
What?
 
@R.MartinhoFernandes what a strange thing to do ;)
 
It's books.
 
0
Q: C++: *((SomeType*) 0 )?

nonot1I've come across this syntactic construct a few times, and I'm wondering: What does this do? What might the design reasoning be? It tends to look something like this: struct SubType : public SomeSuperType { SubType(int somthing) : SuperType(something), m_foo(*((FooType *)0)) {} ...

seems invalid
this construct
 

« first day (783 days earlier)      last day (4167 days later) »