« first day (1321 days earlier)      last day (3644 days later) » 

10:00 AM
@ecatmur Huh. That's weird.
 
buggy version of clang is all
 
@FredOverflow yeah in c++ primer they say to use the prefix operator unless you need the old value and they talk about extra work having to be done for the postfix operator but they say for ints and pointers this is optimized away by the compiler but for other types it might not.
 
It's irrelevant
 
that's also true
 
10:03 AM
Write what you mean. Don't micro-optimize before you've collected profiling.
 
@AaronKyleKilleen I don't care if i++ can be optimized to be as fast as ++i. Many people seem to imply that i++ is somehow better than ++i and hence would prefer to write i++. I have no idea why.
 
I think that when you're spending time caring about i++ vs ++i, then you're doing it wrong by default.
unless you're in a scenario when you use the result, obviously, in which case it kinda matters.
 
I don't care about it. I just pretend i++ doesn't exist most of the time, because it's almost never useful.
 
I say fuck i++ and ++i, I just need i = i + 1.
 
@Jefffrey Try that with forward iterators, bitch.
 
10:06 AM
Then fuck iterators as well.
 
I think the word *iter++ shows up from time to time when I'm using vectors
 
*p++ is the stupidest most unreadable thing ever
 
ageed
 
@AaronKyleKilleen And there would be no harm to readability (on the contrary) if you split that up into two statements.
 
Yeah, I was about to say. WTF does that do?
 
10:07 AM
nuh uh
 
I'm p sure there's worse.
 
well then I would have to inconveniently type two statements
 
It's C mentality of barfing up the least amount of characters that does something
7
 
You are on a rampage cat.
 
With no regards to whether humans can actually understand it
 
10:08 AM
Has anyone tried LXQt yet? Seems promising to me..
 
@Maxpm It dereferences the pointer. The pointer will be incremented sometime between now and the next sequence point.
 
@FredOverflow Wasn't sure if it was (*p)++ or *(p++).
 
well I just assume whoever reads my code knows operator precedence
 
why would we know that?
in all sane code you don't need to refer to the Standard operator precedence tables to decode it.
 
*p++ = *(p++)
 
10:10 AM
@ecatmur For iterators that aren't pointers, the increment happens even before the dereference, but the dereference is given a copy of the iterator before the increment :)
 
@FredOverflow iterators of class type.
 
Man I hate salesmen. I can handle them, but that dejected sorry-for-yourself look they give you just before they sulk out the door when you've said you can't commit to a £1600 patio door replacement on the fucking spot, is ridiculous.
 
Pointers are iterators too.
:p
 
@ecatmur Is the behavior different for regular pointers?
 
@Maxpm Yes, because i++ on an iterator is a function call, which introduces a sequence point.
 
10:11 AM
Aha.
 
(:|) :: e -> Vector n e -> Vector (Succ n) e ... :/
STAHP THIS OPERATORS MADNESS
 
So given the expression *i++, inside operator*, the iterator is guaranteed to already be incremented, but operator* works on an old copy.
 
@Jefffrey is that smiley++?
 
yeah, haskell(++++)
 
:| :/ :\ :) :(
someone should make a language using only smiley faces
 
10:13 AM
@Maxpm Hint: When a postfix and a prefix operator fight for an operand, postfix always wins.
 
I seriously saw the definition for (++++).
@AlexM. You can just use haskell.
They are so fond of operators is unbelievable.
 
@FredOverflow That's easy to remember. Thanks.
 
Firefox UI is dying way too often recently
 
@Maxpm That makes reading C declarators a lot easier, for example int *x[10] is an array of pointers, because postfix array subscripting wins over prefix dereference.
 
#include <string>
#include <iostream>
int main(int argc, char ** argv)
{
std::string mystring = "hey you";
auto iter = mystring.begin();
while(iter != mystring.end())
std::cout << *iter++;
return 0;
}
 
10:15 AM
Nothing makes reading C declarators easier, they're retarded and need to fucking die
 
is an example of what I'm talking about
 
we know, we've all seen it ten thousand times.
 
for (auto iter = mystring.begin(); it != mystring.end(); ++it)
{
    std::cout << *iter;
}
FTFY
 
for (auto&& ch : mystring) { std::cout << ch; }
 
for(auto&& ch : mystring) { std::cout << ch; }
 
10:16 AM
Also fuck skipping braces too
 
std::cout << mystring;
;)
 
lol
 
Why auto&& instead of just auto, auto& or even const auto&?
 
@CatPlusPlus you're not a skipper?
 
because auto&& is the winner.
 
10:17 AM
@Maxpm Because Scott Meyers has awesome hair.
 
He does have awesome hair.
 
auto&& is no-copy-no-modify, auto& is no-copy-modify, auto is copy-whatever
 
@CatPlusPlus How is auto&& no-modify?
 
+ "out there in the cold,
getting lonely, getting old,
can you feel me?"
 
I wish I had any idea what starts and when at college w/o having to check the schedule all the time
I woke up 2 hours earlier for nothing
oh well
 
10:19 AM
@CatPlusPlus const auto& is no-copy-no-mod, too.
 
Don't you have a weekly schedule? Just print it out and hang it next to your bed.
 
Hell if I remember
 
@FredOverflow yes I do but I always think I remember things right but in the end Iremember them wrong
 
auto&& r = std::string("test");
r[0] = 'p';   // There, I modified!
 
Xeo
10:21 AM
Mornin!
 
what is this no copy, no mod business anyhow?
 
@AlexM. The solution is to ignore it
 
two more hours to put into this assignment I guess
@CatPlusPlus I think ignoring it is what brought me here lol
 
@AaronKyleKilleen When you iterate over a container, you want to iterate over the originals, not copies. That's the no-copy bit. Whether or not you want to modify depends, of course.
 
oh I see so it's kind of like move semantics or something
 
10:23 AM
@AaronKyleKilleen Obviously not. It's just reference semantics.
 
No, auto&& just gives you a reference like auto&, but it works on lvalues and rvalues. Although I have never encountered an operator* that returns an rvalue.
 
Xeo
@StackedCrooked Oh, just wait until you see the Special Ending
Then you can say it got silly
 
Maybe generators that return int by value or something.
 
Xeo
@FredOverflow transform iterators might do that
 
@Xeo ah
 
Xeo
10:25 AM
Depending on the function you give it
 
So the standard does not specify what value category operator* must return?
 
Xeo
Dunno
 
@FredOverflow What do you mean by "works on"?
 
Xeo
accepts
 
10:32 AM
> Please submit this information to us within 4 business days. We look forward to hearing from you with this information. If you require immediate assistance with this issue, please contact product support at support.microsoft.com/ph/1117.
MS Connect just grinds my gears
It feels so empty
 
@Maxpm You can initialize an auto&& with both lvalues and rvalues.
 
@FredOverflow Not for input iterators. Else, it must be an lvalue.
 
here me goes building LLVM again...
 
@DeadMG interesting
 
What a mess.
 
10:35 AM
@FredOverflow All iterators had to be lvalues in C++03. They looked at relaxing it in C++11 and they basically said that virtually nobody had heard of the rule, and they had no idea how widespread non-conformance or dependence was, but it would be super useful to relax if possible.
so I would not be surprised to see it be relaxed further in the future
 
@DeadMG says where?
 
@ecatmur Says the Standard iterator requirements. You can go dig through it if you want a normative quote.
 
yeah, I'm looking at it and I'm not seeing it
 
So, in short, use for (auto&& e: c) if you're modifying or for(const auto& e: c) if you're not?
 
I'm pretty sure that reference can be some type with operator=(T) &&
after all, that's how vector<bool> usually works (ick)
 
10:40 AM
yes, but vector<bool> is not a Container.
@Maxpm Why bother with the extra const? Just use auto&& always.
 
Fuck. LLVM make -j3 with 2.9 GB of RAM doesn't work.
 
@DeadMG Because I want to prevent myself from accidentally modifying e.
 
Damn you virtualbox for not sharing my memory
 
hmm
 
@LightnessRacesinOrbit that salesman observation was pretty funny. It is obnoxious, although it's better than Jehovah's witnesses coming to your door at 6am.
 
10:41 AM
I usually prefer to protect myself from mistakes I'll actually make.
 
@DeadMG ah yeah, a Container must have ForwardIterators.
 
@Maxpm Sounds like a reasonable guideline to me.
#define var auto&&
#define val const auto&
When Scala meets C++ :D
 
@AaronKyleKilleen never had that
 
@FredOverflow ewww.jpg
 
10:56 AM
There. Treat those 6GB with respect.
^there be dragons
 
> true
 
@Maxpm That's p dumb fear
 
Well, it also helps communicate intent.
 
It also helps with stupid bugs caused by typos (like a == b vs a = b).
 
11:08 AM
Assignment in conditions is detected by compilers :ssh:
 
Xeo
@DeadMG I love sprinkling const all over my variables if I don't intend to modify them
 
I don't like const
 
I do.
 
Mutability is part of type design
 
@Xeo Me too
@CatPlusPlus What the fuck
 
11:09 AM
He is trolling, isn't he?
 
@Jefffrey Unfortunately, I don't think he is.
I use const extremely liberally nowadays. I write it by default and only remove it when necessary. I'm pretty sure that this is because I'm an amazing programmer.
 
I make immutable types :v
Also god I have to make changes in The Worst Project
 
I dislike const
 
@CatPlusPlus What? Why? Let calling code decide if it wants its variables to be mutable or not.
 
Apr 22 '12 at 18:47, by Cat Plus Plus
Const correctness, good.
 
11:12 AM
it's annoying, most of my types that I'm using right now are fundamentally immutable anyway
 
^
const is designing types to be both mutable and immutable, and that's a drag
 
what the actual fuck
 
What about it is a drag?
 
Constness is not necessarily a property of a type.
 
what the hell are you on about Cat
@Jefffrey lol
 
11:14 AM
It's like saying that the fact that the class will probably have one instance is a property of a type.
 
And we all know what that is called
 
:ssh:
 
ITT Cat loves singletons
 
Uh not really, it affects the interface p significantly
@Maxpm In C++? Overload explosion
 
const is like exception specifications in Java
 
11:16 AM
In general, accounting for two modes of behaviour
 
you just keep adding more unnecessary shit until the compiler stops bitching
 
@CatPlusPlus Overloads of what?
 
It affects thread safety considerations also
@Maxpm The public interface
 
C++ is not Haskell.
 
@CatPlusPlus Yeah, thread safety is a good point.
 
11:17 AM
A person with short memory like myself should stop meeting new people - I kept on getting requests on social apps from people whom I don't remember ... but I accept most anyways because I am always invisible :p
 
So, no, it's not like "saying that the fact that the class will probably have one instance"
It's like designing classes to be inherited or not
It affects the design more than "oh I'll need to make this ctor private"
 
And of course you scrubs start an interesting conversation when I have to take the train. clap clap
 
@DeadMG only if you do it wrong
@Jefffrey it's not that interesting
 
@CatPlusPlus Do you have a specific example of how accounting for mutability creates an overload explosion in the public interface? I'm not sure I follow.
 
the traditional example is accessors
for example, std::vector::operator[] has two versions, one for const and the other for non-const.
 
11:22 AM
@CatPlusPlus Speaking generally, if you have a member function with a const and a non-const overload, the latter of which does things that the former does not (i.e. mutates stuff) then your design is bananas. You have two functions, with the same name but entirely opposing semantics.
So you shouldn't get a const overload "explosion"
The only real exception to that is.... what Puppy just said: by-reference, "proxy" accessors. I'd like the language to be a little better about that.
 
I think what the Cat is getting at is that you're essentially repeating code in that case.
 
@chmod711telkitty Solution: don't use social apps.
 
@rubenvb Yes, I understood that, which is why I just wrote three lines responding on that topic.
 
@FredOverflow I am anti-social enough already, do you know how many friends I have managed to not keep by not having a personal facebook account? That's one of many anti-social things that I do ...
 
@LightnessRacesinOrbit And otoh if you only have const methods, then you just designed a fundamentally immutable type and const is more or less redundant :v
 
11:26 AM
@CatPlusPlus At that point, slapping const on an instance only signifies intent, yes. I'd still use it. But of course omitting it would not change any semantics.
Immutable types are pretty rare, though.
 
Eh, not really
 
Immutable types don't work in C++ due to value semantics. You still want mutable variables.
 
Well, dunno about C++
 
@LightnessRacesinOrbit Depends on the problem domain.
 
Should they really still be class methods, if every single method is const?
 
11:27 AM
I use const for distinguishing being mutators and accessors in database models. It doesn't affect C++ whatsoever because I never actually mutate a member, but it signifies intent and it enables access restriction when passing a reference to the model into some unprivileged context.
 
@BoniTea Yes.
 
Like in Java, a String variable is a mutable variable that contains a reference to an immutable String object. That's not really possible in C++ without jumping through a lot of hoops.
 
@CatPlusPlus Oh, I'm only talking about C++
@FredOverflow That's std::string const* ;)
 
@BoniTea std::vector::size() couldn't be implemented as a free-standing function.
 
C++ could use immutable strings
 
11:28 AM
@Maxpm Why not?
 
Autointerning is fun!
 
@LightnessRacesinOrbit Anybody using std::string const* in real world C++ would get beaten to death.
 
@FredOverflow I know
Likewise, anyone using Java around me would get beaten to death.
 
@Maxpm Of course it can. end() - begin().
 
But you say "it's not possible without jumping through a lot of hoops", which is incorrect.
 
11:29 AM
@FredOverflow True. But then, could end() and begin() be implemented free-standing?
 
@LightnessRacesinOrbit Well, what about ownership?
 
@Maxpm Have you not heard of friend?
@FredOverflow Fuck it
 
Leak all the strings?
 
@Maxpm Probably, yes.
 
@FredOverflow Every single one. The cunts.
 
11:30 AM
Does friend traverse namespace boundaries?
Or can I just create an infinite amount of friend functions by putting them in a new namespace?
 
A class can friend any function, can it not?
You cannot friend namespaces.
 
(assuming there is a friend declared in a class)
@FredOverflow yes, agree, but the intent is to befriend only a single function.
I thought.
 
@LightnessRacesinOrbit Well, the question was whether or not they should still be class methods if they're all const. I say yes, because they might still need to access private members. friend functions are tantamount to being class methods, IMO.
 
@LightnessRacesinOrbit don't you write PHP?
 
11:32 AM
VS2013 does weird things with line height
 
@BartekBanachewicz Shh
 
@CatPlusPlus dafuq
 
@Maxpm o.a(b) === a(o,b)
 
@BartekBanachewicz Actually, not so much now that my web front-end is C++. Though I was working in PHP yesterday on some improvements to a tool.
 
@LightnessRacesinOrbit oh, interesting. Do you use Duetto/Emscripten for front-end build?
 
11:34 AM
He means backend
 
... right
 
@Maxpm Well, they're not.
 
Boring.
Later.
 
@Maxpm VS is a very good text editor you see
 
@R.MartinhoFernandes did you just come in to tell us that?
 
11:34 AM
lol
 
@BartekBanachewicz No, I just execute the binary via CGI.
 
@LightnessRacesinOrbit yeah, see, "front-end"
 
Not sure why I'd compile my C++ to JavaScript, or how that'd help
@BartekBanachewicz = the web component of the application. Back-end is a daemon.
 
When referring to web, frontend is what executes in the browser, that's the confusion here
 
I see what you're saying, though.
We're talking in different domains
 
11:36 AM
Your web backend is frontend to whatever :v
 
@CatPlusPlus Thanks captain obvious
 
The front-end of the front-end is HTML, CSS and a healthy dose of jQuery
Nothing wild
 
Reactive programming is fun
 
and the back-end of the front-end is C++ via CGI
 
11:36 AM
I dislike creating JavaScript heavy web apps and this one doesn't need it. Some forms, some tables, a couple of AJAX tricks here and there maybe but nothing mad
 
I wrote my latest app with Angular on the front
 
@BartekBanachewicz Yeah. Then the back-end is all C++ via life.
 
CGI is shit though
 
Not really
But go on - inform us
 
I think it's fast.
 
11:38 AM
go on, do PHP - we know you want it.
 
It caves on slightest mention of higher traffic
Turns out that constantly spawning and destroying processes is not very good way to handle high traffic :v
 
@chmod711telkitty some day I'll have owner rights to this room and I'll boot those messages to the orbit.
@CatPlusPlus I guess people think that C so fast.
 
Hello
 
because C native yada yada linux process native pipe bash linux c fast
 
11:39 AM
strcmp
 
seems the interview will take place next tuesday
 
@CatPlusPlus So therefore it's "shit"?
Find me one thing that's good at all jobs in all situations ever
 
perhaps it was time I re-did all of the linear algebra exercises in that maths book for 3d game programmers
 
@AlexM. what are you applying for? Software Mathematician?
 
not exactly
 
11:41 AM
@LightnessRacesinOrbit The thing is that it's not particularly better in any situation, and worse in many
 
my uWSGI has a constantly running process for all apps
I don't know if it's good or bad, but runs well enough
 
it's a junior C++ game programmer position but since there's a theoretical test included I doubt it won't touch math at least a little bit
 
my 36 year old friend is learning ruby on rail and she hopes to work for a startup and become a billionarie
 
Don't learn ruby on rail
 
and it would be silly for me to fail at doing simple stuff like transformations
 
11:42 AM
on just one rail?
@AlexM. junior C++ game programmer seems like the most dreaded job description ever
 
@BartekBanachewicz It's not a very safe ruby.
 
are you sure you want to do this? :P
 
yes
 
@Maxpm not that adding second rails helps that much
 
Ba-dum tss.
 
11:43 AM
I am extremely hyped by this test especially
 
@AlexM. because you'll be junior (well that's unavoidable), C++ (you'll regret this), game (expect terrible code), programmer(kill yourself at this point)
 
it was easy to get to my current job and this shows right now
all I do is 10% writing code and 90% clicking buttons to put bought assets together
 
@BartekBanachewicz hah
 
I feel like my brain is slowly dying
 
@AlexM. I don't think it's just a feeling
 
11:46 AM
it's also a multinational company which will make it easier for me to move somewhere else, something that I really want
 
@AlexM. So what's the problem
Less effort mo money
 
3 mins ago, by Alex M.
I feel like my brain is slowly dying
I'm wasting lots of hours per day doing nothing that increases my knowledge
 
sounds like an university
 
well, except for my knowledge of button clicking
 
@CatPlusPlus The railroad to hell.
 
11:49 AM
it was nice at the beginning, lots of money for a simple job
 
Sounds perfect
 
but then it quickly got into a "take existing game, reskin, repeat" loop
 
you learning more stuff if you do different things - overnight bushwalking/hiking, diving, caving, surfing etc etc etc
 
@CatPlusPlus IDGI either
 
Working in C++ gamedev the only thing you'll learn is how much you hate the world, C++ and yourself
 
11:50 AM
@chmod711telkitty look you do all this stuff and I don't think it shows that you know more/are wiser in particular, y'know
@CatPlusPlus don't forget the gamedev.
 
@CatPlusPlus it's still good
 
You mean tooldev
 
at this point, doing anything seems attractive
and at the end of the day, I won't ever get to work on big titles by staying where I am right now
 
And this is how alcoholism starts
 
@BartekBanachewicz yeah we will dump both of us in to the depth of the mountain & see who can do better ... or in the middle of the ocean if you prefer
 
11:52 AM
@AlexM. Nobody wants to work at big titles.
 
I do
 
Hearthstone was made because big title devs said fuck it.
 
Hope you like overtime!
 
I've been focused entirely on gamedev for the past 10+ years and I never felt like going back
I just enjoy it
 
And "C++"
 
11:53 AM
lol
 
@chmod711telkitty you're assuming I don't do all these things.
 
we know you don't do those things
 
@CatPlusPlus emphasis on quotes
@chmod711telkitty reminds me of that game of thrones moment, when somebody said some shit like, the earth is flat and lies on a tortoise, it is known; and then everyone around repeated it is known
so yeah "we know" sounds at least funny.
 
hey Bartek, you so button-ish, lemme press u again!
jump, just jump!
 
I guess that's the point where you put your drugs or whatever down.
@AlexM. yeah I thought so too for the first 10 years
and then the reality said "hi"
 
11:56 AM
afk 4 a lil
 
I mean, I don't want to discourage you, that would be lame
 
From what I understand, the AAA video game industry is incredibly stressful and somewhat unrewarding. It's just so stupidly competitive.
 
@BartekBanachewicz you could describe it a bit better though
 
but Gamedev.se is one of the best gamedev sites in the world, and look how fucking swampy pit that is
@AlexM. The thing about gamedev is that because of technical challenges, there's little effort put in good design and wise use of the tools and languages.
the fact that everyone around screams "performance!!!" doesn't help
all in all, it's not that different; it's software after all
 
it's still more attractive to me than anything else, even so
 
11:59 AM
but it's software that's hard to test, has to be performant, and is produced in a non-quiet, competitive, tight timeline and budget scenarios, with requirements changing on a whim
 
sounds like any other important non-game software to me
 

« first day (1321 days earlier)      last day (3644 days later) »