« first day (751 days earlier)      last day (4211 days later) » 

6:01 AM
@Mysticial what are you competing for? the grant/scholarship/???
 
@melak47 Competing to not fail.
 
@Mysticial that doesn't sound fun :(
 
Ell
I think I'm gonna sleep now
Nighty night all
 
Niiiight.
 
PhD in comp sci?
 
6:09 AM
Maybe. Right now studyting computer engineering.
At one point I was thinking about doing Biomedical Engineering specifically.
Or even something like Computational Genetics.
 
@ThePhD In theory that's probably where I should have ended up.
 
Should have?
 
I like computers, math, and science. Biomedical Engineering sounded perfect :P
 
My first love was actually Chemistry. I had a knack for building shit, even if it was just from nothing, and I could never stop messing with batteries or toying with ac adapters (much to my family's chagrin). I then slowly got really interested in biology. Everything fascinated me about biology. I was going to do Biochemistry, I was pretty sure.
 
Chemistry is my least favourite science.
It's god awful.
 
6:15 AM
It is god awful.
But the things you can -do- with Chemistry.
 
nothing
 
Allllll the fun things. Allll the fun experiments.
Dude, the cover-a-candle-with-a-cup-upside-down-in-water?
Chemistry, man.
 
Most Chemistry is boring, maybe Physical Chemistry isn't so bad but that's a stretch.
Biochemistry, Organic Chemistry, General Chemistry all of these suck
 
Well, true, I'll grant you it can be boring, but still. It can be fun. Just school usually sucks the life out of these things.
My love for chemistry was always from reading and doing stuff on my own.
School generally sucked the fun out of everything.
 
Chemistry died for me the moment I couldn't be a free thinker.
 
6:17 AM
You can free-think in chemistry, but there's so much shit to wade through before you make it to the toplevels of theory and stuff to do the free-thinking in the first place.
 
Every field has a set of rules and laws that dictate what the underlying concept is. Except Chemistry.
I think General and Organic are the biggest culprits here but for every rule there are always so many exceptions to the rules that the rule itself becomes meaningless.
 
Dat 1s2p blah blah blah orbits.
Dem. Orbits.
 
Fuck electron configuration. Grr.. Stoichiometry wasn't bad at least.
 
Stoichiometry made sense.
It's how I got a 5 on those stupid AP Exams.
That and Titration rules.
 
Which is why it doesn't suck.
 
6:20 AM
They were at least somewhat consistent.
Do This -> Get this
You could account for everything
It always cleaned up nicely.
But, yeah I guess Chemistry is all over the place with its rules. But then again, you're talking about the lowest building blocks of all of everything: electrons and neutrons and protons.
There's bound to be stuff we haven't gotten right, so the rules will always be flawed.
 
A quark ( or ) is an elementary particle and a fundamental constituent of matter. Quarks combine to form composite particles called hadrons, the most stable of which are protons and neutrons, the components of atomic nuclei. Due to a phenomenon known as color confinement, quarks are never directly observed or found in isolation; they can be found only within baryons or mesons. For this reason, much of what is known about quarks has been drawn from observations of the hadrons themselves. There are six types of quarks, known as flavors: up, down, strange, charm, bottom, and top. Up an...
 
QUARK.
Best name for sub-atomic particles ever.
Sounds like an animal noise.
 
Physics is cooler than Chemistry.
By like, a long shot.
 
Physics is the -shit-.
Once you get past deriving and stuff, it's amazing.
 
My first Physics class blew my mind.
 
6:23 AM
Coding it is another matter, but man.
 
There were just so many things in physics. I felt like I was drowning in a sea of knowledge.
 
And it was a good kind of drowning.
Like "I could die here and it'd be okay."
They say that Chemistry is just Chemical Physics, but eh.
It feels a lot less exciting except when you're actually doing applicable things
Not memorizing electron configuration and asked to fill in configuration charts. ~_~
Cobalt and Iodine experiments!
 
lol have you ever taken Organic?
 
Not yet.
Everyone tells me it's Murderous.
That it's the worst thing in the world.
 
I didn't have a hard time with it, I just thought it was the dumbest thing I've ever learned
 
6:27 AM
1
Q: C - check if string is a substring of another string

user69514I need to write a program that takes two strings as arguments and check if the second one is a substring of the first one. I need to do it without using any special library functions. I created this implementation, but I think it's always returning true as long as there is one letter that's the s...

any solution to ^^^^^^
 
You have 5 answers, pick one.
 
Or mash them up and answer it yourself. You've got a lot of knowledge swimming in those answers.
 
is their any one know to to change Stack overflow's profile pic ?
???
 
Go to gravatar.com and make an account and register with the same email as your SO account
 
@Rapptz can you tell me why he is using "const " int "my_strstr( char const *s, char const *sub ) " ?????
 
6:30 AM
What?
 
i tried but nothing happing ?
 
It'll take a while?
 
i did it before 5 days
but still nothing happend :(
 
Did you use the same email?
 
ye
yes*
 
6:31 AM
Are you sure?
 
yes
 
Did you upload your picture to your gravatar account?
 
yes
 
Then I have no idea.
 
oh
 
6:36 AM
urgh
7:36
I'm going to bed...good morning everyone :p
 
Gooood
mornight.
 
45
Q: Use of 'const' for function parameters

RobHow far do you go with const? Do you just make functions const when necessary or do you go the whole hog and use it everywhere? For example, imagine a simple mutator that takes a single boolean parameter: void SetValue(const bool b) { my_val_ = b; } Is that const actually useful? Personally...

 
In order to avoid all the -1's, I'm going to say this as a comment rather than an answer: because C++ sucks. — R.. Aug 13 '10 at 15:34
 
6:59 AM
hello, is this the proper syntax of typecasting: int i = (char)x;
and, why is the output to this code 6?
void main()
{
double d=3.1414;
char ch =  *( char *) &d;
printf("value of ch is %c", ch);
}
 
That's proper typecasting in the first thing you mentioned.
That second typecast is Hell On Wheels.
 
Why are you typecasting x into a char?
Use static_cast<T>()instead of C-style casts.
 
for an example @Rapptz
@ThePhD, can you explain why is the output 6?
 
what does this Q mean "Write a program in 'C' language which accepts the
enrollment number of a student as input and prints
the name of that student. The program should
initially store information about the (name,
enrollment number) pairs of students in the form of
a matrix."
 
char ch = *( char *) &d; will get your thing to compile, but it's not type-casting as you think it is. It's not getting the Language or Lexical string of what you want. It's getting the first 8 bits of x, and in the second example the first 8 bits of the value double
 
7:07 AM
we are supposed to search value from matrix ?
 
@ThePhD How do you deal with configuration files?
 
@Rapptz Wha?
 
how can we do search in matrix
 
Eh? Configuration files is pretty clear isn't it?
 
@Rapptz You mean like, something where you need name : value pairs or things like that?
 
7:08 AM
Yes.
 
... No? Yes. Maybe?
 
I thought you meant a dictionary, got confused.
 
Confusing. <__>
But yeah, things where you store like
 
Something like an .ini file.
 
MaxPlayers : 2
LastConnection : 50 seconds
 
7:09 AM
Yeah.
 
@ThePhD, I did not understand this part,
"It's not getting the Language or Lexical string of what you want. It's getting the first 8 bits of x, and in the second example the first 8 bits of the value double"
 
Also, I meant with scoping. I feel weird polluting the global scope, so I put the variables in their own namespace but that still felt weird. Which is the equivalent to a static class, I guess.
 
@AnujKaithwas You're not producing a string. A string in Programming is what we call regular english that we use to represent numbers and other things: it's text. Casting your int to (char) isn't producing Text. It's just getting the first 8 bits of the double or the integer, because a char is a single byte.
@AnujKaithwas You need a function that takes the double or int and converts it to a readable format so it can be output as regular Text on your screen. See printf, or read a book.
 
> cplusplus.com
 
oh i got it now. you were referring to the example, i thought you were talking about it in general.
I got it
 
7:15 AM
@Rapptz Depends on what it's worth. If everything in your game or program needs the info in the ini, a global/static class is the right place for it. If it's a little less than global, maybe a persistent instance on your main game class or something of that sort. If it's something you only need once, read it in, use it, and then chuck it.
It never hurts to have a global Settings though.
 
Feels wrong.
 
As for saving and reading configuration files, XML is too annoying to get a handle on (When you don't have a library or reader handy) and name : value still requires a parser, even though it's a very basic format.
If it's mostly numbers and not a lot of strings, just dump a binary struct to disk and then read it back in.
 
I'm probably going to use JSON for config
 
This sacrifices readability for simplicity and ease of code-use.
No idea what JSON is but go for it.
 
JSON ( , ), or JavaScript Object Notation, is a text-based open standard designed for human-readable data interchange. It is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects. Despite its relationship to JavaScript, it is language-independent, with parsers available for many languages. The JSON format was originally specified by Douglas Crockford, and is described in RFC 4627. The official Internet media type for JSON is application/json. The JSON filename extension is .json. The JSON format is often used for s...
 
7:17 AM
Ah.
Sounds like a good way to go.
If global feels too violating to you, you can always stick it in something like a Services container.
 
My solution to it was pretty bad.
 
It was?
 
I think so.
 
.... Oh.
I guess screen size is never going to change ever, haha.
Then again, I can't blame you. Most every tutorial #define 's the screen size and never ever expects you to do anything dynamic with it, haha.
 
I'm not even using a tutorial.
 
7:20 AM
#define SCREENWIDTH 800 // Every tutorial ever
 
Mostly because one doesn't exist for SFML 2
 
I don't know how SFML works....
It takes care of Window Initialization for you, right?
 
Yeah
It's pretty neat and easy to learn anyway so the tutorial bit didn't bug me, I just wanted to learn more about game design.
 
Ah.
 
Finding a tutorial for anything C++ wise is horrible anyway.
 
7:22 AM
^ Amen.
Um. I forgot what I was going to ask....
OH
What platform are you running SFML on?
 
It's cross platform but Windows.
 
With Visual Studio?
 
No. MinGW and Code::Blocks
 
Throws hands up.
 
?
 
7:24 AM
Now we're in leftfield, here. I haven't gotten at all comfortable with MinGW.
BUt I'll do my best to help
 
Eh.. not really that much difference.
 
... How did we get here again?
You just wanna know how to store your constants and stuff, right?
 
I asked how you dealt with configuration files.
 
Anything that you can easily save / load is a great place to start (binary dump), but
It may behoove you later on to get a human-readable format you can change easily (XML, I don't know how JSON looks in a file)
(Even name : value is good, so long as you can parse it)
 
JSON looks simple.
 
7:27 AM
Um. As far as things like getting the SCreen Width and Screen Height, for your purposes a constant really isn't a bad thing. If it makes you feel any better, sticking it on your game class and maybe setting it to something in the construct might be a little bit easier to manage.
 
{
    "firstName": "John",
    "lastName": "Smith",
    "age": 25
}
 
Looks pretty suitable for your purposes - as far as I can tell, anyhow.
 
The screen and math constants weren't what bugged me. It was the non-constants that did.
 
Well, looking at how SFML expects you to set up to set up your Main and everything....
A global Settings should be fine. Even just littering the gloal namespace with a bunch of Setting_{Name} would be fine (if you're feeling C-ish instead fo C++ ish)
Honestly, just do whatever works. YOu're in it for the game design, not the 'how clean is my code' principals. ;P
 
Man, game designers are ugly coders.
 
7:32 AM
I wouldn't exactly know. I'm not much of a game designer.
 
I'll see.
As for SFML, you can have function wrappers do most of the stuff to make your main function loop pretty.
 
sbi
I believe this is a dupe.
Oh, and morning.
@R.MartinhoFernandes Not that you had tried very hard.
@Xeo As a compensation, I could now call the robot's brand-new boss (some kind of "friend of mine") and explain to him that he is so tired because he had been chatting here until 2am. What do you think?
 
7:51 AM
yay reasonanly decent compooter
shame it's a mac, but close enough
 
sbi
bootcamp
 
ohai
@sbi that would look bad for Robot.
 
sbi
@TonyTheLion Not that his eyes will look better than that in any way this morning. (Says me, who went to bed at 1:30, and got up at 5:45. But then I don't have to work today.)
 
oh
@sbi Why you get up so early when you're not working?
kids?
 
sbi
@TonyTheLion Yep. Some of my kids I have to wake up at 6:15 (so this one my son will be in school by 7:30), and I simply like to have 30mins on my own in the morning to clean out the dishwasher, deal with laundry, prepare the table, meditate on the toilet, and/or read twitter.
Once the kids get up, I have to bully them through a merciless routine (imagine, getting dressed in 15mins, eat in under 25, and brush your teeth and hair in under 15!) enforcing which somehow tends to takes the joy and leisure out of my morning. :)
 
8:01 AM
I get it.
It's funny how you always bully your kids out of the house.
 
sbi
@TonyTheLion Yeah, you might get that, too, one day, but from what I understand, it's not in sight right now. :)
 
@sbi Nope. But one day it may still happen.
 
@sbi That's a lot of time to do those.
That would take me like.. 20 minutes tops.
 
sbi
@TonyTheLion I am sure that, should you ever see this, you would agree with me that this feels very much like bullying. :)
 
@sbi ah ok
 
8:05 AM
@sbi at what age does going to toilet turn into something you need to take litriture along with you for?
 
sbi
@Rapptz You know, I was being ironic. (Who'd have thought I could be ironic?) Yes, this is a lot of time (and those are the exact numbers!), but when I see those little ones sit on the couch and yawn, while I tell them that, if they don't get dressed within 2mins, the time will be taken out of their breakfast, I always feel like wielding a merciless whip on those poor kids.
 
@sbi have you offered them a more relaed morning regeime at te cost of getting up even earlier?
 
sbi
@thecoshman I dunno. I took a book there for as long as I remember when I felt like reading, or got back out as fast as possible otherwise. I have lost the calmness for taking a book years ago, though. Nowadays I'm usually back out in well under 3mins, to face whatever the day throws at me.
 
@thecoshman you don't know many children, do you? ;)
 
ergh.... 'plink' AT I HATE YOU!!! Y U NO ACCOUNT SETTING!!!
 
8:08 AM
lol
 
sbi
@thecoshman Of course. The problem is kids will use up with a flick of their wrist whatever time you hand them. If I wake them up 30mins earlier, they'll just take 45mins for getting dressed and I then have to bully them through the rest of the routine just as mercilessly.
 
@jalf you have to offer them the choice, "get up now, or I will have to get an even more encouraging whip"
@sbi logical conclusion, get up them later, bully them just as merciously
 
@thecoshman merciously?
 
mornin'
 
@sbi The wife's in Hamburg for a week. So the morning routine is up to me (I'm a confessed evening person as you might have guessed). Day 1 was a success :) They dressed themselves (even the youngest - which routinely appears at breakfast when it's time for brushing teeth over the last weeks) and were on time for breakfast. Even walked to school - shame about the rain shower :(
 
8:11 AM
@sehe turns out Safari is designed for people who have perfect spelling skills
 
sbi
@thecoshman Yeah, exactly. And then there's a pivot point where it turns more nasty again, because the amount of time available is too short. For us, that's 55mins. Incidentally, that's what we usually need in the morning.
 
@thecoshman Ouch. Wrong browser choice
 
@sehe my other options are a slow Raspberry Pi or my phone
next to no decent browser is the reason I dislike traverling
 
@sbi 7:30 8:35 (school bell) - roughly the same. I have a feeling your school itineraries are a bit more involved, though
@thecoshman ah. traverling. Thanks fro clearing that up
 
@sehe eye no wrods
 
sbi
8:14 AM
@thecoshman I am all for giving choices to my kids, but it has to make sense. When it gets too bad, I'll just point out that the consequence is that they won't have time to eat. Once, many years ago, I left a 2yo at home, because he made a scene rather than getting dressed. (Of course, I made sure my gf was home when I did this, so, "by sheer accident", she could "rescue" him.) That cured him, and left enough terror to even passing on to his younger siblings that I never had to do that again.
 
@thecoshman or a few excess wrods, one might say
 
@sehe one might say such, but one might not grasp what one means when ones says thusly
 
Grasp berry pie
 
sbi
@sehe The school opens at 7:30, classes start at 7:45. I want him to have some time in the morning, though, to get out his books and stuff, have a chat with his friends, etc. He's only 2nd grade, so it's not yet routine. Also, when we're late by 5mins, nothing bad will happen, and when we're late by 10mins, he can still make it, even though it takes some hurrying then.
 
@sbi I assume you wee one knew some what your GF. Else I can imagine it being rather horryifying beeing left in your house for some random girl to come out and start trying to take you to school
 
8:22 AM
@sbi Oh yeah, we have several 'shortcuts' in the program :) But principially, the first time budget that gets cut when kids are late due to them refusing to get up/dressed, will be the time to eat. So, we leave the table at the projected time, any unanticipated time loss after that will prompt a shortcut of some sort.
Allthough I must admit, only once did we actually arrive late to school, and that was when I sort of forgot the time school started in the afternoon (wednesday is my only full day at home and there is no afternoon classes for primary schools then)
@thecoshman Bug assumptions
 
sbi
@thecoshman You know, having kids, the number of random girls I woke up next to inexplicably tended to decrease.
 
@sbi Ow, put that last line separately for starring?
 
sbi
But yeah, after having told him that I'll leave without him for a week or two — to no avail! —, it was the full horror to him to have it actually happen. OTOH, he learned his lesson immediately, while his mother was even months later still complaining about the daily scene in the morning.
As they say, rather an end with terror than terror without end.
 
@thecoshman Oh wait. That vid i watched yesterday (@Xeo) was Minecraft? I thought it was some dodgy game the player himself created :) [I realize there is no real contradiction there...]
@sbi Precisely. Nice oneliner
 
sbi
@sehe It's what dict.leo.org found me for "Lieber ein Ende mit Schrecken als Schrecken ohne Ende", which is a very common German expression.
 
8:25 AM
@sehe you managed to watch that and not catch on it was about minecraft?
 
@thecoshman Well, it wasn't as if the logo or name was mentioned time and again. And no, I don't run a list of "probable game titles" to see which one matches
 
@sbi plus you get to, if so enclined, drop references to your ex. "so yeah, I just left him all alone, and let my GF pick up the peices"
 
It was called something with 'ABBA' - and the game looked fairly dodgy / unfinished. Granted the second half was less crappy visually
@thecoshman reclined
 
@sehe it is a a very subtale (no where near a closs spelling I am sure, though I know it has a bee in it) reference. I also can't help but feel it has some film reference as well
 
@thecoshman Well, that's even mentioned in there. Including a "Chess" reference
subtale -> subtle, bee -> b, a -> {}, closs -> close
 
sbi
8:31 AM
@thecoshman Actually, she was sick of the daily morning scene, too. It just so happened that one morning she could sleep longer than we could. I asked her whether she would rescue him, and she agreed that this would be a good thing to try. The goal was that he understood that there was a reason to not to waste time, and that he did. The goal was not to strafe him, so I wouldn't really leave him alone. Only he didn't know that this was intentional.
 
stupid Mac, getting all confused trying to load TWO gifs!
still, @sehe rough night?
 
@thecoshman You realize that this tells a lot about you ?
@thecoshman nah, no snow (nanosno)
 
@sehe no...
@sbi I was getting more at the rubbing into the ex's face in a sterotypical way that you have moved on etc. etc.
I've been waiting for like a week for a chance to post that gif for you sehe, I hope hope you rofl so hard you poop yourself a little bit
 
@thecoshman yeah that helps. And she can return the favour by demanding custody, arguing that the dad can't even ensure proper morning routine, abandoning the kid and leaving it to 'some stranger' to pick up the pieces. This is going to work a treat :)
 
sbi
@thecoshman May I point out to you that half of my children where born before I was married to their mothers? So for years I had to refer to "my girlfriend" when I was referring to the mother of a kid. To make things more complicated, what I referred to as "my gf" in that message is now another ex-wife of mine, and I have kids with her, too.
 
8:35 AM
@thecoshman As you can see, the rolling does not prompt unintended fecation. Sadly, I still have that headache
 
@sbi you may point that out to me
 
sbi
@sehe What do you mean "as you can see"? I see differently.
@thecoshman Consider it done then.
 
@sbi see the gif:
4 mins ago, by thecoshman
still, @sehe rough night?
 
@sbi You certainly keep lawers in bussiness don' you, what a good citerzen you are :P
 
sbi
@sehe That's what I did. Maybe it's my eyes, but to them it surely looks like you have a brown speck at your hind when you do that.
 
8:38 AM
@thecoshman lawers -> lawn mawers, citerzens -> citer zens
@sbi you know, that's normal; not unintended.
 
sbi
@thecoshman After my latest divorce, my lawyer told me "And I sure hope you've learned enough now that we won't have to meet again — or at least not for business!"
 
Pro tip: polar bears abhor undergarments
 
sbi
@sehe "Normal", eh?
 
there's a pun lurking between polar, coordinate, normal, but it's eluding me for the moment
 
@sbi AFAIK, most, if not all, mamals have a marked spot for such purposes
 
sbi
8:40 AM
@sehe Keep prodding it with your paw, and it might come out.
 
I think I'll bang my head on it some more
 
I don't like where these punpocalyse is going
 
@thecoshman puncopalypse -> pocahontas/calypso. That, or popocatepetl
 
@sehe that hurt to try to read, before you edited it
 
sbi
@thecoshman That coming from you does not lack a certain irony.
No, @James, the problem is that, whatever argument is presented, some C-zealot will still yell "but code-bloat!" and "it's doing stuff behind my back!" while covering his eyes and plugging his ears. And that's just the rational ones. The others do as Torvalds does, say things like "you are full of bullshit" instead of making any points, and honestly believe that this is any argument other than for them being infantile. — sbi 2 mins ago
Idiot.
 
8:50 AM
I may soon hae to choose between C and Java... well, I say choose
 
sbi
@thecoshman What do you mean, you have to? Can't you switch jobs?
 
@sbi that's what I am after doing :P
 
sbi
@thecoshman You mean that's why you're tarvelling?
 
@sbi Why would you do that?
Also, he's in Köln today.
 
sbi
@R.MartinhoFernandes What are you doing online at 10am? Shouldn't you be working?
@R.MartinhoFernandes I have his mobile number, you know.
 
8:55 AM
@sbi I'm about to leave the house. I'm just finishing this apple.
 
sbi
@R.MartinhoFernandes I thought you have a Windows laptop?
 
I saw that coming.
 
sbi
> If your Monday is a bit hectic and it's getting you down, here's a homeless guy bench pressing a goose. — Geordie Guy
 
@sbi Anyway, I noticed you evaded the question.
 
sbi
@R.MartinhoFernandes I considered it rhetoric.
 
8:58 AM
@sbi no, I am travelling to visit my parents, just hoping that the call me up for in person interview. I did phone interview last Tuesday
 
sbi
@thecoshman Oh, good luck with that! What job would that be?
@R.MartinhoFernandes And a great day for you, robot!
 
I'm leaving now.
 

« first day (751 days earlier)      last day (4211 days later) »