« first day (547 days earlier)      last day (4393 days later) » 

11:00 PM
@DeadMG Yeah, I agree about that.
 
#ifndef TIMESTAMP_H
#define TIMESTAMP_H

#include "date.h"
#include "time.h"

using namespace std;

class Timestamp{

public:
Timestamp(Date date, Time time){};

private:
Date date;
Time time;
}
#endif
 
@Moshe The same way as usual.
 
@Moshe using namespace std; should never appear in header files.
 
How do I add a member initialization list to that initializer?
 
cue mandatory Wide plug :P
 
11:00 PM
@StackedCrooked ignore it please, it's academic.
 
using namespace std; should never appear anywhere.
 
damn, if only I could really spend a lot of time on Wide
 
@CatPlusPlus What do you mean? If my date class:
 
but if I succeed at changing university courses, I might be able to do it
 
: date(date), time(time) duh.
 
11:01 PM
@Moshe What, you can't figure this out yourself?
 
@StackedCrooked I'm confused, and on five hours of sleep.
Less than usual
Amnd it's the other half of the day.
5 hours ago, by Moshe
I'm stupid.
 
For the past 4 days I've been sleeping during the day.
Feels nice.
 
I've been at home and I'm now super-sick
 
Coding at night feels more natural.
 
@StackedCrooked because its so quiet
 
11:03 PM
@bughi Also the sunlight bothers me. It feels like I'm wasting the day by sitting at my computer. I don't get this feeling when coding at night.
 
@StackedCrooked so you sleep during daylight? :)
 
it's funny
 
Yes, during the weekends and holidays.
 
I also shifted towards sleeping during daylight and coding at night
 
it's natural
 
11:04 PM
@MladenJanković most of the time yes
 
We're vampires.
 
Daybreak is a little paradoxal. The morning looks like a bright new day and make me feel energetic and awake. And an hour or so later I go to sleep.
 
i'm actually on a 25-26 hour day, i go to sleep progressively later
then i don't sleep for a day to reset
 
well i hate mornings
 
@bughi I've been awake for 26 hours now :D
However, I'm not planning on breaking any records.
 
11:08 PM
I woke up an hour ago.
Almost at midnight exactly.
 
So did I, yesterday.
23:30 to be precise.
 
heh
fortunately, I awoke at 11am today
 
That's juvenile.
 
and soon I will need to sleep again, my train back to university is 10:45am
 
@bughi the problem is when something fu*ks up your rhythm...
 
11:09 PM
i guess it's gonna be hard on me if i ever get a job
 
oh well you get used to it
 
Given sufficient caffeine in the morning.
 
unless you dont drink coffee
which i don't
 
THE TEMPORAL COHERENCIES
I MUST EXPLOIT THEM
 
@DeadMG So you are continuing your studies then?
 
11:12 PM
heh
technically
but I'm practically guaranteed to fail the year
 
that's the spirit
 
the truth is that this course is totally wrong for me and if I'd been smarter- or they had been more honest- or a mix of both, take your pick- I would never have signed up for it
and the other truth is that my parents put a lot of pressure on me and between that, a dodgy course with shitty teaching methods and the way I've been sick, I've kinda broken down
 
Is your university flexible in that you can do a special program where you only repeat the grades you failed while taking on a few courses from the next year?
 
no
but I have little intention of performing re-examinations
that module where the guy wanted me to quote the Intel 8051 reference manual from memory? He's not gonna issue a sane examination the second time around. It's never gonna happen, and it's a waste of time and money for all involved to keep trying
 
@DeadMG I guess you aren't really going to your classes anymore then.
That's how it was with me. Once I lost motivation I stopped going to class and spent all day at the PC rooms.
 
11:15 PM
@StackedCrooked What's (hopefully) going to happen is that I will continue at a different university on a real course.
 
It was quite sad on one hand, made a few good friends on the other hand :D
 
wait, there are classes at university? :)
 
in the UK there is a university called the Open University
 
@DeadMG I see.
 
full of distance learning courses, very project-based, and they offer a software dev course
which is very different to the CS theory course I've got now
 
11:17 PM
Is the institution recognized by the government? I mean does it deliver real diplomas?
 
yes
oh yes, it's quite prestigious
 
Well, then you're good.
 
if they accept me
 
At least here in Belgium I noticed that, when applying for a job, it doesn't really matter if you went to a prestigious college or not.
 
I expect that it probably doesn't matter here, either
 
11:19 PM
@DeadMG So it's not that easy to get in?
 
I wouldn't say that
technically, they have no entry requirements whatsoever
but more like, I would want to be quite certain that their course materials and examination methods are favourable
 
In my school the teacher would write C# code on the blackboard and we had to pen it down in our notes. That was our programming course.
It was a female teacher :)
 
lol
that's really kinda fail
 
It was.
I was simply waiting for it to be over.
 
yeah
that's what I'm like now
all I want is for this to be done
I don't care about the outcome anymore
 
11:24 PM
In my final year I got to do an internship at a game company. The company required me to do a C++ test. That kind of fired me up. So that last semester was an exciting one.
That's how I got into C++ eventually.
 
time to go guys, see ya
 
I worked with some bright people there :D One of them is now a director at EA. Another one is working for Crytek.
@MladenJanković Cya C64 :D
@DeadMG I kind of hopelessly clung on to my college degree. I repeated the first year three times. Halfway during the third year I got a crush on some stupid girl. It did however make it very easy to quit college and start at a different school.
 
I did re-examinations on both years, but passed them both on resits done in the summer
haven't had to resit any whole years yet
 
So you're better off than me :p
 
but if I could get a transfer on to a proper course, it would be good
hmm
I'm not so sure about that
I certainly don't have the option of repeating any whole years
 
11:33 PM
Just kidding. Perhaps. I did paid for the third year myself. I did a lot of jobs. back then.
But in my case it was clearly a lost cause.
 
I worked for a while a couple years ago
 
In your case it's not so obvious.
 
earned some money
all gone now, though
well
 
All gone, to video games :D
 
lol
nah, mostly garbage food and overpriced rent
 
11:35 PM
Ah, I never had to pay rent. I just commuted from home each day.
Belgium is kinda small country.
 
lucky for you :P
not only do I have to pay rent, but my parents have to pay it for me
 
At my "easy school" I lived at a 9 minute walk from it :D
 
which is a big chunk of the reason why I feel under so much pressure
 
I can imagine.
 
the truth is
it just pisses me off
I want to cut the bullshit and get to work
I don't see the need or benefit of having someone sitting over my shoulder dictating what to do to prove that I'm a smart guy who can write code
I want to spend a year on a project like Wide or my renderer and then earn my degree based on what I've created
 
11:39 PM
School sucks, especially when being forced to do things in-order to get a piece of paper that have no relation to said paper. But the quickest way through it is just to do it.
 
Hi. Is there a simple and efficient way to split a string (with no whitespace) into a vector of strings where each element is a single letter? I found various posts on SO, but they are all way too complicated, and mostly they assume you are splitting on something like whitespace. This one was close, though.
 
I've never been the guy who just does it
 
I know the feeling. I was good at programming and just wanted to create stuff. Not sit through all the stupid stuff.
 
I was always that guy who couldn't be pushed into anything
 
Well, that could cause problems in the future. A big part of getting ahead is spending a large portion of time doing things you have NO intrest in doing. How much do you want your degree.
 
11:41 PM
hahaha
who said anything about interest?
it's about necessity
if I get a software job, will it be necessary for me to recite formal definitions by hand?
 
no, I will have an Internet connection for that
 
I also HATED school. I graduated last semester, I basically got out of the military and said I am finishing this as soon as possible!!
 
what will be necessary is that I am creative, I know the language I am working in well, and I can solve problems
but my examinations have little, if anything, to do with that
 
You'd probably be accepted at my working place :D
 
11:42 PM
Well, in order to get that job.......................
 
I will prove myself with goddamn FOSS if I have to
 
@DeadMG The only think you're lacking is that piece of paper. You should get it, using the easiest route there is.
 
well, I certainly cannot do this shit
maybe I'm just too immature or whatever, but I cannot recite the formula for a projection matrix
 
Lack of a diploma will hunt you for the rest of you life.
Unless you're Bill Gates.
 
yes, I expect that it would hunt me for the rest of my life
but if I don't change course and don't find another way, then that's what's going to have to happen
 
11:45 PM
@DeadMG Immature is a pejorative term for not yet having given in to the moronic ways of this world.
 
it's funny, I never thought of it as much of an insult either
children are more creative, more flexible, and can learn faster than adults
 
Indeed.
Alright, anime time.
 
Meh, workplace where degree is more important than actual skills is probably not a workplace you want to work in.
 
So far I've got:
#include "common.hh"
#include "print.hh"

int main(void)
{
string s("string");
vector<string> v;
v.reserve(s.size());
for(size_t i=0; i<s.size(); i++)
v.push_back(s.substr(i, 1));
cout << v << endl;
}
But I don't know how efficient this is.
 
What are you trying to do?
Ah, letters.
std::string str("string"); std::vector<char> letters(str.begin(), str.end());
The end.
 
11:49 PM
@CatPlusPlus : Convert a string into a vector of strings, each of a single letter.
 
you can already access a std::string letter by letter by using begin() and end()
 
Not that that vector is needed.
 
@DeadMG I tried that, it didn't work.
@CatPlusPlus I want std<vector>.
 
So it leaves std::string str("string");
 
because they are a single character
 
11:50 PM
What for?
 
you will have to convert from char to std::string
 
for (auto c : s) { v.push_back(c); }
 
string is a container, too.
 
@StackedCrooked That's std::vector<char> and he wants std::vector<std::string>
 
11:51 PM
@DeadMG Ok.
What would be an efficient way of doing that?
 
std::string(1, c);
 
Gah. Forget 'efficient'.
 
I think ..
 
It doesn't matter on this scale.
 
11:52 PM
I'm going to be doing it a lot, so it might matter a bit.
Is substr inefficient? See my code above.
 
First rule of optimisation: don't optimise.
 
@FaheemMitha There's your problem.
 
Second: profile first, and then maybe optimise.
 
And don't suck.
 
Notice how you can't profile without finishing the code first.
 
11:53 PM
@CatPlusPlus Well, fair enough. So my original method is Ok, then?
4 mins ago, by Faheem Mitha
#include "common.hh"
#include "print.hh"

int main(void)
{
string s("string");
vector<string> v;
v.reserve(s.size());
for(size_t i=0; i<s.size(); i++)
v.push_back(s.substr(i, 1));
cout << v << endl;
}
 
It's a bit lengthy.
What do you need vector of strings for?
Given they only contain one letter.
 
@StackedCrooked How does one not suck? :-)
@CatPlusPlus Kinda long story. Part of a much bigger program.
 
@FaheemMitha By ruling.
 
It probably means some other part of the code is silly.
 
@StackedCrooked Like debian/rules ? :-)
 
11:55 PM
@FaheemMitha Never mind me, I'm dozing off.
 
@CatPlusPlus Possibly. Probably even.
I guess your point is that string arrays are unnecessary overhead over character arrays?
 
No, my point a letter is a char, not a string.
 
Bit late to fix that now, though. And it hasn't caused me any problems thus far.
 
Forget about overhead. Focus on semantics.
 
@CatPlusPlus It can also be a one char string.
 
11:56 PM
The point is, why on earth do you need to a vector or strings? The string you have is already a perfectly good container.
 
Also, std::string s("string"); std::vector<std::string> v; std::for_each(s.begin(), s.end(), [&v](char x) { v.push_back(x); });
 
@StackedCrooked : Again, long story.
 
Or std::string(x, 1), perhaps.
 
I have a bunch of strings, they make a 2d array etc etc
 
2D array of strings?
 
11:57 PM
@CatPlusPlus Does that do the same as substr?
@CatPlusPlus 2d array of characters, I guess.
But I've used strings everywhere.
For one thing, it is easier when converting between Python and C++
 
@CatPlusPlus :)
 
Like this
["a" "b"
"c" "d" ]
 

« first day (547 days earlier)      last day (4393 days later) »