« first day (814 days earlier)      last day (4135 days later) » 

5:00 AM
@Rapptz I didn't come to CS to hear word jargon. :c
I came here FOR THE MATH.
 
@ThePhD vector was picked to name something for C++, which is not something from math.
 
@Rapptz <--- In this message, he didn't monospace the name vector. That made me think as well that he was talking about a regular math Vector. PLUS, he assumed using namespace std;, which is bad.
std::vector, and I totally would have caught on.
 
Your previous message was std::vector for a container sounds pretty bad.
so I wrote as a reply "Did you write your own vector class too?"
 
Seemed pretty obvious to me.
 
Iiiii thought it was still related to the matrix stuff, that and what you linked me what about VecExpression! Why am I the only one who sees it this waay? D:
 
5:02 AM
I don't know. I don't like valarray anymore though.
 
what's up
 
Am I the only one who thinks std::vector makes sense in the mathematical definition too?
 
I was thinking about that yesterday
 
@Rapptz No.
I had a discussion with the duck about this before.
 
It's not named randomly like that
 
5:04 AM
std::vector in a Vector (the math style) class is dangerous because it's heap-allocating, all the time. You don't want heap-allocation for what could reasonably and easily fit on the stack.
 
@ThePhD No.
You want dynamic allocation for what needs to be dynamically-allocated.
Stop thinking like a game programmer.
 
It all depends, if you know that you need frequent acess, not going change the size, and the elements that you will store are small, arrays are for that, otherwise vector wins
 
@R.MartinhoFernandes But game programming is awesome. :c
 
Problem 28 was easy and fast
 
I feel bad when I use "game programmer" as an insult, because I know there are decent ones out there, so I will use "bad game programmer" from now on.
 
5:08 AM
@R.MartinhoFernandes I... uh... care to qualify that?
 
@AndreiTita Already did :)
Sorry.
 
Hmmph.
 
@R.MartinhoFernandes Not about using it in a negative way (w/e). But just what did you mean?
 
Well, I am among the 'decent game programmers'.
The lowest I'll go is semi-decent.
 
What kind of games have you done?
 
5:09 AM
After that, no-dice.
@lekroif All kinds. 1 tetris-like, 3 spaceship-shooter-like, one RPG, one Platformer, and now I'm trying to do something new.
Beat-em-up, RPG-like, maybe?
I dunno what to call it.
 
hack and slash?
 
@lekroif Uh. Maybe? I dunno.
QUESTIIION
If I have a small struct that is stack-initialized and passed out of a function by value,
 
@AndreiTita Well, in this case I was going mostly for the idea of using broken semantics in the name of silly optimization gods.
 
Do I gain any benefit from initializing that struct with the values I want VIA a constructor or even VIA a brace-pod-initializer?
@R.MartinhoFernandes Hey hey, std::array for small values of 'N' is not a silly optimization. :c
 
@R.MartinhoFernandes Ah. Ok. I see your point. Carry on.
 
5:12 AM
@ThePhD Isn't that the default?
@ThePhD If the number of values is dynamic, use std::vector.
 
@R.MartinhoFernandes I was just slightly confused about the stack vs dynamic allocation thing.
 
If you want to optimize that, use a small object pool for allocator or an arena or something.
 
Well with a mathematical vector, you are usually dealing with fixed-count number of values. Unless you're doing large-array work or something. Usually inputs and outputs are fixed.
 
Meh. What's the strike modifier?
 
Thanks
 
5:13 AM
@ThePhD Fixed/variable-count is orthogonal to dynamically/statically known.
 
I see your point.
.... I think we're saying the same thing.
 
Well guys. It's my birthday today.
As of 13 minutes ago EST.
 
@Rapptz HAPPPPPY MOTHER FUCKin' BIRTHDAY BROOOOOOOOOOOOOOOOOOOSEEEEPHH.
I would give you a kiss but I don't think you'd appreciate it.
 
OMG you're old!
 
I wouldn't, no.
 
5:15 AM
Happy Birthday!
 
@Rapptz Happy bday then :)
 
Thanks ^^
 
Hmm, newbie hints pin is gone. I'm too lazy to put it back in.
 
@R.MartinhoFernandes On my Skype it says I'm one hundred years old, so yes I'm old.
 
@Rapptz Is that in Skype years?
 
5:16 AM
One day, I'm going to have a beard so long
That I will be able to sweep it off my stomach
and challenge people to eating contests.
 
@R.MartinhoFernandes It's hard to think of something witty..
 
That reminds me I need to shave.
If one of you writes the new newbie hints message, I will pin it and your name will be on the starboard for 14 days!
 
@R.MartinhoFernandes Uh, going back to that. I dunno, man. I could just get rid of a lot of for-loops if I wasn't brace-initializing a lot of things. For example: RVector4<T> r = {x + right.x, y + right.y, z + right.z, w + right.w};
How would you write a new newbie hints message, though?
Isn't there liek a requirement for it to be bolded or have hte rules link?
I don't even know how to bold shit in chat. :c
 
@ThePhD That's all it takes.
@ThePhD **
 
BOLD __BOLD__ also works. I think it's more bold than BOLD. Not sure. Nope.
3
 
5:18 AM
... So double or nothing.
 
TIL: many (well, 2) new chat modifiers.
 
Markdown needs help.
 
:(
 
If you're new, RTF Newbie Hints M before doing anything else!
How's that?
 
5:20 AM
Needs more swears and arse jokes
 
I don't evne know
Where hte rules are
 
Yeah, it also needs a link.
 
You know, my code isn't pretty either.
 
5:23 AM
@ThePhD If only it were that easy.
 
It's okay.
 
I don't think that's a good idea (I can't even draw the connection between the newbie hints and writing code)
 
Awww. :C
Well, I gave it my honest shot.
 
I know how to teach recursion. Just ask the kids to fully define something in the standard. They'll get the concept before long if you stick to ones like A prvalue (“pure” rvalue) is an rvalue that is not an xvalue.
 
TBH I'm glad it's not starred, though. I'd have to have everyone read that code. For all eternity. ;~;
Or just a few days, but really.
 
5:24 AM
At least it tells them where the rules are.
 
@ThePhD You suck at this.
 
NO STOP STARRING IT DAMNIT.
4
 
If you don't want to be hated here, read the Newbie Hints. Seems to be the popular way of doing it lately.
 
You're all SO MEAN. ;~;
 
@Rapptz Needs more bold.
 
5:25 AM
Maybe italics too.
Let's see if I can break markdown.
 
**Shiny!**
Wow you suck Markdown.
 
Oh that's you bold shit
ALL YOUR BOLD ARE BELONG TO US
nice
 
If you don't want to be hated here, read the Newbie Hints.
21
 
__Bold?__
 
Damn it I can't believe that worked.
 
5:26 AM
Damnit!
 
@Rapptz Seems good.
 
How u do dis? :c
 
Isn't it just like this?
Three stars, easy peasy.
 
....
 
@Rapptz Congratulations, you have won the first "Design the newbie hints message contest" ever!
 
5:27 AM
So you can't mix-and-match?
Fuck you, Markdown. Fuck you.
 
@ThePhD TIL I learned this
 
@Borgleader "today I learned I learned this"?
 
YES!
-.-;
TIL I'm a retard
4
 
@Rapptz It's probably true.
 
Everyone's had this once: TIL TIL
 
5:28 AM
@R.MartinhoFernandes Do I get a complementary cake too?
 
It's a recursive TIL.
It's meta is beyond our comprehension.
 
Learning to learn!
 
@Rapptz No, all you get is a pin. We are low on resources (i.e. we don't have any) to give away prizes.
 
Damnit, I can't remove stars from messages. :c
 
If you want you can look at my ugly code for comparison.
:P
Though it is nicer looking than yours by a long shot.
 
5:31 AM
It's really nice that Coliru saves the last code snippet you typed out
That's really thoughtful fo it. /cc @StackedCrooked
 
@Rapptz Is that supposed to make him feel good?
 
What about my standard C++ only putting a timer on input code? That turned out pretty badly.
 
I wish there was a 'new' button, though. That would make erasing it just a bit easier and make me <3 Coliru even more! @StackedCrooked
 
@R.MartinhoFernandes Yes.
 
@ThePhD You should plink @Stacked.
 
5:32 AM
I think the term is 'Clear'?
 
@chris Hehe, I remember that.
> Sometimes we can come across such machines that it seems their design has been inspired by some fantastic novels. These ones have been found somewhere in Ryazan.
 
That's a pretty interesting looking harvester, haha.
 
@R.MartinhoFernandes When civilization collapses, those will come in handy.
 
Also, which should I be doing to be less bad? And is there (even in the tiniest bit) a performance gain associated with either one?: stacked-crooked.com/view?id=fbf1f8e5f83b94397d693f0375936210
 
@R.MartinhoFernandes In Soviet Russia, machine harvests you.
 
5:35 AM
@ThePhD Here ya go
 
@R.MartinhoFernandes, What about my concepts thing? That was just a test to see if the syntax would work out, but it was interesting in its own little way. template<typename T> CONCEPT_FUNCTION foo() REQUIRES(std::is_default_constructible<foo>) && REQUIRES(std::is_class<T>){}
 
@Rapptz That really doesn't look that ugly.
 
Uglier than that would be C.
 
on fire now three Euler problems in short time
 
@chris auto and decltype?
 
5:37 AM
@R.MartinhoFernandes, Pretty much, but I had to make a class that overloaded operator&& to get the return type right, which reminds me that I forgot some of it.
RETURNS(int && REQUIRES(...) && REQUIRES(...))
And it didn't work with void. I wasn't going any further than I did.
 
@ThePhD ADDSS, or ADDPS or something. Or Eigen.
 
Oooh. Wait a second.
 
@ThePhD BAM. Functions.h.
 
@Rapptz: ㅏ ~= aw, ㅐ~= ae?
 
@ThePhD I would never use the second.
 
5:39 AM
@Borgleader Sounds right.
 
Either I would use the first one, or the first one with variadic indices, or the ADDxS thing.
 
cool
 
ADD... PS
Never heard of such macros
Are they for SIMD?
 
SIMD means Single Instruction Multiple Data
 
Ah.
Yeah those are SIMD thingies.
Well, now I know how to SIMD my code!
 
5:41 AM
Those are the names of the SSE instructions. I don't know what the names of the compiler intrinsics are.
 
Yaaay~
 
I'm pretty sure that functions.h header is the ugliest code here though :P
 
I think I'll just make a million SSE instruction macros
 
Yeah dude, Eigen looks nice.
 
5:42 AM
@R.MartinhoFernandes You're never going to tell me to stop using preexisting libraries, are you? :c
 
Because that is the smart thing to do.
 
Yeah, but learning... ;~;
 
I reinvent things to learn too :D
 
That, and it's also for the purely selfish reason that I hate using all these underscore-based apis. ._.
 
When you create a Daum account, you get an email address correct?
 
5:44 AM
get_infinite_perspective_projection GRAGHAGHAGHAGH Table-Flip.
 
I thought naver was more popular
but yeah you should
 
Write inline wrappers?
 
But I can't get them on the class that I'm working with, which is usually what bothers me the most.
StringExtensions::Split ._.
StringEx::Format
 
Just fucking deal with it.
 
NEEVEERRR
 
5:46 AM
@ThePhD, Who needs member functions anyway? Make the members free functions in the first place :D
 
@chris Starting to sound a lot like C, man.
 
At least the ones you can.
 
But in all seriousness when I knuckle down and I create a game for real, I'll take @R.MartinhoFernandes's advice and just do library-glue for all my needs.
I will also not miss words in whole sentences.
Besides, I can only get away with doing this ridiculous shit because I'm A) Working alone and B) not on any kind of serious deadline for anything serious at all.
So it's basically the learning time. I'm sure once I sell my soul to Industry I'll get flayed alive for ever suggesting I roll my own anything and be sent to the maggot-infested brig.
 
Anyway, as you can see in the reference I linked to above, the intrinsics are named _mm_add_ss and _mm_add_ps it seems.
 
va_list* va = new va_list; ;_;
3
 
5:49 AM
Oh gawd.
 
@Rapptz .... Wat.
 
Oh gawd. What.
What is that.
 
lol
 
What is this, I don't even.
 
My eyes.
Cannot unsee.
 
5:49 AM
See ThePhD, I told you I had uglier code somewhere!
 
You wrote that and did not slit your wrists? You are brave.
 
it was for the dark times.. of hacking games for the lols.
 
Forgive us, Robot, for we know not what we do. :c
 
Fuckings! Users fill in disk again. Borat add alias cp='rm -rf' alias mv='rm -rf' to /etc/profile for free disk spaces. Great success!
 
It's the first time I've read it in probably 3 years and I stumbled upon that line and figured it'd be one of the ugliest things posted here.
 
5:51 AM
You figured right.
 
I have really old code.
I'm not sure how bad it is.
... Do I look?
 
I'm not sure how much worse your old code can be.
 
The good thing is, I can star Rapptz stuff and it'll disappear my own stuff. :D
 
I look back to code I wrote a few months ago and hate it.
 
I found void main(void) :D
 
5:53 AM
@Rapptz I don't know how much worse. If I never look, I can say I wasn't too bad back in the day. Nobody will ever be the wiser.
Ignorance is bliss.
 
Well I don't know how long you've been using C++ for.
 
@R.MartinhoFernandes I think maybe that's why the DirectXMath builtins for that kind fo stuff are like XM_* named, because of those _mm prefixes. Could just be a guess, though.
 
But I think most had their C with Classes phase..
I think.. right guys? :( I'm not alone in this?
Guess not :(
 
@Rapptz I probably did, considering I started C++ before the STL. I don't really remember, but in all likelihood I probably had a "C++ like Pascal" phase, since that's what I migrated from.
 
Apr 18 '11 at 1:46, by Martinho Fernandes
I know C, and I know OOP. I've also done some C-with-classes stuff in the past. But now I want to learn C++ for real. I got Bjarn's book. How far can I safely skip?
 
6:04 AM
Whoa really? Just last year? Well almost two years ago now.
 
Meh, the Lounge is really counter-productive when I have to write simple code in the meantime.
 
:)
@ThePhD I suspect the XM comes from (Direct)XMath.
Though it may also be from xmm.
 
My friend just pointed out something great. A StackOverflow Hall of Shame.
Where the most downvoted posts gather to be laughed at by oncoming programmers.
 
I wonder if I can make comparison from 2011 to now.
Even then most of my coding was hacking stuff.
void WriteMemory( unsigned long ulAddress, unsigned char ucAmount, ...)  //The bytes
{
   MakePageWritable(ulAddress, (unsigned long)ucAmount); //Prevent access violations

   va_list* va = new va_list;
   va_start(*va, ucAmount);

   for (unsigned char ByteToWrite = va_arg(*va, unsigned char), ucIndex = 0; ucIndex < ucAmount; ucIndex++, ByteToWrite = va_arg(*va, unsigned char))
   {
      *(unsigned char*)(ulAddress + ucIndex) = ByteToWrite;
   }

   va_end(*va);
   delete va;
}
 
Ooh, just found something on meta for the lists. That's awesome.
What's this? An answer with a score of -23 and a +500 bounty? stackoverflow.com/a/216406/962089
 
6:17 AM
:stackoverflow:
 
@chris Yeah it's pretty old. I remember seeing it a long time ago.
 
6:31 AM
-2
Q: Are goto statements efficient when compared to calling functions?

PhilI have the following code in C++ here: #include <iostream> int main(int argc, const char * argv[]) { goto line2; line1: std::cout << "line 1"; goto line3; line2: std::cout << "line 2"; goto line1; line3: std::cout << "line 3"; goto line4; line...

 
6:43 AM
^ that is bizarro
 
Meagar, I was programming with gotos in 1986. — Phil 56 mins ago
So, yeah. Phil goes on the list of "do no interact with".
 
He voted to close his own question lol
 
@Rapptz, I did that last night.
It's still sitting at 4 votes, though >.>
 
This freaked me out.
Not gonna lie.. I was pretty confused.
 
6:57 AM
:D
 
Yay, some new starcraft to watch.
 
watch?
They have a TV-series or something?
:)
 
They have a lot. But I only watch a couple of casters.
 
7:23 AM
I think I might finally be getting over that all of my answers are comments phase.
 
@chris Nothing wrong with that.
 
@AndreiTita, It was getting to the point where people were feeling guilty for basically copying what I put in a comment.
 
:))
 
And I have no bad feelings toward those who did copy any or all of it (after all, there is usually one generally accepted way to do it for the types of questions I did that to), but things seem out of place for it to keep happening time and time again.
It also might leave an asker wondering how to accept it when there are no answers up. I've actually had someone ask how to accept my comment.
I guess the lesson is that an answer doesn't have to be extensive - short and simple ones work just as well.
 
8:18 AM
@chris I've been asked to move my "comment" that answered the question into an answer so it could be accepted. I usually try to give a little more explanation and detail when I do so though. Not sure it's really an improvement, but it usually seems to me like the right thing to do.
 
@JerryCoffin, Of course. I tend to want to write much more than I need, though.
 
@chris To answer your question (the "what's this"): at least IMO, it's a very good answer that happened to point out a problem a lot of people didn't want to hear about.
 
Oh, I was wondering what you were talking about there :p
It reminds me of the goto stuff.
 
mornin'
 
Good morning.
 
8:29 AM
mornin
 
morning maties
@Ghita indeed, there are times when code is so badly written and tested that when it breaks, you can logically work out where in the code the fault lies or have to simply rely on memory dumps. I pity the man who has to maintain such code, and scorn the fecker who wrote it in the first place. — thecoshman 22 secs ago
I might be in one of those moods...
 
mawning
man, I overslept this morning
I forgot to put my alarm last night
bwah
 
put it where?
 
I meant turn on
ffs, I'm not even remotely awake
 
sleep-browsing? has it really come to this?
oh dear... it just finally hit me... I slept very badly last night, spent most of it not much deeper the 'resting'
 
8:41 AM
@JerryCoffin What annoys me the most is the comments with people giving examples of search-like loops as good examples of uses of break. All I can think of is "Y U NO ALGORITHMS"
 
@R.MartinhoFernandes too hipster
 
No standard C++ way will do that without lingering effects unless your program ends right after the input. Even if it did, I wouldn't recommend it. — chris 17 mins ago
@chris speaking from experience, huh?
 
Some one REALLY likes ssh, check the recurring comments in all the answer to this question
 
@R.MartinhoFernandes, The goto? I used it when I found out about it soon after beginning C++, but stopped rather quickly. I'll use it if it makes more readable code, but it rarely happens to be the solution I'm looking for.
 
@chris No, the timed input thing.
:)
 
8:48 AM
@R.MartinhoFernandes, Ohh, I didn't notice your quotation. Yeah :p
Don't worry, I won't ever recommend doing it or give details on how to someone looking to just get some crappy system working. Maybe to someone with genuine interest of how it's done just to know, but not to use.
 
user142019
So.
 
user142019
I just went all the way to Rotterdam to school for two minutes.
 
user142019
:v
 
@R.MartinhoFernandes that answer using timers and checking the cin buffer, is that all st'd c++?
@Zoidberg could be worse
 
user142019
Also good morning. First morning in a week that I'm awake.
 
user142019
8:52 AM
@Rapptz Not gonna lie? There's cake! It's a lie!
 
@thecoshman, For Timer, you can implement it using <chrono>.
 
@chris yeah, I didn't think there was a st'd function/class for doing time outs like that
 
I didn't think in_avail would work for that, though.
Can't say I know too much about the stream buffers, though.
 

« first day (814 days earlier)      last day (4135 days later) »