« first day (4238 days earlier)      last day (703 days later) » 

3:48 AM
only chinese in china knew this
 
5:37 AM
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' pleberinos!
 
 
2 hours later…
mr5
7:48 AM
@Wietlol in Kotlin, do you know how do I make an equivalent of TaskCompletionSource<T>?
I would want to convert sync to async, like for e.g., invoking doSomething() would provide an event for sometime, although this event is running on same thread, it would still take some time to propagate.
    val result = await doSomething()

    // I am not sure what the T is supposed be, but in C#, it would be Task<X>
    fun doSomething(): T {
        // do something that will propagate an event in the future in the main thread
       this.refResult = ...
    }

    override fun somethingThatOccurredLater() {
        this.refResult.set(value)
        // at this point, the first line would be completed
        ...
    }
oh, this is also equivalent to JS's Promise
maybe Kotlin has it too... hmm
 
[Deathspike] I hate that Kotlin makes you write 'fun' when you're clearly not having fun.
 
mr5
xD
in Swift, they add letter 'c' at the end
func vs fun
 
8:29 AM
The kotlin docs are really good
 
mr5
@T_01 I can't see where I would set the result of async callback?
no, Kotlin docs sucks.
there's very little examples out there and the author won't bother providing one.
 
Did you read about coroutines?
 
mr5
8:50 AM
yeah but I am not so sure I understand it
however, it seems CompletableDeferred<T> does the trick although it's ugly
 
9:08 AM
[Captain Obvious] From the name it sounds like the same concept as Task<T>
 
9:36 AM
Morning. So this is a git question, not C#, but I'm hoping someone can explain what's happened here. I made an accidental merge of a branch into dev before it was ready. I used revert to back it out and all is fine. However, when I go back to my previous branch and try to create another PR into dev, git says they're identical.
They're clearly not - swapping between branches shows the code changing - so I presume this is down to the commit history. Is there a way I can get my changes back into another PR?
 
[Hans1984] what is it ?
[Captain Obvious] How did you do the revert?
 
9:53 AM
@mr5 I dont even know what TaskCompletionSource<T> is
 
[Captain Obvious] Because if you did a revert commit then that's not ideal (despire the name), and you'd probablt want to git reset soft back to the commit before you made changes, push with lease, and branch from there into a new branch
 
Hii teams
 
[Captain Obvious] Sir this is an SO chat
 
Sorry
I am not mor familiour with SO
 
10:15 AM
[Squirrel in Training] With an eraser
[Captain Obvious] haha no worries it was a joke a la "sir this is a wendys"
 
No, this is Patrick.
 
[Squirrel in Training] No this is wietl0rd
 
also, "Who tha heeellll is Wendy?!"
 
[Captain Obvious] this is wheatlol
 
I should update my list probably
 
10:19 AM
[Captain Obvious] good idea
 
Botler, learn wietloldamnit its not weitlol, wietbol, weitol, wetlal, wietnam, wietlawl, wietrofl, wietroll, wietlmao, waldoil, walido, wiedol or wheat-lol, its Wietlol damnit
 
Learned the command wietloldamnit
 
Botler, wietloldamnit
 
its
[Captain Obvious] holy shit he did
 
omg
 
10:20 AM
[Captain Obvious] HAHA OH NO
[Captain Obvious] I think <@561582857949282355> wrote the learn command IIRC
 
Botler, learn whosucks me probably not
 
Learned the command whosucks
 
Botler, whosucks
 
@wietlol
5
 
who is 61582857949282355 ?
 
10:21 AM
 
@CaptainObvious no u
 
[Captain Obvious] Apparently that doesn't work anymore either
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] So kiddies, I've bumped up the version from `netcore 3.1` to .`NET6` and now the `JsonSerializer.Deserialize<Appsettings>` cannot deserialize anymore into the private `ctor()`.
Any thoughts how to resolve the issue other than a public `ctor` with `[Obsolete(true)]`?
 
so börk
@Squirrelintraining dont use private constructor
 
[Captain Obvious] Stop trying to use STJ
 
also dont use obsolete constructor
use public all-args constructor
also, stop trying to use STJ
 
10:23 AM
[Captain Obvious] Or use a less crap JSON lib
[Captain Obvious] like Utf8Json
[Squirrel in Training] Isn't it the same like newtonsoft?
 
Newtonsoft can easily use an all-args constructor
 
[Captain Obvious] STJ is ass
[Captain Obvious] Newtonsoft is much more feature complete
[Captain Obvious] But it's slooooow
 
that is just C# :D
 
[Captain Obvious] UTF8Json is fast as fuck, although it's also missing some features
[Captain Obvious] No, it's the library
 
but... is it notably slow?
 
10:24 AM
[Captain Obvious] If you put it up against STJ or Utf8Json
 
but that is benchmarking comparison
 
[Captain Obvious] Admittedly if you're not bottlenecked by json performance then it's probably not a problem
[Captain Obvious] But I was
 
can you notice your application running slower if you use Newtonsoft?
 
[Captain Obvious] I could when I switched over from Newtonsoft to Utf8
 
what torturous json did you try to feed C#?
 
10:26 AM
[Captain Obvious] But that's because the system at my old place did a loooot of json serialization/deserialization
 
you are not supposed to give it gigabytes of json, that is Java's job
 
[Captain Obvious] Nah not gigabtes
[Captain Obvious] just 10s of megabytes
[Captain Obvious] WHich would need to be deserialized, actioned in some way and then serialized back in (ideally) <100ms
 
have you tried not deserializing?
 
[Captain Obvious] But then I have no data
 
dynamic data
using JObject
 
10:29 AM
[Captain Obvious] That's not useful though
 
11:28 AM
 
 
1 hour later…
12:33 PM
back here after a year. hope everybody is doing #
 
@Sakthivel I am not doing hash
 
oh no
I just looked at the MAUI announcement
 
what?
 
There's nothing useful about migration from XF
 
12:38 PM
rip
 
> Android, iOS, macOS, and Windows
but not browser?
 
[Captain Obvious] I think it builds to Blazor too
[Captain Obvious] Or blazor builds to Maui, I'm not sure
 
@Wietlol Sharp
 
nah, definitely hash
 
12:43 PM
[Captain Obvious] Or if you're wrong
[Captain Obvious] 'pound'
 
id be ok with pound of hash
 
pound?
 
[Captain Obvious] 1/2.2 kg
[Captain Obvious] probably
 
my octothorpe spits on your pounded hashes
 
"press the pound symbol on your phone if you want to talk to the agent" reminds me of early 2000s
 
12:45 PM
looks for the [£] key
 
[Captain Obvious] £ = pound
 
@Wietlol This is exactly why I missed this room
 
[Captain Obvious] # ≠ pound
 
mr5
1:42 PM
@Wietlol what does that mean?
@Wietlol enclose it in quotes
 
2:10 PM
public static async Task<TEntity> GetOrThrow<TEntity>(this ValueTask<TEntity> valueTask) where TEntity : Entity
{
    return await valueTask ?? throw new EntityNotFoundException<TEntity>();
}
Does this method do what I think it does?
I want to write:
    var entity = await context.FindAsync(...).GetOrThrow();
 
mr5
Why not just FindOrThrow()? Or is FindAsync() something built in?
Shouldn't TEntity nullable as well?
 
FindAsync is builtin (efcore)
@mr5 what do you mean? The type parameter?
I actually could also write an extension method FindOrThrow, but I already have FindById and than it would be FindByIdOrThrow
.. which does not sound nice
 
[Captain Obvious] TryFindById?
 
mr5
I think there is FirstOrThrow()
@T_01 yeah and the return type
 
2:33 PM
@mr5 make Botler better
 
mr5
Oh my bad, excluding return type of course
 
Botler, learn wietloldamnit "its not weitlol, wietbol, weitol, wetlal, wietnam, wietlawl, wietrofl, wietroll, wietlmao, waldoil, walido, wiedol or wheat-lol, its Wietlol damnit"
 
Learned the command wietloldamnit
 
Botler, wietloldamnit
 
its
 
mr5
2:34 PM
kek
 
@mr5 well... that worked...
 
mr5
Botler, learn wientol "its not weitlol, wietbol, weitol, wetlal, wietnam, wietlawl, wietrofl, wietroll, wietlmao, waldoil, walido, wiedol or wheat-lol, its Wietlol damnit"
 
Learned the command wientol
 
mr5
Botler, wientol
 
&quot;its
 
mr5
2:35 PM
Kak
Borked
 
it doesnt even overwrite commands?
Botler, learn wientol nope
 
Learned the command wientol
 
Botler, wientol
 
&quot;its
 
mr5
dunno. I think it does but it's borked anyway
 
2:35 PM
wow
its triple borked
 
mr5
Ok, I lied
 
1, it doesnt use normal message inputs
2, it has html escaped content
3, it doesnt overwrite commands
where is Wietbot when you need him?
 
mr5
It crashed?
 
Botler, ded?
 
@Wietlol Sorry, I don't know that one.
 
2:37 PM
no
 
mr5
Why are you using comma instead of le dot
 
because that is how Botler wörks
 
mr5
Botler, help learn
 
learn: *Learns *
 
mr5
wtf that's weird
Botler, help
 
2:41 PM
All 'native' commands (you can get more by asking me help <command>): about, clear_commands, conf, discordintegration, cs, help, join, learn, leave, say, shutdown, tell, test, tts
 
mr5
Botler, shutdown
 
@mr5 YOU'RE NOT MY MOM/DAD (you don't have permission to execute that this)
 
mr5
Botler, about
 
Lee Botler: A bot for C# which probably won't work.
Written by CaptainObvious, based originally on Sandy, by SquirrelKiller.
 
mr5
Botler, conf
 
2:47 PM
@mr5 YOU'RE NOT MY MOM/DAD (you don't have permission to execute that this)
 
mr5
Botler, cs 1+1
 
cs> 2
 
mr5
Botler, cs Math.Min(0, 1)
 
Script compilation error, dumdum:
(6,45): error CS0103: The name 'Math' does not exist in the current context
 
mr5
Botler, cs System.Math.Min(0, 1)
 
2:48 PM
cs> 0
 
mr5
Botler, tts wientol
 
[TTS] wientol
 
mr5
Botler, tts wietlol
 
[TTS] wietlol
 
mr5
"quite lol"
 
 
1 hour later…
4:02 PM
[Captain Obvious] @wiet no u make botler better
[Captain Obvious] Sounds more like wyat lol
 
4:34 PM
[Hector] Hello everyone
[Hector] I keep forgetting to get my ass in here
[Hector] how are you doing?
[Hector] im headbutting the Googles right now, trying to find some OCR tool that allows me to find stuff and click it
 
4:53 PM
[Hector] I think I'll have to use OCR, because it has to run on Bluestacks
[Hector] does anyone know about this?
 
 
5 hours later…
9:39 PM
[Hector] man I've been at it all afternoon and I can't find shit
[Hector] autohotkey has one option but it sucks balls
[Hector] you change the position of the text very slightly and it no longer reads
 

« first day (4238 days earlier)      last day (703 days later) »