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

user142019
11:00 AM
xD
 
user142019
IMO private shit shouldn't even be in UML diagrams (if they should be there at all).
 
@Zoidberg depends what the UML is intended for (the bin?)
is this 'getters and setters for everything' rule something he would mark you down for for not doing it?
 
@Zoidberg A diagram showing fucking. That should be mildly amusing for a change
 
user142019
@sehe UML diagram of a porn site.
 
user142019
class FuckingVideo : Video
 
11:03 AM
@Zoidberg pointless incest inheritance
 
@Zoidberg Kaboom? House? They don't seem related
 
user142019
Field whd_get = WorldHandler.class.getDeclaredField("handlerDelegate");
whd_get.setAccessible(true);
 
user142019
Does that make a private field accessible? :o
 
what language is this?
 
user142019
Oh my God, Java really is fucking terrible.
 
user142019
11:06 AM
@thecoshman JAVA
 
at the same time, it allows for mods to be rather easy to do, which is both a good and a bad thin :P
 
@jalf I use PuTTY on Windows.
@thecoshman That is a bad idea.
 
user142019
@thecoshman lol :P
 
@thecoshman use PHP. mods come for free. (And when you least expect it)
 
user142019
lol people in my project team create classes with plural class names.
 
11:08 AM
@R.MartinhoFernandes what is exactly? allowing your self the freedom to change your implementation?
 
Oh, why was cat removed from owners again?
 
@thecoshman If your get/set pair has no contract (or if you prefer, if the contract is "you can put whatever here and then you can get the same thing out") changing how it works is a breaking change. I don't like breaking changes to compile silently.
 
@BartekBanachewicz the lulz
 
@TonyTheLion standard reason.
 
user142019
@BartekBanachewicz To prevent him from changing the topic into "Cat is the king. Obey." or something similar. :P
 
11:09 AM
@R.MartinhoFernandes that's not what I meant
 
@Zoidberg also, I'm king.
 
user142019
I'm the king.
 
user142019
I'm a human so I'm superior.
 
no you're Zoidberg and you suck
5
 
user142019
> I actually just pretend I'm a lobster.
 
11:10 AM
Lobsters are not people.
 
@R.MartinhoFernandes I was saying that if you just a have a public variable, you have to keep it there for ever more, even if it starts to become impracticable to keep the value valid. Where as hiding it behind a 'get' you can only generate the value on request, and you no longer need to worry about how often it is called.
 
@thecoshman Yes, but what does the set do?
 
user142019
Lobsters can't use computers.
 
user142019
And so can't lions.
 
@Zoidberg we have noticed that part.
@Zoidberg we're definitely more agile than you lobsters
 
user142019
11:12 AM
Oh agile you say? You must be very web scale, too!
 
ahahahaha
 
@R.MartinhoFernandes in this context there might not even be a 'set'. But still, what ever setting the value should do can be kept the same, but how you do it can freely change when behind a 'set' function
 
@thecoshman The main reason to provide a getter only is because it is just an observer and no mutation is allowed. A public field is not a replacement for that, so the question is moot from the beginning.
 
@TonyTheLion don't get drawn in, he's still in school
 
@thecoshman It cannot change freely. It can only change in very limited ways. (i.e. it still has to behave as if it was a public field)
 
11:13 AM
@thecoshman oh yea, true
 
It is rarely useful.
 
@R.MartinhoFernandes yes, but my key point is that get/setters can change there impl' with out breaking the contract, it is not so easy with a public variable
 
@thecoshman Yes, and my key point is that that isn't particularly useful at all if the initial implementation is "assign + return".
There isn't much you can change from there.
 
@R.MartinhoFernandes but it does not render the notion of 'getters and setters' utterly foolish
 
@thecoshman That argument is silly, because it doesn't happen
At least not often enough to validate that line of thinking
Design your damn APIs and then don't break them
Never break APIs
 
11:16 AM
@thecoshman Sure. It does render the notion of reimplementing what the language already provides with data members foolish.
 
I am not saying that I think you should avoid having public fields, just that I think there is too much hate for getters and setters
 
hate ALL THE THINGS
 
user142019
I hate Java.
 
but then I am mostly thinking of cases where you are getting and setting data that is not just stored directly as it is passed in
 
And the important bit is that a getters and setters interface is terrible.
 
11:17 AM
That should be handled on type level
 
say if you where wanting to interface with some back end to store the value, or if you needed to do some validation on it, or setting a value requires modification of other values
 
"Look, here's a bag of data".
 
Objects full of passive data should be a minority
 
@thecoshman If setting a value requires modification of other values you can probably name that thing.
 
If any
 
11:18 AM
You can probably make a type out of those values that change together.
 
Yeah, it's probably more complex operation than "set foo"
 
@R.MartinhoFernandes if all they are is T get(){ Return thing;} void set(T value){ thing = value;} yes, very little reason to use them
 
Which makes your setter terribly named
 
If set_foo does more than set foo, your interface sucks.
 
Validation can and should be handled on type level
As invariants
Outside of some extremely uncommon cases like firing events plain setters are just bad
And naming them get_foo/set_foo is almost always bad
Or maybe even always
 
11:22 AM
@CatPlusPlus I'll grant you that naming them as such is terrible
@R.MartinhoFernandes except, it's only what the pubic API sees that matters, if your internal class does something every time you set a value, that is fine, but n doing so it should not have any unpredictable side effects.
 
@thecoshman If that something else is not observable, why are you doing it?
 
@R.MartinhoFernandes it might be something like setting the position of a window, how would you do that with just a variable? you need to do something with that value, whilst also providing a way to see what it currently is. either that, or you just have a public variable they set, and then call a 'updatePossition' function
and if you choose to do the latter, please stop living
 
@thecoshman You mean move(pos)?
That is not a setter.
That is an operation with meaning in the domain.
It is not about setting some variable, it is about moving the window.
 
@R.MartinhoFernandes Worst name ever.
 
@LucDanton Oh gosh.
 
11:27 AM
move(std::move(pos))
 
I see it now.
Yeah, C++ sucks.
 
Clearly you should name it move_
 
no, as far as the class user is concerned, they are just setting the position and getting the position. It is a getter and a setter for the position
 
@thecoshman No
 
@TonyTheLion Fix word order
 
11:28 AM
@R.MartinhoFernandes I don't get it.
 
@CatPlusPlus yes
 
It's a difference between passive and active action
If you knew English better you'd see it
 
yeah, but the user of the class instance it does not matter, they are setting the position and getting the position. If you had window.setPosition() and window.getPosition() you are not going to pondering wtf is going on
 
At the risk of inflaming this discussion, I like properties and getters/settters. Delphi, C#, whatever, it's cleaner.
 
11:30 AM
Interface says what the class does, not what the user does
Properties are nice, yes
 
@thecoshman "Hey, can you please set the position of this window to the second screen?"
 
perhaps this is more a misunderstanding of what we consider what. Would you consider a pair of functions like above sensible, exact naming aside, focusing on what they are suppose to do
 
Lenses are better but still
 
Yeah, that is totally what people would think of.
 
@R.MartinhoFernandes how do you get to that?
 
11:32 AM
"Hey, can you please set the position of your car over there? I need to take mine out."
 
Yeah who the fuck talks like that
You never set position of anything
 
You move shit around.
@thecoshman I am just trying to see what matters to the user of the class.
 
I've already said we should not get hung up on what exactly we call the functions, it's the notion of how they work
 
That's what we're saying entire time
 
user142019
 
user142019
11:34 AM
I waz bored.
 
and to me, 'set_possition' is more clearly going to set exactly where I want it, 'move' is not very clear what it is going to do, is it going to move the window to the position to or off_Set it by the amount I pass in
 
@thecoshman That is why you have a position class and an offset class. (or only one of the two; it does not matter; just don't take two ints)
 
user142019
move(Offset offset);
move(Position position);
 
@Zoidberg you seem to have very quickly lost interest in C
 
@MartinJames conflating 90% of redeeming language features with the incidence of property getters/setters
 
11:35 AM
Or move/move_to and move_by
 
user142019
Similar to drawRectangle, which could be drawRectangle(Point start, Size extent) or drawRectangle(Point start, Point end). (The example Bjarne gives in his presentation.)
 
or just .position(/* something the equates to a screen position */) along with .posiotn() to return the current possition
 
user142019
eww non-verb
 
@Zoidberg It's a verb.
 
user142019
Oh yea. xd
 
11:37 AM
lol
 
user142019
lol
 
@Zoidberg eww idiot
 
user142019
Idiot? Where?
 
@thecoshman That's not a verb!
 
user142019
inb4 smiley with rotated L eyes.
 
11:38 AM
@R.MartinhoFernandes object.moveTo(loc);, car.swerveLeft(), traveling(person, car, itinerary).navigateTo(destination)
 
@R.MartinhoFernandes ¬_¬ well done... you win the 'I know what a verb is' prize
 
And "I know more verbs than 'set'" too
 
@Zoidberg they are called grave
and as I have been trying to say from the very start of this, the idea of a get and set function, though not necessariely with those names, is not automatically a terrible idea
there are perfectly valid use cases where you want to have that 'easy to manipulate' feel of a public variable but cannot have the value just set willy nilly
 
@thecoshman But then they are not longer getters and setters. They are actual operations.
In computer science, a mutator method is a method used to control changes to a variable. The mutator method, sometimes called a "setter", is most often used in object-oriented programming, in keeping with the principle of encapsulation. According to this principle, member variables of a class are made private to hide and protect them from other code, and can only be modified by a public member function (the mutator method), which takes the desired new value as a parameter, optionally validates it, and modifies the private member variable. Often a "setter" is accompanied by a "getter" (als...
 
IOW. person.handleObject(object, modus, objective) - but this gets out of hand. We'd need person.getMood(), brain.inebraitionLevel(), HeuristicEninge.distractionStatisticsDatabase(), beliefs::philosophy::haltingProblem() etc
 
11:42 AM
in keeping with the principle of encapsulation
 
C++ WHY U NOT HAVE PROPERTIES?
 
See what I mean about Wikipedia articles on programming being terrible
 
user142019
bool gotX() {
    return x != null;
}
 
@R.MartinhoFernandes but to the user of the class, they are simply reading and writting that value
 
user142019
Gotter method!
 
11:43 AM
@thecoshman Should I go over that again?
 
@MartinJames overrated 'feature' if you ask me
 
Gutter method!
 
user142019
@MartinJames They are quite pointless in idiomatic C++.
 
@R.MartinhoFernandes no
 
This works! Woot.
 
11:46 AM
if(OKbutton.color==clRed) OKbutton.color=clGreen else OKbutton.color=clRed;
 
@R.MartinhoFernandes ?
 
@thecoshman You're too caught up in low-level details
 
@MartinJames VB6?
 
No - I just made up some C++ as if it had properties.
 
And was VB6
 
11:50 AM
No "Then".
 
@CatPlusPlus I don't think so, I am looking at from a user perspective. if I am setting a desired value and getting the current, the pair of functions I use to do this are, to me, a getter and a setter. That is generic role. Of course when you start to apply this to actual things, more semantic names start to surface. and I would often simply use overloading to allow the same name to both read and write the value
 
Eeeww - please do not associate me with VB6. Any resemblance between my code and BASIC is purely coincidental..
 
Hint: the setting of the value part is the low-level detail
 
@thecoshman Look at this way then: if all the user cares about is that he is setting a variable why the fucking is he not just setting a variable?
You said it yourself, that the point was that it does not matter if a variable is being set or not.
 
@R.MartinhoFernandes Look at this way: when you want to fill up a fuel tank in a car, do you care exactly where the fuel goes? no, you simply care that it goes in there and is safely stored.
 
11:54 AM
Why bring that fact up to the interface if the interface exists to hide that fact away?
 
Yeah, you set the fuel to 100%
 
@MartinJames Well. There you go. A natural talent then. I was responding to the naming convention and general (lack of) structured syntax
 
@thecoshman Yeah, I always ask people to please set my fuel level to 40 litres.
 
@CatPlusPlus ah yes... poor example... perhaps the 'get_fuel' side of it makes more sense
 
@thecoshman you want the fuel to be safely stored, not the value representing fuel volume
 
11:55 AM
If you like to use other people's cars as the fuel pump
 
Actually, the 'clRed' enum/const came from Delphi. Maybe Delphi inherited it from VB.
 
@MartinJames It is from a kindred period in language evolution
 
if we stick with this analogy, what if the car it self actually stores fuel in more then one tank, but you simply want to provide a single value for overall fuel level, and do not want users to be messing with the fuel balance? you can not trust them to ensure they add the right amount of fuel to each tank
the user does not care that there is more then one fuel tank, they just care about the overall value
 
And where does the setter come in?
 
11:58 AM
13
Q: Why are C++ inline functions in the header

thecoshmanThis is not a question about how to use inline functions or how they work, more why they are done the way they are. The declaration of a class member function does not need to define a function as inline, it is only the actual implementation of the function. For example, in the header file: st...

ooh, this question is slowly earning me rep :P
@R.MartinhoFernandes in this context and 'add_fuel' and 'get_fuel' makes more sense, so not a perfect analogy I grant you
 
It is a car analogy. It is bad.
 
@sehe yes, public IP on 24/7 (presuming it doesn't break
@CatPlusPlus I know :(
 
user142019
Java y u no fmap.
 
any hoops
 
Xeo
@Zoidberg There's Functional Java
 
12:01 PM
time for lunch
 
@thecoshman Yup - best plan yet. Need oatcakes, cheese, bacon.
 
user142019
Oh no wait I want foldr. :P
 
@R.MartinhoFernandes oh, I mean for the ssh connections git itself establishes when pushing/pulling
 
@thecoshman well, don't just talk about it! Get Luc to copy his world and get testing with a few WAN users. It should quickly become apparent where the lag is. Just gather on mumble to see who sees lag when /cc @lucDanton
 
12:08 PM
Well, the sun is so nice today I crawled out of my lair
 
it uses its own ssh.exe for that
 
@Zoidberg did I mention my last exam had haskell questions?
 
which means it pulls data at around 1.5mb/s
on a lan
 
best diagnosis evar
 
user142019
12:13 PM
@BartekBanachewicz no & cool.
 
user142019
Hmm.
 
user142019
Shall I write foldr in Java and then use that. :P
 
@Zoidberg What does "1:2:1:[2]" produce?
 
user142019
[1, 2, 1, 2]
 
@Zoidberg so I'm pretty sure I aced all of them :3
 
user142019
12:14 PM
[1, 2, 1, 2] is syntactic sugar for 1 : 2 : 1 : 2 : [].
 
user142019
: and [] are constructors of [a].
 
@Zoidberg well, normal people call it an array.
 
user142019
No.
 
It's not an array
 
user142019
It's a list and in Haskell it's called a list.
 
12:15 PM
It's a recursive list
 
@R.MartinhoFernandes geeky
 
Okay, okay, put the gunz down
 
user142019
fds
 
: is the cons operator
 
like (cons ?
 
user142019
12:17 PM
(:) = Cons though I have never seen Cons and I don't know if it even exists. :P
 
user142019
I have really never seen the definition of list in Haskell. In which module is it?
 
in Lispy it's a keywoardth
 
data [a] = [] | a : [a]
 
user142019
That's the syntax? Cool.
 
No, it's defined internally
 
user142019
12:17 PM
Oh. xd
 
But with type operators above would be valid
 
user142019
Tuples are defined in a fugly GHC module.
 
Though it might be somewhere in GHC.Something
 
user142019
data (,) a b = (,) a b
data (,,) a b c = (,,) a b c
data (,,,) a b c d = (,,,) a b c d
 
user142019
Etcetera for all tuple types.
 
12:19 PM
It's generated
 
user142019
> Including one more declaration gives a segmentation fault.
 
Anyway without the special syntax fluff the list is data List a = Nil | Cons a (List a)
 
user142019
(:) = Cons
 
user142019
:P
 
user142019
Hoogle can't find (:).
 
12:26 PM
@R.MartinhoFernandes some nice 'hidden' details there ("not happening" - find it)
 
also, the CPU graph thing is just spurious. I had it up at the time
 
I just wish I could see the 1-star review.
 
@R.MartinhoFernandes me too, I looked for it
I'm making it my business to nightly snapshot our sourcesafe repo (5.3Gb) into a git repo (size: 782 Mb...).
Yeah. That's literal. I've put the entire filesystem storage of VSS under git. Lessee how it goes :)
 
12:33 PM
dat pun
 
More like dat typo
 
user142019
Why did those fucking idiots make us use Greenfoot.
 
user142019
School is terrible.
 
why I adore Boost : using namespace boost::lambda; checksum(const char *s, size_t size) { return accumulate(s, s + size, char(), (_1 ^ _2)); }
 
user142019
And if I wanted to make games
 
12:34 PM
:D
 
user142019
I'd have gone to, you know
 
user142019
a game development school.
 
@Zoidberg what is Greenfoot?
 
user142019
The worst game framework ever.
 
@Zoidberg can't you just say 'screw you' and make it in Ruby/Django?
 
user142019
12:36 PM
Its collision detection doesn't even work properly.
 
user142019
@sehe I could write a video game with Django, yes.
 
user142019
And it'd probably get graded 0/10.
 
Then all you need is a 1.
 
user142019
I need at least 5.5/10.
 
Wait. Greenfoot can do "video games"?
Bruhahahahahahahahahahaha
 
user142019
12:37 PM
5.5/10 is sufficient and it gets you exactly the same as 10/10. (And thus not motivational in any way.)
 
user142019
And 0/10 till 5.4/10 are insufficient.
 
@Zoidberg Nah. It's up there with the minecraft engine: it has the "save the world" feature:
Dec 12 '12 at 23:12, by sehe
@Zoidberg'-- I like Greenfoot! It has as 'Save the world' action in it's context menu! And it saves the world by generating java code. Impressive
 
@Zoidberg You don't have honour. You have no pride.
 
user142019
I'd rather use OpenGL and C.
 
user142019
12:39 PM
@sehe I have no motivation either.
 
@sehe fuck pride and fuck uni.
@Zoidberg OpenGL and C++ FTFY
 
@Zoidberg And you are a horrible person.
 
user142019
No.
 
user142019
School is a horrible entity.
 
That's what it says, a horrible person.
We didn't even test for that!
 
12:40 PM
14 hours ago, by Zoidberg
Me too!
 
oh man, it's been nothing but school bashing here
 
^ you admitted it yourself
 
let's talk about sex
2
:P
 
user142019
@sehe that was joke.
 
Schools suck: can't even have sex in class.
 
user142019
12:41 PM
@TonyTheLion with images!
 
Right.
 
@TonyTheLion Ye, I fucked... this uni assignment up.
 
@TonyTheLion We have an infestation of whiny losers.
 
user142019
@sehe you can.
 
@R.MartinhoFernandes seems like
 
user142019
12:41 PM
It won't be appreciated, but it's certainly possibru.
 
But it doesn't get you grades.
Mmmm. Wait...
 
I come to this room to lift my spirits, not to hear how terrible everything is.
 
@Zoidberg Did you try it?
 
oh wait
 
user142019
@sehe No.
 
12:42 PM
You don't have to study in school anymore, we do.
And that isn't something easily dealt with
Show some concern and empathy -.-
 
2 hours ago, by sehe
@BartekBanachewicz Do you step on a "positive energy" scale in the morning? Also, what are you here for :)
 
user142019
@sehe But I do occasionally visit /b/ in class when I'm bored.
 
user142019
That's the only good thing about school.
 
@BartekBanachewicz Cough. I've been there, dropped out
 
user142019
They don't censor any websites. You can visit anything.
 
user142019
12:43 PM
@sehe me too, soon!
 
user142019
sdffd
 
Well I have 2 more years.
Fuck me, right?
 
@Zoidberg Are you sure
 
Anyway, let's be positive
It's sunny today.
I love Lua.
Ponies.
 
user142019
Dutch Railways have Internet on stations but it's not free. However, DNS works. You can do any DNS thing you want.
 
user142019
12:44 PM
Maybe I could figure out a way to tunnel HTTP over DNS. :L
 
user142019
@sehe yup.
 
@Zoidberg You still need to achieve 10 studiepunten? Yeah, I failed doing that in my first year of Maths. I switched to Muziek Theorie, never got to the SP threshold and hence ended up with my impressive student loan in only 2/3 years of study
 
user142019
I consider this an utter waste of time and I much rather work.
 
user142019
@sehe als ik voor februari stop, hoef ik niet te dokken. xD
 
I wish I went to music school.
 
user142019
12:45 PM
En ik krijg rond nu nog mijn studiefinanciering. :P
 
user142019
Wss mijn laatste dus. xd
 
@Zoidberg Unconditionally? Prestatiebeurs out the window again? I truly hit the wrong period in time. Too late for no Prestatiebeurs, too early for hardheidsclausule.
 
user142019
df
 
Anyways, gotta decent job and paid it all after the first year. No looking back
 
user142019
What job?
 
user142019
12:46 PM
The one you still have now?
 
@Zoidberg ... come on
 
@sehe He's slowly turning into real zoidberg.
 
@Zoidberg Pretty much. Some relabeling occurred, but I have never had a contract with another employer, technically
 
user142019
cool
 
user142019
I have had one job in my life and it was awesome.
 
12:47 PM
15.5 years and counting
 
@Zoidberg ain't you working now?
 
user142019
@BartekBanachewicz no, I'm in school. :<
 
@BartekBanachewicz Psst. This is lounging. Different thing
 
user142019
I posted on Facebook that I was looking for a job.
 
@sehe I rather meant him being a lazy ass.
@Zoidberg well, that's hell of the job application
 
user142019
12:48 PM
And coincidentally I had a friend who had a software company. I didn't realize that. xD
 
@Zoidberg Wut.
 
user142019
Then TNT Post (postal delivery service) called me back because I applied for a job there and I told the lady that I just got a job. xd
 
@Zoidberg Postal jobs make me go postal
 
user142019
Man I'm glad I never did that.
 
user142019
Delivery boy is not a job for me. :P
 
user142019
12:50 PM
Going outside. D:
 
user142019
All that sunlight.
 
user142019
@R.MartinhoFernandes maybe I can use a custom DNS server that I set up at home. I have to try it.
 
@Zoidberg easy. I bet you can tunnel a few favicons of porn sites that way
 
user142019
:P
 
user142019
Oh yeah right.
 
user142019
12:52 PM
DNS primarily uses UDP.
 
So what.
 
user142019
Still worth a try. :P
 
user142019
@sehe Unreliable and probably fslow?
 
No it isn't. Better to waste your time with GreenFoot, then
 
user142019
No.
 
user142019
12:52 PM
Greenfoot isn't interesting.
 
user142019
DNS and shit is.
 
@Zoidberg UDP isn't slow. It's less convenient for data streams
@Zoidberg It is. However, it's not "worth a try"
 
user142019
@sehe not even if you lose lots of packets?
 
@Zoidberg UDP does not lose packets by design.
 
@Zoidberg well, why would that happen
 
user142019
12:54 PM
Then why is it unreliable? :P
 
Packets are lost for reasons external to UDP.
 
user142019
I thought UDP packets may be lost.
 
Also, TCP is going to be exactly as slow if you loose packages.
 
@Zoidberg Just as TCP packets can be. It just happens that TCP tries again.
 
user142019
Ohh of course. T_T
 
user142019
12:54 PM
Oh yeah. :P
 
user142019
Nothing to do with slowness.
 
user142019
I need to sleep.
 
user142019
And eat and drink. I'm hungry and thirsty.
 
user142019
So brb.
 
@Zoidberg It has to with slowness, alright. You use UDP if you want superfast response (you don't care about fidelity and sequencing as much, you just want the data, PRONTO. And next millisecond, again)
 
12:56 PM
0
Q: void* of a bool[] conversion to std::string

dosI need to save some data and the only viable option is a std::string; so I get a bool array passed as a void*. Now I need to save it in a way that I can convert it into a std::string and be able read a void* to a bool[] from that exact string. Sadly I got lost in conversion. f(const void* data, ...

 

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