| user name /\ | message | ||
|
mystiksoda |
users.FirstOrDefault (u => u.Username == user.Username) | ||
|
mystiksoda |
ok then its simple | ||
|
mystiksoda |
does your TwitchUser class have any unique property that identifies that user ? | ||
|
mystiksoda |
ok | ||
|
mystiksoda |
is that what u want? | ||
|
mystiksoda |
users.Find (u => u == user) | ||
|
10bag |
man was there troubleshooting pleb users python installations and wondering why nothing worked | ||
|
10bag |
that was a funny couple of months | ||
|
10bag |
never forget when xcom told me you cannot distribute a python application | ||
|
mystiksoda |
Kappa | ||
|
mystiksoda |
i'll bash his head instead, thats fun | ||
|
10bag |
it's trolling up until the point you realise i'm right and then quietly start doing exactly what i said in the first place 4Head | ||
|
edgewalker69 |
The local village idiot, dont worry about him SeemsGood | ||
|
mystiksoda |
you understand 0 of programming whatsoever | ||
|
10bag |
that's the spirit | ||
|
mystiksoda |
ok i give up | ||
|
mystiksoda |
??? | ||
|
10bag |
bro i'm saying sacrifice performance for readability, it is string manipulation and you won't live forever but you will have to come and un-fuck this code later | ||
|
mystiksoda |
embeded is just one of 100's of different scenarios where memory / threads etc management is very important | ||
|
10bag |
there are no rules any more bro we have good CPUs | ||
|
10bag |
this is 2022 bro everything is fucked | ||
|
10bag |
are you for real? this code is being written in an electron app | ||
|
mystiksoda |
well you have A LOT to learn if you think like that | ||
|
10bag |
don't need to worry about performance until you're doing embedded | ||
|
mystiksoda |
thats how u write a constructor | ||
|
10bag |
slight speed penalty i guess but who cares because we have gigahertz | ||
|
mystiksoda |
public |
||
|
10bag |
but personally i value readability above all else | ||
|
10bag |
it'd work and look more readable to me | ||
|
10bag |
i thought the original regex was just for stripping forbidden chars from a string ie \"xcom:reborn\" to \"xcomreborn\" so why not just iterate using replace |