« first day (522 days earlier)      last day (4432 days later) » 

1:00 PM
I don't use one.
 
I think I have one machine with a spellchecker set on British English and one with American English. On the one hand it confuses me, but on the other hand it gives me an excuse to spell words however I want.
 
So, whatever the upper limit on messages is, it's above 189819.
> It is not, as I had intended it, the full word. This is because when I converted the text to speech, it was 2 hours 8 minutes even when I quadrupled the speed.
 
om nom nom
tasty lunch is tasty
 
It's a systematic naming.
It follows the rules set forth by the IUPAC for naming organic compounds. It just happens that this one compound is massive.
I like how "party" occurs 1168 times in it.
 
1:15 PM
it's like, the system... man
 
1:43 PM
@RMartinhoFernandes lol
 
1:55 PM
@CollinHockey what's wrong with mingw?
 
it just doesn't work right if you install it somewhere with spaces in paths
 
ah, yes. M:\Development ftw!
 
Or somewhere UAC gets angry about - like Program Files
 
room topic changed to Lounge<C++>: Land of the brave [c++] [c++11] [c++-faq]
 
shared_ptr is overused.
 
the usual: "shared_ptr is a lot slower than other smart pointers. Don't use it everywhere"
there's a reason unique_ptr is in the standard library :)
 
I'm not a big fan of the "always pass shared_ptr as const references" idea, though.
If you don't want to take ownership, why not just take a reference?
 
@RMartinhoFernandes well, it allows you to decide whether or not to take ownership, I guess. YOu have a reference to the shared pointer, so you can copy it if you decide to hang on to it
 
Reddit /r/cpp users in general seem to be completely clueless about C++
 
2:01 PM
But yeah, it's not really a viable strategy in general
also because just dereferencing a shared pointer is more expensive. It's not just copying it.
 
@jalf Sure, there are scenarios where it might make sense, but I think most of the time, it doesn't.
 
most C++ programmers are completely clueless about C++
 
And everyone is slightly clueless
 
@jalf But most of them are not as vocal and vociferous as the reddit folks
 
Plus, putting a shared_ptr in your arguments forces you to use shared_ptrs.
Puting a T& doesn't.
 
2:03 PM
@RMartinhoFernandes yup, I agree with you
 
I don't really remember last time I had to use shared_ptr.
 
I don't think I've ever using shared_ptr other than for experimentation :(
 
from what little I know about smart pointers, you use unique_ptr. if it is not working, make sure you are not just using it wrong. If it is still not working, then perhaps you did need shared_ptr
2
 
I wonder if shared_ptr causes stds.
:D
 
Well, whatever you do, don't put them in the interface unless they are the interface.
 
2:07 PM
@thecoshman I thought it was all about ownership.
 
Well, you can take "try this and then that and maybe it will work" approach to ownership.
Saves you from thinking about the design.
 
@Pubby it is, but that's still a good rule of thumb. Usually, you do want exclusive ownership by default
and if you can't get that working, think about using shared ownership
 
shared_ptr needs careful design. You need to be careful to not have cycles.
 
@RMartinhoFernandes Exactly right. I’ve posted this on the reddit thread, let’s see how long it takes until I get torn apart.
 
Debugging leaks caused by cycles is not fun.
 
2:11 PM
@Pubby like I said, that is just what I have gathered. It seems that for the most part, you want to only have one thing owning a pointer, or the data pointed at by the pointer, not sure what way it is meant to be thought about
@jalf wait... you mean my random musing are actually half sensible :O
@CatPlusPlus do you mean circler references?
 
Circler references are not that bad, it's the triangular ones you need to watch out for, they have the sharp corners
 
@thecoshman shared_ptr will leak if A contains a shared_ptr<B> and B contains a shared_ptr<A>.
 
Refcounting is really primitive form of GC, and any cycle means the objects live forever.
And when you leak, you leak an entire cycle.
 
@CatPlusPlus Sometimes I walk into houses to see if I own them, most of the time someone yells at me.
 
2:17 PM
@CollinHockey Didn't your parents teach you not to do that?
 
@thecoshman Circler references are references with more circles than the others, right?
:P
 
@RMartinhoFernandes erm... yes :D
 
the circliest reference
 
@StackedCrooked strictly speaking though, that is not circular (see I know words). Would need a long chain of references before it took on a circular form
 
Uh … comments on this please?
I think he’s wrong, ownership relations are always known at compile time
but I can’t prove it
anyway, I don’t understand his comment about “interpretor” [sic]
 
2:22 PM
morning
 
probably trolling, it's reddit
 
@KonradRudolph void maybe_take_ownership(bool should_take_it, shared_ptr<T> const& ptr);
 
Why are you on /r/cpp, anyway.
 
@RMartinhoFernandes Well but then you know at compile time that this code may take ownership
actually, I take this back, I just remember that this is a classical (essentially unsolvable) problem with unmanaged resource handling in C#
 
@KonradRudolph Sure, but you can't put that information on the function: neither T& nor shared_ptr<T> work for the argument.
 
2:26 PM
So he’s right, although I still don’t understand the interpreter remark
 
Also we use shared_ptr in a game, and it really have barely any impact on the overall performance.
 
@CatPlusPlus Hmm, good question …
 
I don't get part either.
 
And it's all over the place.
And constantly locked weak_ptrs.
I really, really, really, really, really hate all that benchmarking.
 
god damn burst water pipe!
how am I meant to make coffee with out water!
 
2:28 PM
@CatPlusPlus What benchmarking do you hate?
 
(╯°□°)╯︵ ┻━┻
 
@StackedCrooked All benchmarking.
 
I hate reddit's layout.
 
@thecoshman Use magma.
Magma pipes never burst.
And when they do, you don't really have to worry about coffee!
 
@CatPlusPlus ¬_¬ don't make me get the dog
 
2:29 PM
That reminds me, I have to finish my obsidian casting chamber.
 
oh, your an MC player
 
DF.
(But I do play MC too)
 
oh yeah... that dwarf fortress game
 
Magma Camp.
That'll be the name of mine clone.
 
Funny how people get angry over MC clones when MC stole the idea from Infiniminer.
 
2:31 PM
Who gets angry?
 
People are stupid.
 
people
all the people
 
never actually looked at Infiniminer
And how does all this talk help me get my coffee?
 
Infiniminer was abandoned before it got any fun parts.
 
@RMartinhoFernandes Hehe, I've just seen threads on reddit about it.
 
2:32 PM
Keyword being reddit.
 
@CatPlusPlus So, MC not only stole the idea, but it also got it working. Interesting.
 
Since then I've unsubscribed from the front page nonsense ;)
 
I can't stand reddit.
 
Not even the non-default subreddits?
 
There's nothing but subreddits, you know.
 
2:33 PM
I just can't see the point of reddit
 
on another note, did you see <I forgot who> are soon to release HDD with frigging lazers! Over 1tb per square inch :O
@jalf mindless shit?
 
I wonder if questions should be flagged for being too retarded.
 
> Which IDE are you using?
 
@jalf It's a place where people post links and argue troll about them.
 
the problem was that the OP forgot to press enter after input.
 
2:34 PM
@thecoshman well, I don't need the internet in order to be mindless
 
Infiniminer author went to work on SpaceChem, so it probably all worked out for the best.
 
@RMartinhoFernandes yeah, I know what it is, I just can't see the point
 
@CatPlusPlus I didn't know that connection. Have to agree with you.
 
> Oh god i forgot to press enter.. Thanks man
 
2:35 PM
@jalf yeah, but meh
 
@jalf Oh, I don't have an answer for you then.
@CatPlusPlus lol
 
@CatPlusPlus waitwat, obfuscated? Yeah, it's totally his own fault if that is the best way he can think of to protect against hacked clients
 
@CatPlusPlus That's weird.
 
sometimes I want to give the entire games industry a crash course in not being goddamn stupid
 
2:38 PM
Minecraft's only protection is obfuscation.
 
@CatPlusPlus Protection against what though?
 
@jalf No, it reads un-obfuscated.
 
Decompiling.
Hacked clients thing is a borked client-server architecture.
 
Are the clients trusted though?
 
@RMartinhoFernandes yes, but my point is that obfuscating the code would have made zero difference
 
2:39 PM
Releasing .NET assemblies un-obfuscated pretty much equates to releasing source code.
 
Wait, why are they decompilable in the first place? Doesn't the compiler strip the names?
 
I've seen a software that mixes assemblies with native code, so decompilers get confused.
 
@Pubby well, it can’t strip public names since those are part of the API. It can’t strip even private names since they need to be accessible to the reflector. It does strip local names but those aren’t crucial anyway
 
@Pubby Not really. Names of local variables and such, probably, but not functions and the like
 
But really, who the hell cares. You shouldn't trust clients.
And it has nothing to do with source being available or not.
 
2:42 PM
exactly
 
I thought the problem of Infiniminer was, well, that it wasn't that good. All the hype I remember from it was the potential people saw for the game, not the game itself.
 
Minecraft has entire projects dedicated to unobfuscating the code.
 
especially not if your game depends on the client being trustworthy. As far as I can tell, it doesn't really matter in MC
 
MC trusted clients a lot in the early days.
 
since there's basically nothing competitive in it, so there's no reason to prevent cheating
@CatPlusPlus doesn't it still?
 
2:42 PM
Inventory and chests were client-side.
 
@CatPlusPlus lol.
 
Or maybe just inventory.
I don't remember.
@jalf Yeah, you still can make yourself fly or whatnot.
 
@CatPlusPlus the difference is that in MC it's considered a feature, not a bug
 
There are server plugins to detect and prevent that, though.
 
"hey look, you can hack the client to your heart's content. Have fun"
 
2:45 PM
@jalf Well, there are RPG-like servers, where cheating is frowned upon.
 
@CatPlusPlus yeah, and then people come up with reasonable ways to detect at least the most obvious cheating
but the baseline is pretty much just "security? Who needs it?"
 
Yeah, it's no VAC.
 
Where InfiniMiner seems to have been "I won't implement any security, but I'll also consider the game broken as soon as I find someone cheating"
 
For me it was bit more like "waaah, they've forked my game".
 
Have to agree that if anything bad happened, it's to the morale of the developer.
 
2:47 PM
Poland sounds awesome. blog.danieljanus.pl/…
 
Not the first time I saw a developer scared by open source because "they'll fork my thing".
People only jump at clones when the original outright sucks.
 
2
A: Why is factorial recursive function less efficient than a normal factorial function?

Cheers and hth. - AlfYou write that the recursive function “should be less time-consuming as it doesn't create a new variable, and it does less operations”. The first assertion is pretty meaningless. Memory for local variables is typically allocated by a single subtraction operation, upon entering the fun...

^ I have a question about my (old) answer
Which current compilers optimize this:
double factorial( int n )
{
    if( n < 2 ) { return 1; }
    return n*factorial( n-1 );
}
to iterative code?
 
GCC might.
 
And which current compilers optimize it when double is replaced with int?
 
At least AFAIR, it recognises some forms of non-tail recursion as optimisable.
 
2:59 PM
@CheersandhthAlf int replaced with double you mean? You'd need the Gamma function for that...
 
No, I just mean the formal result type.
 
Why is it double, anyway?
 
oh, right.
 

« first day (522 days earlier)      last day (4432 days later) »