« first day (3391 days earlier)      last day (1565 days later) » 

2:00 PM
ALL THE DRUGS \O/
 
back inthe days you just had to drink a dr pepper
but things have changed
 
"Invalid Source"
but nah at this point the key to my health is gonna have to be cutting out sweet shiet
 
@AlRey you need to cut off gluten too I have done a research on blood sugar I will send u the link once I have it published also u do need to workout a lot
 
2:03 PM
I've thought about cutting out gluten, but only to improve my skin
but my dermatologist has made it so I don't have to do that
 
u need to for the blood sugar
no fruits except berries, no trans-fats, less milk, only animal origin fats, meat and some of the vegetables
 
mr5
@AlRey how old u m8?
 
almost 23
if only bananas were berries
 
Hey it's my biurthday in like a week
Thursday the 6th, save the date lads
 
@CaptainObvious happy birthday for then
 
mr5
2:08 PM
@AlRey 23 and you're already worrying on your sugar intake
 
As I know you are likely to not show up
 
But I will be in work
And when I'm in work I always show up
 
oh well, i'll remind myself for then
 
as long as I'm in my office
 
Anywho on a less Lee related note
Regex in powershell
 
2:09 PM
Same as c#
 
is mucho fun
 
Also why
 
Because client want's to run an unlock all command on their prod env
Powershell is the best way to do that
 
mr5
regex inside powershell script inside C# code inside a cURL request
 
I have this string
I am a testing string (1)
 
mr5
2:10 PM
you have the string
 
I want to get the (1)
and remove the brackets
 
@mr5 yeah I'm worrying because my pancreas doesn't work
 
AND potentially put a space before the number, but i can figure that shit out later
 
If you've got a horiffic regex pattern you're legally required to post it
 
so far all i've got is this
 
2:11 PM
also I hate my graduation gain
 
$a -match "([0-9])"
 
mr5
@AlRey r u a party people?
 
$a = "I am a testing string (1)"
 
@mr5 noo..?
 
so that matches command will find me the (1) and output it
 
2:11 PM
specially not now
 
mr5
@CaptainSquirrel is that a PHP?
 
@mr5 powershell
 
So what is problem?
 
Well, ideally i'd like to find the ( & ) as seperate matches
 
@CaptainSquirrel so just a PH
 
2:12 PM
Ahh
That's ez
Just put the () outside of a capture grou
 
mr5
@AlRey do u drink a lot?
 
like this: \(([0-9])\)
 
mr5
@Neil PowersHell
 
@CaptainObvious that gives me two values
 
And obviously escape them because they need escaping
 
2:13 PM
well you say that
but that regex you gave me gives me two results
 
Welcome to PowersHell. I will be your guide.
 
Yeah I think that's something to do with .net's weird regex engine
 
the first being the number inside the brackets, in this instance 1, and then the (1)
C:\WINDOWS\system32> $Matches

Name                           Value
----                           -----
1                              4
0                              (4)
Thats mah results
 
One of them is the string that matched and one will be the capture group inside the match
Yeah the first "result" is the match
 
2:14 PM
It's always like that
 
Ideally i'd want the ( & 1 & ) matched seperately
 
Then you can do (\()([0-9])(\))
And your results should be 0: (4), 1: (, 2: 4, 3: )
 
Yeah
So that's just three different capture groups?
 
@mr5 if by that you mean water, then yes
 
2:16 PM
ahhh i see
That makes sense
 
otherwise, no -- I didn't even start drinking until last September
 
You don't have to put things in capture groups
 
....explain
 
But obviously it depends on what you're trying to do
 
sometimes you need to group because it's the only way to express a specific rule
but maybe you don't need to capture that input
 
2:18 PM
Well like in the original example, \(([0-9])\) the outer brackets were outside of the capture groups because I figured you didn't need the brackets and all you wanted was the number
There are outher groups, like non-capture groups and lookahead groups
If you put that into regexr you get this
Here's a fun one I wrote before christmas to help pull some useful info out of our titles (?:[A-z][0-9]{2}-[0-9]{2} +- +)(.+)(?= [A-Za-z0-9]+ \([A-Za-z]{3}\).*)
 
V.7
Are you trying to parse HTML using regex?
 
not today
And i'll have you know parsing html using regex can be done
 
mr5
I'm sure it's C# parser
 
just in a very VERY specific case
 
2:25 PM
sure, parsing html using regex can be done. It's also theoretically possible to turn into a penguin at any moment.
 
Indeed
Just because you can, doesn't mean you should
I've had to stop myself turning into a penguin twice today
 
annoying when that happens, isn't it?
 
@Neil Did you just assume I can't turn into a penguin?
6
 
Did you also assume i'm not a penguin at this very moment?
 
not claiming gender or species here
if you want to be a cloud of sentient dust, then you're a cloud of sentient dust
 
2:27 PM
sentient dust clouds also poop gold
 
A very dense cloud of sentient dust
 
i notice you conveniently left that out
 
turns into penguin
turns back to human
I didnt enjoy it
at all !
 
mr5
@ntohl the voice sounds like that one in Chainsaw Massacre
 
2:35 PM
@ntohl It's like a pink floyd song, but without the singing
 
Air are weird
 
@littlemisscomputerscientist since I'm t1d, I'm seeing a lot of people recommend I start with a liberal low-carb diet...so 50g-100g for about a weekf or me
 
So question about regex
Does the + basically just mean any variation of the rule?
so (([0-9])) would only catch (1)
 
mr5
@AlRey liberal low... why does your diet includes politics?
 
But changing it to (([0-9]+)) would catch (12) etc etc
regardless of the amount of numbers? @CaptainObvious
 
2:40 PM
+ jsut means any amount of the proceeding thing
 
I'm pinging you now because you are replacing kendal as regex expert
 
I think + only catches one
oh, no?
I think the only difference between * and + is that * is greedy
 
I mean it works, so i'm just trying to get a sense of why it works
 
More accurately, it's "at least 1" of the previous thing
It won't match if there aren't any of ity
 
right...and then * is 0 or more
 
2:41 PM
sweet
 
@AlRey yes liberal-low carb diet is preferred are u on medications too?
 
I'm on lantus and Humalog yea
 
@AlRey That's correct
 
ah... how old are u?
 
almost 23
--and you're still mad at me--
 
2:42 PM
For good measure, there's also ?, which means the proceeding token is optional but if it is there then there can only be 1
 
eep you're too young to be on meds
 
I mean I'm the same person who had a chunk of his skin cut out a few months ago because it was possibly cancerous; I'm too young for a lot of my health conditions
 
oh my goodness
 
mr5
Which part of skin gets removed from you?
and who is this other person?
 
I had part of my face removed
 
2:44 PM
AlRey is two face confirmed
 
I wish I were capable of those kinds of binary choices
 
I hope you get better soon just stick to the good food regime
 
thaaaaat's the plan ;)
 
mr5
And the main cause of the skin removal comes from pancreas?
 
will be easy with college out of the way
uhmmm no....I was just unlucky and also had a patch of bad skin on my face
 
mr5
2:47 PM
that's okay. just keep being positive and busy all the time :)
 
hehe that's all I can do now....which is why my best days are when I'm writing :P
 
mr5
follow the Way
 
but @littlemisscomputerscientist what was this link you said you wanted to show me?
 
wait a sec bananas actually are considered berries wtf
hell yea I can keep eating them
they're the best portable fruit
 
2:51 PM
watermelons are berries.. supposedly
 
what the fuck is that lmao
 
@Neil looks like Drake was right
 
mr5
TIL: there's this thing called Genome encoding
 
tomatoes are berries, which is why it makes no sense that people put them on sandwiches
 
2:52 PM
@AlRey it's in publishing procedure I will let you know once it's out... it's a paper
 
oooh ok thx
 
I vote that we just ignore these silly statements and we all go back to saying tomatoes are vegetables and bananas aren't berries
 
Why would you remove that message
Excuse me what
Bananas are berries?
 
mr5
Is genome pronounced as 'je no mi' or 'gnowm' or 'je nowm'?
 
what did v7 say?
 
2:54 PM
Tomatoes are good in salad
 
A banana is an edible fruit – botanically a berry – produced by several kinds of large herbaceous flowering plants in the genus Musa. In some countries, bananas used for cooking may be called "plantains", distinguishing them from dessert bananas. The fruit is variable in size, color, and firmness, but is usually elongated and curved, with soft flesh rich in starch covered with a rind, which may be green, yellow, red, purple, or brown when ripe. The fruits grow in clusters hanging from the top of the plant. Almost all modern edible seedless (parthenocarp) bananas come from two wild species – Musa...
 
mr5
he had the cure for coronavirus
 
WHAT
DOES THAT MEAN HUMANS ARE BERRIES TOO?!?!?!?!
 
mr5
yes
everything is berries
 
there's such a thing as an "Indiana banana" -- which is actually shaped like a potato and is eaten moreso like the bananas of old...where you have to boil them and make your way around the seeds
 
Do you suck bananas all day or something?
 
 
I ate one of them and it was a mess
 
Hoomans share their DNA with bananananananananananananananananas
 
2:57 PM
don't eat them raw.....the peels are too thin, the innards are too mushy, and the seeds are too big
 
Array(17).join(0/0) + " Batman!"
 
feeed meee hooomaaan
 
I had a cat that would meow loudly for food at like 4pm despite the fact that we already fed her that morning
 
so what is the cure to coronavirus? :P
 
2:59 PM
once my brother did feed her at 4pm and I'm like "...IDIOT!"
 
@AlRey typical cat behavior
beeeing an ass
 
I had to stop her while she was eating
 
LOL
You have no idea the actions you've put into motion!!!
 
...you don't feed your cat in the evening?
Do you only feed your cat once a day?
 
you be consistent.. if they get any small inclination that you'll feed them sooner, they'll never stop asking
 
@Neil Yeah about that
Our cats ask us for food whenever they are hungry
 
that's generally what cats do
 
If we run out of biscuits and they don't get any for breakfast, they'll be asking for biscuits about 20 minutes later
Which I'm not opposed to doing, because they are used to having both
 
@CaptainSquirrel yea you're only supposed to feed them once a day
 
so long as fatto catto doesn't get lots of food
lol thats news to me
our's get breakfast and dinner
 
3:04 PM
but clearly somebody was breaking that regimen and our cat got fat
 
and maybe a snack in the evening if they are hungry
 
V.7
 
okay our cat also got fat cause she got fixed when she was like a year old cause nobody wanted to hear her meowing super loud at night
I remember someone on fb being like "we gotta get her fixed, but I heard she's gonna act all boring and lazy afterward...but I hate seeing her like this"
to which I'm thinking "do you just say these things so you'll look good..?"
 
mr5
omg
I have a report this Thursday about DDD
and still I'm slacking
 
Domain Driven Development?
 
mr5
3:07 PM
yep
ugh
maybe the last D was design
 
I wanna read that cause that sounds awesome but I have no idea what it is
ohhhh lookie here...Eric Evans wrote a book on it
 
mr5
when you say "domain" in a context of modelling the application, what does that mean?
you need to focus on the domain
these are domain models
 
like if it's an email address, it's not a string
 
mr5
so you abstract it by wrapping?
 
or if it's a postal code, it's not a string either. Yeah. Kind of wrapping is the key
 
mr5
3:10 PM
ohhh
 
constructing illegal emails is forbidden by type system
 
mr5
same for URLs as Uri right?
 
like your constructor just shove a IllegalEmail type back to you if it's not legal, and you have to handle it everywhere
 
mr5
is this also related to fail-fast approach?
I forgot the name
 
no. It's more related to railway oriented
 
mr5
3:12 PM
so during my presentation for example, if I mentioned the fail fast, is it wrong?
 
C# doesn't have union type, so DDD is cumbersome here.
not wrong tho.
 
So it's not the C you want, it's the D
 
but "failure" is a vague term. DDD tries to define what to do with failure
 
mr5
@ntohl is this the C/C++ union you're referring to?
 
like I said unrepresentable
 
mr5
3:14 PM
but it would not fail in case of invalid inputs or design?
 
mr5
If I want to implement a DDD, should I need to study first the subject or hire an expert during the development? Like for example, the program is about for generating and compressing genomes.
 
@mr5 In DDD you would not handle your Email addresses like strings. First of all, as long as it's on the input sheet on the UI, it's just an EmailInfo instance. If all the processing is done (send pushed, validation sais it's ok.), than your Email field is non nullable. It must be an Email with a string value with @ in it.
surely.
 
mr5
Is this always true though?
2 mins ago, by mr5
If I want to implement a DDD, should I need to study first the subject or hire an expert during the development? Like for example, the program is about for generating and compressing genomes.
What if it's a known or common system?
 
if it's common system, like GraphViz, you adhere to the type system
you download the nuget, and you have your Node, Edge, etc.. in your types, and you must construct your graph with EdgeStatements, accepting 2 node references
and so on. You see a lot of examples of DDD without noticing it
 
mr5
3:20 PM
yes
And surprisingly, I'm doing a lot of it.
 
 
so if you want to do a proper DDD, how could you add stuff to GraphViz without knowing the subject?
 
mr5
@Neil lol. that lasagna-oriented arch sounds like Windows
 
yep, you wouldn't be wrong
 
mr5
@ntohl yep. make sense. now I just need some words to put in my presentation.
I need AlRey here.
 
3:23 PM
I think you should steal the jargon from these slides
they are quiet useful
 
Ben Popper on January 28, 2020

Our guest this week is Alex Qin, co-founder and CEO of the Code Cooperative.

Alex graduated from NYU with a degree in computer science and worked as a developer and engineer at several startups in New York City, eventually assuming senior roles like engineering team lead and director of technology.

Along the way, however, she found herself face with discrimination and harassment. In 2016, she dramatically altered her appearance, an experience she discusses in a humorous and poignant talk – Shaving My Head Made me a Better Developer. …

 
mr5
@ntohl I'd design the Contact model as Contact { User, Email } right?
yes. I'm stealing it
mwuehehe
 
@mr5 not if you have a constraint to have at least one of them
 
mr5
then the logic would fall into constructors
 
{ OnlyPostal {Address}, OnlyEmail {Email}, PostalAndEmail {Address, Email}}
and User also.
somehow...
I mean the 94th dia
 
mr5
3:30 PM
In the mapping phase, how can you put constraints to your model if the serializer doesn't know the constraint or would fail if there's no default ctor?
 
is the mapping phase before you generated the model? Because I think it's after that. So what you trying to serialize is already constructed
ergo valid
when you try to deserialize, it's a problem tho. Use AutoMapper magic for that I think?
 
mr5
yes, I'm referring to deserializing actually
What if you have a load of these models with varying constructor constraints?
We have this usual stuff in most of our project that we include a common project where the DTO resides.
DTO and Domain models only...
 
I just wrote something like that. I had Comboboxes on a form, where each combo's ItemsSource is loaded by a method which checks if the value is expired or still valid. Adding the actually selected from the DB even if it's not valid anymore.
 
mr5
So the mapping only happened between those two.
 
so I got the DTO, constructed the model by new MyModel(dto.Combo1Value, dto.Combo2Value, etc.)
than called Mapper.Map(dto, myModel).
 
mr5
3:40 PM
hmm... two phase? initialization and property assignment?
 
@Squirrelkiller I have to say, that description of async /await does not sound particularly encouraging. So. why do you need it again?
 
It lets you do work basically in parallel without having to think about threads
It lets you forget about callbacks.
It easily makes all your IO calls non-blocking.
Without you having to manage it.
 
mr5
and less worry about race conditions
 
That's... not the real advantage. You still have to consider threading and concurrency. The huge, huge, huge upside of async/await is being able to write synchronous-style code, thus very readable, that makes extremely efficient use of thread resources. A single thread uses CPU cycles and ~1MB RAM, meaning that if you just have 2000 threads waiting for something to happen, you're consuming an awful lot of resources for no reason. That's where async/await shines; performant and simple.
 
@Squirrelkiller but.. it doesn't.. I've fun a bunch of code that I marked as async and it never really did anything different than normal code. Someone else told me that it just puts the thread to sleep or something until the db/harddrive/http/whatever gets back to you.. but that just means that the thread is not actually getting any slices of the processor time, it doesn't mean it's running in parallel right? So it's just a server performance enhancer or something
 
3:44 PM
@מלךהמשיח That's exactly what it is.
 
@mr5 yeah. In the constructor I populated the ItemSources adding the value with combo1Value, combo2Value, etc.. But you figured it out I guess.
 
mr5
@מלךהמשיח try this in mobile development. You'd appreciate the async/await
 
There are other benefits to async/await, like being able to plug a different scheduler underneath and thus conforming the way multi-concurrency code works. You can, for example, always ensure a continuation runs on the UI thread which makes UI projects (WPF etc) a total breeze.
But the main thing is, most likely, server performance gains.
 
Just, if there were a convenient way to use any type with the same properties as if they are the same class.. the amount of Point/Location/Position classes I have to deal with are ridiculous, every API has its own signature and I have to convert each one to another
 
mr5
@ntohl in case a property from DTO is invalid, should I still continue on the property assignment? Should I always put IsValid property in case there's a need for it?
 
3:46 PM
@mshwf Don't use reflection-based mappers. They're evil. You'll come to hate them in time.
@mshwf Just write a nice extension for a conversion and use it.
 
mr5
@mshwf lol. it always happens when you're working with geography (maps)
 
Roel do you know if you can create seperate files for every table you got using entity framework - database first?
 
@mr5 no. There is no use of IsValid. You should have 2 different types of them. if the DTO might be invalid, it's a different type. It's an ...Info, which is the input for a constructor which might get constructed
 
@RoelvanUden The point is a convesion is always needed all the time to use a lat,long class from another lat,long class
 
or you can handle your DTO's like ...Info, and prepare the constructor handling the DTO's validity
 
3:49 PM
@mr5 Yup, X.F, Xamarin Essentials, Azure API, Google maps,.. :((
 
mr5
@mshwf I'd also go for Roel's advise to create extensions in a single file.
 
@Squirrelintraining I.. don't understand the question.
 
@RoelvanUden Do you suggest something like: Google.Position ToGooglePosition(Xamarin.Forms.Position){..}//and vice versa, and for all types
 
is it possible for visual studio to display which pages were accessed when?
 
mr5
position.ToGoogle()
location.ToXamarin()
point.ToXamarinEssentials()
latlng.ToAndroid()
 
3:58 PM
@mshwf I would make my own model and add a bunch of converters to it. When you get a Google position, I'd use MyLatLng.FromGoogle(pos) and then work with it. When passing it into google, just do pos.ToGoogle()
 

« first day (3391 days earlier)      last day (1565 days later) »