« first day (688 days earlier)      last day (4245 days later) » 

sbi
12:01 PM
@BartekBanachewicz A common problem, it seems.
 
link... droppings
@BartekBanachewicz Well, it is supposedly algorithms class, right. If it was called C++ 101...
 
sbi
@ronalchn You poor sod! I fought for a year to have a FORTRAN/COBOL course replaced by a C++ one. Got a bunch of professors on my side and in the end prevailed. Unfortunately, the guy who taught the course knew less of C++ than I did at the time, and I knew very little.
 
The problem with university courses is... they have to make sure there is an obvious direction of students to follow
that's why they're so easy
 
@sehe IF it was called that way, they would allow to use standard library in all of the tasks.
 
@sbi, I had a course where we had to learn MFC
even though it was old and very non-OO and hacky
 
sbi
12:04 PM
@ronalchn Ugh. that, indeed is bad.
 
the reason: that was the framework the lecturer knew how to use
 
Solid reasoning. No there is no way to justify MFC in class (except maybe for hacking on an existing practicum that happened to still use it). There is no intrinsic science or knowledge to MFC IMO
 
it was like learning a framework, when its successor "Windows Forms Application" was already old! People had already moved onto WPF
 
That's .NET.
 
I know, but the windows and the library for the views and stuff is called WPF
Windows Presentation Foundation
 
12:07 PM
Yes, but it doesn't work with C++.
 
.NET is just the set of languages which allow you to interchange between languages easily
 
Erm. @ronalchn: Pro tip: in this room, you can expect people to know stuff
 
@ronalchn Errr, no.
 
Because it's .NET.
 
Indeed. Very poor wording
 
12:07 PM
but MS really made a hash of the whole native C++ vs C++/CLI
 
.NET is Object and enforced garbage collection and it does not support actual C++.
 
whenever there was some native C++, I had to write interface code for C# to use
 
A C++ course involving WPF would be a very weird C++ course.
 
@ronalchn for the CLR to use, FTFY
 
and they had the good idea of making it really easy to use WPF from C#, and really hard to use WPF from C++!
 
12:08 PM
They didn't bother with it.
C++/CLI is for writing glue code.
 
@ronalchn How was that ever an idea? They just designed it for use from CLR with Visual Studio
 
sbi
@ronalchn That's not a problem. Your university's task is not to teach you the tools you'll need when you get your first job. Everything will be outdated by the time you graduate. It's task is to teach you basic knowledge in your field, and techniques for teaching yourself how to use the tools needed at any given time.
However, I fail to see how MFC provides anything in that regard.
 
@R.MartinhoFernandes And I like it for that purpose
 
ok, so it wasn't, but I meant, they didn't do it well
 
If you're writing whole applications in C++/CLI you're probably doing something wrong.
 
12:10 PM
yeah, but the problem is when you are using a C++ library, it would be better if you didn't have to write glue code
 
@R.MartinhoFernandes Absolutely. Either write it in IL proper or use C#/F#/Boo etc.
 
that's just wasted work
 
@ronalchn Well, that's tough.
C++ and .NET do not have compatible concepts, and that's a fundamental problem of interoperating between them.
 
@ronalchn Yeah, also, it would be better if the groceries just fetched themselves. Oh, and didn't cost money all the time
 
`static const T* NullPtr = 0;` gives `Error 1 error C2864: 'CTree<T>::NullPtr' : only static const integral data members can be initialized within a class`
no sh*t, sherlock -.-
 
12:11 PM
C++/CLI seems to actually do a good job of bridging two fundamentally incompatible worlds.
@sehe Wide#?
 
true, I know it is asking a bit much. I mean I know it is very hard to intermingle the two environments
 
@R.MartinhoFernandes don't let the puppy see you
 
it does seem possible though - just a lot of work
 
@ronalchn So... don't if you don't want to
@ronalchn Turing would agree
 
It's not possible in a way that the resulting code can be consumed by any CLS language. Turing didn't know what any of this means, so I win.
 
12:14 PM
@sehe woof
 
@sehe He mentioned the ability to output IL before. I'm not making shit up.
 
@R.MartinhoFernandes LLVM has a CLR backend, and JVM too.
 
@R.MartinhoFernandes yeah as in, you can write the darn backend yourself :)
 
they're experimental though, I believe
 
@DeadMG yup
 
12:15 PM
I obviously would not actually write any such abomination myself
 
lol
> "People will try to sucker you into the 'source control' nonsense," Gary said, "but it's totally stupid. Come on, haven't these people heard of backup?"
 
Solution to all source control - git
i did svn for a while, but when I use git, I feel ultimate power
 
@R.MartinhoFernandes thanks robot, I owe you beer for that one. (10/10 for one of the worst looking codez I've ever wrote. hopefully he won't understand it enough to pick on that)
CurrPtr = &((*CurrPtr)->Left); is my favorite.
 
I don't like beer, but since it's symbolic, I'll accept it :)
 
do they mark you on your code? I'd think, if it gives the right result, they just give you full marks
and that they only look at your code if it doesn't do the right thing (to see how much you coded)
 
12:29 PM
I feel like we're not focusing enough on the "I don't like beer" thing...
 
@ronalchn If he's gonna comment on my code style, I'll ask if he did correct mistakes in the exam he gave us recently (my comments took half of the back side)
 
Sorry, new to the party, so it might be out of context....
 
Besides, even the line above (with handle) isn't that bad compared to what the other folks give him
 
yeah, it actually isn't that hard to understand
 
@LuchianGrigore Beer is never out of context, except, perhaps, at funerals
 
12:31 PM
0
Q: extern vs Singleton class

Science_FictionSay we have some external linkage using the extern keyword. I have (in class1.cpp): MyClass* myClassVar = NULL; The constructor initializes the above, and destructor deletes. Then in class2.cpp and class3.cpp there is: extern MyClass* myClassVar; These classes use myClassVar (doing the us...

 
With the context, not at all. Yet, it could've done better
 
@Neil, that's right, if you're gonna pour alcohol (libation), beer is the wrong type
 
^ It's gotta be her
 
lol
Also, now you will have to link to the video.
 
@sehe ^^. I happened to have "yt" also attached to my login, before I switched to this Real-Id thingy
 
12:34 PM
@sehe Sounds like something she'd say, that's for sure
 
@R.MartinhoFernandes Nah. Not really. It was junk. It kept cropping up in the recommends: youtube.com/watch?v=vqwzA67f8jY I bet everyone has seen it in the recommends. One of them vids that YT pushes, I guess.
@BartekBanachewicz RealId?
 
@sehe It now uses my Google+ name, which happens to be my real name.
 
I was watching Daveed V.'s modules presentation (but I failed: audio too bad).
 
@sehe, or perhaps a more relevant reason is... Youtube recommends videos based on what kind of videos you've been watching? uh hum...
 
My YouTube handle is what people often think my name is when they hear me saying it :(
 
12:35 PM
@ronalchn Sure :) Admit it, you also get these vids listed. It is how everyone reaches the point where he exclaims "I'm in that corner of youtube again"
 
@R.MartinhoFernandes Marteenjo?
 
No. I'm talking about actual native speakers.
There are two similar sounding names, and I can't seem to pronounce mine in a way that is clear to everyone :(
 
Youtube and google tailor results based on what you watch/search for.
So logically, you should only watch/search for things that won't drive you crazy in 20 years time.
 
@R.MartinhoFernandes ¿ Martiño ?
 
12:38 PM
@sehe Martim.
And Fernando for the last name.
 
@Neil Yeah. You'd guess I know this, right
 
you need to use 2 browsers
 
@Neil *Youtube and google tailor results based on what you watch/search for. * Ted talked a bit about that. (unobvious reference to Ted Talks)
 
@sehe Why would I assume you know this if I'm telling you?
 
@R.MartinhoFernandes That's surprising. There's a completely open trailing vowel missing
 
12:39 PM
One is for all proper stuff - ie. any business or normal stuff
and the other to hid all the other stuff
 
@BartekBanachewicz I saw that exact ted talk. :)
 
@sehe I think I just don't speak loud enough :(
 
@Neil Yeah. It got featured by YT.... Oh wait
 
link it for the community, I still have shitload of similar tasks to do
 
That's annoying
 
12:41 PM
k, sorry
 
It's ok
 
@sehe It seems you're having trouble with you're del key.
 
Ping! revenge is tasty, I guess.
 
Oh, that's right. I forgot about the pinging. :)
 
is there a ping button?
 
12:44 PM
@ronalchn if you link to someone's post, it pings him
 
@ronalchn your keyboard didn't come with a ping button?
 
I know if you link it pings them...
 
@ronalchn sure - http://chat.stackoverflow.com/messages/5204004/history
 
I was wondering if there was another ping button
because i might be getting beeps
even when there isn't another message
like now... that's why I am wondering where it is
 
It's on the right, near 'info'
 
12:45 PM
Hm, next task is even more funny. You have to compute a bit for n's in range(0,30). I really regret I am so weak with meta-templates yet.
 
o my god,really i will try to solve,it is difficult question because k-d tree is not simple structure ,i understood,i am tired already,so go and try to do myself,i dont have any hope to get help from here,not you,i dont meant you,but others,they call themself experts and can't udnerstand anything,everyone makes mistake,you could help him in case of consider yourself expert — dato 4 mins ago
 
@BartekBanachewicz Calculate a bit?! Also, what does metaprogramming have to do with things?
 
@LuchianGrigore Oh god, what a long comment chain. I'm surprised mods haven't swooped in yet.
 
@LuchianGrigore Butt hurt
@R.MartinhoFernandes They will soon, is my prediction
 
delete votes?
 
12:48 PM
@LuchianGrigore You called?
 
@LuchianGrigore Already did. I was vote #2
 
@sehe I didn't want to post the whole task again, yet, it clarifies a bit. pastebin.com/FSWxc1cV
And I'm pretty sure it can be done at compile time.
 
@LuchianGrigore Why did you delete your answer?
It's the right answer.
 
@BartekBanachewicz It does? I'm finding it hard to understand. Way too many one-letter variables.
 
12:51 PM
@R.MartinhoFernandes Yeah, and I was just going to post this comment:
> Who says we want to be experts? We just want to help
 
@R.MartinhoFernandes he was rude and, most likely, didn't even read it because it didn't contain the full code.
 
@LuchianGrigore And you punish yourself?
 
@DeadMG It wasn't me who invented this one. Basically next integer in sequence can differ by -2, 0 or 3 from previous : (1 1 4 2 etc.)
 
@R.MartinhoFernandes how am I punishing myself?
 
Deleting your answer?
 
12:52 PM
And?
I'm punishing him, not me
I already know the answer :D
 
Aren't you losing reputation?
 
@BartekBanachewicz So basically, they want all integer sequences that sum to N, where each integer can differ by -2, 0, or 3.
 
@BartekBanachewicz meh... repcap
 
@DeadMG yup. And given n is in range 0-30, you can precompute it.
 
@BartekBanachewicz I like the "please".
 
12:53 PM
nope
the answer is infinite
 
@BartekBanachewicz "and for each i, 1<=i<k we have xi+1-xi in {-2, 0, 3}" isn't xi+1-xi always -1?
 
@DeadMG For bounded ns?
 
sbi
@sehe I wasn't even at my desk. However, the guys I share this office with (one more months), didn't call me, nor do they look annoyed, so I seem to have turned the volume low enough.
 
@R.MartinhoFernandes Logically, you could insert more negative numbers at the beginning.
 
@Neil I think it's meant as x_{i+1} - x_{i}.
 
12:54 PM
@Neil it's x(i+1) - x(i)
 
@sbi I don't understand what you mean
 
> please find all sequences of positive integers
 
@R.MartinhoFernandes That would make more sense
 
oh, voops
 
sbi
@Neil Sorry, failing at eye-hand coordination again.
 
12:55 PM
so each element must be at least 1.
 
there doesn't seem to be any ordering amongst these integers, so I'll assume by this that the biggest difference between any two numbers is going to be 0, 2, or 3
 
@sbi o:^
 
@Neil Nope, 1,4,7 is valid but 7-1=6
 
I have it solved in examples for 2, 3, 4 and 8
 
12:57 PM
@DeadMG Why is that valid? I would argue that isn't valid
 
0
Q: median selection algorithm

datohere is my version of code for median selection #include<iostream> using namespace std; #define max 1000 int a[max]; int n;//number of elements void Swap(int i,int j) { int k=a[i]; a[i]=a[j]; a[j]=k; } int randint(int l, int u) { return l + (RAND_MAX*rand() + rand()) % (u-l...

 
@Neil It's a classic puzzle. Reminds me of the MU puzzle from GEB /cc @R.MartinhoFernandes
 
@Neil Because for each i, x(i + 1) - x(i) = 3
 
This guy always uses the same stupid template for his questions: "here's my code, have problem, help".
 
@DeadMG No, because there's an arbitrary ordering
 
12:57 PM
median selection is easy, just use nth_element
 
@Neil No. The ordering is chosen by me. Thats not the same as arbitrary.
 
wow, lo and behold, the first answer does mention nth_element
 
@DeadMG Fine, but you didn't specify it in your problem
 
@Neil The original question calls for a sequence. Sequences have order.
 
12:58 PM
@ronalchn Just post. Don't sit here ranting about how stupid people are smart you are :)
 
A sequence has order.
1,4,7 is not the same as 1,7,4.
 
I'm done answering today
 
Order! Order!
 
I've reached rep cap
 
12:59 PM
@DeadMG Ah, hmm
 
@sehe Awdah in dah cawt!
 
Then it appears I am mistaken
 
Well, obviously each n has answers with one number equal to n, and n * 1
 
?! So, you resolve to moaning about others not knowing stuff. On Stack Overflow
 

« first day (688 days earlier)      last day (4245 days later) »