« first day (3603 days earlier)      last day (1336 days later) » 

5:49 AM
Buenos dias
 
6:18 AM
Ewwowww
 
6:50 AM
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
 
7:47 AM
yo
 
In case anybody wondered, the first message in here was "ArgumentNullException".
 
ahoy mateys
 
Ahoy Captain o7
 
@Squirrelkiller Nice, I've never known!
p3k u there?
 
9:03 AM
Wow I am on that first page!
 
Woah indeed. Holly oldest living C# member confirmed.
 
@hollystyles Damn
We have a new leader.
 
god dang
in light of this new evidence, i think Holly should be an RO
 
Seconded!
 
in that case
 
9:12 AM
Not only RO but RM.
 
Welcome to the club @hollystyles
 
Why so surpised kieran?
 
u aboos jack
 
9:24 AM
I no aboooose jakkko
 
What's RM
 
Room Master.
 
9:48 AM
good morning
 
bit late for morning yo
@Squirrelintraining Room Main
 
10:03 AM
@Squirrelkiller ROM Manager
 
10:29 AM
@CaptainSquirrel why thankyou very much. I have no idea how to abuse these new powers so can all rest easy.
Loiter for a decade, get promoted, ?
 
Apparently so lmao
 
Today is proving to be very lucky. I opened my front door this morning to a free promotional chocolate milkshake from the milkman.
 
ooooooooooooooooooooooo
lucky lucky
 
@hollystyles You can start by demoting the captain back to pleb.
Like this
 
10:35 AM
🦹‍♂️
 
What have you done with System.Runtime.dll ????
 
10:49 AM
I have no idea
I think git has done something weird
And also the new preview build of VS is buggy as tits
 
What , like uninstall .Net entirely?
 
It's always buggy
 
Buggier
 
whats the new vs preview?
vs 2020?
 
@Feeds Shut It!
 
10:52 AM
VS 2019 16.8.0 preview 2
Released monday
 
eh ok
 
I was hoping it was less buggy than preview 1. It fixed one of my issues and introduced new ones instead
 
11:24 AM
@Hozuki Roel, tell me.
If we generate a new context for each call (.AddScoped(myRepo))
What is the use of using .Find()?
AFAIK .Find() just "caches" the entry, but if this context is disposed b4 it's used again why even bother using .Find()?
 
Maybe to check if something exists
if(!myRepo.FindUser(username)) myRepo.CreateUser(username);
 
private void FillTheCache(){ using(var db = new mycontext()){for(int i = 1; i < int.MaxValue; i++){db.MyTable.Find(i);}}}
 
11:39 AM
I got someone asking why I feel the need to escape double quotes in a literal control :/
 
I mean or db.table.Select(e => e).ToListAsync()
 
@Squirrelkiller Killerino i mean the context.Find() method.
Which "checks the store" iirc
 
public User FindUser(string username) => return this.dbContext.Users.Find(username);
My first one was the actual use of that
 
Brah

context : IDisposable
-->
using(context){ context.User.Find("username"); }
using(context){ context.User.Find("username"); }

Should not improve performance as the doc of .Find() suggets.

Where as
using(context){
    context.User.Find("username");
    context.User.Find("username");
}

should be more performant thatn .FirstOrDefault() every time+
Did i maek miself moa clearß
 
Absolutely not. I've been trying to figure out why my colleagues Blazor Server app won't properly deploy to Nomad, therefore I forgot everything I know about EF and have no idea what you're talking about.
 
11:50 AM
:/
Okay lets try again
 
What is N1 in the following statement?
`Console.WriteLine($"The Average grade is {result / grades.Count:N1}");`
grades is a double List
 
Becuase Find(key) reads waaaay better then FirstOrDefault(e => e.pk == key)
 
@hollystyles bunkers
 
Anyone?
 
@d4rk4ng31 It's a format string, to truncate the result of the division I think
 
11:59 AM
@hollystyles Thanks
 
mr5
seems like a syntax error to me
 
Nah, it's just shorthand for (result/grades.Count).ToString("N1");
 
@d4rk4ng31 Actually N is about the negative symbol.
 
What negative symbol?
 
N1 means format the number with negative symbol prefix, if the number is less than zero
 
12:01 PM
Oh!
 
mr5
ohh
I didn't know it's a valid syntax
 
So -1.ToString("N1") = "-1"
-1.ToString("N3") = "1-"
 
mr5
12:02 PM
I thought those only work in xml files
 
No == also work in C# for comparison
 
I still don't get you 😅
Bear with me man, am a newbie to C#
 
It's just a (culture sensitive) number formatting string, where the number after the N is how many decimal places to show. If you don't specify a number it uses the culture default
 
12:05 PM
Damnit jack
 
@CaptainObvious Ah! So it has nothing to do with negative then>
*?
 
@CaptainObvious is right it's how many digits, but you can also specify cultural formatting but that's another parameter. Sorry for the confusion
 
Nope. The only relevance to that is it will render a negative symbol if the number is negative. Would never do it in some weird location though, just wherever the culture specifies it should go
You can't specify the culture in the shorthand, only in the long form.
 
Hmm.. and N0 prints only the integral part that's good to know. Thanks y'all
 
12:20 PM
@Squirrelkiller wattz Nomad?
 
HashiCorp IaaS solution
In our case, our container cluster
 
Protip: Don't use preview releases of .net core in production
Just because each time a new preview comes out you have to update it again
 
Proptip: Don't use previews in production
 
Otherwise there's nothing wrong with it at all, and using previews in prod is absolutely fine
 
They usually have warnings literally against prod use
 
12:24 PM
Yeah but
New projects = new framework
Preview 1 had just dropped when I started this project, so it made sense to YOLO onto .net 5
 
I mean or use netcore31 until 5 is in prod
 
I skipped on ASP.Net, MVC world and yoloed on Blazor
 
Why isn't var list = new List<double>() working in my code? Do I have the syntax wrong?
 
Semicolon?
using?
 
Semicolon is a typo
here
it is present
 
12:30 PM
Maybe you're in a class and not in a method
var can only be used within methods
 
and using System.Collections.Generic; is included
 
What does the error message say?
 
@Squirrelkiller Oh! So,
using System;
using System.Collections.Generic;

namespace ConsoleAppCS
{
    class Program
    {
        var grades = new List<double>() { 1.2, 3.4, 5.6, 7.8, 9.0 };
        static void Main(string[] args)
        {
            var result = 0.0d;
            foreach(var grade in grades)
            {
                result += grade;
            }
            Console.WriteLine($"The Average grade is {result / grades.Count:N0}");
        }
    }
}
is wrong?
@Squirrelkiller The contextual keyword 'var' may only appear within a local variable declaration or in script code
 
Yeah you have to do List<double> grades ....
Also when you want to access grades from main, which is a static method, you have to make is static like static List<double> grades
 
So I can't access non-static variables in static methods?
 
12:37 PM
Exactly. non-static variables are member-variables: each object has its own variable. static variables aren't member-wise: They are attached to the class itself. All instances (objects) of that class can access the same variable.
Same goes for static methods: They don't belong to a specific object, but to the class itself. They aren't attached to an object, so they can only access things in the parameters or static variables.
 
@Squirrelkiller Ah man, this is so weird (or maybe not, I come from C++ land)
 
I bet C++ has the same concept, just with different wording.
 
Nope
C++ allows all methods to access all functions ;)
@Squirrelkiller And wording is the same: static
 
C++ can also have static methods though
 
Yes
 
12:42 PM
> No, Static function of a class in C++ cannot access non-static variables, but, it can access static variable only. However, non-static member function can access static and non-static variable both.
 
So if you have a static method, and three instances of that class. I can't imagine how the static method should access a member of one of those objects, unless you pass the object to the method.
 
I guess you are confused for some reason
 
Sorry brain fart
@Wietlol Yep true
 
You coming from C++ makes things way easier to explain though. Means you already know object oriented programming.
 
1:00 PM
Hello. Is there somebody who has some experience using .NET5 preview?
 
Hello @CaptainObvious to the desk please
For some reason he started building a production app in .NET 5 preview
 
Not yet started: I'm considering to start
 
but cap started ;)
 
Anyone else here working with Nomad/Consul? Is there an actual difference between using constraints with LTarget/Operator/RTarget or just attribute/value?
Also: Is SO the right site to ask that? Or Serverfault? DevOps maybe?
 
1:15 PM
@Squirrelkiller is this more percise? https://stackoverflow.com/questions/63616849/entityframework-with-modern-apis-find-vs-firstordefault
if not pls improve
 
Good enough
 
1:29 PM
So in case anyone knows anything about nomad/consul
0
Q: Nomad.json constraint with LTarget/RTarget/Operand or Attribute/value?

SquirrelkillerSo my deployments run using nomad.json with LTarget/RTarget like "Constraints": [ { "LTarget": "${attr.kernel.name}", "Operand": "==", "RTarget": "linux" } ] But the docs say to go HCL like { attribute = "${attr.kernel.name}" value = "linux" } Where is the difference? Wh...

 
@CaptainSquirrel The pirates of the caribiean theme song was inspired by the gladiator theme song
 
hm
I can hear the similarities for sure
 
Yeap
Confirmed
 
Oh wow indeed
 
Hans zimmer is just the same as all the rest reusing his components in different songs..
F
 
1:34 PM
> funny story, Hans Zimmer actually didn’t thought Pirates was going to be that successful so he assigned the project to Klaus Badelt, who fucked up because he did a score that the director didn’t liked. So Zimmer had to step in and finish it. But because they were so short on time, he recycled some of the drafts he had from Gladiator and change them a bit. That’s why they sound so similar.
 
@Squirrelkiller Ahh
Nice googlin killerino
 
Nah I read the youtube comments lol
 
Oh
I am dissapoint.
 
Me too, I copypasted the LTarget/RTarget version of the nomad.json from a colleague because "No idea I copypasted this one and it works" but the normal way appears to be simpler.
And the guy who built the whole Hashi infrastructure just left the company
 
1:54 PM
#meeto
@Squirrelkiller You mean Simon?
 
@Squirrelintraining Nah, Marcello. Simon has no idea about this stuff AFAIK.
Not yet, I guess
 
I could ask him.
 
was Gladiator like the great blockbuster of the millennium start?
 
If you say so Mr. MaybeGayGuy.
 
??
 
2:05 PM
😝
 
@Squirrelkiller Pseudo-OOP
 
2:36 PM
I was summoned
 
Lee, you're just as slow as Jack..
 
2:55 PM
I fear for botler
@Squirrelintraining might be interesting to look up Klaus Badelt as well then
I used to play Ghost Recon... a long time ago... but I always remember the music when playing C&C Generals with USA
also turned out to be the same composer
I wonder how copyright works on stuff like that
afaik, the music for PotC is owned by Disney
 
well I would sure think so
 
but... if someone made a movie and asked Hans Zimmer, Ian Honeyman and Klaus Badelt to do the music...
and they decide to reuse some of the music from PotC...
 
mr5
yeehaa!
I am completely free now!
 
afaik, Gladiator for example is not owned by Disney
 
mr5
no work
 
3:06 PM
left the job?
 
mr5
no commimtment
yeah
 
you are no longer a slave?
 
mr5
yeap. independence day
 
if you were born in the 90s
your childhood
IS DEAD. HAVE FUN KEEPING A JOB AND PAYING TAXES.
 
mr5
I'm free from Spaniards, American, Danish and Japanese colonizers again.
 
3:07 PM
if you were born in the 90s, your childhood is in the past... except if you still think you are a child
@mr5 what about the end boss?
ze DUTCH
 
90s kids flooded every single board in the early 2010s and they were the most annoying people imaginable
"if you were born after the 90s, your life sucks!!1!"
 
@Freerey it is a repeating pattern
 
yeah, now we have people saying the 2000s were good for some reason
 
mr5
there's actually no Danish colonizers that went here. It's just my boss is from Denmark lol
 
probably more related to age rather than birthday
 
mr5
3:09 PM
I don't remember dutch invading Philippines.
 
only reason people didn't do this with the 80s is cause barely anyone was using the internet by the time that would've been popular
 
@Freerey well... if you compare it to 2020, a lot of things are good ;)
 
then why does 2016 still feel like it was worse than now?
 
@mr5 they did it secretly
 
or 2009
 
3:09 PM
2016 was fine for me
and so was 2009
 
2009? foreclosures abound? end of world conspiracies everywhere? Justin Bieber? that didn't affect you?
 
mr5
@Wietlol yeah, Google tells me they attempted but didn't continue for some reason and it opens the gate for Spaniards.
 
conspiracies... heh
justin bieber is just a trend that comes back over again with new people... it isnt a big deal
foreclosures?
 
maybe I just feel way less anxious in 2020 than I did in 2009/2016 because I'm actually grown up now, but idc; those years were still awful
 
@mr5 what google doesnt know is that they sold it to spain
 
mr5
3:12 PM
is Spain in Europe?
oh yeah it is.
I thought it's located in SA
 
@Freerey I suppose you could name bad things about every year...
the ones that affect you most are just the ones you remember
 
it's probably nothing; I just remember 2009 being a cavalcade of awful
and 2008 wasn't much better, either
 
pick a year with the most cases that affected you and BOOM, you have your year of desperation and anxiety
 
those years it wasn't just me; the entire world was suffering economic collapse
which is why 2021 is probably gonna be worse than this year
 
pick another year with economic collapse... there are plenty
 
mr5
3:14 PM
well, if you already have an adult mindset back then, you will "suffer"
but I was still eating mud that day
 
I was uh....12? yeah
 
mr5
I understand nothing till I become 22 yrs old lol
 
I mean if I wanted to get real personal, 2009 I got bullied into nearly starting a school disaster
 
like the one where a lot of tea was thrown overboard which made the tea unsuitable for drinking, even for americans. it caused panic in the banks
 
mr5
kids from EU/America are way intelligent compared here because they can argue with adults.
 
3:17 PM
it is not the argueing itself that makes them intelligent, it is the observation of an argument
observing and analyzing is a very effective way of learning
 
I think my parents just forget about all the times I argued with them lmao
 
depending on what the argument was about, it might be best to forget
 
mr5
I am not allowed to answer back when I'm being scolded back then which I think boost my dumbness
 
aye
His borhter it seems
 
lol now when I tell them about them, the response I get is "omg why didn't you tell me that happened??"
 
3:20 PM
Okay guys have a nice day of work seeing u
 
byeee
 
 
2 hours later…
5:22 PM
Windows server instance on Azure really cheapier than aws? I planned to give Azure another try. Any idea?
I spends 700 dollars on aws af two 4vCPUs windows server monthly
 
AAA
5:56 PM
Does anyone here have experience using the Google.Cloud.Storage.V1 package, specifically for uploading objects? I'm trying to work out if they have an option for uploading from remote URLs instead of files, although it doesn't seem like they do.
 
6:12 PM
@nyconing they are approximately equal
 
 
2 hours later…
8:22 PM
hey, anyone here?
 
 
1 hour later…
9:42 PM
no
 
hey there
 
hey
 
do you know much about policy based authorization?
 
not really. But shoot your question. If anybody interested, he/she can answer
I'm checking it out now
 
10:14 PM
so my question is this...
say you have the api Function CreateProject
but whether or not you can run that function, depends on the values that the Project object will contain
like say Project.OfficeId is a critical property that will determine whether or not you can run that API function
what is the best way to handle that?
so far i can grab the httpcontext, look at the body, and pull it out, but thats seems wrong.
grab the serialized project, and run my tests from there
 

« first day (3603 days earlier)      last day (1336 days later) »