« first day (2417 days earlier)      last day (2529 days later) » 

9:02 AM
t-that is interesting...
 
@AvnerShahar-Kashtan Sounds like a piano.
 
Yeah, I'm pretty sure I meant 83-key keyboard.
Lovely.
 
IBM..
ofcourse it is rubbish
jjust like lotus notes
 
mr5
Am I wrong if I say C# is more alike of C++ rather than, most of what developers I encountered say, Java?
 
@mr5 Yeah.
 
9:10 AM
@mr5 Yeah.
 
@mr5 Yeah.
@Nerdintraining IBM made fantastic keyboards. I still use a Model M keyboard, made in 1991.
 
It is very old model keyboard
 
@mr5 Yeah.
 
I think
 
@IccheGuri Yeah, that picture is of an IBM/XT Model F keyboard, released 1981.
 
9:13 AM
Where have you found this ?
Are you still using this keyboard ?
 
@IccheGuri The picture? From wikipedia. I don't have one anymore - though I still had my IBM XT until 2005 or so :)
The Model M keyboard I use? I've had it since 1998.
 
mr5
- C# has that initializer near the constructor `Constructor() : x(x) {}` but limited to `base` only
- C# inherits to a class using `:` operator rather than `inherits`(Java). Same with interfaces implementation
- C# uses `delegates`, technically, this is just a function pointer in C/C++
- C# has operator overloading
- C# has `namespace` instead of packages
- C# `using` keyword can be used as an alias for a namespace or a type
- C# has `struct`
and all of those can be found in C++
 
@mr5 These are relatively minor syntactic issues.
 
C# has operator overloading ?
Fantastic
 
@IccheGuri Yup.
 
9:14 AM
@mr5 Java and C# both have managed memory, a intermediate language, a JIT, etc.
 
I think Java And C# is similar
 
mr5
@IccheGuri uhm yes? why?
 
Java does not support operator overloading
 
And delegates aren't function pointers. That's like saying C# object references are just like pointers.
 
So I have thought that C# also does not support operator overloading
Actually I am Java guy
 
mr5
9:15 AM
@RoelvanUden yeah, that's the big similarities of C# and Java
 
C# is mostly Java evolved to grow the fuck up and include features that are sorely missing in Java, modeled by F#/C/C++/Ruby/PHP/whatever.
 
I have to learn C# well
 
@IccheGuri Respect--
 
Delegates are type-safe objects that wrap method invocation - they can be single method calls, multicast delegates and so on. Not function pointer.
 
List<int> list ; is not supported in Java
 
9:16 AM
C# has native garbage collection...
 
but it is supported in C#
 
C# started out as an copy evolution of Java, and every update since has taken it further and further from C++.
 
@RoelvanUden ,why respect man ?
 
mr5
@AvnerShahar-Kashtan well, as much as I can say, they're both to implement and have the same intent
 
@IccheGuri This room has made disrespecting Java a hobby and tradition. :)
 
9:17 AM
You're a Java man. My pre-programmed behavior is to have less respect towards someone that does Java, rather than C#, in the C# room.
The neural network was trained that way.
 
@mr5 Intent is similar, implementation is worlds away.
 
mr5
@IccheGuri don't worry bro. I'm from Java as well
 
@mr5 Respect--
 
But now I am working in C#
 
@IccheGuri Respect++
 
9:19 AM
for you Respect = Respect*Respect
 
mr5
@AvnerShahar-Kashtan I mean by implement is to define a delegate. You would declare the signature first before using it as a type
 
Can you tell me what are the other similarities between C# and c++ ?
 
Glory to mankind T_T
 
@IccheGuri java also have *= ...
 
ha ha
 
9:20 AM
C# has real generics, native resource managment, deep integration with windows, lambdas & linq, dynamic variables, better enumeration support with yield etc. Java definitely doesn't have all these..
 
.Net inbuilt garbage collection surpasses most of the languages..
 
@Saket ^correction, JAva hast Lambdas
 
Java does not support var
 
C#'s memory model is much closer to Java than C++. C++ has no garbage collection, so memory management and object disposal is very different. The responsibility of deciding whether an object is constructed on the heap or the stack is on the caller, whereas C# leaves it up to the library designer to decide if an entity is a class or a struct, which is a similar concept, but not identical.
 
9:22 AM
@Nerdintraining: I mentioned Lambdas & Linq.. Does Java support that?
 
@Saket i beliebe there is sth like LinQ but not really Linq
 
C#'s generics are similar to Java's (though much better implemented). C++'s templates seem similar at first, and can do similar things, but are a considerably different beast.
 
Just like var, technically it doesn't have it but someone out there built a Var class that one could use
 
@Saket Java 8 added lambdas.
@Nerdintraining You're thinking of dynamic or similar. var in C# is simply a syntactic trick. If you write var myList = new List<string>(), the compiler actually emits the code for List<string> myList = new List<string>(). var isn't persisted in runtime.
 
I believe there isn't Linq support in Java yet. I will look up more about it, though..
 
9:25 AM
Java 8 has the Stream API, which offers similar functionality ot LINQ. Not nearly as streamlined, of course.
 
Can anyone tell me why operator overloading is not supported in JAVA ?
 
@IccheGuri From what I read, it was decided that the added complexity is simply not worth it.
 
@AvnerShahar-Kashtan i know i know, i was not thinkig of dynamic
 
Operator overloading is basically a "nice to have", since you can do anything it does with methods. And it makes the language considerably more complex to design, parse (compilers) and read (developers).
 
java 8 have default methods for interfaces
 
9:26 AM
someone really wrote a Var class wich is not called var but sth else and that acts like acontainer for all diffrent things
a wicked thought (pure evil becuz in my eyes not very practical) but who cares
 
that somewhat solves deriving from 2 "classes"
 
I think C# as a hybrid combination of all the beautiful languages. All the good features taken from different languages and forged into a single modern language by Microsoft: C#
 
@Nerdintraining Like COM's VARIANT type.
 
@AvnerShahar-Kashtan i don't know, but maybe you are right
 
C++ have auto, why java don't have it?
 
9:28 AM
Form JVM perspective supporting operator overloading is more difficult and if the same thing can be achieved by using method overloading in more intuitive and clean way it does make sense to not support operator overloading in java. a complex JVM will result in slower JVM than a relatively simpler JVM and reduce the opportunity of optimization by taking out guaranteed behavior of operators in java.
@ntohl , auto is used for iterating list , map etc
 
@ntohl Like everything in Java, it's a matter of their mindset, which is of small, conservative steps.
 
Java has Enumerator class for iterating list , Map
 
mr5
@AvnerShahar-Kashtan I believe C# supported operator overloading just for the sake of syntactic sugar. I have never used operator overloading in production code since it will just make more confusion.
 
They resist syntactic sugar if it's just for appearance/convenience.
@mr5 One of C#'s design goals was to appear sexier/sleeker than Java.
 
mr5
other useful usage of operator overloading is when you're creating a matrix class. and that's all I can think of
 
9:29 AM
A lot of C/C++ devs slammed Java for not having it, so they wanted to add it. It's a PR feature. :)
 
@Av
@AvnerShahar-Kashtan: Rightly said
 
by the way this tuple C# 7 seems awfully weird to me
paths.Add((parent, possibleParent))
 
mr5
@ntohl auto in C++ is equivalent in var in C#?
 
my mind wont accept it
 
Pair is now available in JAVA since Java9
 
9:31 AM
@misha130 It's useful in the cases when you want to use class only for once
 
of course
 
@mr5 Pretty much. But it was added to C++ to be more like C#, not the other way around. :)
 
I am learning a lot of features of C# from this discussion
carry on guys
 
@misha130 That's actually the simpler use case, since it's closer to a method call with two parameters.
It's the (var results, var totalCount) = FindResults() syntax that takes getting used to.
 
9:33 AM
yes I don't get used to that either
 
Tell me, which language of all you found easiest to learn?
 
deconstruction is creepy
 
@misha130 How it it different than dictionary.Add(key, value)?
 
there's something that upsets me with ascii way more than it should:
[=5B
]=5D

{=7B
}=7D

<=3C
>=3E
 
As opposed to forcing you to call dictionary.Add(new KeyValuePair(key, value))?
@satibel Heh.
 
9:34 AM
@AvnerShahar-Kashtan isn't it dictionary.Add({ key, value }) or something?
pretty sure
 
@misha130 The basic Add call simply takes two parameters. I'm not taking about collection initializers and such.
 
mr5
@Saket assembly language is the easiest!
 
please explain abstraction with simple example
 
If we're fine with methods taking multiple parameters, why not returning multiple results too?
 
@ArsalanQaiser the quality of dealing with ideas rather than events.
 
9:35 AM
you know for ages it was frowned upon
and was said that returning multiple results is "bad code"
 
mr5
@AvnerShahar-Kashtan you mean yielding different types?
 
@ArsalanQaiser freedom from representational qualities in art.
 
@mr5: yeah, good old time
 
mr5
lol. I never learned it though
 
@mr5 multiple, not different
 
9:36 AM
@mr5 different results, regardless of types.
 
mr5
okay. can someone try to yield multiple different types of object from a function? I haven't tried that yet
 
well a specific type
 
(var csDevs, var javaDevs) = SeparateDevs(devs).
 
oh boi the chat is going rampage
i did not follow
 
@AvnerShahar-Kashtan If methods are to return multiple parameters, how would its signature look like?
 
9:37 AM
the syntax isn't var (csDev, javaDevs) = SeperateDevs(devs);?
damn ok
 
No, it is: if (javaDevs.Count != 0) throw new Exception("Java 'developers' are not real devs!");
 
do you use ts deconstruction @Roel?
 
not really
 
@RoelvanUden ^le kek
 
yea me neither
lol I wrote (var test, test) and my vs crashed
 
9:39 AM
:37339866 public (List<string>, List<string>) SeparateDevs(List<string> devs) {}
 
👏
 
mr5
@KamilSolecki "Boy, this spaghetti code sure looks delicious." can't argue with that =P
 
I amma go back to making databases in databases
 
gl hf
 
public (List<string>, int) FindWithTotalCount(string query, int maxResults)
{
   IQueryable<string> results= _dbContext.Find(query)
   return (results.Take(maxResults).ToList(), results.Count());
}
 
mr5
9:43 AM
insert sql statement as values in database and make a query that would execute those values
 
Here's a relatively real-world example. Queries a DB and returns up to X results, but also returns the total count.
 
@AvnerShahar-Kashtan , you are infact returning an object of Pair class ( or tuple whatever you say )
 
probably sums up abstraction pretty well. (starts at arount 15 minutes.)
 
@AvnerShahar-Kashtan without tuples its either making a class or using dynamic
right?
 
9:46 AM
@mr5 ay, goto: meat;
 
public SearchResults FindWithTotalCount(string query, int maxResults)
{
   IQueryable<string> results= _dbContext.Find(query)
   return new SearchResults { Data: results.Take(maxResults).ToList(), Count: results.Count() };
}
 
please suggest me any book related c# oops concept beginner to advanced and easy to understand
and deap knowledge of every concepts of oops.
 
@ArsalanQaiser are you doing job or a student ?
 
@ArsalanQaiser Have you tried taking classes?
 
i dont tried any classes.
 
9:56 AM
do you know other programming languages or not? @ArsalanQaiser
 
only english and urdu..
 
ha ha
 
@ArsalanQaiser Taking classes is the best option. Get a beginners book if you're poor.
 
English or Urdu is not programming language man
 
why dont you just start with some basic courses online that teach you C#
 
9:59 AM
@IccheGuri actually...
 
some basic concepts
 
oh my god
 
@misha130 yeah
@IccheGuri ValueTuple<K,V>
 
@ArsalanQaiser Seriously. Take classes. Not just because a teacher is so much better than a goddamn book, but because you'll be in an environment suited to learning a new skill, with like-minded individuals whom you can spar with and learn together. This is by far the most effective method to get up and running without a shit-ton of discipline (which I concluded you don't have because you didn't fucking Google around).
Because programming is a mindset more than anything. A way of thinking.
 
@misha130 Yeah, that's fine. But just like you won't create a custom StringList, but instead use List<T> where approprtiate, you can use tuples when they're appropriate.
I agree that using them everywhere is smelly.
 
10:03 AM
@RoelvanUden this.
So much agreed
 
@RoelvanUden don't take school classes though.
 
But once you get over the novelty, you'll see that returning two values isn't very different than passing two arguments in.
 
@satibel Doesn't matter. School is good to get up and running with your thinking methodologies.
Bewarned though; once you think like a software dev, there is no way back T_T
You will NEVER experience technological wonder again.
 
@RoelvanUden well, it depends on the school.
 
Because the same argument can be made that FindWithTotalCount(string query, int maxResults) should be replaced with FindWithTotalCount(SearchQuery query).
 
10:04 AM
@satibel If its personal preference to choose the classes or not, school classes are as good. Thats because only people who actually care to learn that are going to take them.
 
I am calling a dll written in vb6 . But when I am calling from asp.net project I am getting the following error :
 
Our newbie disappeared so it's pointless to talk about this anyway lol
 
I have no idea bout this
 
at least here, most people at school (yes, even engineering) don't care about learning.
 
@RoelvanUden maybe too much "fucking" in one sentence for him XD
 
10:05 AM
@IccheGuri Debug it to see what the actual error is.
 
@satibel way to generalize the whole students as one group
 
@KamilSolecki I've been told I'm harsh on more than one occasion. :-D
Then again, I'm Dutch. We're not for the lighthearted.
 
oh well you did say most
didn't you conquer japan at some point?
 
@misha130 Sturgeon's Law applies here as well.
 
But when I click debug , the following window is appeared
 
10:07 AM
@misha130 Not conquer, but monopolized trade for some time :p
Our ancestors were seriously badass.
 
@misha130 I don't say they aren't students that like to learn, or teachers that want to teach, but where I was, there were a lot of them who did only attend to classes, and didn't event do the homework.
 
also south africa zulu
yes they were
 
@satibel This is an advantage of being an adult. If you want to learn a new skill as an adult, you're goddamn sure that everyone there is also there to learn said skill. Because you won't throw away $$$ for something you're not interested in.
 
@RoelvanUden that a lie. Every dutchman I met in local dutch bars was real nice :(
 
free education?
 
10:09 AM
In every dutch city ive been to @RoelvanUden
 
@misha130 free education.
 
@KamilSolecki We are nice! We're just a harsh folk, we say what we think.
@KamilSolecki Unlike, say, Asian countries. Where hierarchy means everything, respecting your elders, and saying "No" is a capitol offense.
 
@AvnerShahar-Kashtan
 
like ~1000€ per year.
 
@RoelvanUden oh yea, I guess you are right:)
 
10:10 AM
@IccheGuri Sorry, can't help you. Looks like some COM junk. :(
 
E.g. almost every company around here has a 'flat hierarchy'. The CEO isn't some mythical entity that you must respect and obey and never say 'no' to.
 
@RoelvanUden capitol? didn't you mean capital?
 
@RoelvanUden Heh. Compared to Israelis, the Dutch are strictly polite and considerate :)
 
@satibel Probably.
@AvnerShahar-Kashtan Bwhahaha I want to visit there
 
10:12 AM
@RoelvanUden Americans tend to have a hard time at first with Israeli bluntness, especially in business contexts, where Americans tend to be very correct.
 
actually, that does exist :p
 
americans are all just babies that cant handle us
 
@AvnerShahar-Kashtan Yeah, same here. American-ness doesn't work with the Dutch
 
Avner did you read that da marker article about the document some company made about us?
 
@satibel Yeah, I'm pretty sure Roel meant to reference a pun in the title of an obscure episode of an 80's mystery show.
 
10:13 AM
How to "act around israelies"
 
@misha130 Yeah, I've seen documents like it floating around over the years.
 
Don't get offended if isrealis interrupt you. Don't get offended if they talk hebrew among themselves, ask you personal question about your marriage religion etc etc
 
@AvnerShahar-Kashtan I don't often make references, but when I do I put them in italic.
 
            var paths = new List<(int, List<(Attributes, Attributes)>)>();
this is getting interesting
 
10:21 AM
oh, cap dead?
 
I was wondering that aswell^^
maybe she jsut ignoring me
 
reminds me of a woman that wanted to arrange me with one of her daughters.
-are you single?
-yes, why?
-I have a daughter your age *shows picture* isn't she beautiful?
-indeed.
-would you want to marry her?
-erm, I just talked to you for 10 minutes, this is a bit sudden.
 
!!kieran
ded
 
@satibel sounds lovely
i would take it
 
@satibel did you marry her?
Like, just for lolz
 
10:26 AM
nah, I have no time for women (nor men, nor attack helicopters) RN.
 
Why not
 
Why is @CapricaSix gone?
 
i have taken all his avalible time
 
we switch roles around
 
10:33 AM
@satibel I don't think you've properly considered the amount of time that an attack helicopter will save you, in the long run.
 
free helicopter rides?
free attacking middle east!
the joys
 
Free promotions when you show it to the boss
 
Free stuff whenever you show your boss the insides of Hydra 70 underwing missile launchers
 
10:51 AM
@Nerdintraining Did you mean: Why is the rum gone?
 
Also, upon being apprehended by the authority for possession of said helicopter, you'll have a lot of free time in prison!
 
I like to call it happy persuasion. You basically just act all happy when you show people something intimidating
 
anyone know a good syntax example of comparing a date out of a column, with the current date?
 
@AdiMohan (DateTime)table["date1"] < DateTime.Now
 
@War has been alarmingly quiet in the recent days. Is everything going smooth with your project?
 
11:10 AM
He deadek?
 
hi :)
 
@RoelvanUden you got me
 
11:42 AM
@ntohl, can't make it work, thanks anyway :)
 
11:56 AM
talking about helicopters, Imma make something like that some day:
 
@satibel also apply Your arbalest to it, than You can terrify Your neighborhood.
 
@ntohl also, a boiling oil bag :p
 
Make it boiling fanta pls
 
12:11 PM
@KamilSolecki this is disgusting :D
 
12:34 PM
@SebastianL this is fanta-stick.
because caramelized fanta is sticky.
fanta napalm.
 
Good morning
So, MVP
Such a nice pattern eh?
 
@Shoe Minimum Viable Product?
 
Model View Presenter
 
I don't like that pattern*
 
:(
 
12:36 PM
Corrected, whoops, ofc. I know it, I just don't like it :)
 
We should marry, we have so much in common
 
Well, I am single.
 
It's fallen a bit out of favor, hasn't it?
Supplanted by MVC and MVVM.
Maybe not supplanted, since they're close variants.
Move by MVVM
 
Ye, not in the case in which you are maintaining an ASP.NET web form application that you have to start testing on
 
MVVM! MVVM!
 
12:39 PM
I don't like MVVM either. MVC is okay.
 
mvvm is the best pattern ever.
at least for desktop development
 
@RoelvanUden and i thought i was alone :D
 
TDD in MVVM and work is done in no time
 
@KamilSolecki Nah, I prefer React-like patterns. :-P
MVVM is really convoluted with all the unidirectional bindings.
I like my code to be simple. MVVM never accomplished that.
 
Tbh I have no idea how react looks like / works
 
12:41 PM
Why unidirectional?
 
I think what he means by that is stuff like view commands -> VM, then VM updates the view through binding etc
 
@KamilSolecki a manager would say ASAP is the best pattern :)
 
Something like this:
1. You start with a *state* (an entire model of the application).
2. You render the UI based on the *state*.
3. User interaction generates an *event*
4. The *event* alters the *state*.
5. Go to 2.
 
@ntohl good one!
 
@ntohl lol
 
12:43 PM
@RoelvanUden but it all happens pretty much without any additional work
 
Yeah, that's pretty much it. Still not sure why it's unidirectional, since #2 updates the view from the state, and #4 updates the state from the view.
 
binding engine does all that for you
 
@KamilSolecki Binding is two-way. And really complex to re-render the entire thing.
I don't want to say "I mutated property x in y.z.x.a!" to WPF
 
EDIT:
1. You start with a *state* (an entire model of the application).
2: You render the UI based on the *state*.
3. User interaction generates an *event*
4. The *event* alters the *state*.
5. goto 2;
 
I'll just go "Something changed; figure it out"
So.. your model does NOT HAVE observable properties AT ALL.
You just tell React, "Hey, dude, something changed, re-render and figure it out"
Which makes it incredibly simplistic.
 
12:46 PM
Doesn't seem very different. You can tell your MVVM engine to rerender everything. It just seems wasteful.
 
@RoelvanUden what if you have a shitload of rendering to do on a rerender and you just changed a single integer to display?
 
@AvnerShahar-Kashtan Yeah, and React is not wasteful. Therein lies the difference. You can do exactly that super simplistic way to deal with things. :)
@SebastianL Re-render the entire thing. React will optimize it away.
It uses a VDOM, a shadow.
Essentially, think of a game engine, which re-renders 60x per second.
That's not wasteful, because it deals with it ;-)
 
That mostly seems like an implementation detail. It's no different, pattern-wise.
 
oh nice :)
 
@AvnerShahar-Kashtan Sure it is. There is no flowing back.
 
12:49 PM
 
Anyway
Actually
I should post it as a question on Stack Overflow
 
guys, someone needs to upvote @Nerdintraining post on starboard, its messing up the yeahs
 
In terrible pseudo-code, imagine this:
var state = {name: 'Roel';}
var store = new Observable(state);

var changeName = function(newName) {
	state.name = newName;
	store.emit();
};

class MyUi {
	constructor() {
		observable.subscribe(x => this.setState(x));
	}
	render() {
		return <div>{this.props.name}</div>;
	}
}

ReactDOM.render(new MyUi());
So calling changeName("Roel van Uden") will be enough to update the Ui.
Regardless of how deep I might have rendered the name somewhere
 
Oh, cool/
 
Simplicity rules.
 
12:55 PM
if we have setters and getters then why do we need observables
 
What.
 
well put state in to MyUi
create private _name: string;
 
That defeats the entire point of being able to change the application state from anywhere.
 
@misha130 other question. Why don't we eliminate all setter getter code with observables?
 
and public set name(val) { this._name = val; render() }
ok ok
 
12:56 PM
For example, imagine I now hook up a WebSocket to a server that sends a 'CHANGE_NAME' command. It can just feed that into changeName and voila, the UI is entirely updated.
But the connection doesn't really need to know about the Ui at all
SoC and all that
 
observable.subscribe(x => this.setState(x));
this part though
where did the observable come from
 
Sure, I want my UI root to update whenever the obsverable changes.
 
in to MyUi
 
two lines above?
Oh, I should have named it store.
 
oh its declared on the global?
 
12:58 PM
My bad.
 
Okay I just went on some forums
And Ive read the best explanation ever:
 
var state = {name: 'Roel';}
var store = new Observable(state);

var changeName = function(newName) {
	state.name = newName;
	store.emit();
};

class MyUi {
	constructor() {
		store.subscribe(x => this.setState(x));
	}
	render() {
		return <div>{this.props.name}</div>;
	}
}

ReactDOM.render(new MyUi());
There.
 
I will delete this in a moment.
 
@KamilSolecki Yeah, that's probably enough for me not to use a library.
 
:37343608 Where is that from?
 
12:59 PM
@KamilSolecki Generally speaking, if you feel the need to delete a comment after writing it, perhaps it would be best to take a breath and not say it in the first place.
 

« first day (2417 days earlier)      last day (2529 days later) »