« first day (571 days earlier)      last day (4378 days later) » 

1:00 AM
lol
 
@TonyTheLion Oh wow.
 
@TonyTheLion FB?
 
I can just imagine that now
 
Facebook
 
"What's your rep on StackOverflow?" "Whore."
 
1:00 AM
ew
@DeadMG we need to add "levels" to the reputation and that can be one
 
@DeadMG lol
so what's @JohannesSchaublitb rep level then? Uber whore?
 
that can work too
 
but I got rejected, because you need a degree for the US visa, and I don't have one :(
 
fuck man, that sucks
 
if it wasn't for that, he would have sent my details to the tech team
 
1:02 AM
when I incorporate as Wide Software Solutions, I will hire you
 
Wow sweet, a Windows API returned an error code that doesn't exist
 
oh thanx
@SethCarnegie and meta error code of sorts
 
Error: Your mom slept with me last night.
 
oh lol
@DeadMG maybe we should start a company together :P
 
lol
you raise the VC, and I'll come up with the technical ideas
then we can fail to implement them and run away with the money together! mwahaha
 
1:04 AM
raise the VC???
 
venture capital
 
if it was a serious idea, I could prob get something together
 
Xeo
If Wide was a serious idea...
:P
 
@DeadMG Aaah, I see what you mean now. They're used to determine the capabilities of a class.
 
1:06 AM
@Xeo Hey, just because I have little time to work on it :P
 
Xeo
@Maxpm *type
 
Right.
 
@DeadMG wut? I thought you worked on it pretty much all the time :P
 
Sorry.
Java.
 
@TonyTheLion Game.
 
1:07 AM
what game?
 
an RTS I'm making
 
the engine?
 
yep
 
ah kewl
 
Xeo
How was your engine structured again?
 
1:07 AM
I'm actually restructuring it right now
 
user1174868
I have this weird question on my intro to C++ test... evaluate 3-5%7 I am not sure how to get the right answer
 
user1174868
3 - 7?
 
@Jordan Ask a compiler.
 
Xeo
@DeadMG How come?
 
int main() { std::cout << 3 - 5 % 7; }
 
1:08 AM
maybe I should start a company and hire 1 or 2 good devs to build something (I have no idea what???) and get rich :P
 
user1174868
I know the answer, just not how to get it
 
@Xeo I realized that I had no way to control the display correctly.
for example, render only units which belong to the player and the ones he can see
 
that's 3 - 5 modulus 7
 
Xeo
Keeping stuff seperate is an issue I'm always facing
 
the render component has no idea about players
 
Xeo
1:09 AM
Yep
 
the sim component has no idea which player is "the" player
 
user1174868
5%7 = 7?
 
and the UI component is written in script, at least conceptually, and cannot be trusted
 
Xeo
@DeadMG Just do it for all players! :P
 
plus I had no point in my code where I could insert, e.g., a menu UI
 
1:10 AM
@Jordan 5
 
user1174868
oh fuck
 
user1174868
I suck shit at math
 
Xeo
How do you get stuff from your units / whatever to your renderer?
 
@Jordan Seriously, ask the computer to do it. That's what it's for.
 
user1174868
I know what the answer is, just not how to get it
 
1:11 AM
@Xeo Another problem. Right now, the sim simply directly communicates with the renderer.
@Jordan You get it by asking the computer what it is.
but I'm not happy with that
the sim shouldn't know any of the renderer APIs
 
One way to better understand the way C++ templates can be used to perform calculations at runtime is to learn the basics of Prolog: template meta-programming borrows heavily from the programming style typical of Prolog. — dasblinkenlight 4 mins ago
this one's for @DeadMG
:P
 
user1174868
is there a good place with a table of c++ variables and what they hold? I just learned that int can accept letters
 
@Jordan wut????
 
RARRRRA RARGE PROLOG
 
Xeo
I currently use a "sprite anchor" that polls info from the entity (position) and pushes it to the sprite, which is registered for rendering when it's created, but I don't find that very elegant tbh
 
1:14 AM
@Jordan No, it can't. Not unless you're a numpty.
 
user1174868
Well I got that wrong on a test
 
well
your lecturer can ask you all kinds of totally stupid things that nobody would ever do
 
> table of c++ variables <---- WTF DOES THAT EVEN MEAN?
 
or plain stupid questions like "What do you get when you do *"hello" = 5;?
 
@DeadMG that's why he's a lecturer
 
1:15 AM
that doesn't mean that it's representative of actual C++
 
user1174868
I forget exactly, we cant keep test but something like what is the output? int x, y, z with input a543 cout << x << y << z
 
user1174868
something like that
 
user1174868
I put " " 543 " "
 
Xeo
I mean, I was always told to keep graphics and game logic seperate, but it proves really hard to actually do that...
 
my money is on undefined as the output of that program
but it might also output 543
 
user1174868
1:16 AM
well now I need to see what happens
 
as I suspected, the sample produces UB
 
@DeadMG Is that even legal?
I didn't think string literals had addresses.
Or, wait.
What.
Shit.
 
I'm not wholly sure if you can de-reference it straight like that
 
1:18 AM
int can't take char types
 
but you could certainly do "hello"[0] = 5;
 
dafuq?
 
char is a numeric type.
It promotes to int.
 
char sucks, that's my opinion. It's confused me from day 1 I started programming, which is more then 10 years ago
 
What's confusing about it?
 
1:20 AM
it's a numeric type, but it holds letters
that shit doesn't hold up in my brain
 
user1174868
is that beacuse of ascii?
 
It doesn't hold letters.
 
What's a letter?
 
a <---- THIS is a letter
its what you write your girlfriend to apologize for being such a fuckup
 
char holds a number. How you interpret it is a different matter.
 
1:21 AM
well, it holds characters, and letters are a part of it
 
It probably should've been called byte or something.
 
@CatPlusPlus yes, better name
 
There's no intrinsic meaning to the contents of a char variable.
 
user1174868
When I run this program I get craziness output
 
$10 it's undefined behavior.
 
1:22 AM
It could be an ASCII character, or part of an Unicode character, or just a numeric value with completely different meaning.
 
Eh, char should be a distinct type that is either signed byte or unsigned byte
 
@Jordan welcome to the land of Undefined Behaviour. You're now in hell! :P
 
user1174868
:(
 
Hell is defined. You're in the void.
 
1:23 AM
void is also defined
 
D has byte and char. char is UTF-8, apparently, but I don't know exactly how that works.
 
user1174868
It seems like if I ever enter a character for an int variable the program enters a fail state?
 
"defined" is defined
 
@Maxpm I already said that it's undefined behaviour
 
Divide by zero, you're now in a wheel.
 
1:24 AM
@Jordan Yes, it does. Because "a" is not a valid integer.
 
@Jordan because you cannot
 
user1174868
I want my points back
2
 
it's invalid
use char if you want a letter
 
user1174868
grades are serious shit
 
or a number
 
1:24 AM
@Jordan Lol.
 
fuck grades, I never got any
 
@Maxpm If it's UTF-8, then it's not a single byte.
 
user1174868
That was my attitude too, then I get a 2.7 gpa
 
and I seriously regret it now :(
 
@Jordan If your professor said that this program outputs anything, then he was wrong.
 
1:24 AM
@CatPlusPlus That's what I thought, too, but the documentation says this:
 
it doesn't
 
user1174868
now I have to go to Party-School
 
> char unsigned 8 bit UTF-8
 
oh party school
time to party!!!
2
 
Then it's crap.
 
user1174868
1:25 AM
@DeadMG Yeah too late though, I tried to argue with him after class about it but he seemed pretty sure about it, he said that ch can take numbers
 
user1174868
my idea of a party is myself, a beer and no one else
 
@Jordan oh you and @DeadMG will fit well together
 
aaah, C++'s worst enemy: the shitty professor
 
You cannot store UTF-8 character in a fixed-size container.
 
I think he has a similar notion of "party"
 
1:26 AM
It should be called byte_but_not_just_a_byte_but_part_of_utf8_char
 
@DeadMG it's more then C++ worst enemy, it's the students'worst enemy too
 
@CatPlusPlus I know. Which is why I find the docs so confusing.
 
Obviously.
 
It should be called short short
 
super short
 
1:27 AM
Wouldn't that be a code point?
 
oh no, that's Java
 
user1174868
what is short int used for?
 
short is too small for a codepoint.
 
@Jordan For storing smaller integers.
 
short is stupid
 
user1174868
1:27 AM
probably something I dont need to know about?
 
@Jordan No, you definitely do need to know about it.
 
short is a 16bit int
 
You don't necessarily ever have to use it.
 
I guess useful on embedded devices
 
user406009
Short is useless.
 
1:28 AM
No, that's int16_t
 
user1174868
what is double for? why not always use int or float?
 
Always use int and sometimes`unsigned`
 
double has double precision.
 
@Jordan Never use float. double is twice the precision of a float. Negligible overhead, noticeable accuracy improvements.
 
it's a double precision integer, it has 80 something mantissa bits, instead of a mere 52 or something
IIRC
 
user406009
1:29 AM
floating point numbers(floats,doubles) are entirely separate from integers(int, short,long).
 
OpenGL uses float.
 
user406009
Trying to use one instead of the other is stupid.
 
There is overhead with double
 
So using double with OpenGL is a waste of time.
 
@CatPlusPlus So does Box2D. It's a mess.
 
1:29 AM
Single precision is enough for many things.
 
user1174868
single precision? Referring to integers?
 
Fixed point is enough for many things too
 
user406009
But aren't doubles almost free on modern CPU's?(Compared to floats)
 
Single precision = float
 
No, floats.
 
user1174868
1:30 AM
what is the accuracy of float?
 
@Jordan do you know what "floating point" refers to?
 
@EthanSteinberg The fp operations are, but they take up twice the memory
 
SSE prefers floats, too.
 
user406009
@Jordan wikipedia has all the answers to your questions on why floats/doubles are so special and strange.
 
user1174868
alright, I will look at it
 
1:30 AM
FPU deals with floating point integers
 
IEEE754.
 
user1174868
I just found the cplusplus artciles to be too high level
 
Floating points are not integers.
 
numbers
 
user1174868
@TonyTheLion I am not sure what floating points refers to
 
1:31 AM
Floating point is like scientific notation
 
To magnets.
 
In computing, floating point describes a method of representing real numbers in a way that can support a wide range of values. Numbers are, in general, represented approximately to a fixed number of significant digits and scaled using an exponent. The base for the scaling is normally 2, 10 or 16. The typical number that can be represented exactly is of the form: :Significant digits × baseexponent The term floating point refers to the fact that the radix point (decimal point, or, more commonly in computers, binary point) can "float"; that is, it can be placed anywhere relative to the si...
 
user1174868
so float stores "two" values, the decimal points and the integer?
 
@Jordan No.
It stores some number and an exponent that the first number is raised to for the actual value.
 
user406009
@Jordan Quick overview: 1. Floating point numbers cannot have exact decimal values. For example, .4 + .6 != 1.0(it will be really close though). 2. Floating point numbers can store fancy things like infinity and nan(not a number).
 
1:34 AM
@Jordan Decimal? This is in binary
 
user406009
 
user1174868
oh lawd
 
user406009
Those are the two numbers you are talking about(shamelessly stolen from Wikipedia).
 
@EthanSteinberg Not all numbers can be perfectly represented in floating point, but some can.
 
user1174868
so int is just a way to store an integer with binary values
 
1:36 AM
Well it's encoded in binary
 
user1174868
float stores (magic) an integer with something raised to some power to create decimals?
 
Stop calling them decimals :S They're real numbers
 
user1174868
5.555
 
OH WELL HELLO
 
And yeah, there's an integer and an exponent
 
user1174868
1:37 AM
it will store 5 and then?
 
No, it would store the significant figures
 
@EthanSteinberg FLOATING POINT NUMBERS CAN TOO HAVE EXACT DECIMAL VALUES
 
Like 5555 and 10^-3
 
@stdOrgnlDave CAPS LOCK IS AUTOPILOT FOR AWESOME!
 
you can load them with exact values
 
user406009
1:38 AM
Powers of two I am guessing?
 
user1174868
ok
 
of course once you do anything to them you don't gots exact values any more
 
user1174868
so floating point refers to the method to calculate or store the value
 
Float values are exact, they're just not always exactly what you might think they are.
 
@CatPlusPlus that is an axiom to "the computer does what you tell it to, not what you think you tell it to"
@CatPlusPlus where you from? so I can discriminate against you based on geography
 
user406009
1:40 AM
@Jordan Yes.
 
@stdOrgnlDave Internet.
 
OMFG YOU'RE A LOLCAT I knew it
imagine that the decimal point is floating around and happens to be where it is most useful for different calculations and stored values
 
Egregiously off-topic: I've heard in this chatroom that inheritance has "fallen out of favor." Why?
 
@Maxpm all debts have been repaid
anyway, who said that and when?
 
Please be easy on me: I've been programming Java for a year and my brain is polymorphic mush.
One moment....
 
1:43 AM
did you used to program C++? are you new to C++? did you also program C++ during this time?
 
Because composition.
You should be writing Haskell anyway.
 
@stdOrgnlDave I did a lot of C++ last school year. I did very little actual programming of it this school year; other than Java, I focused on D and dabbled in Haskell.
(How does one properly quote a chat message from this room?)
 
Xeo
right-click the dropdown arrow, copy link
 
Apr 28 at 16:08, by FredOverflow
Inheritance went out of favor 10 years ago, haven't you heard? ;)
 
user1174868
I think I need a better c++ teacher
 
1:46 AM
sigh
"But to be revolutionary, you need to be
able to do a lot more than copy code and change it.

That’s the C approach, and it hasn’t worked very well. "
tell that to the Linux kernel, OpenSSL (which sux), libz, etc. etc.
 
Xeo
Well, atleast the linux kernel is in C, so...
 
wait, did your school teach you D?
 
user406009
Hasn't the rise of functional programming in C++ also contributed to less need for inheritance? Why bother making a new class when you can just pass a function(or pass a class as a template parameter)?
 
@stdOrgnlDave Nope.
CS is C++. AP CS is Java.
 
Functional programming in C++ is meh.
 
1:48 AM
@Jordan C++ is a very difficult language to teach, especially as a first language.
 
@Xeo sorry, zlib. and yes, OpenSSL is C. even though I think OpenSSL should die, the point is, C is doing very well
 
user406009
@Maxpm Same here. Although when they say C++ they mean C.
 
@EthanSteinberg Heh. Right.
 
user406009
Actually a demented version of C with no structs.
 
user1174868
@Maxpm Unfortuanately I have to take a scheme/python class next semester
 
1:49 AM
@Jordan That sounds fun!
 
user1174868
I hope so, either I am going to go insane and fail or I will enjoy it
 
Xeo
python sounds a lot more fun than java atleast
 
so, about that whole "inheritance falling out of favor" thing
 
user1174868
why does everyone hate java? is this like a hipster programmer crowd?
 
Xeo
Maybe because Java sucks?
Search this chatroom for "java sucks"
 
user1174868
1:50 AM
Isn't it like c?
 
Java is primitive and boring.
 
Xeo
I guarantee a ton of hits
 
@Jordan Not even close.
 
user1174868
only 7742
 
Totally unproductive.
 
1:51 AM
do you want the real reason why Java sucks? it comes down to this: it failed to live up to its original design goals. they wrote and designed and worked and refactored and innovated for years and years and it is still just medicore. anything you can do with Java you can do with another language better.
 
And checked exceptions are annoying.
 
yes, that too
 
Anyway, about inheritance: I don't think functional programming in C++ has made inheritance fall out of favor. Object-oriented programming certainly hasn't made imperative programming fall out of favor.
 
user1174868
well what does python do better than c?
 
OO is still imperative
And functional in C++ is lousy
 
1:53 AM
Anything does everything better than C.
 
here's my dilly
 
Xeo
@Maxpm You mean procedural programming, not imperative
 
Assembly is better than C? :P
 
@Xeo I think I do.
 
I've never ever even heard of a "composition vs. inheritence" thing
these things just seem so obvious to me
of course my specialized file i/o isn't going to inherit a buffer, it's going to use one
what sense would it make to inherit a buffer?
 
1:55 AM
You see, a CAR has a ENGINE but a CAR is an AUTOMOBILE
 
Xeo
@stdOrgnlDave Fun fact: C++ iostreams inherit their buffer
 
They also inherit a shitty design
 
+2 to @Pubby
 
cout is kind of a WTF.
 
Xeo
Atleast they have a reason to inherit from their buffer :P
 
1:56 AM
is there anything more wtf about stl than iostreams?
 
user406009
C++ iostreams do tend to such in general though. Ah, beaten to the punch.
 
@Pubby Right. But the C++ community -- or at least this chatroom -- seems very averse to inheritance on principle. The context of the quote I linked to was this:
Someone was supposedly making a game, and had different types of abilities descend from a parent ability class.
 
@Maxpm inheritence is a problem because it can get way out of hand. I worked at a company where we were refactoring a "guru's" code. I mean, I was hired just after they fired that guru, and the new guru was rewriting most of the code. and he was doing it right. anyway, this old guru - he had, literally, classes inheriting from more than 20 other classes at a time
no exageration
 
His game's architecture seems perfectly logical to me. Every AoE ability is an ability, every targeted ability is an ability, and so on. But the first thing anyone had to say was that it was an outdated concept.
@stdOrgnlDave To reuse the base classes' code?
 
well, how were the abilities used? were actor objects inheriting them, or using them "compositionally"?
 
Xeo
1:59 AM
I tend to abuse inheritance for categorization
 

« first day (571 days earlier)      last day (4378 days later) »