« first day (1936 days earlier)      last day (3100 days later) » 
00:00 - 18:0018:00 - 00:00

6:00 PM
yeh it's just odd
 
The complimation model being easier to implement is only a side effect, when you realize that defining your program's data and interfaces separately, before you implement, is highly helpful.
 
user4704
So header files and the preprocessor are a practical neccessity to avoid manually repeated yourself all the damn time
 
Ugh...
 
you basically end up writing 2 things to declare your type
one that defines it then another that ... defines it with code in it
 
I've decided in my latest project that I'm not using standard inclusion guards. If your compiler doesn't support #pragma once, that sucks for you.
 
6:01 PM
@JoshPetrie C# doesn't repeat itself all the time and that doesn't need them
 
Imagine you are machining a car engine, working on each part in isolation, you might have ideas like: Oh, I could improve this duct a little bit by rounding it better.
 
@Wardy because C# does more than one pass when compiling, unlike C++
 
After building 10s of parts in isolation, and the idea of the system itself has slowly morphed in your mind, you have some minor incompatibilities now
 
Am I the only one who actually kind of likes macros (not that I abuse them)?
 
Ok, long story short...
Implementation is part debugging.
 
6:02 PM
@IcyDefiance hense the msil + jit
 
Writing .h files is designing your code.
Writing .cpp files is debugging your implementation.
 
does c++ not msil compile too?
 
They are separate phases, do you see, or am I talking to a wall here @Wardy?
Ok, wall, got it!
C# is convenient and great, but they very VERY clearly did not understand the reason for dividing these phases.
 
uh there are interfaces for that
 
Surely some maintainers do realize it, but then you can justify it because it's supposed to be convenient for the programmer.
 
6:04 PM
nah C# interfaces serve a different purpose
 
Who needs that. I just use goto statements for everything.
 
the object explorer in visual studio would be the closest thing to a header file
 
And while, yes, it is amazingly convenient... It guides newbies away from the light in that respect
 
@IcyDefiance that makes sense, its a high level look at the project and the containing types and their definitions
 
6:06 PM
I promise any and all of you that you either already know what I mean, or you stand to increase your productivity in large projects with that advice.
 
but if thats all they do ... why could c++ not just have that in the object explorer?
 
Note that the same thing will happen if you use Java for too long.
 
object explorer isn't part of the language, and before bulky IDEs like VS became common, object explorer didn't exist
hell even in VS, I'm not sure if it exists for C++
 
@IcyDefiance probably not
 
if you're writing code in vim, header files are pretty nice
 
6:08 PM
I'm gonna try to re-state it in a fresh way... but this isn't a quick simple concept to portray...
 
I use YouCompleteMe for vim.
 
shit, my headphones are starting to fall apart. guess that's what I get for buying a $40 pair.
 
Maybe @Ali.S has figured this out, lets roll the dice. @Ali.S Main benefit of header files?
 
ATH-M50x.
Good sound. Could be a bit more comfortable though, TBH.
 
@MickLH what?
 
6:10 PM
what I really wish VS could do is implement a header file after it was typed out. just click a button and it autogenerates variables and empty functions in the cpp file.
maybe it can but I didn't see a button like that
 
oh...
 
Thank you
 
headers are there to reduce the compile time
 
God damnit
 
that' the biggest benefit
 
6:10 PM
lol
 
That's the same side effect Josh pointed out
The one I spent 10 years thinking was the main benefit, before I understood something that the best programmer I've ever met told me.
> "Write your code, then debug it."
 
user4704
@Wardy C# makes hundreds of passes over your source code.
 
user4704
Or at least tens.
 
actually I can think of another benefit...
reading header files is way easier than reading the code
meaning you can search through them way faster...
 
user4704
The compilation model of C++ comes from an age where optimizing for certain things -- namely separate compilation of TUs -- bought huge gains.
 
user4704
6:12 PM
That's not really the case any more so modern languages optimize for different things.
 
@JoshPetrie i doubt its that many but sure, these days I wouldn't consider compile times an important thing though I do accept that at some point in the past cpu cycles were costly
 
@Ali.S Now we're touching on it... They describe the entire program, the data structure, the interfaces, even hint at the intended usage
All without describing the implementation at all
 
@MickLH again that's just not important in modern languages with modern IDEs
 
Personally the only time I find compile times an issue is when my solution is too big and needs breaking up in to smaller packages
 
user4704
@Wardy Definitely tens. Probably not hundreds; it dpeends on what you start to consider a pass
 
user4704
 
that just forces me to work more structured
 
@Ali.S stop you already proved to not be up to date on this topic
Compile times have not mattered for years, C++ has kept updating though.
Do you think they just... missed that?
Writing the .h files is writing your code. By the time you write .cpp files, all the algorithms are invented.
> all the algorithms are invented.
The code is already designed, when you're done with the .h files.
Writing .cpp files is DEBUGGING.
 
@MickLH they didn't miss it.. it was just too costly for a well established language to change it's paradigm
 
user4704
@Wardy (and no, C++ doesn't compile to IL)
 
@Ali.S We can easily just add the capability for the compiler to do multiple passes in C++11
And just let it infer the .h from the .cpp
And still be backwards compatible, so your argument is demolished completely.
Feel free to show me proof, but it will be fallacy, since your argument was already deconstructed accurately.
 
6:15 PM
@MickLH actually it's not that easy...
 
> Writing .cpp files is DEBUGGING.
4 mins ago, by MickLH
> "Write your code, then debug it."
 
@JoshPetrie this is an interesting read ... give me a minute to digest
 
I prefer to debug code that I haven't written yet.
 
Does anyone get it? or should I just go back to making 3x as much as anyone else on my team?
 
user4704
It's a bit outdated now I think, but if anything they probably added more passes. One could poke around in Roslyn to be sure but I can't be bothered :D
 
6:17 PM
@MickLH not sure it can be explained any clearer than what you've done, lol
 
@MickLH I think I get it :)
 
@MickLH it's not that we don't get it... it's just that we (at least me) don't agree with you on that point
 
@Ali.S Just for your sake, I will re-iterate that I would have agreed with you for the last 10.5 years.
 
@Ali.S You are .5 years too late.
 
@AidanMueller ?
 
6:19 PM
there's snow outside right now. we're all .5 years too late. need to back to late spring when it was warmer.
 
Woah awesome context, now generalizing to 0.5 years off is accurate, because 0.5 years early would work too
 
@JoshPetrie they could easily do the bulk of those passes in 1 hit
 
@IcyDefiance Snow? LOL. 56 degrees and sunny here.
 
there is one thing i like about header files though ... forces the c++ dev to design code interface first
promotes good design at least
 
:)
 
6:24 PM
...which is exactly what MickLH was trying to say.
 
I do that in c#
 
don't get upset @AidanMueller, this is how he accepts my advice lol
 
Haha.
 
its not forced on me ... but i do it anyway
 
@MickLH when I write code... I actually start by writing the listing the main features that the code is supposed to do (writing headers)... then I start writing their implementation, using whatever function I need without caring if I already defined that function (writing cpp)... then I go back to headers and add the functions I've missed, come back and implement those...
 
user4704
6:24 PM
@Wardy Sure, but the point is they do more than C++ does, that's all.
 
I go back and forth until there is no function to implement
 
I used to do that too but it screeches large projects to a halt quickly
 
it's not really about which one should come first it's all about how I think... and separating them isn't that useful
 
@JoshPetrie yeh i got the impression that some of those passes were because the language was doing something new / not need in c++
 
The problem with that is that you end up implementing features that you don't necessarily need.
 
6:26 PM
@Wardy problem is it doesn't... despite the whole promises that method offers, it'll actually perform worst (in my experience)
 
lol
You'll see the light eventually, @Ali.S
 
@Ali.S you start with a design then implement it
not the other way round
 
It only feels worse because you don't get the positive feedback from the program itself working
 
user4704
One of the bigger ones you need headers for is name declaration, for example, if you make one pass to look for names and do nothing else, before you do a pass to actually compile things, you can avoid the need to pre-declare everything.
 
I prefer to think about things as objects now. What makes sense to be an object. What belongs where.
 
6:28 PM
@JoshPetrie pre declare?
 
I always end up over-engineering/over-complecating things when I try to design first... which is pretty useful when I don't have a clue what the code is going to look like (for the few days before I actually start the project)
but after that it's just a waste of time...
 
@AidanMueller yeh this whole conversation is essentially about the interfaces of those objects (and how the compiler reads them)
 
Which is why you add functionality as it's needed.
 
so question ...
if something isn't in a header file
will the compiler not compile it?
 
@AidanMueller the key is "as it's needed"... and you don't really know what's needed before getting dirty with cpp
 
6:29 PM
After being really disciplined and fully designing a system on paper, then spending over a week writing code, and then compiling it and finding that the only errors were ~2 obvious typos and then it works flawlessly as intended... The reward of seeing your program half-work early is no longer enough.
 
or will it throw an exception
@Ali.S don't you? ... i guess that depends on your design depth
 
Ah perfect! "design depth" that's pretty much exactly where I'm going with that point.
If your design does not go deep enough to know what is necessary for.... your design
Do I need to finish that sentence?
 
user4704
@Wardy The compiler doesn't generally care about header files.
 
huh?
I htought you guys were saying they are needed to reduce the number of passes it makes
 
user4704
The compiler doesn't make a distinction; you give it a file (usually a .cpp) and it compiles that file.
 
6:31 PM
@MickLH what if I told you desiging that usually takes me about 5-10 minutes (for most of things I've ever did). and comparing that to what other people in my team do... my solutions are usually both faster and easier to implement (though more complex sometimes)
 
user4704
You usually do not give it header files.
 
hmmm now im really confused
 
user4704
Because the compiler runs the preprocessor on the input .cpp, which resolves #includes by doing dumb textual copy-paste.
 
@Ali.S What if I told you spending another 5 - 10 minutes on design could save you >10 minutes on the "back and forth" later?
 
user4704
And by pre-declare I mean that C++ requires you to do: void foo(); before you can call foo() somewhere.
 
6:33 PM
@Ali.S What if I told you, there is a critical "design depth" where the back and forth crosses zero?
 
@MickLH what if I told you all back and forth step is usually just adding setters/getters?
 
Then you only needed like... 1 more minute of design to save that back and forth :P
 
ok so the benefit of header files is nothing to do with the compiler now? its a user thing
 
I know but who cares... it only takes me one minute to go back and forth.. why should I bother with hypothesis when I actually test my solution before writing extra stuff?
 
user4704
@Wardy Yes, the benefit of header files is that you don't have to manually copy-and-paste or otherwise retype the definitions of things.
 
6:34 PM
but i never do that in c# either
and that don't have them
 
user4704
Because header files are how C++ accomplishes that.
 
@Ali.S 1 minute (back and) forth + 1 minute coding + 1 minute back (and forth) = 3 minutes > 1 minute design
 
@JoshPetrie does c++ not have namespaces then?
 
user4704
C# accomplishes that feat by doing an extra pass over the source code looking for names first. C++ expects all names to be declared above their first use.
 
user4704
@Wardy It does.
 
6:35 PM
you could put all the content of a header file at the top of a cpp file, right?
 
Yes
 
it's just a lot nicer to separate that into a new file
 
user4704
You can write C++ without header files just fine... but if you do so, and you have foo.cpp and bar.cpp and you want to use some class C in both, you have to manually write the definition of C in both source files.
 
C++ compiler can't handle #include
 
user4704
And it has to match exactly.
 
6:36 PM
The preprocessor literally does find and replace, replaces #include lines with their target file contents.
 
@JoshPetrie ah now im getting it
 
Then this big monster auto-pasted together file is compiled as C++
 
c# treats the definition as exactly that
c++ does not
it uses the headers for that
is that what you mean?
 
user4704
So to avoid that insanity, C++ uses a preprocessor so you can write that definition once and automatically paste the content of that definition into other files.
 
user4704
That's what #include does.
 
6:37 PM
@Wardy That's a skewed way to say "C# infers the definition from the implementation", but sure. Yeah.
 
@JoshPetrie ...And that would be fine, as long as foo.cpp doesn't walk into a bar.cpp.
7
 
I always thought of xinclude as basically doing the same thing a using statement does in c#
 
user4704
@AidanMueller I hate you.
 
@MickLH all I can say is that in practice these two methods won't make that much of difference in implementation time.... except I'm sure I critically need something before adding it to header...
 
@Wardy Not at all
 
6:37 PM
:D
 
@MickLH well thats what all those compiler passes essentially do
 
user4704
@Wardy It's way dumber than what C# does
 
2 mins ago, by MickLH
The preprocessor literally does find and replace, replaces #include lines with their target file contents.
That's it. 100%
All it does, and exactly what it does. Nothing special. Nothing hidden.
Automated copy/paste
 
so compiling c++ results in a ton of copying?
 
include doesn't even check if that file is already included...
 
6:39 PM
so common utils are copied all over the place in a c++ compilation result?
 
@Wardy yes, that's why compiling some C++ projects is very slow
 
that's why you see '#pragma once' in the first line of every header (or '#ifndef')
 
user4704
@Wardy Yes.
 
@Wardy You can use gcc -E to run the pre-processor only, this will literally stuff all the standard library headers into your program where you included them.
 
@Lasse ah so the header files remove the need to do that by copying the definition to 1 place higher up ?
 
6:40 PM
The resulting monster file, is actual C++.
We actually code for the pre-processor, and that generates the C / C++ for us.
 
compiler are beastly things lol
 
I feel that I got my 2 cents welded onto this merry go round now, back to work
 
@Wardy not every compiler... it's C++ that's overcomplicating stuff
 
I guess the reasons behind all this are legacy
 
user4704
Yeah.
 
user4704
6:42 PM
And inertia.
 
Except the part that Ali and Josh completely missed :P
 
@Wardy not all legacy... as we were talking with mick.. it has legacy roots... but it has uses even in newer days
 
The part where .h files steer you towards intelligent design, instead of trial and error evolution.
 
so would you guys say the c# compilation process is more efficient overall?
in terms of output
 
user4704
I dunno, I think that's a... complex metric to evaluate.
 
6:43 PM
Define the efficiency metric objectively, and I might take a stab at evaluating it :P
 
@Wardy that has nothing to do with anything said here
 
@MickLH good design should be inherent to all code ... c# just gives you the opportunity to ignore that
 
@MickLH I didn't miss... I just didn't totally agree
there is a big difference
 
@Ali.S If you can explain what I mean, I believe you.
Otherwise... otherwise.
 
I guess the only way to tell would be to write the same code in 2 languages and see what they produce ... i'm sure theres been tons on this in blogs
 
user4704
6:45 PM
@Wardy Even that is a bit flawed.
 
That would be a fallacy
 
By writing header files first (which most programmers usually do) and forcing programmers to think separately for headers, The c++ community is kind of forcing people to think and design the structure of their code, before trying to implement it
 
might go digging ... for some interesting reading materials
 
@Ali.S Thank you, for proving that your view is exactly what I expected.
 
@MickLH was I accurate enough?
 
6:46 PM
No.
 
user4704
Different languages have different paradigms and idioms for doing things; writing "the same code" in two languages can easily skew the results towards the language that better matches the idioms of the code.
 
well then... please explain... what I missed?
 
the oint is that surely what should be inmportant for a compiler is the output not its performance (although thats more a recent thing I would guess)
 
I genuinely want to know...
 
I am focused on "Why?" not "What?"
 
user4704
6:46 PM
@Wardy Well, no.
 
user4704
The performance of the code produced by a compiler is important.
 
user4704
But that is often dictated more by the language itself than the language's compilation model.
 
@JoshPetrie thats what i meant
 
user4704
The actual performance the compiler itself is also important.
 
user4704
Regardless of the quality of the output code.
 
6:47 PM
in some situations sure
 
user4704
That has a lot to do with the compilation model.
 
user4704
They are both important but mostly orthogonal concerns.
 
@Ali.S My main point on this topic is: When you debug a system, it changes the idea of the system in your head. Think about the joke where you should never write your best code, because then you can't debug it.
 
@MickLH ok... designing the code first will save you the cost of writing a code, and finding out in middle of it, that your design is wrong... you sit back... design everything completely. make sure everything is going to work as expected, and then start getting into implementation details
 
user4704
The compilation model can have trickle-down effects on the performance of the output code though.
 
6:49 PM
@Ali.S these are still side effects, or what I call "What?"
 
user4704
Modern C++ compilers can do, for example "link-time code generation" which is not something older compilers did because the compilation model of C++ rendered it impractically difficult and/or slow.
 
I am trying to explain the motivation, or what I call "Why?"
If you write half of a system in one idea, and half of a system in another idea, you end up with two batches of parts that maybe work together or maybe not.
 
ok?
 
If you design a system while the idea is constantly changing, you end up with a skewed system.
 
but who in his right mind does that?
 
6:49 PM
You have made it very clear that you do.
 
@Ali.S virtually every programmer that doesn't do design correctly to start with
 
even you change your mind during the implementation... you clear up everything and start writing it from scratch
 
bad plan
 
No, see, that's where the discipline comes in.
 
and that actually happens very rarely
then again I should emphasis "for me"...
 
6:51 PM
Don't go off track from your plan, write the code including the problems you find while coding. Note them into your TODO list, or your feature creep file, depending on urgency.
After you finish implementing your original plan, and have a complete list of problems, then you have a chance of fixing the design.
You have no chance to design a good fix, if you never even have the specifications...
 
That's not very agile is it?
 
I am the guy the "agile" teams call when everything is falling apart and timelines are closing in.
 
there definitely 2 levels of design
there's the 5 year business plan and the 6 month project plan that fits in that bigger plan
the 6 month plan should not change much
the bigger plan might
 
@MickLH I can not argue with that... it's already proven that you should be one of those guys...
 
all you can do is plan for that in the 6 month plan to cater for the change
 
6:54 PM
I have to really go now, otherwise I'm gonna keep going deeper into all these topics...
 
the thing is I'm one of those guys too... though I usually go with the fixing/patching route
 
I have a lot to say to you guys, but I really have to go
 
certainly within a sprint / iteration though, nothing should change or the plan wasn't right
 
@MickLH I wonder if we ever will be working on same project on same team... I'm looking forward to see that's going to happen
 
*Fast Forward...*
Ali: Hey mick, while you were busy not helping us at all, I got most of the problems fixed.
Mick: Hey ali, while you were busy wasting man hours, I got all the problems fixed.

... Interesting part happens now ...
 
Jon
6:59 PM
 
user4704
Don't go towards the light.
 
Jon
this was a WTF were they thinking moment...
 
user4704
You mean how the godrays appear to be coming from a place in the sky without a sun?
 
Jon
yeah, and the general mucky look that it does
 
user4704
heh
 
7:03 PM
@Jon isn't the sun behind a branch?
behind some clouds?
 
Jon
no, moving around there was no sun... it was a thunderstorm
 
user4704
I feel like the muckiness is due to some environmental effect, like the radstorms
 
user4704
seems like the sun should be disabled, and thus no god-rays, when that happens.
 
user4704
But I mean you are playing a Bethesda RPG, so.
 
their physics is tied to framerate, or did they patch that already? or are they going to?
 
7:34 PM
anyone know a way to copy the info from the unity console in to a notepad
I need to copy like 10 items
spose I could do them 1 at a time but I was hoping i could select them all
 
user4704
1) make the console really big
 
user4704
2) printscreen
 
user4704
3) upload to website
 
user4704
4) paste URL into notepad
 
lol
 
Jon
7:37 PM
highlight text you want to copy
Copy it
paste it into notepad
 
yeh cant in unity though
you can highlight a single item
i need to highlight about 100 items
nvm i'll pull in log4net
been lazy and not done it yet
 
can you shift+click to highlight more?
 
nope
 
weird
 
Jon
I think you can write code that will dump those errors to a text file
 
7:38 PM
yup ... typical unity if you ask me
@Jon its not errors
its my workload ... debug wrote out all the faulty stuff by checking for a condition
 
user4704
I find that this sort of thing is often overlooked.
 
user4704
The middleware we use at work has a similar problem; they went to all this trouble to create a log console.
 
user4704
But you can't copy more than a single line of output out of it at a time.
 
i know right
retarded or what
the least they could do was offer up some sort of config option to allow you to dump the data or something
im fixing the marching cubes tri table so it works with unity properly
 
Jon
heh, check this out
 
7:43 PM
ive got some voxel data in the state that it renders all the broken cases now im trying to create me a list of things to go through in notepad
 
Jon
%localappdata%\Unity\Editor\
@Wardy
That the log you want?
 
spot on
just as i finished
lol
gonna keep that little gem handy though
thx man :)
 
Jon
np
 
there wasn't as many as I thought actually
im down to just 30 or so now
 
8:05 PM
you get dam good at reading massive arrays of numbers doing geometry work
 
8:47 PM
why all the delays on this stuff
i asked a question, no one was able to answer, so I have a solution now and have answered
now I have to wait a day to actually ark the answer as the answer
retarded
 
third new computer in about a month
mostly configured again
 
wish i could afford that
jeez this is a long winded process
 
well, I had the punk compters Unity guys get. then i was on unreal 4, so they gave me a MONSTER. It stopped wroking after a few weeks. they gave me another monster. soon after, they moved me back to a unity project, so I have another punk computer
 
wtf .... why cant they just give you a machine and be done with it
is that some way of cheaping out on hardware?
 
9:02 PM
Yeah, I don't need 32 GB to work with Unity
Just running the game in editor on Unreal took 18 GB
 
Jon
9:37 PM
added a node to my network
dd-wrt wireless access point upstairs.. the laptop in my bedroom would stutter sometimes lol
plus I wanted more ports up here
amazing what they did with that firmware
converts 50$ routers into 2000$ ones
 
Pip
10:40 PM
@MickLH Fritzing can't autoroute two of my connections. Ideas?
@Jon yes, yes it does. It's pretty amazing
Aaaaand Fritzing just crashed trying to autoroute on the PCB layout
makes me feel like something isn't configured correctly
 
Jon
11:04 PM
i called my new wifi node virus.exe
 
I called my current one Numbers Station.
 
Jon
FBI MONITORING NODE
 
I've also done FBI Surveillance Van
 
Pip
11:28 PM
@Jon I've called mine ConnectToMe and 192.168.1.1 before :P
right now it's some meaningless default manufacturer SSID
 
00:00 - 18:0018:00 - 00:00

« first day (1936 days earlier)      last day (3100 days later) »