« first day (3432 days earlier)      last day (1534 days later) » 

2:01 PM
It's time to requisition some cables from the warehouse
 
@Wietlol Yes, I agree that ad-hoc expression composability is nice.
 
lets see if I can find a nice example usage in my codebase...
 
private async void StartButton_Click(object sender, RoutedEventArgs e)
{
// *** If a download process is already underway, cancel it.
if (cts != null)
{
cts.Cancel();
}

// *** Now set cts to cancel the current process if the button is chosen again.
cts = new CancellationTokenSource();
try
{
await AccessTheWebAsync(cts.Token);

}

catch (OperationCanceledException)
{
//...
}
catch (Exception)
{
// ...
}
// *** When the process is complete, signal that another process can proceed.
cts = null;
}
 
Because it's time to play with me new server
 
@Wietlol What is an extension method?
 
2:04 PM
mostly building objects
 
@MyWrathAcademia Yeah, that sounds about right (assuming you really care about handling OperationCanceledExceptions differently). You can simplify it with null-conditional calls.
 
90% battery, 2 hours remaining
89%, 59 minutes remaining
 
cts?.Cancel();
cts = new CancellationTokenSource();
try
{
  await AccessTheWebASync(cts.Token);
}
finally
{
   cts = null;
}
 
@AvnerShahar-Kashtan thats simplification in a pythonistic way, haha. I have no idea what null conditional calls are but now you mention it I asume it is this statement cts?.Cancel() and will look into it.
 
2:08 PM
Yes. It's the equivalent of your "if not null then call Cancel"
 
@AvnerShahar-Kashtan interesting one liner alternative. How do you read that statement?
 
yo yo yo
 
@CaptainSquirrel lol
trolling you
 
I'm thinking is cts not null? then call cancel.
@AvnerShahar-Kashtan is that right?
 
ye, that seems correct (the if not null version)
 
2:11 PM
@Wietlol thanks
 
Prashanth Chandrasekar on March 09, 2020
The safety of our employees, community, and customers are our primary concern. There are a number of measures we’re taking to ensure we manage to safely get through this situation while continuing to serve our community and customers effectively.
 
oh boy
 
here we go again..
 
C# keeps surprising me. It's the only language I've used that is case sensitive.
Pretty useful
 
you must have used like... 2 languages then
 
mr5
2:13 PM
GitHub for desktop fucking sucks
 
English and SQL?
 
No, no, no, don't use case sensitivity as a differentiator, no, no, please, no.
 
@MyWrathAcademia Java? C++? C?
 
haha, I'm not as experienced as half the people in this chat.
 
Don't call a private member cts and its public property CTS. Don't. It's a recipe for disaster.
 
2:13 PM
oh
 
Java, JavaScript
 
@mr5 you should use GitHub for terminal :P
Java is hella case-sensitive
give Java the wrong case and it breaks down asking why it was the one who failed high school and not someone who deserved it
 
I've not used python in a long time but I think it too is case insensitive (correct me if I'm wrong please)
 
> It's the only language I've used that is case sensitive.
 
@Freerey So in Java int a = 1; and int A = 1; are different?
 
2:15 PM
there is one language I can recall that is not case sensitive
 
python?
 
I heard Covid-19 has infected millions of computers XP
 
@MyWrathAcademia they are both variable declarations
 
mr5
Imagine you've switched to develop branch from master branch and then GitHub for Desktop asks you if you want to bring the changes and you opted yes. You commit the changes locally. You wanted to switch to master branch again then this fucking stupid GitHub for desktop stupidly stashed the changes so you're going to commit again!!
 
just with a different name
like int a = 1; and int b = 1;
 
mr5
2:16 PM
@Freerey yeah. I was about to use the terminal after this incident
 
@MyWrathAcademia yes they are different
 
the name will not have any influence on the behavior
 
though I don't recommend making two variables with the same name outside of case
 
but they are two different variables
 
@MyWrathAcademia C# has several null-handling operators. string s = message ?? "null" will return message unless it's null, then it will return what's after the ??.
 
2:17 PM
@Freerey I will have to test it. I shouldn't be making basic errors when it comes to Java since Java is supposed to be my cup of Java
 
?. is the conditional access operator = string s = myObj?.ToString() will return the result of ToString(), unless myObj is null, in which case it will return null.
 
I'm 100% sure that JavaScript is case insenstive.
 
And the newest, ??=, which is conditional assignment. string s = myObj?.ToString(); s ??= "default". This will assign "default" to s only if it's null.
 
I'm 100% sure that JavaScript is case sensitive
 
@Wietlol thanks,understood.
 
2:20 PM
>"Foo" == "foo"
< false
 
that doesnt even count
 
ohhhhh I get it now
Foo Fighters are fighting nonsense code
 
^
 
Oh identifiers
 
2:22 PM
@MyWrathAcademia excuse me
XD
 
@AvnerShahar-Kashtan so then cts?.Cancel() will call Cancel() unless cts is null then it won't call Cancel()?
 
@MyWrathAcademia Exactly.
It won't do anything, if it's null.
Which is exactly what the if (cts != null) check does. It's such a common pattern they decided to bake it into the language.
 
it would be weird if it was the other way around
 
@CupOfJava I unintentionally pinged you!
 
even tho that is still a very common operation
 
2:25 PM
cd C:/Convid-19/virus
chkdsk /R
you can all thank me later
 
@AvnerShahar-Kashtan Christ, seems I need to read up on JavaScript basics too. Thanks @AvnerShahar-Kashtan. Better to find out now than in production code.
 
@CupOfJava I dont understand these weird abbreviations
 
Yeah VB is not case sensitive for identifiers, and I think VB.Net inherited that trait.
Or not, definitely VBA is …
 
?. is the conditional access operator i.e. access the value of a variable on the condition that the value of the variable is not null. I like how programming is so idiomatic.
 
@Wietlol command prompt
 
2:29 PM
accessing the value of a member if the value of the object is not null
 
@AvnerShahar-Kashtan is the conditional access variable exclusive to C#?
 
@CupOfJava what a primitive tool
 
I hate you
 
many languages have a conditional access operator actually
 
@MyWrathAcademia I'm sure other languages have similar constructs.
 
2:32 PM
Wietlang actually doesnt
 
@AvnerShahar-Kashtan Great to know.
 
it is not a normal operator, so I have trouble getting it in the thing
 
@Wietlol There's still time to add that feature.
 
oh, plenty of time
 
What do you cinsider to be a normal operator?
 
2:33 PM
for example, plus
 
Unary operators, binary operators?
 
plus acts on two expressions
<a> + <b>
a and b are both valid expressions
conditional access does not operate on two expressions
<a>?.<b>
a must be a valid expression
 
@AvnerShahar-Kashtan what other conditional operators are there?
 
but b is just an identifier
 
??= null conditional assignment.
 
2:35 PM
?? null coalesce
 
@AvnerShahar-Kashtan when I learned about operators I only read about Unary (-a), binary (e.g. +), logical (e.g. &&) and relational operators (e.g. <=).
 
and ?. conditional access
 
and of course the old ?: ternary
 
what does that do?
oh wait
 
<condition> ? <true expression> : <false expression>
 
2:37 PM
he asked about conditional operators, not only null operators
 
@JonathonChase there's also ?: operator, known as the elvis operator
which basically means, if the left operand is truthy and non-null, use that, otherwise return the operand on the righthand side
 
not in C# tho... is it?
 
nope, don't think so
 
mr5
a?.IsSomething ? a.Nothing ?? a.Something : a.WTF
 
My understanding was that ?. was the elvis operator
 
2:42 PM
?? is the elvis operator
a ?? b
a == null => b
a != null => a
 
mr5
what does Elvis has to do with C# operators?
 
I'm guessing the truthiness check neil mentioned makes it a bit different than ??
 
only in JS
or other dynamically typed languages
are they even typed?
 
yeah, just at runtime?
 
mr5
This Visual Studio in Windows can actually be the next RNG de facto. One minute it's compiling well, the next minute it won't.
 
2:45 PM
JS actually has types...
Array, Object, Function, Boolean, Number, String
 
ruby has types, elixir has types
 
but only dynamic languages have to make a truthy table
statically typed languages can just make sure that only booleans are evaluated on a truthyness scale
 
Sure, if they so choose. they could still decide that 0 is not truthy
I know the framework CLR doesn't actually have a boolean type, not sure about core
 
ye, but those languages are silly
boolean is a single bit
which goes against the byte-only principle of binary languages
Wietlang's binary code has a boolean... as an int1
or... i1
but it also has an i8388607
 
@JonathonChase Sure it has a boolean type. Why shouldn't it have? It's not C.
 
2:49 PM
yes, that is a 83MiB integer
 
mr5
Interface {}
AbstractClass : Interface {}
ConcreteClass : AbstractClass {}

registry.Register<Interface, ConcreteClass>()
what could go wrong here?
 
@AvnerShahar-Kashtan It doesn't, though. Things like brtrue and brfalse instructions are checking against 0 and not 0
 
@mr5 I assume not much
 
you can get some weird out of this, like so:
unsafe void Foo() {
    int x = 42;
    bool b = *(bool*)&x;

    switch(b)
    {
        case true:
        case false:
            Console.WriteLine("sane");
            break;
        default:
            Console.WriteLine("insane");
            break;
    }
}
 
Oh, you're talking about the CLR, not the BCL.
 
2:51 PM
Correct
 
The above will work as you might expect in Core but not framework
 
mr5
@Wietlol What if ConcreteClass : AbstractClass, Interface {}?
 
same
 
mr5
2:51 PM
why is this allowed?
 
but it depends on what your registry is
 
Battery lasted for 30 minutes and then died
 
mr5
@Wietlol it's a typical DI
 
ah
why are you surprised?
this is how they should work
 
@mr5 What is allowed, for a class to implement an interface twice, both direcrtly and through inheritance? Because it doesn't matter.
 
mr5
2:53 PM
The descendants could implement the same thing over and over again...
 
Yeah, but it's redundant and ignored.
The interface is just a contract that the type will implement certain properties and methods
 
Yeah, I suppose a compiler warning could be emitted saying that implementing IWhatever is redundant because it's already inherited.
 
mr5
it just puzzled me for a moment. I can't think of a reason why it shouldn't be allowed though. But it's kind of confusing
 
If you have a really deep inheritance hierarchy it might be useful to put the interface a derived class is most likely to be used as directly in it's definition.
 
2:55 PM
@Wietlol Cool, cool.
 
I also see it a lot when looking at decompiled code
 
mr5
@Wietlol are you using some 3456rd party extension?
 
why?
I just use an actual IDE :D
Rider > Visual Studio
hides in bunker
oh wait, the squirrel is not paying attention
 
nvm, he is
I should have stayed in my bunker
 
2:57 PM
indeed.
 
mr5
Just so you know, I've been used to using VS for Mac and now I'm actually trying to make a personal project in my laptop which is using Windows.
 
stop
 
HAMMERTIME!
 
I only had bad experiences with VS for Mac
 
mr5
2:58 PM
For the last hours, I always get nothing but annoying moments
 
Maybe it's improved
 
stop the madness
 
madness?
THIS... IS... C#!!!
 
mr5
It's pretty decent for me when I work using VS for Mac. At least creating Xamarin Forms apps
 
kicks Hans from the room
(better not abuse my RO powers now that the squirrel is paying attention)
 
mr5
2:59 PM
@JonathonChase when was the last time you use VS for Mac?
 
what's it take to be a room ownwer?
 
mr5
You need to have an italicized name first.
 
Magical
 
besides being a moron
 
1, be majestic
2, rant about C#
3, ???
4, RO
 
3:00 PM
how dare you
ur doin me an offence
 
hehehehe moron
hehehehe as a requirement
hehehehhe
 
mr5
in order to become a RO, you need to have the qualifications below:
1. Become a moron.
2. ??
3. You are now RO
 
something something become squirrel
 
mr5
soo... another annoying moments brought to you by this stupid shit Visual Studio in Windows.
 
3:02 PM
Not being @Harry is a good start to being an RO
 
mr5
You can't delete bin,obj folders after a debug session.
 
just use Rider?
 
mr5
 
@Harry if you respond before 15:05, you can be an ro
15 seconds
10 seconds
 
mr5
According to Resource Monitor, this processes aren't done yet with the file
 
3:04 PM
5 seconds
 
mr5
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 
mr5
Can you imagine, creating a single paged app that took 5hrs of work would generate 100MB under obj folder?
How fucking cool is this Visual Studio for Windows
 
100MB? pfft
how about debugging your 12GiB application?
 
mr5
ha! which god damn IDE is that?
 
3:07 PM
it wasnt the IDE, it was MY application
I... accidentally did some recursive processing on the Wietlang SDK
which... was not meant for a recursive task
 
@Hans1984 haha how did they even Photoshop that ?
 
mr5
@Wietlol ha, so you are the "cool" guy
 
?
 
mr5
2 mins ago, by mr5
How fucking cool is this Visual Studio for Windows
 
oh no
 
mr5
3:10 PM
I think I could fill the entire convo page of the chat with my rant while developing for the next minutes
 
@mr5 Oh it was years ago at this point. I imagine it's improved.
When I used it, it felt like stepping back to VS 2008 in terms of random crashes and general bugginess.
 
@littlemisscomputerscientist well I got bad news for you
 
mr5
VS in Windows is a multi purpose software. You could use it as:
RNG software (build status is random)
Dump Simulator (creates 100MB of random files under obj folder)
Locker (lock your folders for no reason)
 
I dont think its shopped
those animals are both dead
 
@Hans1984 :O I am scarred for life
 
3:12 PM
:(
 
jk I'll be fine
but why would anyone do that ught
 
it was a funny pic
dead or not dead
;)
 
3:14 PM
look at its smirk
 
mr5
looks like the 100MB is intentional since they even named it after the size
 
3:44 PM
@mr5 My god, that's my brother
 
CupOfCovfefeScript?
 
yes, I made that
 
user11867329
Anyone know a plugin for full-screen menu on WP?
 

« first day (3432 days earlier)      last day (1534 days later) »