« first day (899 days earlier)      last day (4054 days later) » 

1:00 PM
@R.MartinhoFernandes meh, I can't be bothered with this guy anymore
 
Make him permareboot!
 
lol
0
A: Changing raw pointers to smart in C++

kbokSince there is no ownership transfer to the zeroMatrix function, what you need is a reference: (Assuming M is a vector) void zeroMatrix(const int rows, const int columns, std::vector<double> &M) { for(int i = 0; i < rows; i++) for(int j = 0; j < columns; j++) M[(rows * i) + ...

look at the suggested edit
 
Changing stupid posters to smart
2
 
@kbok can't see it
 
Where
No suggested edits here
 
1:01 PM
It was rejected in the meantime prolly
 
Been rejected
He wanted to copy my comment into my answer
because obviously I don't know how to edit an answer
 
Yeah.
 
@kbok can't see one
 
Well it's not completely wrong edit
 
1:02 PM
why doesn't it show up on the post history
 
I have seen way worse edits. Accepted
 
Maybe you should edit your answer into your comment
 
Formatting is terrible but the idea is okay
 
@user703016 Yeah this
No, this is obviously going against my intent as a poster
Also it would leave the comment as a dupe of the answer's content
 
That's irrelevant.
The answer is ours now.
 
1:03 PM
Well comments are more volatile
 
0
Q: segfault with qsort. makes one additional comparsion

user2232850When i'm doing qsort on my array of structs its doing 1 additional comparsion with an element out of bounds. Full code here #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <stdbool.h> #include <stddef.h> typedef struct { int id; int set; char*...

wall of code
 
@R.MartinhoFernandes fair enough
 
btw next time it goes on coursera everybody should take POSA... doug schmidt is some kind of superhero, wrote gperf, reviewed GoF book, knows C++11 :)
 
Still a bad edit though, this remark is not part of the answer so should be a comment
 
he reviewed GoF! must be a fucking genius.
3
 
1:05 PM
lol
 
@kbok comments are transient and not a final resting place for pertinent advice
 
I'll be reviewing Effective C++11.
:P
 
Xeo
Really?
 
Have fun
 
1:06 PM
@LightnessRacesinOrbit he also wrote POSA books, and it means he was in the circle of ppl that did design patterns when they were new cool stuff
 
My review would probably be: "I have no idea what I just read."
 
Xeo
@R.MartinhoFernandes Cool.
@TonyTheLion I think Scott's books are quite clear, tbh
 
Scott said he'd get back to me when he has content.
 
hey, that's nice
 
the lounge descends
 
1:07 PM
@TonyTheLion "Also, I have allergies to dead trees. The font looks nice, though."
 
I might do it just to spite @TonyTheLion — Lightness Races in Orbit 1 min ago
 
@TonyTheLion ;-)
 
@Xeo I was talking from a technical point of view
 
Okay I thought about it and nah cba — Lightness Races in Orbit 1 min ago
 
@LightnessRacesinOrbit wait, H2CO3 :/
 
1:07 PM
@BartekBanachewicz don't ruin this with your logic
 
@LightnessRacesinOrbit Didn't know about that
 
That's the C-loving guy.
 
@LightnessRacesinOrbit let's just CV something will only loungers next time
 
Xeo
That's the idiot.
 
I prefer Cat-style replies such as "I don't know we might need more code".
 
1:08 PM
@kbok comments are for requests for clarification and should be considered temporary. I hate this but it's true. so pertinent advice should end up edited in to an answer.
@BartekBanachewicz okay
@kbok Typically, though, they begin life in comments and it's usually polite to let the original answerer do the integration
 
OMG they expect me to do integration?
Integration is an important concept in mathematics and, together with its inverse, differentiation, is one of the two main operations in calculus. Given a function f of a real variable x and an interval of the real line, the definite integral : \int_a^b \! f(x)\,dx \, is defined informally to be the area of the region in the xy-plane bounded by the graph of f, the x-axis, and the vertical lines and , such that area above the x-axis adds to the total, and that below the x-axis subtracts from the total. The term integral may also refer to the notion of the antiderivative, a function...
 
I felt it coming
 
@LightnessRacesinOrbit Seeing it that way, it makes some sense then. Still, you can consider the "temporary" thing idiotic and choose to put accessory info in the comments.
 
@kbok Indeed :) (And, since we're now being frank, I sometimes do that. My brain accepts this action because, allegedly, deleted comments do remain in existence [even if only visible by moderators or perhaps it's devs].)
 
Fuck the police.
 
1:12 PM
Fuck people who say fuck the police
 
user1357851
thought you might be missing my troll, your waiting has not been wasted, I have brought you goodie goodies like this: funnyordie.com/lists/36cdcafaa1/… ... afk be back in 30 mins
 
@ScottW yeah px master race!!
 
@Telkitty none of those are sexy
 
Somebody post the Lajoie guy clip now.
 
user142019
Lajoie is awesome.
 
1:14 PM
"F**k Everything" certainly is awesome. :)
 
fuck people say who fuck the police
 
I don't give a chainsaw.
 
the police fuck people who say fuck
 
is the poopy still alive? haven't seen him for a while
 
> poopy
lol
 
1:15 PM
> ipString can't contain Unicode characters.
Fuck you MSDN. I am sure IPAddress.TryParse can parse "8.8.8.8"
 
yes, the puppy is alive, he was online yesterday, and he's been in the room today
 
sup skeety
 
okay generic programming question guys
 
ProgrammingQuestion<>
 
ok, I installed LLVM, now I gonna write a brand new language!
 
1:17 PM
Oh gawd, not you too.
 
Suppose I have a table view containing a bunch of views (homogeneous) firing events at my controller. How do I identify the model object being modified?
 
Btw @ScottW I had orange juice yesterday. It was good.
 
@R.MartinhoFernandes another one lost
 
Should I put a tag in my views? A reference to the model? An index in the event?
 
> llvm_shutdown_obj Y;
 
1:18 PM
@kbok You pass it in the event?
 
oh my
 
^ why "Y"?
 
this process is still running here
 
@Abyx So you would ask
 
@Abyx Because rabbit was already taken
 
1:18 PM
@user703016 So the view has to contain a reference to the model object?
 
oh... now I recall how good llvm is
 
That's how views usually work
 
@Abyx because it joins maybe?
 
plus some subsequent messages
 
1:19 PM
(Also again fuck patterns)
 
you blind bastard
 
user142019
Ideone y u no unsafe.
 
@kbok Yeah, you can do that. It's not super sexy but why not.
 
No, views should expose fundamental displayable types, not references to the model, because coupling
 
@Zoidberg bcoz it's... unsafe?
 
1:20 PM
But I only do sexy
 
Otherwise you can map views to models.
That's not uber sexy either but less coupling.
 
I thought coupling was sexier.
 
You're doing some kind of event delegation.
 
That could end up butt-ugly because in Objective-C the same view object may be used to display several model instances
(Which is leading to hilarious bugs, BTW)
@user703016 What do you mean?
 
@kbok Well anyway how are you going to distinguish your models if the same view is used to display them?
 
1:23 PM
@user703016 Only one at a time is used
It's Java-style instance reuse, nothing more
 
Does your controller know which model is being displayed?
 
because constructing objects is so fucking expensive
 
How does view use several models
 
@CatPlusPlus Views are pooled and reused.
It's not simultaneously.
 
I don't know I think the model reference solution is the less ugly.
 
1:24 PM
It's an UI code jesus nobody cares if it takes 5 nanoseconds to create an object
 
it goes like that : view = someViewThatIsNotVisible; overrideAllAttributes(view); display(view)
 
who cares about MVC anyway
 
rince and repeat
 
Also how does GC'd language end up with expensive object creation
 
1:25 PM
shit implementation
or nubs
 
(Apple is not very good at computers)
 
IIRC you get the same treatment in Android.
Go figure.
 
@kbok So there's no way for your controller to know the current model being displayed?
 
@R.MartinhoFernandes Wait, where?
 
@user703016 No, that doesn't make anything really different, just the map solution even uglier
 
1:28 PM
Then model reference!
It's not too horrible honestly.
 
@R.MartinhoFernandes Well, this is a Java pattern
 
> "Are you looking to be sexually assaulted?"
Just WTF
 
I think I'm missing something from this conversation
 
conversation
semantics
 
Yeah, it could be worse I guess. I just wondered if there was a better alternative.
 
1:30 PM
@kbok Well, without looking at the code that's the only sensible thing I can come up with, sadly.
 
Believe me you don't want to
 
Also views referencing models isn't too horrible.
 
How else do you make a view
 
Well generally just by event binding so you don't actually have a reference to your model.
 
What event binding
 
1:31 PM
Views implement Observable
Same for Models
 
How do they get the data to be viewed?
 
And models observe views?
 
@CatPlusPlus By exposing fundamental displayable types, eg string integer decimal etc
 
This is a horrible design
 
Wait, you fill the views manually?
 
1:32 PM
Then your controller ties up both.
 
Views display data from models, there is no fucking point overcomplicating this shit
 
But patterns!
 
There is nothing observable about a view
 
You can observe it :rolleyes:
 
User interaction.
 
1:33 PM
what views are observable? what for?
 
Model sending a signal to views it's attached to I can understand
 
@kbok User events.
 
Fuck patterns
 
@CatPlusPlus Views send a signal to the controller when clicked or whatever.
 
Events have to be sent to the controller because you can't express input events in terms of values updates
 
1:35 PM
That can still fit under the definition of "observable".
 
observable input events?
you want to send them back to the model?
 
Observable as in "state changed".
You send them back to the controller ofc.
Also, classes, cya later.
 
So you have controllers processing the event, sending it to view and view sending it back to the controller
Cool design
:v:
 
cool design bro
 
Unless events actually originate in views then cool pattern there
 
1:37 PM
@R.MartinhoFernandes regarding seq points and = : An often-cited example is the C expression i=i++, which apparently both assigns i its previous value and increments i. The final value of i is ambiguous, because, depending on the order of expression evaluation, the increment may occur before, after, or interleaved with the assignment. In C and C++, evaluating such an expression yields undefined behavior.
 
user1357851
@LightnessRacesinOrbit the last 5 were quite okay (No 1 - No 5). Did you see the youtube jailbait video? Remember those are female sex predators, so it is likely no one would photoshop their pictures - unlike those playboy bunnies (almost all of whom got fake breasts)
 
What are you being stupid on purpose.
 
@user703016 You're only allowed to use a . to terminate a question if the question is "what". Otherwise you should use a question mark. :)
@ScottW them's the rules
 
@jalf I do it with rhetorical questions.
 
@ScottW And when you're dumbfounded you're supposed to say "what", not an arbitrary other question ;)
 
1:40 PM
I leave the punctuation mark as an exercise for the reader
 
user1357851
this isn't television, a brain is needed
 
user1357851
hey doggie
 
Tab groups are pretty cool
 
@CatPlusPlus very
 
@jalf Or "wat".
 
1:46 PM
If only the stupid engine weren't so sluggish
 
user1357851
I wish I could stop my hands from typing female sex predator hottest in google search
 
Of course, they just delay the inevitable. Eventually, you have 80 tabs you don't know what to do with, instead of the 8 you'd have otherwise
 
12 hours ago, by Telkitty
I need to stop changing my avatar ....
Changes her avatar
Telkitty logic
 
Having hundreds of tabs is my standard Fx workflow
 
what is wrong with you, there's no reason to have hundreds of tabs
 
1:51 PM
I have thousands of tabs.
 
@DeadMG sure there is. Once the browser doesn't force you to close them in order to conserve resources or to fit into a single tiny little tab bar
 
you mean, so many tabs you couldn't possibly find already-opened content or actually view what's happening on them?
 
I have no problems with that
As I said, standard workflow
 
@DeadMG Yeah, if the browser doesn't give you any tools to keep them organized, then you're right, having hundreds of tabs is problematic. Luckily, firefox does provide such tools, so you can have hundreds of tabs open and still find what you need
 
user1357851
@Borgleader yes, said 'I need to', not I am going to :p
 
1:54 PM
Text to avatar
 
user1357851
yeah with all those "f*ck" in the messages, it is going to be interesting
 
@CatPlusPlus nice moustache
 
274301 Wikipedia (provisional designations: , , ) is a main belt asteroid. It was most recently discovered by the Andrushivka Astronomical Observatory in August 2008. The asteroid was named after the online encyclopedia Wikipedia in January 2013. Discovery The asteroid was discovered by astronomers from the Andrushivka Astronomical Observatory (A50) in Ukraine, the country's only privately owned observatory, Name The decision of the Committee for Small Body Nomenclature to assign the name "Wikipedia" to the asteroid was published in the Minor Planet Circular of January 27, 2...
lol
 
Yay! Repcapped in almost 2 weeks.
 

« first day (899 days earlier)      last day (4054 days later) »