« first day (754 days earlier)      last day (4199 days later) » 

11:08 AM
1
Q: C++ pointer to objects

Tony The LionIn C++ do you always have initialize a pointer to an object with the new keyword? Or can you just have this too: MyClass *myclass; myclass->DoSomething(); I thought this was a pointer allocated on the stack instead of the heap, but since objects are normally heap allocated, I think my the...

5
I can't believe I ever asked this question
 
std::bind should work with any callable object, including a __stdcall function pointer
 
I'm lolling at myself
 
@TonyTheLion I was about to say, I thought it was a bit below your level.
 
yes, I didn't think I was ever that stupid.
I probably hadn't read a C++ book back then.
 
@Telkitty watch out for the trap where you need 'negative people' to challenge you. If pushed far this could render you 'borderline' in that you still let others dictate your life, even if it means you actively try to disprove them ...
 
11:11 AM
@TonyTheLion lol, that's going to be starred a lot, it seems.
 
@R.MartinhoFernandes but why? :P
 
viral
 
@TonyTheLion Erm, because that's what happens when someone posts "I suck." or similar.
 
I should tweet it "This just in: asked by Lounge<C++> member"
 
This is like "I suck." in link form.
 
11:13 AM
@R.MartinhoFernandes lol
 
and that shit always gets starred to hell
 
pretty terrible question, I admit. I should have read a book or something
 
@DeadMG Yeah. It seems we're very proud of the suckage of our regulars.
 
user1804599
hello
 
11:23 AM
meh I crashed SQL server
 
@TonyTheLion wut. What version? What are you guys doing? C# Stored procedures/functions?
 
SQL Insert
statements
2008
 
@TonyTheLion ouch.
 
What does "Ggfs" mean?
 
11:28 AM
According to google: acronymfinder.com/…
 
It looks like someone randomly pressed keys on the home row.
 
user1357851
I used to troll on certain forums then blame my cat for the rambling
 
What a surprise
 
user1357851
like my cat liked to sleep on the keyboard
 
user1804599
Who doesn't?
 
11:30 AM
"I have a code that .." MASS NOUNS. LEARN THEM.
 
user1804599
Except you get the plastic cubes poking in your eyeball.
 
@user1804599 sleep less, get deep receding sockets. Profit
 
user1804599
Is it usual that C++ questions are bad on Stack Overflow?
 
@R.MartinhoFernandes Well, we had to be, ever since people other than me started being regular here :)
@user1804599 Define "bad"
 
@user1804599 Erm... I'd give an example... but that would be sarcasm and cynical at the same time
 
11:33 AM
@DeadMG Yeah, right. You are one of the most featured in these suckage starfests.
 
You can try inline assembly. — Code-Guru yesterday
 
user1357851
This room has the highest concentration of people who use animal or anime as their avatar
 
only because suckage for me is so rare, I like to announce the special event.
 
user1357851
maybe this room only attract certain type of people :x
 
@DeadMG Ok, nice save.
 
11:34 AM
thank you
 
@Telkitty Erm. Hint. This is not a forum
 
0
Q: why semi-colon was chosen to end a statement?

JayWas it because while typing, semi-colon appears under little finger when hands are positioned in default psotopn to say - with index finger on F and J? Or is there anything more substantial?

Wow. Just wow.
 
user1357851
@sehe happy now?
 
user1804599
@sehe People don't use RAII, use singletons, etc. Maybe not the questions themselves are that bad, but especially the code given in the questions. Of course, this isn't true for all questions.
 
@Telkitty AFAIK, it also has the highest concentration of robots.
 
user1357851
11:37 AM
@user1804599 a lot of threading are RAII
 
@user1804599 Of course it's common. 90% of everything is shit, and that includes C++ code.
 
user1357851
@R.MartinhoFernandes maybe we can make robot supermodels
 
When I get to 10K rep, I'll try a C++ troll question. A couple of pages of unformatted C with just one line if identifiable C++, all riddled with complex array/pointer arithmetic. All vars will be i,j,k etc. The title will be 'Doesn't work, can't be bothered to debug it - please fix it for free so I can get paid'.
 
@MartinJames Bonus points if that line involves something like *new Foo().
 
user1357851
mixing of c & C++ is normal
 
11:38 AM
Oh, don't worry - there wil be plenty leaks and UB 'cos uninitialized pointers:)
 
user1804599
Where typedef void (*Foo)(void);. :P
 
@Telkitty If you're a moron.
 
Oh, gawd, you're evil.
 
normal people write C++ and call C code, they don't mix C and C++.
 
If you want something only mildly interesting
 
user1357851
@DeadMG talking from my own commercial experience, developers who converted from C background tend to do this
 
i want to run bluestacks app player which needs 1 gb ram which i dont have is there anyway to run it
 
user1804599
You don't have 1 GB of RAM? Is your computer from the 80's?
 
good point ^
 
user1804599
11:41 AM
Also virtual memory.
 
Okay, got that strided iterator to work. And iterating over a strided forward range is only quadratic, yay! It sucks!
 
@LucDanton Holy.
 
user1804599
user1804599 is boring, I need a username.
 
user1357851
int len = strlen(str);
 
user1357851
11:42 AM
not common?
 
What about size, btw? If I stride a strided range, do I get exponential size increase? Linear? Constant (i.e. none)?
 
user1357851
malloc a struct
 
strided iterator?
 
@R.MartinhoFernandes Whoops!
 
user1804599
@Telkitty in C++ you use std::string::size.
 
user1357851
11:43 AM
strncpy in C++
 
@LucDanton Haha, exponential?
 
user1804599
@Telkitty std::string::string(std::string const&)
 
@R.MartinhoFernandes Yeah.
 
@DeadMG Iterates in strides. Like, getting every 5th element.
 
@R.MartinhoFernandes it didnt work
 
11:44 AM
Not sure if serious.
 
On the other hand for random-access it's all O(1) so.
 
not sure if srs
 
user1357851
how not often is c_str used in C++
 
All day errday
 
11:44 AM
@R.MartinhoFernandes Hmm. Not sure why you'd need quadratic complexity or non-constant time for that.
 
^ 90-s style hierarchy definition
 
@Cheersandhth.-Alf what the fuck
 
user1804599
@Telkitty when you need to interface with a C API.
 
@Telkitty Unless interoperating with legacy code, not often.
 
never unless interoperating with legacy code
 
11:44 AM
@DeadMG I went for correctness. Boundary conditions are fiddly.
 
That's about the best I can do, as long as msvc insists on crashing for c++11 features
Is there some better alternative?
 
user1357851
@DeadMG then you have not experienced enough systems
 
@Telkitty Yes, bad code exists. We know that.
 
I think I'll investigate an (previous iterator, offset to next) pair now.
 
user1357851
legacy code is EVERYWHERE
 
11:45 AM
or the people coding your systems simply sucked
 
@user1804599 In fact the number is quite nice. 1804599 -> [180][45]99 -> 9999 -> 6666 hidden satanic number :)
 
user1357851
lol new comanies generally dont have legacy code
 
user1357851
but not everyone works for startups
 
i want to run bluestacks app player which needs 1 gb ram which i dont have is there anyway to run it
 
Is that a bot stuck in a loop?
 
11:46 AM
@Cicada goad moaning
@Telkitty but it's going NOWHERE
 
@Telkitty Yeah. The trick is not writting any more of it.
 
@R.MartinhoFernandes No, that's an ignore button not properly pressed
 
user1357851
@DeadMG I worked for 8 companies as software developer including 2 professional jobs in uni not everyone used legacy code but many do
 
gud merning
 
oh hi
grasshopper
grace hopper
:D
 
11:48 AM
such sophisticated french punning
 
She's not graceful. She's rather blunt.
 
Rear Admiral Grace Murray Hopper (December 9, 1906January 1, 1992) was an American computer scientist and United States Navy officer. A pioneer in the field, she was one of the first programmers of the Harvard Mark I computer, and developed the first compiler for a computer programming language. She conceptualized the idea of machine-independent programming languages, which led to the development of COBOL, one of the first modern programming languages. She is credited with popularizing the term "debugging" for fixing computer glitches (motivated by an actual moth removed from the compute...
 
@Telkitty Meh. There's a big difference between "I have a C codebase and a C++ codebase which interoperates with that" and "I write C in C++"
 
Just in case someone is not aware, we are not in the nineties any more. Actually we not even in the naughties any more.
 
user1357851
you write whatever works and can get done in the shortest time most of the times
 
11:50 AM
Yeah, right.
 
user1357851
you dont get paid bonus by writing the most beautiful code
 
i just thought all the << are ugly
 
user1357851
sad life
 
Often enough "whatever works" doesn't quite work. That's the sad part.
 
Those things don't always contradict
It's all perception and appreciation
 
Tek
11:51 AM
Hi guys, I have a quick question. I'm new to C++ and I'm practicing reading the sound data from a wav file. I finally was able to output the values, can someone explain to me how exactly I'm supposed to know what data is left and right channel? Here's a screenshot. http://localhostr.com/files/rQE2ToU/wavplayer.png

I tried reading the wav specification but I can't find a reference of that anywhere.
 
user1357851
@R.MartinhoFernandes lol true even for GUI when you have enough buttons and input/outputs
 
@Telkitty so you don't use strlen, since it will break if your string contains NULL chars
 
user1357851
if (str)
 
@Tek Not C++ specific. Read up on PCM and RIFF
 
user1357851
11:52 AM
int len = strlen(str);
 
@Telkitty I don't get paid to suck valuable time from my coworkers either.
 
Tek
@sehe You're right, thanks.
 
user1804599
@Telkitty ugh. boost::optional<std::string>.
 
user1804599
@Telkitty as I said, use std::string::size.
 
@user1804599 Or in some cases if(!s.empty())
 
user1804599
11:53 AM
@sehe there is a difference between an empty string and NULL/nullptr.
 
hm, eric johnson knows how to play
 
@sehe It will break more spectacularly if it does not contain one.
 
user1357851
yes empty could be '\0'
 
@R.MartinhoFernandes true enough
 
user1804599
@Telkitty if ("\0") is always true.
 
user1804599
11:54 AM
I think you mean if (*str)?
 
And most important... why the heck would you want to recompute a known value?
 
@user1804599 You'd think I knew. I edited before you said so. Also, to the asker: there is a difference between a NULL string and a NULL character in one
 
user1804599
@sehe I blame network latency.
 
@user1804599 Note the difference between '\0' and "\0".
 
What. The. Fuck.
0
Q: Can anyone deprecate this hash function?

sameer karjatkarunsigned hash() { const unsigned size = num ; // usually 2 unsigned hash_value = ((m_namespace_id)^(m_namespace_id<<18)^(m_type_id<<2)^(m_type_id<<16)); // m_namespace_id = 0 and m_type_id = 1 for (unsigned i = 0; i < size; ++i) { hash_value = hash_value^(hash...

 
11:57 AM
@user1804599 so you changed your gravatar to something sensible, what about your username?
 
user1804599
@Griwes I am aware of that.
 
user1357851
someone needs to upvote me somewhere
 
@R.MartinhoFernandes there was an unexplicable (? for me) edit to the "C++ Idioms" wiki book. Do you any idea why this would make sense? en.wikibooks.org/wiki/Talk:More_C%2B%2B_Idioms/Address_Of
 
user1357851
20 reputation is quite sad
 
user1804599
@TonyTheLion I changed it but it doesn't show up here.
 
11:57 AM
@user1804599 takes a while sometimes
 
user1804599
I guess so.
 
@TonyTheLion Aha. You reload the page too often!
@user1804599 nice gravatar. Fit right in
 
user1804599
Haha thanks. :P
 
@user1804599 (reload fixes it - is caching on the client)
 
11:58 AM
@sehe I don't see a reason, no.
 
@sehe didn't fix it on mine
 
This hash function is now deprecated. — sftrabbit 1 min ago
lol
 
@Telkitty Then do something worth upvoting.
 
user1804599
@sehe the source code of this page tells otherwise.
 
user1357851
@DeadMG I am sure this forum works on the buddy system, I just need enough buddies. Then I can get enough reputation with no skills :x
 
user1357851
12:01 PM
:D
 
erm nope
 
absolutely not
 
and the puppy is definitely not going to "buddy" with you
mark my words ^
 
rofl
 
@TonyTheLion What do you mean?
 
user1357851
12:02 PM
lol afk
 
@R.MartinhoFernandes I mean what I say. He's not going to buddy up with @Telkitty to get him some rep where it's not due
 
if anything, I'd take great pleasure in downvoting him
 
@sehe who's doing that wiki? i browsed up, then down, into virtual constructor section. old, tr1, and not covering covariance properly. nor centralized implementation.
 
@Cheersandhth.-Alf it's a wiki, you should just be able to edit it
 
user1357851
err I need to stop chatting. BTW if you down vote me I might not be able to get in chats coz chats requires 20 reputation
 
12:05 PM
Don't give him any ideas.
 
user1357851
which means ... you get it
 
but then that would mean you'd actually get some work done :P
 
user1357851
true
 
user1804599
I cannot downvote anything.
 
user1357851
Sounds like you just tried :x
 
user1804599
12:06 PM
I tried yesterday.
 
I can downvote you
you need a certain amount of rep before you can downvote
I think its 100 or so
 
@Telkitty So... tempting...
 
user1804599
125.
 
user1357851
I wonder whether I can buy 1k reputation on fiverr
 
no
 
user1357851
12:08 PM
half of my 10k twitter followers I bought with $15
 
user1804599
@Telkitty by is a preposition, an adverb or a noun. It is never a verb.
 
@Telkitty wat
why?
 
user1357851
promote my apps :D
 
I think that is the biggest waste of $15 I've ever encountered
 
12:09 PM
@Telkitty to... the people (well, empty dummy accounts) that were paid to follow you...
I'm sure they buy a lot of your apps
 
user1804599
@jalf Let's flag them all!
 
user1182183
@DeadMG what's that prisoner game you played [name]? I'm bored
 
let's not flag anything
 
user1357851
It is like to get your friends and family to visit your newly opened restaurant when people see a lot of people, they come in and try themselves :x
 
@Telkitty yes, because I'm sure a lot of people pay attention to the number of twitter followers you have....
 
user1804599
12:11 PM
If you buy followers it indicates how dumb and naive you are. It's like buying links to increase your PageRank.
 
so did it work? How much did it boost your sales?
 
@jalf are you knocking this person's promotion strategies into the ground?
 
@TonyTheLion yup
 
user1357851
thats what I am trying to find out
 
user1357851
in the long run
 
user1357851
12:12 PM
maybe
 
@jalf What does that achieve exactly?
 
user1804599
Rather than buying followers, tweet something that is interesting and people will actually like your product rather than flag the fake accounts.
 
user1357851
people don't simply download your apps the 1st day your get 25k followers
 
I never really quite 'got' twitter
 
user1804599
@Telkitty guess what: they never will.
 
12:13 PM
@Telkitty in the long run it doesn't matter because you're going to get plenty of twitter followers anyway if what you're doing is any good. It's the short run that's interesting. Does having those 10k followers now make a difference?
 
me neither, that's why I don't use it
 
user1357851
I dont use facebook or twitter for personal reasons but only for my apps
 
user1357851
but I heard they are the best way for advertising
 
@Telkitty wait... wut?
 
@Telkitty If they don't do it because you have 25k followers today, why should they do it because you have 25k followers next year?
 
12:13 PM
I thought you paid money to have 10k followers on Twitter?!
 
@TonyTheLion are you knocking this person's promotion strategies into the ground? ;)
 
user1804599
I always need to laugh when people beg me not to unfriend them on Facebook because they would have “one less friend”.
 
user1357851
@TonyTheLion rephrased it read above
 
@jalf no I was trying clarify something I didn't understand.
 
user1804599
I mean, if you don't want me to unfriend you then stop posting bullshit.
 
12:14 PM
but now it's been edited, it makes more sense
 
I can't think of a better promotion strategy than to have an empty, unused twitter account followed by 25k empty unused and paid-for bot accounts
 
user1182183
@user1804599 Whoa look out, badass alert, "you blocked me on facebook, now you're going to die".
 
@GamErix Prison Architect.
 
user1357851
@jalf I started with paid, then accumulate 'volunteers'
 
user1182183
@DeadMG thank you :)
 
user1804599
12:16 PM
@Telkitty stop thinking that people care about the amount of followers you have.
 
user1357851
looks like I dont but you do
 
user1357851
besides its only 15 dollars
 
user1357851
thats hardly 10% of the $ you can lose on the sharemarket overnight
 
user1804599
@Telkitty You waste $15 while African children are starving.
 
user1804599
I hope you will be starving one day and beg for $15.
 
user1357851
12:18 PM
I am not a slave to money
 
Oh we've got a bad troll in here.
 
user1357851
money helps me to achieve my goal
 
user1804599
THEN Y U WASTE IT
 
@Cicada talking about yourself? :P
 
@Telkitty except that you said you were unable to measure a difference in downloads/sales, so you don't know if it helps you to achieve your goal
 
12:19 PM
@TonyTheLion I was so not expecting that at all.
 
Bad troll in the sense that he is awful at trolling or in the sense that he is a good troll?
 
Yes.
 
user1804599
> implying male troll.
 
Good troll in the sense that he is good at trolling or in the sense that he is a bad troll?
 
12:21 PM
Yes! I already answered.
 
that's not an answer
read the question
 
It is.
Quesitons!
 
user1357851
@jalf if you have spend that much time developing apps you might as well spend $100 on PR
 
Also, Necro with condition damage build is so imba on GW2.
 
@Cicada worked well in gw1
 
12:22 PM
@Telkitty missing the point. if you spend $100 on PR, then you might as well track whether it makes a difference
 
@Cicada I don't have fun with it though :(
 
no, not "might as well", "absolutely should" because anything else is absurdly dumb
 
user1804599
@Telkitty is it a mobile app? If so, why don't you just make an app that rocks and have it appear in the featured section of the App Store/Android Market?
 
@LucDanton What's your build?
 
I'm trying silly stuff like stacking power and stabbing things.
 
12:23 PM
what if it makes a negative difference in sales? And you keep spending money on it because you think it's the cool thing to do, and because you don't even bother to check the effect of your PR?
 
user1804599
People won't buy crappy apps, no matter how many followers you have.
 
user1357851
@Aardvark because there are 34485374 apps out there trying to do the same thing
 
Ah no, you have to stack bleeds and stuff like that.
And people die and they can't do anything and they're sad.
 
user1804599
@Telkitty then make an app that is unique and that doesn't do the same thing.
 
You can stack bleed condition in gw2?
 
12:23 PM
@Cicada With power? I think not.
Also anyone can remove conditions.
 
@LucDanton Wat.
 
user1357851
@jalf it is a bit hard when you doing all the things at the same time hard to measure what is noise what is real information
 
Yes, but at the speed I put them, you just can't remove them fast enough.
 
Step one: kill the condition damage necro. Step two: remove conditions.
 
user1357851
@Aardvark but people needs to know that app yeah?
 
12:25 PM
@Telkitty So? You're saying you should just throw your money away because it's "a bit hard" to determine what it is worth spending your money on?
 
user1804599
@Telkitty if it is new and unique, it will be easier to advertise it.
 
so we have an Aardvark now, our Zoo is slowly getting more complete :)
 
In that case, I've got a much better idea. Send the money to me. I'm sure it will drive up sales
 
user1357851
anyways when my app was out it was the first to such a thing, but pity I did not polish it enough
 
@Cicada I don't know how to put it in a nice form. But there are better things to use than bleeds with a power build.
 
user1804599
12:25 PM
Anyway, seen from the screenshots on your website, I'll rather consider one of the 34485374 alternatives.
 
user1357851
@jalf I think I found solution for my current app
 
user1357851
I am not saint, even if I was a genius I still need to learn
 
user1357851
all part of learning
 
user1357851
@Aardvark you realise how much that cost?
 
while normal damage has a damage per second that is without cap, degeneration is capped, making condition-based damage inflicting rather limited
 
user1357851
12:26 PM
100 dollar ads for 100 extra download if you are lucky
 
user1804599
@Telkitty invest and you will profit. But only when your product doesn't suck.
 
not to say it doesn't work, but you only really need one in a group
 
user1357851
@Aardvark not every great thing get noticed
 
user1357851
thus need pr
 
@Telkitty depends on where you advertise it. But again, that's why people who are serious about their business try to track which PR measures have how much of an effect
 
user1357851
12:27 PM
get it
 
user1804599
Hire somebody who is specialized in advertising.
 
user1804599
But first make sure you have a unique product that is worth using.
 
user1357851
@jalf I do have a couple thousand downloads so far and I think I am getting better
 
user1357851
I am sure my apps are worth using
 
user1357851
although it is not polished enough
 
12:29 PM
@LucDanton It's a condition damage build that I use. Not power.
 
@Cicada I'm fairly sure my necro has power.
 
@Telkitty the more important question is what others think about your apps.
 
user1804599
@Telkitty Polish it enough and hire somebody who is specialized in advertising. :)
 
user1357851
I am hoping my current app would help getting the market
 
you're not going to sell them to yourself, are you?
 
12:29 PM
@LucDanton Well mine not!
 
user1357851
I am investing quite a bit
 
@Cicada You did ask me about my build.
 
@Telkitty but how many did you get per day before buying twitter followers, and how many did you get per day afterwards? That's what you should be looking at
 
user1804599
@Telkitty what score do they have in the App Store? What are the reviews?
 
user1804599
Those are more important than your own opinion, since you are biased and your customers are not.
 
user1357851
12:30 PM
you still do not get it, I do have a strategy.
 
I guess someone should post Telkitty's website
 
@Telkitty but you're not looking at whether the strategy is working
 
user1357851
@Aardvark iphone users dont give ratings/comments
 
user1804599
I often give ratings and comments and many apps have ratings and comments.
 
user1357851
android users are better at giving feedbacks
 
12:31 PM
@Telkitty sure they do, with the right prompting from the app
 
@LucDanton Oh i think you misunderstood my question lol
 
user1804599
Oh how appropriate. An ad form Google Adwords in my mailbox.
 
Is 1804599 a prime number
 
@Cicada No, divisible by 3.
 
Were you asking about what spells I use in tandem with a condition damage build?
 
12:32 PM
@Cicada 1804599 is primarily a number
 
user1357851
lol I should take advice from people who have no app experience. No offence but I think I am more experienced in app than you even though I still suck. But at least I learnt from past mistakes
 
@Telkitty Try digging through this blog a bit. It highlights both some statistics and analysis on different forms of PR and what actually worked, and also how they got users to rate (positively) and give comments.
 
@LucDanton I was asking you what your CD build was since you weren't having fun with it
@TonyTheLion This is awesome
 
12:33 PM
@Cicada If you sum all digits and the result is divisible by three, it is divisible by three.
 
Oh right. Scepter + dagger / Staff is pretty much a given (at least for PvE) isn't it?
 
@R.MartinhoFernandes I know :( I was trying to imply something more subtle
 
Wells and/or corruption being acceptable utility skills to go with.
 
@Cicada Mission failed.
 
@LucDanton Yeah although I roll axe + warhorn instead of staff
 
12:34 PM
@Telkitty Yeah, you sure sound like a great learner. A learner who doesn't bother to check whether what he's doing has an effect, and who isn't interested in feedback from others. I wonder how that lets you "learn from past mistakes"
 
In high school, I knew a trick for quick checking divisibility by seven, but now I forgot it :(
 
user1357851
lol or I can spend more time make better apps (off now) :p
 
@Cicada The staff does need quite a lot of traits and isn't fundamental if you don't need that much AoE damage yeah.
 
@Telkitty like I said, the hallmarks of a great learner. One who doesn't even bother to find out if he makes a mistake, and yet claims to "learn" from them
 
@jalf He does not like to learn. He has stated so in the past.
 
I think what bothers me about condition damage builds most is that the profession mechanic becomes useless. It's not so much that I want to avoid condition damage, it's more that I've been desperately trying to make Death Shroud work.
 
argh
who he fuck wants to shower at 4am?
 
user1804599
Bakers.
 
12:52 PM
@DeadMG What?
@Xeo Maybe we should drink to that later.
 
@R.MartinhoFernandes My prisoners bitching about not being able to shower at 4am
 
Xeo
So... did the chat die just on me right now?
 
user1804599
@Xeo same here. I switched to another DNS server and it works now.
 
@Xeo Yes, the whole shebang did. I blame @Aardvark for changing his screen name.
 
12:56 PM
hmm
it might help with them eternally bitching about food if I gave them breakfast
 

« first day (754 days earlier)      last day (4199 days later) »