« first day (4237 days earlier)      last day (694 days later) » 

2:56 AM
How they tests frequencies efficiency and equalize almost all branded heaadphones to same level?
Can confirm not by ear, they tests it with identical results everytime
 
 
4 hours later…
6:34 AM
Good morning
@BenderBoy The whole framework you're using seems a little ugly though. If you're building a web app, why not use blazor?
@mshwf Derived class gets a static void factory function that assigns the base singleton instance
Then during setup somewhere you call that
Depends on which part of the application decides which derivative to use for the singleton instance of course. Seems a weird construct IMO, as derived classes kinda work against the singleton pattern.
 
Design question. I have a customer, and customerGroup. I need to represent this as Json, having cyclic issue (customer ->customerGroup -> customer). Would you have a specific class (record) than represents the printableCustomer and printableCustomerGroup? The record just clips any info I don't want to show.
How would one cleanly solve this issue?
EF and WebAPI.
 
Thought so lol
 
Sorry if my question is a little disorganized.
 
Had the same problem, a colleague built the DB and tried directly using the entities in the application and had users and groups within each other of course because that's how EF works^^
Perfectly valid question and I start thinking more people have that problem
 
How did you guys resolve?
 
6:44 AM
How are the customers and groups used in the actual application? Do you usually display each group with a list of customers in it, maybe manage each group by adding and removing customers? That would be our use case, then you model the customer by itself and add multiple customers to a group.
Or is the group just like something shown on the customer's page, maybe you change it from there? Or maybe the customer can change it themselves on their profile page? Might be a sign to add the group to each customer and have the group just be whatever other properties such a group has.
 
That is a good question ("How are the customers and groups used in the actual application") , I'm not sure, I am just displaying for now. Didn't think that far.
 
How do you display them?
 
Group -> Customers.
 
An element per group, then customers within?
Then that for now :)
 
Then Customer belongs to groups, next transaction.
Thanks, that helped.
Cheers.
 
6:48 AM
IMO it's the more probable way of modelling it too, as a group is usually indeed seen as multiple customers, whereas a person is usually not seen as "someone who is in a group".
 
Found it, they measures using expensive technical equipment
 
Kinda what I expected
 
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' pleberinos!
 
 
1 hour later…
8:25 AM
Yo I need some help my google fu is failing me
Can I somehow use the concept of IAsyncEnumerable for an http call?
Like, make a call and return a list of objects one by one and let the client process them as they arrive?
Using a rest api
 
AsyncEnumerable only makes sense if you have async calls between your records iirc
so, if you have to do a http call per 100 items and you want to get the first 1000 items, you need 10 calls, making asyncEnumerable worf it
 
[Captain Obvious] Yeah what wiet said
[Captain Obvious] You can't really do yieldy type results with HTTP calls (with the exception of streamed content)
 
8:41 AM
Then I guess streamed content sounds like one possible solution for my problem
And no it's not about chunking, it's about making calls to 50 different APIs and some of them will return after 2 seconds and some will return after 60 seconds and I don't want to wait 60 seconds until I can start processing the results.
 
there is one grey area, which is streaming binary content
generally speaking, when you are streaming data, that is an async operation
 
I'm just afraid that it means I have to literally read a byte stream and deserialize it myself
 
but on the level of binary reading/writing, the async overhead is just too much to have any benefit from it
hence why the binary reader/writer classes still arent async
considering that the response from the http call is binary content, and streamable, even then you'd avoid async for the streaming
@Squirrelkiller only await when necessary
 
Actually currently the call is blocking anyway lol
We're just planning to split it up into 50 blocking calls, but by doing those within a task each we can at least then start sending already finished results to the frontend
 
9:00 AM
[Captain Obvious] Oh yeah I said the streamed thing as a the only real async response solution
[Captain Obvious] You definitely shouldn't do it though
 
Guess the client is gonna be orchestrating then
 
[Captain Obvious] I mean you don't have to do anything special on the receiving end, you'd just have to do some super sketchy shit on the backend
 
not really, you just need streaming data
and an arbitrarily sized content
(content of length unknown to the headers when returning the response)
but not sure how to do that in whatever framework you use
 
asp.net, we're already on net472 now!
 
asp.net web api?
 
9:05 AM
I guess?
 
@Squirrelkiller you can. ASP.Net uses WithCancellation in the background, so you don't have to pass it down the rabbit hole
 
But how can I return each finished task through http?
When 50 tasks each return a list of objects, I want to return the first list as soon as the first task finishes
 
you can return the IAsyncEnumerable itself
we use it like just return the IAsyncEnumerable wrapped in Ok
and the DB side ...ProjectTo<Model>.AsAsyncEnumerable()
 
Doesn't the runtime then wait for all the tasks and then returns the whole list?
 
In Java, we'd have a function which has an OutputStream as parameter, which you could write the response to
then in the code, you'd start all the tasks and let each of them write to the output stream (locked per record to avoid concurrency issues)
then all the tasks are awaited to avoid the method from returning early and cutting off the connection
 
9:13 AM
depends on the db IMHO
 
it should look something like that, but not sure if asp.net supports it
 
@Wietlol I think it works the same in asp.net, I'm just still hoping the framework has something for me so I don't have to do that manually xD
 
if the framework doesnt, then it does not work the same way
 
@ntohl My question still stands. Pretend I don't have a DB but just 50 tasks I start myself with different levels of await Task.Delay within. How does that look from the http perspective?
 
public HttpResponseMessage Subscribe(HttpRequestMessage request)
{
    var response = request.CreateResponse();
    response.Content = new PushStreamContent((a, b, c) =>
        { OnStreamAvailable(a, b, c); }, "text/event-stream");
    return response;
}
perhaps something like this?
not sure how to make it async though
 
9:16 AM
I think since it's a stream it is basically inherently async?
 
By being forced to do it that way anyway
 
stream and async are 2 entirely different things
 
Absolutely
As soon as a stream is involved, our usual idea of "async" just isn't part of the equation anymore
 
> Content = new PushStreamContent(async (outputStream, httpContext, transportContext) =>
looks like you can just make it async
but i am not sure if that results in an async void or async task
probably void
in which case, I dont know if there is any guarantee it will complete before closing the connection
maybe it will close the connection when the stream is closed...
I suppose that would be the easiest way to handle this, but not the easiest way to design this
 
9:20 AM
So it's probably async task then
Would make sense
 
it makes sense for it to be Task from the perspective of async support
it makes sense for it to be void from the perspective that no one cares about providing async support
I still bet #2
 
_mvcOptions.MaxIAsyncEnumerableBufferLimit

defines the buffer size even if you push Tasks
 
Ah but you see, it waits for all the results and only then returns the whole thing
This is how we currently do it
 
I had experience that api application wrote in async almost everything, the application will eventually hang after period of time, no error
 
Maybe it's time to add some SignalR to our application
 
9:28 AM
@Squirrelkiller but cancellation DOES work here
 
after hard time to debug, turnsout culprit was tasks waiting each other after threadpool was full and reached max thread limit
 
if you cancel before, not all of the items are shoveled into the result list
 
I don't care about cancelling though, I wanna start processing results before all the results are in.
 
9:52 AM
@Squirrelkiller just try the PushStreamContent
> Stephen one thing you did not put was that the outputStream MUST BE CLOSED by the developer when using the PushStreamContent, the framework does not perform that and you can end up with connections not closing and resources not being freed
considering that reply, the async void is fine
 
10:39 AM
 
11:12 AM
So anyone used EFCore for both localdb and postgres db in tandem, so you can use localdb during dev but then postgres in prod?
Do I just #if DEBUG sp.UseSqlServer(localDbConString) #else sp.UseNpgSql(postgresConString) #endif ?
But then migrations and stuff probably break, right?
 
@nyconing It's funny cuz their all base-forms
 
[Captain Obvious] In theory as long as you're not doing anything DB specific in your migrhations (ie custom queries) it should workl
[Captain Obvious] Although you should ideally develop against the same DB you use in prod
\[**[ntohl (MR.TaNk)](https://discord.gg/PNMq3pBSUe)**] services.AddDbContext<DefinitionDbContext>(options =>
{
string provider = configuration.GetValue<string>(_databaseProviderKey);
if (provider != "PostgreSql")
{
options.UseSqlServer(
configuration.GetConnectionString(_msSqlConnectionStringKey),
options2 => { options2.MigrationsAssembly(Constants.MigrationAssemblyNames.MsSql); }
);
}
else
{
options.UseNpgsql(
configuration.GetConnectionString(_postgreConnectionStringKey),
options3 => { options3.MigrationsAssembly(Constants.MigrationAssemblyNames.PostgreSql); }
 
11:30 AM
I'd like to be able to just deploy a feature instance in a container that brings its own, empty db
 
[ntohl (MR.TaNk)] using something like that you don't need macro if else
 
And I recently learned that a byte[] is stored differently in sql server and postgres
 
[ntohl (MR.TaNk)] EF can be configured to multiple migration assemblies
 
Oh, so i tell it which migration to run for which db?
 
 
1 hour later…
12:47 PM
[Captain Obvious] FUCK APPLE
[Captain Obvious] didFinishLaunching
[Captain Obvious] Why the fuck doesn't that be called when the launching did finish
[Harry the Roach] That's what they want you to think
[Captain Obvious] Well I need to do shit with the UIWindow
[Captain Obvious] Exceppt I can't do it during DidFinishLaunching
[Harry the Roach] Are you really telling me you've only just realised apple are a bunch of clowns
[Captain Obvious] Because the Window doesn't exist yet
[Captain Obvious] i'm very aware
 
1:10 PM
little mischiefs
 
1:27 PM
> didFinishLaunching
sounds like a boolean field
public bool didFinishLaunching { get; }
 
[Captain Obvious] it's a method that returns a bool
[Captain Obvious] which I didn't realise until a few minutes agoi
 
have you tried while (!didFinishLaunching()) {} to wait for it to finish launching? :)
 
[Captain Obvious] Although most didDoSomething methods in Apple's various delegates are usually "thing has been completed"
[Captain Obvious] Unfortunately that method is called by the system
 
2:04 PM
Guest Post on May 23, 2022
All those CEOs on LinkedIn claiming they can find the right candidate in a five-minute conversation? Wrong. Science shows us how we can do better.
 
2:44 PM
[Captain Obvious] Fucking visual studio man
[Captain Obvious] "okay no problem, I'll just close VS and reopen"
[Captain Obvious] "Okay, I'll cancel the build"
[Captain Obvious] Problem solved
 
I can recommend
 
 
2 hours later…
4:35 PM
 
 
2 hours later…
7:33 PM
posted on May 23, 2022 by Jordan Matthiesen

Today, I’m thrilled to share the news of the general availability (GA) release of Visual Studio 2022 for Mac v17.0 and that it’s available to download now. This is the fastest Visual Studio for Mac version yet with an all new native macOS UI, The post Visual Studio 2022 for Mac is now available appeared first on Visual Studio Blog.

posted on May 23, 2022 by David Ortinau

Welcome to .NET Multi-platform App UI. This release marks a new milestone in our multi-year journey to unify the .NET platform. Now you and over 5 million other .NET developers have a first-class, cross-platform UI stack targeting Android, iOS, macOS, and Windows to complement the .NET toolchain (SDK) and base class library (BCL). The post Introducing .NET MAUI – One Codebase, Many Platf

 

« first day (4237 days earlier)      last day (694 days later) »